<maestrojed>
jhass yo have been very helpful and I don't want to bug. But I am going to try for one more question. My data in Ruby terms is a hash. I am trying to pass this to a shell script and expecting it to be an array. Is that an issue? Do I need to cast this data as an array?
czhang has left #ruby [#ruby]
<zenspider>
I can't actually test it anymore because I don't have a 32 bit build of ruby
w92fjo has quit [Client Quit]
<zenspider>
I should set up a simple vmware slice of freebsd to test wilson on
<jhass>
maestrojed: my shell scripting isn't too good, but afaik there's no equivalent datastructure
<jhass>
so you need to think about what parts of the hash you want and how
<jhass>
then build something with that data that the shell script can interpret
asterite has joined #ruby
bmichelsen has joined #ruby
<maestrojed>
jhass ok, thanks. I think I just found a work around. I want it to be a hash or array so I can count how many items and loop. I see with bash I can count the number of passed arugments. So I am going to do that and move forward. I feel like I am beating my head on a wall
<jhass>
asterite: yeah, except that we couldn't figure out how they intend to do type restrictions + default args
GGMethos has joined #ruby
jimbach has quit [Ping timeout: 244 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
Kricir has joined #ruby
omosoj has joined #ruby
troyready has joined #ruby
<maestrojed>
jhass I can count in ruby and pass two arguments, the collection and the count. OR I can just pass the collection and count the variables in bash. Both are not the solution I wanted. Both seem equally ok/bad. No?
it0a has joined #ruby
sambao21 has joined #ruby
timonv_ has quit [Remote host closed the connection]
<maestrojed>
pipework this is just a small part of this script. So yeah, it have to stick with shell for now
<maestrojed>
I guess it doesn't have to be shell. I could run multiple scripts. Good thought
timonv_ has joined #ruby
<jhass>
maestrojed: it sounded like you only need the count. so again just build ruby array of wanted values, .join(' ') and pass as single arg, then # in bash?
asterite has quit [Quit: Leaving.]
Scripore has joined #ruby
<maestrojed>
jhass I don't need to just count. I need to perform a number of actions for each item. I just won't know how many items.
<maestrojed>
so if I join() in ruby. I would have to explode in bash (or the bash equivalent of explode whatever it is).
it0a has quit [Client Quit]
Ankhers has joined #ruby
it0a has joined #ruby
jcortejoso1 has joined #ruby
mattmcclure has quit [Quit: Connection closed for inactivity]
funburn has joined #ruby
mistermocha has quit [Remote host closed the connection]
<atmosx>
maestrojed: explode... like nitrogen?
apeiros_ has joined #ruby
mloveless has joined #ruby
Xeago has quit [Remote host closed the connection]
mloveless has quit [Remote host closed the connection]
mloveless has joined #ruby
timonv_ has quit [Ping timeout: 244 seconds]
<maestrojed>
atmosx I just mean break apart a string based on a delimiter and store as a array
<atmosx>
ah k
<maestrojed>
atmosx badaBOOM
<jhass>
maestrojed: yes, that was the idea: array=($1); ${#array[@]}
<atmosx>
big bada-boom!
chipotle has quit [Quit: cya]
<maestrojed>
atmosx multipass
<atmosx>
ahahaha lilu > *
<maestrojed>
:)
sklik has joined #ruby
<atmosx>
I think Mila Jovovich in that character was most beautiful women in the world.
<maestrojed>
I understand were you are coming from :)
<maestrojed>
jhass you have been very helpful, thank you!
<jhass>
for item in ${array[@]}; do
<jhass>
that'll iterate over the array, no need to count it even
<maestrojed>
rocking!
<maestrojed>
thanks
apeiros_ has quit [Ping timeout: 245 seconds]
<mostlybadfly>
Is that Ruby?
jenrzzz has joined #ruby
<jhass>
no shellscript
<mostlybadfly>
Oh haha
<mostlybadfly>
I was afraid I missed something :D
<jhass>
maestrojed: no need for the =($1) hack even, just for item in $1; do should work. where $1 is a space separated list
<jhass>
given there are no spaces in the items
<jhass>
note the lack of quotes
chipotle has joined #ruby
nkumari has quit [Remote host closed the connection]
<omosoj>
out of curiosity, why is the convention to use ":" in irc instead of "," when referring to someone?
jcortejoso1 has left #ruby [#ruby]
dstynchula has joined #ruby
<maestrojed>
jhass ok, thanks. I am pouring over this and running tests/examples. Thanks
sambao21 has quit [Quit: Computer has gone to sleep.]
dstynchula is now known as _
_ is now known as needzhalp
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
omosoj: no strong convention afaik, just what most clients autocomplete to
TPBallbag has joined #ruby
needzhalp is now known as sillyquestion1
funburn has quit [Read error: No route to host]
sillyquestion1 has left #ruby [#ruby]
<omosoj>
jhass, i see
<jhass>
I see people doing nick, too
tkuchiki has joined #ruby
<omosoj>
nick?
omosoj is now known as blah
<blah>
oops
blah is now known as omosoj
<jhass>
"nick,"
<pipework>
omosoj: Most clients use a default separator of ': '
<pipework>
I've had many fun ones.
<atmosx>
night all
atmosx has quit [Quit: Lost in trance]
takle has quit [Read error: Connection reset by peer]
funburn has joined #ruby
<volty>
as in the written language: the colons separate reference and content
takle has joined #ruby
<omosoj>
yeah i guess a colon is technically correct, but i think the comma is more personable
hiyosi has joined #ruby
TPBallbag has quit [Ping timeout: 245 seconds]
<volty>
the first ircers were very very polite and conforming ppl :)
tkuchiki has quit [Ping timeout: 255 seconds]
chipotle has quit [Quit: cya]
pa3ce has quit [Ping timeout: 250 seconds]
jimbach has joined #ruby
takle_ has joined #ruby
takle has quit [Ping timeout: 245 seconds]
hiyosi has quit [Ping timeout: 240 seconds]
drawingthesun has joined #ruby
hmsimha_ has quit [Ping timeout: 255 seconds]
byprdct has quit []
jimbach has quit [Remote host closed the connection]
gregoriokusowski has quit [Quit: gregoriokusowski]
<hephaestus_rg>
do i need to reinstall like i did originally?
<hephaestus_rg>
or can i get it from apt-get
<hephaestus_rg>
never mind i found a relevant looking wiki page
byprdct has joined #ruby
spyderman4g63 has joined #ruby
mclee has quit [Ping timeout: 245 seconds]
byprdct has quit [Max SendQ exceeded]
asterite has joined #ruby
mclee has joined #ruby
byprdct has joined #ruby
<sliceberg>
Hi, all. I know this is somewhat irrelevant, feel free to flame. In an effort to please homebrew,
atomical has quit [Client Quit]
asterite has quit [Client Quit]
byprdct has quit [Max SendQ exceeded]
<sliceberg>
I removed Xcodes (and xcode-select, xcodebuild...er).
byprdct has joined #ruby
<jhass>
sliceberg: there's #machomebrew
<hephaestus_rg>
oh ok i figured it out this did it: cd "$(rbenv root)"/plugins/ruby-build && git pull
byprdct has quit [Max SendQ exceeded]
<sliceberg>
jhass: Yeah, I was there earlier. Crickets.
hmsimha_ has joined #ruby
byprdct has joined #ruby
<sliceberg>
jhass: Thank you.
rkalfane has joined #ruby
byprdct has quit [Max SendQ exceeded]
russt has quit [Quit: russt]
byprdct has joined #ruby
spyderman4g63 has quit [Ping timeout: 255 seconds]
byprdct has quit [Max SendQ exceeded]
Channel6 has joined #ruby
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
klmlfl_ has joined #ruby
<zenspider>
sliceberg: what's up?
<jhass>
How about #apple, ##mac, #MacOSX
<zenspider>
removing xcode is a big mistake. esp if you removed xcode-select and friends
byprdct has joined #ruby
<giuseppesolinas>
best android emulator for web design? if it's ot do you know any dedicated channel?
nobitanobi has quit [Remote host closed the connection]
byprdct has quit [Max SendQ exceeded]
<jhass>
giuseppesolinas: /msg alis help
klmlfl has quit [Ping timeout: 255 seconds]
<sliceberg>
yeah, i did, and I'm paying for it
<sliceberg>
lost half a day :(
byprdct has joined #ruby
<zenspider>
sliceberg: that's what time machine is for
<giuseppesolinas>
android
CorySimmons has joined #ruby
<giuseppesolinas>
ops
byprdct has quit [Max SendQ exceeded]
poweratom_ has quit [Quit: Be back later ...]
<zenspider>
restore xcode-select from your local time machine (/Volumes/MobileBackups)
<sliceberg>
zenspider: for sure, just trying to resolve the problem in order to understand it before I resort to time machine
byprdct has joined #ruby
<zenspider>
then run sudo xcode-select --install
<sliceberg>
zenspider: the only problem is, xcode-select wasn't working before I destroyed it
byprdct has quit [Max SendQ exceeded]
bricker`work has quit [Ping timeout: 264 seconds]
byprdct has joined #ruby
cloaked1 has quit [Quit: leaving]
byprdct has quit [Max SendQ exceeded]
fooquux has joined #ruby
it0a has quit [Quit: WeeChat 1.0.1]
fooquux has left #ruby [#ruby]
anaeem1 has joined #ruby
<zenspider>
"wasn't working" == no information
it0a has joined #ruby
byprdct has joined #ruby
Avahey has joined #ruby
byprdct has quit [Max SendQ exceeded]
<sliceberg>
OK, OK.
<sliceberg>
zenspider: sry
nobitanobi has joined #ruby
byprdct has joined #ruby
<sliceberg>
zenspider: I was just trying to give you a summary.
jaequery has joined #ruby
dc_ has quit [Remote host closed the connection]
fooquux has joined #ruby
byprdct has quit [Max SendQ exceeded]
<sliceberg>
zenspider: when xcode-select --install was called, I would get the options prompt instead
byprdct has joined #ruby
fooquux has quit [Client Quit]
<zenspider>
what OS are you on?
byprdct has quit [Max SendQ exceeded]
<sliceberg>
OSX 10.9.5
apeiros_ has joined #ruby
byprdct has joined #ruby
nobitanobi has quit [Client Quit]
<zenspider>
what xcode did you have?
byprdct has quit [Max SendQ exceeded]
<sliceberg>
Had 4.1
procat has joined #ruby
<sliceberg>
:/
<sliceberg>
I nvr use Xcode, obviously.
<zenspider>
apeiros: can you ban byprdct until they fix their network/clien?
<zenspider>
t
anaeem1 has quit [Ping timeout: 265 seconds]
byprdct has joined #ruby
thsig has quit [Remote host closed the connection]
<zenspider>
10.9 comes with xcode-select afaik, so it should have worked
byprdct has quit [Max SendQ exceeded]
<zenspider>
I think you're gonna have to install xcode anew. then run `sudo xcode-select --install`
<zenspider>
then you can delete the xcode app
<zenspider>
I don't know of another way to repair
<zenspider>
without using something like pacifier maybe
byprdct has joined #ruby
anaeem1 has joined #ruby
byprdct has quit [Max SendQ exceeded]
mikepack has quit [Remote host closed the connection]
byprdct has joined #ruby
<sliceberg>
zenspider: Thank you for your help.
apeiros_ has quit [Ping timeout: 240 seconds]
byprdct has quit [Max SendQ exceeded]
thsig_ has joined #ruby
<zenspider>
n/p
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
gsd_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
byprdct has quit [Max SendQ exceeded]
anaeem1_ has joined #ruby
anaeem1 has quit [Ping timeout: 240 seconds]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
havenwood has joined #ruby
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
smartshaila has joined #ruby
byprdct has joined #ruby
<smartshaila>
Is this the right channel for Rails-specific questions, or is there a better one to ask in?
kobain has joined #ruby
<jhass>
smartshaila: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ help
<smartshaila>
jhass: Thanks much!
byprdct has quit [Max SendQ exceeded]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
agjacome has quit [Quit: leaving]
kobain has quit [Max SendQ exceeded]
deject3d_ has joined #ruby
byprdct has joined #ruby
mary5030 has quit [Remote host closed the connection]
kobain has joined #ruby
anaeem1_ has quit [Ping timeout: 240 seconds]
byprdct has quit [Max SendQ exceeded]
kobain has quit [Max SendQ exceeded]
smartshaila has left #ruby [#ruby]
byprdct has joined #ruby
sliceberg has quit [Quit: Lost terminal]
gregf__ has quit [Ping timeout: 250 seconds]
byprdct has quit [Max SendQ exceeded]
Nogbit has quit [Ping timeout: 264 seconds]
byprdct has joined #ruby
gregf_ has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
Lingos has joined #ruby
byprdct has quit [Max SendQ exceeded]
rudisimo has quit [Remote host closed the connection]
byprdct has joined #ruby
rudisimo has joined #ruby
mistermocha has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
<hephaestus_rg>
is there a verbose mode for rbenv install? it seems like it's taking an awfully long time
deric_skibotn has quit [Ping timeout: 250 seconds]
kobain has joined #ruby
byprdct has joined #ruby
vinleod has joined #ruby
silkfox has joined #ruby
byprdct has quit [Max SendQ exceeded]
anaeem1 has joined #ruby
byprdct has joined #ruby
Lingos has quit [Ping timeout: 244 seconds]
byprdct has quit [Max SendQ exceeded]
wjimenez_ has quit [Remote host closed the connection]
byprdct has joined #ruby
wjimenez5271 has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
byprdct has quit [Max SendQ exceeded]
maestrojed has joined #ruby
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
chipotle has joined #ruby
tlarevo has quit [Remote host closed the connection]
anaeem1 has quit [Ping timeout: 258 seconds]
tkuchiki has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
wjimenez5271 has quit [Ping timeout: 240 seconds]
byprdct has joined #ruby
St1gma has quit [Read error: Connection reset by peer]
byprdct has quit [Max SendQ exceeded]
St1gma has joined #ruby
byprdct has joined #ruby
siso has quit [Read error: Connection reset by peer]
byprdct has quit [Max SendQ exceeded]
nyanz has joined #ruby
cleopatra has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
timonv_ has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
<havenwood>
Friday! \o/
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
Nogbit has joined #ruby
byprdct has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
anaeem1 has joined #ruby
benzrf is now known as benzrf|offline
byprdct has quit [Max SendQ exceeded]
mikecmpbll has joined #ruby
byprdct has joined #ruby
<weeb1e>
Why on earth is Process::Status.new undefined?
mikecmpbll has quit [Client Quit]
<weeb1e>
How are you supposed to create a Process::Status instance for custom implementations?
byprdct has quit [Max SendQ exceeded]
<weeb1e>
I'm going to have to reimplement the important parts of Process::Status from scratch now :(
byprdct has joined #ruby
mikecmpbll has joined #ruby
timonv_ has quit [Ping timeout: 264 seconds]
byprdct has quit [Max SendQ exceeded]
mikecmpbll has quit [Client Quit]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
mikecmpbll has joined #ruby
nateberkopec has joined #ruby
mikecmpbll has quit [Client Quit]
anaeem1 has quit [Ping timeout: 265 seconds]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
mikecmpbll has joined #ruby
<weeb1e>
Not exactly a huge amount of work, but I'm still interested in the logic behind removing the ability to create Process::Status instances, it goes against everything ruby
byprdct has joined #ruby
mikecmpbll has quit [Client Quit]
<eam>
well not against everything
rshetty has joined #ruby
byprdct has quit [Max SendQ exceeded]
mikecmpbll has joined #ruby
byprdct has joined #ruby
mikecmpbll has quit [Client Quit]
<weeb1e>
Ruby is all about being open and not limiting you, which is why I was surprised to come across this, albeit small, limitation
<eam>
7% of ruby classes don't let you instantiate
byprdct has joined #ruby
optiz0r has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
kumarat9pm has joined #ruby
<weeb1e>
Interesting
ixti has quit [Ping timeout: 244 seconds]
rshetty has quit [Remote host closed the connection]
<weeb1e>
Not sure what the logic is behind that though
byprdct has quit [Max SendQ exceeded]
<weeb1e>
Certain classes may have no use case ever, but Process::Status could have plenty of use cases
byprdct has joined #ruby
charliesome has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
sarmiena_ has quit [Quit: sarmiena_]
klmlfl_ has quit [Remote host closed the connection]
hamakn has quit [Remote host closed the connection]
<eam>
I agree, doesn't seem reasonable
maletor has joined #ruby
acmehandle has joined #ruby
byprdct has quit [Max SendQ exceeded]
hamakn has joined #ruby
<acmehandle>
Have a question about sass anyone here?
<eam>
$? is essentially a fancy bunch of stuff around an integer
hamakn has quit [Read error: Connection reset by peer]
byprdct has joined #ruby
<weeb1e>
Exactly
<weeb1e>
Well, 2 integers, the pid and exit code
hamakn has joined #ruby
chipotle has quit [Ping timeout: 264 seconds]
byprdct has quit [Max SendQ exceeded]
<weeb1e>
I just spent hours learning a bunch of WinAPI stuff so that I could implement reliable event based process management with FFI
<weeb1e>
I expected to just be able to wrap the exit code in Process::Status.new
byprdct has joined #ruby
<acmehandle>
When I run sass myfile.scss which has @import '3rdparty' in it will the output file have both files in it completely? Or is it only supposed to have @import '3rdparty' and my code
nonks has joined #ruby
arup_r has joined #ruby
anaeem1 has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
crazydiamond has quit [Ping timeout: 255 seconds]
dh64 has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
anaeem1 has quit [Ping timeout: 240 seconds]
renderful has joined #ruby
byprdct has quit [Max SendQ exceeded]
top4o has joined #ruby
byprdct has joined #ruby
freerobby has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
dkb20k has joined #ruby
tus has joined #ruby
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
renderful has quit [Ping timeout: 240 seconds]
byprdct has quit [Max SendQ exceeded]
charliesome has quit [Read error: Connection reset by peer]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
thsig_ has quit [Remote host closed the connection]
byprdct has joined #ruby
arescorpio has joined #ruby
byprdct has quit [Max SendQ exceeded]
CorySimmons has quit [Quit: Bye!]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
anaeem1_ has joined #ruby
jlast has quit [Remote host closed the connection]
byprdct has joined #ruby
anaeem1_ has quit [Read error: Connection reset by peer]
jlast has joined #ruby
byprdct has quit [Max SendQ exceeded]
anaeem1 has joined #ruby
wjimenez5271 has joined #ruby
byprdct has joined #ruby
tyll has quit [Ping timeout: 264 seconds]
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
mikepack has joined #ruby
top4o has quit [Ping timeout: 240 seconds]
tyll has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
jlast has quit [Ping timeout: 250 seconds]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
takle_ has quit [Remote host closed the connection]
byprdct has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
byprdct has quit [Max SendQ exceeded]
takle has joined #ruby
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
thsig has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
thsig has joined #ruby
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
mary5030 has joined #ruby
peteyg has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
byprdct has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<peteyg>
Is there a way to monkey patch a function so that it will automatically invoke another function prior to itself?
byprdct has quit [Max SendQ exceeded]
<peteyg>
Basically for debugging purposes, I want to count how many times a function is called, so I want it to trigger another function which simply adds to a global counter
byprdct has joined #ruby
procat has quit [Ping timeout: 250 seconds]
byprdct has quit [Max SendQ exceeded]
thsig_ has quit [Ping timeout: 256 seconds]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
larissa has quit [Quit: Leaving]
Scripore has quit [Ping timeout: 245 seconds]
byprdct has joined #ruby
larissa has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
chipotle has joined #ruby
byprdct has quit [Max SendQ exceeded]
Mars` has quit [Ping timeout: 265 seconds]
byprdct has joined #ruby
Scripore has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
iamjarvo has joined #ruby
Gadgetoid has quit [Ping timeout: 245 seconds]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
leslie has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
byprdct has quit [Client Quit]
byprdct has joined #ruby
xenomorph is now known as {xenomorph}
spyderman4g63 has joined #ruby
tus has quit []
Lingos has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
arup_r has quit [Quit: Leaving.]
byprdct has quit [Max SendQ exceeded]
Spami has joined #ruby
byprdct has joined #ruby
arup_r has joined #ruby
{xenomorph} is now known as xenomorph
wjimenez5271 has quit []
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
Gadgetoid has joined #ruby
blizzy has joined #ruby
timonv_ has joined #ruby
byprdct has joined #ruby
byprdct has quit [Client Quit]
Lingos has quit [Ping timeout: 264 seconds]
spyderman4g63 has quit [Ping timeout: 272 seconds]
iteratorP has joined #ruby
MrDoctor has quit [Remote host closed the connection]
MrDoctor has joined #ruby
MrDoctor has quit [Changing host]
MrDoctor has joined #ruby
timonv_ has quit [Ping timeout: 255 seconds]
ruber has joined #ruby
troyready has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
hiyosi has quit [Ping timeout: 264 seconds]
VanillaGoat_ has quit [Quit: Leaving]
fabrice31 has quit [Ping timeout: 272 seconds]
<shevy>
agent_white wanna learn Ruby-C with me?
<agent_white>
YeS
<shevy>
\o/
moritzs has joined #ruby
usrj has quit [Ping timeout: 255 seconds]
<shevy>
I shall somehow prepare this ... perhaps something similar to how chris pine structured his learn to program tutorial
<shevy>
agent_white in C, globals such as $foo in ruby as declared via the "extern" statement
jlast has quit [Ping timeout: 250 seconds]
<zenspider>
hrm?
<zenspider>
shevy: what are you up to?
<agent_white>
zenspider: TUCK YER SHIRT IN. shevy is teaching!
nonks has quit [Ping timeout: 250 seconds]
DLSteve has joined #ruby
<zenspider>
sir, yes sir
deject3d_ has joined #ruby
<zenspider>
you two aware of the book "ruby under a microscope"?
arup_r has joined #ruby
arup_r has quit [Remote host closed the connection]
jheg has quit [Quit: jheg]
<shevy>
zenspider well, I am using ruby quite happily since a long time, but C is significantly harder and I often gave up in the past. This time I set out to learn it properly, including commenting stuff (and as I asked for other newcomers, obviously I am scared of boring myself again just like in the past and giving up again, so I need good motivating cheering folks like agent_white)
<shevy>
\o/
deject3d_ has quit [Ping timeout: 245 seconds]
<shevy>
I haven't heard of ruby under a microscope yet
<DLSteve>
shevy, C is harder to learn as it will happily allow you to shoot yourself in the foot. On the other hand it is extremely powerful.
deject3d_ has joined #ruby
<agent_white>
Is there a way to auto-trim LONG ASS arrays in pry? Like... if I have 500 elements, any way to split it so they start taking up horizontal space in the terminal?
rainfyre has joined #ruby
<agent_white>
I dream of learning C. But refuse to let myself until I am OK at ruby.
<mozzarella>
puts it?
spyderman4g63 has joined #ruby
<mozzarella>
or maybe you can pipe it through less
rippa has joined #ruby
aob has joined #ruby
<wasamasa>
agent_white: I thought pry would autopage it
<agent_white>
Didn't for me :/
moritzs has quit [Ping timeout: 256 seconds]
<wasamasa>
then it's not huge enough :P
<aob>
Hi, I want to write a method that checks if a symlink goes where I expect; what's the best way to catch the Errno::ENOENT in the case that the symlink doesn't exist? I really just want to return true or false
oleo__ has quit [Quit: Verlassend]
spyderman4g63 has quit [Ping timeout: 240 seconds]
corehook has joined #ruby
oleo has joined #ruby
deject3d_ has quit [Ping timeout: 255 seconds]
<aob>
is it as simple as wrapping in begin, rescue, else, end?
deject3d_ has joined #ruby
lolmaus has joined #ruby
andrewlio has joined #ruby
moritzs has joined #ruby
kevinxu has joined #ruby
kevinxu is now known as Guest74221
corehook has quit [Ping timeout: 258 seconds]
<agent_white>
wasamasa: It is ~2200 entries... I just need to expand my bash_history limits :P
<wasamasa>
agent_white: oh jeez
havenn has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
deject3d_ has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
havenn has joined #ruby
_mikhail_ has joined #ruby
skywrite_ has joined #ruby
timonv_ has joined #ruby
m8 has joined #ruby
_mikhail_ has quit [Quit: Leaving]
havenn has quit [Ping timeout: 250 seconds]
Guest74221 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 264 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
skywrite_ is now known as skywritergr
vieq has quit [Ping timeout: 255 seconds]
TPBallborg has quit []
moritzs has quit [Ping timeout: 250 seconds]
nfk has joined #ruby
yfeldblum has quit [Remote host closed the connection]
iiinzg has joined #ruby
deepy has quit [Ping timeout: 264 seconds]
iinzg has quit [Ping timeout: 250 seconds]
cassianoleal has quit [Ping timeout: 272 seconds]
<zenspider>
agent_white: require 'pp'; pp ary
deepy has joined #ruby
<agent_white>
zenspider: Is there an auto-require for it into pry?
deepy is now known as Guest46722
nonks has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
kevinxu_ has joined #ruby
rshetty has joined #ruby
rshetty has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
luriv has joined #ruby
despai has joined #ruby
rshetty has quit [Ping timeout: 244 seconds]
rshetty has joined #ruby
despai has quit [Client Quit]
apeiros_ has joined #ruby
<apeiros>
agent_white: create a ~/.pryrc and add whatever you want
<agent_white>
oooo hotdog
lxsameer has quit [Read error: Connection reset by peer]
vimer has quit [Quit: leaving]
jlast has joined #ruby
rshetty_ has joined #ruby
max96at is now known as max96at|off
max96at|off is now known as max96at
agent_white is now known as ooboo
ooboo is now known as agent_white
agent_white has quit [Quit: leaving]
rshetty has quit [Ping timeout: 244 seconds]
agent_white has joined #ruby
<banister>
agent_white pry does not page content that is output with puts, it'll page expression output though
lxsameer has joined #ruby
<agent_white>
banister: Ahhhh alrighty
<agent_white>
It wasn't even puts, just the return value
thumpba_ has joined #ruby
<banister>
agent_white the return value should be paged
<agent_white>
Hm
<banister>
agent_white: try this: (1..1000).to_a
<agent_white>
banister: Aye, not paged :/
thumpba_ has quit [Remote host closed the connection]
<banister>
agent_white then your pager isn't working :)
<agent_white>
D:
<agent_white>
/
<agent_white>
:D
<agent_white>
I'll look into it!
<agent_white>
banister: thank ya
ratdaddy has quit [Quit: Connection closed for inactivity]
<banister>
agent_white what is the result of: Pry.config.pager
<MattB2>
Given a hash with numeric values, how would you sum each set of n elements, using the first key from each set to store the resulting value. Specifically, the keys are date-strings in the form 'YYYY-MM-DD', and n is 7. (Assume for the moment that the dates are consecutive...)
Lingos has joined #ruby
<MattB2>
I'm looking at take and reduce, but not seeing a practicle way to combine them!
lemur has quit [Ping timeout: 264 seconds]
DLSteve has joined #ruby
timonv_ has quit [Remote host closed the connection]
dermothaughey has quit [Ping timeout: 256 seconds]
timonv_ has joined #ruby
MrDoctor has joined #ruby
<apeiros>
MattB2: I don't follow. can you make an example? input & output (gist.github.com preferably)
<wald0>
apeiros: i still a bit confused:
<wald0>
Person = Struct.new(:name, :gender, :age) ; fred = Person.new("Fred") ; puts fred.name
<wald0>
this looks to me like an "instance variable"
<apeiros>
you are indeed confused
<apeiros>
nowhere in your code is an instance variable at all
<shevy>
haha
<wald0>
:name == @name ? hum
<apeiros>
fred.name # method call, no ivar
<apeiros>
let me add to your confusion:
<shevy>
wald0 don't let him confuse you
<apeiros>
>> Person = Struct.new("Person", "name", "gender", "age") ; fred = Person.new("Fred") ; puts fred.name
<apeiros>
wald0: a variable can be on the left side of an assignment. an object can't. `"foo" = 1` is not valid ruby. the same way `:foo = 1` is not valid ruby. `@foo = 1` is valid ruby.
<MattB2>
So basically, 7 days of data are reduce to a weeks worth
kasperti_ has joined #ruby
poweratom_ has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
<MattB2>
Using the first date of the set as the ley
<MattB2>
*key
<apeiros>
iterate over it with .each, convert the key to a date. generate the new key from that date and sum it.
agent_white has quit [Quit: gnight]
yfeldblum has quit [Ping timeout: 265 seconds]
spyderman4g63 has quit [Ping timeout: 244 seconds]
<apeiros>
if you use rails, there afaik is a method to get the begin of a week. without rails, you can use Date.commercial.
<MattB2>
Not too bothered about whether they're calendar weeks for the moment, happy to take the first date of the set
<MattB2>
Not quite following your method though... iterate and convert String to Date?
corehook has quit [Ping timeout: 258 seconds]
poweratom_ has quit [Ping timeout: 255 seconds]
<apeiros>
so you can get the calendar week from it
<apeiros>
you need a way to map your current key (individual day) to your new key (calendar week + year)
St1gma has quit [Read error: Connection reset by peer]
St1gma has joined #ruby
havenwood has quit [Ping timeout: 250 seconds]
havenn has quit [Ping timeout: 265 seconds]
rohit has quit [Quit: Leaving]
razieliyo has joined #ruby
toretore has joined #ruby
DLSteve has joined #ruby
<MattB2>
apeiros: Ah, I see what you're saying. Yeah, I was hoping to avoid the conversion to date and back somehow, by just using the 1st, 8th etc date of the set as the key for the subsequent 6, or something like that, by your method is probably better as it aligns to the actual start of the week, and deals with gaps in the set.
<apeiros>
MattB2: are the dates consecutive AND without gaps?
<MattB2>
aperios: I was assuming so for the purpose of the example, and was going to worry about filling in any gaps as a pre-process, but that begins to sound like more overhead than conversion...
<Hanmac>
zenspider: hm for that group_by would be the same
rshetty has joined #ruby
jlast has joined #ruby
<zenspider>
chunk is basically like a streaming partition, right?
<apeiros>
yes
oleo is now known as Guest9188
<zenspider>
so, a high-brow flip-flop
<apeiros>
well, unlike partition, it results in N chunks
<apeiros>
not just 2
<zenspider>
I do like the flip-flop operator, not that I actually use it
Guest9188 has quit [Ping timeout: 272 seconds]
renderful has quit [Ping timeout: 264 seconds]
<MattB2>
Hanmac, I have no idea how that works, but thanks!
thomasfedb has joined #ruby
shredding has joined #ruby
rshetty has quit [Ping timeout: 272 seconds]
charliesome has joined #ruby
<MattB2>
Hanmac: Also, why are the output dates 5 days apart?
<Hanmac>
MattB2: depending on the data you might repacle the chunk with group_by
<Hanmac>
MattB2: yes, as you can see, "2014-10-06" is the first date with the next cweek
<MattB2>
Hanmac: HTF does anyone's brain (and fingers) work that fast? This stuff takes me hours!!!
<shevy>
MattB2 you need to integrate it into your brain
<MattB2>
Gonna go have lunch then play with everything I've learned. Thanks apeiros, zenspider, Hanmac!
<MattB2>
shevy: If I could do that matrix style everything would be so much easier! :)
<MattB2>
Later!
<Hanmac>
shevy recently i had space problems on my harddisk ... then i did "make clean" in some of my folders ... and i got > 5GB more space ;P
codecop has joined #ruby
<shevy>
omg
<shevy>
5 gigs
<apeiros>
MattB2: if you use week + year for conversion, don't forget that civil year != commercial year
<shevy>
what kind of mini hdd do you have?
einarj has joined #ruby
<Hanmac>
shevy: i have big hdds ... i mean i got > 5GB more free space after i did "make clean" in some of my project folders ... (that was some compiled stuff)
mikepack has joined #ruby
oleo__ has quit [Quit: Verlassend]
tlarevo has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
skywritergr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
despai has quit [Quit: This computer has gone to sleep]
oleo has joined #ruby
despai has joined #ruby
MattB2 has quit [Remote host closed the connection]
lxsameer_ has joined #ruby
MattB2 has joined #ruby
tlarevo has quit [Remote host closed the connection]
corehook has quit [Ping timeout: 258 seconds]
thsig has joined #ruby
sameerynho has quit [Ping timeout: 255 seconds]
tlarevo has joined #ruby
sevenseacat has joined #ruby
dkb20k has quit [Remote host closed the connection]
AliRezaTaleghani has quit [Ping timeout: 264 seconds]
dkb20k has joined #ruby
m8 has quit [Ping timeout: 245 seconds]
usrj has joined #ruby
Jackneill has joined #ruby
timonv_ has joined #ruby
dkb20k has quit [Ping timeout: 240 seconds]
lxsameer_ has quit [Ping timeout: 265 seconds]
wigirc has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 250 seconds]
lxsameer has joined #ruby
lxsameer has joined #ruby
thsig_ has joined #ruby
Lingos has quit [Quit: Be back later ...]
thsig has quit [Ping timeout: 256 seconds]
<wald0>
5gb Hanmac ? what you had installed?
<wald0>
mmmh, the tutorial of ruby in tutorialspoint.com looks really nice
<Hanmac>
wald0: did you compile yourself something big like wxWidgets? it seems the meta data stuff and all the samples around are that big when compiled ...
tvw has joined #ruby
nonks has joined #ruby
mrgrieve1 has quit [Remote host closed the connection]
rshetty has joined #ruby
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
fabrice31 has joined #ruby
corehook has joined #ruby
jnylen has quit [Ping timeout: 250 seconds]
benzrf|offline is now known as benzrf
jnylen has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
fabrice31 has quit [Ping timeout: 244 seconds]
timonv_ has quit [Remote host closed the connection]
nonks has joined #ruby
giuseppesolinas has joined #ruby
kumarat9pm has quit [Ping timeout: 272 seconds]
oo_ has quit [Ping timeout: 265 seconds]
godd2 has joined #ruby
wigirc has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
xenomorph is now known as {xenomorph}
{xenomorph} is now known as xenomorph
jlast has joined #ruby
AmBienCeD has quit [Read error: Connection reset by peer]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<godd2>
as long as he's using integers. to_a.reverse will work for any range
<certainty>
given the context downto fits the bill pretty well
<apeiros>
certainty: I agree. with some classes it won't work, though. String e.g.
<apeiros>
ah, d'uh, yeah. downto is best.
<apeiros>
godd2: no need to create potentially large objects for something like that.
<godd2>
yea since to_a.reverse isn't lazily evaluated :(
<apeiros>
it couldn't possibly be lazily evaluated
rohit has joined #ruby
CustosL1men has joined #ruby
nateberkopec has joined #ruby
corehook has quit [Remote host closed the connection]
<otherj>
I like you guys
Takle has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
<apeiros>
I should revise "won't work". it would produce something where (start..end).to_a != (end..start).to_a.reverse
<godd2>
I agree. I wasn't lamenting that it was implemented in a way I disagree with, just that "my solution" was less efficient in terms of object creation.
dkb20k has joined #ruby
Darryl_ has quit [Quit: Connection closed for inactivity]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
giuseppesolinas is now known as Gsolinas
despai has quit [Quit: This computer has gone to sleep]
Gsolinas is now known as giuseppesolinas
otherj has quit [Quit: .]
apeiros_ has quit [Remote host closed the connection]
NoNMaDDeN has quit [Remote host closed the connection]
dkb20k has quit [Ping timeout: 245 seconds]
giuseppesolinas is now known as Gsolinas
rohit has quit [Quit: Leaving]
havenwood has joined #ruby
jimbach_ has quit [Remote host closed the connection]
Takle has joined #ruby
jimbach has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
otherj has joined #ruby
shredding has quit [Quit: shredding]
freerobby has quit [Quit: Leaving.]
zorak8 has joined #ruby
jimbach has quit [Ping timeout: 265 seconds]
zorak8 has quit [Max SendQ exceeded]
nonks has joined #ruby
Sirupsen has joined #ruby
shredding has joined #ruby
NoNMaDDeN has joined #ruby
msgodf has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
procat has quit [Ping timeout: 245 seconds]
zorak8 has joined #ruby
ixti has joined #ruby
thumpba has joined #ruby
yfeldblum has joined #ruby
charliesome has joined #ruby
siwica has joined #ruby
banister has joined #ruby
thumpba has quit [Ping timeout: 255 seconds]
Soda has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
arup_r1 has joined #ruby
ndrei has joined #ruby
arup_r has quit [Ping timeout: 240 seconds]
dermothaughey has joined #ruby
glaksmono has joined #ruby
arup_r1 has quit [Quit: Leaving.]
nateberkopec has quit [Quit: Leaving...]
arup_r has joined #ruby
mathias2 has joined #ruby
jlast has joined #ruby
dermothaughey has quit [Ping timeout: 245 seconds]
mathias2 has quit [Ping timeout: 256 seconds]
gtc has joined #ruby
nateberkopec has joined #ruby
timonv_ has joined #ruby
timonv^ has joined #ruby
charliesome has quit [Quit: zzz]
moritzs has joined #ruby
corehook has joined #ruby
timonv_ has quit [Ping timeout: 244 seconds]
mloveless has joined #ruby
timonv^ has quit [Ping timeout: 258 seconds]
corehook has quit [Ping timeout: 258 seconds]
doodlehaus has quit [Remote host closed the connection]
fabrice31 has joined #ruby
govg has joined #ruby
freerobby has joined #ruby
AlHafoudh has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Ping timeout: 244 seconds]
Fire-Dragon-DoL has joined #ruby
glaksmono has quit [Quit: This computer has gone to sleep]
maestroj_ is now known as maestrojed
dkb20k has joined #ruby
siwica has quit [Ping timeout: 255 seconds]
centrx has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
glaksmono has joined #ruby
pchellovod has quit []
Spami has joined #ruby
kasperti_ has quit []
Gsolinas has quit [Quit: This computer has gone to sleep]
dkb20k has quit [Ping timeout: 245 seconds]
jlast has quit [Ping timeout: 245 seconds]
Gsolinas has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
<shevy>
otherj we love you too!
<shevy>
godd2 let's not talk in such nice words
<shevy>
godd2 let's just say
<shevy>
godd2 your solution STUNK!
<shevy>
btw I have no idea what the topic is
<centrx>
*slow clap*
parzzix has joined #ruby
<shevy>
centrx must have a shevy keyword-trigger on IRC :>
oo_ has joined #ruby
<centrx>
IRC is a scourge on the face of the earth and shevy's feet smell like roses
<shevy>
that so reminds me of PHP
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
Limited RAM: Limited vocabulary
drawingthesun has quit [Ping timeout: 244 seconds]
nonks has joined #ruby
apeiros_ has joined #ruby
blueOxigen has joined #ruby
otherj has quit [Quit: .]
bluOxigen has quit [Ping timeout: 244 seconds]
fedexo has joined #ruby
oo_ has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby
shredding has quit [Read error: Connection reset by peer]
<godd2>
I've got the cologne "Odeur de Shevy's Feet" on preorder.
i8igmac has quit [Ping timeout: 240 seconds]
banister has joined #ruby
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
<shevy>
txdv look what is happening
<shevy>
I am for sale
spyderman4g63 has joined #ruby
pandaant has quit [Quit: Lost terminal]
mloveless has quit [Remote host closed the connection]
pandaant has joined #ruby
corehook has joined #ruby
otherj has joined #ruby
nateberkopec has quit [Quit: Leaving...]
fedexo has quit [Remote host closed the connection]
fedexo has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
shredding has joined #ruby
despai has joined #ruby
apeiros_ has quit [Ping timeout: 250 seconds]
codecop has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
spyderman4g63 has quit [Ping timeout: 255 seconds]
otherj has quit [Quit: .]
Takle has joined #ruby
ptrrr has quit [Quit: ptrrr]
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
despai has quit [Quit: This computer has gone to sleep]
ndrei has joined #ruby
Darryl_ has joined #ruby
glaksmono has quit [Quit: This computer has gone to sleep]
despai has joined #ruby
mathias2 has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
glaksmono has joined #ruby
charlie has quit [Ping timeout: 265 seconds]
glaksmono has quit [Client Quit]
dkphenom has joined #ruby
despai has quit [Client Quit]
mathias2 has quit [Ping timeout: 240 seconds]
moritzs has quit [Ping timeout: 240 seconds]
rshetty has quit [Remote host closed the connection]
Soda has quit [Remote host closed the connection]
slawrence00 has joined #ruby
koderok has joined #ruby
koderok has quit [Client Quit]
zorak8 has quit [Ping timeout: 256 seconds]
iml has joined #ruby
shredding has quit [Quit: shredding]
doodlehaus has joined #ruby
Kricir has joined #ruby
volty has joined #ruby
Jake232 has joined #ruby
Soda has joined #ruby
thsig has joined #ruby
wald0 has quit [Ping timeout: 256 seconds]
ndrei has quit [Ping timeout: 250 seconds]
stef204 has joined #ruby
Guest46722 has quit [Changing host]
Guest46722 has joined #ruby
Guest46722 is now known as deepy
<shevy>
god, you people are so silent on saturdays
<shevy>
I had an interesting remark from #bioinformatics
<shevy>
someone there said that in 2015 it will be time for perl 6
<shevy>
because apparently (???) Larry Wall announced a feature freeze
apeiros_ has joined #ruby
stef204 has quit [Client Quit]
thsig_ has quit [Ping timeout: 245 seconds]
despai has joined #ruby
it0a has joined #ruby
gregoriokusowski has joined #ruby
thumpba has joined #ruby
thumpba has quit [Remote host closed the connection]
cleopatra has joined #ruby
<txdv>
shevy: so?
<txdv>
this is ruby
<godd2>
this is madness
dermothaughey has joined #ruby
Photism has joined #ruby
<rpag_>
shevy, you can use perl6 today, but it's suppose to be slower than perl5
kasperti_ has joined #ruby
<rpag_>
shevy, perl6 just took way too long :)
<volty>
why just perlers do not switch to ruby ?
sevenseacat has quit [Read error: Connection reset by peer]
<rpag_>
volty, they like perl, a lot
<volty>
yes, felt in love with the dinosaur
jlast has joined #ruby
rshetty has joined #ruby
St1gma has quit [Read error: Connection reset by peer]
<shevy>
this is #sparta!!!
<shevy>
volty because they are too old to transition
St1gma has joined #ruby
<shevy>
I learned that in february 2014 at my old workplace
<shevy>
"You will also need Perl 5.8.4 or newer and Storable 2.12 or newer in order to run various configure and build scripts."
<shevy>
so cool
<shevy>
for the future perl
<shevy>
I need legacy perl
thsig has joined #ruby
tvw has quit []
<eam>
shevy: I can give you a few reasons
<eam>
rubygems is really poorly structured
mathias2 has joined #ruby
s00pcan has joined #ruby
<eam>
take a look at the number of file accesses needed to load a gem vs just a ruby module
<eam>
don't even need to consider perl, ruby gem vs ruby module illustrates the problem perfectly
St1gma has quit [Read error: Connection reset by peer]
pchellovod has joined #ruby
thsig_ has joined #ruby
St1gma has joined #ruby
<godd2>
eam when you say ruby module do you mean something from ruby stdlib?
jaffachief has joined #ruby
<certainty>
shevy: wasn't perl6 announced lately. I mean this time for real
<eam>
I mean how require works without the gem add-on stuff
<godd2>
dude I have the solution. Rubygems asset pipeline. Let's do it.
pchellovod has quit [Client Quit]
<shevy>
certainty yeah, I have heard that Larry did so on the mailing list
`brian_bitch has joined #ruby
cleopatra has joined #ruby
`brian_bitch has left #ruby [#ruby]
<shevy>
eam dunno how gem does it but I assume in the end it is all based on require's
apeiros_ has quit [Ping timeout: 264 seconds]
<eam>
normal modules are just "look for the file in $:"
<eam>
gem is ... complex
Hobogrammer has joined #ruby
pchellovod has joined #ruby
corehook has joined #ruby
mathias2 has quit [Ping timeout: 244 seconds]
<eam>
and gem gets slower the more gems you have installed
<rpag_>
certainty, perl6 is downloadable and usable today yup
<certainty>
shevy: rpag_: i see
thsig has quit [Ping timeout: 265 seconds]
procat has quit [Ping timeout: 250 seconds]
<shevy>
rpag_ if you have perl5!!!
Axy has joined #ruby
dermothaughey has joined #ruby
<certainty>
not that i'm particularily interested in using it ... but ...
Lingos has joined #ruby
despai has joined #ruby
nateberkopec has joined #ruby
<certainty>
eam: i don't know how the gem load mechanism works internally but i do expect that it's more complex that just loading or require'ing a file. It covers much more complex scenarios
AndChat| has joined #ruby
<certainty>
s/that/than/
<rpag_>
shevy, its not that uncommon, rubinius needs a ruby to bootstrap it too
<shevy>
really?
JaTochNietDan_ has joined #ruby
<certainty>
bootstrap compilers/interpreters are a common thing
it_tard has joined #ruby
ohcibi_ has joined #ruby
Mateon2 has joined #ruby
<shevy>
#!/usr/bin/env ruby
<shevy>
you are right
nerium has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
cnj has quit [Ping timeout: 265 seconds]
JaTochNietDan has quit [Ping timeout: 265 seconds]
nfk has quit [Read error: Connection reset by peer]
Mia has quit [Read error: Connection reset by peer]
maZtah has quit [Ping timeout: 265 seconds]
JaTochNietDan_ is now known as JaTochNietDan
heyimwill has quit [Ping timeout: 265 seconds]
pasties has quit [Ping timeout: 265 seconds]
G has quit [Ping timeout: 265 seconds]
volty has quit [Read error: Connection reset by peer]
<shevy>
their configure file is fake
TDJACR has quit [Max SendQ exceeded]
Nigel_ has joined #ruby
<shevy>
it's a damn ruby file
Mateon1 has quit [Disconnected by services]
ohcibi has quit [Read error: Connection reset by peer]
Mateon2 is now known as Mateon1
cleopatra has quit [Ping timeout: 265 seconds]
maZtah has joined #ruby
TDJACR has joined #ruby
cnj has joined #ruby
corehook has quit [Ping timeout: 258 seconds]
Asher1 has joined #ruby
DarthGandalf has quit [Ping timeout: 265 seconds]
SegFaultAX has quit [Ping timeout: 265 seconds]
pasties has joined #ruby
despai has quit [Client Quit]
heyimwill has joined #ruby
epochwolf has quit [Ping timeout: 265 seconds]
nilurie has quit [Quit: Lost terminal]
SegFaultAX has joined #ruby
phrozen77 has quit [Ping timeout: 265 seconds]
kaplejon_ has quit [Ping timeout: 265 seconds]
ruby-hel1 has joined #ruby
<shevy>
that teaches us that only the source is the real thing
epochwolf has joined #ruby
Seich has quit [Ping timeout: 265 seconds]
blackjid_ has quit [Ping timeout: 265 seconds]
cleopatra has joined #ruby
DarthGandalf has joined #ruby
riceandb1ans has joined #ruby
realeyes has quit [Ping timeout: 255 seconds]
moted has quit [Ping timeout: 265 seconds]
comma8 has quit [Ping timeout: 265 seconds]
troter_ has quit [Ping timeout: 265 seconds]
ballPointPenguin has quit [Ping timeout: 265 seconds]
happyface has quit [Ping timeout: 265 seconds]
p8952_ has joined #ruby
mbwe1 has joined #ruby
dkb20k has joined #ruby
ght2 has joined #ruby
<centrx>
Documentation is for lowly humans or bad code
kwd has quit [Ping timeout: 265 seconds]
casual has quit [Ping timeout: 265 seconds]
bove has quit [Ping timeout: 265 seconds]
<shevy>
most code is pretty bad
phrozen77 has joined #ruby
crome_ has joined #ruby
thoraxe_ has joined #ruby
zoink_ has joined #ruby
ballPointPenguin has joined #ruby
Hightower_ has quit [Ping timeout: 265 seconds]
blackjid_ has joined #ruby
Kricir has joined #ruby
ericwood has joined #ruby
TwinkleHood has joined #ruby
hmsimha_ has joined #ruby
Jamo__ has joined #ruby
realeyes has joined #ruby
luriv has quit [Quit: Leaving]
DefV_ has joined #ruby
okic_ has joined #ruby
rh1n0_away has quit [Ping timeout: 265 seconds]
ggherdov has quit [Ping timeout: 265 seconds]
casual_ has joined #ruby
kaplejon_ has joined #ruby
kwd has joined #ruby
comma8 has joined #ruby
Seich has joined #ruby
troter__ has joined #ruby
iamjarvo has joined #ruby
Hightower_ has joined #ruby
happyface has joined #ruby
papal_ has joined #ruby
zrl has quit [Ping timeout: 265 seconds]
Killerkeksdose_ has joined #ruby
adriancb has joined #ruby
otherj has joined #ruby
<shevy>
most documentation is also pretty bad
s00pcan_ has joined #ruby
<shevy>
some explanations on blogs are pretty good
Karunamon|2 has joined #ruby
bove has joined #ruby
adriancb has quit [Remote host closed the connection]
sindork_ has joined #ruby
VBlizzard has joined #ruby
matchaw_ has joined #ruby
androidbruce_ has joined #ruby
kevinfagan_ has joined #ruby
Gadgetoid has quit [Ping timeout: 245 seconds]
p8952 has quit [Ping timeout: 245 seconds]
androidbruce has quit [Ping timeout: 245 seconds]
kevinfagan has quit [Ping timeout: 245 seconds]
JDHankle has quit [Ping timeout: 245 seconds]
sindork has quit [Ping timeout: 245 seconds]
moshee has quit [Ping timeout: 245 seconds]
Karunamon has quit [Ping timeout: 245 seconds]
ght has quit [Ping timeout: 245 seconds]
ruby-help has quit [Ping timeout: 245 seconds]
it0a has quit [Ping timeout: 245 seconds]
riceandbeans has quit [Ping timeout: 245 seconds]
crome has quit [Ping timeout: 245 seconds]
Haiiro- has quit [Ping timeout: 245 seconds]
Asher has quit [Ping timeout: 245 seconds]
mbwe has quit [Ping timeout: 245 seconds]
oz has quit [Ping timeout: 245 seconds]
zmyrgel has quit [Ping timeout: 245 seconds]
thoraxe has quit [Ping timeout: 245 seconds]
zoink has quit [Ping timeout: 245 seconds]
fandi has quit [Ping timeout: 245 seconds]
radic_ has quit [Ping timeout: 245 seconds]
TwinkleH1od has quit [Ping timeout: 245 seconds]
matchaw has quit [Ping timeout: 245 seconds]
ericwood_ has quit [Ping timeout: 245 seconds]
j416 has quit [Ping timeout: 245 seconds]
segv has quit [Ping timeout: 245 seconds]
DefV has quit [Ping timeout: 245 seconds]
ping-pong has quit [Ping timeout: 245 seconds]
Jamo has quit [Ping timeout: 245 seconds]
gomix has quit [Ping timeout: 245 seconds]
s00pcan has quit [Ping timeout: 245 seconds]
v1n has quit [Ping timeout: 245 seconds]
mgorbach has quit [Ping timeout: 245 seconds]
Gadgetoid has joined #ruby
oz has joined #ruby
timmow has quit [Ping timeout: 245 seconds]
Cat_1 has quit [Ping timeout: 245 seconds]
radic has joined #ruby
toretore has quit [Ping timeout: 245 seconds]
sn0wb1rd has joined #ruby
papal has quit [Ping timeout: 245 seconds]
sn0wb1rd has quit [Ping timeout: 245 seconds]
MissionCritical has quit [Ping timeout: 245 seconds]
okic has quit [Ping timeout: 245 seconds]
Killerkeksdose has quit [Quit: No Ping reply in 180 seconds.]
Karunamon|2 is now known as Karunamon
androidbruce_ is now known as androidbruce
androidbruce has quit [Changing host]
androidbruce has joined #ruby
adriancb has joined #ruby
marienz has quit [Ping timeout: 600 seconds]
toertore has joined #ruby
dkb20k has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
v2n has joined #ruby
Haiiro has joined #ruby
JDHankle has joined #ruby
jimbach has joined #ruby
mgorbach has joined #ruby
yeticry has quit [Ping timeout: 255 seconds]
<shevy>
ohhh
rh1n0 has joined #ruby
<shevy>
#perl has one good think - their bot links to remote stuff
<shevy>
helpa: tutorials
ping-pong has joined #ruby
segv has joined #ruby
<shevy>
:(
it0a has joined #ruby
fandi has joined #ruby
j416 has joined #ruby
timmow has joined #ruby
marienz has joined #ruby
yeticry has joined #ruby
<godd2>
!tutorials
gomix has joined #ruby
Fokki has joined #ruby
KnownSyntax_ has joined #ruby
tiagonobre___ has joined #ruby
ptrrr has joined #ruby
aob_ has joined #ruby
yfeldblum has joined #ruby
speed145a has joined #ruby
ta_ has joined #ruby
Lingos has quit [Quit: Be back later ...]
pchellovod has quit [Ping timeout: 256 seconds]
zmyrgel has joined #ruby
renderful has joined #ruby
claymore has joined #ruby
<ruby-hel1>
Hi, i'm trying to figure out how i can take an output to the screen and be able to use it in an ifstatement.
Su7_ has joined #ruby
<BraddBitt>
input = gets.chomp
rblackwe_ has joined #ruby
crazed_ has joined #ruby
Raboo_ has joined #ruby
im0b__ has joined #ruby
<shevy>
:)
adriancb has quit [Remote host closed the connection]
ndrei_ has joined #ruby
terrellt_ has joined #ruby
ionelmc_ has joined #ruby
jimbach has quit [Ping timeout: 244 seconds]
Mattias___ has joined #ruby
<eam>
certainty: yeah, poorly :)
cicloid has quit [Ping timeout: 265 seconds]
Seich has quit [Ping timeout: 265 seconds]
tiagonobre__ has quit [Ping timeout: 265 seconds]
KnownSyntax has quit [Ping timeout: 265 seconds]
aob has quit [Ping timeout: 265 seconds]
Blizzy has quit [Ping timeout: 265 seconds]
jrhorn425 has quit [Ping timeout: 265 seconds]
lpaste has quit [Ping timeout: 265 seconds]
dnyy has quit [Ping timeout: 265 seconds]
Dwarf has quit [Ping timeout: 265 seconds]
kaplejon_ has quit [Ping timeout: 265 seconds]
Trynemjoel has quit [Ping timeout: 265 seconds]
pusewicz has quit [Ping timeout: 265 seconds]
ionelmc has quit [Ping timeout: 265 seconds]
existensil has quit [Ping timeout: 265 seconds]
crazed has quit [Ping timeout: 265 seconds]
artgoeshere has quit [Ping timeout: 265 seconds]
whoojemaflip has quit [Ping timeout: 265 seconds]
Raboo has quit [Ping timeout: 265 seconds]
finch has quit [Ping timeout: 265 seconds]
cajone has quit [Ping timeout: 265 seconds]
bauruine has quit [Ping timeout: 265 seconds]
im0b_ has quit [Ping timeout: 265 seconds]
dyreshark has quit [Ping timeout: 265 seconds]
Mattias has quit [Ping timeout: 265 seconds]
axisys has quit [Ping timeout: 265 seconds]
musicmatze has quit [Ping timeout: 265 seconds]
hellschreiber has quit [Ping timeout: 265 seconds]
happyface has quit [Ping timeout: 265 seconds]
kwd has quit [Ping timeout: 265 seconds]
casual_ has quit [Ping timeout: 265 seconds]
brendenb has quit [Ping timeout: 265 seconds]
ozialien_ has quit [Ping timeout: 265 seconds]
Su7 has quit [Ping timeout: 265 seconds]
anotherZero has quit [Ping timeout: 265 seconds]
drPoggs has quit [Ping timeout: 265 seconds]
heftig has quit [Ping timeout: 265 seconds]
SpaceKookie has quit [Ping timeout: 265 seconds]
ikanobori has quit [Ping timeout: 265 seconds]
terrellt has quit [Ping timeout: 265 seconds]
vcoinminer______ has quit [Ping timeout: 265 seconds]
electrical has quit [Ping timeout: 265 seconds]
Sp4rKy__ has quit [Ping timeout: 265 seconds]
zzz_Ridley has quit [Ping timeout: 265 seconds]
kyote has quit [Ping timeout: 265 seconds]
george2 has quit [Ping timeout: 265 seconds]
Esya has quit [Ping timeout: 265 seconds]
andrewstewart has quit [Ping timeout: 265 seconds]
ndrei has quit [Ping timeout: 265 seconds]
rblackwe has quit [Ping timeout: 265 seconds]
snapcase has quit [Ping timeout: 265 seconds]
comma8 has quit [Ping timeout: 265 seconds]
maZtah has quit [Ping timeout: 265 seconds]
Sp4rKy_ has joined #ruby
ta has quit [Ping timeout: 265 seconds]
exadeci has quit [Ping timeout: 265 seconds]
disperso has quit [Ping timeout: 265 seconds]
jimeh has quit [Ping timeout: 265 seconds]
pmarreck has quit [Ping timeout: 265 seconds]
amitchellbullard has quit [Ping timeout: 265 seconds]
QKO has quit [Ping timeout: 265 seconds]
ramblinpeck has quit [Ping timeout: 265 seconds]
cn28h has quit [Ping timeout: 265 seconds]
Raboo_ is now known as Raboo
tiagonobre___ is now known as tiagonobre__
genpaku_ has joined #ruby
artgoeshere_ has joined #ruby
Mattias___ is now known as Mattias
gregf has quit [Ping timeout: 265 seconds]
shelling_ has quit [Ping timeout: 265 seconds]
cj has quit [Ping timeout: 265 seconds]
jpinnix____ has quit [Ping timeout: 265 seconds]
Hien has quit [Ping timeout: 265 seconds]
QKO has joined #ruby
kaplejon_ has joined #ruby
whoojemaflip has joined #ruby
maZtah has joined #ruby
Hien has joined #ruby
pmarreck has joined #ruby
casual_ has joined #ruby
kwd has joined #ruby
hellschreiber_ has joined #ruby
kyote has joined #ruby
Esya- has joined #ruby
electrical has joined #ruby
KnownSyntax_ is now known as KnownSyntax
jpinnix____ has joined #ruby
zz_jrhorn424 has joined #ruby
ionelmc_ is now known as ionelmc
cicloid has joined #ruby
andrewstewart has joined #ruby
hephaestus_rg has joined #ruby
ikanobori has joined #ruby
airdeluxe has quit [Quit: Leaving]
shelling_ has joined #ruby
zzz_Ridley has joined #ruby
yfeldblum has quit [Ping timeout: 258 seconds]
amitchellbullard has joined #ruby
Seich has joined #ruby
ramblinpeck_ has joined #ruby
zzz_Ridley is now known as Ridley5
heftig has joined #ruby
Ridley5 has quit [Changing host]
Ridley5 has joined #ruby
dnyy has joined #ruby
cj has joined #ruby
renderful has quit [Ping timeout: 245 seconds]
im0b__ is now known as im0b_
cn28h has joined #ruby
Bish has quit [Ping timeout: 265 seconds]
adriancb has joined #ruby
exadeci has joined #ruby
brendenb has joined #ruby
lpaste has joined #ruby
dyreshark has joined #ruby
kireevco has quit [Quit: Leaving.]
ptrrr has quit [Ping timeout: 240 seconds]
george2 has joined #ruby
SpaceKookie has joined #ruby
suy|BNC has joined #ruby
finch has joined #ruby
max96at is now known as max96at|off
MissionCritical has joined #ruby
slide has quit [Ping timeout: 265 seconds]
Hijiri has quit [Ping timeout: 265 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
genpaku has quit [Ping timeout: 265 seconds]
slide has joined #ruby
drPoggs has joined #ruby
Ludicrou_ has joined #ruby
LudicrousMango has quit [Ping timeout: 265 seconds]
jimeh has joined #ruby
mobiGeek has joined #ruby
existensil has joined #ruby
comma8 has joined #ruby
happyface has joined #ruby
Bish has joined #ruby
ozialien_ has joined #ruby
axisys has joined #ruby
User458764 has quit [Ping timeout: 245 seconds]
ggherdov has joined #ruby
dangerousdave has joined #ruby
zrl has joined #ruby
bauruine has joined #ruby
<ruby-hel1>
BraddBitt: Thanks, ive tried that in the past and havent quite go it to work. can you tell me where im going wrong? When i execute the script it just hangs
<ruby-hel1>
i dont want to give it any keyboard input
<shevy>
then why do you use gets.chomp
<godd2>
because we told him to
<ruby-hel1>
because thats what BraddBitt suggested
<shevy>
BraddBitt did so!
Hijiri has joined #ruby
<shevy>
let's spank BraddBitt!
<ruby-hel1>
lol
<BraddBitt>
wait, I'm sorry, I thought you wanted to use input
<godd2>
ruby-hel1 wants to take the output from curl
<BraddBitt>
i didn't read your question correctly I guess
<shevy>
let's spank both
<BraddBitt>
ohhhh
<BraddBitt>
I see now
tier has joined #ruby
<BraddBitt>
thats a bit more complicated
<BraddBitt>
but possible
<shevy>
ruby-hel1 ok you use ``
<ruby-hel1>
i tried it with cases and couldnt get it to work
<shevy>
ruby-hel1 the result of that command is available in the variable you use there
<shevy>
ip = `curl -sk ifconfig.me`
<shevy>
now you can scan what ip contains
<ruby-hel1>
i read using backticks should display to standard output ?
<shevy>
nono
<shevy>
you use backticks to invoke a system command (through sh)
chrishough has joined #ruby
<ruby-hel1>
ah
<shevy>
this alone will not put anything to stdout, but you can use puts of course
<godd2>
ruby-hel1 no backticks will just run the command to the system. you still need to puts it
mary5030 has joined #ruby
<ruby-hel1>
puts will do that?
<shevy>
yeah
cajone has joined #ruby
<shevy>
you already use it in your script too
<shevy>
puts "not my ip #{input}"
Lingos has quit [Ping timeout: 240 seconds]
shazaum has quit [Quit: Leaving]
<BraddBitt>
puts will "put string" to output
nonks has joined #ruby
Kricir has quit [Remote host closed the connection]
snapcase has joined #ruby
Channel6 has joined #ruby
<ruby-hel1>
so in order to run an ifstatement on the output of the curl command i need to 'puts' it to the screen first?
<ruby-hel1>
i must be wrong there
ptrrr has joined #ruby
livingstn has joined #ruby
josephndenton has joined #ruby
<ruby-hel1>
i dont want to display the output of the ip address before its got to the ifstatement section. From there the ifstatements should decide what happens to the output
<ruby-hel1>
also is there any benfit of using cases over ifstatements in my example ?
<godd2>
ruby-hel1 no the curl command will return some string. puts is just one thing you can do with that string
<jhass>
what the hell
tier has quit [Remote host closed the connection]
<ruby-hel1>
could someone show me a working example please?
doodlehaus has quit []
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
why is your first impulse still not "what the hell why do you shell out to curl"
* jhass
spanks the whole channel
mikepack has joined #ruby
<jhass>
ruby-hel1: you don't shell out to curl. You use open-uri: require 'open-uri'; my_ip = open("http://ifconfig.me", &:read)
mloveless has joined #ruby
decoponyo has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
danshultz has quit [Ping timeout: 255 seconds]
<certainty>
what the hell, why do you shell out to curl?
<certainty>
jhass: see xD
<ruby-hel1>
jhass: thanks for your suggestion, how would you then put logic to the output of the ip address?
<jhass>
certainty: at least!
bmn has quit [Ping timeout: 255 seconds]
<jhass>
ruby-hel1: I would start by defining what logic I need
tommylom1ykins has joined #ruby
bri has quit [Ping timeout: 255 seconds]
preller has quit [Ping timeout: 255 seconds]
drizz has quit [Ping timeout: 255 seconds]
tommylommykins has quit [Ping timeout: 255 seconds]
cherwin has quit [Ping timeout: 255 seconds]
rotor has quit [Ping timeout: 255 seconds]
drizz_ has joined #ruby
drizz_ is now known as drizz
moshee has quit [Ping timeout: 255 seconds]
otherj has quit [Ping timeout: 255 seconds]
MrDoctor has quit [Ping timeout: 255 seconds]
decoponio has quit [Ping timeout: 255 seconds]
mocchi has quit [Ping timeout: 255 seconds]
s51itxsyc has quit [Ping timeout: 255 seconds]
jamooo has quit [Ping timeout: 255 seconds]
cescalante_ has quit [Ping timeout: 255 seconds]
<certainty>
what the hell, why do you have to put logic to the output?
<certainty>
hmm maybe that doesn't always work
thsig_ has quit [Remote host closed the connection]
btcctf_ has joined #ruby
iaj_ has joined #ruby
ltd has quit [Ping timeout: 255 seconds]
ValicekB has quit [Ping timeout: 255 seconds]
zlude has quit [Ping timeout: 255 seconds]
blackjid has quit [Ping timeout: 255 seconds]
rcs has quit [Ping timeout: 255 seconds]
SirFunk has quit [Ping timeout: 255 seconds]
jamo_ has quit [Ping timeout: 255 seconds]
mackintosh has quit [Ping timeout: 255 seconds]
kedare has quit [Ping timeout: 255 seconds]
callumacrae has quit [Ping timeout: 255 seconds]
peeja has quit [Ping timeout: 255 seconds]
Guest77369 has quit [Ping timeout: 255 seconds]
hendricius has quit [Ping timeout: 255 seconds]
btcctf has quit [Ping timeout: 255 seconds]
kke has quit [Ping timeout: 255 seconds]
cn28h has quit [Ping timeout: 255 seconds]
Eiam has quit [Ping timeout: 255 seconds]
iaj has quit [Ping timeout: 255 seconds]
jonathanwallace has quit [Ping timeout: 255 seconds]
mloveless has quit [Ping timeout: 250 seconds]
mikepack has quit [Ping timeout: 250 seconds]
madhatter has joined #ruby
bri has joined #ruby
Jamo has joined #ruby
kke has joined #ruby
<shevy>
what the hell, why is his problem still not solved
<ruby-hel1>
i have an an api that uses curl that will output me the staus of ipsec tunnels. Therefore in order to know whether the tunnel is 'active' or 'down' etc i need to understand how i can put some logic into the output of a curl command.
s51itxsyc has joined #ruby
jamooo has joined #ruby
dangerousdave has joined #ruby
mackintosh has joined #ruby
ltd has joined #ruby
ybit has joined #ruby
* jhass
has a deja-vu
ybit3 has quit [Ping timeout: 255 seconds]
crome_ has quit [Ping timeout: 255 seconds]
hendricius has joined #ruby
<ruby-hel1>
i dont have access to the system from where i am but i can understand the logic of it by using the curl ifconfig.me example
atmosx has quit [Ping timeout: 255 seconds]
Rydekull has quit [Ping timeout: 255 seconds]
dermotha_ has joined #ruby
mocchi has joined #ruby
<jhass>
is that some interview question or something?
Rydekull has joined #ruby
crome has joined #ruby
<shevy>
ruby-hel1 see - you run the command through ``. now you have all the result in that variable
<shevy>
ruby-hel1 go do: puts ip
<certainty>
those sentences could have been generated by a markov chain as well
<shevy>
lol
<jhass>
shevy: I thought we have been through this
otherj has joined #ruby
<jhass>
you don't shell out to curl
peeja has joined #ruby
cescalante has joined #ruby
<certainty>
curl shells out to you
toertore has quit [Ping timeout: 255 seconds]
dermothaughey has quit [Ping timeout: 255 seconds]
bmn has joined #ruby
cn28h has joined #ruby
<shevy>
jhass: it is entirely irrelevant
<wasamasa>
curl shells out through you
<shevy>
if it works it works
rotor has joined #ruby
<jhass>
shevy: perl works too
<certainty>
and if it doesn't, go to lunch
danshultz has joined #ruby
<shevy>
yes go to #perl if you need it then
<cajone>
curl curls round you
<jhass>
shevy: go to #shell if you need it then
<shevy>
jhass: what for?
jonathanwallace has joined #ruby
<jhass>
I ask you? you're the one who wants to shell out
<shevy>
jhass: I don't "want" anything - I am stating that his use case is a perfectly legit one.
genpaku_ is now known as genpaku
<certainty>
ruby-hel1: the general idea is, you try do encode your "logic" in some working ruby code that can deal with the what ever your other end gives you (be it curl or something else)
cherwin has joined #ruby
blackjid has joined #ruby
moshee has joined #ruby
genpaku is now known as genpaku_
havenwood has quit [Remote host closed the connection]
<certainty>
yo do realize that shell is onely one s away from hell?
rcs has joined #ruby
<jhass>
ruby-hel1:
genpaku_ is now known as genpaku__
<jhass>
can you clear up my deja-vu?
toertore has joined #ruby
havenwood has joined #ruby
preller has joined #ruby
gregf has joined #ruby
<jhass>
and ruby is only a g away from rugby
<ruby-hel1>
certainty: ok thanks but isnt that what im doing ?
<godd2>
I'm confused. If the call to curl returns some string, what does it matter?
<certainty>
ruby-hel1: i don't know. i was under the impression that you tried to find out how you can access the information you want from ifconfig.me
<shevy>
godd2 yeah I wonder the same
bluOxigen has quit [Ping timeout: 255 seconds]
Heartbroken has quit [Ping timeout: 255 seconds]
havenwood has quit [Remote host closed the connection]
callumacrae has joined #ruby
atmosx has joined #ruby
<shevy>
ruby-hel1 did you inspect your variable ip yet?
<jhass>
godd2: you spawn a useless process while there's a perfectly fine way to not do that
SirFunk has joined #ruby
<jhass>
your script gets an external dependency on curl while there's a perfectly fine way to avoid that
<ruby-hel1>
it matters because if the tunnel is 'down' i want the output to tell me its down if its deemed as 'up' i dont care if theres a problem then i want to know about it
genpaku__ has quit [Quit: leaving]
<shevy>
ruby-hel1 did you inspect the output of your variable ip yet
ValicekB_ has joined #ruby
<certainty>
and therefor your program won't work on systems that don't have curl installed
codecop has joined #ruby
<certainty>
also you have to deal with how your OS finds executables and where they reside
rshetty has quit [Remote host closed the connection]
<ruby-hel1>
shevy: what do you mean
<ruby-hel1>
?
fabrice31 has joined #ruby
genpaku has joined #ruby
<shevy>
ruby-hel1 you used backticks right?
<shevy>
ruby-hel1 do you know why you used backticks
zlude has joined #ruby
ValicekB_ is now known as ValicekB
kesroesw1yth has joined #ruby
<godd2>
so then as long as his code ever runs in an environment that will run curl correctly, then this is a "perfectly fine way" to do it, no?
<certainty>
and not so long back you might have spawned a bash. depending on your control over the environment that might have been bad :p
econerd4ever has joined #ruby
<apeiros>
godd2: every dependency is fine if the code in question will always only ever run in an env satisfying those dependencies. so all code is "perfectly fine", no?
<godd2>
I would wager that the purpose of this code was to understand something about doing an if statement, not about putting curl calls into production
<shevy>
jhass and certainty want the code to be perfect
<shevy>
so they want to get rid of ``
<godd2>
apeiros the alternative is that no code is ever perfect since it depends on an runtime environment
<certainty>
godd2: well, my experience tells otherwise
<shevy>
but I think getting rid of `` is actually best because ruby-hel1 does not know what `` does
<certainty>
godd2: i've seen code that is even worse in production
<jhass>
godd2: if it's code that should teach you something it only makes it worse, as we've explained it's bad pratice. You shouldn't teach bad pratice
<jhass>
that the main subject is something else doesn't matter
<shevy>
I find it a perfectly valid use case to use ruby as a glue language
<apeiros>
godd2: false dichotomy
xorax_ has joined #ruby
<certainty>
i can't even spell that
<apeiros>
godd2: every dependency increases the burden
psy_ has quit [Remote host closed the connection]
Heartbroken has joined #ruby
<apeiros>
every dependency you can get rid of without increasing complexity is an insta-go.
gmas has joined #ruby
<ruby-hel1>
shevy: to call the curl command no /
<ruby-hel1>
?
fabrice31 has quit [Ping timeout: 245 seconds]
<shevy>
ruby-hel1 yes, but you could use system() too
<ruby-hel1>
right so which one is better.
kesroesweyth has quit [Ping timeout: 255 seconds]
xorax has quit [Ping timeout: 255 seconds]
<shevy>
ruby-hel1 the whole point of using `` is because you get an output into your variable
<shevy>
but in your code you do not make use of that output
psy_ has joined #ruby
hmsimha_ has quit [Ping timeout: 255 seconds]
kedare has joined #ruby
<ruby-hel1>
im aware there are good practices, bad practices, the right way the learning way and way that for the time being just works. im just trying to get this to work based on an ifstatement
dermotha_ has quit [Remote host closed the connection]
<shevy>
ifstatement
mathias2 has joined #ruby
<shevy>
what condition do you want to check?
<shevy>
if input == "1.2.3.4"
<shevy>
whether your string there includes this?
<shevy>
if ip.include? "1.2.3.4"
<ruby-hel1>
i dont have any idea of the politics of what is best practice or not, but from myperspective somethign working is better than not working as it was the wrong way of doing it
poweratom_ has joined #ruby
<jhass>
ruby-hel1: I've seen the exact example with the exact problem statement before. Are you the same person and just didn't make any progress since or is that something that should teach you something
<ruby-hel1>
the ipaddress value i want to check
<shevy>
yes; both ways work.
Fokki_ has joined #ruby
hmsimha_ has joined #ruby
<shevy>
ruby-hel1 ok so as written above: can you tell me what the ip variable will contain precisely?
<jhass>
I guess I'm on his ignore list by now
<ruby-hel1>
1.2.3.4
<rpag_>
IPAddr?
<shevy>
ruby-hel1 ok good, if this is true what you just wrote, then if ip.include? "1.2.3.4" will work
anaeem1 has quit [Ping timeout: 258 seconds]
<shevy>
jhass nah, I think he is just slower than we are
<jhass>
I've asked this like 3 times before
<shevy>
typing speed on IRC
<certainty>
jhass: fair enough from what i can tell we're almost all on his/her for some time now :)
<jhass>
sorry, I shouldn't have implied the message behind it. It's "Go back to a basic ruby tutorial if you don't understand undefined local variable errors in 10 lines of code"
<ruby-hel1>
any good places you would sugest to learn ?
<ruby-hel1>
how did you guys learn ?
twohlix_ has joined #ruby
rockdon_ has joined #ruby
shtirlic_ has joined #ruby
xeno|probs has joined #ruby
tcrypt has joined #ruby
twistedpixels_ has joined #ruby
Nilium_ has joined #ruby
<godd2>
ah then we agree jhass :)
acalewin_ has joined #ruby
frankS2_ has joined #ruby
billy_ran_away_ has joined #ruby
RoryHughes_ has joined #ruby
braincrash has joined #ruby
jaxxstorm_ has joined #ruby
LBRapid_ has joined #ruby
finch_ has joined #ruby
<godd2>
ruby-hel1 I got my first go with lynda.com video tutorials. but I'm a visual learner so its not for everyone.
<jhass>
ruby-hel1: I didn't learn programming with ruby, so I don't have personal experience with the ruby stuff. Some did seem to succeed with the codeacademy stuff. if you have a few bucks to spare I heard good things about chris pine's "Learn to program"
FIGO_ is now known as Platini
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chrishough has joined #ruby
NightMonkey_ is now known as NightMonkey
klmlfl has quit [Remote host closed the connection]
oleo has joined #ruby
ionelmc_ is now known as ionelmc
BLuEGoD is now known as Guest75776
<certainty>
good books do help
skmp_ is now known as skmp
edwardly has joined #ruby
apeiros has joined #ruby
ionelmc is now known as Guest21879
<certainty>
get a copy of SICP
daynaskully has quit [Ping timeout: 255 seconds]
xiq__ has quit [Read error: Connection reset by peer]
<certainty>
then learn any language you want
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<godd2>
ruby-hel1 for books, check out Practical Object-Oriented Design in Ruby, and Metaprogramming Ruby (my choices anyway)
xiq__ has joined #ruby
huddy_ is now known as huddy
LudicrousMango has joined #ruby
<godd2>
and of course, be patient. learning a language doesn't happen overnight or even in a month :)
Fokki_ has quit [Read error: Network is unreachable]
ikanobori has quit [Max SendQ exceeded]
Adran has quit [Max SendQ exceeded]
ixti has quit [Max SendQ exceeded]
vlad_starkov has quit [Ping timeout: 258 seconds]
nopc0de has quit [Ping timeout: 258 seconds]
erichmenge has quit [Ping timeout: 258 seconds]
Fokki_ has joined #ruby
hostess has quit [Max SendQ exceeded]
Ludicrou_ has quit [Ping timeout: 258 seconds]
ruby-hel1 has quit [Ping timeout: 258 seconds]
ruisanto1 has joined #ruby
oleo has quit [Read error: Connection reset by peer]
marcel has quit [Ping timeout: 258 seconds]
ruisantos has quit [Ping timeout: 258 seconds]
jasonmit has quit [Ping timeout: 258 seconds]
Urocyon has quit [Ping timeout: 258 seconds]
jaequery has joined #ruby
<certainty>
scared him away
ruby-help has joined #ruby
Lingos has joined #ruby
ValicekB has quit [Ping timeout: 258 seconds]
ptrrr has quit [Ping timeout: 258 seconds]
Alina-malina has quit [Ping timeout: 258 seconds]
mistergibson has quit [Ping timeout: 258 seconds]
wookiehangover has quit [Ping timeout: 258 seconds]
bhaak has quit [Ping timeout: 258 seconds]
dfedde has quit [Ping timeout: 258 seconds]
olekenneth has quit [Ping timeout: 258 seconds]
JDHankle has quit [Ping timeout: 258 seconds]
kke has quit [Ping timeout: 258 seconds]
cnj has quit [Ping timeout: 258 seconds]
roqo has quit [Ping timeout: 258 seconds]
Meeh has quit [Ping timeout: 258 seconds]
ctrlrsf has quit [Ping timeout: 258 seconds]
headius has quit [Ping timeout: 258 seconds]
Jamo__ has quit [Ping timeout: 258 seconds]
lxsameer has quit [Ping timeout: 258 seconds]
Nowaker has quit [Ping timeout: 258 seconds]
jblancett has quit [Ping timeout: 258 seconds]
audy has quit [Ping timeout: 258 seconds]
Alina-malina has joined #ruby
irk has quit [Ping timeout: 258 seconds]
psyprus has quit [Ping timeout: 258 seconds]
ejnahc has quit [Ping timeout: 258 seconds]
zai has quit [Ping timeout: 258 seconds]
wookiehangover has joined #ruby
Urocyon has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
Nowaker has joined #ruby
nopc0de has joined #ruby
mclee has quit [Ping timeout: 258 seconds]
keelerm has quit [Ping timeout: 258 seconds]
lsmola has quit [Ping timeout: 258 seconds]
mattp_ has quit [Ping timeout: 258 seconds]
headius has joined #ruby
ikanobori has joined #ruby
frankS2_ is now known as frankS2
zai has joined #ruby
Meeh has joined #ruby
ejnahc has joined #ruby
bhaak has joined #ruby
erichmenge has joined #ruby
mloveless has joined #ruby
marcel has joined #ruby
jamo_ has joined #ruby
<ruby-help>
thanks againg forall your help and advice
kke has joined #ruby
ferr has joined #ruby
zai is now known as Guest91706
ruby-help has quit [Client Quit]
elek has joined #ruby
JDHankle has joined #ruby
aob_ has quit [Ping timeout: 258 seconds]
rrva has quit [Ping timeout: 258 seconds]
AlyssaDaemon has quit [Ping timeout: 258 seconds]
dcope has quit [Ping timeout: 258 seconds]
nerdman_ has joined #ruby
qz_ has quit [Ping timeout: 258 seconds]
Sp4rKy_ has quit [Ping timeout: 258 seconds]
Dreamer3 has quit [Ping timeout: 258 seconds]
musl has quit [Ping timeout: 258 seconds]
Afforess has quit [Ping timeout: 258 seconds]
nerdman has quit [Ping timeout: 258 seconds]
qz has joined #ruby
qz has quit [Changing host]
qz has joined #ruby
rrva has joined #ruby
AlyssaDaemon has joined #ruby
bahar has quit [Ping timeout: 258 seconds]
snzmn has quit [Ping timeout: 258 seconds]
Dreamer3 has joined #ruby
aob has joined #ruby
TrafficMan has joined #ruby
Joufflu has joined #ruby
anaeem1_ has quit [Ping timeout: 255 seconds]
Sp4rKy_ has joined #ruby
irk has joined #ruby
snzmn has joined #ruby
ozialien_ has quit [Ping timeout: 258 seconds]
yeticry has quit [Ping timeout: 250 seconds]
aaronrl has quit [Quit: Leaving]
scrogson has quit [Ping timeout: 258 seconds]
aep has quit [Ping timeout: 258 seconds]
Sp4rKy has quit [Ping timeout: 258 seconds]
Lingos has quit [Ping timeout: 255 seconds]
Jello_Raptor has joined #ruby
Sp4rKy has joined #ruby
jxport has quit [Ping timeout: 258 seconds]
iamjarvo has joined #ruby
Seich has joined #ruby
napcae has quit [Ping timeout: 258 seconds]
bahar has joined #ruby
uxp_ has quit [Remote host closed the connection]
kaspergrubbe has quit [Ping timeout: 258 seconds]
Tarential has quit [Ping timeout: 258 seconds]
lxsameer has joined #ruby
musl has joined #ruby
oleo has joined #ruby
sfr^ has joined #ruby
napcae has joined #ruby
uxp has joined #ruby
gregoriokusows-1 has quit [Ping timeout: 258 seconds]
eyckelboom has quit [Ping timeout: 258 seconds]
nonks has joined #ruby
yeticry has joined #ruby
vlad_starkov has joined #ruby
jeregrine_ is now known as jeregrine
graft has quit [Ping timeout: 258 seconds]
rotcetor_ has quit [Ping timeout: 258 seconds]
kaspergrubbe has joined #ruby
lsmola has joined #ruby
eyckelboom has joined #ruby
jblancett has joined #ruby
three18ti has quit [Ping timeout: 258 seconds]
scrogson has joined #ruby
kaspergrubbe is now known as Guest51752
proxie has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
virtualize has quit [Read error: Connection reset by peer]
joast has quit [Ping timeout: 258 seconds]
ta has joined #ruby
gregoriokusowski has joined #ruby
spectre256 has quit [Ping timeout: 258 seconds]
cnj has joined #ruby
graft has joined #ruby
dcope has joined #ruby
Adran has joined #ruby
androidbruce has quit [Ping timeout: 258 seconds]
artm has joined #ruby
aep has joined #ruby
oz has quit [Quit: EOF]
mikepack has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
kasperti_ has joined #ruby
rshetty has joined #ruby
nateberkopec has joined #ruby
ValicekB has joined #ruby
ctrlrsf has joined #ruby
<atmosx>
hm
jayne_ has joined #ruby
sigurding has joined #ruby
iml has quit [Ping timeout: 258 seconds]
ozialien_ has joined #ruby
Gate has quit [Ping timeout: 258 seconds]
doubleemms has quit [Ping timeout: 258 seconds]
AndChat| has quit [Ping timeout: 245 seconds]
dfedde has joined #ruby
Gate has joined #ruby
Gate has quit [Changing host]
Gate has joined #ruby
mistergibson has joined #ruby
androidbruce has joined #ruby
androidbruce has quit [Changing host]
androidbruce has joined #ruby
<shevy>
hey atmosx
olekenneth has joined #ruby
freerobby has joined #ruby
mikepack has quit [Ping timeout: 264 seconds]
rshetty has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby
<atmosx>
shevy: whats up
three18ti has joined #ruby
timonv_ has joined #ruby
Gues_____ has joined #ruby
mary5030 has joined #ruby
Gues_____ has left #ruby [#ruby]
klmlfl has joined #ruby
Takle has quit [Remote host closed the connection]
Guest70769 has quit [Changing host]
Guest70769 has joined #ruby
Guest70769 is now known as daynaskully
Tarential has joined #ruby
drkyro has joined #ruby
drkyro has quit [Client Quit]
ixti has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Trieste has joined #ruby
iml has joined #ruby
jlast_ has joined #ruby
Afforess has joined #ruby
jayne has quit [Ping timeout: 622 seconds]
IotaSpencer has quit [Ping timeout: 258 seconds]
Afforess has quit [Ping timeout: 258 seconds]
timonv_ has quit [Ping timeout: 264 seconds]
shredding has joined #ruby
apeiros_ has joined #ruby
Timgauthier has joined #ruby
jlast has quit [Ping timeout: 258 seconds]
Timgauthier has quit [Client Quit]
Iota-Spencer has joined #ruby
roqo has joined #ruby
Afforess has joined #ruby
thsig has joined #ruby
Channel6 has quit [Quit: Leaving]
psyprus has joined #ruby
jxport has joined #ruby
thsig_ has joined #ruby
anaeem1 has joined #ruby
audy has joined #ruby
apeiros_ has quit [Ping timeout: 255 seconds]
spectre256 has joined #ruby
spyderman4g63 has joined #ruby
ramfjord has joined #ruby
iml has quit []
keelerm has joined #ruby
alem0lar1 has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mathias2 has joined #ruby
thsig has quit [Ping timeout: 245 seconds]
Snowstormer has joined #ruby
bmichelsen has joined #ruby
<MattB2>
Would it be fair to assume that somehash.first[0] is more efficient thatn somehash.keys[0] to get the first key of a hash?
klmlfl has quit [Remote host closed the connection]
Snowstormer is now known as Guest1976
dkb20k has joined #ruby
TDJACR has joined #ruby
<MattB2>
*than
leslie has joined #ruby
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CustosL1men has quit [Remote host closed the connection]
dc_ has quit [Remote host closed the connection]
mathias2 has quit [Ping timeout: 250 seconds]
ramfjord has quit [Ping timeout: 272 seconds]
<jhass>
do you have a bottleneck on that code?
Sammael has joined #ruby
davedev24_ has quit [Read error: Connection reset by peer]
davedev2_ has joined #ruby
jimbach has joined #ruby
dkb20k has quit [Ping timeout: 245 seconds]
dopie has joined #ruby
yfeldblum has joined #ruby
skarn has joined #ruby
HeartbrokenTR is now known as Heartbroken
iml has joined #ruby
jimbach has quit [Ping timeout: 265 seconds]
<godd2>
MattB2 I don't know if assuming it's faster is fair, but after benchmarking it looks like it's about 2x faster
yfeldblum has quit [Ping timeout: 255 seconds]
Nightmare has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
<MattB2>
jhass: no, just wanted to be efficient up-front. .keys[0] reads more clearly, but I assumed is extracting an array of keys, then picking the first, where .first[0] is taking the first entry, then picking the key.
<MattB2>
godd2: thanks!
<jhass>
MattB2: google premature optimization
davedev2_ has quit [Read error: Connection reset by peer]
klmlfl has joined #ruby
sigurding_ has joined #ruby
davedev24_ has joined #ruby
<MattB2>
jhass: I wouldn't exactly call wanting to use clean efficient code premature optimization. :)
klmlfl has quit [Remote host closed the connection]
<jhass>
you have working code. You spend at least half an hour on optimizing it. That's about the definition of it
blackjid_ has joined #ruby
sigurding has quit [Ping timeout: 240 seconds]
sigurding_ is now known as sigurding
DLSteve has joined #ruby
<godd2>
jhass oh so NOW it's okay if code is working :P
<MattB2>
Exactly, so knowing which of these two commonly used operations is more efficient, and using that from now on cost me little to learn, and nothing to implement (ok, one extra key press :)
Takle has joined #ruby
<jhass>
godd2: since you have that benchmark ready, I'd be interested how it compares to .each_key.first
dermothaughey has joined #ruby
freerobby has quit [Quit: Leaving.]
<godd2>
jhass looks like its between the two
dermothaughey has quit [Remote host closed the connection]
<godd2>
disclaimer: these are not scientific results
<jhass>
mmh, .each_key {|k| break k } ? :P
<wasamasa>
guys
<wasamasa>
just use code that's readable, working and conveys the meaning well
<MattB2>
jhass: yeah, I"m gonna use that from now on. <g>
<wasamasa>
if there's any performance problems, add ugly optimization hacks
anaeem1 has quit [Read error: Connection reset by peer]
<jhass>
MattB2: you wanted the fastest one
anaeem1 has joined #ruby
<jhass>
the pretty one IMO is .keys.first
ezrezrz has joined #ruby
<MattB2>
jhass: yes, that reads best.
<godd2>
jhass .each_key {|k| break k } is the fastest
<jhass>
not that I like depending on the order of a hash in the first place
thsig_ has quit [Remote host closed the connection]
<godd2>
its about 30% faster than first[0]
nobitanobi has joined #ruby
<wasamasa>
godd2: scary
<jhass>
it avoids any allocation
klmlfl has joined #ruby
<wasamasa>
let's bribe someone with commit rights to make the fast one slow and the pretty one fast
<godd2>
wasamasa we could probably pay tenderlove in puns
<MattB2>
jhass - order doesn't matter in this case - just need to determine the Class of the key
<jhass>
mmh, no duck typing?
<wasamasa>
godd2: isn't he the guy who made nokogiri?
<wasamasa>
godd2: and did a talk about bad ideas?
<shevy>
atmosx dunno, not much; watching boring lectures, reading through some chemistry crap, and training calculations of all sorts
mikepack has joined #ruby
Hobogrammer has quit [Ping timeout: 240 seconds]
<MattB2>
jhass: I need to convert the keys to another format if they're not what's needed, so just testing somehash.keys.first.is_a? does the job (unless I"m missing a trick)
<atmosx>
shevy: I didn't study jack shit todya. I don't know how am I gonna pass this exam. I'll beg him on my knees or something. There questiosn I can answer but those are not many.
<wasamasa>
godd2: yup
<shevy>
atmosx ah don't worry, just make sure you are absolutely certain that you can answer the questions you can answer
<jhass>
MattB2: for core classes you could unconditionally convert, Array#to_a #=> self, String#to_s #=> self and so on
<shevy>
I speculated often for many exams, for most it worked. for some it did not haha
zorak8 has joined #ruby
yfeldblum has joined #ruby
<atmosx>
shevy: well kinda
<shevy>
get better in these!
<shevy>
then add one more and stop learning until the exam
yfeldblum has quit [Remote host closed the connection]
<shevy>
atmosx how often can you repeat it anyway?
Lingos has joined #ruby
yfeldblum has joined #ruby
<atmosx>
shevy: I can repeat it in 10 days
<atmosx>
shevy: but that's not the issue, the problem is that if I don't pass this I can't prepare for the state exams on 9 or 11/12
<cajone>
I don't get this, 0.class => Fixnum ; puts "Hello 0" if 0 => nil but prints "Hello 0", so why does a Fixnum eval to a boolean => true, is it because 0 is instantiated as a Fixnum object and the if clause is returning the result of an existence test? , and if this is the case would it not reasonable to expected at least a warning like "Fixnum literal in condition" , no ?
<atmosx>
shevy: because if I lose more time studying this thing won't be enough time to study the other 4 ...
<MattB2>
jhass: So what would that look like for: dates = Hash[dates.map { |k, v| [k.strftime, v] }] if dates.keys.first.is_a? Date where dates is an array of Date keys?
<MattB2>
* where dates is a hash with Date keys?
St1gma has quit [Read error: Connection reset by peer]
tlarevo has quit [Remote host closed the connection]
<shevy>
atmosx ah I see why you want it
tlarevo has joined #ruby
St1gma has joined #ruby
<shevy>
atmosx is there no way to assess how much more you'd have to learn or know? as in to reach a certain quota of points to pass?
sigurding has quit [Quit: sigurding]
<jhass>
Date is no core class ;) But since you want string keys you would just always do to_s
<atmosx>
shevy: If I were alone with the prof I'd tell him, but we'll be like 10 ppl.. otherwise If I felt the heat I'd go begging seriously, I don't wanna come back :-(
<atmosx>
shevy: it's oral
<jhass>
and in this case Date#to_s == Date#strftime without arguments
<atmosx>
no points
anaeem1 has quit [Read error: Connection reset by peer]
pablo22 has joined #ruby
<jhass>
so that even does what you want
<atmosx>
shevy: a guy was ditched the other day because (supposedly) he didn't know the difference between dextrin and dextran
<atmosx>
shevy: which is kinda subtle difference...
exenin has joined #ruby
<shevy>
damn
lidaaa has joined #ruby
anaeem1_ has joined #ruby
Lingos has quit [Ping timeout: 264 seconds]
pablo22 has left #ruby [#ruby]
<atmosx>
shevy: but I'm usually better than those guys, I mean I'm pretty good at pharmacology (so I know dextran is used as an anti-thrombotic) but didn't knew that it had α-1,3 glycosidic bonds instead of α-1,4 ... whch is shit if you ask me
<shevy>
atmosx well do you know the difference? :-)
danijoo has quit [Quit: Leaving...]
<atmosx>
dextrin is used as glue, the other one as antithrombotic that's what he wanted to hear probably. Ther'es a different in the number of glucose units too.
kyb3r_ has joined #ruby
nonks has joined #ruby
<shevy>
I would not have known it; the 1,3 vs. 1,4 difference is however is a very comman theme in sugar biology (starch, glykogen, maltose etc..), also alpha vs. beta difference there
<shevy>
aha
<shevy>
that still sounds better than shikimate
<MattB2>
jhass: so they way I did it is the right way to do it? (for some definition if right)
<atmosx>
well yes
<atmosx>
alpha vs beta is easy
danijoo has joined #ruby
<atmosx>
I mean, it's what you expect to get asked
<jhass>
MattB2: it certainly works. It's not duck typing though
duncannz has joined #ruby
<shevy>
atmosx is it possible to start chatting away about a topic and lead him into subjects you know very well?
<atmosx>
innulin vs glucose/fructose/etc
<atmosx>
shevy: I hope it is.
<shevy>
hehe
<atmosx>
shevy: not because he is stupid but becasue I think he will be kinda cool, it's my last fucking subject.
<shevy>
some professors are helpful, some are asses
adriancb has quit [Remote host closed the connection]
<MattB2>
jhass: then I'm obviously not understanding how to apply "Date#to_s == Date#strftime without arguments" to this use case.
<shevy>
atmosx ah you'll do fine! learn one more exam question today and that was it!
<atmosx>
shevy: the funny thing is that I'm giong to be a pharmacist and no one is going to ask me about ... how the biosynthesis of alkaloids is done... I mean wtf am I learning.
<jhass>
you want string keys, so you convert your input to strings
<godd2>
It was the year negative 4712...
nobitanobi has quit [Remote host closed the connection]
<shevy>
atmosx god... one question I had half a year ago was about alkaloids... 10 points... I think I reached only 1 or 2...
anaeem1_ has quit [Remote host closed the connection]
<jhass>
that's duck typing, you just assume your input responds to the right thing, you let the caller the freedom to decide what to pass
exenin has quit [Quit: Leaving]
<atmosx>
shevy: what question?
<atmosx>
shevy: do you remember?
<atmosx>
what was the q?
<shevy>
atmosx let me try to find it ... I think I noted them down
<atmosx>
haha cool
zorak8 has quit [Ping timeout: 265 seconds]
nonks has quit [Ping timeout: 250 seconds]
fabrice31 has joined #ruby
<shevy>
atmosx oh yeah, it was divided into 3 parts: (1) draw + explain structure of alkaloids (2) give examples (3) which aminoacid provides the starting (or main) point in the biosynthesis of alkaloids? (A problem was that the one who asked the question was a plant biochemi, and I hate plants...)
lxsameer has quit [Quit: Leaving]
NoNMaDDeN has quit [Remote host closed the connection]
<MattB2>
jhass: ah, I'm with you now - I can put to_s on the caller, so no need to convert up front. Duh, now I see where you were driving.
<MattB2>
Thanks!
User458764 has quit [Ping timeout: 250 seconds]
<jhass>
mmh, not exactly what I meant
kasperti_ has quit []
danijoo has quit [Ping timeout: 250 seconds]
<jhass>
it somewhat applies, in that you now assume that your input looks like a string
<jhass>
as opposed to just assuming that it has a method to get a string representation of it
<atmosx>
shevy: ok (1) is easy, but which structure? You have those which the nitrogen is inside the ring and the phenyl-alanine derivatives (epinephrine, norepinephrine, dopamine, etc.) which is outside... (2) is easy already did :-P (#) easy again
<atmosx>
already did :-P
User458764 has joined #ruby
<shevy>
well
<atmosx>
actually alkaloids that start from lysine, tryptophan, ornithine
<shevy>
that would have been the difference between 2 points and 8 points I guess
<atmosx>
pnehyl-alanine, tyrosine
<atmosx>
and ... histidine IIRC
<shevy>
hey I have absolutely no idea and the best thing is - I did not look it up either because I hate it so much
<atmosx>
I feel you
Eiam has joined #ruby
<shevy>
I don't want to know it either! I could have a chart map that shows all compounds anyway, and in the end it's the DNA that willg overn which enzymes create all the compounds anyway
<atmosx>
when I was in high school, I got ditched 1 year over chemistry. Had to re-do an exam on september in order to pass the class
<atmosx>
otherwise I would had to repeat the entire year, I was so scared I learned the book by heart
fabrice31 has quit [Ping timeout: 264 seconds]
dermothaughey has joined #ruby
<shevy>
atmosx btw is this really pharmacy? because you were doing some computer work before there?
LudicrousMango has quit []
<atmosx>
but I never really understood anythng, now at least things start to come together (I know the life of an alkaloid from plant to drug to side effect to excretion... urine or something)
<shevy>
excretion is better, it's fun
<atmosx>
shevy: My thesis is about bio-informatics but nothing special
<MattB2>
jhass: as convoluted as it sounds, some later methods call Date#parse on the datestring, and you can't call Date#pare on a date, but if I add to_s it works
sinequanon has joined #ruby
danijoo has joined #ruby
<atmosx>
shevy: the rest man, I don't know ... :-( just hav to know these things to get the degree and go home
<shevy>
atmosx ah ok, thought there was like mandatory bioinformatics components in pharmacy now
<jhass>
MattB2: that sounds indeed very convoluted
<jhass>
is there at least some serialization (persistence, network) involved?
<shevy>
here, pharmacy is all plants and chemistry - basically nothing about computers (and they don't even have a master's programme; it is still an old diploma study)
<atmosx>
shevy: ah no
<atmosx>
shevy: I'm the first person in my univ to even remotely touch the subject.
<MattB2>
jhass: different ActiveRecord database adapters return date keys for .count in either Date or String format. The rest of the code asssumes datestring keys (and in some cases manipulates the string directly, so datestring keys aren't always a disadvantage). Either I convert the Date keys to datestrings up-front, or I change the rest of the code to append .to_s, or I invert the rest of the code to expect Date keys.
apeiros_ has quit [Ping timeout: 255 seconds]
<jhass>
I'd figure out what most of the adapters do, then convert the other adapters to that behaviour
havenwood has quit [Remote host closed the connection]
Rumel has joined #ruby
mathias2 has joined #ruby
<MattB2>
Yeh, I'd started with sqlite as the lowest common denominator (datestring keys), but in hindsight...
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zorak8 has quit [Ping timeout: 255 seconds]
St1gma has quit [Read error: Connection reset by peer]
andrewlio has quit [Quit: Leaving.]
<MattB2>
jhass: Anyway, wouldn't changing it now be premature optimization? :-P
St1gma has joined #ruby
Rumel has left #ruby ["WeeChat 1.0.1"]
<jhass>
I'd argue that premature optimization is about details and this is about application design
tlarevo has quit [Remote host closed the connection]
mathias2 has quit [Ping timeout: 265 seconds]
<jhass>
but yeah, if you have it working currently, don't make it a top priority
<jhass>
put it into the refactoring slot
mloveless has quit [Remote host closed the connection]
Guest51752 has quit [Quit: leaving]
kaspergrubbe has joined #ruby
a13x212 has left #ruby [#ruby]
kaspergrubbe is now known as Guest23174
nerium has quit [Ping timeout: 272 seconds]
shredding has quit [Quit: shredding]
Eiam has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
<MattB2>
jhass: just what I was thinking :)
chrishough has joined #ruby
cjbrambo has joined #ruby
cjbrambo has quit [Client Quit]
artm has quit [Ping timeout: 245 seconds]
Iota-Spencer is now known as IotaSpencer
atomical has joined #ruby
nerium has joined #ruby
mary5030 has quit [Remote host closed the connection]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
artm has joined #ruby
Jackneill has quit [Remote host closed the connection]
ht__th has quit [Read error: Connection reset by peer]
Lingos has joined #ruby
shredding has joined #ruby
definiv has joined #ruby
decoponyo has quit [Read error: Connection reset by peer]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
decoponio has joined #ruby
havenwood has joined #ruby
* Nilium
finally gave in and licensed RubyMotion.
siso has joined #ruby
siso has quit [Client Quit]
zorak8 has joined #ruby
poweratom_ has quit [Quit: Be back later ...]
spyderman4g63 has quit [Remote host closed the connection]
definiv has quit [Quit: Out]
spyderman4g63 has joined #ruby
siso has joined #ruby
mclee has joined #ruby
rshetty has joined #ruby
cajone has quit [Ping timeout: 245 seconds]
spyderman4g63 has quit [Ping timeout: 258 seconds]
davedev24_ has quit [Read error: Connection reset by peer]
rshetty has quit [Ping timeout: 264 seconds]
davedev24_ has joined #ruby
<MattB2>
centrx - there's always irb (or pry)
ringarin has joined #ruby
nonks has joined #ruby
nateberkopec has quit [Quit: Leaving...]
roqo has quit [Changing host]
roqo has joined #ruby
Avahey has quit [Quit: Connection closed for inactivity]
<centrx>
Only IRC has LOL functionality
corehook has joined #ruby
codezomb has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
elcheckito has joined #ruby
NoNMaDDeN has joined #ruby
corehook has quit [Ping timeout: 258 seconds]
ARCADIVS has joined #ruby
crantron has quit [Ping timeout: 240 seconds]
claymore has quit [Quit: Leaving]
NoNMaDDeN has quit [Ping timeout: 255 seconds]
cajone has joined #ruby
benzrf is now known as benzrf|offline
dkb20k has joined #ruby
ndrei_ has quit [Ping timeout: 255 seconds]
tvw has joined #ruby
ferr has quit [Quit: leaving]
thsig has joined #ruby
ferr has joined #ruby
einarj has quit [Remote host closed the connection]
Fokki_ has quit [Quit: Be back later ...]
jimbach has joined #ruby
dkb20k has quit [Ping timeout: 245 seconds]
<shevy>
I LOL in reallife
thsig has quit [Remote host closed the connection]
thsig has joined #ruby
jimbach has quit [Ping timeout: 258 seconds]
iamjarvo has joined #ruby
iamjarvo has quit [Client Quit]
gnu_d has joined #ruby
mathias2 has joined #ruby
<gnu_d>
Hi, is there a proper terminology for the following code: class String: def something_new, I'm comparing language features ?
JoshGlzBrk has joined #ruby
<gnu_d>
the above code will add a new method to the builtin String class, but I don't how's that called
<shevy>
gnu_d you simple define a method on class Strings; all Strings will have this; the negative term is "monkey patching", the positive term is "knowing precisely what one is doing"
JoshGlzBrk has quit [Client Quit]
thsig has quit [Ping timeout: 272 seconds]
artm has quit [Ping timeout: 272 seconds]
elcheckito has quit [Quit: WeeChat 1.0.1]
<gnu_d>
shevy: I'm looking for a term like class, method overriding or something, but I don't think that's the proper one
<shevy>
method overriding?
<shevy>
what method are you overriding in your example?
<gnu_d>
shevy: not overrinding, instead I'm adding a not existing method in the Strings class
<gnu_d>
sorry, my head isn't straight today, can think properly
<gnu_d>
can't*
<shevy>
I did not make up the term
mistermocha has joined #ruby
<shevy>
I don't like it either
<shevy>
it's a feature - you can, if you want to, modify core aspects of ruby
it0a has quit [Ping timeout: 255 seconds]
<shevy>
the bug is that you can not cleanly undo or restore prior conditions (in regards to core/stdlib of ruby)
<centrx>
gnu_d, What it means is that Ruby is fully object-oriented, so even all the base data types can use the features of classes
Soda has quit [Remote host closed the connection]
<centrx>
gnu_d, And one of those features is the ability to "open up" a module or class and add more things to it in various files
<jhass>
gnu_d: as shevy says "monkey-patching" is the negative term, the neutral term is "open classes" or "open class model"
<shevy>
I like opening up
<shevy>
it reminds me of X-mas
<shevy>
I open presents and bags
gregoriokusowski has quit [Quit: gregoriokusowski]
rblackwe_ is now known as rblackwe
<gnu_d>
I see, I'm comparing it to Python, I really like to see how they compare in that level.
bmichelsen has quit [Quit: ZZZzzz…]
<shevy>
dunno
<centrx>
The negative term for Python is "not object-oriented"
<shevy>
do you modify classes in python at runtime gnu_d?
klmlfl has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
<gnu_d>
shevy: I never tried it before :(
<shevy>
I remember years ago on #mono.de or so
<centrx>
The German kissing disease?
<shevy>
people shouted "that fucking stinks! someone else could modify stuff and break my code!" in regards to opening up core classes
<shevy>
they hated ruby
<shevy>
centrx Germans don't kiss
<shevy>
they are too disciplinized for this
<gnu_d>
shevy: I just like more control :), so I can build much more sophisticated things
gregoriokusowski has joined #ruby
gregoriokusowski has quit [Client Quit]
jamespw has quit [Ping timeout: 240 seconds]
it0a has joined #ruby
bluenemo has joined #ruby
sinequanon has quit [Remote host closed the connection]
<bl4ckdu5t>
irb is like python interpreter they said, I find it not to be true
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bl4ckdu5t>
I've been progressing with learning ruby as a python developer and I try to use irb but sometimes my variables just lost
<bl4ckdu5t>
foo = 'hey'
<bl4ckdu5t>
next minute I do foo or puts foo
<bl4ckdu5t>
I get nothing
benzrf|offline is now known as benzrf
<centrx>
Are you sure it's the same console? Restarted irb?
<shevy>
bl4ckdu5t if you assign to a variable in irb and it keeps on running then the above code works
<bl4ckdu5t>
I always have to restart it
<apeiros>
bl4ckdu5t: um, variables don't suddenly get lost. maybe you're confusing contexts? local variables are local to their scope. e.g. `def foo; bar = 'hey'; end; bar # will not work, since bar is local to the foo method
<shevy>
on a restart it is a new instance, the old local variables are lost
<apeiros>
bl4ckdu5t: *why* do you have to restart it?
<MattB2>
jhass: decided no time like the present, and converted to Date from top-down. The world is a better place. :)
<bl4ckdu5t>
I think it's just buggy on my machine
<bl4ckdu5t>
It happens and when I quit out of it and start over, it works fine
wald0 has quit [Ping timeout: 245 seconds]
<bl4ckdu5t>
I started thinking it is a common thing with irb
<apeiros>
bl4ckdu5t: what is "it" in "it happens"?
<apeiros>
I'm almost certain that you're misunderstanding some cause & effect there.
<bl4ckdu5t>
The buggy nature of irb
<apeiros>
gah
<apeiros>
DUDE
<shevy>
perhaps he has a heisenbug irb
wald0 has joined #ruby
<apeiros>
it's NOT buggy
<apeiros>
and unless you give us some actually useful information, we can't tell you what you misunderstand
<Nilium>
gnu_d: Might be considered a class extension, would probably be considered a mixin if you stuffed it in a module and then added it to the string class, but monkey-patching is generally what it is
<atmosx>
buggy buggy buggy
<Nilium>
Oh, scrolled up, go figure.
<MattB2>
bl4ckdu5t: bugs or no bugs (and I'd side with apeiros on that one), pry is infinitely better.
<jhass>
bl4ckdu5t: try pry, it's rubys ipython, maybe it works better for you
<Nilium>
I dub bl4ckdu5t a troll
<apeiros>
yes, pry+1. but whatever he doesn't get will happen all the same to him in pry.
<jhass>
ah, too slow :)
<MattB2>
apeiros: fair point
fabrice31 has joined #ruby
<MattB2>
jhass: what, pry?
<jhass>
yeah
<jhass>
and yay re the other one ;)
<Nilium>
I remember having some issues with pry not wanting me to use certain one-letter variable names, but I don't think that's the case anymore.
<gnu_d>
Nilium: I can see other ways, but I just wanted to know what's this thing as a feature
<MattB2>
I nly use it for code tinkering, so never been a problem.
shredding has quit [Quit: shredding]
<MattB2>
*only
<jhass>
Nilium: no I still have these unfortunately
<bl4ckdu5t>
I think what happened exactly was I tried to use the new hash style rather than the rocket style
<jhass>
but then single letter variables
<jhass>
bl4ckdu5t: that doesn't relate to local variables
<MattB2>
jhass: see my comment above re Date - took your advice and much better for it!
<Nilium>
Yeah, but I'm ok with single-letter variable names if I'm just typing out some junk in pry to do a quick computation
<apeiros>
bl4ckdu5t: how about you just gist a whole irb session and tell us in which lines something happened not the way you expected it?
<bl4ckdu5t>
and instead of showing an error, it started behaving strangely
otherj has joined #ruby
<shevy>
atmosx wat
<shevy>
atmosx are you learning for the exam :-)
<bl4ckdu5t>
it stopped storing local variables
<Nilium>
like i=[*0..5].map.whatever.fishsticks
bmichelsen has joined #ruby
<bl4ckdu5t>
I should give pry a try
<Nilium>
I expect nobody to judge me for my Enumerator#whatever and Enumerator#fishsticks extensions
ezrezrz has quit [Remote host closed the connection]
<shevy>
Nilium fishsticks method so I see
<shevy>
whatever is ok
<shevy>
but fishsticks...
<shevy>
what's next
<shevy>
.pizza?
<Nilium>
Fishsticks is basically a parallel map and fold followed by a sorted group-by
<olistik>
I looked over github-markdown but I need to change something about the generation of code blocks and it looks the repository doesn't contain the source code ^_^'
Joufflu_ has joined #ruby
Joufflu_ has quit [Read error: Connection reset by peer]
<jhass>
redcarpet has a fairly easy way of writing custom renderers
<olistik>
@MattB2 thanks for pointing out that resource :-)
byprdct has quit [Ping timeout: 250 seconds]
josephndenton has joined #ruby
Xeago has quit [Ping timeout: 255 seconds]
<olistik>
jhass: I'm going to try kramdown and redcarpet, then :-)