jancel has quit [Remote host closed the connection]
idefine has joined #ruby
Dry_Lips has joined #ruby
Dry_Lips has joined #ruby
edwinvdgraaf has joined #ruby
gix has joined #ruby
rikai has joined #ruby
nwhirschfeld has joined #ruby
tubbo has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
roamingdog has quit [Remote host closed the connection]
saneax is now known as saneax_AFK
jancel has joined #ruby
edwinvdgraaf has quit [Ping timeout: 276 seconds]
LoneHermit has joined #ruby
SilverKey has quit [Quit: Halted.]
halfamind has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
halfamind1 has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
Devalo has joined #ruby
cooldavid has quit [Quit: leaving]
karmatr0n has joined #ruby
bruno- has quit [Ping timeout: 276 seconds]
Devalo has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Remote host closed the connection]
roamingdog has joined #ruby
elavee has joined #ruby
<elavee>
ruby is great
horaceheaven has joined #ruby
elavee has quit [Client Quit]
Vingador has quit [Remote host closed the connection]
halfamind1 has quit [Quit: Leaving.]
diegoviola has quit [Quit: WeeChat 1.5]
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
noService has joined #ruby
noService has quit [Changing host]
noService has joined #ruby
agent_white has joined #ruby
d0lph1n98 has quit [Ping timeout: 240 seconds]
<agent_white>
Evenin
ensyde__ has quit [Ping timeout: 276 seconds]
ramfjord has joined #ruby
djbkd has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
tatsuo has joined #ruby
kies has joined #ruby
kgrz has joined #ruby
Eiam_ has joined #ruby
jaguarmagenta has joined #ruby
blackmesa has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
Vile` has quit [Ping timeout: 240 seconds]
rbennacer has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 250 seconds]
eljimmy has quit [Read error: Connection reset by peer]
eljimbo has quit [Quit: This computer has gone to sleep]
araujo_ has quit [Quit: Leaving]
yfeldblum has joined #ruby
kareeoleez has joined #ruby
janebootydoe has quit [Read error: Connection reset by peer]
kareeoleez has quit [Remote host closed the connection]
kareeoleez has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Vile` has joined #ruby
tildes has joined #ruby
pawnbox has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ereslibre_laptop has quit [Ping timeout: 260 seconds]
A124 has quit [Ping timeout: 265 seconds]
VeryBewitching has quit [Quit: Konversation terminated!]
edwinvdgraaf has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
fedexo has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
halfamind has joined #ruby
edwinvdgraaf has quit [Ping timeout: 276 seconds]
A124 has joined #ruby
jancel has quit [Remote host closed the connection]
Lomex has joined #ruby
Lomex has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
nankyokusei has joined #ruby
pawnbox has joined #ruby
antgel has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
ereslibre has joined #ruby
Yiota has joined #ruby
halfamind has quit [Quit: Leaving.]
jimism has joined #ruby
tatsuo has quit [Remote host closed the connection]
Yiota has quit [Client Quit]
mistermocha has joined #ruby
Devalo has joined #ruby
zast has quit [Remote host closed the connection]
raeoks has joined #ruby
tubbo has quit [Ping timeout: 276 seconds]
rikai has quit [Ping timeout: 252 seconds]
edwinvdgraaf has joined #ruby
nwhirschfeld has quit [Ping timeout: 250 seconds]
karmatr0n has quit [Ping timeout: 252 seconds]
ecksit has joined #ruby
<ecksit>
hi, i'm wondering how i would go about doing the following PHP snippet in ruby? `print $myobj->{$myval};` where it would first evaluate the value of $myval and then be usable as a method
halfamind has joined #ruby
edwinvdgraaf has quit [Ping timeout: 276 seconds]
halfamind has quit [Client Quit]
jenrzzz has quit [Ping timeout: 276 seconds]
agit0 has quit [Quit: zzzZZZ….]
antgel has quit [Ping timeout: 276 seconds]
<ecksit>
i've found eval but i'm not sure if that is the best approach
nwhirschfeld has joined #ruby
tubbo has joined #ruby
rikai has joined #ruby
nertzy has joined #ruby
govg has quit [Quit: leaving]
monoprotic has quit [Ping timeout: 276 seconds]
panpainter has joined #ruby
bigfoot111 has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
Yiota has joined #ruby
bobbycvi has quit [Quit: ...]
crystal77 has joined #ruby
diegoaguilar has joined #ruby
pawnbox has quit [Remote host closed the connection]
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
panpainter has quit [Ping timeout: 260 seconds]
Yiota has quit [Client Quit]
blackmesa has quit [Ping timeout: 246 seconds]
sauvin has joined #ruby
Vile` has quit [Ping timeout: 252 seconds]
LoneHermit has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<kgrz>
ecksit: something like myobj.send(myval) should work™
<ecksit>
thanks, let me try that
<kgrz>
Note that myval here should be a symbol
szu has joined #ruby
dionysus69 has joined #ruby
RegulationD has joined #ruby
jackjackdripper1 has joined #ruby
<kgrz>
or a string
sdwrage has quit [Quit: Leaving]
jackjackdripper has quit [Ping timeout: 240 seconds]
last_staff has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
pawnbox has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
kareeoleez has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
nankyokusei has joined #ruby
lxsameer has joined #ruby
Coldblackice has joined #ruby
tildes has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
tatsuo has joined #ruby
saneax_AFK is now known as saneax
Yzguy has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
beawesomeinstead has quit [Ping timeout: 260 seconds]
raeoks has joined #ruby
GriffinHeart has joined #ruby
cajone has left #ruby [#ruby]
beawesomeinstead has joined #ruby
ur5us has quit [Remote host closed the connection]
<GriffinHeart>
Hi everyone, is there a way to freeze a docstring?
<GriffinHeart>
or heredoc
<hanmac>
GriffinHeart: ruby doesn't use docstring, use rdoc or yard comment format
mistermocha has quit [Remote host closed the connection]
<GriffinHeart>
hanmac: sorry I meant heredoc
<Arcaire>
GriffinHeart: a heredoc is just a string
bluOxigen has joined #ruby
<GriffinHeart>
`BLEH = <<-EOF something EOF`
tatsuo has quit [Ping timeout: 240 seconds]
<hanmac>
there is a comment for freezing string literals, but i remember it correctly
<GriffinHeart>
Oh I found it, was trying to do it like `BLEH = <<-EOF something EOF.freeze` but its `BLEH = <<-EOF.freeze something EOF` (with the appropriate line breaks)
bluOxigen_ has quit [Ping timeout: 276 seconds]
dikaio has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
Yzguy has quit [Quit: Zzz...]
aufi has joined #ruby
pawnbox has quit [Remote host closed the connection]
cajone has joined #ruby
jwren has joined #ruby
edwinvdgraaf has joined #ruby
MiniFrenchbread has quit [Remote host closed the connection]
<hanmac>
shevy: checkout this: its about today's special day ;P
<Bish>
okay, hm, what is key argument syntax? what is it good for?
platzhirsch has joined #ruby
<Bish>
i got something like def x a=1,b=2,c=3, i search a way to call x with a value for C but not change a,b defaults
roamingdog has quit [Remote host closed the connection]
<Bish>
tried to use the double splat operator for that.. didn't work, unless i use the key notation, which i don't quite understand
nischay_ has joined #ruby
<Bish>
i thinki i get it
Yiota has quit [Client Quit]
nischay has quit [Ping timeout: 276 seconds]
<Bish>
they're disjunct ways to give functions arguments
<Bish>
i get it, they're not compatible
<Bish>
right?
<Bish>
since when is key argument list a thing? i mean versions
itguru has joined #ruby
<itguru>
I started to learn ruby yesterday to write something that does some lookups, and extracts the ip addresses returned into a file — how — I'm currently drinking from the firehose called google search, and it's killing me. I'm loving it, but… well, ruby is too damn flexible. in bash, i would just run sed on the strings to get them back, but would would be the ruby approach?
<Bish>
itguru: get the data into a string and use it's scan method
<Bish>
how you can easily exctract data out of a string
skade has quit [Quit: Computer has gone to sleep.]
GriffinHeart has quit [Remote host closed the connection]
<itguru>
Thanks Bish — That looks like what I need, I was running into examples where I would only get the first match, there are multiple ips in the string
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arup_r>
I asked #bundler, but that channel is not responding, so thought to ask here. What is the difference between `bundle update gemname` and `bundle update --source gemname` ?
roshanavand_ has joined #ruby
<arup_r>
main, I know how the first one works.. not sure about the second one.
<arup_r>
s/main/mainly
johnmilton has joined #ruby
roshanavand_ has quit [Client Quit]
FernandoBasso has joined #ruby
noark9 has quit [Remote host closed the connection]
<Bish>
kareeoleez: how about not getting the information from ifconfig
<kareeoleez>
Bish: but ?
<Bish>
some file in /proc /sys
<kareeoleez>
Bish: I've tried Socket, network_interface etc.
<kareeoleez>
what file ?
<Bish>
wait, i wrote something a while ago, let's see if i can find it
stardiviner has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roshanavand_ has joined #ruby
<Bish>
kareeoleez: what information do you actually need from ifconfig
<kareeoleez>
Bish: everything :P
<kareeoleez>
Bish: I am currently writing a parser myself
<Bish>
/proc/net/dev gives u some stats aobut interfaces
<kareeoleez>
I tried parslet but I find it a bit complicated
<kareeoleez>
Bish: I'm on BSD
<kareeoleez>
no /proc
<Bish>
oh, no clue then
<kareeoleez>
np
startupality has quit [Quit: startupality]
tvw has quit []
madgen has joined #ruby
<Bish>
lol, ifocnfig uses ioctl to get ip of interfaces
<Bish>
why the fuck does it have to be so comlicated, geez
andywww has joined #ruby
<andywww>
what am i doing wrong with this simple array concatenation?
<kareeoleez>
Bish: I am interacting a lot with hardware so the "ideal" would be to know-how with ioctl
<kareeoleez>
Bish: but seems to me too difficult
<kareeoleez>
I mean where do you start ?
<Bish>
there won't be an easy way, what you're trying to do seems very special
<Bish>
your best hope, someone already had that problem, and wrote a gem
anonymouse1935 has joined #ruby
<anonymouse1935>
hey guys
WebDevB has joined #ruby
<Bish>
anonymouse1935: hi
<Bish>
kareeoleez: but i was wrong, you can do ioctl with ruby
pawnbox has joined #ruby
<WebDevB>
Hey guys, we're looking for an ad-hoc ruby on rails developer work will range from a couple of hours a month to a couple of days a month... We need someone to start yesterday haha as we've been let down.
czerasz has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
skade has joined #ruby
<kareeoleez>
Bish: of course you can
<kareeoleez>
Bish: but how do you start ?
<Bish>
well, is there something like strace for bsd?
davedev24 has joined #ruby
terlar has joined #ruby
<Bish>
track the ioctl syscalls ifconfig does to get the information you need
<Bish>
and reproduce them with Kernel.syscall
<Bish>
would be a wierd but cool way to dit
noService has quit [Ping timeout: 260 seconds]
nfk has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
anonymouse1935 has left #ruby ["Leaving"]
lxsameer has joined #ruby
lxsameer has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Yeomra has joined #ruby
* Bish
wonders what syscall will do on windows
noService has joined #ruby
sleetdrop has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
panpainter has joined #ruby
itguru1 has joined #ruby
<kareeoleez>
Bish: how do you track ifconfig calls ?
<kareeoleez>
Bish: in the .c file ?
itguru has quit [Ping timeout: 244 seconds]
<kareeoleez>
ifconfig is an executable binary file
aldodelgado has joined #ruby
hanmac has quit [Ping timeout: 250 seconds]
davedev24 has quit [Read error: Connection reset by peer]
<machinewar>
anyone know of convention for setting up mini-test in a ruby gem project? i.e. so that all of my classes are when tests run? Do I need to make a spec_helper and add to LOAD_PATH? or do you explicitly require the classes in your specs?
<raz>
hmm, how do i set a constant on a class created via Class.new? i can't get it to work :( http://pastebin.com/6wTcrsmf
<jhass>
raz: I think what you want is not possible (without defining the constants in the "global" (Object, Module, Class) context
ta_ has quit [Read error: Connection reset by peer]
<raz>
jhass: yea i guess if i can get your method to work in my actual context, i'll be fine :)
<jhass>
raz: a workaround could be to add a method called MY_CONST ...
<raz>
jhass: well, at the core i just want to inject some "configuration" into the created class. it doesn't even have to be a constant, but that seemed the most natural way to define something across all instances of said class
aupadhye has joined #ruby
<raz>
i guess a class-var would work equally well, if that is somehow easier
<blaxter>
first thing to implement something is to understand the logic
<JackMc>
Hey everyone - is there an easy way in Ruby to make something equivalent to a namedtuple in Python?
<JackMc>
Like something that I can do thingy.size
<blaxter>
i can't understand the logic of that neither looking at the code nor the spec
<blaxter>
also magic numbers not a good thing
soc42 has quit [Remote host closed the connection]
<shevy>
42!
<shevy>
what do I win
<adaedra>
A kick
Devalo has quit [Ping timeout: 250 seconds]
momomomomo has joined #ruby
<blaxter>
JackMc: Struct
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diego4 has joined #ruby
diegoviola has quit [Ping timeout: 244 seconds]
rkazak has quit [Quit: Sleep.....ing....]
mdw has quit [Quit: Sleeping Zzzzz]
<cooldavid>
monoprotic: I'm supposed to find out if something can be billed for that month, but I don't know how
<cooldavid>
monoprotic: will that require me to change the spec?
panpainter has quit [Read error: Connection reset by peer]
zapata has joined #ruby
panpainter has joined #ruby
diego3 has quit [Ping timeout: 252 seconds]
diego4 has quit [Client Quit]
diego3 has joined #ruby
SilverKey has joined #ruby
Masonn has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
jancel has joined #ruby
TomyWork has quit [Ping timeout: 244 seconds]
s00pcan has joined #ruby
millerti has joined #ruby
<cooldavid>
right, I also don't know what I'm supposed to do, they also won't tell me so I can't know the logic
<cooldavid>
they said it's part of guessing, or part of the exercise
[Butch] has joined #ruby
jancel has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
<shevy>
sounds like prison programming
<JackMc>
Hey everyone - I'm trying to require Mocha to get the mock() function mentioned here under 'traditional mocking': http://jamesmead.org/blog/2006-09-01-mocha-quickstart. What require should I use? I have tried require 'mocha', require 'mocha/mock', and a bunch of other stuff.
kareeoleez has joined #ruby
stannard has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 252 seconds]
<cooldavid>
shevy: yes it doesn't make sense, so I sent them something that doesn't make sense
diego3 has quit [Changing host]
diego3 has joined #ruby
diego3 is now known as diegoviola
rkazak has joined #ruby
SilverKey has quit [Quit: Halted.]
lxsameer has quit [Ping timeout: 240 seconds]
cooldavid has quit [Quit: leaving]
imperator has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
troter__________ has quit [Ping timeout: 260 seconds]
zast has joined #ruby
SilverKey has joined #ruby
troter__________ has joined #ruby
mjuszczak has quit []
[Butch]_ has joined #ruby
ravishankarjha has quit [Remote host closed the connection]
[Butch] has quit [Ping timeout: 246 seconds]
[Butch]_ is now known as [Butch]
circ-user-0vXzk has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
kareeoleez has quit [Remote host closed the connection]
dionysus69 has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
aganov has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
bruno- has joined #ruby
stannard has joined #ruby
agent_white has joined #ruby
<agent_white>
Mornin'
platzhirsch has quit [Ping timeout: 265 seconds]
ChiefAlexander has joined #ruby
idle_task is now known as idletask
rbennacer has quit [Remote host closed the connection]
dstarh has joined #ruby
stannard has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 276 seconds]
tildes has quit [Remote host closed the connection]
Devalo has joined #ruby
lfatsm has joined #ruby
pandaant has quit [Remote host closed the connection]
panpainter has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
araujo has joined #ruby
araujo has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d10n-work has joined #ruby
araujo has quit [Max SendQ exceeded]
lsmola has quit [Ping timeout: 260 seconds]
araujo has joined #ruby
kareeoleez has joined #ruby
GinoManWorks has joined #ruby
madgen has quit [Ping timeout: 276 seconds]
huyderman has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 240 seconds]
allcentury has quit [Ping timeout: 260 seconds]
huyderman has joined #ruby
Couch has quit [Ping timeout: 244 seconds]
mark_66 has left #ruby ["PART #RubyOnRails :PART #elixir-lang :PART #crystal-lang :PONG :card.freenode.net"]
kies has quit [Ping timeout: 252 seconds]
madgen has joined #ruby
e is now known as Augustus
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
rbennacer has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
roger_rabbit has quit [Ping timeout: 244 seconds]
idefine has joined #ruby
roamingdog has joined #ruby
Yeomra has quit [Quit: WeeChat 1.5]
skade has quit [Quit: Computer has gone to sleep.]
CloCkWeRX has joined #ruby
nando293921 has joined #ruby
skade has joined #ruby
stannard has joined #ruby
ravishankarjha has joined #ruby
skade has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
platzhirsch has joined #ruby
rodfersou is now known as rodfersou|lunch
panpainter has joined #ruby
nullFxn has joined #ruby
wigust_ has joined #ruby
noobsu has quit []
lfatsm has quit [Remote host closed the connection]
kus has joined #ruby
kus has quit [Max SendQ exceeded]
jhack has joined #ruby
stannard has quit [Remote host closed the connection]
wigust has quit [Ping timeout: 246 seconds]
phrozen77 has quit [Ping timeout: 250 seconds]
jhack_ has joined #ruby
saneax is now known as saneax_AFK
TomyLobo has joined #ruby
madgen has quit [Ping timeout: 260 seconds]
mistermocha has joined #ruby
panpainter has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby
allcentury has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
jhack has quit [Ping timeout: 246 seconds]
jhack_ is now known as jhack
madgen has joined #ruby
codecop has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
startupality has joined #ruby
bruno- has joined #ruby
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
charliesome has joined #ruby
RegulationD has joined #ruby
arpegius has quit [Quit: arpegius]
momomomomo has joined #ruby
hogetaro has joined #ruby
Trynemjoel has joined #ruby
roamingdog has quit [Remote host closed the connection]
Guest00-ru has joined #ruby
isxek has joined #ruby
madgen has quit [Ping timeout: 276 seconds]
roamingdog has joined #ruby
gix has quit [Quit: Client exiting]
akem has quit [Quit: Quitte]
skalfyfan has joined #ruby
blaxter has quit [Read error: Connection reset by peer]
dumdedum has joined #ruby
jancel has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
GinoManWorks_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
pawnbox has joined #ruby
edwinvdgraaf has quit [Ping timeout: 276 seconds]
akem has joined #ruby
GinoManWorks has quit [Ping timeout: 246 seconds]
gix has joined #ruby
itguru has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
giz|work has quit [Ping timeout: 252 seconds]
j_mcnally has quit [Ping timeout: 276 seconds]
rbr has quit [Ping timeout: 252 seconds]
dgynn has joined #ruby
jgt1 has quit [Ping timeout: 260 seconds]
rodferso1|lunch has joined #ruby
hwdyki has joined #ruby
rikai has quit [Ping timeout: 240 seconds]
j_mcnally has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
ferr has quit [Quit: WeeChat 1.5]
hwdyki has left #ruby [#ruby]
halfamind has joined #ruby
bradleesand has joined #ruby
aufi has quit [Remote host closed the connection]
rodfersou|lunch has quit [Ping timeout: 244 seconds]
Madmanden has joined #ruby
ponga has joined #ruby
<ponga>
hello people of #ruby
flashpoint9 has quit [Remote host closed the connection]
idefine has quit [Ping timeout: 240 seconds]
Yiota has joined #ruby
chopin_ has joined #ruby
kareeoleez has quit [Remote host closed the connection]
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
codecop has quit [Ping timeout: 246 seconds]
noService has joined #ruby
jobewan is now known as jobewan_away
chopin has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
zyzioziom has joined #ruby
jobewan_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momomomomo has joined #ruby
diego2 has joined #ruby
itguru has quit [Quit: Leaving.]
jancel has quit [Ping timeout: 276 seconds]
idletask has quit [Quit: .]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
diegoviola has quit [Ping timeout: 250 seconds]
idefine has joined #ruby
noService has quit [Ping timeout: 276 seconds]
loincloth has quit []
mistermocha has quit [Remote host closed the connection]
andikr has joined #ruby
rodferso1|lunch is now known as rodferso1|afk
rodferso1|afk is now known as rodfersou|afk
brunto has quit [Ping timeout: 276 seconds]
stannard has joined #ruby
WebDevB has quit []
idefine has quit [Ping timeout: 260 seconds]
diego2 has quit [Changing host]
diego2 has joined #ruby
diego2 is now known as diegoviola
platzhirsch has quit [Ping timeout: 250 seconds]
rkazak has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DoubleMalt has quit [Remote host closed the connection]
nerium has quit [Quit: nerium]
terlar has quit [Ping timeout: 244 seconds]
SilverKey has quit [Quit: Halted.]
halfamind has quit [Read error: Connection reset by peer]
halfamind1 has joined #ruby
sepp2k has quit [Quit: Leaving.]
aegis3121 has quit [Ping timeout: 244 seconds]
lubekpl has joined #ruby
davidmichaelkarr has joined #ruby
nankyokusei has joined #ruby
jobewan has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
akem has quit [Quit: Quitte]
araujo_ has joined #ruby
idefine has joined #ruby
stannard has quit [Read error: Connection reset by peer]
amclain has joined #ruby
skolman_ has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noService has joined #ruby
stannard has joined #ruby
araujo has quit [Ping timeout: 252 seconds]
mistermocha has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
<davidmichaelkarr>
I'm trying to debug a VagrantFile used in a book (learning puppet 4). I think I'm running into issues with unexpected character handling within a HEREDOC in a Ruby script.
<davidmichaelkarr>
The original line was this:
<davidmichaelkarr>
sed -i -e 's#\(secure_path = .*\)$#\1:/opt/puppetlabs/bin#' /etc/sudoers
stannard has quit [Read error: Connection reset by peer]
<davidmichaelkarr>
When the script is run, I don't see an error message, but the file is not changed. I think the "#" characters are noted as comment characters by Ruby. Does that make sense?
<davidmichaelkarr>
And the HEREDOC is initiated with this line:
halfamind1 has quit [Read error: Connection reset by peer]
halfamind has joined #ruby
davedev24 has quit [Ping timeout: 276 seconds]
duoi has quit [Ping timeout: 276 seconds]
chouhoulis has quit [Remote host closed the connection]
<davidmichaelkarr>
jhass: So you're telling me the line should execute properly? The weird thing is, there are side effects both before and after this in the script, and they all are done, but not from this line. I then later tried running the line manually as root, and it performs the change.
stannard has joined #ruby
drptbl_ has joined #ruby
roamingdog has quit [Read error: Connection reset by peer]
<jhass>
I can't spot anything that would affect the resulting value of the line, but if you want to verify just puts the variable
antgel has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
<jhass>
or yet better .inspect it
roamingdog has joined #ruby
drptbl_ has quit [Client Quit]
<davidmichaelkarr>
jhass: Sorry, I don't grok that.
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
panpainter has joined #ruby
gizmore has joined #ruby
<wrkrcoop>
so creating an API class makes sense?
<jhass>
"API class" isn't a well defined term, so maybe
<wrkrcoop>
seems to clash with idae of web API
jmhmccr has joined #ruby
<jhass>
how so?
ELLIOTTCABLE has joined #ruby
<Zarthus>
API's require a bit of thought before making them, perhaps you'd wish to structure what your API will contain on paper before writing something people might not like in code
<davidmichaelkarr>
So I found a fix for my misbehaving VagrantFile script, but I'm wondering if what I found is a bug in Ruby. The original line had this string: 's#\(secure_path = .*\)$#
shinnya has joined #ruby
<wrkrcoop>
web api is like yelp.com/users/authenticate. a class API has a method like process
<wrkrcoop>
i just thought API referred to routes that ppl can hit
<davidmichaelkarr>
When I printed out the resulting variable, it printed out 's#(secure_path = .*)$#
<davidmichaelkarr>
It seemed to "dequote" the parens.
evidex has quit [Remote host closed the connection]
incomprehensibly has joined #ruby
knowtheory has joined #ruby
<davidmichaelkarr>
So I looked in some docs and noted that the "#" can start variable interpolation, so I tried changing my heredoc terminator, adding single quotes around it, which is supposed to disable interpolation. That worked.
<jhass>
good catch but that's actually not a bug but intended
<jhass>
a normal heredoc is like double quotes
<davidmichaelkarr>
The funny thing is, I'm definitely not doing variable interpolation here. Is Ruby somehow "swallowing" the backslash as an attempt to determine if there is variable interpolation happening?
ravishankarjha has quit [Remote host closed the connection]
jcp has joined #ruby
smathy has joined #ruby
smathy is now known as smathy_afk
smathy_afk is now known as smathy
idefine has quit [Ping timeout: 240 seconds]
<davidmichaelkarr>
Any idea what's going on here?
duoi has joined #ruby
jimcroft has joined #ruby
last_staff has joined #ruby
mitsuhiko has joined #ruby
dvinciguerra has joined #ruby
dvinciguerra has quit [Max SendQ exceeded]
lxsameer has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
|2701 has joined #ruby
dvinciguerra has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
<jhass>
?puppet
<ruby[bot]>
Please join #puppet for help with it.
<jhass>
it's indeed not ruby
blackmesa has joined #ruby
Madmanden has joined #ruby
<jhass>
anyway, !"fee" is probably false and false is not in "coffee", "fee" in "coffee" is probably true and !true is false, "tea" in "coffee" should be false then and !false is true
pawnbox has quit [Ping timeout: 244 seconds]
Madmande_ has quit [Ping timeout: 260 seconds]
dvinciguerra has quit [Ping timeout: 252 seconds]
umdstu has quit [Quit: umdstu]
wof has quit [Ping timeout: 246 seconds]
SilverKey has quit [Quit: Halted.]
<davidmichaelkarr>
jhass: Ok, I'll ask there then.
Madmande_ has joined #ruby
Madmanden has quit [Ping timeout: 265 seconds]
phrozen77 has joined #ruby
akkmaxon has quit [Ping timeout: 250 seconds]
firstdayonthejob has quit [Quit: WeeChat 1.5]
isxek has quit [Quit: Leaving]
ChiefAlexander has joined #ruby
rodfersou|afk is now known as rodfersou
dumdedum has quit [Read error: Connection reset by peer]
mistermocha has quit [Remote host closed the connection]
SilverKey has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
last_staff has quit [Ping timeout: 265 seconds]
crameth has quit [Quit: crameth]
blaxter has joined #ruby
jord has quit [Ping timeout: 260 seconds]
bestie has quit [Ping timeout: 260 seconds]
dima_ has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
ljames has joined #ruby
dima_ has quit [Client Quit]
SCHAAP137 has quit [Quit: Exiting...]
mistermocha has joined #ruby
wrkrcoop has joined #ruby
edavis has quit [Read error: Connection reset by peer]
stannard has quit [Remote host closed the connection]
itguru has joined #ruby
dima_ has joined #ruby
dima_ is now known as pfoyh
bestie has joined #ruby
drptbl has joined #ruby
pfoyh has quit [Client Quit]
PlasmaStar has quit [Ping timeout: 250 seconds]
stannard has joined #ruby
firstdayonthejob has joined #ruby
arpegius has quit [Quit: arpegius]
drptbl has quit [Read error: Connection reset by peer]
jord has joined #ruby
momomomomo has joined #ruby
dima_ has joined #ruby
dima_ is now known as pfoyh
<pfoyh>
hi
kareeoleez has joined #ruby
SilverKey has quit [Ping timeout: 252 seconds]
<apeiros>
hi pfoyh
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
cdg has quit [Remote host closed the connection]
stannard has quit [Read error: Connection reset by peer]
skalfyfan has joined #ruby
duoi has quit [Ping timeout: 276 seconds]
wigust has joined #ruby
giz|work has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
lxsameer has joined #ruby
duoi has joined #ruby
ramfjord has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
PlasmaStar has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hobodave has joined #ruby
dvinciguerra has joined #ruby
dikaio has joined #ruby
hahuang61 has quit [Quit: WeeChat 1.4]
blackmes1 has joined #ruby
CloCkWeRX has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
last_staff has joined #ruby
tagaulap has quit [Quit: Connection closed for inactivity]
blackmesa has quit [Ping timeout: 276 seconds]
akiTendo has joined #ruby
<akiTendo>
Hello all. Need a little help discovering a value.
<akiTendo>
In a Vagrantfile (which is a ruby script)
roamingdog has joined #ruby
<akiTendo>
The script is executing from /Users/myname/vagrants/vagrantbox/Vagrantfile
<akiTendo>
Now in ruby, how do I get the value of directory “myname”
<akiTendo>
Vagrantfile is the ruby script itself.
<akiTendo>
PHP this would be dirname(dirname(dirname(__FILE__)))
<akiTendo>
I presume it’s something similarly simple in ruby.
SilverKey has joined #ruby
<akiTendo>
(ok, technically the above would return “/Users/myname” but I can prune down from there with a pathinfo call”
<adaedra>
But if your goal is to get current user name, you should be able to just do `ENV['USER']`
madgen has joined #ruby
<apeiros>
or via Etc
<apeiros>
(the current user's name)
<akiTendo>
adaedra: Eventually this may be invoked from ansible script ran by the administrator, not necessarily the user who is going to be using the VM.
roamingdog has quit [Ping timeout: 244 seconds]
<akiTendo>
I think. I’ll try ENV[‘USER’] and see if that causes trouble.
<akiTendo>
It is simpler.
karmatr0n has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
stannard has joined #ruby
marr has quit [Ping timeout: 276 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
<adaedra>
yeah, going through Etc would be more correct and reliable, but it's a bit longer.
kirun has joined #ruby
djbkd has quit [Remote host closed the connection]
rikai has joined #ruby
djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
idefine has joined #ruby
idefine_ has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
bronson has joined #ruby
edavis has joined #ruby
itguru has quit [Quit: Leaving.]
<ramfjord>
Why not just match the directory path with a regex like "\/Users\/([^\/]*)\/" instead of jumping up a bunch of paths?
bronson has quit [Remote host closed the connection]
eljimbo has quit [Quit: This computer has gone to sleep]
<ironcamel>
i have a ruby script that sometimes hangs on a line that does something like x = `ssh host cmd ...`. what is the easiest way to do that operation with some sort of timeout, so it returns after a few seconds with a failure and doesn't hang?
aegis3121 has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
<jhass>
probably better to use the net-ssh gem so you have more control
am55 has quit [Quit: Leaving]
<jhass>
should have timeout options too I'd hope
jancel has joined #ruby
sthns has joined #ruby
<ironcamel>
installing gems in not currently an option :(
<ironcamel>
*is not
<ironcamel>
should i fork a process?
<jhass>
-o 'ConnectTimeout 5' perhaps?
elaptics is now known as elaptics`away
pawnbox has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
am55 has joined #ruby
<ironcamel>
hmmm, that might work
sthns has quit [Remote host closed the connection]
<ruby[bot]>
daemonwrangler: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
yfeldblum has joined #ruby
andikr has quit [Remote host closed the connection]
roamingdog has joined #ruby
<Zarthus>
daemonwrangler: sounds like stuff => :stuff
synthroid has quit []
<daemonwrangler>
Yeah, that's what I was thinking, but wasn't expecting it to flag a method call with keyword args. For example, checker_func in remove(destination, checker_func: :directory?)
mistermocha has quit [Remote host closed the connection]
<daemonwrangler>
The rubocop config has TargetRubyVersion set to 2.0, so I would hope it'd recognize keyword arg syntax.
riddley has joined #ruby
ferr has quit [Ping timeout: 250 seconds]
<riddley>
you have an array of DateTime objects. how do you group them by proximity within THRESHOLD ?
blackthor has quit [Ping timeout: 252 seconds]
<jhass>
riddley: where did you copy paste that assignment from and what did you try so far?
<daemonwrangler>
jhass: It may be a better question for me to ask the jekyll devs since they explicitly set "EnforcedStyle: hash_rockets"
diegoviola has quit [Ping timeout: 246 seconds]
djcp has quit [Ping timeout: 276 seconds]
diego2 has joined #ruby
diego2 has quit [Changing host]
<riddley>
haha :) it's not an assignment. I'm looking at our snapshot schedules and trying to see when we have snapshots that "collide" (within a few minutes) I've gotten the date time objects created, but haven't been able to figure out what to do next. Enumerable#partition doesn't yield two arguments, so I can't compare proximity that way... seems like only #sort yields things, but sorting doesn't really help me
diego2 is now known as diegoviola
drptbl has joined #ruby
<bougyman>
hrm.
<bougyman>
Array(some_hash) did not do what I expected.
<bougyman>
usually Array(array_or_item) returns [array_or_item]
<bougyman>
I guess what i'm asking is how do I get the behavior that i'm used to for strings, numbers, and symbols working in this case.
Guest91331 has quit [Ping timeout: 250 seconds]
<adaedra>
so you want `[{one: 1}]`?
arpegius has joined #ruby
<bougyman>
yes.
Nahra has joined #ruby
<adaedra>
(n.is_a?(Array) ? n : [n]) would be the one that does not expand objects implementing #to_ary/#to_a, I guess.
rhastra has joined #ruby
bluOxigen has quit [Ping timeout: 276 seconds]
<jhass>
riddley: I'd say figure out what Enumerable#group_by uses to determine "equalness" (probably Hash's key contract, #hash and #eql?) and write a wrapper that defines those such that two within the threshold are considered equal
djbkd has quit [Remote host closed the connection]
safetypin has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
ghr has joined #ruby
<riddley>
jhass, group_by seems to be C, so I'm pretty lost
<bougyman>
adaedra: yeah, that's pretty much what I ended up with.
govg has quit [Ping timeout: 260 seconds]
hobodave_ has joined #ruby
<jhass>
riddley: it's pretty much .each_with_object({}) {|i, h| (h[yield i] ||= []) << i }
<riddley>
jhass, that yield blows my tiny mind... what does that do?
<jhass>
it yields?
<aegis3121>
h is the {} passed in. `i` is your item. (yield i) returns the result of your block after passing i into it. ||= [] sets that value to a new array if there wasn't one there already. and the push operator is pushing that item into that array.
diegoaguilar has quit [Remote host closed the connection]
hobodave has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
<riddley>
oh, so you must pass a block to that?
pfoyh has joined #ruby
<riddley>
ty aegis3121
djbkd has joined #ruby
dima_ has joined #ruby
idefine has quit [Remote host closed the connection]
ponga has quit [Quit: Connection closed for inactivity]
safetypin has joined #ruby
<jhass>
I don't follow
<jhass>
01 to 03 is two days, 04 to 06 is two days
safetypin has quit [Client Quit]
<riddley>
Sorry, I guess I'd expect the whole array
FernandoBasso has quit [Quit: Leaving]
dima_ has left #ruby [#ruby]
pfoyh has left #ruby [#ruby]
mistermocha has joined #ruby
imperator has left #ruby ["Leaving"]
<jhass>
and then for [2016-01-06, 2016-01-03, 2016-01-01, 2016-01-04] still?
<riddley>
that's just a re-order? if so, yes. I've sorted my array
<jhass>
ok
johnmilton has quit [Quit: Namaste]
<riddley>
but if -06 was -07 it would be off by itself
pfoyh has joined #ruby
dima_ has joined #ruby
prestorium has quit [Ping timeout: 260 seconds]
bobbycvi has joined #ruby
cdg has joined #ruby
arpegius has quit [Quit: arpegius]
mistermocha has quit [Ping timeout: 240 seconds]
araujo has quit [Read error: Connection timed out]
chopin has joined #ruby
eljimmy has joined #ruby
mistermocha has joined #ruby
araujo has joined #ruby
karmatr0n has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
SilverKey has quit [Quit: Halted.]
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
millerti has joined #ruby
DanyC has quit [Read error: Connection reset by peer]
idefine has joined #ruby
<jhass>
riddley: https://p.jhass.eu/1p.rb would be my first shot, not sure yet I prefer it over say implementing something more directly that doesn't require to fix to a single hash bucket
DanyC has joined #ruby
arpegius has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<riddley>
jhass, reading. thank you!
ta_ has quit [Read error: Connection reset by peer]
ChiefAlexander has quit [Quit: Leaving...]
SilverKey has joined #ruby
dvinciguerra has quit [Ping timeout: 240 seconds]
pietr0 has joined #ruby
ta_ has joined #ruby
<riddley>
jhass, I don't understand that at all :( reading about simpledelegator
Ouchy has quit [Read error: Connection reset by peer]
<riddley>
jhass, thank you very much for helping me with this
blackmes1 has joined #ruby
noService has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Remote host closed the connection]
jancel has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
charliesome has joined #ruby
<jhass>
mmmh, given we're operating on a sorted array, slice_before or the like should work too
Yiota has quit [Ping timeout: 276 seconds]
<riddley>
jhass, so group_by is being sneaky and passing in two values to the block even though it only has |date| ? which is why your .eql delegator can do the subtraction and compare it to the threshold. I assume PW#hash is some internal thing and that the call to super is about making SimpleDelegator happy?
s2013 has joined #ruby
jgt1 has joined #ruby
bruce_lee has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
Coldblackice has joined #ruby
allcentury has joined #ruby
<jhass>
yes to the last one. group_by is using a hash (see the ruby version I wrote above). read the docs for Hash (at the top) for an explanation on how #hash and #eql? come into play
chouhoulis has joined #ruby
jancel has quit [Ping timeout: 265 seconds]
<jhass>
anyway, disregard it, it's incorrect
chipotle has joined #ruby
<riddley>
!
<jhass>
.sort.slice_when {|a, b| (a-b).abs > THRESHOLD }.to_a is the correct solution
flashpoint9 has quit [Remote host closed the connection]
<riddley>
yea the double loop... isn't there some weird behavior when you use break in a block?
roamingdog has quit [Remote host closed the connection]
marr has joined #ruby
SilverKe_ has joined #ruby
<jhass>
break returns from the method invoking the block, the argument to break becomes the methods return value. next returns from the block, the argument becomes the blocks return value
SilverKey has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
<riddley>
jhass, thanks again. This one is closer to my level of understanding. I'll continue to study it.
<jhass>
riddley: keep in mind that I consider .slice_when the correct one by now
<jhass>
so take that more as a fun exercise
<riddley>
ok
charliesome has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
KINGSABRI has joined #ruby
mistermocha has quit [Remote host closed the connection]
<riddley>
jhass, haha the best part is that I'm using (and must keep using) Ruby 2.1 which has no slice_when
stannard has quit [Remote host closed the connection]
<shevy>
hehe
zeroDi has quit [Quit: WeeChat 1.5]
<KINGSABRI>
Hello guys ,, is there anyway to add hex values and check if there Carry out?
roamingdog has joined #ruby
charliesome has quit [Client Quit]
pawnbox has quit [Ping timeout: 260 seconds]
<jhass>
KINGSABRI: could you clarify? show what you've tried so far? example input/desired output?
A124 has quit [Read error: No route to host]
DanyC has quit [Ping timeout: 252 seconds]
chopin has quit [Remote host closed the connection]
yeticry has quit [Quit: leaving]
djbkd has quit [Remote host closed the connection]
<austinprog>
Hey everyone. What is the method to get a number as a double? I know gets.chomp().to_i gets integer but not specifically working for something like 8.0
<KINGSABRI>
if I permutations is 4 element it will take forever
jgt1 has quit [Ping timeout: 276 seconds]
replay has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
<shevy>
austinprog just float, .to_f should work
platzhirsch has joined #ruby
<austinprog>
Thank you! I will try that
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
All of this seems pretty confused
<KINGSABRI>
adaedra , jhass as you can see from script
<KINGSABRI>
there is a small processing but on huge number of permutations .. the main issue is the carry out
<adaedra>
I read badly from source code actually, especially at 23:40, don't you have a clearer explanation of what is needed?
yqt has joined #ruby
karmatr0n has quit [Ping timeout: 265 seconds]
<KINGSABRI>
it's an encoder for hex values
roamingdog has quit [Remote host closed the connection]
Ishido has quit [Read error: Connection reset by peer]
<adaedra>
Very well
dvinciguerra has quit [Ping timeout: 240 seconds]
hobodave_ has quit [Quit: Computer has gone to sleep.]
pawnbox has joined #ruby
<apeiros>
it taketh the input and encodeth it in hex
loincloth has joined #ruby
<apeiros>
austinprog: Float(string) might be better than .to_f, since it'll raise if the value is not a valid float representation
<ruby[bot]>
apeiros: # => invalid value for Float(): "hello world" (ArgumentError) ...check link for more (https://eval.in/571308)
mooe has quit [Quit: Connection closed for inactivity]
<adaedra>
I see an error in both. "0.0" => what the f did you gave to me smiley.
<adaedra>
:p
<apeiros>
0.0
<apeiros>
o0
<apeiros>
0o
<apeiros>
-.-
<adaedra>
õ.o
diego1 has joined #ruby
last_staff has quit [Quit: last_staff]
kirun has quit [Quit: Client exiting]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
diego1 is now known as diegoviola
allcentury has joined #ruby
JoshGlzBrk has joined #ruby
workmad3 has joined #ruby
symm- has joined #ruby
<shevy>
are you people doing again animated ascii there
<jhass>
KINGSABRI: how about picking random values between 0 and n/2 for the first and second value, and n-v1-v2 for the third?
<adaedra>
shevy: let's first implement correctly APNG before doing AASCII.
<adaedra>
Woohoo, message at 00:00:00.
<KINGSABRI>
jhass mmm I'll try this idea , It might save time
d10n-work has quit [Quit: Connection closed for inactivity]
d0lph1n98 has quit [Ping timeout: 252 seconds]
<jhass>
KINGSABRI: or to have a wider spectrum, rand(n) for the first and rand(n-v1) for the second
<jhass>
and shuffle the result
workmad3 has quit [Ping timeout: 276 seconds]
halfamind1 has quit [Quit: Leaving.]
mistermocha has joined #ruby
zyzioziom has quit [Ping timeout: 276 seconds]
idefine has quit [Ping timeout: 252 seconds]
Devalo has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
Biopandemic has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 250 seconds]
djbkd has quit [Remote host closed the connection]
dvinciguerra has joined #ruby
mistermocha has joined #ruby
dfockler has quit [Quit: Leaving...]
arpegius has joined #ruby
flashpoint9 has joined #ruby
Gasher has quit [Quit: Leaving]
oetjenj has quit [Ping timeout: 260 seconds]
Devalo has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
leitz has joined #ruby
<leitz>
Bummer of the day; reading messy old code and knowing that it's my messy old code....
Coldblackice has joined #ruby
<apeiros>
"omg, it's so bad! who wrote that, when, and why?" - "oh, I wrote it. yesterday."
allcentury has quit [Ping timeout: 260 seconds]
<leitz>
Hey apeiros, good to see you again.
djbkd has quit [Remote host closed the connection]
<leitz>
I'm trying to see if I want to just start over with the project, after I spend a few more weeks relearning the basics.
<adaedra>
git blame yourself
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
Masonn has joined #ruby
wilbert has quit [Ping timeout: 260 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
leitz yeah, sometimes it is not lack of knowledge though but syntax changes; such as the new hash syntax, I found it to be good for like single-key hashes Ponicorn.new(colour: :pink)
sinkensabe has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
more annoying is old code that I have that was written by someone else while being very complicated
Guest38 has joined #ruby
<leitz>
shevy, yeah, well. You know me, still the old Ruby version. The issue is that I'm an OOP newb and the classes are probalby poorly laid out.
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<leitz>
Like, "where is that variable set?" sort of poorly laid out.
<shevy>
you are stuck with some older ruby version too?
riobe has quit [Remote host closed the connection]
<leitz>
Yup. I mostly do server work and have to use what's on the server.
<shevy>
I guess my own code would look very different if I have to remain compatible to 1.8.x now
riobe has joined #ruby
<adaedra>
can we keep 1.8 in the past where it belongs?
<apeiros>
keeping your code 1.8 compatible is like trying to keep your car horse compatible
aegis3121 has quit [Ping timeout: 260 seconds]
<leitz>
Sadly, no adaedra.
<leitz>
Not for another couple years.
<shevy>
you can eat horses!
oetjenj has joined #ruby
halfamind has joined #ruby
Biopandemic has joined #ruby
<adaedra>
apeiros: speaking of which, I think I have a problem with my car. I feed it hay but it refuses to eat it. What should I do?
<leitz>
I think this job will require ice cream. I need to map out how the thing works again.
<leitz>
Back in a bit.
SCHAAP137 has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
<apeiros>
adaedra: you should ask a veterinarian
<apeiros>
maybe your car is sick
halfamind has quit [Client Quit]
<adaedra>
my car really is sick.
<adaedra>
YEAH
<adaedra>
Welp, time for me to go to 3053.
tatsuo has joined #ruby
Masonn has quit [Ping timeout: 260 seconds]
duoi has quit [Max SendQ exceeded]
duoi has joined #ruby
djbkd has joined #ruby
cloaked1 has quit [Quit: leaving]
duoi has quit [Max SendQ exceeded]
duoi has joined #ruby
jenrzzz_ has joined #ruby
zenlot6 has joined #ruby
toretore has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
<tatsuo>
hello.
dvinciguerra has quit [Ping timeout: 260 seconds]
zenlot has quit [Ping timeout: 250 seconds]
djbkd has quit [Remote host closed the connection]
<havenwood>
tatsuo: hi
<tatsuo>
can I get a upload progress in http post upload for restclient?
chipotle has quit [Ping timeout: 260 seconds]
sinkensabe has quit [Ping timeout: 260 seconds]
tatsuo has quit [Remote host closed the connection]
tatsuo has joined #ruby
sinkensabe has joined #ruby
troulouliou_div2 has joined #ruby
pawnbox has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
arpegius has quit [Quit: arpegius]
troulouliou_div2 has quit [Remote host closed the connection]
djbkd has joined #ruby
roamingdog has joined #ruby
* leitz
returns with milk and cookies.
sinkensabe has quit [Remote host closed the connection]
austinprog has quit [Ping timeout: 276 seconds]
biberu has quit []
gizless has joined #ruby
casp has joined #ruby
mistermocha has joined #ruby
gizless has quit [Remote host closed the connection]
nando293921 has joined #ruby
<casp>
hello
gizless has joined #ruby
casp has left #ruby [#ruby]
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
gizmore has quit [Ping timeout: 246 seconds]
moeabdol has joined #ruby
chipotle has joined #ruby
Azure|dc has joined #ruby
Azure has quit [Ping timeout: 260 seconds]
SilverKe_ has quit [Quit: Halted.]
ramfjord_ has joined #ruby
arescorpio has joined #ruby
stannard has joined #ruby
mistermocha has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 260 seconds]
wrkrcoop has quit [Quit: wrkrcoop]
moeabdol has quit [Ping timeout: 276 seconds]
ReK2 has joined #ruby
ReK2 has joined #ruby
SilverKey has joined #ruby
solars has quit [Ping timeout: 250 seconds]
tildes has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
SilverKey has quit [Client Quit]
pawnbox has joined #ruby
xall has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Remote host closed the connection]
madgen has quit [Ping timeout: 260 seconds]
casp has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
firstdayonthejob has quit [Ping timeout: 250 seconds]
Azure|dc has quit [Remote host closed the connection]
jobewan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symm- has quit [Quit: Leaving...]
mistermocha has joined #ruby
JesseH has quit [Remote host closed the connection]
Redfoxmoon has quit [Read error: Connection reset by peer]
joaumg has joined #ruby
riobe has quit [Remote host closed the connection]
riobe has joined #ruby
ramfjord_ has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
Kitt3n has joined #ruby
mistermocha has quit [Ping timeout: 276 seconds]
drptbl has quit [Quit: See you later!]
platzhirsch has quit [Ping timeout: 244 seconds]
ramfjord has joined #ruby
xall has joined #ruby
Kitt3n has quit [Changing host]
Kitt3n has joined #ruby
jancel has joined #ruby
idefine has joined #ruby
Kitt3n is now known as Redfoxmoon
jwren has joined #ruby
jancel has quit [Read error: Connection reset by peer]
<leitz>
Okay, an actual Ruby question. Not about horses.
djbkd has quit [Remote host closed the connection]
<leitz>
In the initialize section of a class, there's a line: @terms = char['terms'] || terms
<leitz>
The ending "terms" is a method that will set @terms to something. It is called if char['terms'] isn't passed as a part of the initialize.
whathappens has quit [Quit: Leaving...]
<leitz>
Am I right in thinking that if an object like this is created, it has a terms vaule that can get changed if the object's "terms" method is called?
<leitz>
So terms is set, and then reset.
AndroidLoverInSF has joined #ruby
djbkd has joined #ruby
<smathy>
leitz, only if the `terms` method sets `@terms` as a side-effect.
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 276 seconds]
Jackneill has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 252 seconds]
djbkd has quit [Remote host closed the connection]
AndroidLoverInSF has quit [Client Quit]
<leitz>
smathy, not sure if "side effect' has a special meaning. The terms method sets the terms number and derives age from the number of terms.