Puffball has quit [Read error: Connection reset by peer]
GodFather has quit [Ping timeout: 260 seconds]
joaumg has quit [Quit: WeeChat 0.4.2]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joaumg has joined #ruby
EdwardIII has joined #ruby
GodFather has joined #ruby
chipotle has quit [Ping timeout: 252 seconds]
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 250 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
chipotle has joined #ruby
skolman has quit [Remote host closed the connection]
skolman has joined #ruby
rkazak has joined #ruby
Gasher has quit [Quit: Leaving]
Dimik has quit []
Puffball has joined #ruby
Yiota has joined #ruby
skolman has quit [Remote host closed the connection]
skolman has joined #ruby
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ixti has joined #ruby
r_rios has joined #ruby
jancel has quit [Remote host closed the connection]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<r_rios>
Is there a way to make the instances of a class callable? Kinda like overloading operator() in C++
marr has quit [Ping timeout: 276 seconds]
<Radar>
r_rios: "callable"?
Blaguvest has quit []
Puffball has quit [Ping timeout: 252 seconds]
<r_rios>
Radar: Something like: a = B.new; a(1, 2, 3)
<Radar>
r_rios: what would that do?
<r_rios>
Some method from B
eljimmy has joined #ruby
<r_rios>
I don't know the exact terminology in Ruby, but you can make objects callable like functions in C++ by overloading operator(); I'd like to know if there's an equivalent of that in Ruby
mtkd has quit [Ping timeout: 276 seconds]
jhack has quit [Quit: jhack]
mtkd has joined #ruby
<baweaver>
there's not
<baweaver>
There are things like this you might see:
<r_rios>
And it doesn't even get all the way there: I'd have to call a.(1, 2, 3), not a(1, 2, 3)
jancel has quit [Remote host closed the connection]
<havenwood>
r_rios: a dot away
<r_rios>
Not that I don't appreciate the effort, though
<havenwood>
r_rios: you could always use a method instead of a proc, i was just being silly
<r_rios>
I know :P
<al2o3-cr>
r_rios: python might be better for you
<havenwood>
:)
<baweaver>
r_rios so why do you want that?
<havenwood>
al2o3-cr: :P
<baweaver>
at least from a straight ruby perspective it doesn't make much sense why you'd need it
<al2o3-cr>
;)
neanderslob has quit [Disconnected by services]
neanderslob_ has joined #ruby
<r_rios>
Anyway, baweaver: it's a class whose main purpose is to execute a command, so it's basically like a function; however, I have to register paths, local executables, etc. once in a while
<baweaver>
might be time to look into lambdas instead
<r_rios>
Most of the time, I'd call it like a function; but sometimes, I'd do a.register_foo('a', '/usr/bin')
neanderslob_ is now known as neanderslob
<r_rios>
Then do a('a')
<r_rios>
Etc.
<baweaver>
either that or allow it to yield a block
moeabdol has quit [Read error: Connection reset by peer]
goldfax has quit [Ping timeout: 240 seconds]
<IbrahimA>
he says ruby allocates multiple "heaps" and each one is 16kb and if GC finds that it ran out of free heaps it will allocate 1.8x more
<IbrahimA>
and the number of heaps is never decreased
siovene has joined #ruby
<IbrahimA>
is that still true? is there no way to reclaim that heap space once we no longer need it, besides restarting the process?
moeabdol has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
drbrain has quit [Ping timeout: 276 seconds]
Rickmasta has joined #ruby
<ropeney>
IbrahimA, I believe thats still the case but a factor of 1.4
mrgrieve1 has joined #ruby
Macaveli_ has joined #ruby
drbrain has joined #ruby
<droptone>
Does .find return just the first matching result?
Macaveli_ has quit [Client Quit]
<apeiros>
IbrahimA: a modern OS will page out unused memory anyway and virtualize it
<apeiros>
droptone: context
<apeiros>
droptone: there's an infinite number of .find methods.
<IbrahimA>
apeiros: what if swap is turned off or swap space is low?
lxsameer has quit [Ping timeout: 276 seconds]
rkazak has joined #ruby
Macaveli has quit [Ping timeout: 260 seconds]
<IbrahimA>
it seems like for a long running process this could be a potential trouble spot
<IbrahimA>
i've got a sidekiq worker running all sorts of jobs, and a new type of job im trying to add tends to use a lot of memory depending on what sorts of files users upload
<apeiros>
IbrahimA: if I run "top" I see `VM: 962G vsize`
<IbrahimA>
heh
<apeiros>
my system doesn't have 962GB of ram, neither does it have that amount of disk space
<IbrahimA>
actually yeah i've seen chrome does that
<apeiros>
it's purely virtual
Snowy has joined #ruby
<IbrahimA>
i wonder if swapoff prevents that from working though; i guess in theory swap and virtual memory are orthogonal
<apeiros>
I don't know the precise details at how that works, but as I understood it, while the memory is not reclaimed by the OS, it won't occupy any real memory either.
<IbrahimA>
but in practice i imagine if you have swap off once you pass the amount of physical memory something's gotta give
<droptone>
That final find statement would match two entries, the first and the last array index.
polysics has quit []
<ropeney>
IbrahimA, it does
<apeiros>
droptone: so the context would be Array#find
karapetyan has quit [Remote host closed the connection]
<droptone>
right, ok
<apeiros>
droptone: yes, Array#find will only find the first result
<droptone>
ok
<IbrahimA>
Ropeney: you mean, most likely the kernel will kill ruby due to low memory?
<ropeney>
or it will kill something else
<IbrahimA>
sure
<apeiros>
droptone: which is btw. (surprise) also documented: "Returns the first for which block is not false"
Rickmasta has quit [Ping timeout: 246 seconds]
<IbrahimA>
im thinking the best way to go for me here is to fork and do the work in a separate process to avoid increasing heap size of my sidekiq worker
Ishido has joined #ruby
<IbrahimA>
i think upstart or something will restart sidekiq if it dies, but i'll lose whatever it was working on i believe
<droptone>
*sigh*
<droptone>
Right, but did you see how I wasn't clear on which .find of the infinite .find methods I would be researching?
<apeiros>
droptone: contacts.class
<apeiros>
droptone: and then `ri ThatClass#find`
<apeiros>
not all that difficult
<droptone>
Right, but I clearly didn't understand that I needed to know the class to understand the context.
<droptone>
Hence me asking the question in the channel.
<ropeney>
IbrahimA, probably not a good solution
<apeiros>
droptone: great, so you learned something today
<Ox0dea>
And can you reckon on the rationale that might've gone into that?
cpup has joined #ruby
CloCkWeRX1 has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
Macaveli has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
<ujjain>
is this valid? timeout_exception = 'Execution Timeout Error: This deployment has taken too long to run'
<ujjain>
puts 'timeout_exception'
drewo has quit [Ping timeout: 260 seconds]
idefine has quit [Ping timeout: 265 seconds]
qwer has joined #ruby
<kgrz>
are you trying to print out the contents of variable `timeout_exception`?
<ujjain>
Yes
ur5us has joined #ruby
<kgrz>
puts timeout_exception is the valid call. No single quotes around the variable name
<qwer>
how to pass all arguments of the method to another method ?
<kgrz>
qwer: can you provide an example of what you're trying to achieve? pastebin or gist
Gasher has joined #ruby
<hanmac>
qwer: def meth1(*args); meth2(*args); end
<Caerus>
interesting
<Ox0dea>
qwer: Sounds like you might want to structure your thing so that you can just say `super`.
<qwer>
actually i just want to modify existing initialize() of external class
<qwer>
to modify one attribute when initialize() is finished
Puffball has quit [Ping timeout: 252 seconds]
<Caerus>
so the only way to make args non mutable is to define them as Constants? or is it common practice that you you want args not to be mutated you code so that they don't get tampered with
<Caerus>
*if you don't want*
<Ox0dea>
qwer: Then you probably want Module#prepend... and `super`. :P
CoderPuppy has joined #ruby
<hanmac>
qwer & Ox0dea i would probably do something like that: class X; prepend Module.new { def initialize(*); super; "your code there"; end }; end
<Ox0dea>
hanmac: Thank you for letting me know you would do what I would do.
cpup has quit [Ping timeout: 265 seconds]
goodroot has joined #ruby
<hanmac>
;p in one of my systems i had a function that did the "prepend Module.new" inside a function so you can do: class X; overwrite { ... }; end
marens has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<yorickpeterse>
mikecmpbll: pretty much, it however does re-use memory
RegulationD has quit [Ping timeout: 240 seconds]
last_staff has joined #ruby
<mikecmpbll>
hmpf. my delayed-jobs can use a heck of a lot of memory, some of the time
<yorickpeterse>
basically it allocates chunks of memory for objects. Whenever the objects are GC'd the memory is IIRC not released back to the OS but kept around, instead being re-used for any future objects
<mikecmpbll>
and i run workers in separate processes, so other processes aren't able to access that memory i guess.
<yorickpeterse>
Caerus: but probably not because of how you expect it to work
<yorickpeterse>
x += 1 in "mymethod" does a re-assign of "x" local to the method's body
<yorickpeterse>
the result of this is then returned
<yorickpeterse>
so the outer "y" is not modified because of what mymethod re-assigns, but because of what it returns and due to the outer re-assign of "y"
<yorickpeterse>
>> def mymethod(x); x +=1 end; y=1; mymethod(y); puts y
ur5us has quit [Remote host closed the connection]
grenierm has quit [Quit: grenierm]
<iszak>
I only use IRC in the terminal in irssi
soc42 has joined #ruby
millerti has joined #ruby
<Ox0dea>
That's a weird way to spell WeeChat.
<Caerus>
Ox0dea, interesting, so it's either arg1 or &arg2 the later being the mutable one?
<Ox0dea>
Caerus: No, &arg2 is a block parameter.
drewo has quit [Ping timeout: 265 seconds]
<Ox0dea>
Caerus: Array, Hash, and String are mutable.
<Caerus>
oh, proc, I missed it
Azure has quit [Remote host closed the connection]
<Caerus>
gotcha, thanks.
elaptics is now known as elaptics`away
<Ox0dea>
Most anything but Fixnums and Symbols can be mutated in-place, but you have to get your hands dirty for certain things.
elaptics`away is now known as elaptics
<Caerus>
getting dirty sometimes help with learning, I'm sure it's sane for ruby to behave like that but digging up sometimes makes learning more solid
<Caerus>
provided that you don't go down the rabbit hole xD
Madplatypus has quit [Quit: Connection closed for inactivity]
GodFather has joined #ruby
|ifei5g00d has quit [Ping timeout: 246 seconds]
Luna_Moonfang has quit [Remote host closed the connection]
Luna_Moonfang has joined #ruby
jaguarmagenta has joined #ruby
<apeiros>
Ox0dea: will take a look after lunch break
d0lph1n98 has joined #ruby
umdstu has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
<apeiros>
RB_ENCODING_GET looks fancy
<apeiros>
errr, ENCODING_GET
brunto has joined #ruby
karapetyan has joined #ruby
inukshuk_ has joined #ruby
chipotle has joined #ruby
karapetyan has quit [Remote host closed the connection]
DanyC has quit []
rodfersou has joined #ruby
inukshuk_ has quit [Client Quit]
nobitanobi has quit [Remote host closed the connection]
* Caerus
yawnz*
Yiota has joined #ruby
<Caerus>
don't know how I substituted call-by-reference with its opposite call-by-value, that's so destructive
<Caerus>
also my cue that I should stop reading and go to bed, see ya later #ruby thank you all for the help :)
blackjid has quit [Ping timeout: 250 seconds]
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
Caerus is now known as Caerus|Away
tpendragon has quit [Ping timeout: 250 seconds]
aguynamedben has quit [Ping timeout: 250 seconds]
emiltin has quit [Read error: Connection reset by peer]
b|ackwolf is now known as blackwolf
neanderslob has quit [Remote host closed the connection]
johnmilton has joined #ruby
deadnull_ has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drewo has joined #ruby
Rickmasta has joined #ruby
stannard has joined #ruby
r_rios has joined #ruby
r_rios has joined #ruby
r_rios has quit [Changing host]
d0lph1n98 has quit [Ping timeout: 260 seconds]
drewo has quit [Ping timeout: 244 seconds]
hk238 has quit [Ping timeout: 276 seconds]
chouhoulis has joined #ruby
tatsuo has joined #ruby
jespada has joined #ruby
jespada has quit [Client Quit]
grs has joined #ruby
stannard has quit [Ping timeout: 250 seconds]
roshanavand has joined #ruby
blackmes1 has quit [Ping timeout: 265 seconds]
nadir has quit [Quit: Connection closed for inactivity]
nobitanobi has joined #ruby
idefine has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.3]
finnnnnnnnnnn has joined #ruby
idefine has quit [Ping timeout: 265 seconds]
<apeiros>
Ox0dea: seems like you hit that when the two strings have a different encoding which is not considered to be comparable, and then it's the index of the encoding which decides <=> (which makes little to no sense to me - but that's how I read it)
<apeiros>
can't test since rb_str_comparable is not accessible from ruby and I don't feel like writing native code just for this :)
ferr has joined #ruby
gnufied has joined #ruby
hanmac has quit [Ping timeout: 250 seconds]
tvw has quit [Remote host closed the connection]
blackmes1 has joined #ruby
zacstewart has joined #ruby
<Ox0dea>
apeiros: Right, it was that <=> which struck me as perfectly nonsensical.
<Ox0dea>
Feels very "PHP". :/
drptbl_ has joined #ruby
zacstewart has quit [Ping timeout: 250 seconds]
<apeiros>
yeah. comparing encodings instead of strings in case of incompatible encodings makes no sense IMO
<apeiros>
should just return nil
saneax is now known as saneax_AFK
<apeiros>
like any other incomparables
noServic1 has joined #ruby
drptbl has quit [Ping timeout: 265 seconds]
Madmanden has joined #ruby
synthroid has joined #ruby
blackmes1 has quit [Ping timeout: 265 seconds]
Madmanden has quit [Remote host closed the connection]
platzhirsch has quit [Quit: WeeChat 1.4]
kareeoleez has quit [Remote host closed the connection]
RegulationD has joined #ruby
noService has quit [Ping timeout: 265 seconds]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
<shevy>
we must use one true encoding
<apeiros>
there is no one true encoding
<apeiros>
utf-8, which you love so much, comes somewhat close to it, though.
<arahael>
or just compare bytes!
<arahael>
might not be lexographical order though.
hanmac has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
ldnunes has joined #ruby
mikecmpb_ has joined #ruby
Madmande_ has joined #ruby
xpt has left #ruby ["WeeChat 1.4"]
saneax_AFK is now known as saneax
Madmande_ has quit [Client Quit]
d0lph1n98 has joined #ruby
banister has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
<apeiros>
Ox0dea, arahael: oooh, actually it *does* compare the bytes
GinoManWorks has joined #ruby
<apeiros>
it only resorts to the encodings once they're the same
kdisneur has joined #ruby
terlar has joined #ruby
norc__ has joined #ruby
stannard has joined #ruby
bronson has joined #ruby
crameth has joined #ruby
Madmanden has joined #ruby
stannard has quit [Ping timeout: 252 seconds]
sdothum has joined #ruby
dionysus69 has joined #ruby
karapetyan has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
hays has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
chouhoulis has quit [Remote host closed the connection]
nerium has joined #ruby
nchambers has quit [Changing host]
nchambers has joined #ruby
drewo has joined #ruby
kkeuning has joined #ruby
zenspider has quit [Read error: Connection reset by peer]
sarbs has quit [Ping timeout: 244 seconds]
iamvery has quit [Ping timeout: 260 seconds]
wldcordeiro has quit [Ping timeout: 244 seconds]
kies has quit [Ping timeout: 276 seconds]
zenspider has joined #ruby
iamvery has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ifsp has quit [Ping timeout: 276 seconds]
sarbs has joined #ruby
karapetyan has quit [Ping timeout: 265 seconds]
pLaTo0n has joined #ruby
Symbiosisz has quit [Ping timeout: 276 seconds]
chouhoulis has joined #ruby
jancel has joined #ruby
hays has joined #ruby
drewo has quit [Ping timeout: 276 seconds]
andikr has quit [Remote host closed the connection]
pLaToOn has quit [Ping timeout: 276 seconds]
GodFather has quit [Ping timeout: 240 seconds]
aufi has quit [Ping timeout: 276 seconds]
zast has joined #ruby
giz|work has joined #ruby
|2701 has joined #ruby
jgt has quit [Ping timeout: 260 seconds]
terlar has quit [Quit: WeeChat 1.5]
terlar has joined #ruby
hays has quit [Read error: Connection reset by peer]
hays has joined #ruby
evidex has joined #ruby
stardiviner has quit [Ping timeout: 240 seconds]
brunto has quit [Ping timeout: 240 seconds]
tesuji_ has joined #ruby
araujo_ has joined #ruby
wldcordeiro has joined #ruby
dANOKELOFF has joined #ruby
stannard has joined #ruby
davedev24 has joined #ruby
Symbiosisz has joined #ruby
araujo has quit [Ping timeout: 265 seconds]
skalfyfan has joined #ruby
budhram has joined #ruby
stannard has quit [Ping timeout: 265 seconds]
rubyaw has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<budhram>
hello folks, I have heard that it is not recommended to checkin Gemfile.lock while building Ruby Gem. I have searched for its reason but couldn't get the perfect answer. Could anybody help me to understand its valid point of not checkin Gemfile.lock?
<budhram>
Thanks
jdawgaz has joined #ruby
last_staff has quit [Quit: last_staff]
tatsuo has quit [Remote host closed the connection]
blackmes1 has joined #ruby
saneax is now known as saneax_AFK
hays_ has joined #ruby
cpup has joined #ruby
hays has quit [Ping timeout: 246 seconds]
rbennacer has quit [Remote host closed the connection]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stardiviner has joined #ruby
CoderPuppy has quit [Ping timeout: 244 seconds]
skalfyfan has joined #ruby
<apeiros>
budhram: I don't use Gemfile's at all when building gems. but when I have a Gemfile, I think it makes the most sense to check-in the Gemfile.lock too
<budhram>
apeiros, thanks for response. Would like to see what opinion other have
kareeoleez has joined #ruby
skalfyfan has quit [Client Quit]
saneax_AFK is now known as saneax
finnnnnnnnnnn has joined #ruby
ifsp has joined #ruby
<norc__>
apeiros: I prefer to keep that to myself. Why should other people avoid the pain I had to go through, figuring out which Oracle dependencies are broken.
skalfyfan has joined #ruby
<apeiros>
eeehehehe
<norc__>
Knowing that they are suffering just as much as I was is what gets me through the day.
<apeiros>
shared pain is half the pain?
<Ox0dea>
Double.
<apeiros>
Ox0dea: so you side with commander data on this? :)
<Ox0dea>
apeiros: Pain is the greatest teacher, and we must always be ready to realize we're in Her classroom at all times.
blackmes1 has quit [Ping timeout: 260 seconds]
<Ox0dea>
Er, I didn't mean to equate Pain with God there, but maybe that's a thing?
<norc__>
apeiros: Plus if being an asshole dictator is fine for having led the most widely used C library, then surely that sort of behaviour can't be bad for me.
ramortegui has joined #ruby
brunto has joined #ruby
<Ox0dea>
Assholes that GSD are absolved of all their sins.
<apeiros>
GSD?
<norc__>
get shit done
<Ox0dea>
I learned that from Ayn Rand, so take it as gospel.
nobitanobi has quit [Remote host closed the connection]
<apeiros>
I'd disagree. but I have no intention of arguing my point :)
<mikecmpb_>
Penthos the greek god of mourning and lamentation :'(
<norc__>
Ox0dea: You see, and I cannot get shit done with the current state of my surroundings.
<norc__>
Do you know understand my pain?
<norc__>
*now
<Ox0dea>
norc__: Do you know how to start a fire?
Madmanden has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc__>
Ox0dea: We had this crash course in the military once.
<Ox0dea>
norc__: I swear I meant it in the figurative sense.
<norc__>
;)
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaguarmagenta has joined #ruby
millerti has joined #ruby
minimalism has quit [Quit: minimalism]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
koooge has quit [Quit: Leaving...]
GodFather has joined #ruby
lxsameer has joined #ruby
roamingdog has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
Ouchy has joined #ruby
scepticulous has quit [Ping timeout: 265 seconds]
tvw has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blandflakes has joined #ruby
skalfyfan has joined #ruby
rubyaw has quit [Quit: Leaving...]
fmcgeough has joined #ruby
pawnbox has quit [Remote host closed the connection]
aguynamedben has joined #ruby
nadir has joined #ruby
aguynamedben has quit [K-Lined]
kkeuning has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
drewo has joined #ruby
tvw has quit []
edavis_ is now known as edavis
blur3d has quit [Quit: blur3d]
stannard has joined #ruby
duoi has quit [Ping timeout: 250 seconds]
jancel has quit [Remote host closed the connection]
drewo has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
malconis has joined #ruby
duoi has joined #ruby
jaruga___ has joined #ruby
aegis3121 has joined #ruby
malconis has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
jgt has joined #ruby
stannard has quit [Ping timeout: 276 seconds]
robh71 has joined #ruby
nobitanobi has joined #ruby
karmatr0n has joined #ruby
gooodroot has joined #ruby
malconis has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TvL2386 has quit [Remote host closed the connection]
goodroot has quit [Ping timeout: 244 seconds]
noServic1 has quit [Quit: leaving]
noService has joined #ruby
CloCkWeRX1 has quit [Ping timeout: 260 seconds]
weemsledeux has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Bish>
can somebody tell me, how to automaticially break new pages with squid and prawn ( pdf creation )
<Bish>
if was about to do 3000.times do text "text" end, it would break to a new page, when the end of the current is reached
<Bish>
if i do that with squid graphs, it simply writes over it
<Bish>
like in dead space
stannard has joined #ruby
anisha has quit [Quit: Leaving]
r_rios has quit [Quit: Konversation terminated!]
karapetyan has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duoi has quit [Ping timeout: 276 seconds]
jdawgaz has joined #ruby
duoi has joined #ruby
kies has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
pandaant has joined #ruby
zacstewart has joined #ruby
jobewan has joined #ruby
jancel has joined #ruby
idefine has joined #ruby
`tim` has joined #ruby
karapetyan has joined #ruby
malconis has joined #ruby
douglascorrea has joined #ruby
tpendragon has joined #ruby
aguynamedben has joined #ruby
platzhirsch has joined #ruby
tesuji_ has quit [Read error: Connection reset by peer]
blackjid has joined #ruby
karapetyan has quit [Ping timeout: 246 seconds]
idefine has quit [Ping timeout: 265 seconds]
blackjid has quit [K-Lined]
aguynamedben has quit [K-Lined]
tpendragon has quit [K-Lined]
anisha has joined #ruby
CloCkWeRX has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
blackwolf has quit [Ping timeout: 260 seconds]
nobitano_ has joined #ruby
rbennace_ has joined #ruby
finnnnnnnnnnn_ has joined #ruby
nobitanobi has quit [Ping timeout: 250 seconds]
douglascorrea has quit []
finnnnnnnnnnn has quit [Ping timeout: 276 seconds]
codecop has quit [Remote host closed the connection]
quakephil has joined #ruby
azor has quit [Ping timeout: 246 seconds]
<quakephil>
is there a way to load a sqlite3 in ruby using a different schema name? essentially something like 'attach blah.sqlite3 as different_schema_name' but in database.yml?
akkmaxon has joined #ruby
<apeiros>
sqlite3 has schemas? :D
nobitanobi has quit [Ping timeout: 244 seconds]
pLaTo0n has quit [Read error: Connection reset by peer]
<quakephil>
if you issue a create table blah.mycooltable it will work, but you will have to attach db.sqlite3 as blah to be able to access it
<quakephil>
so it looks like it has schemas on the command line
araujo_ has quit [Quit: Leaving]
<apeiros>
I never knew
<apeiros>
interesting
idle_task has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
idletask has quit [Ping timeout: 252 seconds]
rbennace_ has quit []
<quakephil>
i'm using it to facilitate rspec tests, whereas production db is a mysql with actual schemas, so I need this functionality in database.yml but I donno how to tell ruby to access the blah schema (gem must be loading it with the default "main" schema and therefore can't find my tables)
millerti has joined #ruby
griffindy has joined #ruby
<apeiros>
given that you're in a rails context, I'd ask over there. but I somewhat doubt that rails can do that via database.yml
<apeiros>
if at all, you'll probably have to write an initializer
sarbs has joined #ruby
<apeiros>
might even be necessary to do it on creation of each db connection
<quakephil>
actually i'm not in rails, i'm in grape
rbennacer has joined #ruby
<quakephil>
wonderful...
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whippythellama has joined #ruby
sdwrage has joined #ruby
<apeiros>
IMO you should use the same db for tests anyway
banister has joined #ruby
drewo has joined #ruby
<quakephil>
we use codeship for qa and they can't tunnel to our databases
eljimbo has joined #ruby
<apeiros>
ok, let me rephrase: same db software
<apeiros>
doesn't need to be the very same server
PickAndMix has joined #ruby
blackwolf has joined #ruby
<quakephil>
yeah you do have a point there
<quakephil>
i just thought sqlite+ruby was mature enough by now
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
actually I'd even prefer not using the same server for envs != prod as prod. for the other envs, not sure I'd care.
mostlybadfly has joined #ruby
<quakephil>
obviously our prod is separate server, vpc, etc
agent_white has joined #ruby
<agent_white>
Mornin'
<quakephil>
of course its a problem installing mysql on codeship all the same
Caerus|Away has quit [Ping timeout: 276 seconds]
sdwrage_ has joined #ruby
drewo has quit [Ping timeout: 250 seconds]
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has joined #ruby
<umdstu>
anyone know why the git unignore operator (!) would not be working on os x? (2.3.2 apple git-55)
futilegames has joined #ruby
bronson has joined #ruby
sdwrage has quit [Ping timeout: 260 seconds]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has joined #ruby
emilkarl has joined #ruby
tatsuo has joined #ruby
kareeoleez has quit [Remote host closed the connection]
sdwrage_ has quit [Quit: Leaving]
bronson has quit [Ping timeout: 252 seconds]
blackjid has joined #ruby
aguynamedben has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
tpendragon has joined #ruby
futilegames has quit [Quit: futilegames]
duoi has quit [Ping timeout: 276 seconds]
senayar_ has joined #ruby
ravishankarjha has quit []
senayar has quit [Read error: Connection reset by peer]
smathy has joined #ruby
duoi has joined #ruby
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
davedev24 has quit []
[Butch] has joined #ruby
grenierm has joined #ruby
jdawgaz has joined #ruby
smathy is now known as smathy_afk
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
moeabdol has quit [Ping timeout: 250 seconds]
aegis3121 has quit [Ping timeout: 244 seconds]
siovene has quit [Quit: Connection closed for inactivity]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
grenierm has joined #ruby
chouhoulis has quit [Remote host closed the connection]
aufi has joined #ruby
banister has joined #ruby
noService has quit [Ping timeout: 246 seconds]
finnnnnnnnnnn has joined #ruby
matp has quit [Ping timeout: 240 seconds]
Devalo has joined #ruby
dopamean_ has joined #ruby
noService has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
anisha has quit [Quit: Leaving]
karapetyan has joined #ruby
<quakephil>
So I have a calculated column in my ar model (like this: http://stackoverflow.com/questions/1982778/concat-two-fields-activerecord ) but I'm stumped how to select it.. I tried Myarclass.select('usual,fields', :calculated_field).other().stuff() ... but that just gave me 'calculated_field' as calculated_field instead of what I have in my def.... am I missing something obvious here?
Mia has joined #ruby
duderonomy has quit [Ping timeout: 240 seconds]
SilverKey has joined #ruby
ahai has quit [Quit: WeeChat 1.4]
duderonomy has joined #ruby
<quakephil>
If I do select('*') its not there either...
freerobby has quit [Client Quit]
<quakephil>
fuck it, I'll just have the front end do it
inukshuk_ has joined #ruby
noService has quit [Ping timeout: 276 seconds]
polishdub has joined #ruby
inukshuk_ has quit [Client Quit]
matp has joined #ruby
Kim^J has left #ruby [#ruby]
karapetyan has quit [Ping timeout: 260 seconds]
<havenwood>
quakephil: Show the real code? Might be nice to do it in Ruby! :)
perturbation has quit [Quit: Leaving]
freerobby has joined #ruby
<havenwood>
quakephil: Just for future reference, there's a #rubyonrails channel specifically for Rails stuff.
dionysus69 has quit [Ping timeout: 246 seconds]
skalfyfan has joined #ruby
malconis has joined #ruby
<apeiros>
and AR is considered rails stuff, even when used outside of it, like e.g. in grape ;-)
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
Active/Action/Turbo/Adequate -> Rails
rbennacer has quit [Remote host closed the connection]
trinaldi has quit [Quit: WeeChat 1.5-rc1]
evidex has quit [Ping timeout: 260 seconds]
akkmaxon has quit [Quit: Konversation terminated!]
rbennacer has joined #ruby
hobodave has joined #ruby
rikai has quit [Quit: No Ping reply in 180 seconds.]
evidex has joined #ruby
<Ouchy>
Does Ruby install on windows with WAMP well, without rails?
bruno- has joined #ruby
<quakephil>
havenwood: I'm not using rails, I'm using grape, does that chan still apply?
<quakephil>
apeiros: ok gotcha, I'll check there if I'm still stuck...
<havenwood>
quakephil: If it's ActiveRecord that's where the most people using AR can be found.
<havenwood>
quakephil: There are plenty here as well but it's a component of Rails.
<havenwood>
Sequel!
grenierm has quit [Quit: grenierm]
finisherr has left #ruby [#ruby]
Devalo has quit [Remote host closed the connection]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akkmaxon has joined #ruby
saneax is now known as saneax_AFK
Ch4rAss has joined #ruby
dionysus69 has joined #ruby
blandflakes has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
drewo has quit [Ping timeout: 260 seconds]
tubbo has joined #ruby
chouhoulis has joined #ruby
qwer has left #ruby [#ruby]
rikai has joined #ruby
blackmes1 has joined #ruby
aganov has quit [Remote host closed the connection]
skalfyfan has joined #ruby
chopin has joined #ruby
jgt has quit [Ping timeout: 250 seconds]
ferr has quit [Ping timeout: 252 seconds]
blackmes1 has quit [Ping timeout: 276 seconds]
rkazak has joined #ruby
idle_task is now known as idletask
joneshf-laptop has joined #ruby
jancel has quit [Remote host closed the connection]
bruno- has quit [Read error: Connection reset by peer]
tvw has joined #ruby
bruno- has joined #ruby
aufi has quit [Ping timeout: 250 seconds]
codecop has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
Madmanden has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
failshell has joined #ruby
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robh71 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
symm- has joined #ruby
skalfyfan has joined #ruby
Amnez777 has quit [Ping timeout: 246 seconds]
hk238 has joined #ruby
dhollinger has joined #ruby
Alina-malina has quit [Ping timeout: 260 seconds]
openstruct has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
jds has joined #ruby
ddffg has quit [Quit: Leaving]
ramortegui has quit [Read error: Connection reset by peer]
ramortegui has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
wldcordeiro has quit [Ping timeout: 246 seconds]
rodfersou is now known as rodfersou|lunch
tvw has quit [Ping timeout: 265 seconds]
roamingdog has quit []
Yeomra has joined #ruby
jhack has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramortegui has left #ruby [#ruby]
<kgrz>
havenwood: that Active/Action... should be a IRC msg shorthand :D
<kgrz>
(I don't know what they are called)
tvw has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
jgt has joined #ruby
bruno- has joined #ruby
ekinmur has joined #ruby
skalfyfan has joined #ruby
Yiota has joined #ruby
rippa has joined #ruby
blackmes1 has joined #ruby
nobitanobi has joined #ruby
GnuYawk has joined #ruby
GnuYawk has quit [Changing host]
GnuYawk has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
deadnull_ is now known as _deadnull
jancel has joined #ruby
chouhoulis has quit [Remote host closed the connection]
nobitano_ has quit [Ping timeout: 252 seconds]
edwinvdgraaf has quit [Ping timeout: 252 seconds]
Gasher has quit [Ping timeout: 276 seconds]
RegulationD has joined #ruby
GodFather has quit [Ping timeout: 276 seconds]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
terlar has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
giz|work has quit [Ping timeout: 260 seconds]
ferr has joined #ruby
skalfyfan has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
platzhirsch has quit [Quit: WeeChat 1.4]
blackmes1 has quit [Ping timeout: 252 seconds]
mtkd has quit [Ping timeout: 276 seconds]
xxneolithicxx has joined #ruby
moeabdol has joined #ruby
tvw has quit [Ping timeout: 244 seconds]
mtkd has joined #ruby
blandflakes is now known as mid-afternoonwal
mid-afternoonwal is now known as middaywalker
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
whathappens has joined #ruby
davedev24 has joined #ruby
budhram has quit [Quit: Leaving]
moeabdol has quit [Ping timeout: 250 seconds]
idefine has joined #ruby
antgel has quit [Ping timeout: 246 seconds]
idefine has quit [Remote host closed the connection]
Tichodroma has quit [Ping timeout: 260 seconds]
xall has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skalfyfan has joined #ruby
drewo has joined #ruby
rkazak has quit [Ping timeout: 276 seconds]
robh71 has joined #ruby
skade has joined #ruby
diegoaguilar has joined #ruby
akkmaxon has quit [Remote host closed the connection]
kgrz has quit [Ping timeout: 276 seconds]
drewo has quit [Ping timeout: 260 seconds]
akkmaxon has joined #ruby
idefine has quit [Remote host closed the connection]
pietr0 has joined #ruby
smathy_afk is now known as smathy
amclain has joined #ruby
LastWhisper____ has joined #ruby
rbennacer has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
bruno- has quit [Read error: Connection reset by peer]
idefine has joined #ruby
kareeoleez has joined #ruby
dANOKELOFF has quit [Quit: Ex-Chat]
TomyWork has quit [Ping timeout: 244 seconds]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
brunto has quit [Ping timeout: 260 seconds]
Couch has quit [Ping timeout: 246 seconds]
akkmaxon has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
akkmaxon has joined #ruby
karapety_ has joined #ruby
CausaMortis has quit [Read error: Connection reset by peer]
failshell has quit []
bruno- has joined #ruby
skolman_ has joined #ruby
symm- has quit [Ping timeout: 276 seconds]
karapetyan has quit [Ping timeout: 276 seconds]
skalfyfan has joined #ruby
stannard has quit [Remote host closed the connection]
karapety_ has quit [Remote host closed the connection]
benlieb has joined #ruby
stannard has joined #ruby
skalfyfan has quit [Client Quit]
skalfyfan has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
smathy is now known as smathy_afk
grs has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
danostrowski has joined #ruby
nando293921 has joined #ruby
noService has joined #ruby
nrd_pxs has joined #ruby
kareeoleez has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
jhack has quit [Ping timeout: 246 seconds]
Snowy has quit [Quit: ragequit]
smathy_afk is now known as smathy
__swanson has joined #ruby
millerti has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
senayar_ has quit []
chouhoulis has joined #ruby
<__swanson>
I'm trying to upgrade a project from ruby 2.2 -> 2.3.1 and seeing strange behavior with the CSV library in 2.3.1. Am I missing something obvious? Checked bug tracker and release notes and didn't see anything about CSV issues: https://gist.github.com/swanson/7d551c3e479ab46871bac1bf7070048c
<__swanson>
CSV loads fine in 2.2, but gives undefined constant in 2.3.1
<__swanson>
rubies installed via rbenv on osx
rubyaw has joined #ruby
kgrz has joined #ruby
<kgrz>
troulouliou_div2 has joined #ruby
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whathappens has quit [Remote host closed the connection]
<hanmac>
__swanson: maybe something else does prevent the csv from loading? what does "require 'csv'; $LOADED_FEATURES.last" return?
<havenwood>
__swanson: Can you require anything else in the stdlib? If we keep telling people to tweet @DHH for rbenv support will they deprecate in favor of chruby? :P
hobodave_ has quit [Read error: Connection reset by peer]
hobodave_ has joined #ruby
<__swanson>
I don't suppose there is a diagnostic or checksum to verify the install, is there?
mikecmpb_ has quit [Ping timeout: 240 seconds]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
Asher has joined #ruby
Asher has quit [Client Quit]
mikecmpbll has quit [Ping timeout: 246 seconds]
<havenwood>
__swanson: Well, ruby-install will check MD5, SHA1, SHA256 and SHA512 checksums of the Rubies it downloads. You can make test and such to confirm that things check out.
azor has joined #ruby
hobodave has quit [Ping timeout: 265 seconds]
Eiam has joined #ruby
akkmaxon has quit [Remote host closed the connection]
<havenwood>
__swanson: make test-all TESTS=-v
Yiota has joined #ruby
<__swanson>
from which directory?
QORRiE has joined #ruby
<havenwood>
__swanson: src root dir
<__swanson>
thanks, reinstalling almost finished -- will try it out
<havenwood>
__swanson: make test-all TESTS=csv/test_csv.rb
finnnnnnnnnnn_ has joined #ruby
Zarthus has quit [Quit: I can't go to hell. I'm all out of vacation days.]
finnnnnnnnnnn has quit [Ping timeout: 260 seconds]
finnnnnnnnnnn_ is now known as finnnnnnnnnnn
<__swanson>
reinstall + running the irb snippet above is working now
babblebre has joined #ruby
<__swanson>
appreciate the help debugging, thanks!
DanyC has joined #ruby
<havenwood>
__swanson: de nada
RegulationD has quit [Remote host closed the connection]
whathappens has quit [Remote host closed the connection]
sarbs has quit [Max SendQ exceeded]
Zarthus has joined #ruby
sarbs has joined #ruby
akkmaxon has joined #ruby
The_Phoenix has joined #ruby
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
ctp has joined #ruby
Zarthus has quit [Client Quit]
kgrz has quit [Ping timeout: 265 seconds]
akkmaxon has quit [Remote host closed the connection]
__swanson has quit [Ping timeout: 250 seconds]
blackmes1 has joined #ruby
Zarthus has joined #ruby
|2701 has quit [Quit: Connection closed for inactivity]
Asher has joined #ruby
akkmaxon has joined #ruby
Dimik has joined #ruby
Guest2 has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Array#<=> usually does element-wise comparison; the hell's going on here?
<Mon_Ouie>
nil <=> ''
<Mon_Ouie>
is also nil, because you can't compare nil with a string
troulouliou_div2 has quit [Quit: Leaving]
kareeoleez has quit [Remote host closed the connection]
<Ox0dea>
Right, duh. Forgot that wasn't an error.
wrkrcoop has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
<wrkrcoop>
when i try to install jruby using rvm, i get this error: ‘'command gem pristine --version ' failed, you need to fix this gems manually.’
<CustosLimen>
ok, so lets say I load json with JSON.parse - is there easy way I can traverse the whole structure/tree (recursively) and replace all occurences of '{ "$minKey" : 1 }' with Sorting::Smaller ?
justin_pdx has quit [Quit: justin_pdx]
<wrkrcoop>
my thought is ‘just install pristine’ … is that logical?
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
tvw has joined #ruby
kgrz has quit [Ping timeout: 276 seconds]
malconis has joined #ruby
<wrkrcoop>
maybe its because i dont have jdk installed
chouhoulis has quit [Remote host closed the connection]
ljames has quit []
kareeoleez has joined #ruby
troulouliou_div2 has joined #ruby
chouhoulis has joined #ruby
elifoster has joined #ruby
rodfersou|afk is now known as rodfersou
bruno- has quit [Read error: Connection reset by peer]
xxneolithicxx has quit [Quit: Leaving.]
bruno- has joined #ruby
skolman has quit [Remote host closed the connection]
diegoviola has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
skolman_ has joined #ruby
kareeoleez has quit [Ping timeout: 265 seconds]
terminal_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
kareeoleez has joined #ruby
Puffball has joined #ruby
roger_rabbit has joined #ruby
skolman_ has quit [Ping timeout: 260 seconds]
SilverKey has quit [Quit: Halted.]
<havenwood>
wrkrcoop: What version of JRuby are you installing?
<wrkrcoop>
havenwood: just installed jruby 1.7.19
<wrkrcoop>
should i now install jruby 9000?
<havenwood>
wrkrcoop: Yeah, use 9.1.0.0
<havenwood>
wrkrcoop: rvm get head
<wrkrcoop>
havenwood: company is using 9000
blackmes1 has joined #ruby
<havenwood>
wrkrcoop: The latest 1.7 is 1.7.25 but 9.1 is better yet!
terminalrecluse has joined #ruby
cdg has quit [Remote host closed the connection]
<wrkrcoop>
havenwood: just to clarify, jruby 9000 is the interpreter or virtual machine, and 1.7 is the language version?
aegis3121 has joined #ruby
Madmanden has joined #ruby
nankyokusei has joined #ruby
giz|work has quit [Ping timeout: 260 seconds]
giz|work has joined #ruby
dhollinger has quit [Ping timeout: 260 seconds]
MissionCritical has quit [Ping timeout: 244 seconds]
SilverKey has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<wrkrcoop>
so they’re both engines, but they are not the same engine …
arpegius has joined #ruby
grenierm has quit [Quit: grenierm]
<arpegius>
Hash[phone_numbers.map{ |f| [f.id,{value:f.value,title:f.title,is_primary:f.is_primary}]}] can I define that object schema a little more susinctly somehow?
sauvin has quit [Read error: Connection reset by peer]
grenierm has joined #ruby
nadav has quit [Changing host]
nadav has joined #ruby
dvinciguerra has joined #ruby
benlieb has joined #ruby
jwren has joined #ruby
rkazak has joined #ruby
blackmes1 has joined #ruby
nerium has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 252 seconds]
nobitano_ has quit [Remote host closed the connection]
pglombardo has quit []
malconis has quit [Ping timeout: 276 seconds]
dionysus69 has quit [Ping timeout: 276 seconds]
malconis has joined #ruby
shinnya has quit [Ping timeout: 276 seconds]
grenierm has quit [Quit: grenierm]
spider-mario has joined #ruby
bluOxigen has joined #ruby
kkeuning has joined #ruby
nerium has quit [Quit: nerium]
deadhound has joined #ruby
freerobby has joined #ruby
middaywalker has quit [Changing host]
middaywalker has joined #ruby
UKn0Me has quit [Ping timeout: 260 seconds]
|2701 has quit [Changing host]
|2701 has joined #ruby
noService has quit [Ping timeout: 260 seconds]
freerobby has quit [Client Quit]
bluOxigen_ has quit [Ping timeout: 240 seconds]
spectra has quit [Ping timeout: 260 seconds]
Contigi has joined #ruby
Nahra has joined #ruby
Emmanuel_Chanel has joined #ruby
malconis has quit [Ping timeout: 260 seconds]
malconis has joined #ruby
freerobby has joined #ruby
symm- has joined #ruby
Amnez777 has joined #ruby
freerobby has quit [Client Quit]
UKn0Me has joined #ruby
dionysus69 has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
dhollinger has quit [Quit: WeeChat 1.4]
rkazak has quit [Ping timeout: 265 seconds]
wrkrcoop has quit [Quit: wrkrcoop]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacstewart has joined #ruby
Alina-malina has joined #ruby
dhollinger has joined #ruby
* smathy
does NOT answer f.slice for a change
bruno- has joined #ruby
Puffball has joined #ruby
Madmanden has quit [Quit: Later gator]
wrkrcoop has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 260 seconds]
chouhoulis has quit []
jancel has quit [Remote host closed the connection]
ngscheurich has quit [Ping timeout: 250 seconds]
ngscheur1 has joined #ruby
spectra has joined #ruby
noService has joined #ruby
umdstu has quit [Quit: umdstu]
jdawgaz has joined #ruby
cherry_lin has quit [Read error: Connection reset by peer]
<matled>
mynameisbrian: empty hash and empty block are both {}, so if you have 'puts {}' it is interpreted as puts with a block, whereas puts({}) disambiguates it to be a has as the first argument
<stringn00b>
I'm trying to format the following text into a string "\begin{document}", but using "\\begin{document}" gives me an error. How can I output \b as a normal string without using "\\ \bb"?
CoderPuppy has quit [Ping timeout: 244 seconds]
flashpoint9 has quit []
YP-QMUL-W has quit [Read error: Connection reset by peer]
<havenwood>
stringn00b: Do you mean to be interpolating anything?
<nixfreak>
if @browser.text_field(:id => 'request_id').exists?('20160510-06')
Devalo has joined #ruby
mwlang has joined #ruby
<nixfreak>
then I want to change it with increment_requestid method which I used your code
nobitanobi has quit [Remote host closed the connection]
<nixfreak>
how to can I .set that method ?
blackmes1 has quit [Ping timeout: 252 seconds]
aegis3121 has quit [Ping timeout: 252 seconds]
jhack has quit [Quit: jhack]
babblebre has quit [Quit: Connection closed for inactivity]
<stringn00b>
I am using string interpolation, but the only issue popping up is correctly outputing "\begin{tikzcd}" for pdflatex
jaiks has joined #ruby
<nixfreak>
does ruby have matches?
jgt has quit [Ping timeout: 276 seconds]
<nixfreak>
match say a number
<havenwood>
nixfreak: regexp?
<nixfreak>
then use regex to generate another one?
xaxisx has quit [Quit: xaxisx]
<havenwood>
nixfreak: What do you have and what do you want?
Ch4rAss has quit [Quit: Connection reset by beer..]
tvw has quit [Remote host closed the connection]
Ch4rAss has joined #ruby
skolman_ has quit [Remote host closed the connection]
<nixfreak>
If I put in a requestid like 20160510-01 I want to use watir-webdriver to see if that requestid exists and if it does create another one like incrementing by 1
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nixfreak>
does that make sense?
skolman_ has joined #ruby
xaxisx has joined #ruby
giz|work has quit [Ping timeout: 250 seconds]
<shevy>
dunno
Ch4rAss has quit [Client Quit]
<shevy>
you seem to be set on to let watir handle that
Ch4rAss has joined #ruby
<shevy>
you could manipulate or query the "20160510-01" yourself before passing into watir whatever it can handle too
hosttor has quit [Read error: Connection reset by peer]
ekinmur has joined #ruby
toretore has quit [Ping timeout: 276 seconds]
<nixfreak>
ok so query the request id that goes in the text_field then if it exists pass it something else
wrkrcoop has joined #ruby
roshanavand has joined #ruby
d5sx43 has joined #ruby
nobitanobi has joined #ruby
Devalo has quit [Remote host closed the connection]
ngscheur1 has joined #ruby
skolman_ has quit [Ping timeout: 265 seconds]
MissionCritical has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
yfeldblum has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
bruno- has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
bruno- has joined #ruby
PlasmaStar has quit [Ping timeout: 250 seconds]
sepp2k has joined #ruby
blackmes1 has joined #ruby
giz|work has joined #ruby
djbkd has joined #ruby
PlasmaStar has joined #ruby
synthroid has joined #ruby
GnuYawk has quit [Ping timeout: 246 seconds]
blackgoat has joined #ruby
minimalism has joined #ruby
Slackman_ has joined #ruby
The_Phoenix has quit [Quit: Leaving.]
zacstewart has joined #ruby
MissionCritical has joined #ruby
aegis3121 has joined #ruby
karapetyan has joined #ruby
jaiks has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
TomyLobo has joined #ruby
Ch4rAss has quit [Quit: leaving]
Ch4rAss has joined #ruby
stringn00b has quit [Quit: Page closed]
wrkrcoop has quit [Quit: wrkrcoop]
zeroDi has quit [Ping timeout: 260 seconds]
Don_John has joined #ruby
al2o3-cr has quit [Ping timeout: 260 seconds]
sp4rrow has joined #ruby
Don_John has quit [Client Quit]
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine_ has joined #ruby
jhack has joined #ruby
grenierm has joined #ruby
nobitanobi has quit [Remote host closed the connection]
idefine_ has quit [Remote host closed the connection]
Fernando-Basso has quit [Quit: Leaving]
karapetyan has quit [Ping timeout: 244 seconds]
idefine has quit [Ping timeout: 244 seconds]
grenierm has left #ruby [#ruby]
dmr8 has joined #ruby
idefine has joined #ruby
ixti has joined #ruby
sp4rrow has quit [Ping timeout: 276 seconds]
firstdayonthejob has joined #ruby
jenrzzz has joined #ruby
idefine has quit [Ping timeout: 244 seconds]
idefine has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sp4rrow has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has quit [Quit: WeeChat 1.4]
isxek has joined #ruby
roamingdog has joined #ruby
brunto has joined #ruby
dhs111_ has joined #ruby
<dhs111_>
hi
<havenwood>
hi
<dhs111_>
im trying to install ruby version manager, can i get some help on here?
<havenwood>
dhs111_: What trouble are you having?
freerobby has quit [Quit: Leaving.]
horaceheaven has joined #ruby
Ch4rAss has quit [Ping timeout: 250 seconds]
Dimik has quit []
eljimbo has quit [Quit: This computer has gone to sleep]
horaceheaven is now known as elfuego
<dhs111_>
i am following a guide, after typing in command : "curl -L get.rvm.io | bash -s stable" and reopening the terminal. The guide asks for command "type rvm | head -1" to return "rvm is a function" i do not get that
freerobby has joined #ruby
<dhs111_>
i am getting "rvm not found"
johnmilton has quit [Remote host closed the connection]
<adaedra>
what did the command above said?
<adaedra>
(the curl ...)
banister has joined #ruby
banister has quit [Client Quit]
<dhs111_>
it printed out a lot of stuff
<dhs111_>
guide said "This will do some stuff and print a long message which you can ignore."
<adaedra>
sigh.
<elfuego>
i’m getting a string from an external source in the format “”test string””, but i’m getting the following error: syntax error, unexpected tIDENTIFIER, expecting end-of-input , is there a way to parse this symbol to be a string?
<havenwood>
dhs111_: rvm get head --auto-dotfiles
dmr8 has quit [Quit: Leaving]
<adaedra>
havenwood: well, if it says "rvm not found", I'm not sure this would work
<adaedra>
well, looking at the output looking for errors won't hurt.
karmatr0n has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.5]
<adaedra>
elfuego: have some code to see what you're trying?
ur5us has joined #ruby
bruce_lee has quit [Ping timeout: 260 seconds]
diego3 has joined #ruby
diego3 is now known as diegoviola
<dhs111_>
command give by heavenwood worked, for command "type rvm | head -1" i am getting "rvm is /home/dhs111/.rvm/bin/rvm" thanks, however guide which i am following expects output "rvm is a function"
jenrzzz has quit [Ping timeout: 244 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
jancel has joined #ruby
<adaedra>
is your terminal setup to start login shells?
<dhs111_>
i do not know, i am using kubuntu with terminal konsole ill look it up online
roamingdog has quit [Read error: Connection reset by peer]
bradleesand has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
weemsledeux has joined #ruby
jenrzzz has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
<Radar>
GOOD MORNING
roa has joined #ruby
<adaedra>
Not so loud, some people are idling here.
skolman_ has joined #ruby
Musashi007 has quit [Quit: Musashi007]
daftdolphin has quit [Remote host closed the connection]
nobitanobi has joined #ruby
<elfuego>
adaedra: i’m using JSON.parse to parse the string returned from get_current_etag, but since the quote surrounds the string its throwing unexpected token at '\"{\"__client_id\":
fmcgeough has quit [Quit: fmcgeough]
davedev24 has quit []
<adaedra>
mmh mmh.
aegis3121 has quit [Ping timeout: 250 seconds]
<adaedra>
also, didn't see it the first time: Hash.new -> {} (but you could also construct the #create_etag_hash in one time)
last_staff has quit [Quit: last_staff]
jancel has quit [Remote host closed the connection]
skolman_ has quit [Remote host closed the connection]
solocshaw has joined #ruby
biberu has quit []
skolman_ has joined #ruby
idefine_ has joined #ruby
derekbarber has joined #ruby
aegis3121 has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<adaedra>
for your problem, you could manually remove the double quotes at each ends, but that's quite manual
idefine_ has quit [Remote host closed the connection]
derekbarber has left #ruby [#ruby]
Devalo has joined #ruby
ledestin has joined #ruby
sluukkonen has quit [Ping timeout: 260 seconds]
jaguarmagenta has joined #ruby
charliesome has joined #ruby
skolman_ has quit [Ping timeout: 244 seconds]
sluukkonen has joined #ruby
nobitanobi has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nofxx has quit [Ping timeout: 276 seconds]
ur5us has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
charliesome_ has joined #ruby
postmodern has joined #ruby
cdg has quit [Ping timeout: 265 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
aegis3121 has quit [Ping timeout: 244 seconds]
greylevel has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
charliesome has quit [Ping timeout: 252 seconds]
goooodroot has quit [Ping timeout: 246 seconds]
mdw has joined #ruby
brunto_ has joined #ruby
johnmilton has joined #ruby
nobitanobi has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
aegis3121 has joined #ruby
brunto has quit [Ping timeout: 260 seconds]
al2o3-cr has joined #ruby
openstruct has quit [Remote host closed the connection]
jwren has quit [Quit: leaving]
ldnunes has quit [Quit: Leaving]
PlasmaStar has quit [Ping timeout: 250 seconds]
idefine_ has joined #ruby
idefine_ has quit [Remote host closed the connection]
mustmodify_ has joined #ruby
johnmilton has quit [Ping timeout: 276 seconds]
jancel has joined #ruby
<mustmodify_>
this is more of a general dev question but I have a new Ruby microservice. I was just writing an email asking how much data loss was acceptable for backups, etc.... realized I need to have some equivalent of a ping test. Just a test to make sure it's up because things go down... but it's not a ping test because I'm not testing a website. I'm testing ... that ... we're still receiving messages via UDP. So what's that called? :)
<mustmodify_>
QOS test?
PlasmaStar has joined #ruby
arpegius has quit [Quit: arpegius]
bobbycvi has joined #ruby
sp4rrow has quit [Ping timeout: 250 seconds]
<smathy>
Availability monitoring?
jwren has joined #ruby
djbkd has quit [Remote host closed the connection]
<mustmodify_>
ok, works for me.
jancel has quit [Remote host closed the connection]
Lomex has quit [Remote host closed the connection]
djbkd has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bronson has joined #ruby
bruno- has joined #ruby
millerti has joined #ruby
idefine has quit [Remote host closed the connection]
ekinmur has joined #ruby
idefine has joined #ruby
ferr has quit [Quit: WeeChat 1.4]
millerti has quit [Max SendQ exceeded]
djbkd has quit [Ping timeout: 244 seconds]
daftdolphin has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
johnmilton has joined #ruby
cdg has joined #ruby
SuperLag has quit [Remote host closed the connection]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mustmodify_ has left #ruby [#ruby]
mtkd has quit [Ping timeout: 246 seconds]
Parko has joined #ruby
diegoaguilar has joined #ruby
mtkd has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
skolman has joined #ruby
Yeomra has quit [Ping timeout: 252 seconds]
lacuna has joined #ruby
djbkd has joined #ruby
workmad3 has joined #ruby
kareeoleez has quit [Remote host closed the connection]
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
rodfersou has quit [Quit: leaving]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
azor has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
Denart_ has quit [Remote host closed the connection]
neanderslob has joined #ruby
Ebok has joined #ruby
elfuego has quit [Quit: elfuego]
Moblin has joined #ruby
Ebok has quit [Remote host closed the connection]
Moblin has quit [Remote host closed the connection]
Ebok has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
kareeoleez has joined #ruby
daftdolphin has quit []
d5sx43 has quit [Quit: Leaving...]
GodFather has joined #ruby
sp4rrow has joined #ruby
wldcordeiro has quit [Ping timeout: 252 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kareeoleez has quit [Ping timeout: 244 seconds]
malconis has joined #ruby
rbennacer has quit [Ping timeout: 252 seconds]
dvinciguerra has quit [Ping timeout: 276 seconds]
azor has joined #ruby
azor has left #ruby [#ruby]
sp4rrow has quit [Ping timeout: 244 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
karmatr0n has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Read error: Connection reset by peer]
Cohedrin has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
sp4rrow has joined #ruby
djbkd has joined #ruby
tatsuo has joined #ruby
[Butch] has quit [Ping timeout: 244 seconds]
gnufied has quit [Ping timeout: 252 seconds]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
idefine has quit [Remote host closed the connection]
Pumukel has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dhollinger has quit [Quit: WeeChat 1.4]
Ishido has quit [Remote host closed the connection]
kareeoleez has joined #ruby
hobodave_ has quit [Quit: Computer has gone to sleep.]
banister has joined #ruby
idefine_ has joined #ruby
SilverKey has quit [Quit: Halted.]
finisherr has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
aegis3121 has quit [Ping timeout: 265 seconds]
kareeoleez has quit [Ping timeout: 246 seconds]
Madplatypus has joined #ruby
SilverKey has joined #ruby
CausaMortis has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
TomyLobo has quit [Ping timeout: 246 seconds]
crystal77 has joined #ruby
nixfreak has quit [Ping timeout: 250 seconds]
bruno- has quit [Read error: Connection reset by peer]
mdw has joined #ruby
noService has joined #ruby
idefine_ has quit [Remote host closed the connection]
idefine has joined #ruby
graft has joined #ruby
zotherstupidguy has joined #ruby
idefine has quit [Remote host closed the connection]
agent_white has quit [Quit: brb]
pawnbox has joined #ruby
bruno- has joined #ruby
agent_white has joined #ruby
umdstu has quit [Ping timeout: 265 seconds]
noService has quit [Ping timeout: 276 seconds]
<graft>
okay, so a common pattern i use is ary.map{|item| { item.some => item.thing } }.reduce(:merge) - apparently this is abominably slow compared to Hash[ary.map{|item| [ item.some, item.thing ] }]
<graft>
can someone explain why?
dopamean_ has quit [Ping timeout: 276 seconds]
<graft>
too much copying?
diegoaguilar has quit [Remote host closed the connection]
idefine has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
renderfu_ has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
postmodern has quit [Ping timeout: 250 seconds]
kareeoleez has joined #ruby
wldcordeiro has joined #ruby
idefine has quit [Remote host closed the connection]
horaceheaven has joined #ruby
jancel has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
kareeoleez has quit [Ping timeout: 276 seconds]
d0nn1e has quit [Ping timeout: 276 seconds]
<arahael>
different algorthm.
<kaleido>
graft: im sorta dumb but im guessing because hashes are superior to arrays in all ways :P
Pumukel has quit [Quit: ChatZilla 0.9.92 [Firefox 46.0.1/20160502172042]]
ngscheur1 has quit [Quit: WeeChat 1.2]
jancel has quit [Ping timeout: 276 seconds]
d0nn1e has joined #ruby
<graft>
they yield the same result... i'm guessing when I do reduce(:merge) it means making a fresh hash for every item in the array and copying the previous entry into it, whereas Hash[] only constructs a single hash from the array argument
<graft>
but oh man, do i do this a lot
brunto_ has quit [Read error: Connection reset by peer]
SilverKey has quit [Quit: Halted.]
weemsledeux has joined #ruby
<al2o3-cr>
graft: to_h all the way :)
blackmes1 has quit [Ping timeout: 260 seconds]
VeryBewitching has quit [Quit: Konversation terminated!]
<weaksauce>
graft each merge call dups one of the hashes
goldfax has joined #ruby
<weaksauce>
and then runs hash_update each time
freerobby has quit [Quit: Leaving.]
<CausaMortis>
hi guys, anyone here working on a vagrant + docker setup?
whathappens has quit [Remote host closed the connection]
rbennacer has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
whathappens has joined #ruby
whathappens has quit [Remote host closed the connection]
Mendenhall has joined #ruby
Mendenhall has left #ruby [#ruby]
cdg has quit [Ping timeout: 252 seconds]
kareeoleez has joined #ruby
zenlot has joined #ruby
whathappens has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
zenlot6 has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
djbkd has quit [Quit: My people need me...]
<nickjj>
CausaMortis, what's the question?
sp4rrow has quit [Ping timeout: 240 seconds]
kareeoleez has quit [Ping timeout: 260 seconds]
<CausaMortis>
nickjj, I am a total noob but trying to setup vagrant using my own box (for now im using ubuntu) and then using docker to perform all the provisioning. Does this look remotely correct to you? https://gist.github.com/CausaMortis/090e4b7ec518005d9899468d75961bee
<nickjj>
thoughts on just eliminating vagrant from the equation?
<nickjj>
or a better question, what are you using vagrant for in your dev. environment that couldn't be solved with docker directly?
Nanuq has quit [Ping timeout: 260 seconds]
<CausaMortis>
Currently running under windows and considering docker for windows is still in beta id rather serve up a vm using vagrant
Azure has joined #ruby
<CausaMortis>
vagrant can use boot2docker as a provider but i would rather, if possible, have full control over the base box
<nickjj>
docker for windows is pretty stable now through the docker toolbox
<nickjj>
which uses docker-machine, which in turn uses boot2docker under the hood
<CausaMortis>
ah
<nickjj>
the beta version is a native implementation which bypasses needing a VM entirely, so it runs natively just like it does on linux
<nickjj>
it's not quite ready for prime time but it's certainly usable in every way dev, but at this point you'd need to get accepted the private beta to use it
<nickjj>
*every day dev
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 265 seconds]
<CausaMortis>
thanks that does make things a bit more understandable for me. I assumed it would still be wonky at this point
<nickjj>
your windows experience at the moment with the docker toolbox will be quite reasonable
<nickjj>
i mean, if you really wanted to stick with the ubuntu base and vagrant, you should consider just mounting in your code into vagrant and not using the docker provider at all
<nickjj>
but at that point, you might as well just use the docker toolbox
<CausaMortis>
haha
<CausaMortis>
Thanks. Obviously I was overcomplicating matters here
sp4rrow has joined #ruby
<nickjj>
yeah no problem
<nickjj>
are you using rails too by any chance?
<CausaMortis>
I started on this path cause I had read a while back that this was on option
Nanuq has joined #ruby
<CausaMortis>
I come from a PHP background but recently had to make the switch so yea, that will be the end goal here so I can get my feet wet
<nickjj>
i've been using docker on my dev box and in production for well over a year now, it's really nice. vagrant is longer a tool i use for dev environment set up
<nickjj>
*no longer
openstruct has joined #ruby
<CausaMortis>
never really bothered diving in as laravel (not sure if you are familiar) provides a dev env using vagrant out of the box
<nickjj>
CausaMortis, what's your overall docker knowledge at the moment?
<CausaMortis>
haha lets just say it is lacking
<CausaMortis>
a few hours of reading on trying to get this to work tops
<nickjj>
so, you've basically glanced the getting started guide and heard it might be cool?
<CausaMortis>
yeah I want to jump on the bandwagon
<CausaMortis>
hahaha
deadhound has quit [Ping timeout: 260 seconds]
<nickjj>
are your intentions to eventually deploy a rails app to production with docker?
ramfjord has quit [Ping timeout: 276 seconds]
<CausaMortis>
my intentions are to learn its ins and outs
sp4rrow has quit [Max SendQ exceeded]
<CausaMortis>
first my priorities are with learning ruby and rails
<nickjj>
i ask because if you were interested, i have a course out that you may like
agent_white has quit [Quit: offToHome]
<horaceheaven>
for some reason the browser always surounds the request.env['HTTP_IF_NONE_MATCH'] with unwanted quotes, is there a built in ruby method to parse and cleanup strings coming back from the browser headers?
<CausaMortis>
hey, I welcome any reading / video material on the subject
horaceheaven is now known as elfuego
<nickjj>
it won't teach you rails but it covers "dockerizing" a rails app and scaling/deploying a rails app on AWS with docker, it'll cover topics like load balancing, rolling restarts and much more
kareeoleez has joined #ruby
openstruct has quit [Ping timeout: 265 seconds]
<nickjj>
in your case, it might be a "phase 2" learning material, since you'd need to get a reasonable rails base of knowledge before you probably think about deploying an app to production with it
<pragmatism>
Could someone clear this up for me: what's the point of using a double in testing? Why not just create an instance of the thing you're testing?
<CausaMortis>
Luckily laravel for PHP adheres to many of the same conventions and because of its common ancestor i should be able to become familiar with rails in a short time frame
astrobunny has joined #ruby
ramfjord has joined #ruby
<weaksauce>
pragmatism speed mainly.
<pragmatism>
Ah!
<pragmatism>
I hadn't considered that.
<CausaMortis>
haha
kareeoleez has quit [Ping timeout: 276 seconds]
<CausaMortis>
I totally misread that
jenrzzz has joined #ruby
<weaksauce>
pragmatism it also decouples things and reduces dependencies.
jancel has joined #ruby
openstruct has joined #ruby
<pragmatism>
weaksauce Why would I want to decrease dependencies on things in tests that are depended on outside of test?
<pragmatism>
Wouldn't that lead to poor test coverage?
<weaksauce>
pragmatism say the team for the double'd object is not done yet. how do you test your code?
<pragmatism>
Ah
<pragmatism>
Again, hadn't considered that.
<weaksauce>
you test given this input, I expect this output and MY code will work
<weaksauce>
you do the same thing for the other end. and then you do integration testing to make sure things play well with each other... but those are slower because they touch more things
sp4rrow has quit [Ping timeout: 240 seconds]
<pragmatism>
Gotcha.
<pragmatism>
Thank you!!!
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<weaksauce>
np
skolma___ has joined #ruby
skolman has quit [Read error: Connection reset by peer]
<nickjj>
CausaMortis, i think so too. there's also a million great blog posts and tutorials to pull from
skolma___ has quit [Read error: Connection reset by peer]
Devalo has joined #ruby
skolman has joined #ruby
skolman has quit [Read error: Connection reset by peer]
skolman_ has joined #ruby
RegulationD has quit [Remote host closed the connection]
<CausaMortis>
nickjj, I appreciate the link to the course material and will definitely consider it. bookmarked
jaguarmagenta has joined #ruby
sp4rrow has joined #ruby
<nickjj>
cool, if you have any questions later on, don't hesitate to ask (my contact info is on my site, or PM me here)
jobewan has quit [Ping timeout: 276 seconds]
sonikspin has joined #ruby
bruce_lee has quit [Remote host closed the connection]
jaguarmagenta has quit [Ping timeout: 265 seconds]
Devalo has quit [Ping timeout: 250 seconds]
sonikspin has quit [Client Quit]
CloCkWeRX has joined #ruby
jenrzzz_ has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
kareeoleez has joined #ruby
CausaMortis_ has joined #ruby
jancel has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 276 seconds]
sonikspin has joined #ruby
<|2701>
you guys know what's cool?
<|2701>
mruby. mruby is what is freaking cool.
xall has quit [Ping timeout: 250 seconds]
CausaMortis has quit [Ping timeout: 240 seconds]
kareeoleez has quit [Ping timeout: 246 seconds]
<mg^>
mruby is cool
<mg^>
I
xaxisx has quit [Ping timeout: 244 seconds]
<mg^>
I've done a little work with it
mostlybadfly has joined #ruby
<|2701>
I havent yet, but I've been keeping a close eye on it. there's already a little microecosystem growing around it
<|2701>
some guy got it running under rust, called mrusty
<mg^>
that's my contribution to the ecosystem, so far
<|2701>
oh wow, right on! that's awesome
Yiota has joined #ruby
<mg^>
I want to find more excuses to use it
xall has joined #ruby
mib_mib has joined #ruby
<mg^>
I recently found my old ham packet radio gear, I was thinking about trying to write a Ruby-based AX.25 stack.
saneax_AFK is now known as saneax
<|2701>
that is sufficiently nerdy, you should definitely do it
<mib_mib>
hi - having trouble with reading a document - i do File.read('somefile').remove_non_ascii.split("\n").collect {|x| x.strip} to parse it into lines
<mg^>
yeah the problem is always time, of course
<mib_mib>
however, i am getting erro: in `strip`: invalid byte sequence in US-ASCII
chip_ has joined #ruby
<mg^>
I also want to do home automation stuff
moei has quit [Quit: Leaving...]
<mib_mib>
but i already did remove_non_ascii - so why would i be getting an invalid byte sequence if i already encoded it to ascii and replaced all non-ascii?
<arahael>
mib_mib: force the encoding to binary and re-convert it.
<mib_mib>
ENCODING_OPTIONS = { :invalid => :replace, # Replace invalid byte sequences :undef => :replace, # Replace anything not defined in ASCII :replace => ' ', # Use a blank for those replacements :universal_newline => true # Always break lines with \n } ASCII_ENCODING = Encoding.find('ASCII') class String def remove_non_ascii self.encode(ASCII_ENCODING, ENCODING_OPTIONS) end end
<|2701>
I didnt know remove_non_ascii was a thing... I get no method on 2.3, am i missing out?
<arahael>
mib_mib: i got caught by this: converting to the same encoding is a no-op.
<arahael>
mib_mib: as per docs, incidentially.
bruno- has quit [Read error: Connection reset by peer]
<mib_mib>
|2701: nah, i just pasted it =D - i usually monkey patch this in to String class
<|2701>
ah
bruno- has joined #ruby
<|2701>
so then it's not working then, seems like
<|2701>
if it's still finding non-ascii bytes after you've removed them, that seems like it would indicative of a faulty method
<mib_mib>
|2701: it works, just not the no-op part, since my default encoding is not utf8 but ascii i assume
<mib_mib>
arahael: okay, so do I need to do like File.read('somefile','rb') ?
Yiota has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
<Radar>
Particularly: is the usage of instance variables understandable, or should those values assigned to those ivars be explicitly passed to those methods?
<arahael>
mib_mib: not sure. i'm not an expert rubist.
<arahael>
mib_mib: but i assume ruby is guessing, incorrectly, what the encoding is.
<baweaver>
Radar: I tend to avoid ivar implied method arguments
<pragmatism>
Radar that reads fine to me, although I do inject when possible.
cdg has joined #ruby
<baweaver>
makes it a lot harder to move code around
<mib_mib>
arahael: you read the docs saying its a no-op but you dont know how to convert it ?
<mib_mib>
arahael: i see
<baweaver>
that and al the self references aren't really needed
<pragmatism>
Agreed on self.
<Radar>
baweaver: thank you :)
<pragmatism>
Sorry, I agree with baweaver on `self`.
<arahael>
mib_mib: well, i suggested forcjng the encoding. i suppose i could have been more specific: force the encoding of the strings obtained from that file.
<baweaver>
catch errors feels like it'd be a block given method
<Radar>
Thanks all :)
<pragmatism>
:+1:
<arahael>
pragmatism: that looks like slack.
<pragmatism>
It is :)
<arahael>
pragmatism: slacker!
spider-mario has quit [Read error: Connection reset by peer]
<pragmatism>
Laziness, impatience, and hubris ;)
<baweaver>
like: catch_errors { dangerous_method } -> def catch_errors; yield rescue => e handle errors end
<arahael>
pragmatism: ssh. :)
<baweaver>
though at that point you don't gain much over begin/rescue unless you have very specific errors you're meaning to catch
<baweaver>
in which case it'd be of benefit to have a more detailed name on it than catch_errors
bronson has quit [Ping timeout: 252 seconds]
<baweaver>
that and you probably really don't want to do actions if errors occur such as delete/create
<baweaver>
Radar ^
kareeoleez has joined #ruby
<Radar>
baweaver: "errors" in this case are simply a "bad" HTTP response, i.e. a non-200. But yeah, you could definitely make it a block.
<baweaver>
ah. In that case I'd use that to patch to a logger somehow and format sane defaults
<baweaver>
also line 5 could probably use a sane default as well
<baweaver>
the ivar thing has screwed me more than a few times trying to refactor code / move things around
rkazak has joined #ruby
charliesome_ has quit [Ping timeout: 265 seconds]
<baweaver>
we do something similar on HTTP responses, we use an interceptor to log out all failed external requests properly so we can track them later.
<baweaver>
then normally either pass through the response or return false.
<mib_mib>
arahael: ah okay that appeared to work, very oddly though
chopin has quit [Remote host closed the connection]
kareeoleez has quit [Ping timeout: 246 seconds]
<arahael>
mib_mib: my guess is that when ruby assumes a given encoding, it does no conversion at that point, but assumes it's valid.
goldfax has quit [Remote host closed the connection]
<arahael>
mib_mib: which is a reasonable decision, but surprising until you find out.
SilverKey has joined #ruby
<baweaver>
Then again I have a near pathological aversion to `nil`, so with a grain of salt.
<arahael>
baweaver: you're not alone. there's been paprrs on that, one sec...
<baweaver>
I prefer sane defaults whenever possible, which is completely doable in Ruby
<baweaver>
Maybe Monad _could_ be mentioned but then you're going Haskell
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
<|2701>
heck of an ego to tell someone what to remember 'if nothing else'
xlegoman has quit [Quit: xlegoman]
ekinmur has joined #ruby
<baweaver>
if you choose to take it that way
<|2701>
didnt bother in 1st place, but ok
<baweaver>
point being, there's no such thing as "making up for" past code
<|2701>
sure there is, you scrap it and write better
<|2701>
is a novice programmer forever in debt to code that he wrote as he was starting out? obv not
<|2701>
not that he was a novice then, but still
postmodern has joined #ruby
<baweaver>
then why should Hoare need to be "redeemed"
darix has quit [Ping timeout: 244 seconds]
<|2701>
to judge someone on mistakes they've chosen to correct and move past is a pretty obvious indicator of egoism
karapetyan has joined #ruby
<baweaver>
....you mean like what you just did?
Yiota has joined #ruby
chris349 has joined #ruby
<baweaver>
I'm mentioning that your mention of him being redeemed was exactly that, not sure how you're pulling the rest out of there.
<|2701>
"if nothing else" like are you even serious with that kind of crap? That's the sort of thing a sophomore tells a freshman as a joke
<|2701>
give me a break
<|2701>
i was bringing attention that despite one bad idea, hoare is an important figure in cs
<|2701>
he's definitely not just 'billion dollar mistake' guy.
<baweaver>
and being quite rude in the process.
<|2701>
"if nothing else..." *I'm* rude... ok
<|2701>
if you choose to take it that way
fullstack has quit [Ping timeout: 240 seconds]
fullstack has joined #ruby
* baweaver
sighs
<|2701>
w/e. next topic....
Vile` has joined #ruby
Cork has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 244 seconds]
eljimbo has joined #ruby
<baweaver>
|2701 wise
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bougyman>
manveru: around?
<bougyman>
trying to figure out how to use Net::LDAP.open in the context of a class.
crystal77 has joined #ruby
<baweaver>
!rude |2701
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bougyman>
currently doing an @ldap = LDAP.new in the initializer then using @ldap to search. I just found this does a new connection/bind for each operation.
aegis3121 has joined #ruby
<bougyman>
but Net::LDAP.open() requires a block, so it will take a refactor.
crystal77 has quit [Max SendQ exceeded]
darix has joined #ruby
<bougyman>
is there a common pattern to use in such cases?
openstruct has quit []
<bougyman>
darix! currently doing an @ldap = LDAP.new in the initializer then using @ldap to search. I just found this does a new connection/bind for each operation.
<bougyman>
woops, mispaste.
crystal77 has joined #ruby
<darix>
moin bougyman
jdawgaz has joined #ruby
<bougyman>
mornin'
dopamean_ has joined #ruby
jwren has quit [Remote host closed the connection]
<chris349>
How can I force the reinstall of a gem?
crystal77 has quit [Client Quit]
blaxter has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]