apeiros changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
lannonbr has joined #ruby
al2o3-cr has joined #ruby
_X_C_V_B_ has joined #ruby
platzhirsch has quit [Ping timeout: 255 seconds]
casadei_ has joined #ruby
baroquebobcat has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bradleyprice has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
leesharma has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
Dzejmskrokan has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 250 seconds]
skade has quit [Quit: Computer has gone to sleep.]
leesharma has joined #ruby
ap4y has quit [Ping timeout: 252 seconds]
msnyon has joined #ruby
al2o3-cr1 has joined #ruby
FernandoBasso has quit [Quit: May the force be with you.]
bayed has quit [Quit: Connection closed for inactivity]
al2o3-cr has quit [Disconnected by services]
al2o3-cr1 is now known as al2o3-cr
al2o3-cr has quit [Client Quit]
al2o3-cr has joined #ruby
msnyon_ has joined #ruby
marr has quit []
casadei_ has quit [Remote host closed the connection]
msnyon has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
RegulationD has quit [Remote host closed the connection]
msnyon_ is now known as msnyon
tcrypt has joined #ruby
pengin has quit [Remote host closed the connection]
Ropeney has joined #ruby
Muhannad has quit [Read error: Connection reset by peer]
saddad has joined #ruby
snockerton has quit [Quit: Leaving.]
casadei_ has joined #ruby
Muhannad has joined #ruby
<drbrain> Alayde: might be that your SOAP client is using a different certificate store than `openssl`
<drbrain> or that your SOAP client isn't loading any certificates
<Alayde> drbrain: tjat
<Alayde> damn it
<Alayde> that's kind of what I was thinking. Unfortunately the code isn't mine, I'm just trying to make it work: https://github.com/Nextdoor/puppet_thycotic
<Alayde> I've gotten a few more leads though, in regards to the soap4r gem; looks like you can disable ssl verification during a call so I'll try that tomorrow
tmtwd has quit [Ping timeout: 260 seconds]
omegamike has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Oka has quit [Remote host closed the connection]
<pontiki> hi, all
<havenwood> pontiki: hey
<pontiki> what does `extend self` do in a module?
<pontiki> is that a funny way of saying `module_function` at the top of a module?
<havenwood> pontiki: nope, it's different from module_function despite the similarities
Mendenhall has joined #ruby
<havenwood> pontiki: The module function instance methods are copies and are private.
<pontiki> could you splain it to me, ricky?
<Ox0dea> "Havey, you got some 'splainin' to do."
sarkyniin has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 255 seconds]
Synthead has quit [Quit: Leaving]
omegamike has quit [Ping timeout: 260 seconds]
saddad has quit [Ping timeout: 246 seconds]
jmfurlott has joined #ruby
govg has quit [Quit: leaving]
oo_ has joined #ruby
<Ox0dea> >> module Foo; module_function def foo; end end; module Bar; extend self; def bar; end end; [Foo.method(:foo), Bar.method(:bar)] # pontiki
<ruboto> Ox0dea # => [#<Method: Foo.foo>, #<Method: Module(Bar)#bar>] (https://eval.in/412842)
<al2o3-cr> makes all instance_methods to singleton_methods
govg has joined #ruby
Muhannad has quit [Read error: Connection reset by peer]
leesharma has quit [Ping timeout: 265 seconds]
Muhannad has joined #ruby
<pontiki> i guess i need a more practical understanding. guess i'll repl about
<drbrain> Alayde: you really, really don't want to disable TLS verification
<drbrain> really, really, really don't want to
scottschecter has quit [Quit: Leaving]
<drbrain> Alayde: especially since you're using this to pass secrets around
<drbrain> may as well be paste them into IRC
sevenseacat has joined #ruby
<Alayde> Valid point
<Ox0dea> Alayde: Please post `head -1 /etc/shadow` output.
<al2o3-cr> hi sevenseacat ^(··)^ # that's supposed to be a cat
ascarter has joined #ruby
<sevenseacat> al2o3-cr: good morning :)
<al2o3-cr> morning :)
bricker has quit [Ping timeout: 260 seconds]
<baweaver> How so?
<baweaver> ...dangit
<baweaver> scrollback
<baweaver> ignore me
<Alayde> Ox0dea: root:$6$ah-ah-ah-youdidntsaythemagicword:16231:0:99999:7::: ?
<al2o3-cr> LOL
<drbrain> Alayde: look for CertStore in soap4r and trace that back
jackjackdripper has quit [Quit: Leaving.]
<drbrain> and/or cert_store
<Alayde> drbrain: Roger that.
sperant has joined #ruby
mrod has quit [Ping timeout: 246 seconds]
<baweaver> Old etc passwd eh?
<baweaver> shadow
<Alayde> CentOS 6.5
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
maletor has joined #ruby
_ht has quit [Quit: Konversation terminated!]
scripore has quit [Quit: This computer has gone to sleep]
reset has quit [Ping timeout: 255 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sperant has quit [Quit: Textual IRC Client: www.textualapp.com]
tjohnson has quit [Quit: Connection closed for inactivity]
ribbons has quit [Ping timeout: 252 seconds]
phutchins has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
tkuchiki has quit [Remote host closed the connection]
towski__ has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
texasmade has quit [Ping timeout: 250 seconds]
Mon_Ouie has joined #ruby
chipotle has joined #ruby
hazelux has quit [Remote host closed the connection]
edwardly has quit [Quit: ??????????]
Oka has joined #ruby
hazelux has joined #ruby
j4cknewt_ has quit [Remote host closed the connection]
theobrowne has joined #ruby
tubuliferous_ has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
psy_ has joined #ruby
edwardly has joined #ruby
govg has quit [Ping timeout: 240 seconds]
edwardly has quit [Changing host]
edwardly has joined #ruby
GeissT has quit [Quit: Bye!]
tubuliferous_ has quit [Ping timeout: 250 seconds]
Muhannad has quit [Remote host closed the connection]
podman has quit [Quit: Connection closed for inactivity]
havenwood has quit [Ping timeout: 260 seconds]
maq has joined #ruby
Aswebb_ has joined #ruby
rakm has joined #ruby
ap4y has joined #ruby
centrx has joined #ruby
michaeldeol has joined #ruby
ap4y has quit [Remote host closed the connection]
<shevy> hmm ... .map { |_| _.capitalize } is the same as .map(&:capitalize) right?
xelkarin has quit [Quit: WeeChat 1.1.1]
al2o3-cr is now known as guineafowl
<Ox0dea> Yes.
fullofcaffeine has joined #ruby
<shevy> sometimes my own code manages to surprise me
Aswebb_ has quit [Ping timeout: 264 seconds]
guineafowl is now known as al2o3-cr
<centrx> I'm surprised you wrote that
avahey has joined #ruby
baweaver has quit [Remote host closed the connection]
<Ox0dea> shevy likes using _ for variables that matter. :P
phutchins has joined #ruby
<shevy> _ is cool
scripore has joined #ruby
<shevy> I don't have to think about a name
<shevy> giving things a name is hard, just look at gems like unicorn or god or thor
<shevy> or rails!!!
jmfurlott has quit [Ping timeout: 245 seconds]
MyMind has joined #ruby
pyon has quit [Quit: It's time for your reckoning...]
Mendenhall has quit [Ping timeout: 250 seconds]
Sembei has quit [Ping timeout: 240 seconds]
krz has quit [Quit: WeeChat 1.2]
|\|370 has quit []
pyon has joined #ruby
ap4y has joined #ruby
leesharma has joined #ruby
icarus has quit [Ping timeout: 244 seconds]
j_mcnall_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ribbons has joined #ruby
benlovell has joined #ruby
zacstewart has quit [Remote host closed the connection]
<shevy> Ox0dea have you perhaps written a minimal irb?
<Ox0dea> shevy: irb is already pretty minimal?
<Mon_Ouie> loop { begin; p eval(gets); rescue Exception => e; p e; end }
<Ox0dea> ^
<shevy> eval scares me :(
<Ox0dea> Run it under `rlwrap`, and you're good to go.
fullofcaffeine has quit [Remote host closed the connection]
s00pcan has quit [Ping timeout: 244 seconds]
Oka has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 260 seconds]
s00pcan has joined #ruby
ereslibre has quit [Ping timeout: 265 seconds]
GeissT has joined #ruby
graydot has quit [Quit: graydot]
niiamon has quit [Ping timeout: 244 seconds]
ereslibre has joined #ruby
yfeldblum has quit [Remote host closed the connection]
blueOxigen has joined #ruby
icarus has joined #ruby
<Ox0dea> shevy: Are you planning on writing a minimal irb without using eval?
bluOxigen has quit [Ping timeout: 255 seconds]
NeverDie has joined #ruby
nateberkopec has quit [Ping timeout: 250 seconds]
<shevy> Ox0dea don't think eval can be avoided
niiamon has joined #ruby
<shevy> irb is using lots of evals
<shevy> workspace.rb: @main = eval("self", @binding)
icarus has quit [Remote host closed the connection]
dr3w has joined #ruby
<shevy> lots of things make irb nicer to use, like IRB.conf[:EVAL_HISTORY], but I don't need any of that
Oka has joined #ruby
Yzguy has quit [Quit: Zzz...]
dr3w has quit [Client Quit]
<shevy> youtube is kinda funny, it's like a big lecture room with lots of different lectures available
dr3w has joined #ruby
fullofcaffeine has joined #ruby
<shevy> incompatible character encodings: UTF-8 and ISO-8859-1 (Encoding::CompatibilityError)
<shevy> cool
<shevy> never saw this error before
phutchins has quit [Ping timeout: 250 seconds]
djbkd has quit [Remote host closed the connection]
tkuchiki has joined #ruby
diegoviola has joined #ruby
yfeldblum has joined #ruby
mdavid613 has quit [Quit: Leaving.]
ereslibre has quit [Quit: No Ping reply in 180 seconds.]
ereslibre has joined #ruby
devoldmx has joined #ruby
radgeRayden has joined #ruby
nahtnam has quit [Quit: Connection closed for inactivity]
saddad has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
Vile` has quit [Ping timeout: 272 seconds]
j4cknewt has joined #ruby
niiamon has quit [Read error: Connection timed out]
Vile` has joined #ruby
niiamon has joined #ruby
halcyone3 has joined #ruby
bradleyprice has quit [Remote host closed the connection]
niiamon has quit [Read error: Connection reset by peer]
niiamon has joined #ruby
Inside has joined #ruby
Inside has joined #ruby
bricker has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
dr3w has quit [Ping timeout: 255 seconds]
halcyone3 has quit [Ping timeout: 252 seconds]
Oka has quit []
Trynemjoel has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
MatthewsFace has joined #ruby
dmmoody has joined #ruby
RegulationD has joined #ruby
allcentury has joined #ruby
omegamike has joined #ruby
ereslibre has quit [Ping timeout: 260 seconds]
umgrosscol has joined #ruby
<shevy> now I wondered why an alias won't work
<shevy> until I realized I forgot to use the word "alias" ...
atom3_ has joined #ruby
atom3 has quit [Ping timeout: 256 seconds]
omegamike has quit [Ping timeout: 246 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arescorpio has joined #ruby
yqt has quit [Ping timeout: 252 seconds]
zacstewart has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
ponga has quit []
niiamon has quit [Read error: Connection timed out]
dorei has quit []
niiamon has joined #ruby
poguez_ has joined #ruby
leesharma has quit [Ping timeout: 252 seconds]
Channel6 has quit [Quit: Leaving]
s00pcan has quit [Ping timeout: 252 seconds]
gthank has joined #ruby
s00pcan has joined #ruby
iateadonut has joined #ruby
centrx has quit [Quit: 'Get out, you and all the people who follow you!' Then he went out from Pharaoh in hot anger.]
Chau has joined #ruby
dseitz has joined #ruby
dmmoody has quit [Remote host closed the connection]
leesharma has joined #ruby
darkf has joined #ruby
leesharma has quit [Client Quit]
_blizzy_ has joined #ruby
hazelux has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
niiamon has quit [Read error: Connection timed out]
hazelux has joined #ruby
maq has quit [Quit: maq]
Randroid has joined #ruby
niiamon has joined #ruby
ascarter has joined #ruby
dmmoody has joined #ruby
brendan- has joined #ruby
Randroid has left #ruby [#ruby]
astrobun_ has joined #ruby
niiamon_ has joined #ruby
niiamon has quit [Ping timeout: 246 seconds]
niiamon_ has quit [Ping timeout: 240 seconds]
d2dchat has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
niiamon has joined #ruby
Chau has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Remote host closed the connection]
Mendenhall has joined #ruby
CorySimmons has joined #ruby
tubuliferous_ has joined #ruby
jonee has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
braincrash has quit [Quit: bye bye]
Randroid has joined #ruby
Randroid has left #ruby [#ruby]
hazelux has quit [Ping timeout: 244 seconds]
tubuliferous_ has quit [Ping timeout: 244 seconds]
braincrash has joined #ruby
allcentury has quit [Ping timeout: 250 seconds]
Aswebb_ has joined #ruby
Chau has joined #ruby
CorySimmons has quit [Quit: Bye!]
dopie has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
Fire-Dragon-DoL has quit []
halcyone3 has joined #ruby
lannonbr has quit [Quit: WeeChat 1.2]
ramfjord has quit [Ping timeout: 246 seconds]
fedexo has joined #ruby
r_baron has joined #ruby
Aswebb_ has quit [Ping timeout: 250 seconds]
milesforrest has quit [Read error: Connection reset by peer]
maletor has quit [Quit: Computer has gone to sleep.]
bricker has quit [Ping timeout: 272 seconds]
Chau has quit [Ping timeout: 244 seconds]
d0lph1n98 has joined #ruby
Pupeno has joined #ruby
Pupeno_ has quit [Ping timeout: 244 seconds]
d0lph1n98 has quit [Remote host closed the connection]
maq has joined #ruby
dmmoody has quit []
shadoi has quit [Quit: Leaving.]
djbkd has joined #ruby
ponga has joined #ruby
armyriad has quit [Read error: Connection reset by peer]
seitensei has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
RegulationD has joined #ruby
seitensei has joined #ruby
fedexo has quit [Quit: No Ping reply in 180 seconds.]
diego1 has joined #ruby
[k- has joined #ruby
gix has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
diegoviola has quit [Ping timeout: 246 seconds]
devoldmx has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
gix has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
astrobu__ has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
serivich has joined #ruby
<bazbing80> what's the most efficent way to update just one file line? Read line 3, update 1 character on that line, save and close the file. Seems wasteful to load the whole thing into memory
maq has quit [Quit: maq]
astrobun_ has quit [Ping timeout: 265 seconds]
<Ox0dea> bazbing80: Most filesystems only support efficient append. :/
Chau has joined #ruby
oo_ has quit [Remote host closed the connection]
theobrowne has quit [Ping timeout: 264 seconds]
<bazbing80> Ox0dea so reading the whole file, editing in memory and then writing everything back into the file is the only way?
<bazbing80> no worries if so that's what its doing already :L
nofxx has joined #ruby
<bazbing80> if you look at Digital Ross' answer, gsub seems to give the illusion of being efficent and only writing one line http://stackoverflow.com/questions/4048678/ruby-open-file-find-and-replace-multiple-lines
<Ox0dea> ~ $ lorem 42 > foo && strace sed -i '21s/./x/' foo 2>&1 | grep -c write
<Ox0dea> 83
oo_ has joined #ruby
<Ox0dea> bazbing80: As you can see, even venerable `sed` has to write every single line even though it's only being asked to replace a single character on a single line.
<bazbing80> hah even sed
<Ox0dea> bazbing80: I use it as an example only becaue if there were some better way to do it, `sed` almost certainly would.
sdrew has joined #ruby
<bazbing80> yeah I get, thanks. Another question, you know when Rails updates your filesystem, and you get feedback. create file create file2 create file3 modify file4 ect? is it a gem that provides that feedback and or syntax?
<bazbing80> not just rails standalone gems show the same output
<bazbing80> seems standarized
ramfjord has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
<Ox0dea> bazbing80: That'd be Thor.
Rollabunna has joined #ruby
<Ox0dea> Which isn't "standardized", per se, but it's easy to argue its being the best offering for making "command" CLIs.
fedexo has joined #ruby
halcyone3 has quit [Ping timeout: 252 seconds]
j4cknewt has quit [Remote host closed the connection]
<bazbing80> Ox0dea cool, can you link me to some docs? I'm not sure what search terms to use regarding giving filesystem feedback via Thor
Chau has quit [Ping timeout: 246 seconds]
<Ox0dea> bazbing80: You seem to be under the impression that these apps are monitoring the filesystem and responding to events. They're just logging what they're about to do.
Rollabunna has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
<bazbing80> Ox0dea: I was indeed under that impression...well do you know methods I need to utilize within my code to log?
michael_mbp has quit [Excess Flood]
fedexo has quit [Quit: No Ping reply in 180 seconds.]
<pontiki> remember, too, that the file system knows nothing itself about lines
mistermocha has joined #ruby
michael_mbp has joined #ruby
<bazbing80> pontiki: you mean if I want to give feedback on what line has been edited? that's no worry
mistermocha has quit [Remote host closed the connection]
<pontiki> idk, i was looking at your original query about updating just one line
d2dchat has quit [Remote host closed the connection]
Rollabunna has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
fedexo has joined #ruby
sdrew has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
omegamike has joined #ruby
safeforge has joined #ruby
theobrowne has joined #ruby
Musashi007 has joined #ruby
yfeldblum has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
omegamike has quit [Ping timeout: 250 seconds]
yosafbridge has quit [K-Lined]
yfeldblum has quit [Ping timeout: 264 seconds]
dopie has quit [Quit: This computer has gone to sleep]
cvtsx1 has joined #ruby
devbug_ has joined #ruby
Mendenhall has quit [Ping timeout: 240 seconds]
blue_deref has quit [Quit: bbn]
yosafbridge has joined #ruby
astrobu__ has quit [Remote host closed the connection]
cvtsx has quit [Ping timeout: 244 seconds]
Mon_Ouie has quit [Read error: Connection reset by peer]
qiukun has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
Mon_Ouie has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
astrobun_ has joined #ruby
Rutix has quit []
Motoservo has joined #ruby
Synthead has joined #ruby
Synthead has quit [Max SendQ exceeded]
Synthead has joined #ruby
Musashi007 has quit [Ping timeout: 250 seconds]
Synthead has quit [Client Quit]
Rutix has joined #ruby
Rutix has joined #ruby
serivich has quit [Ping timeout: 260 seconds]
Rutix has quit [Client Quit]
fedexo has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
r_baron has quit [Quit: Leaving]
jbw__ has quit [Ping timeout: 246 seconds]
railswebdev has joined #ruby
jbw__ has joined #ruby
fedexo has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
yfeldblum has quit [Ping timeout: 245 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tmtwd has joined #ruby
fedexo has quit [Client Quit]
symm- has quit [Ping timeout: 240 seconds]
_blizzy_ has quit [Ping timeout: 265 seconds]
tubuliferous_ has joined #ruby
Inside has quit [Ping timeout: 244 seconds]
frem has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
schaerli has joined #ruby
schaerli has quit [Client Quit]
A124 has quit [Ping timeout: 260 seconds]
tubuliferous_ has quit [Ping timeout: 250 seconds]
A124 has joined #ruby
fedexo has joined #ruby
pawnbox has joined #ruby
Kalov has quit []
Aswebb_ has joined #ruby
Musashi007 has joined #ruby
mistermocha has joined #ruby
ragingcake_ has quit [Quit: ragingcake_]
riotjones has joined #ruby
Fraeon has quit [Ping timeout: 264 seconds]
Rollabunna has quit [Read error: Connection reset by peer]
Aswebb_ has quit [Ping timeout: 256 seconds]
bradleyprice has joined #ruby
niemcu has joined #ruby
jenrzzz has joined #ruby
tmtwd has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 246 seconds]
tanath has left #ruby ["Leaving"]
oo_ has quit [Remote host closed the connection]
avahey has quit [Quit: Connection closed for inactivity]
Rollabun_ has joined #ruby
tmtwd has joined #ruby
chrissonar has joined #ruby
yfeldblum has joined #ruby
mistermocha has quit [Ping timeout: 246 seconds]
kidoz has quit [Quit: Ухожу я от вас]
reverse_light has joined #ruby
arescorpio has quit [Read error: Connection reset by peer]
rehat has quit []
graydot has joined #ruby
[k- has quit [Ping timeout: 256 seconds]
psy_ has quit [Ping timeout: 245 seconds]
bronson_ has quit [Remote host closed the connection]
oo_ has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
fullofcaffeine has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
Rollabunna has joined #ruby
dualbus has quit [Quit: WeeChat 1.2]
Rollabun_ has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
casadei_ has quit [Remote host closed the connection]
Musashi007_ has joined #ruby
casadei_ has joined #ruby
dualbus has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Ping timeout: 246 seconds]
Musashi007_ is now known as Musashi007
Rollabunna has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
casadei_ has quit [Ping timeout: 264 seconds]
RobertBirnie has joined #ruby
devoldmx has joined #ruby
vondruch has joined #ruby
niemcu has quit [Ping timeout: 256 seconds]
oo_ has quit [Remote host closed the connection]
graydot has quit [Quit: graydot]
oo_ has joined #ruby
Rollabunna has joined #ruby
j4cknewt has joined #ruby
riotjones has joined #ruby
devoldmx_ has joined #ruby
ZeBaws has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
<ZeBaws> Hey guys! Is ruby a good language for complete programmers?
oo_ has quit [Remote host closed the connection]
<Ox0dea> No.
nickjj has quit [Ping timeout: 244 seconds]
<ZeBaws> What is the best language for teaching programming?
<Ox0dea> Scheme.
oo_ has joined #ruby
Violentr has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
Rollabunna has quit [Ping timeout: 246 seconds]
ZeBaws has left #ruby [#ruby]
<al2o3-cr> Ox0dea: how long you been doing ruby?
devoldmx_ has quit [Ping timeout: 260 seconds]
abcd1234 has quit [Read error: Connection reset by peer]
RobertBirnie has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Quit: Musashi007]
leat has quit [Ping timeout: 252 seconds]
<wasamasa> not long enough!
devoldmx has joined #ruby
<al2o3-cr> really?
leat has joined #ruby
RobertBirnie has joined #ruby
abcd1234 has joined #ruby
<Ox0dea> al2o3-cr: About eight years, I guess.
lsmola has joined #ruby
abcd1234 has quit [Read error: Connection reset by peer]
* Ox0dea is still raw about having used Python as long as he did.
<sevenseacat> does it give you a better appreciation for the awesomeness of ruby?
fullofcaffeine has joined #ruby
<sevenseacat> i know my seven or so years of php does
<Ox0dea> sevenseacat: So many things give me that appreciation.
abcd1234 has joined #ruby
TvL2386 has joined #ruby
<Ox0dea> There are just so many little pleasures.
<al2o3-cr> i'd give my big toe for ruby
s2013 has joined #ruby
<al2o3-cr> when do you become a pro?
Guest36270 has joined #ruby
Rollabunna has joined #ruby
leat has quit [Quit: leat]
ferhaty has joined #ruby
<al2o3-cr> ruby is just my hobby
Guest36270 is now known as Jandre
oo_ has quit [Remote host closed the connection]
Lucky__ has joined #ruby
Jandre has quit [Changing host]
Jandre has joined #ruby
<Ox0dea> al2o3-cr: On a vaguely related note, I'm surprised there don't seem to be any software projects called Hallux.
<Ox0dea> Do you only write Ruby?
oo_ has joined #ruby
<al2o3-cr> yep, and a little lua
ap4y has quit [Remote host closed the connection]
<al2o3-cr> tried python didn't like it
<atmosx> al2o3-cr: I guess when you're getting paid.
<al2o3-cr> also tried php + js too
Rollabun_ has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
devbug has joined #ruby
<al2o3-cr> atmosx: probably
* sevenseacat sends js to the devil
<al2o3-cr> so, i just stuck to ruby as it was different
Renich has joined #ruby
chinmay_dd has joined #ruby
Renich has quit [Client Quit]
devbug_ has quit [Ping timeout: 246 seconds]
Renich has joined #ruby
fantazo has joined #ruby
AlexRussia has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
psy_ has joined #ruby
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
Feyn has joined #ruby
n1x has joined #ruby
Xiti has joined #ruby
Rollabun_ has quit [Read error: Connection reset by peer]
graydot has joined #ruby
brianpWins_ has joined #ruby
<al2o3-cr> I think i started delving into ruby when the metasploit changed from perl
mesamoo has quit [Quit: Konversation terminated!]
<al2o3-cr> *framework
Rollabun_ has joined #ruby
skade has joined #ruby
brianpWins has quit [Ping timeout: 250 seconds]
brianpWins_ is now known as brianpWins
<sevenseacat> I was tired of all the php web frameworks being 'inspired by rails' so I said screw it, time to learn rails
Rollabun_ has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
<al2o3-cr> and i bet that's the best decision you've made (though haven't use rails at all)
fantazo has quit [Quit: Verlassend]
ramfjord has quit [Ping timeout: 244 seconds]
<al2o3-cr> diggled with sinatra once or twice (nice little dsl)
<sevenseacat> al2o3-cr: absolutely.
<sevenseacat> that was 2011.
<sevenseacat> still here o/
<al2o3-cr> nice to hear :)
cornerma1 has joined #ruby
fedexo has quit [Ping timeout: 244 seconds]
graydot has quit [Quit: graydot]
ddv has quit [Changing host]
ddv has joined #ruby
<al2o3-cr> sevenseacat: did you write class in php?
<al2o3-cr> *classes
<sevenseacat> yep. i was quite used to MVC web frameworks in php
<Aeyrix> I shifted to Ruby from Python after the Python 2/3 split became too unbearable.
cornerman has quit [Ping timeout: 246 seconds]
cornerma1 is now known as cornerman
Rollabunna has quit [Read error: Connection reset by peer]
<al2o3-cr> self is wierd in php
<al2o3-cr> i just don't like the whitespace rule with python, plus one or two other things
<al2o3-cr> what ever can be done with python, can be done with ruby anyway
<al2o3-cr> i like pythons list comps though
nhhagen has joined #ruby
<al2o3-cr> anyway, i'll stop rabbiting on now
pawnbox has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
djbkd has quit [Remote host closed the connection]
janno has joined #ruby
djbkd has joined #ruby
Davey has quit [Ping timeout: 244 seconds]
_djbkd has joined #ruby
bronson has joined #ruby
Pisuke has joined #ruby
yardenbar has joined #ruby
Askilada has joined #ruby
TomyLobo has joined #ruby
Askilada has quit [Client Quit]
MyMind has quit [Ping timeout: 265 seconds]
djbkd has quit [Ping timeout: 264 seconds]
vondruch has quit [Ping timeout: 244 seconds]
minmax has joined #ruby
roolo has joined #ruby
diegoviola has quit [Quit: WeeChat 1.2]
msnyon has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
DoubleMalt has joined #ruby
tmtwd has quit [Remote host closed the connection]
graydot has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
chinmay_dd has quit [Ping timeout: 246 seconds]
fullofcaffeine has quit [Remote host closed the connection]
n1x has quit [Ping timeout: 256 seconds]
michael_mbp has quit [Excess Flood]
pawnbox has quit [Ping timeout: 256 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
niemcu has joined #ruby
graydot has quit [Quit: graydot]
stardiviner has joined #ruby
Macaveli has joined #ruby
michael_mbp has joined #ruby
niiamon has quit [Ping timeout: 252 seconds]
fella6s has quit [Ping timeout: 255 seconds]
fella5s has joined #ruby
tubuliferous_ has joined #ruby
weemsledeux has joined #ruby
TomyLobo has quit [Ping timeout: 240 seconds]
amclain has quit [Quit: Leaving]
Aswebb_ has joined #ruby
radgeRayden has quit [Ping timeout: 250 seconds]
tubuliferous_ has quit [Ping timeout: 246 seconds]
TvL2386 has quit [Ping timeout: 252 seconds]
keeguon has joined #ruby
nikamura has joined #ruby
andikr has joined #ruby
saddad has quit [Ping timeout: 244 seconds]
Philipp__ has joined #ruby
_djbkd has quit [Remote host closed the connection]
aganov has joined #ruby
djbkd has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
n1x has joined #ruby
freerobby has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
Macaveli has joined #ruby
corpsicle has joined #ruby
<corpsicle> hello
pawnbox has joined #ruby
<corpsicle> so, im iterating over a list of variables, checking their content. but when i find an empty variable i want to puts a errormessage containing the name of the variable. how do i achieve this?
zacstewart has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
<Ropeney> corpsicle: p "
brianpWins has joined #ruby
<Ropeney> p "" if variable.nil?
<Ropeney> or p "" if variable == ""
<corpsicle> ok, im a noob at ruby, what does p do ? is it short for puts?
<Mon_Ouie> p o is short for puts o.inspect
<corpsicle> and p "" prints the name of the variable?
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TvL2386 has joined #ruby
<Ropeney> corpsicle: how are you iterating through the variables...? show code?
<corpsicle> for x in [variable1, variable2...]
<corpsicle> and then an if statement checking the content and printing message if empty
<Ox0dea> Yikes.
<corpsicle> not ruby enough ? =)
<Ox0dea> Do you know about Arrays?
<corpsicle> to some extent yes
<Ox0dea> If you have a group of related variables, you almost certainly want to use a collection type like Array or Hash.
oo_ has quit [Remote host closed the connection]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cust0sLim3n has quit [Ping timeout: 245 seconds]
oo_ has joined #ruby
<Ox0dea> baweaver: You... typed that out?
<baweaver> fine fine
<baweaver> HSTS is buggy I guess, doesn't auto translate.
TomyWork has joined #ruby
<Ox0dea> The "www" isn't arbitrary.
<baweaver> you'd think they'd just tag that on the name server
<baweaver> most sites do
<baweaver> What's a few CNAMEs between friends?
frem has quit [Quit: Connection closed for inactivity]
* baweaver should probably go to bed already
<Ox0dea> You never did Muggle the third Triwizard Task.
Cust0sLim3n has joined #ruby
freerobby has quit [Quit: Leaving.]
frem has joined #ruby
khebbie has joined #ruby
krz has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
khebbie has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<Ox0dea> Would you like to hear a SYN flood joke?
<Ox0dea> Would you like to hear a SYN flood joke?
roolo has quit [Remote host closed the connection]
<Ox0dea> Would you like to hear a SYN flood joke?
oo_ has quit [Ping timeout: 260 seconds]
<Ox0dea> Would you like to hear a SYN flood joke?
[k- has joined #ruby
oo_ has joined #ruby
<baweaver> Ox0dea: ACK
yfeldblum has quit [Ping timeout: 244 seconds]
<Ox0dea> Needs more SYNACK.
<baweaver> TCP is just SYNACKtic sugar :D
<Ox0dea> Choice.
* Ox0dea goes for a midnight SYNACK.
<baweaver> brb, tweeting, proud of that one.
<corpsicle> omg i did it
<corpsicle> variables.each do |var, val|
<corpsicle> if not val
<corpsicle> error("environment variable #{var} not set")
<corpsicle> end
<corpsicle> end
<corpsicle> (sorry for spam, but it was so tiny ...)
<baweaver> multiline code goes in gist
<Ox0dea> ?gist corpsicle
<ruboto> corpsicle, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<baweaver> also, postfix ops
<corpsicle> ok =(
<Ox0dea> corpsicle: Is variables a Hash there, then?
<corpsicle> yes
<Ox0dea> Yay!
DoubleMalt has quit [Remote host closed the connection]
<Ox0dea> corpsicle: Your loop body could be `error('...') unless val`, for reference.
<baweaver> too many parens D:
<corpsicle> Ox0dea: thanks, even neater =)
<pontiki> an elegant weapon, from a more civilised age
<[k-> &ri Enumerable#any?
stardiviner has quit [Ping timeout: 246 seconds]
n1x has quit [Ping timeout: 252 seconds]
nikamura has quit [Quit: nikamura]
<Ox0dea> corpsicle: Does your error method cause the program to terminate?
_ht has joined #ruby
yfeldblum has joined #ruby
<[k-> x = variables.find{|var,val| val}; error(...x.first)
<[k-> i wanted to do it with any but couldnt get the var out of it :<
<Ox0dea> [k-: You got it backwards-ish.
Fraeon has joined #ruby
GeissT has quit [Remote host closed the connection]
<corpsicle> Ox0dea: it should yes, its not yet though
Musashi007 has joined #ruby
GeissT has joined #ruby
pawnbox has quit [Remote host closed the connection]
<Ox0dea> corpsicle: I asked pursuant to suggesting something along the lines of what [k- did.
rdark has joined #ruby
bayed has joined #ruby
Lucky__ has quit [Ping timeout: 244 seconds]
<[k-> oh, you have to !val
<[k-> since find retuns for truthy values
<Ox0dea> [k-: Oui, but also a conditional.
<Ox0dea> corpsicle: if bad = x.find { |k, v| v.nil? }; error(bad[0]); end
RegulationD has joined #ruby
<[k-> look, i abstracted away the loop!
<[k-> how amazing is that?!
<Ox0dea> Now to remove the conditionals.
<[k-> hide the conditional inside error
<[k-> use \1 to refer to the variable!
<baweaver> x.invert[nil].tap { |_,e| e && error(e) }
<[k-> cool
tomphp_ has joined #ruby
<Ox0dea> baweaver: Why two parameters?
<baweaver> still a hash
<Ox0dea> No?
<baweaver> ....really need to call it a night
<baweaver> getting sloppy
<Ox0dea> Mayhap. :)
<baweaver> x.invert[nil].tap { |e| e && error(e) }
<Ox0dea> Purdeh.
GeissT has quit [Ping timeout: 245 seconds]
RegulationD has quit [Ping timeout: 255 seconds]
HayesHimself has joined #ruby
tomphp_ has quit [Client Quit]
Musashi007 has quit [Quit: Musashi007]
MatthewsFace has quit [Remote host closed the connection]
Pumukel has joined #ruby
terlar has joined #ruby
duncannz has joined #ruby
nickjj has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
<baweaver> def maybe(&b)->x{x && b[x]}end; {a: nil}.invert[nil].tap(&maybe(&->x{error(x)}))
<baweaver> hehehehe
<baweaver> def maybe(&b)->x{x && b[x]}end; {a: nil}.invert[nil].tap(&maybe(->x{error(x)}))
<Ox0dea> Hwow.
<baweaver> sleep now, bad code happening
<Ox0dea> G'night.
<baweaver> 'night
astrobun_ has quit [Remote host closed the connection]
umgrosscol has quit [Ping timeout: 246 seconds]
baweaver has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
<[k-> did i just hear bad code?
quimrstorres has joined #ruby
j4cknewt has quit [Remote host closed the connection]
theobrowne has quit [Quit: Lost terminal]
Renich has quit [Ping timeout: 255 seconds]
marr has joined #ruby
riffraff has joined #ruby
banister has joined #ruby
skade has joined #ruby
bluurn has joined #ruby
quimrstorres has quit [Remote host closed the connection]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Renich has joined #ruby
<[k-> x.value? nil && error x.find { |k,v| v.nil? }[0]
ndrei has quit [Ping timeout: 272 seconds]
<[k-> hmm precedence
pawnbox has joined #ruby
<[k-> x.sort_by { |k,v| v }.shift.tap { |k,v| error k if v.nil? }
halcyone3 has joined #ruby
omegamike has joined #ruby
<[k-> there are so many possibilities
<[k-> doing a sort is stupid though
michael_mbp has quit [Ping timeout: 246 seconds]
Omni- has quit [Ping timeout: 246 seconds]
Liothen has quit [Ping timeout: 246 seconds]
devbug_ has joined #ruby
<adaedra> Bonjour
<maloik> Ouh chouette on parle francais maintenant?!
<maloik> :-)
Iskarlar has joined #ruby
<adaedra> :)
devbug has quit [Ping timeout: 244 seconds]
Omni- has joined #ruby
omegamike has quit [Ping timeout: 260 seconds]
<corpsicle> did i join #perl by mistake ? ^_^;
Liothen has joined #ruby
krz has quit [Ping timeout: 255 seconds]
michael_mbp has joined #ruby
oo_ has quit [Remote host closed the connection]
<adaedra> In soviet Russia, #perl joins you
tkuchiki has quit [Remote host closed the connection]
<apeiros> in soviet python too
oo_ has joined #ruby
zacstewart has joined #ruby
<DefV> How should I install a specific version on my production server?
<DefV> Build it from source?
<DefV> Use smth as rbenv / rvm / ...
benlovell has joined #ruby
<adaedra> ruby-install + chruby
tomphp_ has joined #ruby
krz has joined #ruby
mikecmpbll has joined #ruby
tkuchiki has joined #ruby
pawnbox has quit [Remote host closed the connection]
Cust0sLim3n has quit [Ping timeout: 255 seconds]
astrobun_ has joined #ruby
devoldmx has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 260 seconds]
Cust0sLim3n has joined #ruby
pawnbox has joined #ruby
chthon has joined #ruby
_X_C_V_B_ has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
djbkd has quit []
khebbie has joined #ruby
AlexRussia has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
benlovell has joined #ruby
bluurn has quit [Ping timeout: 244 seconds]
yh has joined #ruby
saltsa_ has quit [Ping timeout: 264 seconds]
bluurn has joined #ruby
bluurn has quit [Client Quit]
tkuchiki has quit [Remote host closed the connection]
charliesome has joined #ruby
khebbie has quit [Ping timeout: 244 seconds]
<yorickpeterse> morning
tkuchiki has joined #ruby
khebbie has joined #ruby
ragingcake has joined #ruby
charliesome has quit [Client Quit]
charliesome has joined #ruby
charliesome has quit [Client Quit]
Musashi007 has joined #ruby
<Ox0dea> DefV: Do you mind my asking your native language?
Dzejmskrokan has joined #ruby
astrobun_ has quit [Remote host closed the connection]
<[k-> did you ask it before?
<[k-> if not: s/my/me
<[k-> :3
<Ox0dea> No, I think not.
benlovell has quit [Ping timeout: 256 seconds]
<Ox0dea> I confess it's a little unorthodox, but it's not grammatically incorrect.
Jandre has quit [Ping timeout: 272 seconds]
<[k-> it isnt, but the meaning is different
<[k-> as shown by me asking if you have asked before
<[k-> my implies that you have asked it before
<Ox0dea> I can't possess things in the present?
<[k-> me says that you are asking thr question currently
<[k-> dont know, but the sentences are of different meaning
benlovell has joined #ruby
<canton7> "do you mind my asking" can also refer to the present - you're asking, and simultaneously asking if they mind you asking
<Ox0dea> ^
_X_C_V_B_ has joined #ruby
_X_C_V_B_ has quit [Max SendQ exceeded]
<[k-> that is the case as people will answer the question anywat
<Ox0dea> In any case, I've often wondered if there was some linguistic component involved in people dropping the "such" from "such as".
<[k-> anyway*
<Ox0dea> It's remarkably common for such a glaring thinko.
<[k-> do you mind my asking of (...)
Aswebb_ has quit []
<canton7> ...whereas with 'do you mind me asking' you're not actually asking anything - just asking if it's ok to ask
Davey has joined #ruby
<[k-> people will give you the respond if its yes, no otherwise
<Ox0dea> [k-: Is the (act of) asking not "mine", then?
<[k-> not good for type!
<[k-> Ox0dea i do not study language in detail, but i think that act belongs to you
<[k-> you still need to put an of over there as well
<Ox0dea> That seems like a stylistic choice.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k-> seems like both are used
<[k-> but the emphasis is not the same
<[k-> so, different meaning
<[k-> canton7 also explained that too
apfeluser has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tubuliferous_ has joined #ruby
<Ox0dea> I don't see where "emphasis" is applicable in this case.
oo_ has quit [Remote host closed the connection]
<[k-> seems like i was wrong?
<Ox0dea> Seems so.
<Ox0dea> In your favor, I'm apparently "posh".
Violentr has quit [Ping timeout: 246 seconds]
ledestin has joined #ruby
<[k-> i am young, so i prefer me
<Ox0dea> I suppose it would've been "most correct" to use "asking as to", but "as to" is filler.
<[k-> i prefer me because i am young has a different meaning as well
oo_ has joined #ruby
c0ncealed has quit [Ping timeout: 272 seconds]
khebbie has quit [Remote host closed the connection]
zacstewart has quit [Ping timeout: 240 seconds]
oo__ has joined #ruby
tubuliferous_ has quit [Ping timeout: 256 seconds]
<[k-> in my mind, i still require "my (...) of" for it to grammar check correctly
c0ncealed has joined #ruby
Pumukel has quit [Ping timeout: 244 seconds]
riffraff has quit [Quit: This computer has gone to sleep]
<[k-> oxford says my asking is formal
<adaedra> the "most important thing is to be understood" says we don't really care
oo_ has quit [Ping timeout: 260 seconds]
terlar has quit [Quit: WeeChat 1.2]
<[k-> but it's language!
terlar has joined #ruby
pengin has joined #ruby
joonty has joined #ruby
<[k-> (i actually never heard of my asking before)
<adaedra> me neither
j4cknewt has joined #ruby
<adaedra> and I will probably have forgotten about it in 15mn
<[k-> i have never heard of mn as a proper unit for time
_X_C_V_B_ has joined #ruby
<[k-> s/proper//
chthon has left #ruby ["Ex-Chat"]
Musashi007 has quit [Quit: Musashi007]
<adaedra> how do you abbr "minute" then
<canton7> "min" or "mins"
<apeiros> '
<adaedra> fair enough
<apeiros> 2h5'15"
<[k-> mins isn't actually correct
_blizzy_ has joined #ruby
<[k-> we don't put s after units
<adaedra> here we go again
<apeiros> (I do use "min" and "m",t hough)
<maloik> what is going on :D
<adaedra> nothing important
chthon has joined #ruby
<[k-> m technically refers to meters, but it is so common
<ccooke> Hmm. Why can't I pass a block to a proc? Example:
<ccooke> >>> x = ->{ yield 1 }; x.call { |i| p i }
<ruboto> ccooke # => /tmp/execpad-2a62c5201318/source-2a62c5201318:2: syntax error, unexpected '>' ...check link for more (https://eval.in/412994)
<maloik> 15m could mean the time it takes to walk 15 meters? *mindblown*
<ccooke> bah.
baroquebobcat has joined #ruby
<ccooke> >> x = ->{ yield 1 }; x.call { |i| p i }
<ruboto> ccooke # => no block given (yield) (LocalJumpError) ...check link for more (https://eval.in/412995)
<[k-> maloik, no, the speaker usually means 15 minutes
<ccooke> (I can see it's fixable with an explicit &block parameter to the proc, but that's not the point)
<[k-> example, !ban rand_nick !T 15m sorry if there is actually a rand_nick
<adaedra> m is meters
<[k-> yes, that is the official definition
ndrei has joined #ruby
astrobun_ has joined #ruby
<[k-> >> ->{block_given?}.call { nil }
<ruboto> [k- # => false (https://eval.in/412996)
_blizzy_ has quit [Read error: Connection reset by peer]
w1xz has joined #ruby
<Ox0dea> Nah, man, blocks and Procs are totally the same thing. /s
<[k-> i see you exempted yourself from that little discussion over there
pengin has quit [Remote host closed the connection]
w1xz has left #ruby [#ruby]
<Ox0dea> It was the right thing to do.
Vile` has quit [Ping timeout: 245 seconds]
Zackio has quit [Quit: C-x C-c]
pengin has joined #ruby
_blizzy_ has joined #ruby
Zackio has joined #ruby
Vile` has joined #ruby
qiukun has quit [Quit: qiukun]
riffraff has joined #ruby
riffraff has quit [Client Quit]
pengin has quit [Ping timeout: 246 seconds]
qiukun has joined #ruby
vondruch has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Iskarlar has joined #ruby
arup_r has joined #ruby
platzhirsch has joined #ruby
khebbie has joined #ruby
serivich has joined #ruby
umop3plsdn has quit [Ping timeout: 265 seconds]
khebbie has quit [Remote host closed the connection]
charliesome has joined #ruby
ferhaty has quit []
zacstewart has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> ....blocks and procs are the same thing
<[k-> here we go again
<[k-> they aren't
<apeiros> popcorn anyone?
<adaedra> here
<tobiasvl> let's just say they're basically the same thing
<yorickpeterse> [k-: they are
<[k-> but they are not
<apeiros> in MRI they aren't indeed. can be considered an implementation detail, though. only matters for performance.
<bnagy> "for all intents and purposes" I believe is the phrase we're looking for
<tobiasvl> well, not for ALL purposes
<yorickpeterse> A block is nothing more than the syntax form, a proc is still created and exposed to a method whenever you use do ... end
<apeiros> yorickpeterse: nope. a block does not create an object. no GC necessary.
<[k-> except performance
<apeiros> and it shows in performance
<tobiasvl> one actual purpose: multiple proc arguments
TaxtacalJackl has joined #ruby
<yorickpeterse> apeiros: they're still procs, they behave exactly like them
<apeiros> also yield (syntax) vs. block.call (method call) has different overheads
<yorickpeterse> fixnums aren't allocated either, that doesn't not make them objects
<apeiros> yorickpeterse: as said, it's an implementation detail
<apeiros> but they are, in fact, not the same. they only behave the same.
devoldmx has joined #ruby
<Ox0dea> I think that sums it up nicely.
c0ncealed has quit [Ping timeout: 272 seconds]
niemcu has quit [Ping timeout: 260 seconds]
<apeiros> and it may well be that e.g. rbx does in fact not even implement them differently.
A124 has quit [Ping timeout: 260 seconds]
<apeiros> and I'll also repeat that the difference only matters when you have a case where you have to care about performance.
<Ox0dea> Or when you need more than one. ^_^
<[k-> you have 2 ballpoint pens from different brands
<adaedra> I lose them both
<[k-> they do the same thing
<[k-> but they aren't the same
A124 has joined #ruby
<yorickpeterse> See my point about fixnums
<Ox0dea> tobiasvl: In the common case of wanting to execute one or another block based on a boolean value, there's this: https://gist.github.com/0x0dea/94debe4c1c28f6f2bac7
<yorickpeterse> Not being allocated does not making something a non object
<yorickpeterse> Hell, you can have objects without allocations
<yorickpeterse> e.g. nil is never allocated either, it's nothing but a tagged pointer
j4cknewt has quit [Remote host closed the connection]
<yorickpeterse> yet it's still an object
<tobiasvl> Ox0dea: wow.
<[k-> but it isn't the same
<apeiros> yorickpeterse: I'm not arguing that point. but there is no object with a block.
<Ox0dea> tobiasvl: I actually kinda like it. :x
<DefV> Ox0dea: dutch, why?
<tobiasvl> Ox0dea: I gotta fork that so I remember it
<DefV> Ox0dea: Is my English that bad?
devbug has joined #ruby
<adaedra> DefV: speak english, we don't understand you
<adaedra> :p
<Ox0dea> DefV: No, it's really not, and I apologize if I inadvertently gave any offense.
oleksandriuzikov has joined #ruby
<DefV> You didn't, just curious :-)
<[k-> silly?.rb isnt a valid name!
<Ox0dea> It's just that mistakenly dropping the "such" from "such as" is pretty common, and I thought it might have to do with not being a native speaker.
devoldmx has quit [Ping timeout: 265 seconds]
<DefV> aha, it probably is. Now I'm very self-concious
<Ox0dea> [k-: Are you on DOS?
<[k-> i would drop the such
<[k-> fewer words anyway
devbug_ has quit [Ping timeout: 250 seconds]
<tobiasvl> well he said "smth as"
<adaedra> let's drop all the words then
<adaedra>
<tobiasvl> so it's not even fewer words :P
yh has quit [Ping timeout: 260 seconds]
<[k-> Ox0dea yes, in the past i used windows
<Ox0dea> [k-: ? is a valid character in filenames in any remotely modern environment.
<apeiros> Ox0dea: that silly?.rb is funny
soc42 has joined #ruby
<[k-> i see you as a pony!
<Ox0dea> Which?
<adaedra> Ox0dea: so Windows is not modern?
<tobiasvl> silly\?.rb
oo__ has quit [Remote host closed the connection]
<[k-> why would ? even be allowed
<Ox0dea> Why not?
quimrstorres has joined #ruby
<[k-> isnt it in glob patterns or something
<adaedra> it is, but it shouldn't be an issue
<[k-> we don't have * on names for example
<Ox0dea> But we can!
<adaedra> it is possible on a Linux
<Ox0dea> I think / is the only invalid filename character on Linux.
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> depend on the fs, ext4 forbids \0 too apparently.
<Ox0dea> It does not.
serivich has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
<Ox0dea> I had a transposition error. It does.
<adaedra> (According to https://en.wikipedia.org/wiki/Ext4 )
<[k-> i had aerror such as
<[k-> i had errors such as (...) vs errors as (..
<Ox0dea> The latter is wrong.
martinium has quit [Quit: Leaving]
<Ox0dea> Arguing for the equivalence of "as" and "such as" will cause me to unfriend you.
<yorickpeterse> "you're not allowed on my birthday party"
c0ncealed has joined #ruby
<[k-> Ox0dea i used vs!
jbw__ has quit [Ping timeout: 250 seconds]
<[k-> never mind
anisha has joined #ruby
leafybasil has quit [Remote host closed the connection]
sevenseacat has joined #ruby
Hounddog has joined #ruby
<Ox0dea> [k-: For posterity's sake, you did say "i would drop the such".
<Ox0dea> I realize now that was likely in jest.
<[k-> i dont drop it like that!
<Ox0dea> Then you need to increase its internal temperature.
<[k-> anyway, as a Singlish speaker, i would drop words when it is better
<Ox0dea> Walao eh.
<[k-> got problem?
<Ox0dea> Paiseh, paiseh.
zacstewart has quit [Ping timeout: 272 seconds]
arup_r has quit [Remote host closed the connection]
stan has joined #ruby
pawnbox has quit [Remote host closed the connection]
arup_r has joined #ruby
jbw__ has joined #ruby
TheHodge has joined #ruby
Dzejmskrokan has quit [Read error: Connection reset by peer]
Karpah has joined #ruby
Dzejmskr_ has joined #ruby
araujo has joined #ruby
<adaedra> there's only two responses: yes, not yet
<adaedra> answers
<[k-> 6 GiB is the highest
khebbie has joined #ruby
<adaedra> I have a computer at home that may not even have that as hard drive
<yorickpeterse> [k-: you checked the link right?
<yorickpeterse> That server can have up to 6 TB
<yorickpeterse> not GB
arup_r has quit [Remote host closed the connection]
<[k-> well sorry for having volatile memory then ;p
sevenseacat has quit [Ping timeout: 246 seconds]
<yorickpeterse> well, did you just power yourself off?
<yorickpeterse> If not then volatile memory isn't the problem
<yorickpeterse> that just means you might be using MongoDB for storage
Pumukel has joined #ruby
<[k-> you might be on to something here...
yfeldblum has quit [Ping timeout: 246 seconds]
<Ox0dea> yorickpeterse: Or that [k-'s memory can be modified unexpectedly.
<Ox0dea> "From whence" is worse than "PIN number" and "ATM machine" combined.
<[k-> there is actually proof that you can lose memory if you get distracted at the instant your brain is saving the memory
<Ox0dea> [k-: Isn't that science's current explanation for déjà vu?
<[k-> don't know :)
khebbie has quit [Remote host closed the connection]
<tobiasvl> Ox0dea: haha, I actually said "CERT team" not half an hours ago
<tobiasvl> hours
<yorickpeterse> that's just a coverup
<tobiasvl> I'm not good at language today
<yorickpeterse> we all know deja vu is a glitch in the matrix
<mikecmpbll> any mechanize users ever seen anything like this? https://gist.github.com/mikecmpbll/e6b149846cd51396ebf9
last_staff has joined #ruby
<yorickpeterse> * a deja vu
<[k-> pin number!
<[k-> Atm machine!
<[k-> Php processor!
<[k-> yaml language!
* yorickpeterse slaps [k- a few times
<Ox0dea> mikecmpbll: What's detail_page.body.class here?
fella6s has joined #ruby
<mikecmpbll> Ox0dea: String
<Ox0dea> >> String.instance_method(:first)
<ruboto> Ox0dea # => undefined method `first' for class `String' (NameError) ...check link for more (https://eval.in/413015)
<mikecmpbll> detail_page.body.bytes.all?{ |b| b==0 } => true
<Ox0dea> Yikes.
<mikecmpbll> >> "test".first
<ruboto> mikecmpbll # => undefined method `first' for "test":String (NoMethodError) ...check link for more (https://eval.in/413017)
<mikecmpbll> oh really.
<mikecmpbll> wtf
fella5s has quit [Ping timeout: 265 seconds]
<[k-> what
<[k-> String isn't an array
<Ox0dea> mikecmpbll: Was String a guess, then?
<mikecmpbll> Ox0dea: no.
<mikecmpbll> woops, good ol' rails core_ext
<mikecmpbll> either way, it's a string, and all the bytes are \x00 :(
Ropeney has joined #ruby
<yorickpeterse> mikecmpbll: set the proper encoding
<yorickpeterse> or make sure the input is valid in the first place
<mikecmpbll> yorickpeterse: i'll try play around with the encoding, just using mechanize defaults at the moment which always worked for me before. what do you mean by making sure the input is valid?
Ropeney has quit [Client Quit]
<Ox0dea> Mechanize is sort of like Dreamweaver for Web interaction. :P
Pumukel has quit [Ping timeout: 244 seconds]
<yorickpeterse> As in the input not containing crap
<mikecmpbll> yorickpeterse: what input?
<yorickpeterse> whatever you're getting via Mechanize
pawnbox has joined #ruby
ferhaty has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
<Ox0dea> mikecmpbll: Are you authenticated?
<mikecmpbll> Ox0dea: yep
freezevee has joined #ruby
zacstewart has joined #ruby
TaxtacalJackl has quit [Ping timeout: 255 seconds]
A124_ has joined #ruby
A124_ has quit [Client Quit]
benlovell has quit [Read error: No route to host]
oo_ has quit [Remote host closed the connection]
leafybasil has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
iateadonut has left #ruby [#ruby]
<mikecmpbll> ok weird, it works if i change the user agent
cvtsx has joined #ruby
* mikecmpbll assumes some sort of odd scraping defence and moves on with his life
AlxAlt has joined #ruby
<Ox0dea> I couldn't reproduce the NUL stream using your credentials. :/
ndrei has quit [Remote host closed the connection]
<Ox0dea> Glad you got it worked out, though. :P
araujo has quit [Quit: Leaving]
yfeldblum has joined #ruby
oo_ has joined #ruby
Guest98814 has left #ruby [#ruby]
<mikecmpbll> Ox0dea: ah, strange :/
stardiviner has joined #ruby
ndrei has joined #ruby
benlovell has joined #ruby
jonee has quit [Ping timeout: 260 seconds]
cvtsx1 has quit [Ping timeout: 244 seconds]
AlxAltea has quit [Ping timeout: 244 seconds]
nettoweb has joined #ruby
<Ox0dea> mikecmpbll: It's definitely the server doing something wonky, though.
arup_r has joined #ruby
<Ox0dea> I think it might've been the server "lying" about Content-Length that caused inflation to go awry, but that's only hazarding a guess.
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mikecmpbll> ah, sounds plausible. i spent a while finding a site with all the right info, but unfortunately it's been a nightmare to scrape.
sdothum has joined #ruby
<Ox0dea> mikecmpbll: So don't scrape?
<mikecmpbll> the html is abysmal. duplicate ids everywhere, no sensible structure -_-
<Ox0dea> You should monitor the traffic.
<mikecmpbll> hm?
<Ox0dea> Look at what your network is actually sending and receiving while you use the site.
<Ox0dea> Then replay and adjust accordingly.
<mikecmpbll> not sure i entirely comprehend. /hides
niemcu has joined #ruby
<Ox0dea> No worries, then.
benlovell has quit [Ping timeout: 260 seconds]
<mikecmpbll> okidokes.
A124 has quit [Ping timeout: 260 seconds]
<mikecmpbll> thanks for looking at it :)
zacstewart has quit [Read error: Connection timed out]
<Ox0dea> Sure thing. :)
zacstewart has joined #ruby
Macaveli has joined #ruby
Dzejmskr_ has quit [Read error: Connection reset by peer]
<slani> can I create empty Hash and define tahat val will be an intiger
Dzejmskrokan has joined #ruby
<canton7> what's "that val"?
<slani> and tud h[:val1] += 4
_X_C_V_B_ has quit [Ping timeout: 260 seconds]
<slani> value
Jamo has quit [Disconnected by services]
jamo__ is now known as Jamo
<canton7> I got that bit, but I don't know what the "that" refers to ;)
<Ox0dea> slani: Yes, you can use Hash#default.
<Ox0dea> >> foo = Hash.new(0); foo[:x] += 1; foo
<ruboto> Ox0dea # => {:x=>1} (https://eval.in/413031)
weemsledeux has quit [Ping timeout: 260 seconds]
<Ox0dea> >> foo = Hash.new(0); foo.default # clarification
<ruboto> Ox0dea # => 0 (https://eval.in/413032)
A124 has joined #ruby
j4cknewt has joined #ruby
<slani> Ox0dea: thanks
<Ox0dea> Happy to help.
jonee has joined #ruby
njr has quit [Ping timeout: 255 seconds]
ndrei has quit [Ping timeout: 240 seconds]
bodgix has joined #ruby
curses has joined #ruby
j4cknewt has quit [Ping timeout: 255 seconds]
zacstewart has quit [Ping timeout: 255 seconds]
tubuliferous_ has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jds has joined #ruby
Rickmasta has joined #ruby
Violentr has joined #ruby
tubuliferous_ has quit [Ping timeout: 245 seconds]
serivich has joined #ruby
benlovell has joined #ruby
WizJin has joined #ruby
Karpah has quit [Quit: .]
Violentr has quit [Ping timeout: 240 seconds]
devbug has quit [Read error: Connection reset by peer]
ferhaty has quit []
ferhaty has joined #ruby
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
pawnbox has quit [Remote host closed the connection]
Dzejmskrokan has quit [Remote host closed the connection]
serivich has quit [Ping timeout: 244 seconds]
pawnbox has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
DoubleMalt has joined #ruby
bruno- has joined #ruby
stamina has joined #ruby
ArchRogem has joined #ruby
xelim has quit [Quit: Leaving]
Pisuke has quit [Ping timeout: 245 seconds]
doertedev has joined #ruby
xelim has joined #ruby
banister has joined #ruby
Renich has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
Renich has joined #ruby
zacstewart has joined #ruby
halcyone3 has quit [Ping timeout: 244 seconds]
n1x has joined #ruby
Pisuke has joined #ruby
serivich has joined #ruby
phutchins has joined #ruby
halcyone3 has joined #ruby
f4cl3y has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yh has joined #ruby
<slani> how can I sort hash by value
omegamike has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
<mikecmpbll> slani: h.sort_by(&:last) is one way.
<mikecmpbll> h.sort_by{ |_, v| v } might be more clear though :)
<adaedra> { a: 2, b: 1 }.sort { |(_, v1), (_, v2)| v1 <=> v2 }.to_h
<adaedra> grmbl, forgot >> again
<[k-> eww
<mikecmpbll> lol.
<adaedra> what, not obfuscated enough, [k- ?
<shevy> mikecmpbll hmm why did you use |_, v| ?
<adaedra> to get only the value
<[k-> ugly code is ugly code
<mikecmpbll> shevy: as opposed to |c| c[1] ?
<shevy> nono
<shevy> as opposed to picking another name than _
<mikecmpbll> then what adaedra said.
<[k-> _ is unused
<adaedra> shevy: _ = ignore this
<shevy> I use _ a lot!
jimms has joined #ruby
<[k-> yeah we don't need the key
vali has joined #ruby
<vali> hi guys
<vali> I have an issue with a gem when trying to use it in logstash
<vali> I'll make pastebin..
<adaedra> s/pastebin/gist/
<vali> it complains about unable to find cassandra_murmur3, which seems to be included in the cassandra-driver
<vali> but for some reason it still fails
<vali> any suggestions are highly appreciated
omegamike has quit [Ping timeout: 250 seconds]
banister has quit [Ping timeout: 244 seconds]
<izzol> What is in your logstash.conf?
bruno- has quit [Ping timeout: 240 seconds]
<vali> and the default config
zacstewart has quit [Remote host closed the connection]
zacstewart has joined #ruby
A124 has quit [Ping timeout: 260 seconds]
duncannz has quit [Ping timeout: 272 seconds]
OrbitalKitten has joined #ruby
<slani> mikecmpbll: thanks
A124 has joined #ruby
<izzol> vali: I don't see anything such as: cassandra_murmur3 in logstash-output-cassandra.
<vali> I don't see either
qiukun has quit [Quit: qiukun]
PlasmaStar has quit [Ping timeout: 244 seconds]
rodfersou has joined #ruby
<krz> https://gist.github.com/0e893b6d09299c2829a6 how do i rescue from any JWT::* errors?
<vali> if I search for it I see it in paths like /opt/logstash/vendor/bundle/jruby/1.9/gems/cassandra-driver-2.1.4/lib/cassandra_murmur3
<vali> so could it be that it's not searching into the correct path ?
devoldmx has joined #ruby
PlasmaStar has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
ndrei has joined #ruby
ferhaty has quit [Read error: Connection reset by peer]
<[k-> krz: do you get any idea now? :)
mengu has quit [Remote host closed the connection]
ferhaty has joined #ruby
allcentury has joined #ruby
chills42 has joined #ruby
Pumukel has joined #ruby
etqqkoiflwhb has joined #ruby
s2013 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
charliesome_ has joined #ruby
charliesome has quit [Ping timeout: 260 seconds]
s2013 has quit [Client Quit]
benlovell has quit [Ping timeout: 245 seconds]
<krz> yea
rikkipitt has joined #ruby
<krz> thanks
yardenbar has quit [Quit: Leaving]
safeforge has quit [Remote host closed the connection]
yardenbar has joined #ruby
<krz> rescue JWT::DecodeError => e works
oo_ has quit [Remote host closed the connection]
etqqkoiflwhb has quit [Quit: (null)]
<[k-> excellent.
conor_ has joined #ruby
bronson has joined #ruby
Chau has joined #ruby
Renich has quit [Quit: leaving]
WizJin has quit [Quit: Leaving]
Ox0dea has quit [Ping timeout: 252 seconds]
jimms has quit [Remote host closed the connection]
etqqkoiflwhb has joined #ruby
heller_barde has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
Chau has quit [Ping timeout: 256 seconds]
fgo has joined #ruby
n1x has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
ita-ness has joined #ruby
RegulationD has joined #ruby
<[k-> >> ?ο == ?o
<ruboto> [k- # => false (https://eval.in/413100)
<[k-> :o
dgutierrez1287 has joined #ruby
<[k-> >> ?χ == ?x
<ruboto> [k- # => false (https://eval.in/413106)
Rickmasta has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
<adaedra> >> ?ẋ
jenrzzz has quit [Ping timeout: 250 seconds]
<ruboto> adaedra # => /tmp/execpad-04561007d267/source-04561007d267:2: syntax error, unexpected '?' ...check link for more (https://eval.in/413111)
bruno- has joined #ruby
codecop has quit [Remote host closed the connection]
govg has joined #ruby
<[k-> >> [?Α==?A,?Ε==?E,?Ρ==?P,?Β==?B,?Ν==?N,?Μ==?M,?Κ==?K,?Ο==?O,?Υ==?Y,?Τ==?T,?Ι==?I,?Ζ==?Z,Χ==?X]
<ruboto> [k- # => undefined local variable or method `Χ' for main:Object (NameError) ...check link for more (https://eval.in/413116)
<[k-> :(
<adaedra> dat fail
A124 has quit [Ping timeout: 260 seconds]
<[k-> >> [?Α==?A,?Ε==?E,?Ρ==?P,?Β==?B,?Ν==?N,?Μ==?M,?Κ==?K,?Ο==?O,?Υ==?Y,?Τ==?T,?Ι==?I,?Ζ==?Z,?Χ==?X]
<ruboto> [k- # => [false, false, false, false, false, false, false, false, false, false, false, false, false] (https://eval.in/413118)
A124 has joined #ruby
<[k-> anyone who uses modern technology understands?
govg has quit [Client Quit]
<adaedra> unicode chars?
govg has joined #ruby
<[k-> i bet you saw ㊗㊙
<[k-> cheater!
conor_ has quit [Remote host closed the connection]
<adaedra> Your try on ?χ == ?x shows characters of different height
bruno- has quit [Ping timeout: 246 seconds]
<[k-> not on my phone :(
<[k-> stupid Arial
<[k-> why do i use Arial anyway
Chau has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
heller_barde has quit [Remote host closed the connection]
khebbie has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
devoldmx has quit [Ping timeout: 240 seconds]
<ita-ness> Hello everyone.
<adaedra> greetings, your ita-ness
skade has quit [Quit: Computer has gone to sleep.]
<[k-> the superior is back!
<[k-> everyone greet!
* [k- bows
charliesome_ has quit [Quit: zzz]
ita-ness is now known as suchness
pawnbox has quit [Remote host closed the connection]
suchness has left #ruby [#ruby]
zacstewart has quit [Remote host closed the connection]
jimms has joined #ruby
soc42 has quit [Remote host closed the connection]
suchness has joined #ruby
safeforge has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Macaveli has joined #ruby
<corpsicle> whats the best way to execute a ruby script from within a ruby script?
OrbitalKitten has joined #ruby
<tobiasvl> require?
<tobiasvl> corpsicle: what do you want to do?
nini1294 has joined #ruby
khebbie has quit [Remote host closed the connection]
<corpsicle> basicly just run a ruby script with arguments and capture what it returns
<[k-> `ruby script.rb`?
msnyon has joined #ruby
<nini1294> Hey, is anyone using iruby on windows?
Macaveli has quit [Client Quit]
<adaedra> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
pawnbox has joined #ruby
<corpsicle> tobiasvl: so require will execute the script right ?
<corpsicle> tobiasvl: is it considered ok coding to use require to execute a script inside another script?
<corpsicle> the script i want to execute deosnt have any methods...
tmtwd has joined #ruby
khebbie has joined #ruby
<adaedra> corpsicle: you won't get the output nor be able to pass arguments through require, though
<corpsicle> ah
larshaugseth is now known as lhz
tkuchiki has joined #ruby
<corpsicle> currently im executing the ruby scrpts from a python script
<adaedra> [k-'s proposition may be better
Macaveli has joined #ruby
<corpsicle> im trying to convert the python script into ruby
prestorium has joined #ruby
<adaedra> how do you do it in python?
<corpsicle> subprocess
<[k-> &ri Kernel#`, Kernel#system
<adaedra> drop the comma, [k-
<corpsicle> i was thinking maybe tehre was a more elegant way to do it from ruby =P
<adaedra> [k- » `ruby script.rb`?
<shevy> corpsicle you could require it regular, then call the thing from ruby code directly in particular when it is class based
<shevy> require 'foo.rb'; Foo.new
<[k-> oh the comma again
<adaedra> :)
<corpsicle> shevy: yea that would mean rewriting the other script aswell though ...
<[k-> why is it always the comma
but3k4 has joined #ruby
jimms has quit [Remote host closed the connection]
<adaedra> [k-: go do a PR to add the comma :p
<shevy> corpsicle yeah, will depend on the quality of the script in question, guess you have to shell out then via system() or `` or *popen
<shevy> I always use classes \o/
_blizzy_ has joined #ruby
<[k-> but that's me doing the heavy lifting
oleksandriuzikov has quit [Quit: Leaving.]
safeforge has quit [Remote host closed the connection]
<corpsicle> yea it would be much neater with a more objectoriented approach for sure
<corpsicle> oh well, its not gonna be WORSE than from python anyway =P
<[k-> `` is inelegant?
<[k-> well excuse me
<adaedra> A bit
<[k-> more elegant than you!
<adaedra> But given the requirements...
<adaedra> calm down, [k-
<shevy> `` is nice
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<corpsicle> heh, i havent looked at your suggestions yet [k-, having trouble keeping up here
<adaedra> corpsicle: if you don't like ``, you can also use %x[]
<adaedra> :p
<shevy> well result = `ruby foo.rb` should work
<corpsicle> but i was assuming they were about executing a "subprocess" sort of approach
<shevy> if foo.rb exists; and if "ruby" can be found in the PATH
<corpsicle> ill try that right now
<adaedra> it's totally subprocess-based, corpsicle
<corpsicle> yea
<adaedra> but it's quick and easy
<corpsicle> but the only "more elegant" solution is to rewrite the other sript to be a class i guess
<adaedra> the proper thing would be to merge both scripts I guess
pawnbox has quit [Remote host closed the connection]
Caelum has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
<Caelum> Anyone know a good quick reference for ruby syntax? I can read ruby fairly easily and hack on code a bit, and I know perl and python so it's not too hard, but I haven't read a book yet (I promise I will at some point....)
tubuliferous_ has joined #ruby
r_baron has joined #ruby
tmtwd has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
<shevy> corpsicle you can probably use `` just fine, remember it will yield to you back its result, which you can capture in a variable, which you can capture. it's nice for lazy code when you don't want to rewrite something (or if someone else wrote the script and you don't feel like investing time to clean up what someone else wrote)
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
apfeluser has quit [Quit: Leaving]
tvw has joined #ruby
OrbitalKitten has joined #ruby
<corpsicle> shevy: its more the fact that the script is used in more places, if i change it i have to make sure it works everywhere else aswell =P
_blizzy_ has joined #ruby
<vali> fixed my issue...
<vali> ended up installing the driver in jruby
Iskarlar has joined #ruby
<vali> gem bundle ...
<Caelum> adaedra: wonderful thank you
<tuor> hi, i have a Nokogiri::XML object and want to get a string again, but with out all unneed whitespace between xml elements. How can I do it? code: https://gist.github.com/anonymous/18b9182d73421cf9cc2b (reason: want to read from a xml-file)
<adaedra> Caelum: thank zenspider
zacstewart has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Remote host closed the connection]
tubuliferous_ has quit [Ping timeout: 252 seconds]
<corpsicle> gah, converting python scripts to ruby ... every other error i get is because of an ":" too much or an "end" too little =)
mcgain has joined #ruby
sarkyniin has joined #ruby
serivich has quit [Ping timeout: 246 seconds]
<[k-> Nokogiri can read XML
rikkipitt has quit [Quit: Leaving...]
shoutsid has joined #ruby
<yorickpeterse> tuor: you'll have to get all the text nodes and strip them of whitespace
shoutsid has quit [Client Quit]
govg has quit [Quit: leaving]
<tuor> [k-, is there a method in Nokogiri to get a sting object with out aditional withspaces?
dorei has joined #ruby
<tuor> [k-, I mean I can read from a file into a Nokogiri object but the problem is to get a string from this object (with out aditional withespace).
benlovell has joined #ruby
shoutsid has joined #ruby
d2dchat has joined #ruby
lele|w has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
surs has joined #ruby
surs has quit [Changing host]
surs has joined #ruby
ljt has joined #ruby
scripore has joined #ruby
jbw__ has quit [Ping timeout: 240 seconds]
<tuor> yorickpeterse, I hoped that nokogiri can do it.,.
sepp2k has joined #ruby
millerti has joined #ruby
jenrzzz has joined #ruby
lannonbr has joined #ruby
jbw__ has joined #ruby
Cust0sLim3n has quit [Ping timeout: 246 seconds]
vali has left #ruby ["Leaving"]
freedollar has joined #ruby
freedollar has left #ruby [#ruby]
Liam` has quit [Ping timeout: 246 seconds]
<corpsicle> hmm, is there a thing in ruby like pythons shlex ?
nateberkopec has joined #ruby
<corpsicle> aha
<corpsicle> shellwords
<yorickpeterse> tuor: there's no way to have Nokogiri do it automatically IIRC
jonee has quit [Ping timeout: 256 seconds]
shoutsid has quit []
<tuor> yorickpeterse, ah ok. thx.
shoutsid has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
shoutsid has quit [Client Quit]
jbw__ has quit [Ping timeout: 245 seconds]
thiagovsk has joined #ruby
joonty has quit [Quit: Leaving]
shoutsid has joined #ruby
<[k-> +b n*i*g*g*e*r*!*@*
shoutsid has quit [Client Quit]
Liam` has joined #ruby
jbw__ has joined #ruby
khebbie has quit [Remote host closed the connection]
shoutsid has joined #ruby
rideh has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tuor> [k-, what?
rideh has quit [Client Quit]
shoutsid has quit [Read error: Connection reset by peer]
Aria has quit [Ping timeout: 255 seconds]
conor_ has joined #ruby
shoutsid has joined #ruby
<[k-> these days, people keep having 'nigger' in their nicks
shoutsid has quit [Client Quit]
sgambino has joined #ruby
aredridel has joined #ruby
Cust0sLim3n has joined #ruby
quimrstorres has quit [Remote host closed the connection]
devoldmx has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
<shevy> only one guy
<shevy> he is very persistent
omegamike has joined #ruby
[k-_ has joined #ruby
serivich has joined #ruby
jimms has joined #ruby
sevenseacat has joined #ruby
<tuor> ah ok.
codecop has joined #ruby
<[k-> adaedra: commas are actually used in urls @.@
Dzejmskrokan has joined #ruby
prestorium has quit [Quit: Konversation terminated!]
<[k-_> that wouldn't be an issue, right?
<[k-_> for &ri i mean
nini1294 has quit [Ping timeout: 265 seconds]
<tuor> So I don't realy have an idea how to remove whitespaces and linebreaks from my xml file with out removing whitespaces in the strings (<a>string with space</a>). So how can i do it?
victortyau has joined #ruby
Liam` has quit [Ping timeout: 244 seconds]
centrx has joined #ruby
<[k-_> regexp cant do it
<[k-_> unless you want _HELL_
carlosoliveira has joined #ruby
Liam` has joined #ruby
dblessing has joined #ruby
bruno- has joined #ruby
<tuor> [k-_, ah ok. I'll try.
<[k-_> NO, DONT TRY WITH REGEXP
chouhoulis has joined #ruby
skade has joined #ruby
hoov has joined #ruby
<shevy> he'll try [k-_
<tuor> ah don't^^ sry didn't read well.
<[k-_> NO DONT TRY!
<tuor> I'll not.
shoutsid has joined #ruby
_ht has quit [Read error: Connection reset by peer]
<tuor> So how?
Liam` has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 244 seconds]
<adaedra> [k-_: well, are there commas in some of Ruby's methods?
<[k-_> that would be illegal
dstarh has joined #ruby
<shevy> you could via define_method or?
<adaedra> shevy: you can, but is it done in stdlib?
tmtwd has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<shevy> >> define_method('foo,bar') { puts 'ok' }; send 'foo,bar'
<ruboto> shevy # => ok ...check link for more (https://eval.in/413151)
<shevy> if we add a patch then sure
chouhoulis has joined #ruby
<shevy> like a conjoint method calling foo() then bar() :)
<adaedra> [k-_: I guess it's ok
s00pcan has quit [Ping timeout: 240 seconds]
<adaedra> shevy: I think you didn't get the question
c0m0 has joined #ruby
<shevy> I don't see a problem, we only need someone who has commit access to the source :)
<shevy> and a method that can be invoked as the unicode snowman
s00pcan has joined #ruby
<adaedra> [k-_: ot
<adaedra> shevy: gem unicode-snowman
<shevy> oh you have it
<[k-_> i'll hit you!
ByronJohnson has quit [Ping timeout: 256 seconds]
Guest50 has joined #ruby
ByronJohnson has joined #ruby
krz has quit [Ping timeout: 245 seconds]
ht__ has joined #ruby
Feyn has quit [Quit: Leaving]
bmurt has joined #ruby
shoutsid has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 265 seconds]
Philipp__ has quit [Ping timeout: 260 seconds]
Philipp__ has joined #ruby
freerobby has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
Liam` has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
Macaveli has quit [Read error: Connection reset by peer]
stamina has quit [Remote host closed the connection]
Macaveli has joined #ruby
_ht has joined #ruby
Hounddog has quit [Remote host closed the connection]
whippythellama has joined #ruby
devoldmx has quit [Ping timeout: 265 seconds]
halcyone3 has quit [Ping timeout: 260 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hounddog has joined #ruby
usc911 has joined #ruby
<usc911> hey guys, anyone having issues installing gems on OSX 10.11 (el capitain)?
<adaedra> what issues
krz has joined #ruby
<adaedra> ah, yes, rootless
<usc911> issues as in not being able to install
<usc911> thats what it was called!
<adaedra> use --user-install, or, better, use something like chruby or rbenv and manage ruby as user
<[k-_> im on 10.10.4 :(
<adaedra> I'm on 10.10.3 at home, should really update :x
jbw__ has quit [Ping timeout: 260 seconds]
usc911 has quit [Quit: Leaving.]
<[k-_> ™ and © 1983-2015 Apple Inc.
nopc0de has joined #ruby
<[k-_> ah, programmers
quimrstorres has joined #ruby
jbw__ has joined #ruby
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3> adaedra: same... I keep on looking @ the 10.10.4 upgrade and thinking 'later'
<adaedra> I've only seen it yesterday, tbh
minmax has quit [Quit: WeeChat 0.4.3]
terlar has quit [Quit: WeeChat 1.2]
dwithers has joined #ruby
nini1294 has joined #ruby
JoshL has joined #ruby
pl1ght has quit [Ping timeout: 255 seconds]
failshell has joined #ruby
stardiviner has quit [Ping timeout: 260 seconds]
segfalt has joined #ruby
sethetter has joined #ruby
tmtwd has quit [Ping timeout: 246 seconds]
quimrstorres has quit [Ping timeout: 245 seconds]
Guest50 has joined #ruby
malconis has joined #ruby
gthank has left #ruby ["Textual IRC Client: www.textualapp.com"]
dwithers has quit [Ping timeout: 252 seconds]
jimms has quit [Remote host closed the connection]
malconis has quit [Remote host closed the connection]
malconis has joined #ruby
Liam` has quit [Ping timeout: 244 seconds]
tkuchiki has joined #ruby
iateadonut has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
mengu has quit [Remote host closed the connection]
<shevy> git versus svn http://i.stack.imgur.com/6SqPf.png
ldnunes has joined #ruby
failshell has quit [Remote host closed the connection]
<adaedra> And mercurial?
<shevy> may it rest in peace
<shevy> I guess some lower % though
<[k-_> lol
<[k-_> haskell programmers use darcs
<shevy> hard to get realistic datasets without using the TIOBE methodology of random guessing :\
jimms has joined #ruby
quimrstorres has joined #ruby
<shevy> adaedra would be nice to have a supermario brothers game based on the unicode snowman
jenrzzz has joined #ruby
freerobby has quit [Quit: Leaving.]
devdazed has joined #ruby
khebbie has joined #ruby
<adaedra> o...k
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dwithers has joined #ruby
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
Macaveli has quit [Read error: Connection reset by peer]
juanpaucar has joined #ruby
jonee has joined #ruby
Muhannad has joined #ruby
<shevy> wielding, as weapon, a baguette
jeremy04 has joined #ruby
<shevy> games are way too much work though
shoutsid has joined #ruby
DroidBurgundy has joined #ruby
troulouliou_div2 has joined #ruby
nhhagen has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 240 seconds]
lxsameer has quit [Quit: Leaving]
rakm has joined #ruby
TvL2386 has quit [Quit: Ex-Chat]
Liam` has joined #ruby
hinbody has joined #ruby
hinbody has quit [Read error: Connection reset by peer]
jimms has quit []
scripore has quit [Quit: This computer has gone to sleep]
fgo has quit [Ping timeout: 240 seconds]
paulcsmith___ has joined #ruby
A124 has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby
<corpsicle> does SCRIPT_DIR mean anything special in ruby ?
joonty has joined #ruby
jerius has joined #ruby
DroidBurgundy has quit []
A124 has joined #ruby
<[k-_> >> SCRIPT_DIR
<ruboto> [k-_ # => uninitialized constant SCRIPT_DIR (NameError) ...check link for more (https://eval.in/413173)
<[k-_> nope
hinbody has joined #ruby
<corpsicle> ok
<corpsicle> thanks
Ropeney has joined #ruby
dimasg has quit [Ping timeout: 246 seconds]
arup_r has quit []
fgo has joined #ruby
bluOxigen has joined #ruby
blueOxigen has quit [Ping timeout: 246 seconds]
bigbadbear has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
duggiefresh has joined #ruby
d2dchat has quit [Remote host closed the connection]
scripore has joined #ruby
jenrzzz has joined #ruby
failshell has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
pawnbox has joined #ruby
lalalaaa has joined #ruby
failshell has quit [Remote host closed the connection]
djbkd has joined #ruby
<lalalaaa> Hi! How come gsub("^/", "").gsub("/", "_") doesn't change "/test/lala" to "test_lala"? I'm getting "_test_lala"..
yqt has joined #ruby
r_baron has quit [Changing host]
r_baron has joined #ruby
r_baron has quit [Changing host]
r_baron has joined #ruby
<[k-_> that is because the first / is changed to _
<[k-_> the one before "test"
A124 has quit [Ping timeout: 260 seconds]
<centrx> lalalaaa, maybe because "^/" is not a regex?
<apeiros> s/?/./
rbennacer has joined #ruby
<apeiros> "^/" looks for literally a caret followed by slash
<lalalaaa> aaah
<lalalaaa> i see i see
A124 has joined #ruby
<apeiros> %r{^/} or /^\// if you want "/" at beginning of line
casadei_ has joined #ruby
<[k-_> /^\//
<corpsicle> deosnt it look for a slash at the beginning of the string?
<centrx> carrot and stick
banister has joined #ruby
<apeiros> lalalaaa: also note that you probably should get into the habit of using \A, not ^
fgo has quit [Ping timeout: 264 seconds]
allcentury has joined #ruby
<apeiros> ^ is start of *line*, \A is start of string.
<adaedra> better \A than ^, no?
<adaedra> oh
<adaedra> nvm
danzilio has joined #ruby
tubuliferous_ has quit [Ping timeout: 265 seconds]
sshuff|gone is now known as sshuff
danzilio has quit [Max SendQ exceeded]
denver has joined #ruby
j_mcnally has joined #ruby
djbkd has quit [Ping timeout: 246 seconds]
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lalalaaa> indeed much better
danzilio has joined #ruby
freezevee has quit [Remote host closed the connection]
<lalalaaa> *testing*
sevenseacat has quit [Quit: .]
umgrosscol has joined #ruby
MIGGERS has joined #ruby
<MIGGERS> Hi
<lalalaaa> awesome! many thanks apeiros, rest of y'all
danzilio has quit [Max SendQ exceeded]
<adaedra> la la laaa ♫
tmtwd has joined #ruby
<lalalaaa> adaedra: wow such a beautiful voice :P
<adaedra> :)
<[k-_> gah, he's back
danzilio has joined #ruby
RegulationD has joined #ruby
<adaedra> Prepare for trouble
benlovell has quit [Ping timeout: 265 seconds]
<tuor> I have a solution: the xml2 programm can do it. So I have a string and want run xml2 (from my ruby script) and give my string as input. How can I run an other programm in a ruby script?
halcyone3 has joined #ruby
<adaedra> There's plenty of solutions
<adaedra> You know there are ruby xml libraries, though?
<[k-_> &ri Kernel#`, Kernel#system
<tuor> adaedra, ah no.
<tuor> [k-_, thx.
<adaedra> tuor: ask yorickpeterse :)
<[k-_> tuor, there are!
Iskarlar has joined #ruby
<tuor> ok. yorickpeterse I can do what I want ich bash: # printf "$string"|xml2|2xml
d2dchat has joined #ruby
<tuor> I basicly just want to do the same with a sting in my ruby. But no idea which library would help me.
<[k-_> tuor, what is the problem you want to solve
<tuor> [k-_, still the same. remove all unneed space and linebreak.
govg has joined #ruby
<[k-_> why do you want to do that?
RegulationD has quit [Ping timeout: 255 seconds]
ryanpc has joined #ruby
<tuor> [k-_, I'll explain the hole thing: I export a monitoring template and write it to a file. In the file it has to be readable (and easy to see diffs). Then I need to import it again, but the api don't accept my string if there are linebreaks...
<tuor> (I don't know but I think the spaces are not ok to.)
<MIGGERS> I HATE THE MIGGERS
<yorickpeterse> MIGGERS: you can go now, nobody cares
<havenwood> !mute MIGGERS
jbw__ has quit [Ping timeout: 246 seconds]
AnoHito_ has joined #ruby
<[k-_> tuor: not allowing spaces is ridiculous
Dzejmskr_ has joined #ruby
<apeiros> oh, our ever fascinated 3y old is back
<apeiros> thanks havenwood
<tuor> I just tryed to import the file (after pretty printing with REXML) and it didn't work.
relix has joined #ruby
benlovell has joined #ruby
prefixed has joined #ruby
<[k-_> can you give us an excerpt of your file
cndiv has joined #ruby
<tuor> Importing the file without pretty printing it first works.
<tuor> sec
<yorickpeterse> tuor: in Oga you could do something like this: `some_element.xpath('descendant::text()').map { |node| node.inner_text.strip }.inject(:+)`
jenrzzz has quit [Ping timeout: 240 seconds]
<Nilium> This is reminding me of someone asking how to get Go's XML library to use self-closing tags in arbitrary cases because a particular XML parser on the receiving end of some data didn't understand certain tags unless they were self-closing..
<yorickpeterse> That gives you all the text of a node (recursively) with leading/trailing whitespace removed
Dzejmskrokan has quit [Ping timeout: 256 seconds]
<tuor> yorickpeterse, oh nice. Ok. I'll try.
MIGGERS has quit [Ping timeout: 246 seconds]
<yorickpeterse> alternatively you can do `text = ''; some_element.each_node { |node| text << node.inner_text if node.is_a?(Oga::XML::Text) }`
AnoHito has quit [Ping timeout: 265 seconds]
<cndiv> Hi all, brand new person here, and the documentation on this confuses me. Can someone teach me what the code is to create a .txt file (if it doesn't already exist) and add text to it? I'm making a simple app that makes a .txt with today's date, and takes entries.
<yorickpeterse> which is probably a tad faster
<cndiv> There's IO and Print and Open, and I'm confused on which or mulitple do I need.
<apeiros> cndiv: File.write("path/to/file.txt", "content")
<yorickpeterse> &ri File#write
<`derpy> No results
<[k-_> mutability is bad!
<yorickpeterse> wot
AnoHito has joined #ruby
<adaedra> cndiv: you need File module
<[k-_> &ri File.write
<`derpy> No results
<[k-_> :<
<adaedra> yorickpeterse: inheritance is broken
<centrx> &ri File::write
<`derpy> No results
<apeiros> cndiv: and append: File.open("path/to/file.txt") do |fh| fh.puts "additional content" end
<adaedra> &ri IO#write
<yorickpeterse> oh yeah
<centrx> we did that well
pawnbox has quit [Remote host closed the connection]
<[k-_> but that's an instance method!
<yorickpeterse> cndiv: tl;dr: File.open('path/to/file', 'mode') { |handle| handle.write('....') }
<apeiros> cndiv: whooops, correction - append: File.open("path/to/file.txt", "a") do |fh| fh.puts "additional content" end
AnoHito_ has quit [Ping timeout: 244 seconds]
<cndiv> adeponte: You mean require File? Super new, aplogies.
tkuchiki has quit [Remote host closed the connection]
<adaedra> cndiv: File is in core, no need to require
andikr has quit [Remote host closed the connection]
<adaedra> it's the module here:
<adaedra> &ri FIle
<`derpy> No results
<adaedra> &ri File
<cndiv> rubydoc.info is great, that's new to me too.
pawnbox has joined #ruby
<cndiv> Thank you all, I'll give that a shot.
ryanpc has quit [Quit: Textual IRC Client: www.textualapp.com]
RobertBirnie has joined #ruby
chills42 has quit [Remote host closed the connection]
<[k-_> you have spaces in <template>Template OS Linux</template>
<[k-_> if you strip spaces, its gonna go WRONG!
<tuor> [k-_, yes. Only spaces between the elements not in the elements strings.
hahuang61 has joined #ruby
<[k-_> i dont think space would be an issue though
<[k-_> i dont see any chunks of text
<cndiv> Another question, are you all saying that the create and append are different bits of code? IE, I'll have to write something to handle that, as well?
<cndiv> I'm like a week in here, obviously.
<adaedra> We all began one day
scripore has quit [Quit: This computer has gone to sleep]
<cndiv> :-)
chrissonar has quit [Remote host closed the connection]
<adaedra> ruby's open is based on C fopen
<cndiv> And soon enough I'll be great and help others.
astrobun_ has quit [Remote host closed the connection]
alotofnoodles has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
<adaedra> you have the flag argument which determine what you will do with the file (read, write) and what to do if it exists or not (append, create, fail...)
<[k-_> <tuor> Importing the file without pretty printing it first works.
<[k-_> why dont you just give that then :o
ljt has quit [Read error: Connection reset by peer]
<tuor> [k-_, yes.
<[k-_> give it to the api!
blue_deref has joined #ruby
<tuor> And all done. I just tryed pretty printing with Nokogiri and then I can import when I pretty print with REXML it can't.
ljt has joined #ruby
<tuor> OK thx all for help! Man this was a waste of time^^
<adaedra> cndiv: description of open flags: http://ruby-doc.org/core-2.2.2/IO.html#method-c-new
<[k-_> yes it was
<adaedra> rubydoc.info has a :nodoc: for IO#new :x
jenrzzz has joined #ruby
Kalov has joined #ruby
nini1294 has quit [Ping timeout: 246 seconds]
niemcu has quit [Ping timeout: 245 seconds]
scripore has joined #ruby
<adaedra> but once the file is open, writing is the same
govg has quit [Quit: leaving]
tkuchiki has joined #ruby
govg has joined #ruby
saltsa has joined #ruby
quimrstorres has quit [Remote host closed the connection]
user1138 has quit [Quit: Leaving]
dr3w has joined #ruby
poguez_ has joined #ruby
nini1294 has joined #ruby
jbw has joined #ruby
bdnelson has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tjohnson has joined #ruby
decoponio has joined #ruby
khebbie has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 244 seconds]
s2013 has joined #ruby
khebbie has joined #ruby
f4cl3y_ has joined #ruby
f4cl3y_ has joined #ruby
user1138 has joined #ruby
countryHick has joined #ruby
pawnbox has joined #ruby
chouhoulis has joined #ruby
<lalalaaa> sorry last one -- shouldn't gsub(/[\/-]/, "_") turn say `la/la-la` into `la_la_la`?
<dorei> lacrosse: let's give it a try
<adaedra> miss
<dorei> >> 'la/la-la'.gsub(/[\/-]/, "_")
<ruboto> dorei # => "la_la_la" (https://eval.in/413201)
<lalalaaa> im getting `la_la-la`
yh has quit [Ping timeout: 256 seconds]
<adaedra> are you sure you did not forget the g?
<adaedra> or that the - is a -? because - is, but not –
dopie has joined #ruby
<lalalaaa> oh no! sorry guys and gals.. forgot to do a hard reload in chrome :D
<adaedra> :D
hj2007 has joined #ruby
<lalalaaa> all is good, thank y'all once again
f4cl3y has quit [Ping timeout: 264 seconds]
khebbie has quit [Ping timeout: 260 seconds]
lannonbr has quit [Quit: WeeChat 1.2]
ferhaty has quit []
dr3w has quit [Quit: WeeChat 1.2]
<hj2007> how do I run a rake task which has a rakefile entry as "task :abc, :xyz do |m, n|"? if I do: rake abc[def], I get an error.
dimasg has joined #ruby
hectorsq has joined #ruby
tkrajcar has left #ruby [#ruby]
scripore has quit [Quit: This computer has gone to sleep]
chills42 has joined #ruby
khebbie has joined #ruby
prefixed has quit [Remote host closed the connection]
devoldmx_ has joined #ruby
Vile` has quit [Ping timeout: 250 seconds]
kies^ has joined #ruby
hectorsq has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gamename has joined #ruby
dr3w has joined #ruby
<maloik> well what's the error?
Vile` has joined #ruby
<maloik> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
<hj2007> maloil: no matches found: abc[def]
<adaedra> try escaping [
<allcentury> I have a question, I have two different singleton classes that inherit from a base class. Should I also make that base class a singleton? I'm simply trying to share behavior/methods at this point.
govg has quit [Quit: leaving]
<canton7> allcentury, do you want there to be a single instance of the base class throughout your entire application (in addition to the two single instances of its two children)?
<hj2007> adaedra: that was it, thanks!
<adaedra> yw
lalalaaa has quit [Quit: leaving]
<allcentury> canton7: Right, that's the question I should be asking. I think the answer is no, it doesn't matter if that base class is instianted more than once. In my instance though, it could only get instantiated twice or in other words, it can only get instantiated the same amount of classes that it is the parent of - right?
<canton7> allcentury, is anyone supposed to instantiate the base class directly?
<allcentury> no
<canton7> therefore noone can be supposed to access the base class directly, therefore having it singleton makes no sense
<canton7> easy!
<allcentury> lovely, thank you for the rubber-ducking canton7
lordkryss has joined #ruby
<canton7> (a simpler question would have been 'will anyone ever type BaseClass.instance?')
rbennacer has quit [Read error: Connection reset by peer]
jgpawletko has joined #ruby
jgpawletko has quit [Client Quit]
Hounddog has quit [Read error: Connection reset by peer]
jokester has quit [Quit: init 6]
strixd has joined #ruby
strixd has quit [Excess Flood]
chipotles has joined #ruby
RegulationD has joined #ruby
strixd has joined #ruby
rbennacer has joined #ruby
strixd has quit [Excess Flood]
mhib has joined #ruby
strixd has joined #ruby
strixd has quit [Excess Flood]
curses has quit [Quit: leaving]
deepu has joined #ruby
strixd has joined #ruby
strixd has quit [Excess Flood]
jokester has joined #ruby
gambl0re has joined #ruby
strixd has joined #ruby
strixd has quit [Excess Flood]
jonee has quit [Ping timeout: 246 seconds]
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
Guest50 has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
wpp has joined #ruby
strixd has joined #ruby
<cndiv> apeiros: Another question from earlier. Your code is right, I think, but it doesn't *create* the file first, I don't think? I'm looking to create a file, and if it already exists, add to it.
mengu has joined #ruby
mengu has joined #ruby
fgo has joined #ruby
<adaedra> cndiv: look at open flags :)
dr3w has quit [Quit: WeeChat 1.2]
aganov has quit [Remote host closed the connection]
dr3w has joined #ruby
momomomomo has joined #ruby
chipotles has quit [Ping timeout: 245 seconds]
<adaedra> I think you want the "a" flag
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpaucar has quit [Remote host closed the connection]
yh has joined #ruby
riotjones has quit [Remote host closed the connection]
<cndiv> adaedra: flags are what goes in ( ) after the method, right?
nini1294 has quit [Ping timeout: 255 seconds]
<cndiv> adaedra: and it has that, the error just says that file doesn't exist yet
s2013 has joined #ruby
nish1294 has joined #ruby
<adaedra> cndiv: how do you open your file for writing?
rippa has joined #ruby
strixd has quit [Client Quit]
<cndiv> adaedra: File.open("/thepahto/code/#{todays_date}", "a") do |fh| fh.puts "#{entry}" end
greenarrow has joined #ruby
quimrstorres has joined #ruby
<cndiv> those two varables assign a date and what I enter in. Happy to show this in a pastebin
<adaedra> And the error you get is?
<cndiv> stamper.rb:24:in `initialize': No such file or directory
<cndiv> stamper is the name of the thing I'm writing.
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
renanoronfle has quit [Ping timeout: 252 seconds]
<adaedra> does the /thepatho/code/ directory exists?
tkuchiki has quit [Remote host closed the connection]
<cndiv> yep, for sure, that's where the .rb file is
<adaedra> be careful that this is an absolute path (so from /), not relative
<cndiv> used pwd to make sure I'm doing it 100% right
ruby-lang343 has joined #ruby
chipotles has joined #ruby
<cndiv> adaedra: I'm on a mac and it goes /Users/cndiv/MEGA/code/stamper
<cndiv> does it need to start with volumes, etc?
dopamean_ has joined #ruby
<adaedra> no
wpp has quit []
<adaedra> what does `pwd` outputs?
ljt has quit [Read error: Connection reset by peer]
paulcsmith___ has quit [Quit: Be back later ...]
<cndiv> sorry it outputs "/Users/cndiv/MEGA/code/stamper"
<adaedra> so it's not /thepatho/code/
<cndiv> adaedra: Sorry, I was protecting something for no reason. it's the one I just put
yh has quit [Ping timeout: 260 seconds]
paulcsmith___ has joined #ruby
tkuchiki has joined #ruby
<cndiv> full pastebin: http://pastebin.com/KDjFABLr
<ruboto> cndiv, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/1040a8065187b000e519
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<adaedra> okay, give accurate information, it's easier to see what happens :)
<cndiv> that's a nice robot.
<adaedra> ?botsnack
<ruboto> nomnomnomnom
j_mcnally has joined #ruby
<adaedra> ah yes
<adaedra> you can't have / in file names
<greenarrow> is this the 'official' ruby channel
<greenarrow> or is it ruby-lang
ruby-lang343 has quit [Ping timeout: 246 seconds]
<cndiv> adaedra: ohhhhh that makes total sense.
psy_ has quit [Ping timeout: 246 seconds]
<adaedra> greenarrow: #ruby-lang is no more
<greenarrow> why :O
<cndiv> adaedra: so it'll probably work when I fix that. I wouldn't have guessed that without a hint.
dimasg has quit [Ping timeout: 246 seconds]
<adaedra> cndiv: if you're trying to sort by folders, you have to create them first. File.open can create files, but not above.
<adaedra> greenarrow: merged with this #ruby
<cndiv> adaedra: You mean there has to be a / at the end, meaning that directory? stamper/ ?
fullofcaffeine has joined #ruby
<adaedra> cndiv: no, I mean that for File.open() to work, the directory containing the file you want to create has to exists.
<cndiv> oh, it does, it's called stamper, and contains the program named stamper.rb
<adaedra> but in your sample, you go a bit more down, since you use / in your file name, so going in folders
<adaedra> use iso-8601, and this problem should be no more ;)
<cndiv> adaedra: Yep, that'll do it too. I should have seen that. This is why pairing is good, isn't it.
<adaedra> :)
mengu has quit []
allcentury has quit [Ping timeout: 245 seconds]
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
pauly_oc has joined #ruby
<cndiv> ok, so that, plus change the name away from / to - ...
<adaedra> well, it was not the easiest error to find
jonee has joined #ruby
yh has joined #ruby
<cndiv> adaedra: It works! Yayyy
<cndiv> Thank you so much.
<adaedra> yw
<cndiv> I can go from there for now
DroidBurgundy has joined #ruby
<adaedra> yay, ruby
<cndiv> big deal for me, thank you. It's a thing to keep health records, and physical paper mentally freaks me out.
<cndiv> health issues, and now I can keep better records that it works.
f4cl3y__ has joined #ruby
rbennacer has quit [Remote host closed the connection]
troulouliou_div2 has quit [Quit: Leaving]
devoldmx_ has quit [Ping timeout: 255 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has quit [Quit: Textual IRC Client: www.textualapp.com]
f4cl3y_ has quit [Ping timeout: 244 seconds]
renanoronfle has joined #ruby
lapide_viridi has joined #ruby
f3ttX] has joined #ruby
safeforge has joined #ruby
_cball has quit [Quit: Leaving]
slawrence00 has joined #ruby
Philipp__ has quit [Read error: Connection reset by peer]
kies^ has quit [Ping timeout: 260 seconds]
<shevy> ruby for happiness \o/
Coldblackice has quit [Ping timeout: 255 seconds]
allcentury has joined #ruby
Scroff has joined #ruby
msnyon has quit [Read error: Connection reset by peer]
dgutierrez1287 has joined #ruby
quimrstorres has quit [Remote host closed the connection]
denver has quit [Remote host closed the connection]
<bradland> any recommendations for an amazon s3 gem that provides a filesystem like interface?
jenrzzz has joined #ruby
cball has joined #ruby
rbennacer has joined #ruby
h4ckurate has joined #ruby
quimrstorres has joined #ruby
jbw has quit [Ping timeout: 265 seconds]
lannonbr has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jbw has joined #ruby
benjwadams has joined #ruby
chipotles has quit [Ping timeout: 240 seconds]
mcgain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy_ has joined #ruby
dgutierrez1287 has quit [Ping timeout: 272 seconds]
rehat_ has joined #ruby
<benjwadams> what happens when two files are opened at nearly the same time with File.write "w+" mode?
psy_ has quit [Max SendQ exceeded]
<adaedra> Depends
<apeiros> benjwadams: I assume you left out "with the same path"?
psy_ has joined #ruby
jonee has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
<benjwadams> yes
alotofnoodles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie has quit [Remote host closed the connection]
<adaedra> On Linux, you get two valid handles you can write in. Can be a mess with concurrent writes.
<benjwadams> I didn't write the code, but I'm getting malformed XML that has one start element and two end elements and I suspect it's because two processes are attempting to write to the same file
<apeiros> they'll both have the same file open then. and they'll interfere with each other. the cursor position will remain, but the content can get mixed.
<adaedra> I think Windows would forbid you the second open.
<benjwadams> yeah, that's what I thought
Iskarlar has joined #ruby
safeforge has quit [Remote host closed the connection]
<bradland> benjwadams: that is often called interleaved writes
<adaedra> A solution would be to lock the file, I think.
<bradland> it's a common problem with logging too
safeforge has joined #ruby
<benjwadams> so basically the ending content of the xml is staggered near the end and repeats, causing malformed xml
<bradland> if you need atomic writes, you probably need to put something in front of the file writer that handles the atomic units to be written
<adaedra> The best solution would be to not have shared write access, though.
momomomomo_ has joined #ruby
<benjwadams> is there any way to do that via locks, etc
niemcu has joined #ruby
<benjwadams> again, i didn't write the code :S it's delayed job workers and someone started several of the same type
<bradland> if you try to write to a locked file, you'll get exceptions, i think
<benjwadams> good!
govg has joined #ruby
preller has joined #ruby
<bradland> so you want to prevent shared write access
<bradland> yes, locking would do the trick
<benjwadams> how would i achieve that in ruby?
kies^ has joined #ruby
<adaedra> &ri File#flock
cndiv has quit [Quit: Quit]
govg has quit [Client Quit]
MatthewsFace has joined #ruby
AlexRussia has joined #ruby
momomomomo has quit [Ping timeout: 272 seconds]
momomomomo_ is now known as momomomomo
<adaedra> Closest possible from writes
gambl0re has quit [Remote host closed the connection]
govg has joined #ruby
<adaedra> Seems like it blocks until it get a lock in default behavior
HayesHimself has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gambl0re has joined #ruby
Scrofff has joined #ruby
mary5030 has joined #ruby
<bradland> it's not just for threaded code
gxm has joined #ruby
<adaedra> ew
Coldblackice has joined #ruby
ragingcake has quit [Quit: ragingcake]
niemcu has quit [Ping timeout: 250 seconds]
Scroff has quit [Ping timeout: 250 seconds]
cschneid_ has joined #ruby
jenrzzz has joined #ruby
Scroff has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 255 seconds]
Lucky__ has joined #ruby
h4ckurate has quit [Quit: h4ckurate]
benlovell has quit [Read error: No route to host]
benlovell has joined #ruby
relix has joined #ruby
Scrofff has quit [Ping timeout: 256 seconds]
yqt has quit [Ping timeout: 245 seconds]
relix has quit [Client Quit]
afs has joined #ruby
riotjones has joined #ruby
duoi has quit [Ping timeout: 246 seconds]
momomomomo has quit [Quit: momomomomo]
symm- has joined #ruby
Scrofff has joined #ruby
danzilio has quit [Quit: My computer has fallen asleep!]
BTRE has quit [Read error: Connection reset by peer]
etqqkoiflwhb has quit [Quit: (null)]
govg has joined #ruby
nhhagen has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
yh has quit [Ping timeout: 265 seconds]
tubuliferous_ has joined #ruby
Scroff has quit [Ping timeout: 250 seconds]
yh has joined #ruby
niiamon has joined #ruby
scripore has joined #ruby
duoi has joined #ruby
gambl0re has quit [Remote host closed the connection]
BTRE has joined #ruby
gambl0re has joined #ruby
failshell has joined #ruby
lapideviridi has joined #ruby
_blizzy_ has joined #ruby
rbennacer has quit [Remote host closed the connection]
tubuliferous_ has quit [Ping timeout: 246 seconds]
Dzejmskr_ has quit [Remote host closed the connection]
anisha has quit [Quit: Leaving]
gxm has quit []
rbennacer has joined #ruby
Dzejmskrokan has joined #ruby
ascarter has joined #ruby
lapide_viridi has quit [Ping timeout: 260 seconds]
nhhagen has quit [Remote host closed the connection]
jbw has quit [Ping timeout: 250 seconds]
changelog has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
gambl0re has quit [Remote host closed the connection]
pawnbox_ has joined #ruby
gambl0re has joined #ruby
msnyon has joined #ruby
imperator has joined #ruby
Dzejmskrokan has quit [Ping timeout: 272 seconds]
pawnbox has quit [Ping timeout: 250 seconds]
Scrofff is now known as scroff
_blizzy_ has joined #ruby
senayar has quit []
bruno- has joined #ruby
paulcsmith___ has quit [Quit: Be back later ...]
jbw has joined #ruby
shoutsid has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 244 seconds]
msnyon has quit [Read error: Connection reset by peer]
paulcsmith___ has joined #ruby
michaeldeol has joined #ruby
shoutsid has joined #ruby
shoutsid has quit [Remote host closed the connection]
shoutsid has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
khebbie has joined #ruby
momomomomo has joined #ruby
ferhaty has joined #ruby
shoutsid06 has joined #ruby
khebbie has quit [Remote host closed the connection]
ferhaty has quit [Client Quit]
tcrypt has quit []
jlebrech_ has joined #ruby
niiamon has quit [Read error: Connection timed out]
dfockler has joined #ruby
<jlebrech_> anyone use Threads? I've been using sidekiq but realised all i needed was stuff to be async
<adaedra> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
jonee has joined #ruby
<suchness> jlebrech_: That's king of a scary comment.
<suchness> kind of*
shoutsid has quit [Ping timeout: 256 seconds]
niiamon has joined #ruby
<jlebrech_> adaedra: sorry
<dfockler> jlebrech_: I use a lib, because it's tough to tell what will be thread safe
<jlebrech_> dfockler: makes sense
<suchness> jlebrech_: To answer your question though, yes people here have used threads.
moted has joined #ruby
baweaver has joined #ruby
govg has quit [Ping timeout: 250 seconds]
<dfockler> jlebrech_: if you aren't sharing any resources between threads and what you're doing is really simple, then you could probably get away with it
<jlebrech_> kinda want something in a queue but not in a queue, just it to be async in the simplest way.
govg has joined #ruby
<changelog> jlebrech_: so you want to do it in the web process?
<jlebrech_> yeah it's just run this method and forget
d2dchat has quit [Remote host closed the connection]
greenarrow has quit [Quit: 500]
quimrstorres has quit [Remote host closed the connection]
<changelog> that’s probably a bad idea because if you deploy that progress gets lost and isn’t “requeued"
tkuchiki has quit [Remote host closed the connection]
<jlebrech_> changelog: yeah, it's just run this method that sends a request to an api
<imperator> have any rexml conversion wrappers already been written?
mleung has joined #ruby
<changelog> if you already have sidekiq setup it’s probably best to leave it :-)
<suchness> I agree with changelog
<imperator> i'm starting https://github.com/djberg96/rexml-compat but want to make sure it hasn't already been done
shoutsid06 has quit [Ping timeout: 265 seconds]
<jlebrech_> is there a simpler way to use sidekiq instead of using a worker class?
<imperator> yorickpeterse, have done anything like that already for oga?
<changelog> sidekiq gives you a ton of cool stuff like requeueing, retries, errors, etc
<benjwadams> hey so question about file locks
<changelog> jlebrech_: you can queue any class type directly
<jlebrech_> changelog: might look into that
tkuchiki has joined #ruby
troyready has quit [Quit: Leaving]
<benjwadams> if I'm using File.open { |f| f.flock(File::LOCK_EX); #some other commands... } and then something goes wrong/exception occurs, is the lock released as well?
<changelog> just be mindful about the state thing. better to call delay on a class method where you pass teh arguments in than it is to force it to serialize the whole state into redis.
troyready has joined #ruby
towski_ has joined #ruby
<jlebrech_> changelog that's cool
jonee has quit [Ping timeout: 272 seconds]
lechuk has joined #ruby
quimrstorres has joined #ruby
<shevy> I like changelogs
lapideviridi has quit [Quit: Leaving]
<twohlix> yea, they're nice
quimrstorres has quit [Remote host closed the connection]
<imperator> benjwadams, good question; i think you could test it by trying to get another lock on it
polpak has joined #ruby
mdavid613 has joined #ruby
<imperator> use flock(File::LOCK_NB|File::LOCK_EX) and see what it returns after an exception
<imperator> if false, then it still has the lock
<benjwadams> imperator, so i could test by intentionally raising an exception or something and then trying to open
<imperator> yep
rbennacer has quit [Remote host closed the connection]
hanmac has quit [Ping timeout: 244 seconds]
ramfjord has joined #ruby
<imperator> i would think it would be released, since the block is only held within the block
<imperator> but if you swallow an exception within the block...not sure
<imperator> my guess (because I'm lazy) is that it would retain the lock
baroquebobcat has quit [Quit: baroquebobcat]
saddad has joined #ruby
<imperator> since the *lock is only held within the block
towski_ has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 250 seconds]
<adaedra> you should keep the locks only for the time of write
govg has quit [Ping timeout: 246 seconds]
A124 has quit [Ping timeout: 260 seconds]
bricker has joined #ruby
A124 has joined #ruby
<benjwadams> don't the locks get cleaned up after leaving the block?
<benjwadams> i'm gonna find out i guess
<imperator> yep, should
RobertBirnie has joined #ruby
iTrace has joined #ruby
spider-mario has joined #ruby
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cvtsx has quit [Read error: Connection reset by peer]
krz has quit [Ping timeout: 244 seconds]
[Butch] has joined #ruby
<iTrace> Anybody know of an open source Ruby on Rails CMS project? I want something that could rival WordPress. Anybody know of such a project?
<[k-> wordpress has bugs, automatically striked off!
<suchness> iTrace: I wish I could publish the one I have been writing over the last 5 years.
<shevy> iTrace #rubyonrails should be able to help more. I think there are individual projects but probably none have a full rival CMS like to drupal wordpress or joomla
<[k-> does Jekyll count? i dont know
willywos has joined #ruby
<[k-> i dont even know what jekyll or cms do!
<suchness> iTrace: But you know how companies like their tech!
pietr0 has joined #ruby
<dfockler> iTrace: refinery, locomotive
danzilio has joined #ruby
casadei_ has quit [Remote host closed the connection]
<suchness> dfockler: I have heard good things about locomotive
pdoherty has joined #ruby
<shevy> [k- things such as site-login, blogging and ... I don't know what else. I am reading this right now https://canned-death.us/drupal/node/8 which apparently is using drupal
<shevy> if only ruby would enter the www world
<adaedra> kof kof
<centrx> .l.
benlovell has joined #ruby
<iTrace> Thanks all. I was thinking about building something from scratch with Active Admin, but I thought I'd check if there was a good base project I could pull from.
<dfockler> iTrace: spina is a in-the-works cms that looks nice
chouhoulis has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 264 seconds]
<iTrace> Never heard of spina
skade has quit [Quit: Computer has gone to sleep.]
hanmac has joined #ruby
jonee has joined #ruby
momomomomo has quit [Ping timeout: 244 seconds]
<iTrace> dfockler: Spina does looks nice. Thanks!
<shevy> spinacce!
freerobby has joined #ruby
momomomomo has joined #ruby
jhack has joined #ruby
<benjwadams> imperator: looks like the lock is released when the block exits or an exception happens
<imperator> benjwadams, good to know :)
mary5030_ has joined #ruby
<darix> iTrace: just to throw something into the mix: jekyll or nanoc are for many sites really enough
mikecmpbll has quit [Ping timeout: 246 seconds]
troulouliou_div2 has joined #ruby
<darix> iTrace: and you have less burden on the hosting part
nettoweb has joined #ruby
<darix> iTrace: https://pixls.us/ - fully static except for comments comming from discourse
mary5030 has quit [Ping timeout: 246 seconds]
mary5030 has joined #ruby
mary5030_ has quit [Read error: Connection reset by peer]
<iTrace> darix: nanoc looks interesting.
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
serivich has quit [Ping timeout: 250 seconds]
<darix> they are both similar
Dzejmskrokan has joined #ruby
paulcsmith___ has quit [Quit: Be back later ...]
devoldmx_ has joined #ruby
baweaver has quit [Remote host closed the connection]
casadei_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
paulcsmith___ has joined #ruby
mary5030 has joined #ruby
A124 has quit [Ping timeout: 260 seconds]
stan has quit [Ping timeout: 244 seconds]
j4cknewt has joined #ruby
failshell has quit [Remote host closed the connection]
leafybasil has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 252 seconds]
A124 has joined #ruby
govg has joined #ruby
towski_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
chthon has quit [Ping timeout: 244 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhack has quit [Remote host closed the connection]
mary5030_ has joined #ruby
Rollabunna has joined #ruby
youch has joined #ruby
iamjarvo has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
c0m0 has quit [Ping timeout: 264 seconds]
f4cl3y__ has quit [Ping timeout: 260 seconds]
pengin has joined #ruby
dopamean_ has quit [Quit: Leaving...]
mhib has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby
nhhagen has joined #ruby
mary5030 has quit [Ping timeout: 260 seconds]
jerius has quit [Quit: /quit]
dgutierrez1287 has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
mikecmpbll has joined #ruby
A124 has quit [Ping timeout: 260 seconds]
A124 has joined #ruby
dopie has joined #ruby
justicefries has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
Trynemjoel has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
platzhirsch has quit [Ping timeout: 246 seconds]
safeforge has quit [Remote host closed the connection]
<ddfreyne> \o/ nanoc
<ddfreyne> (I do not have a highlight for nanoc)
keeguon has quit [Ping timeout: 246 seconds]
saltsa has quit [Ping timeout: 244 seconds]
<raz> nanoc is terrible
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amclain has joined #ruby
<raz> middleman is slightly less terrible
<raz> the landscape of static site generators is pretty sad
<ddfreyne> What makes it terrible?
safeforge has joined #ruby
<raz> it's a confused design and a convoluted architecture
platzhirsch has joined #ruby
<raz> once you go beyond a few dozen pages you run into performance issues
freerobby has quit [Quit: Leaving.]
<raz> like, ruby is slow as a pig to begin with, but nanoc can easily chew *minutes* to generate a bunch of html...
f4cl3y__ has joined #ruby
saltsa has joined #ruby
<ddfreyne> Yeah, I can understand that. nanoc 4 addresses some of those concerns (it gets rid of the confusing identifiers).
nish1294 has quit [Ping timeout: 265 seconds]
pengin has quit []
<ddfreyne> As for speed… I’ve managed to generate thousands of pages in a minute. It depends on the filters you use, most of the time.
* raz currently reaches for harp when making static sites
<raz> yea the problem is that its rather easy to hit a combination that grinds nanoc to effectively a stop
jsrn has quit [Ping timeout: 244 seconds]
<raz> and then it's very hard to workaround the brain damaged design
tomphp_ has joined #ruby
* raz been there, got the t-shirt
shlomo has joined #ruby
jhack has joined #ruby
<raz> and the annoying part is that it only happens after you're already pretty invested into it
<raz> it's a trap! ;)
Musashi007 has joined #ruby
codecop has quit [Remote host closed the connection]
<ddfreyne> raz: disclaimer: I am the author of nanoc. I'm always interested in feedback though :)
<raz> ddfreyne: ouch, sorry lol
jobewan has joined #ruby
<raz> well we actually had an exchange about that years ago when nanoc came crashing down on me ;)
<raz> on github
mhib has joined #ruby
<raz> i don't remember the exact details.. but to cut you some slack: middleman collapsed in similar ways not very long after ;)
xelim has quit [Remote host closed the connection]
<ddfreyne> A goal I have for nanoc 4 is for it to be not memory-based, so it doesn't have to deal with garbage collection issues. It's the main bottleneck.
troyready has quit [Read error: Connection reset by peer]
<[k-> oh shit buuuuuuuuuuuuuurn
<[k-> sorry bro
<raz> yea, iirc that was part of the issue, it would balloon to OOM at some point
A124 has quit [Ping timeout: 260 seconds]
Overand has joined #ruby
<ddfreyne> It's surprisingly difficult to build a static site generator that has the flexibility of nanoc while also being fast.
jsrn has joined #ruby
<raz> well i dunno really.. imho it tries to do too much
<ddfreyne> (The nanoc 3.x design didn't give me much space to fix things either. But then again, that architecture lasted for 6 years.)
A124 has joined #ruby
<ddfreyne> raz: What would you remove?
millerti has joined #ruby
<raz> its terribly hard to find a site gen that simply compiles from source to destination, minifies the assets on the destination, and leaves it at that
<raz> ddfreyne: well, all the world-building efforts
<atmosx> raz: in what way is middleman terrible?
<raz> atmosx: oh god this is turning into a roundhouse rant... lol
<atmosx> raz: ah k, worry not.
<raz> atmosx: getting it to work (and keeping it working) is the first problem, when less etc, gets involved
jackjackdripper has joined #ruby
dfockler has quit [Remote host closed the connection]
<atmosx> okay, it's the same kind of problem that have all static website generators currently in existence I guess.
juanpaucar has joined #ruby
platzhirsch has quit [Ping timeout: 265 seconds]
<raz> and it also has this problematic ambition to maintain an internal image of all interdependencies and what not
<ddfreyne> raz: FYI, in case you're interested in seeing what the recent efforts are about: http://v4.nanoc.ws/doc/nanoc-4-upgrade-guide/
<atmosx> raz: I don't thin it was made for huge websites
<raz> ddfreyne: the rules file, it shouldn't exist :)
<atmosx> but for small corporate websites, front-ends etc, works well IMHO.
f4cl3y__ has quit [Ping timeout: 240 seconds]
<ddfreyne> raz: Keeping track of dependencies is useful for speeding up compiles (avoid recompiling when possible). It's hard to get right, but I find it really useful.
<raz> atmosx: yeh.. i'm a bit of a hardcore user.. it's just annoying when simple things that *should* work suffocate from their own bloat ;)
maq has joined #ruby
paulcsmith___ has quit [Quit: Be back later ...]
<atmosx> raz: well, there's sinatra.
<ddfreyne> raz: What would you rather have than a rules file?
<raz> ddfreyne: the filesystem has timestamps for that
<raz> ddfreyne: no rules file, most static site gens do without such
<atmosx> You can always write your own website, there are other projects that are less hardcore than sinatra..
shoutsid has joined #ruby
jsrn has quit [Ping timeout: 252 seconds]
<ddfreyne> raz: Where would you specify how certain pages or assets are processed?
djbkd has joined #ruby
<raz> ddfreyne: why would that need to be specified?
<raz> the filename extension goes a pretty long way
paulcsmith___ has joined #ruby
devoldmx_ has quit [Ping timeout: 256 seconds]
<ddfreyne> raz: How would you specify which markdown processor to use? Whether or not to minify? Colorize syntax? Run a typography-improving script? ...
nhhagen has quit [Remote host closed the connection]
<ddfreyne> raz: Mind you, nanoc is designed to be flexible and not make assumptions about what you want to do with the input files. I try to keep it as opinion-free as possible
<raz> ddfreyne: why would i want to run different md processors per file? why would i not want to minify? colorizing syntax and typography improving sounds like javascript to me
d2dchat has joined #ruby
hj2007 has quit [Quit: This computer has gone to sleep]
jerius has joined #ruby
hj2007 has joined #ruby
<raz> ddfreyne: good software is opinionated :P
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
<raz> imho that one is pretty close to getting it right
<raz> sadly it's javascript :x
<[k-> the ruby of the cms world
<ddfreyne> raz: I like it when software gives you possibilities, and you fill in the blanks. Having to resort to JS for colorizing syntax and improving typography can be a good thing, but I don't want to be limited to that.
TomyLobo has joined #ruby
skade has joined #ruby
niiamon has quit [Remote host closed the connection]
<raz> ddfreyne: well, i'd argue on the other side 99% of your users would prefer not to learn an awkward config DSL only to render an index.html
djbkd has quit [Remote host closed the connection]
dopamean_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
<raz> i recall it had a lot of gotchas and counter-intuitive semantics even for supposedly trivial cases
Muhannad has quit [Ping timeout: 240 seconds]
<raz> getting stuff like that right is very hard, so it's best avoided until it's absolutely inevitable, imho
A124 has quit [Ping timeout: 260 seconds]
jsrn has joined #ruby
A124 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
rbennacer has quit [Ping timeout: 245 seconds]
<atmosx> raz have you tried creatinga website the way you want with something like Scorched or Sinatra?
<raz> atmosx: yes, i'm an old fart, i've used pretty much everything you've ever heard of ;)
<raz> all the way from java struts and perl mojo
iamjarvo has joined #ruby
dfockler has joined #ruby
<atmosx> raz: what about rubyonrails?
<atmosx> lol
<ddfreyne> raz: For simple sites, I generally don't even recommend using nanoc myself--it's designed to be flexible, and it is overkill for simple sites.
<raz> heh yes, that's what i use most for sites that need logic
skade has quit [Client Quit]
marsjaninzmarsa is now known as Guest42321
ascarter has joined #ruby
<raz> ddfreyne: yea well, its a philosophical argument... i just really don't see nanoc's niche when harp can be used ;)
failshell has joined #ruby
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ddfreyne> Even though it’s written in JavaScript? ;)
changelog has quit [Quit: changelog]
<raz> but it's not like there's a law that there can be only one framework for x
djbkd has joined #ruby
<raz> ddfreyne: well, javascript is the pest.. but it has going for it that a render pass takes 0.1s, whereas with nanoc the same render pass would be somewhere around 15s
darkf has quit [Quit: Leaving]
<towski_> I am getting a segmentation fault with 2.0.0
<havenwood> raz: I can't speak highly enough of the Roda framework toolkit: http://roda.jeremyevans.net
<towski_> but I am not seeing any core dump
<ddfreyne> raz: If nanoc is that slow, I'd look at the filters you used (that's where the vast majority of the slowness lies)
<towski_> Segmentation fault: 11
<havenwood> towski_: Use the latest patch release of 2.0, or better yet 2.1 or 2.2.
<raz> havenwood: looks like sinatra, at a glance? :)
<havenwood> towski_: 2.0 is in maintenance mode.
ramfjord has quit [Ping timeout: 246 seconds]
<towski_> how do I get a core dump tho?
bruno- has joined #ruby
<raz> ddfreyne: no matter how much you tweak it, ruby just doesn't go as fast as javascript, not even remotely the same ballpark ;)
<towski_> another big complaint about ruby is that it has classes
<towski_> classes are so gay
iTrace has quit [Quit: (null)]
* raz likes classes
<[k-> haskell!
Jackneill has joined #ruby
bronson has joined #ruby
<havenwood> towski_: that's a terrible way to express disapproval of classes :(
<raz> maybe it wasn't even disapproval?
<raz> ;)
<havenwood> raz: ;)
<raz> who knows what side of the fence towski_ lives
benlovell has quit [Ping timeout: 265 seconds]
<wmoxam> ...
<ddfreyne> towski_: Please don’t use “gay” as an insult.
graydot has joined #ruby
rbennacer has joined #ruby
<havenwood> raz: It's easy to port a Sinatra app to Roda. The plugin system is powerful and I love how Roda keeps things clean.
skade has joined #ruby
<raz> havenwood: i've lost interest in reinventing my own rails after spending too much time with padrino ;)
<havenwood> raz: Its core is just a routing tree. You can go through each plugin and cherry pick them to build what you need.
<raz> sinatra is good enough for tiny api shims and such that don't need big performance or features
<havenwood> raz: It's a very different beast than Padrino.
<raz> anything beyond that you'd better reach for something either more performant, or more fully featured
graydot has quit [Client Quit]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
<havenwood> raz: I use Roda for APIs indeed but the author, Jeremy Evans, uses it for large webapps.
<raz> havenwood: if you're at the point of cherry picking, and want to do it in ruby, just use rails and save yourself the hassle to port it later :)
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rakm_ has joined #ruby
<raz> keeping rails patched up is enough work of its down.. doing it on a homebrew conglomerate of gems is unsustainable
skade has quit [Client Quit]
prettiestPony11 has joined #ruby
<havenwood> raz: I'd rather have a carefully crafted Roda app backed by Sequel than trying to make Rails work for whatever purpose it wasn't really created for (unless you're making a Basecamp clone).
tubuliferous_ has joined #ruby
atomical has joined #ruby
<raz> havenwood: i think everyone goes through that phase. ;)
casadei_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
nish1294 has joined #ruby
<havenwood> raz: So you're in the monolith stage?
rakm has quit [Ping timeout: 245 seconds]
skade has joined #ruby
<havenwood> raz: Couple everything?
graydot has joined #ruby
<raz> no, quite the opposite
vickleton has joined #ruby
<havenwood> raz: With Rails? The opposite?
<havenwood> raz: Do tell...
lele has joined #ruby
<raz> well, as terrible as it is, rails is the best frontend framework you can use atm
<raz> its relatively mature (been hard enough), easy to hire for
<towski_> sorry for dropping the g bomb. apparently if you do a let(:variable){ variable } in rspec it seg faults
<raz> arguably django and a few others are also up there
<havenwood> towski_: 2.0 is in maintenance mode but the early releases were prone to segfault.
tubuliferous_ has quit [Ping timeout: 260 seconds]
mary5030_ has quit [Ping timeout: 246 seconds]
AlphaAtom has joined #ruby
<havenwood> towski_: 2.0 doesn't receive bug fixes anymore and will be EoLed in Feb.
<havenwood> towski_: If you can, switch to 2.1 or 2.2 at once.
<havenwood> towski_: At the very least, switch to the latest patch release of 2.0.
freerobby has joined #ruby
Guest24 has quit [Ping timeout: 256 seconds]
<havenwood> raz: Lotus and Roda are lovely and are great for real work. Good to have high quality options.
NeverDie has joined #ruby
shadoi has joined #ruby
<raz> havenwood: yea we're just from different angles, would you launch a company on lotus or ronda? ;)
<havenwood> raz: Yes. Roda*
pietr0_ has joined #ruby
<raz> heh... oh well
<towski_> last time we upgraded from ruby 2.0 there was a memory issue
NeverDie has quit [Client Quit]
<towski_> although I assume that's probably fixed
<towski_> there is just higher priority stuff to do
<havenwood> towski_: 2.2.2 is a very good option.
<havenwood> towski_: Get off 2.0 before you're forced. It's time is coming to an end.
<towski_> thanks
<towski_> that's dramatic
skade has quit [Quit: Computer has gone to sleep.]
<havenwood> towski_: 2.1.6 or 2.2.2
<havenwood> tick tock
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pietr0 has quit [Ping timeout: 250 seconds]
pietr0_ is now known as pietr0
<scpike> havenwood: I'd love to see an open source "complicated web app" written in one of these microframeworks / as services. Learned a lot about rails from reading the redmine source
changelog has joined #ruby
scroff has quit [Remote host closed the connection]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> scpike: Aye. Jeremy has mentioned he'd like to make a good large example available.
DoubleMalt has joined #ruby
<havenwood> scpike: Here's a small, template example: https://github.com/jeremyevans/roda-sequel-stack#readme
<scpike> havenwood: not scaffolding / example, I mean a big-ish project with a bunch of contributors, to see how it'd feel in a complicated setting
<havenwood> scpike: yeah
benlovell has joined #ruby
j4cknewt has quit [Remote host closed the connection]
<havenwood> scpike: I've not personally composed a large app with it but anything Jeremy Evans touches is gold.
Guest50 has joined #ruby
skade has joined #ruby
skade has quit [Client Quit]
<havenwood> scpike: I think they do discuss large apps at some point in this discussion: https://devchat.tv/ruby-rogues/210-rr-roda-and-routing-trees-with-jeremy-evans
mary5030_ has joined #ruby
sshuff is now known as sshuff|gone
tomphp_ has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
<scpike> havenwood: cool I'll check it out
tcopeland has quit [Quit: Leaving.]
AlphaAtom has joined #ruby
tvw has quit []
user1138 has quit [Remote host closed the connection]
Lucky__ has joined #ruby
Muhannad has joined #ruby
suchness has quit [Ping timeout: 256 seconds]
user1138 has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Musashi007_ has joined #ruby
mary5030_ has quit [Remote host closed the connection]
<jhack> is there a frontend dev channel?
mary5030 has joined #ruby
graydot has quit [Quit: graydot]
jlebrech_ has quit [Remote host closed the connection]
Musashi007 has quit [Ping timeout: 244 seconds]
Musashi007_ is now known as Musashi007
kaleido has joined #ruby
bodgix has left #ruby [#ruby]
tomphp_ has quit [Ping timeout: 240 seconds]
mdavid613 has quit [Quit: Leaving.]
<havenwood> jhack: There's ##javascript and #css, ah or there is actually a ##frontend.
graydot has joined #ruby
troulouliou_div2 has quit [Ping timeout: 240 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<gambl0re> can i pm you?
speakingcode has joined #ruby
<havenwood> gambl0re: If you need an OP, otherwise ask in the channel. ;)
mdavid613 has joined #ruby
<gambl0re> whats op
Synthead has joined #ruby
<havenwood> gambl0re: A staff operator for the channel.
ramfjord has joined #ruby
hahuang65 has joined #ruby
<gambl0re> remember you helped me setting up ruby/rails and all the other stuff
<gambl0re> it was long time ago
<havenwood> gambl0re: If you ask here other folk can maybe give better answers than me, learn from the answers, etc.
<havenwood> gambl0re: Glad to help!
ne1l has joined #ruby
<gambl0re> ok
j_mcnally has joined #ruby
ne1l is now known as Guest41819
conor_ has quit [Remote host closed the connection]
Guest41819 has quit [Client Quit]
Guest41819 has joined #ruby
Guest41819 has quit [Read error: Connection reset by peer]
<havenwood> gambl0re: Ruby actually has UnboundMethods but typically a Method is bound to an Object.
jbw has quit [Ping timeout: 246 seconds]
jbw has joined #ruby
jsrn has quit [Ping timeout: 246 seconds]
umop3plsdn has joined #ruby
j_mcnally has quit [Ping timeout: 240 seconds]
conor_ has joined #ruby
umop3plsdn is now known as Guest61290
mary5030 has quit [Remote host closed the connection]
<havenwood> scpike: "Unfortunately, all of my large Roda apps are proprietary... But in general they use multi_route for splitting up the routing tree by the initial segment."
<havenwood> (The multi_route plugin.)
msnyon has joined #ruby
fantazo has joined #ruby
halcyone3 has quit [Ping timeout: 240 seconds]
<havenwood> ^ from the #roda channel
Rollabunna has quit [Ping timeout: 244 seconds]
scroff has joined #ruby
Dzejmskr_ has joined #ruby
relix has joined #ruby
j4cknewt has joined #ruby
Dzejmskrokan has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
nettoweb has joined #ruby
<gambl0re> a method is a function in javascript, a hash is a object in javascript
reset has joined #ruby
<gambl0re> symbol im not sure what it is in javascript...
bthesorceror has joined #ruby
<havenwood> gambl0re: They're all objects in Ruby. :)
<BraddPitt> roda is like Spray routing from what I can tell
<gambl0re> why is it called a method and not a function
<gambl0re> is there any difference between the two for those that know javascript
gard has joined #ruby
nish1294 has quit [Read error: Connection reset by peer]
<BraddPitt> no, gambl0re
<BraddPitt> Except for how javascript treats functions (first class objects) that can be passed around
<BraddPitt> think Procs in ruby
kirun has joined #ruby
niiamon has joined #ruby
Cust0sLim3n has quit [Ping timeout: 244 seconds]
chouhoulis has quit [Ping timeout: 252 seconds]
<gambl0re> symbols are mainly used for creating hash names?
<bradland> gambl0re: the difference in terminology has to do with the origins and philosophies of javascript versus ruby
<havenwood> >> [method(:puts), method(:p)].each { |meth| meth.call ['hi', 'there'] }
<ruboto> havenwood # => hi ...check link for more (https://eval.in/413262)
blt has joined #ruby
<gambl0re> instead of using strings..
PhantomSpank has joined #ruby
<apeiros> gambl0re: a method has a receiver and the receiver becomes self in the method context
<apeiros> gambl0re: a function does not
bootstrappm has joined #ruby
chuy has quit [Ping timeout: 244 seconds]
<apeiros> and with JS it's a bit of both.
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bootstrappm> morning all
<havenwood> bootstrappm: g'mornin'
troyready has joined #ruby
<bradland> gambl0re: symbols are strings with a little extra behavior/constraints
chouhoulis has joined #ruby
<gambl0re> the older version of ruby it would be :symbol => "value"
<bradland> a symbol is immutable, so the ruby interpreter can treat symbols differently
<gambl0re> now its... symbol: "value"?
<havenwood> gambl0re: interned strings is another thing to call them
<havenwood> >> 'string'.intern.class
<ruboto> havenwood # => Symbol (https://eval.in/413263)
<bradland> gambl0re: both syntax versions are supported
jsrn has joined #ruby
<bradland> symbol: "value" is just a little more convenient to type
kaleido has quit [Quit: Textual IRC Client: www.textualapp.com]
ralphy has joined #ruby
<gambl0re> what if i did "symbol": "value"
<gambl0re> inside a hash
niiamon has quit [Ping timeout: 252 seconds]
<bradland> gambl0re: you can't use quotes in that format
<bradland> you'll get an error
<apeiros> >> {"foo": "bar"}
<ruboto> apeiros # => {:foo=>"bar"} (https://eval.in/413265)
<apeiros> yes, we can ;-)
<bradland> wait
<apeiros> it's a 2.2+ thing, though (or maybe 2.1+?)
<bradland> i lied!
<bradland> i could have sworn that used to blow up
<apeiros> 21>> {"foo": "bar"}
<ruboto> apeiros # => /tmp/execpad-1316dcccddb5/source-1316dcccddb5:2: syntax error, unexpected ':', expecting => ...check link for more (https://eval.in/413266)
<apeiros> yeah, 2.2+
<gambl0re> ??
<bradland> ruby is a bit of a moving target
tvw has joined #ruby
baweaver has joined #ruby
chuy has joined #ruby
<bradland> prior to version 2.2, using this form: "symbol": value would cause an exception
<bradland> but it's allowed in 2.2
bthesorceror has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
<bradland> gambl0re: have you tried ruby's REPL yet?
<bradland> the built in one is called IRB
<bradland> you can start it from a command line by typing irb
afs has quit [Quit: Ex-Chat]
<gambl0re> yea i used ruby gems before..
<bradland> you can type code at the prompt and irb will evaluate it as you enter lines of code
scripore has quit [Quit: This computer has gone to sleep]
<bradland> irb isn't really rubygems
<bradland> rubygems is a packaging system
<bradland> with irb, you can try out code to find answers to questions
Guest61290 is now known as umop3plsdn
mdavid613 has quit [Quit: Leaving.]
bizportal has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<yorickpeterse> imperator: No, people have asked me for a Nokogiri compat layer, but I have no interest in making one myself
prettiestPony11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
prettiestPony11 has joined #ruby
NeverDie has joined #ruby
nettoweb has quit [Ping timeout: 245 seconds]
graydot has quit [Quit: graydot]
radgeRayden has joined #ruby
graydot has joined #ruby
<gambl0re> string->object->basic object
Motoservo has quit [Ping timeout: 260 seconds]
myztic has quit [Quit: Leaving]
bricker has quit [Quit: leaving]
DroidBur_ has joined #ruby
yardenbar has quit [Quit: Leaving]
chouhoulis has quit [Remote host closed the connection]
yardenbar has joined #ruby
<shevy> gambl0re are you getting the basics or something ;)
<bradland> gambl0re: mostly, yes, but Ruby is a little bit more complicated than that
<bradland> >> String.ancestors
<ruboto> bradland # => [String, Comparable, Object, Kernel, BasicObject] (https://eval.in/413271)
spider-mario has quit [Remote host closed the connection]
<bradland> the object heirarchy in ruby can change depending upon what code has been run
casadei_ has joined #ruby
DroidBur_ has quit [Client Quit]
baweaver has quit [Remote host closed the connection]
<havenwood> gambl0re: Take a looky here: http://www.gliffy.com/go/publish/5152080
<bradland> if you run String.ancestors in your local irb, you may get a different list
<bradland> havenwood: that is slick
yardenbar has quit [Remote host closed the connection]
Dzejmskr_ has quit [Remote host closed the connection]
lwu has joined #ruby
DroidBurgundy has quit [Ping timeout: 240 seconds]
<havenwood> bradland: Shows well how the class of a module is class and its superclass is module whose superclass is object, which includes kernel whose class is module.
maq has quit [Quit: maq]
dopie has joined #ruby
A124 has quit [Ping timeout: 260 seconds]
joneshf-laptop has quit [Ping timeout: 265 seconds]
A124 has joined #ruby
yardenbar has joined #ruby
cornerma1 has joined #ruby
baweaver has joined #ruby
tvw has quit [Remote host closed the connection]
<dfockler> O_o
towski_ has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
hahuang65 has quit [Ping timeout: 246 seconds]
towski_ has joined #ruby
graydot has quit [Quit: graydot]
ponga has quit [Quit: Connection closed for inactivity]
rbennace_ has joined #ruby
toretore has joined #ruby
user1138 has quit [Remote host closed the connection]
quimrstorres has joined #ruby
cornerman has quit [Ping timeout: 246 seconds]
AlexRussia has quit [Read error: Connection reset by peer]
cornerma1 is now known as cornerman
scripore has joined #ruby
nhhagen has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
rbennacer has quit [Ping timeout: 250 seconds]
nhhagen has quit [Remote host closed the connection]
nhhagen has joined #ruby
finisherr has joined #ruby
ragingcake_ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
hoov has quit [Quit: Leaving]
safeforge has quit [Remote host closed the connection]
user1138 has joined #ruby
user1138 has quit [Remote host closed the connection]
lian_ has joined #ruby
lian_ has quit [Client Quit]
lian_ has joined #ruby
lian_ is now known as lianj
lianj has quit [Changing host]
lianj has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonee has quit [Ping timeout: 272 seconds]
Lingo has joined #ruby
davedev2_ has joined #ruby
dr3w has quit [Read error: Connection reset by peer]
Dzejmskrokan has joined #ruby
dr3w has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
Lingo has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 250 seconds]
baweaver has quit [Remote host closed the connection]
Lingo has joined #ruby
khebbie has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
baroquebobcat has joined #ruby
scripore has joined #ruby
symm- has joined #ruby
khebbie has quit [Ping timeout: 252 seconds]
arup_r has joined #ruby
Oka has joined #ruby
nhhagen has quit [Remote host closed the connection]
JoshL has quit [Read error: No route to host]
JoshL has joined #ruby
khebbie has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
shoutsid has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has quit [Ping timeout: 245 seconds]
shoutsid has joined #ruby
safeforge has joined #ruby
DLSteve has joined #ruby
scripore has quit [Ping timeout: 246 seconds]
devoldmx_ has joined #ruby
jonee has joined #ruby
mordocai has joined #ruby
yardenbar has quit [Ping timeout: 252 seconds]
Muhannad has quit [Ping timeout: 244 seconds]
AlphaAtom has joined #ruby
mhib has quit [Ping timeout: 256 seconds]
atomical has joined #ruby
<TomyLobo> rails allows specifying methods as Class#method. I've also seen the manuals and people here reference methods in similar ways. is there some way to get a method reference from that?
PaulCapestany has quit [Ping timeout: 255 seconds]
<bradland> TomyLobo: not sure what you mean by a "method reference"?
<TomyLobo> i tried method('String#ancestors'), but it wont work
<bradland> as in, documentation?
<bradland> oh
A124 has quit [Ping timeout: 260 seconds]
abcd1234 has quit [Ping timeout: 246 seconds]
Blaguvest has joined #ruby
<bradland> so, Object#method is just a means of communicating documentation
<bradland> it's not actual code
AlphaAtom has quit [Client Quit]
<bradland> the hash means it's a class method
<bradland> derp
<bradland> instance method
<apeiros> String.instance_method(:ancestors)
<bradland> a double colon means class method
AlphaAtom has joined #ruby
<apeiros> and yes, it's just the common way to denote an instance method
<imperator> yorickpeterse, worse, it would be a REXML compat layer, but ok :)
A124 has joined #ruby
<Sou|cutter> bradland: I usually use . for class method
<bradland> there are many ways to communicate method type, but the official ruby docs use ::method
<Sou|cutter> :: I use for namespacing
ItSAN____ has quit [Quit: Leaving...]
<Sou|cutter> fair enough
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
abcd1234 has joined #ruby
mase-chatter has joined #ruby
iamjarvo has joined #ruby
<hanmac> File.size is ambiguous in ri and does show you both, File#size and File::size are more specific
Lingo has quit [Quit: (null)]
niiamon has joined #ruby
nahtnam has joined #ruby
<bradland> @s3.list_objects(bucket: S3_BUCKET, delimiter: S3_DELIMITER, prefix: "#{@instance}/#{@instance}_backup/").each do |response| response.content.keys.map(&:key).pop
<bradland> end
<bradland> sry
diegoviola has joined #ruby
jhack has quit [Remote host closed the connection]
tubuliferous_ has joined #ruby
<BraddPitt> yeah, I use :: for namespacing, # for instance and . for class
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Yiota has joined #ruby
<Sou|cutter> while potentially ambiguous, I guess it's worth knowing that some of us use it that way
A124 has quit [Ping timeout: 260 seconds]
Trynemjoel has quit [Ping timeout: 250 seconds]
niiamon has quit [Ping timeout: 255 seconds]
<imperator> little did we know that Brad Pitt was a Ruby programmer on the side
A124 has joined #ruby
Musashi007 has quit [Ping timeout: 240 seconds]
Trynemjoel has joined #ruby
<TomyLobo> my bullshit detector is ringing
tubuliferous_ has quit [Ping timeout: 250 seconds]
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<miah> its a good thing that names aren't unique across humanity.
mhib has joined #ruby
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<TomyLobo> yeah now you're moving the goalposts :P
safeforge has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
dr3w has quit [Ping timeout: 240 seconds]
fantazo has quit [Ping timeout: 250 seconds]
<TomyLobo> bradland, sorry i meant String#gsub
<TomyLobo> ancestors is a method from Class :)
freerobby has joined #ruby
juanpaucar has quit []
deepu has joined #ruby
AlphaAtom has joined #ruby
<bradland> fortunately, Module#instance_method works in either case :)
arup_r has quit [Ping timeout: 250 seconds]
<TomyLobo> hmm, Modules is a class?
<TomyLobo> i guess i need to read more :)
deepu has quit [Client Quit]
deepu has joined #ruby
Violentr has joined #ruby
<bradland> yes, Module is a class, strangely enough
bricker has joined #ruby
<TomyLobo> and Class is a class
Muhannad has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
<yorickpeterse> imperator: any compat layer is a waste of time in my opinion
<TomyLobo> tell that bukkit :)
<yorickpeterse> while you can fake method names it becomes much harder to fake behaviour or namespaces
Jackneill has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
spider-mario has joined #ruby
abcd1234 has quit [Ping timeout: 246 seconds]
Jackneill has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
Trynemjoel has quit [Ping timeout: 245 seconds]
rdark has quit [Quit: leaving]
Jackneill has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
jhack has joined #ruby
Jackneill has joined #ruby
Trynemjoel has joined #ruby
RegulationD has quit [Remote host closed the connection]
Jackneill has quit [Read error: Connection reset by peer]
benjwadams has quit [Quit: WeeChat 0.4.2]
[Butch] has joined #ruby
gambl0re has quit [Remote host closed the connection]
gambl0re has joined #ruby
cina has joined #ruby
<imperator> yorickpeterse, eh, you might not be able to get 100% compat, but you can make life easier for people
gard has quit [Ping timeout: 240 seconds]
dwithers has quit [Ping timeout: 240 seconds]
<cina> I like the array.map(&:method_name) syntax, is it possible to pass a variable instead of a symbol or string? e.g. array.map(&:variable_name) ?
<imperator> like, there's nothing we can do about explicit element indexing i realize
<imperator> cina, what happened when you tried?
j4cknewt has quit [Remote host closed the connection]
<imperator> irb, your friend :)
<cina> imperator: I mean variable='method_name'; array.map(&:variable)
j4cknewt has joined #ruby
<cina> imperator: it will call 'variable' on each element, I want to call 'method_name' on each record instead
devoldmx_ has quit [Ping timeout: 246 seconds]
j5s7 has joined #ruby
phutchins has quit [Ping timeout: 255 seconds]
dwithers has joined #ruby
joonty has quit [Quit: Leaving]
<Mon_Ouie> &variable and variable = :method_name
fantazo has joined #ruby
<TomyLobo> i just read about a wonderful thing called mixins
shpoont has joined #ruby
Violentr has quit [Ping timeout: 260 seconds]
dfockler has quit [Remote host closed the connection]
gizmore has joined #ruby
<TomyLobo> with which i can add methods to classes cooperatively
<imperator> mixin all the things!
<TomyLobo> problem is, i cant use those methods from the class scope
<apeiros> >> meth = :upcase; ["hi", "there"].map(&meth)
<ruboto> apeiros # => ["HI", "THERE"] (https://eval.in/413310)
<apeiros> cina: ^
<apeiros> you can have any expression there
kidoz has joined #ruby
lxsameer has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shpoont has quit [Client Quit]
baweaver has joined #ruby
<Mon_Ouie> What do you mean by "from the class scope"?
<apeiros> >> def meth(prefix); "#{prefix}case"; end; ["HI", "THERE"].map(&meth(:down))
<ruboto> apeiros # => wrong argument type String (expected Proc) (TypeError) ...check link for more (https://eval.in/413312)
<apeiros> meep
<apeiros> >> def meth(prefix); "#{prefix}case"; end; ["HI", "THERE"].map(&(meth(:down)))
<ruboto> apeiros # => wrong argument type String (expected Proc) (TypeError) ...check link for more (https://eval.in/413313)
<imperator> TomyLobo, see extend :)
<bradland> TomyLobo: that should be possible. try posting some code along with what you expect to happen.
<apeiros> wth?
<apeiros> oh, lol, silly me
<apeiros> >> def meth(prefix); :"#{prefix}case"; end; ["HI", "THERE"].map(&meth(:down))
<ruboto> apeiros # => ["hi", "there"] (https://eval.in/413315)
RegulationD has joined #ruby
<apeiros> missed that stupid :
<bradland> one too many paren
<apeiros> no
JoshL has quit []
<apeiros> paren were fine
<apeiros> second one too
<havenwood> >> def meth(prefix); :"#{prefix}case"; end; ["HI", "THERE"].map(&meth(:down))
<apeiros> >> def meth(prefix); :"#{prefix}case"; end; ["HI", "THERE"].map(&(meth(:down)))
<ruboto> havenwood # => ["hi", "there"] (https://eval.in/413316)
<ruboto> apeiros # => ["hi", "there"] (https://eval.in/413317)
<havenwood> mm
<apeiros> the problem was that I returned a string from meth()
arup_r has joined #ruby
<apeiros> and String#to_proc does not exist
gambl0re has quit [Read error: Connection reset by peer]
<apeiros> whatever you pass in front of & must either be a proc or respond to to_proc
kaffepanna has joined #ruby
platosha has quit [Remote host closed the connection]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ragingcake_ has quit [Quit: ragingcake_]
<cina> Mon_Ouie, apeiros: Thank you! this is very cool!
kaffepanna has quit [Client Quit]
nhhagen has joined #ruby
<TomyLobo> hmm i'm moving it to the constructor. it's more of a per-instance thing anyway
<bradland> >> def meth(prefix); :"#{prefix}case"; end; ["HI", "THERE"].map(&(meth(:down)))
<ruboto> bradland # => ["hi", "there"] (https://eval.in/413318)
j5s7 has quit [Quit: leaving]
gambl0re has joined #ruby
j5s7 has joined #ruby
abcd1234 has joined #ruby
rbennacer has joined #ruby
j5s7 has quit [Client Quit]
chouhoulis has joined #ruby
gambl0re has quit [Remote host closed the connection]
Guest50 has joined #ruby
rbennace_ has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
j5s7 has joined #ruby
fantazo has quit [Ping timeout: 245 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<yorickpeterse> imperator: I'd rather focus on good migration guides
ledestin has joined #ruby
ValicekB has joined #ruby
bradleyprice has quit [Remote host closed the connection]
f3ttX] has quit [Remote host closed the connection]
nhhagen has quit [Remote host closed the connection]
paulcsmith___ has quit [Read error: Connection reset by peer]
paulcsmith___ has joined #ruby
<allcentury> why can't I call a protected method in a class that I inherit from?
gambl0re has joined #ruby
nhhagen has joined #ruby
elmano has joined #ruby
rideh has joined #ruby
atomical_ has joined #ruby
<elmano> Hello, I wonder if someone could help me with file upload to amazon s3 .. I'm having trouble and the return they are giving is bad request ... the code: https://gist.github.com/elmanoneto/64abf5070f4d72dcd421
chills42 has quit [Remote host closed the connection]
dfockler has joined #ruby
baweaver has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
<jhass> ?code allcentury
<ruboto> allcentury, We can't help you without your code, please post it to https://gist.github.com
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
j4cknewt_ has joined #ruby
krz has joined #ruby
atomical has quit [Ping timeout: 255 seconds]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdavid613 has joined #ruby
conor_ has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
skade has joined #ruby
j4cknewt has quit [Ping timeout: 244 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
allcentury has quit [Ping timeout: 260 seconds]
AlphaAtom has joined #ruby
<apeiros> jhass: seems like they didn't like the idea of showing code…
TheHodge has joined #ruby
rideh has quit [Quit: zap]
<jhass> heh, I simply came too late
nhhagen has quit [Remote host closed the connection]
benlovell has joined #ruby
brendan- has quit [Remote host closed the connection]
<apeiros> yeah, 3min delayed response. teh horror.
kidoz has quit [Read error: Connection reset by peer]
iateadonut has quit [Quit: Leaving.]
n008f4g_ has joined #ruby
kidoz has joined #ruby
duderonomy has quit [Ping timeout: 260 seconds]
danzilio has quit [Quit: My computer has fallen asleep!]
ItSANgo has joined #ruby
Neon has joined #ruby
gambl0re has quit [Ping timeout: 255 seconds]
kidoz_ has joined #ruby
zacstewa_ has joined #ruby
_reset has joined #ruby
changelog_ has joined #ruby
d2dchat_ has joined #ruby
yh__ has joined #ruby
rbennace_ has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
mordocai` has joined #ruby
gard has joined #ruby
reset has quit [Ping timeout: 245 seconds]
gambl0re has joined #ruby
<Neon> I'm trying to set something up with rb-inotify. The example (http://www.rubydoc.info/github/nex3/rb-inotify/INotify/Notifier) makes this pretty straightforward, but I have a problem. I watch for two different events and if any of them triggers once I want the whole notifier to stop watching. I tried calling event.watcher.notifier.close in the watcher's block and it gives me a EBADF (bad file descriptor) in IO#readpartial,
<Neon> called from some rb-inotify method.
cookiez has quit [Ping timeout: 245 seconds]
ItSANgo has quit [Client Quit]
cookiez has joined #ruby
rbennacer has quit [Ping timeout: 245 seconds]
brianpWins has quit [Ping timeout: 245 seconds]
<adaedra> I would need a way to create fake web requests (rack-style) for tests
Muhannad has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
mordocai has quit [Read error: Connection reset by peer]
A124 has quit [Ping timeout: 260 seconds]
changelog has quit [Ping timeout: 260 seconds]
d2dchat has quit [Ping timeout: 260 seconds]
zacstewart has quit [Ping timeout: 260 seconds]
changelog_ is now known as changelog
<Neon> How can I set it up so it stops the notifier (and returnd from Notifier#run) after one event?
DLSteve has quit [Ping timeout: 245 seconds]
dstarh has quit [Ping timeout: 245 seconds]
danzilio has joined #ruby
govg has quit [Ping timeout: 260 seconds]
yh has quit [Ping timeout: 260 seconds]
kidoz has quit [Ping timeout: 245 seconds]
lianj has quit [Ping timeout: 245 seconds]
lianj has joined #ruby
shlomo has quit [Quit: WeeChat 1.2]
govg has joined #ruby
A124 has joined #ruby
kstuart_ has joined #ruby
mase-chatter has quit [Quit: Leaving]
thiagovsk has quit [Ping timeout: 245 seconds]
ArchRogem has quit [Ping timeout: 245 seconds]
thiagovsk has joined #ruby
<Neon> Neon, use Notifier#process.
baweaver has joined #ruby
DenSchub has quit [Ping timeout: 245 seconds]
<Neon> Neon, oh man, thanks, how could I not notice that one? :/
imperator has left #ruby ["Leaving"]
skade has joined #ruby
iamjarvo has joined #ruby
ArchRogem has joined #ruby
jsrn has quit [Ping timeout: 250 seconds]
DenSchub has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
kstuart has quit [Ping timeout: 272 seconds]
changelog has quit [Quit: changelog]
spider-mario has joined #ruby
rideh has joined #ruby
jsrn has joined #ruby
<nlsun> optparse says it supports shell completion but i copied the sample script and am not able to get any completion out of it using zsh
changelog has joined #ruby
rideh has quit [Client Quit]
dopamean_ has quit [Ping timeout: 250 seconds]
<BraddPitt> elmano which gem are you using?
r_baron has quit [Quit: Page closed]
AlphaAtom has joined #ruby
jonee has quit [Ping timeout: 240 seconds]
dr3w has joined #ruby
prettiestPony11 has quit [Read error: Connection reset by peer]
shinnya has joined #ruby
j5s7 has quit [Quit: leaving]
banister has joined #ruby
jsrn has quit [Ping timeout: 246 seconds]
ItSANgo has joined #ruby
dgutierrez1287 has joined #ruby
bradleyprice has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
rideh has joined #ruby
jsrn has joined #ruby
kadoppe has quit [Ping timeout: 244 seconds]
gambl0re has quit [Remote host closed the connection]
<arup_r> Neon, why are you addressing yourself `Neon, use Notifier#process.` ? :p
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Neon> arup_r, because I just figured out the answer to my question.
<arup_r> lol
bizportal has quit []
conor_ has joined #ruby
dr3w has quit [Ping timeout: 244 seconds]
kadoppe has joined #ruby
dgutierrez1287 has quit [Ping timeout: 245 seconds]
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
jds has quit [Quit: Connection closed for inactivity]
axl__ has joined #ruby
jsrn has quit [Ping timeout: 244 seconds]
Muhannad has joined #ruby
Dzejmskrokan has quit []
gambl0re has joined #ruby
<nlsun> just making sure, the OptionParser gem is really referring to tab completion of commands?
youch has quit [Quit: Konversation terminated!]
<adaedra> Neon: how many of you are you? :p
<centrx> nlsun, The shell actually handles tab completion...?
Trynemjoel has quit [Ping timeout: 250 seconds]
nettoweb has joined #ruby
<centrx> nlsun, I thought it was done through scripts in /etc/bash_completion.d for example, but maybe there is some kind of interface the shell can use to interrogate it out of the ruby script
Trynemjoel has joined #ruby
<adaedra> Or just it formats it well enough for shells to parse it
<adaedra> given zsh's shell completion, it's possible
<shadeslayer> what would be a good way to get the elements that are in neither of these arrays : ["C", "A", "B", "C"] , ["C", "A", "B"], FWIW sequence matters
jsrn has joined #ruby
<nlsun> doesn't work with my zsh and mine's pretty powered up
<shadeslayer> so the answer should be C
<centrx> shadeslayer, "elements that are in neither of the arrays" what?
<centrx> >> []
jonee has joined #ruby
<ruboto> centrx # => [] (https://eval.in/413334)
<shadeslayer> not common elements
<shadeslayer> sorry :P
<Mon_Ouie> "C" is in both arrays
<BraddPitt> every elem is in both
<centrx> I think he means something like: (a - b) & (b - a)
<centrx> maybe |
<adaedra> an array xor
<shadeslayer> that adds the two I think
<shadeslayer> ah no, still returns common elements
<centrx> shadeslayer, & is set intersection. | is set union
<shadeslayer> right
tmtwd has quit [Ping timeout: 255 seconds]
<shadeslayer> better example : ["C", "A", "B", "D"] , ["C", "A", "B"], should give me "D"
<BraddPitt> do you mean to say, "get the element that is in neither of these sequences, as modeled by an array"?
<BraddPitt> C-A-B-C is sequence 1, and C-A-B is sequence 2?
mhib has quit [Remote host closed the connection]
<shadeslayer> BraddPitt: see newer example
bradleyprice has quit []
<ashleyhindle> find the difference between arrays?
<ashleyhindle> array_diff?
<BraddPitt> well you said sequence matters, right?
<shadeslayer> yess
<BraddPitt> so its not array similarity
<BraddPitt> its sequence similarity
<shadeslayer> right
Vile` has quit [Ping timeout: 260 seconds]
<BraddPitt> then just iterate over both arrays until you find a non matching entry
hahuang61 has joined #ruby
<centrx> yeah I think it's (a - b) | (b - a)
blackmesa has joined #ruby
user1138 has joined #ruby
<centrx> (a | b) & (a & b)
user1138 has quit [Remote host closed the connection]
user1138 has joined #ruby
Vile` has joined #ruby
niemcu has joined #ruby
<centrx> oh wait, sorry, (a | b) - (a & b)
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeremy04 has quit [Remote host closed the connection]
hinbody has quit [Quit: leaving]
conor_ has quit [Remote host closed the connection]
dr3w has joined #ruby
ap4y has joined #ruby
polpak has quit [Quit: leaving]
Pupeno_ has joined #ruby
duggiefresh has quit []
Pupeno has quit [Read error: Connection reset by peer]
last_staff has quit [Ping timeout: 244 seconds]
pietr0 has quit [Quit: pietr0]
ruby-lang976 has joined #ruby
<ruby-lang976> hi everyone
<bootstrappm> hellooo
<centrx> Welcome to #ruby Sir / Madam
graydot has joined #ruby
<ruby-lang976> its my 1st day here
dwithers has quit [Ping timeout: 252 seconds]
<bootstrappm> welcome
skade has joined #ruby
<centrx> Welcome to IRC noob
<ruby-lang976> i like to advice for ruby
tmtwd has joined #ruby
<ruby-lang976> is anybody can advice me
<centrx> ?ask
<ruboto> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<adaedra> if you ask, you can reply
<ruby-lang976> thanks
<centrx> Question, answer you will receive
<adaedra> s/will/may/
<adaedra> we don't know anything, do we? :p
<adaedra> everything*
<centrx> I know that I know nothing
<ruby-lang976> i like to learn ruby i finished code academy and learn to programming
loincloth has joined #ruby
<adaedra> ok
<centrx> Excellent
<ruby-lang976> now should i move to start ruby on rails or i have to learn more ruby than rails ?
<centrx> Do you feel comfortable with Ruby and would you like to learn how to make web apps?
<ruby-lang976> i am study ruby for a better rails developer
<centrx> Indeed
<adaedra> so your goal is to develop web applications?
<ruby-lang976> yes i feel little comfortable with ruby how its work some times i can solve problem but easy one
<ruby-lang976> yes
Muhannad has quit [Ping timeout: 244 seconds]
<ruby-lang976> as a full stack web developer
<centrx> ruby-lang976, Have you tried Ruby Monk? - https://rubymonk.com/
<Sou|cutter> rails is based on ruby, so if you are learning ruby it will apply to rails. If you only you rails and have a poor understanding of ruby you will have trouble doing anything outside of copy-paste coding
<ruby-lang976> yes i tired i like it
<ruby-lang976> yes i try ruby monk good site
<centrx> ruby-lang976, For Rails, check out http://guides.rubyonrails.org/getting_started.html
<Sou|cutter> err I think the poor grammar rubbed off on me, woops
<centrx> who you calling grammar!?
<ruby-lang976> thats all
dwithers has joined #ruby
<centrx> ruby-lang976, There is a Rails channel at #RubyOnRails as well
<centrx> ?rails
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
yfeldblum has joined #ruby
<ruby-lang976> soem experience people told me better learn more ruby than go to rails
lannonbr has quit [Quit: WeeChat 1.2]
<centrx> ruby-lang976, You should definitely learn Ruby, the question is when you learn Ruby, what is the right time to start learning Rails too?
<ruby-lang976> yes
<ruby-lang976> yes
<centrx> ruby-lang976, See also http://rubykoans.com/
<ruby-lang976> is there any guide line for ruby
<ruby-lang976> i finished http://rubykoans.com/
<ruby-lang976> thus
<ruby-lang976> this
<centrx> Excellent
<ruby-lang976> ok thanks should i admit some online academy or try my self ?which will be best
bmurt has quit []
<centrx> Some of the main docs are excellent for learning: Array, Hash, Object
scripore has joined #ruby
<centrx> ruby-lang976, Depends on what you want. It sounds like you have already done a lot in Ruby, so you don't necessarily need a course
<centrx> ruby-lang976, You may want to build your own app, some kind of utility or game
dwithers has quit [Ping timeout: 246 seconds]
gambl0re has quit [Remote host closed the connection]
rideh has quit [Quit: zap]
<BraddPitt> or try the Hartl rails tutorial to learn Rails
nettoweb has quit [Ping timeout: 246 seconds]
<ruby-lang976> i like to find job after 3 month as junior rails dev
gambl0re has joined #ruby
tubuliferous_ has joined #ruby
<BraddPitt> entirely possible
<BraddPitt> if you work hard
decaff has joined #ruby
devoldmx_ has joined #ruby
A124 has quit [Ping timeout: 260 seconds]
<ruby-lang976> work hard yes i am agree but if you get some guide from experience person so u can be sure
<ruby-lang976> thats why i believe smart and work hard together
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby-lang976> but need some guide line so i can follow that guide line
<BraddPitt> ruby-lang976 try Hartl Rails Tutorial
<ruby-lang976> from some one who know already
A124 has joined #ruby
<ruby-lang976> thats i will
baweaver has quit [Remote host closed the connection]
allcentury has joined #ruby
rbennace_ has quit [Ping timeout: 244 seconds]
<ruby-lang976> is there ay site where i can see full guide line ???
diego2 has joined #ruby
<shevy> ack rails
tubuliferous_ has quit [Ping timeout: 252 seconds]
<BraddPitt> ruby-lang976 https://www.railstutorial.org/
<shevy> learn ruby from #ruby learn rails from #rubyonrails \o/
<BraddPitt> or rather: https://www.railstutorial.org/book
tvw has joined #ruby
diego2 has quit [Client Quit]
<ruby-lang976> thanks
diegoviola has quit [Ping timeout: 260 seconds]
einarj has joined #ruby
ldnunes has quit [Quit: Leaving]
allcentury has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
Muhannad has joined #ruby
arup_r has quit [Ping timeout: 246 seconds]
<davedev2_> /852
<davedev2_> 012.3
safeforge has joined #ruby
<davedev2_> oops sorry guys
nofxx has joined #ruby
axl_ has quit [Quit: axl_]
ralphy has quit [Ping timeout: 246 seconds]
iamjarvo has quit [Quit: Textual IRC Client: www.textualapp.com]
Neon has quit [Quit: Leaving]
niiamon has joined #ruby
dwithers has joined #ruby
<shevy> your secret numbers
<shevy> you gave us your precious!
<centrx> precious
<jhass> it's just five all over again. 8 - 5 + 2 = 5, 1 * (2 + 3) = 5, (5 + 5) / 2 numbers = 5
baweaver has joined #ruby
<adaedra> and 5 - 2 = 3, ruby 3 confirmed
<shevy> jhass hmm is 5 an evil number?
renderful has joined #ruby
gaboesquivel has joined #ruby
<jhass> shevy: All things happen in fives, or are divisible by or are multiples of five, or are somehow directly or indirectly appropriate to 5
<eam> what's the best way to write {}.each_pair when I want sets of pairs (say 10 pairs per loop)
A124 has quit [Ping timeout: 260 seconds]
<jhass> each.each_slice(10) ?
<centrx> each_slice ?
<jhass> or right, it's mixed in directly even
<jhass> each_pair is just an alias for each
Sembei has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
<dfockler> each.each_slice(bread)
<adaedra> >_>
allcentury has joined #ruby
<eam> aha perfect
niiamon has quit [Ping timeout: 256 seconds]
A124 has joined #ruby
benlovell has quit [Ping timeout: 250 seconds]
ofdtrinity has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
jhack has quit [Ping timeout: 260 seconds]
quimrstorres has quit [Ping timeout: 250 seconds]
Pisuke has quit [Ping timeout: 250 seconds]
elmano has quit [Ping timeout: 246 seconds]
einarj has quit [Remote host closed the connection]
einarj has joined #ruby
sarkyniin has quit [Ping timeout: 255 seconds]
blackmesa has quit [Ping timeout: 246 seconds]
mcgain has joined #ruby
<zenspider> eam: or each_cons if you want them overlapping
A124 has quit [Ping timeout: 260 seconds]
<zenspider> (a, b), (b, c), (c, d) ...
<eam> zenspider: that's exactly what I wanted :D
failshell has joined #ruby
A124 has joined #ruby
youch has joined #ruby
<zenspider> that's linearly overlapping
<zenspider> not each combo of N possible
<jhass> zenspider: where does one get one of these crystal balls?
<allcentury> Hi all - how can I avoid using Klass.instance when I have a singleton?
<jhass> or whatever device you use to read minds
<allcentury> but really don't like method_missing
<jhass> allcentury: MyStuff = Stuff.instance
yqt has joined #ruby
<zenspider> jhass: hours upon hours in here :P
<jhass> I wouldn't have guessed each_cons from that question at all
<zenspider> class Klass; I = self.instance; end; ... Klass::I
roolo has joined #ruby
<zenspider> I loves me some each_cons, so I pimp it
<jhass> redundant self detected
<jhass> :P
<adaedra> self.self
einarj has quit [Remote host closed the connection]
<eam> hm actually each_cons appears to repeat entries
<banister> zenspider any cool new projects you'er working on?
dblessing has joined #ruby
failshell has quit [Ping timeout: 255 seconds]
<jhass> eam: yes, that's what zenspider was getting at with "overlapping"
Jackneill has joined #ruby
lxsameer has joined #ruby
s2013 has joined #ruby
blackmesa has joined #ruby
shellie_ has joined #ruby
yqt has quit [Ping timeout: 260 seconds]
leafybasil has joined #ruby
<eam> >> h = {1 => 2, 3=> 4, 5=> 6}; h.keys.map {|k| [k,h[k]]}.each_slice(2) { } # this is exactly what I want
<ruboto> eam # => nil (https://eval.in/413339)
armyriad has quit [Ping timeout: 244 seconds]
<eam> feel like it's way more verbose than necessary
<banister> eam: h.each
<eam> I'm chopping up sets of pairs for forked jobs
<jhass> >> h = {1 => 2, 3=> 4, 5=> 6}.each_slice(2).to_a
omegamike has quit [Remote host closed the connection]
<ruboto> jhass # => [[[1, 2], [3, 4]], [[5, 6]]] (https://eval.in/413340)
Guest42321 is now known as marsjaninzmarsa
<banister> lol nice
<eam> mmmmm
<jhass> note you do can just pass the block, the to_a is demo
paulcsmith___ has quit [Read error: Connection reset by peer]
devoldmx_ has quit [Ping timeout: 264 seconds]
paulcsmith___ has joined #ruby
erts has joined #ruby
<eam> hah, I see, I did {}.each_slice(2) { |k,v| expecting an array of keys/values and that's not at all what it returns
jerius has quit [Quit: /quit]
<eam> (passes, I should say)
ofdtrinity has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 256 seconds]
umgrosscol has quit [Quit: Quit]
<jhass> it returns the same thing as your .map
failshell has joined #ruby
<eam> I mean, the behavior of each_slice() depending on arity
<jhass> imagine hash as [[k, v], [k2, v2], ...] as far as Enumerable is concerned
<eam> I'm not using a constant slice of2
ramfjord has joined #ruby
gard has quit [Ping timeout: 264 seconds]
<jhass> (which I guess you should be using in the first place btw)
ofdtrinity has joined #ruby
devdazed has quit [Ping timeout: 250 seconds]
sarkyniin has joined #ruby
freerobby has quit [Quit: Leaving.]
skade has quit [Ping timeout: 256 seconds]
safeforge has quit [Remote host closed the connection]
skade has joined #ruby
n4524 has joined #ruby
arooni-mobile has joined #ruby
ruby-lang976 has quit [Quit: Page closed]
n4524 has left #ruby [#ruby]
paulcsmith___ has quit [Quit: Be back later ...]
<zenspider> banister: I've been working on a project called "debride" for a little while. Finds potentially dead code
<banister> zenspider using TracePoint
<zenspider> I'm now working on a new project that'll help fix up requires to combat the horribleness that is Bundler.require
<banister> ?
lxsameer has quit [Read error: Connection reset by peer]
<zenspider> nope, just static analysis of the gemfile + code
bdnelson has quit [Quit: Textual IRC Client: www.textualapp.com]
<zenspider> tracepoint is certainly an option to help tho
<banister> zenspider oh so looking at unreachable code vs unused code
<zenspider> just... slow
lxsameer has joined #ruby
<zenspider> that's static analysis too
kirun has quit [Quit: Client exiting]
irctc090 has joined #ruby
<zenspider> debride is just methods declared - methods called - whitelist == dead
<zenspider> + some plugins to process erb and the like to find more methods called
<banister> zenspider cool, is it OSS yet?
Jackneill has quit [Ping timeout: 250 seconds]
Chau has quit [Ping timeout: 246 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> How much mileage do you all tend to get out of sexps for that type of thing?
<baweaver> I keep thinking of using them but never get around to it.
<banister> baweaver sup weaves
<baweaver> yo, how's pry?
<banister> idk :P
<banister> ok i guess
<baweaver> I think we lost cirwin :(
<banister> we lost everyone, real life unfortunately..
<baweaver> went and got himself engaged
<banister> OSS is a youthful thing :P
juanpaucar has joined #ruby
<banister> cool? really?
<baweaver> Yeah, saw it flash by the other day.
changelog has quit [Quit: changelog]
<baweaver> He spends suspiciously less time on IRC now :P
yqt has joined #ruby
maletor has quit [Read error: Connection reset by peer]
<banister> he's probalby on slack :P
whippythellama has quit [Quit: WeeChat 1.2]
spider-mario has quit [Remote host closed the connection]
<baweaver> Really now, where / what slack channels are you all on?
<banister> work i guess
<baweaver> Ah
<baweaver> That'd do it.
<irctc090> hello i posted a issue on stackoverflow, i was hoping someone could help me. I got an answer back but it wasnt waht i was looking for as i am wanting to only use Parse Rest API. http://stackoverflow.com/questions/31851606/updating-a-column-parse-rest-api/31864171#31864171
shpoont has joined #ruby
<baweaver> I can see about getting him out to coffee some time later anyways. We're working on getting SF Ruby back up a bitl.
victortyau has quit [Quit: Leaving]
FernandoBasso has joined #ruby
decoponyo has joined #ruby
DLSteve has joined #ruby
<baweaver> irctc090: You said you can't use parse in that reply
<shadoi> irctc090: from the error you get back it looks like you're simply not finding an object for your request. probably phoneNumber is not a primary key.
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
willywos has quit [Ping timeout: 246 seconds]
<irctc090> but i do have it as a column already.
ishahnaz has joined #ruby
<baweaver> doesn't matter
<baweaver> what's your server expecting?
<shadoi> But you probably can't retrieve records with only that piece of data.
skade has quit [Ping timeout: 246 seconds]
scroff has quit [Remote host closed the connection]
<shadoi> Look that the API docs for the service.
<baweaver> because if it is Rails
scroff has joined #ruby
<baweaver> it's probably object id or something of that kin
<irctc090> i am using it in rails.
<baweaver> docs too
<baweaver> no no
<baweaver> the service you're hitting
WEHATEMIGGERS has joined #ruby
<WEHATEMIGGERS> hi :)
<baweaver> what does it have as the primary key
<baweaver> !ops
<ruboto> fflush, banisterfiend, apeiros, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, sevenseacat, miah, workmad3, drbrain, zenspider, slyphon, Coraline, ljarvis, rubyhacker1, Aria
<baweaver> bye
<WEHATEMIGGERS> why?
scroff has quit [Remote host closed the connection]
<baweaver> banister
texasmade has joined #ruby
<drbrain> !mute WEHATEMIGGERS
<baweaver> danke
WEHATEMIGGERS has left #ruby [#ruby]
<irctc090> i replied that i dont want to use that gem. someone on here told me a couple days ago that the gem is based on the rest api so just use the rest api?
<Radar> Thanks baweaver :)
decoponio has quit [Ping timeout: 272 seconds]
A124 has quit [Ping timeout: 260 seconds]
<shadoi> irctc090: you're not hearing what we're saying. The querying you're sending that service doesn't have enough information, it has nothing to do with what library or API you're using.
armyriad has joined #ruby
<baweaver> Your client is sending "I want the user with the key phoneNumber"
<irctc090> what more information do i need to pass?
<shadoi> read the docs for the API
<banister> baweaver how's sony
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver> the server is likely saying "The heck mate? I need an ID, not that"
A124 has joined #ruby
<baweaver> banister: decent enough
<baweaver> I think cirwin went and told people about my project name
<banister> which one
<baweaver> his boss mentioned something on twitter about sony having a team named badass
<irctc090> so i need to pass the users objectid in the url?
Rickmasta has joined #ruby
<baweaver> bingo
<irctc090> how can i do that?
<baweaver> or better yet, look at the API docs for what it wants to pass
WEHATEMIGGERS has joined #ruby
WEHATEMIGGERS has left #ruby [#ruby]
* baweaver puts away ops flag
axl__ has quit [Ping timeout: 245 seconds]
<banister> baweaver what is badass
<zenspider> what happens with a midge crossbreeds with a chigger? I'd prolly hate those too
<baweaver> BaDASS -> Build and Deployment Automation Support System.
scroff has joined #ruby
scroff has quit [Remote host closed the connection]
<banister> zenspider are you experimenting with any other languages these days? rust? go? etc
<pontiki> :)
<zenspider> racket and its brethren
scroff has joined #ruby
<zenspider> oh! I also released a graphics simulation library... cleverly called... graphics
<banister> zenspider cool, john carmack is tweeting a lot about racket these days
<zenspider> yup yup
<zenspider> ok... off to go get beat up. laters
kies^ has quit [Ping timeout: 244 seconds]
<gambl0re> i dont understand how ruby is able to calculate "a" * 100
skade has joined #ruby
<irctc090> yeah i saw the docs, i probably need the objectid in the url. how can i achieve that?
<gambl0re> that doesnt make sense
<zenspider> what doesn't make sense?
<baweaver> It does
zacstewa_ has quit [Remote host closed the connection]
<zenspider> you're calling "*" on "a" with 100 as the arg
<zenspider> it's just code
<baweaver> * is defined on string to something different than integer
dopamean_ has joined #ruby
<baweaver> it's actually: 'a'.*(100)
sarkyniin has quit [Ping timeout: 244 seconds]
vickleton has quit [Ping timeout: 260 seconds]
<gambl0re> huh???
<zenspider> that doesn't really clarify much, because it's also 1.+(1)
<baweaver> irctc090: probably though data
hahuang61 has quit [Ping timeout: 256 seconds]
<zenspider> ok. really... need to get beat up
<gambl0re> you are multiplying a string and a integer
<baweaver> The method * can be different for different classes
jbw has quit [Ping timeout: 256 seconds]
<gambl0re> different how?
<pontiki> gambl0re: you are sending the message :* to "a" with the argument 100
<irctc090> could you show an example? because i probably cant put @response["objectId"] in the https url
khebbie has quit [Remote host closed the connection]
<eam> why does fork return nil in the child
<pontiki> "a" * 100 --> "a".send(:*, 100)
<gambl0re> >> "a" * 100
<ruboto> gambl0re # => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ...check link for more (https://eval.in/413344)
<eam> why not zero :(
<baweaver> >> [1,2,3] * 3
<ruboto> baweaver # => [1, 2, 3, 1, 2, 3, 1, 2, 3] (https://eval.in/413345)
s00pcan has quit [Read error: Connection reset by peer]
carlosoliveira has quit [Quit: Connection closed for inactivity]
diegoviola has joined #ruby
t_ has quit [Remote host closed the connection]
<workmad3> eam: I think so you can do 'if fork' to detect if you're in the child or not
<baweaver> probably because 0 isn't false in ruby
<eam> I'm getting dangerously close to complaining about zero being true
s00pcan has joined #ruby
<baweaver> and that's some bizarre carryover where it admonishes unix conventions for it
<baweaver> eam: honestly I don't know where I stand on that one
<eam> I won't complain about it, but I'm so close
jbw has joined #ruby
<baweaver> In some cases I want 0 / '' / empty to be false, but I see reasons for both
<adaedra> 0 as true is very practical sometimes.
Guest50 has joined #ruby
<adaedra> Like you can do infinite loops with `while 0`.
<adaedra> :p
<workmad3> eam: yeah... it still catches me out at times too (especially when doing modulo) but I think 0 as falsey opens the door for a whole host of less reasonable falsey values... at which point you end up with JS or PHP </straw-man>
<eam> workmad3: it's true
<eam> and zero-as-true values like "0e0"
riotjone_ has joined #ruby
doertedev has quit [Quit: Lost terminal]
shazaum_ has joined #ruby
arooni-mobile has quit [Ping timeout: 244 seconds]
A124 has quit [Ping timeout: 260 seconds]
<workmad3> I guess it would also remove a lot of the use of `||=` for lazy assignment... too many special cases for that and it becomes pretty worthless
ponga has joined #ruby
A124 has joined #ruby
riotjones has quit [Ping timeout: 246 seconds]
jwaldrip has joined #ruby
roolo has quit [Remote host closed the connection]
zacstewart has joined #ruby
niiamon has joined #ruby
<shadeslayer> centrx: indeed, thanks
v0n has quit [Ping timeout: 246 seconds]
decaff has quit [Quit: Leaving...]
<zenspider> eam: zero is a valid pid on some systems
jhack has joined #ruby
hahuang61 has joined #ruby
shazaum_ has quit [Quit: Leaving]
ragingcake_ has joined #ruby
v0n has joined #ruby
niiamon has quit [Ping timeout: 264 seconds]
sarkyniin has joined #ruby
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gambl0re has quit [Ping timeout: 246 seconds]
bigbadbear has quit [Ping timeout: 256 seconds]
sdrew has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<irctc090> even when i pass the objectid with the url, it says {"code"=>107, "error"=>"invalid JSON"}
<irctc090> but when i do it with curl, in terminal, it works perfect
DLSteve has quit [Quit: Leaving]
<eam> zenspider: you gotta qualify that though - while some systems use pid=0 for special processes, it can never be returned by fork()
<eam> (on posix)
<eam> so yeah kinda, but no not really :)
eggoez has quit [Ping timeout: 256 seconds]
Ox0dea has joined #ruby
safeforge has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Liam` has quit [Ping timeout: 246 seconds]
ragingcake_ has quit [Quit: ragingcake_]
<Ox0dea> ~ $ ps -q 1 -o ppid=
<Ox0dea> 0
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
<Ox0dea> zenspider: Does "some systems" mean most?
dopie has quit [Quit: This computer has gone to sleep]
eggoez has joined #ruby
soviet_jesus has joined #ruby
jackjackdripper1 has joined #ruby
<soviet_jesus> I'm trying to write less crap code and so I started using reek. While it's uncovered a whole mess of problems, one that I've chosen to look at first is it telling me the following code exhibits feature envy.
jackjackdripper has quit [Ping timeout: 244 seconds]
devoldmx_ has joined #ruby
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
irctc090 has quit [Ping timeout: 246 seconds]
Pumukel has quit [Quit: ChatZilla 0.9.91.1 [Firefox 39.0/20150630154324]]
phutchins has joined #ruby
<dfockler> soviet_jesus: might be because you are calling entry all over the place
<Ox0dea> s/calling/referring to/
A124 has quit [Quit: Luke's IRC Client v0.94 build 682]
mcgain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhack has quit [Ping timeout: 240 seconds]
<workmad3> ^^ if you're not using entry, you're using drops... nothing in the method requires the use of anything in the object it's a method of (it's envious of the features of other objects)
<soviet_jesus> oooohhhhhh
s00pcan has quit [Read error: Connection reset by peer]
Alayde has quit [Ping timeout: 260 seconds]
<workmad3> soviet_jesus: feature envy is usually taken as a sign that either you've got code that should be in a different class, or that you've got code that could be extracted into a new class
avahey has joined #ruby
jonee has quit [Ping timeout: 264 seconds]
s00pcan has joined #ruby
<soviet_jesus> hmm, another method triggered the utility function smell too. It would appear I've built a class that doesn't really do anything other than get the user input and pass it back to other classes
hj2007 has quit [Quit: This computer has gone to sleep]
youch has quit [Quit: Konversation terminated!]
<dfockler> soviet_jesus: might think about making it a module
axl_ has joined #ruby
apt-get_ has joined #ruby
allcentury has quit [Ping timeout: 265 seconds]
<soviet_jesus> like take the methods that don't depend on their containing objects and make them functions in a module?
<dfockler> if they're related
DoubleMalt has quit [Ping timeout: 250 seconds]
danzilio has quit [Quit: My computer has fallen asleep!]
Liam` has joined #ruby
irctc025 has joined #ruby
saddad has quit [Ping timeout: 246 seconds]
<irctc025> im passing a url like so, HTTParty.put('https://api.parse.com/1/users/#{session[:object_id]}', but im getting this back as an error bad URI(is not URI?): https://api.parse.com/1/users/#{session[:object_id]}
<soviet_jesus> I updated the gist to give a better idea of what I'm trying to do. The files I put up there were the worst offenders according to reek
saddad has joined #ruby
sarkyniin has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
<soviet_jesus> I'm pretty sure I use an idiotic number of instance variables
workmad3 has quit [Ping timeout: 265 seconds]
iamjarvo has joined #ruby
<baweaver> >> a = 'works'; "This #{a}"
<ruboto> baweaver # => "This works" (https://eval.in/413350)
<baweaver> >> a = 'works'; 'This #{a}'
<ruboto> baweaver # => "This \#{a}" (https://eval.in/413351)
phutchins has quit [Ping timeout: 250 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver> Now which one of those are you using up there?
<baweaver> irctc025:
jwaldrip has quit [Quit: Be back later ...]
<irctc025> yes?
<baweaver> read those above
<baweaver> which quotes are you using there?
<pontiki> if the student isn't ready, is there a teacher?
<Ox0dea> Deep.
<Ox0dea> An unprepared student must be her own teacher.
cschneid_ has quit [Remote host closed the connection]
rfi_ is now known as rfi
<soviet_jesus> oh yeah, those quotes and interpolation don't work, right?
failshell has quit [Remote host closed the connection]
rakm_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DoubleMalt has joined #ruby
mordocai` has quit [Remote host closed the connection]
<Ox0dea> soviet_jesus: Single quotes don't invoke interpolation.
<baweaver> I was rather hoping irctc025 would notice that without someone pointing it out.
* baweaver shrugs
<soviet_jesus> sorry, too enthusiastic
<baweaver> it's fine
<shevy> irctc025 use ""
postmodern has joined #ruby
<centrx> >> 'This doesn't work either"
<ruboto> centrx # => /tmp/execpad-173c4895d167/source-173c4895d167:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/413356)
<soviet_jesus> i just got excited because rubocop is always yelling at me for that
<baweaver> Not you too shevy :'(
<Ox0dea> irctc025: Use %Q.
dgutierrez1287 has joined #ruby
<Ox0dea> Or even just %.
jhack has joined #ruby
<baweaver> So many ways to say one thing
<Ox0dea> baweaver: More than 200. :(
<centrx>
<baweaver> It's over 9000
<Ox0dea> This language is ridiculous.
<shevy> omg Percent Syntax
tubuliferous_ has joined #ruby
<centrx> I think you mean Fantabulous
<shevy> >> %\0R\0
<ruboto> shevy # => /tmp/execpad-c6e999b73178/source-c6e999b73178:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/413357)
<Ox0dea> This guy.
<centrx> >> "row " * 3 + "your boat"
<ruboto> centrx # => "row row row your boat" (https://eval.in/413358)
<Ox0dea> Rather disturbingly, literal NULs do in fact work as % delimiters.
<centrx> arithmetic with strings!?!?!?
<baweaver> Ooo, new reading site
<centrx> OMG
<Ox0dea> baweaver: It's great.
pauly_oc has quit [Ping timeout: 246 seconds]
<Ox0dea> >> eval "%\0foo\0" # shevy
<ruboto> Ox0dea # => "foo" (https://eval.in/413359)
<baweaver> I still don't see what's so mystical about math ops being used for strings / arrays / etc
<dfockler> O_o
dgutierrez1287 has quit [Remote host closed the connection]
<pontiki> they aren't math ops
<centrx> baweaver, but can you do long division with strings?
<pontiki> they just look the same
<irctc025> i cant do object_id = session[:object_id] and then in the url do #{object_id}?
<baweaver> pontiki: semantics, I was saying most people see it that way
<centrx> It's what's called an operator, like with telephones
<baweaver> !try
<Ox0dea> >> class String; alias / split end; 'axbxc' / ?x # centrx
<ruboto> Ox0dea # => ["a", "b", "c"] (https://eval.in/413360)
<pontiki> i know, but it's that very substantial difference in the meaning that makes the semantics so important to understand
<baweaver> granted
<Ox0dea> Sensible operator overloading is sensible, but Perl's `x` operator is just goofy.
TomyLobo has quit [Ping timeout: 244 seconds]
allcentury has joined #ruby
<baweaver> sensibilisms for the sensibility god
tubuliferous_ has quit [Ping timeout: 246 seconds]
<pontiki> sense and sensibility and semantics
<baweaver> irctc025: try it out
<irctc025> yeah i did and im getting this: bad URI(is not URI?): https://api.parse.com/1/users/#{object_id}
<baweaver> Did you catch what I said above about single quotes?
<baweaver> because you haven't fixed your code yet if so
csmb has left #ruby ["Leaving..."]
<soviet_jesus> ok so I've got another question: What I'm doing here seems just downright silly, is there a better data structure or way of working with arrays that will accomplish this in a less wretched way? The closest I got was to take something like a 20 line method and break it into several methods, but the number of instance variables exploded
<irctc025> i didnt catch it, so many ppls textsup there.
<baweaver> Watch closely
<baweaver> >> a = 'works'; 'This #{a}'
<ruboto> baweaver # => "This \#{a}" (https://eval.in/413361)
<baweaver> >> a = 'works'; "This #{a}"
<ruboto> baweaver # => "This works" (https://eval.in/413362)
<centrx> soviet_jesus, Looks like you just want a Hash?
<Ox0dea> >> "#\{}" # Watch closely for the teleporting backslash.
<ruboto> Ox0dea # => "\#{}" (https://eval.in/413363)
<centrx> soviet_jesus, header_indices = {}; header_indices[:address] = find_index
<baweaver> cheeky
<baweaver> wait soviet_jesus, what's that header look like?
<baweaver> Post that as a comment to that gist
<baweaver> I bet you you just need to split the thing
<soviet_jesus> header can be variable, I'll post a couple
<baweaver> either that or a good regex
<irctc025> so i need to add qoutes?
<baweaver> double quotes
lxsameer has quit [Quit: Leaving]
<baweaver> irctc025: How much Ruby have you done? You're probably going to want to read through a basics guide.
gaboesquivel has quit [Read error: Connection reset by peer]
<soviet_jesus> updated it
jwaldrip has joined #ruby
jwaldrip has quit [Client Quit]
<baweaver> What do rows look like?
<irctc025> HTTParty.put('https://api.parse.com/1/users/"#{object_id}"' like that?
freerobby has joined #ruby
<baweaver> no
<baweaver> read a basics guide
ishahnaz has quit []
<baweaver> HTTParty.put("https://api.parse.com/1/users/#{object_id}")
<baweaver> So explain to me like I'm 5 what you want to do here soviet_jesus
<pontiki> soviet_jesus: are you parsing a CSV file?
<baweaver> >> 'a,b,c,d,e'.split(',') # Though my instinct is that you need split
<ruboto> baweaver # => ["a", "b", "c", "d", "e"] (https://eval.in/413365)
saddad has quit [Ping timeout: 244 seconds]
decaff has joined #ruby
<pontiki> (or trying to build one)
<baweaver> probably
<soviet_jesus> So I'm given a file from one source or another, and I want to get rid of the columns I don't need, use the name to build a couple new fields, and then it also needs to be split up by when the records get mailed
<baweaver> CSV it is, you win pontiki
<shevy> pontiki knows the old things
<soviet_jesus> pontiki: yeah exactly
jerius has joined #ruby
<pontiki> it wasn't until i looked at his header examples
<soviet_jesus> I wrote the program before using no classes and just a bunch of functions, but it was a gargantuan mess and hard to look at
graydot has quit [Quit: graydot]
charliesome has joined #ruby
<pontiki> soviet_jesus: check out the csv standard library: http://ruby-doc.org/stdlib-2.2.2/libdoc/csv/rdoc/index.html
devoldmx_ has quit [Ping timeout: 245 seconds]
<pontiki> make something else do the work for you
<pontiki> i make shevy do the work for me
einarj has joined #ruby
casadei_ has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
<Ox0dea> > mfw nobody seems to have reimplemented `cat` in LOLCODE
<baweaver> >> ['a,b,c','1,2,3', '4,5,6', '7,8,9'].map { |col| col.split(',') }.transpose.map { |group| [group.first, group[1..-1]] }.to_h
<ruboto> baweaver # => {"a"=>["1", "4", "7"], "b"=>["2", "5", "8"], "c"=>["3", "6", "9"]} (https://eval.in/413366)
<baweaver> hehe
<soviet_jesus> I'm currently only using CSV to iterate over the source file, write to the dest file, and grab the headers...i think...I've spent a lot of time looking at the CSV class and I'm not quite sure what other functionality I'm looking for
irctc025 has quit [Ping timeout: 246 seconds]
<pontiki> if you have the headers, why are you reparsing them with those regexps?
<soviet_jesus> baweaver: that, 1000 times that
<shevy> pontiki \o/
<baweaver> >> ['a,b,c','1,2,3', '4,5,6', '7,8,9'].map { |col| col.split(',') }.transpose.map { |group| [group.first, group[1..-1]] }.to_h.reject { |k,v| k=='a' }.values.transpose.map { |v| v.join(',') }.join("\n")
<ruboto> baweaver # => "2,3\n5,6\n8,9" (https://eval.in/413367)
<Ox0dea> Methinks that didn't go as planned.
<baweaver> though the csv library probably has a nicer way to do that.
<soviet_jesus> 1 moment....
<baweaver> Ox0dea: it did
<Ox0dea> baweaver: You lost 1, 4, and 7?
arooni-mobile has joined #ruby
<baweaver> yeah
<baweaver> reject
<baweaver> on key a
<pontiki> you take the parsed csv file structure and boom you have an array of hashes you can do anything with
<pontiki> stick 'em in a database, sql around with 'em
<Ox0dea> > Have you ever had a dream that you, um, you had, your, you, you could, you’ll do, you, you wants, you, you could do so, you , you’ll do, you could, you, you want, you want them, to do you so much, you could do anything?
<baweaver> cook 'em in a stew
freerobby has quit [Quit: Leaving.]
vF3hNGxc47h5 has joined #ruby
<baweaver> Hm?
<pontiki> nom nom
<baweaver> Not much for youtube at work
<Ox0dea> Well, I provided the transcript above.
countryHick has quit [Quit: Connection closed for inactivity]
<baweaver> running thousands of sync processes to try and break something, so waiting for that to finish.
<baweaver> fair
graydot has joined #ruby
jerius has quit [Quit: /quit]
Lucky__ has joined #ruby
<banister> Ox0dea did you figure out yoru ancestor chain thing yet?
<banister> or at least have a look at remix? :P
<soviet_jesus> pontiki: you've given me much to think about, thank you
<finisherr> Hello folks. I’m trying to instantiate a Net::HTTP object in my class but it’s giving me this error: ./jenkins-config:16:in `initialize': uninitialized constant MCJenkins::CredentialsHandler::NET (NameError
<Ox0dea> banister: remix does appear to cover any use cases I might bump into. :)
<banister> with the slight exception it probably no longer works... (hvaen't checked it tho..)\
<Ox0dea> finisherr: You probably want "Net", not "NET".
<finisherr> haha, facepalm
<finisherr> ok
<finisherr> Thanks
baweaver has quit [Remote host closed the connection]
<soviet_jesus> oh wait, to get the array of hashes do I need to slurp the whole file, or can I still go line by line....also at what point does slurping a CSV become problematic?
vt102 has quit [Remote host closed the connection]
graydot has quit [Client Quit]
Edward__ has joined #ruby
Lucky__ has quit [Ping timeout: 250 seconds]
cyberarm has joined #ruby
<Ox0dea> soviet_jesus: The only real benefit to converting it all at once is succinct code.
tekacs has quit [Ping timeout: 256 seconds]
nateberkopec has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
tvw has quit [Remote host closed the connection]
DarthGandalf has quit [Read error: Connection reset by peer]
DarthGandalf has joined #ruby
NeverDie has joined #ruby
tobyx_ has quit [Remote host closed the connection]
ElderFain has quit [Ping timeout: 256 seconds]
bascht has quit [Ping timeout: 256 seconds]
Olipro has quit [Ping timeout: 256 seconds]
tobyx has joined #ruby
einarj has quit [Remote host closed the connection]
youch has joined #ruby
unsymbol has quit [Ping timeout: 272 seconds]
<Ox0dea> banister: Did you end up watching charliesome's talk?
ribbons has quit [Ping timeout: 256 seconds]
bascht has joined #ruby
<banister> bits and pieces but it doesnt seem you can do very interesting things with frozen core
jobewan has quit [Quit: Leaving]
_ht has quit [Quit: Konversation terminated!]
Olipro has joined #ruby
omegamike has joined #ruby
s00pcan has quit [Read error: Connection reset by peer]
ElderFain has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has quit [Ping timeout: 245 seconds]
<Ox0dea> >> Symbol.all_symbols.grep(/core#/)
<ruboto> Ox0dea # => [:"core#set_method_alias", :"core#set_variable_alias", :"core#undef_method", :"core#define_method", ...check link for more (https://eval.in/413369)
unsymbol has joined #ruby
<Ox0dea> I think some of those are worthy of the term.
<Ox0dea> Sans the superlative, I suppose.
baweaver has joined #ruby
mwlang has joined #ruby
<mwlang> How do I query the Ruby object space for all class objects declared under a module?
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<mwlang> for example if I have module Soap ; end and I have class: Soap::Status; end; I want to query the Soap object and discover Soap::Status class.
tekacs has joined #ruby
<toretore> >> Numeric.constants.select{|k| Numeric.const_get(k).is_a?(Module) }
<ruboto> toretore # => [] (https://eval.in/413370)
<toretore> >> Numeric.constants
<ruboto> toretore # => [] (https://eval.in/413371)
<soviet_jesus> alrighty then, I'm gonna go cry at my monitor till I figure this out... thanks all
<Ox0dea> mwlang: ObjectSpace.each_object(Soap::Status) ought to do.
<toretore> ok anyway you get the point
<soviet_jesus> >> nil.to_i
<ruboto> soviet_jesus # => 0 (https://eval.in/413372)
omegamike has quit [Ping timeout: 265 seconds]
<Ox0dea> >> Object.const_set(Complex.constants(false)[0], 'foo') rescue $! # Wat.
<ruboto> Ox0dea # => #<NameError: wrong constant name compatible> (https://eval.in/413373)
jerius has joined #ruby
Rollabunna has joined #ruby
decaff has quit [Quit: Leaving...]
<soviet_jesus> one last question, other than smashing my face into the docs till I can't read, what's a good way to learn to program better? It seems like practicing is just causing me to produce the same crap code
<baweaver> For Ruby, read others source and get real friendly with Enumerable, Array, Hash, and String
<Coraline> soviet_jesus: I recommend exercism.io
<BraddPitt> soviet_jesus write code, ask for a review, and like baweaver read others (good) source
juanpaucar has quit [Remote host closed the connection]
<mwlang> Ox0dea: doesn’t seem to work: https://gist.github.com/mwlang/3e69c61efa8d63e9e72d
<baweaver> equally important is learning to test code
<mwlang> outputs nothing...
blackmesa has quit [Ping timeout: 240 seconds]
Inside has joined #ruby
Inside has quit [Changing host]
Inside has joined #ruby
<mwlang> soviet_jesus: online tutorials and screencasts yourself into oblivion.
<baweaver> for little weekly tips, look into avdi's Ruby Tapas
Rollabunna has quit [Remote host closed the connection]
<baweaver> Good quick overview of various features
<baweaver> though I think it might be 2-3 a week
<mwlang> watch a screencast, then research what makes the approach they teach work then try to recreate it all blind (without help)
<baweaver> I lose track of everything I read
<baweaver> or watch
lannonbr has joined #ruby
<baweaver> Practical Object Oriented Design in Ruby and Eloquent Ruby are both great books.
sgambino has joined #ruby
<Ox0dea> mwlang: Foobar.constants.select { |c| Class === Foobar.const_get(c) }
serivich has joined #ruby
Tempesta has quit [Read error: Connection timed out]
<baweaver> is_a? Class ?
<soviet_jesus> Alright, so i'm on a somewhat right track. I just hate it when I write ugly code. I'll have to check those books out
<baweaver> safaribooksonline is your friend too
<baweaver> $29/month for unlimited access to anything O'Rielly has touched
<baweaver> including a lot of things from pragmatic programmers, no starch, and manning
<mwlang> Ox0dea: bam! just like that. thanks.
mikecmpbll has quit [Quit: i've nodded off.]
whiteline has joined #ruby
<soviet_jesus> oh, cool...I tend to like those books
<baweaver> Avoid Packet Publishing like the plague
<baweaver> Apress isn't much better
Tempesta has joined #ruby
<baweaver> I tend to find the best are Addison Wesly (sp?) and No Starch, shortly followed by PragProg and O'Reilly
blue_deref has quit [Quit: bbn]
djbkd_ has joined #ruby
<baweaver> Manning is hit or miss, depends on the book
finisherr has quit [Quit: finisherr]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<soviet_jesus> baweaver: sweet, at least I know what I'm doing this weekend now lol
<baweaver> that and asking us here
vF3hNGxc47h5 has quit [Ping timeout: 255 seconds]
<baweaver> really depends on what you want to do with the language though as to where you want to look past that
rehat_ has quit [Remote host closed the connection]
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> soviet_jesus I think we all write ugly code
grotewold has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
erts has quit [Ping timeout: 260 seconds]
<shevy> what may help is to find structure in code, comments that are sensible and helpful, usage examples, ensuring that there are no bugs or at the least no crippling ones
jerius has quit [Quit: /quit]
DoubleMalt has quit [Ping timeout: 255 seconds]
cyberarm has quit [Read error: Connection reset by peer]
<baweaver> I build beautiful code shevy, dam magnificent code
<shevy> to adopt styles that lead to less bugs and better, more readable and/or terser code
<shevy> lol
<yh__> How might I list all of the gems that are directly depended on in my Bundler project?
<shevy> yeah ok but
<shevy> a dam is simple
<shevy> try to fly to the moon with it
djbkd_ has quit [Ping timeout: 260 seconds]
<baweaver> yh__ gemfile.lock
<yh__> bundle list # shows indirect dependencies too, which is not what I want
<shevy> beavers are "ecosystem engineers". I love that word
<yh__> baweaver: not all projects are locked
<yh__> I wish to cover all
existensil has quit [Quit: WeeChat 0.4.2]
scottschecter has joined #ruby
<baweaver> gemspec or gemfile
<baweaver> I would include nondirect if I were you
<baweaver> pretending they don't exist causes many woes.
<yh__> Huh? You don't even know my usecase
<mwlang> argh. Ox0dea your technique does work, but sadly Rails just in time autoload kills my idea dead in it’s tracks — not seeing descending classes until they’re accessed at least once.
<Ox0dea> That sucks.
<baweaver> yh__: I wonder why
existensil has joined #ruby
<yh__> baweaver: and whether it used gemspec or gemfile would depend upon if the gemfile specified gemspec within it
<baweaver> My psychic powers must be on the fritz again
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yh__> psychic powers not necessary, just looking for a solution to the very specific problem posed :+1:
<Ox0dea> mwlang: I'm sure $thing isn't double-dead, but it's bound to be hacky.
<baweaver> not really, but have fun with that.
<yh__> baweaver: to be perfectly honest, I wish bundler just provided a flag to bundle list that enabled this, alas, my
<yh__> oh, nvm.
<mwlang> yeah. it’s not all that important…a handful of objects, I set a self.fingerprint with a unique hash “fingerprint” that allows a Factory object to intelligently decide which Object to instantiate based on keys in a given hash.
soviet_jesus has quit [Quit: Page closed]
<mwlang> what I figured I’d do was wire up a spec that checks all fingerprints defined to ensure that each is definitely unique.
<baweaver> now why bundler doesn't just install a manpage
<baweaver> pesky
decoponyo has quit [Quit: Leaving...]
DoubleMalt has joined #ruby
saddad has joined #ruby
<Ox0dea> mwlang: It seems you want to write a pseudo-integration test where a unit one would suffice.
<baweaver> really though, grep through gemfile or gemspec for it. show and list show everything
scottschecter has quit [Quit: Leaving]
<banister> mwlang you could load them alll in an initializer if u really wanted to
jbw has quit [Ping timeout: 260 seconds]
<banister> i think
<mwlang> Ox0dea: yeah, pretty much…its more a “protect the next programmer from totally shooting himself in the foot” test. :-D
<mwlang> banister: there’s a way to dip into the autoload stuff to see what’s been registered, but not loaded, but I don’t really want to get into any of that.
<baweaver> Unix has no such scruples. It's job, should you choose to use it as such, is to deliver Bullet from Gun to Foot as efficiently as possible.
<mwlang> it would be smarter to just go to a fail fast and loud in production should two objects have the exact same fingerprints.
<mwlang> everything pre-loads in production so it would make more sense to put it there if anywhere than resort to hackery.
MatthewsFace has quit [Remote host closed the connection]
fullofcaffeine has quit [Remote host closed the connection]
<mwlang> I don’t mind getting hacky on a limited basis in specs when the intent can be made clear in a few lines of code and self-contained in the specs.
mistermocha has joined #ruby
<Ox0dea> mwlang: Still, it'd be more sensible to test your algorithm for generating fingerprints, no?
jbw has joined #ruby