<apeiros>
» "using Object#extend(Module) and not `extend Module`" - not sure what you wanted to say by that
<ezrios>
what is this
mary5030 has joined #ruby
<shevy>
extend
<ezrios>
k.extend(Mod)
<ezrios>
k.hello
jgoss has quit [Read error: Connection reset by peer]
<ezrios>
that looks like an instance method
<atmosx>
ezrios: class methods
danshultz has joined #ruby
<atmosx>
oh I see apeiros took over hehe
Guest46591 has quit [Quit: leaving]
aspires has quit []
<apeiros>
ezrios: make that Array.extend(Mod); Array.hello
<apeiros>
ezrios: does it now look like a class method?
<apeiros>
ezrios: now consider that it doesn't matter whether it's k or Array. both are objects.
popl has joined #ruby
popl has quit [Client Quit]
SCommette has joined #ruby
<apeiros>
(well, both are variables referencing objects, but that's beyond the point)
<apeiros>
atmosx: won't for long. I'm on my way to bed.
<ezrios>
>> module Mod; def hello; "Hello from Mod.\n"; end; end; class Klass; def hello; "Hello from Klass.\n"; end; end; k = Klass.new; p k.hello; k.extend(Mod); p k.hello;
<ezrios>
apeiros: how is k.hello not an instance method then?
<atmosx>
ezrios: it is... k = Klass.new
jbueza has joined #ruby
rootshift has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
<apeiros>
ezrios: 01:07 apeiros: c) technically, there's no such thing as a class method. class methods are instance methods (just on a different class)
mikepack has joined #ruby
njection has joined #ruby
ga1j1n has joined #ruby
<apeiros>
Array.new is an instance method too. it's the instance method new on class Class
vpretzel has joined #ruby
<atmosx>
I'm off to bed nighty all
atmosx has quit [Quit: Lost in trance]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
funktor has quit [Remote host closed the connection]
<ezrios>
hrm
<ezrios>
I guess I will have to meditate on this some more
<apeiros>
ezrios: extend will add the instance methods of the module as instance methods of the singleton_class of the object you call it on
funktor has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
obs has quit [Remote host closed the connection]
<apeiros>
and the singleton_class is the only hard part in that whole story
<ezrios>
that's the eigenclass, right?
<ezrios>
I guess I thought I understood that but now I don't
<apeiros>
the singleton_class is a class every object has and sits halfway invisibly between the object and its class
<terrellt>
Which yes, was once called the eigenclass.
<apeiros>
that is, obj.some_method --> will look up some_method in obj.singleton_class, then obj.class, then obj.ancestors in the order they appear
obs has joined #ruby
<terrellt>
I have done terrible terrible things to the singleton_class the last few days.
<apeiros>
obj.class.ancestors, not obj.ancestors, sorry
<apeiros>
terrellt: great, you can take over then. I'm going to bed :)
<terrellt>
What?!
<ezrios>
apeiros: night
pietr0 has quit [Quit: pietr0]
<apeiros>
n8
<ezrios>
thanks for the help
* terrellt
bails
<bnagy>
ezrios: it's "easy"
<bnagy>
everything is an object. every method has a receiver. therefore, every method is actually an instance method
apeiros has quit [Remote host closed the connection]
kitak has joined #ruby
toastynerd has joined #ruby
<bnagy>
[government health warning: statement not 100% accurate]
apeiros has joined #ruby
<benzrf>
terrellt: what have u done
weems has quit [Read error: Connection reset by peer]
cashnguns has joined #ruby
weems has joined #ruby
teddyp1cker has joined #ruby
ner0x has joined #ruby
funktor has quit [Ping timeout: 252 seconds]
toastynerd has quit [Remote host closed the connection]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
rootshift has joined #ruby
Vovko has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
jhn_ has quit []
crazymykl has quit [Ping timeout: 264 seconds]
AussieDownUnder has joined #ruby
txdv has quit [Remote host closed the connection]
teddyp1cker has quit [Ping timeout: 246 seconds]
supershabam_ has quit []
supershabam_ has joined #ruby
<ezrios>
http://bpaste.net/show/190587/ -- So in this example, foobar is added as an instance method of Klass' eigenclass (i.e. a "class method") via k.extend(Extender)?
njection has quit [Ping timeout: 252 seconds]
supershabam_ is now known as supershabam
chipotle has joined #ruby
<benzrf>
it's called a singleton class
<benzrf>
:u
<ezrios>
sure, singleton class then
vpretzel has quit [Read error: Connection reset by peer]
<ezrios>
but is that right?
txdv has joined #ruby
<benzrf>
no
vpretzel has joined #ruby
<ezrios>
;_;
<benzrf>
createklass isnt being called
<benzrf>
oh wait
<benzrf>
your statement was correct
Asher has joined #ruby
<benzrf>
but the code is wrong
geopet has quit []
<benzrf>
:I
<ezrios>
yeah I actually forgot to do something with those class/module definitions
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duggiefresh has joined #ruby
<benzrf>
hehe
lolmaus has quit [Ping timeout: 252 seconds]
armyriad has joined #ruby
<bnagy>
eigenclass is fine as a term. It's probably better than singleton class or metaclass, tbh
<bnagy>
but you'll see people use any of those three and probably more
<bnagy>
benzrf: which, again, is completely irrelevant
<benzrf>
but either way, if i heard metaclass devoid of context, in a language where classes are also objects
pel_daniel has left #ruby [#ruby]
<benzrf>
i would definitely assume it meant Class
doodlehaus has quit [Remote host closed the connection]
<bnagy>
what I am doing is explaining, to ezrios mainly, how the term is used in ruby
<benzrf>
smalltalk uses metaclass that way too
<bnagy>
what YOU are doing is being wrong
<benzrf>
it isn't though
crazymykl has joined #ruby
<benzrf>
if people use it that way, those people are wrong
einarj has quit [Remote host closed the connection]
ffranz has quit [Quit: Leaving]
dookee has joined #ruby
<bnagy>
you have been lurking on this channel for what? Less than a year? I have been coding ruby since like 2005.
<bnagy>
I am making a statement of objective fact here, this is not a 'debate'
toastynerd has quit [Remote host closed the connection]
<bnagy>
the term metaclass is used to mean the same thing
elaptics is now known as elaptics`away
<benzrf>
the only statement that you can make is that some people use it that way
<pipework>
Ooh, we're whipping out creds!
<pipework>
Also, metaclass is wrong, it's eigenclass.
<workmad3>
bnagy: I think it's more an objection to the way you seem to introduce all 3 terms as somehow equal ;)
<benzrf>
which may be correct
<benzrf>
but either way, using it that way is wrong
funktor has joined #ruby
<bnagy>
workmad3: well I have opinions about which is better ( eigenclass imho ) but you need to know all three terms
<workmad3>
bnagy: when 'singleton_class' is the one that's adopted by the language (objections aside) and eigenclass and metaclass are older terms from before singleton_class was introduced
<bnagy>
assuming you want to read what other people write about ruby
momigi has quit [Remote host closed the connection]
<bnagy>
if you just want to flap your facehole like benzrf then yes, metaclass is a stupid term
<benzrf>
=]
<benzrf>
i think you mean flap ur fingers
<benzrf>
my mouth is staying closed right now
<pipework>
workmad3: It's a fun misnomer though! There really aren't any singletons within ruby, but there are singleton-like things. So it's all a bunch of silly.
<workmad3>
pipework: I know
<pipework>
do you tho
<workmad3>
pipework: as I already said, I dislike singleton_class... but it's the one that was adopted by the language
yokel has joined #ruby
<pipework>
workmad3: I'm still holding onto eigen in the same way I'm holding onto dashrocket.
<workmad3>
pipework: to be a contrary dick? ;) <3
<benzrf>
dashrocket?
<shevy>
what's with the dick holding now!
<pipework>
workmad3: My opinions are good opinions, or that's my opinion!
toastynerd has joined #ruby
<benzrf>
is that like hashrocket
<pipework>
benzrf: stabby lambda.
<pipework>
->
<shevy>
<-
<benzrf>
aha
<shevy>
counter!
yfeldblum has quit [Remote host closed the connection]
dookee has quit [Client Quit]
<benzrf>
-> is for lambdas and case, <- is for do notation
<benzrf>
i think we can clearly see which one is more fundamental
<benzrf>
shevy loses!
<pipework>
He's used to it.
yfeldblum has joined #ruby
<benzrf>
huehuehue
<centrx>
>> ->(stabee) { stab stabbee }[:benzrf]
<eval-in>
centrx => undefined local variable or method `stabbee' for main:Object (NameError) ... (https://eval.in/122853)
njection has quit [Ping timeout: 240 seconds]
<pipework>
yeltzooo: lol thefacebook.com
<pipework>
yfeldblum: ^
<workmad3>
bnagy: still, my point is that in 1.9+ (after the introduction of singleton_class) then the only 'correct' term is singleton_class... suggesting eigenclass and metaclass are equal rather than older terms from before singleton_class is, IMO, wrong and just promoting the confusion :)
<benzrf>
way2typo
inversesquarelaw has joined #ruby
<pipework>
workmad3: One's much older though.
<benzrf>
workmad3: not to mention that metaclass is even more wrong than eigenclass
<pipework>
^
mattmcclure has joined #ruby
<benzrf>
eigenclass is like a slang term, metaclass is just a misusage of an existing term
<benzrf>
singleton_class is the official one
<pipework>
Ruby, much like Rails, loves misnomers. I think it's how we're kept on our feet.
<benzrf>
;-;
momigi has joined #ruby
<benzrf>
dang why cant i subclass __class__
<benzrf>
*Clss
<benzrf>
ugh
<workmad3>
benzrf: isn't it nice though that even something like 5 years after the introduction of singleton_class to try and stop the arguments over what term to use, the arguments can still rage on at times :)
<shevy>
yes
<shevy>
because eigen is german
mehlah has quit [Quit: Leaving...]
<shevy>
they should have picked japanese for self
<benzrf>
hehe
<pipework>
Most English words come from or are based on other languages anyways.
<shevy>
harakiriclass
<benzrf>
workmad3: programmers love bikeshedding
<pipework>
workmad3: I use vim, the best editor.
<workmad3>
pipework: good :D
<benzrf>
o/ # VIM FIVE
toastynerd has quit [Ping timeout: 264 seconds]
creede has quit [Ping timeout: 264 seconds]
philcrissman has quit [Remote host closed the connection]
<shevy>
matz uses emacs
<benzrf>
>:o
<benzrf>
pipework: have you acquired vim-argumentative
* workmad3
stops using ruby immediately because it was written in emacs
<benzrf>
it does not always work perfectly in ruby but its p useful
<pipework>
Shouldn't that be :iwhf for in word high five?
<benzrf>
workmad3: emacs is a valid choice
<shevy>
isn't emacs written in lisp?
<pipework>
Gnu is not a bootloader.
<benzrf>
emacs is a lisp env
matthalliday has joined #ruby
<benzrf>
pipework: ginab?
<workmad3>
benzrf: LIES! BLASPHEMY AGAINST THE ONE TRUE VIM!
<benzrf>
pfft
<ezrios>
real men use ed
matthalliday has quit [Client Quit]
charliesome has joined #ruby
<benzrf>
shevy: emacs is basically just a lisp interpreter preloaded with a lisp program that acts as an editor
<benzrf>
sup charliesome
<charliesome>
hi benzrf
* pipework
is waiting for the day when emacs ships with a good text editor. Preferably vim.
<workmad3>
benzrf: or, to use more humour - emacs has a lisp plugin for everything apart from a decent text editor
treaki__ has quit [Ping timeout: 264 seconds]
<charliesome>
pipework: evil mode?
<benzrf>
huehuhue
<centrx>
hmmm, vim inside emacs, it's genius
toastynerd has joined #ruby
<pipework>
charliesome: sublimetext has vintage mode
<workmad3>
centrx: will I be able to load my vimscript plugins? :D
<charliesome>
not a fan of vintage
<charliesome>
i hear vintageous in ST3 is decent
Vovko has joined #ruby
* pipework
isn't a fan of evil mode
njection has joined #ruby
* pipework
just embeds vim inside emacs like any good double-neckbearder
<benzrf>
haha
creede has joined #ruby
<benzrf>
someday i too will have a FULL AND GLORIOUS NECKBEARD
<workmad3>
pipework: embed vim inside emacs inside vim
tvw has quit []
<benzrf>
but atm i dont have enough facial hair for even a tasteless goatee
<workmad3>
benzrf: my beard is magnificent... it's curly and has stripes of ginger!
<pipework>
workmad3: My text editor doesn't need an operating system inside it.
<benzrf>
O:
* pipework
wonders when that lisp OS will run emacs
linojon has joined #ruby
lkba has joined #ruby
<pipework>
shevy: Please continue your efforts on RubyOS. Maybe one day someone will write an editor worth using in ruby because of it. redcar seems dead.
<shevy>
pipework I more do it on the minimal approach
juarlex has joined #ruby
endash_ has joined #ruby
<shevy>
like work on the individual components
<pipework>
shevy: I'm not sure sitting on the couch really counts as a minimal approach.
sparrovv has quit [Remote host closed the connection]
<shevy>
I tried to do a gvim in ruby-gnome
<shevy>
but when it was too much work, I gave up :(
<shevy>
pipework I'll eventually release what I wrote on rubygems.org but I have been making a break from ruby-gnome for a few years
Lewix has quit [Remote host closed the connection]
njection has quit [Ping timeout: 240 seconds]
meatherly has quit [Remote host closed the connection]
meatherly has joined #ruby
<benzrf>
why is my binary named /usr/bin/ruby1.9.1 when RUBY_VERSION == '1.9.3'
<workmad3>
benzrf: you may as well ask why is the sky hot pink, or why is the grass blue...
fgo has joined #ruby
Asher has quit [Quit: Leaving.]
vertroa has joined #ruby
lolmaus has joined #ruby
<benzrf>
hue
njection has joined #ruby
meatherly has quit [Ping timeout: 264 seconds]
i_s has quit [Ping timeout: 255 seconds]
toastynerd has quit [Remote host closed the connection]
treaki__ has joined #ruby
Vovko has quit [Ping timeout: 240 seconds]
<benzrf>
hmmmmmmmmm
<pipework>
Because good drugs, workmad3?
<benzrf>
could it be possible to serialize an mrb_state
<benzrf>
o.O
toastynerd has joined #ruby
ga1j1n has quit [Remote host closed the connection]
<benzrf>
maybe a jruby instance?
ga1j1n has joined #ruby
thumpba_ has quit [Remote host closed the connection]
ga1j1n has quit [Remote host closed the connection]
koell has left #ruby ["So say we all!"]
ga1j1n has joined #ruby
Asher has joined #ruby
tt1187 has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
predator217 has quit [Ping timeout: 264 seconds]
<pipework>
benzrf: what are you asking about?
sorabji5252 has joined #ruby
sorabji5252 has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<benzrf>
since discovering how smalltalk works and how SLIME is nearly the same thing for lisp, ive been wondering if it could be possible to make something like that for RubyPanther
<benzrf>
*ruby
predator117 has joined #ruby
<benzrf>
but it would depend on being able to save a ruby vm's state
<toretore>
RubyPanther can't be snapshotted
funktor has quit []
toastynerd has quit [Ping timeout: 264 seconds]
<pipework>
One cannot simply snapshot a RubyPanther.
<benzrf>
hue
SonicX has quit [Ping timeout: 264 seconds]
njection has quit [Ping timeout: 252 seconds]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
afex has quit [Ping timeout: 264 seconds]
AussieDownUnder has quit [Read error: Connection reset by peer]
razrunelord has quit []
<yfeldblum>
pipework: hmm?
<pipework>
yfeldblum: your hostmask is lulz
_justin has quit [Quit: _justin]
njection has joined #ruby
robustus has quit [Ping timeout: 252 seconds]
<ezrios>
ahhhhh okay
<ezrios>
I think I get this whole eigenclass thing now
<yfeldblum>
pipework: y?
<pipework>
yfeldblum: q?
<pipework>
yfeldblum: z?
<yfeldblum>
pipework: why "lulz"?
toastynerd has joined #ruby
Zunonia__ has joined #ruby
robustus has joined #ruby
<pipework>
yfeldblum: It's quite entertaining to me to see someone join IRC with that domain in their host.
saarinen has quit [Quit: saarinen]
<yfeldblum>
pipework: yes, i get that that's the expanded form of "your hostmask is lulz" ...
afex has joined #ruby
<ezrios>
it's like if my hostmask had
<ezrios>
"thegoogle.com"
<pipework>
yfeldblum: Is there something you aren't sure about?
<pipework>
I should get a clone of me joining from fuckth.is
nanoyak has quit [Quit: Computer has gone to sleep.]
amclain has joined #ruby
<yfeldblum>
ezrios: `whois thefacebook.com`
b00stfr3ak has quit [Ping timeout: 246 seconds]
albedoa has joined #ruby
<ezrios>
yfeldblum: yes I get that that was facebook's original domain
<ezrios>
but it just sounds dated
derek_c has joined #ruby
crystal77 has joined #ruby
<pipework>
And seeing people with the ability to have that domain in their hostname is novel.
<ezrios>
theyoutube.com
<benzrf>
'the myspace'
ikaros has quit [Quit: Ex-Chat]
<benzrf>
>tfw fuckth.is is taken
meatherly has joined #ruby
AussieDownUnder has joined #ruby
platzhirsch has quit [Ping timeout: 252 seconds]
ner0x has quit [Quit: Leaving]
macclearich_ has quit [Quit: Computer has gone to sleep.]
lw has joined #ruby
wallerdev has quit [Quit: wallerdev]
macclearich_ has joined #ruby
randomnick_ has quit [Quit: Leaving]
* pipework
owns it
redlines has quit [Ping timeout: 246 seconds]
_justin has joined #ruby
wallerdev has joined #ruby
redlines has joined #ruby
macclearich_ has quit [Ping timeout: 240 seconds]
<benzrf>
wait rly
nichtdiebohne1 has joined #ruby
* benzrf
bows before his internet god
<pipework>
I haven't done anything with it yet.
jjbohn has quit [Quit: Leaving...]
<yfeldblum>
ezrios: i guess it's the default here
mweshi has joined #ruby
nichtdiebohne has quit [Ping timeout: 246 seconds]
<ezrios>
yfeldblum: I don't follow
camilo has joined #ruby
<benzrf>
pipework: make it so that going to fuckth.is/x fills in some kind of template to indicate distaste for X
<benzrf>
fuckthi.is/shit
<benzrf>
fuckthi.is/stupid-language
<pipework>
benzrf: pull requests accepted
<benzrf>
=3
mary5030 has quit [Remote host closed the connection]
fridim__ has joined #ruby
<benzrf>
do you even have a repo though?
<pipework>
benzrf: Nope!
mary5030 has joined #ruby
<benzrf>
hue
firewater has joined #ruby
inversesquarelaw has quit [Quit: rm -rf /]
<ezrios>
hm
coderxin has joined #ruby
<firewater>
Is there a way to add 2 numbers that you "pop" from an array together and put that new number into a new array?
<ezrios>
I wonder how many people have blown up their computers thanks to that quit message
wallerdev has quit [Ping timeout: 252 seconds]
montyboy has joined #ruby
<firewater>
aka, @list2<<@list.pop(2).add
<firewater>
there is no add method, but is there a way to do smoething lke that/
<firewater>
?
<benzrf>
wow that looks almost like haskell
<benzrf>
=D
<pipework>
firewater: It sounds like you just described what you want. Why don't you just write it?
<firewater>
What is the (:+) short for again? I know its shorthand for something.
<ezrios>
does inject automatically call to_proc on it?
sski has joined #ruby
<bnagy>
yeah
<firewater>
aka, when you do inject(:+) there is a longer way to write it out.
<bnagy>
inject(0) {|sum,x| sum += x}
<bnagy>
waaay longer
<firewater>
Yeah, I think thats it, I just forgot.
_Andres has quit [Read error: Connection reset by peer]
<firewater>
Either way, but basically sum up an array.
jjbohn has joined #ruby
<firewater>
and return sum.
<firewater>
right?
<ezrios>
it's foldr
<bnagy>
anyway, firewater are you sure you want to push to a new array?
jjbohn has quit [Client Quit]
<bnagy>
like it sounds like you're doing an RPN exercise?
<firewater>
Yes, its an RPN exercise. How did you know?
<bnagy>
magic
endash_ has quit [Quit: endash_]
obs has quit [Remote host closed the connection]
<bnagy>
normally you'd push back to the value stack
<firewater>
How so?
fgo has quit [Remote host closed the connection]
obs has joined #ruby
<bnagy>
so you can do longer operations
<bnagy>
[10, 2, 3, +, /]
linojon has quit [Quit: linojon]
<bnagy>
you'd pop 2,3, add then push back 5, no? then 10 / 5 ?
kotakotakota has joined #ruby
wallerdev has joined #ruby
<bnagy>
imho call one stack input and the other like 'stack' or something profound
<firewater>
bnagy: I'm probably doing this wrong, but yes that is what RPN would do.
Mongey has quit [Ping timeout: 252 seconds]
Spami has quit [Quit: This computer has gone to sleep]
<bnagy>
so you loop a pop from input - now push to stack if it's a value, OR
<bnagy>
pop 2, operate, push back to stack if it's an operator
bricker`LA has quit [Ping timeout: 246 seconds]
<firewater>
When you say "push" back, you mean put it back in the same array?
<bnagy>
push the result back to the stack
<bnagy>
yes
<firewater>
So, instead of doing this: @list2<<@list.pop(2).inject(:+)
ga1j1n has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 264 seconds]
<firewater>
Do this?: @list.pop(2).inject(:+).push
xcv has quit [Remote host closed the connection]
<Nowaker>
recently i have bumped from ruby 1.8 to 1.9. i had to revert because vms were running out of memory. probably some leak. i'm currently debugging one of the nodes, i am connected to gdb, and run commands almost like from irb: ruby_eval "ObjectSpace.count_objects".
<Nowaker>
this is the output: {:TOTAL=>2118302, :FREE=>1905994, :T_OBJECT=>17643, :T_CLASS=>5151, :T_MODULE=>895, :T_FLOAT=>139, :T_STRING=>103900, :T_REGEXP=>2165, :T_ARRAY=>32719, :T_HASH=>2820, :T_STRUCT=>251, :T_BIGNUM=>11, :T_FILE=>14, :T_DATA=>26424, :T_MATCH=>9, :T_COMPLEX=>1, :T_RATIONAL=>58, :T_NODE=>18656, :T_ICLASS=>1452}
<bnagy>
just write it out in proper code
<Nowaker>
is it much?
ga1j1n has joined #ruby
bricker`LA has joined #ruby
xcv has joined #ruby
<firewater>
Is that not proper?
<Nowaker>
is 2 million expected in a rails application that is running for half an hour, or is it way to much?
<bnagy>
firewater: I would probably model it around until input.empty?
<bnagy>
with a condition that determines operator or operand
<firewater>
I get what your saying bnagy, I'm just having trouble translating that to code.
<firewater>
I get it though, go through some operations, push that back to the stack and move on.
<bnagy>
firewater: the only cuteness is say you use :+ as your operators you can use send if you want
<firewater>
I'll think about this a bit, I think I know what your saying and its probably better than what I'm doing.
zz_jrhorn424 has quit [Ping timeout: 265 seconds]
wallerdev has quit [Quit: wallerdev]
Lulzon has quit [Ping timeout: 246 seconds]
<bnagy>
so if you did a,b = stack.pop 2 you can stack.push( a.send operator, b )
Hobogrammer has quit [Ping timeout: 240 seconds]
<firewater>
I'm going to maybe try to take that route, or maybe try this route. I really need to try to figure this out. though.
<bnagy>
but you need to error handle etc anyway
mr_rich101 has quit [Ping timeout: 255 seconds]
freerobby has joined #ruby
krz has joined #ruby
mr_rich101 has joined #ruby
<firewater>
You are probably right, but I'm not sure I can implement that on my own. I will try this route, find it it doesn't work, and then attempt your route bnagy probably lol.
zz_jrhorn424 has joined #ruby
Mongey has joined #ruby
<bnagy>
or I guess you can inject operator.. I just find it less clear *shrug*
Lulzon has joined #ruby
<firewater>
Your way is probably better, and I get what you are trying to do conceptually.
xcv has quit [Ping timeout: 240 seconds]
ga1j1n has quit [Ping timeout: 240 seconds]
<bnagy>
well that's the idea of exercise code :P
<firewater>
I'm just sure I'm going to have trouble translating that into code, but eventually I will probably stumble on the way you are doing it.
<firewater>
bnagy: I know :P.
<firewater>
bnagy: I will think about this.
<firewater>
I may try to go your route.
gizmore has quit [Ping timeout: 264 seconds]
<bnagy>
Nowaker: leak debugging is kind of hard in ruby, full stop
dkamioka has joined #ruby
<bnagy>
I usually run whatever under jruby and use the JVM profiling tools - they're excellent
<firewater>
bnagy: One last question before I go. You know a good way to turn an array with one element into an integar easily?
xibalba has joined #ruby
reset has quit [Quit: Leaving...]
<firewater>
Example: [5].to_i
<firewater>
doesn't work.
<bnagy>
but if you want to make an objectspace profiler you also need to look at the sizes of all your container types
yfeldblum has quit [Remote host closed the connection]
senayar_ has quit [Remote host closed the connection]
<albedoa>
centrx bnagy thank you for your help!
bradhe has quit [Remote host closed the connection]
mr_wooh23422 has quit [Quit: Leaving]
bradhe has joined #ruby
coderxin has quit [Ping timeout: 255 seconds]
_justin has joined #ruby
greenride has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
Slavox|AFK is now known as Slavox
danshultz has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
gnephiak has joined #ruby
_justin has quit [Client Quit]
bigmac has joined #ruby
_justin has joined #ruby
pu22l3r has joined #ruby
ixti has quit [Ping timeout: 246 seconds]
pr0ggie has quit [Ping timeout: 264 seconds]
jjbohn has joined #ruby
tkuchiki has joined #ruby
davedev2_ has joined #ruby
_justin has quit [Client Quit]
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r_ has joined #ruby
davedev24 has quit [Ping timeout: 255 seconds]
saarinen has quit [Quit: saarinen]
reset has quit [Ping timeout: 255 seconds]
armyriad has quit [Ping timeout: 264 seconds]
Hobogrammer has joined #ruby
mikepack has joined #ruby
fbernier has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
jjbohn has quit [Ping timeout: 252 seconds]
Mongey has quit [Ping timeout: 255 seconds]
<RubyPanther>
benzrf: You should be able to save/restore a mrb_state easily
<benzrf>
oh?
<benzrf>
how so?
x77686d has joined #ruby
momigi has quit [Remote host closed the connection]
ktosiek has quit [Ping timeout: 246 seconds]
<Nowaker>
bnagy: i was able to find the offending line of code without using this artillery. what's interesting, it doesn't leak on ruby 1.8, and leaks on 1.9.
<benzrf>
RubyPanther: ??
mary5030_ has joined #ruby
AlexRussia has quit [Quit: Konversation terminated!Good bye!]
<Nowaker>
this call takes 250MB of ram on ruby 1.9, while it doesn't take anything on ruby 1.8 deployment:
<bnagy>
x77686d: anyway, sadly, now that you know the secret there's too much risk you'll write awful code so I'm afraid we can't let you leave
* bnagy
plays Hotel California
<agent_white>
One of us...
<x77686d>
I won't tell anybody but my students...
nisstyre has joined #ruby
lw has joined #ruby
eval-in has quit [Remote host closed the connection]
anarang has joined #ruby
coderxin has joined #ruby
arubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bnagy>
by convention, not sure if you know, the only acceptable use of that is for a constructor that raises an exception on unsuitable params - it's like a 'fussy' constructor
<bnagy>
>> Integer('cabbage')
* bnagy
checks his watch
yacks has joined #ruby
<x77686d>
very interesting!
Celm has joined #ruby
tjr9898 has joined #ruby
<x77686d>
Does the Pickaxe book talk about it somewhere?
<bnagy>
I wish one _could_ send Time :(
<bnagy>
I haven't read pickaxe for many years
agjacome has quit [Quit: leaving]
<bnagy>
I'd be surprised if it didn't mention Integer() and friends though
michael_lee has joined #ruby
<bnagy>
it's (imho) definitely not something you should ever be doing though
coderxin has quit [Ping timeout: 246 seconds]
existensil_ has quit [Quit: WeeChat 0.4.1]
michael_lee has quit [Max SendQ exceeded]
tkuchiki has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
michael_lee has joined #ruby
Spleeze has quit [Ping timeout: 240 seconds]
x1337807x has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
arietis has joined #ruby
yasushi has joined #ruby
BraddPitt has joined #ruby
reset has joined #ruby
BraddBitt has quit [Ping timeout: 240 seconds]
meatherly has quit [Remote host closed the connection]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
meatherly has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
_justin has joined #ruby
sparrovv has joined #ruby
<Krypt>
I'm having some troubles trying to solve a challenge I'm working on would anybody have some time to help a noob out? The bigger problem I'm solving is I'm creating a battleship game that accepts lat/long points for the battleships. then the "guesses" are rectangles that are built from 2 sets of coords
<Krypt>
the current issue I'm dealing with is getting these rectangles to be built correctly around the prime meridian and the international dateline
_justin has quit [Client Quit]
<RubyPanther>
>> def Time; Time.now or raise 'no time'; end ; Time() # better?
Spleeze has joined #ruby
<Krypt>
I need to be able to ask rectangle.include?(battleship_point), I'm trying to do this with ranges
michael_lee has quit [Max SendQ exceeded]
circuit has quit [Quit: leaving]
meatherly has quit [Ping timeout: 240 seconds]
gilest has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
gilest has left #ruby [#ruby]
reset has quit [Ping timeout: 264 seconds]
gilest has joined #ruby
gilest has left #ruby [#ruby]
dingus_khan has joined #ruby
michael_lee has joined #ruby
<centrx>
Krypt, Go on...
<bnagy>
I don't know if I get you
yfeldblum has joined #ruby
<Krypt>
I build my rectangle witha top left point and a bottom_right point
<bnagy>
a 'box' in 2d would be 4 points
<bnagy>
ok and you infer the other two
<Krypt>
exactly
CaptainJet has quit [Ping timeout: 246 seconds]
x77686d has quit [Quit: x77686d]
<Krypt>
each point has a lat/long
weems is now known as MissGweni_
<rcs>
Krypt: Copy the google maps api. Deal with the meridian spanning in a Bounds object.
chrisseaton has quit []
<bnagy>
then you just need to check if the x and y of the target point are in box X lo box X hi && box Y lo box Y hi
tjr9898 has quit []
CaptainJet has joined #ruby
mikepack has joined #ruby
MissGweni_ is now known as Missanothrmsycho
<rcs>
Krypt: Dealing with it as rectangles straight is kind of painful.
<Krypt>
I also am working on creating a lat_range and long_range, calling a wrappingrange class so I can figure out how I can go from 179 to 180 to -179
Missanothrmsycho is now known as WeemsFridayParad
WeemsFridayParad is now known as FridayParadisoTe
sparrovv has quit [Ping timeout: 264 seconds]
<rcs>
Krypt: Or deal with it as being sw, ne corners instead of the points. So you can do things like "if se.lat > ne.lat".
dkamioka has quit [Remote host closed the connection]
thomasxie has joined #ruby
<bnagy>
wait are the 'ships' boxes or points?
<centrx>
def include?(x,y); x.between?(x1,x2) && y.between?(y1,y2); end
<centrx>
isn't that all it is
<Krypt>
requirements are set that inputs are going to be 4 x/y points for rects and 1 point (x/y) for ships
<bnagy>
ok then I think it's easy
tjr9898 has joined #ruby
<rcs>
Krypt: How do you know which way the rectangle is? Whether it's long way around the earth or short?
<bnagy>
cause you can't be half in a box or anything
<Krypt>
rcs: exactly, I'm not sure
<bnagy>
rcs: hahaha
<rcs>
Krypt: Your problem is underspecified.
FridayParadisoTe is now known as fridaymsycho
<rcs>
Your inputs are lacking.
<bnagy>
although tbh that's why I'd take 4 points for the attack :/
<Krypt>
unfortunately those are all I was provided. I tried to tackle it with the assumption that it is the short way around the earth but wasn't exactly sure how to accomplish that
<rcs>
Krypt: If this is a school project, I would actually translate those to something that encodes the ne/sw corners as such by assuming short way.
momigi has joined #ruby
<bnagy>
just take the smaller or the two
<bnagy>
*of
<rcs>
Take 4 points in, put out a bounding box. Then you have a big if chain for .contains? , which takes the case where it spans the meridian into account.
camilo has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 264 seconds]
<Krypt>
so my WrapperRange takes a left,right, max for initialize. Then does (left..max).include?(point) || (-max..right).include?(point)
michael_lee has quit [Max SendQ exceeded]
<Krypt>
however thats not catching all the edge cases
Celm has quit [Remote host closed the connection]
<bnagy>
can't you just recast to avoid the stupid - / + issue?
<agent_white>
vanillafunk: No. Rails is for web. You _can_ in Ruby. I'm working on writing an IRC client atm.
<bnagy>
just remap it onto 0..360
fridaymsycho is now known as weems
<agent_white>
NT
axsuul has joined #ruby
<agent_white>
MT. Christ irssi.
<Krypt>
bnagy that was my thought also but these are all input as floats
thomasxie has quit [Ping timeout: 264 seconds]
<Krypt>
12.43543 == legit longitude
<bnagy>
right, so it's positive, so add 180?
<bnagy>
for your internal representation
<bnagy>
just seems simpler, to me, but w/e
tjr9898 has quit []
<bnagy>
well s/so it*ive//
<bnagy>
just always add 180
arya__ has joined #ruby
tjr9898 has joined #ruby
<rcs>
bnagy: Okay, you've just moved the goalposts to the 360/0 wraparound.
<Krypt>
also lat is -90 to 90, long is -180 to 180
<bnagy>
oh. stupid spheres :(
tjr9898 has quit [Client Quit]
<bnagy>
fine, double it as well
<bnagy>
add one more range on the front and back! HA!
<rcs>
bnagy: left is 359, right is 1. Is 0 contained?
Hanmac1 has joined #ruby
<bnagy>
that's WAY less complex than two if statements!
<rcs>
bnagy's solution is gross and amazing.
yfeldblum has quit [Read error: Connection reset by peer]
MatthewsFace has joined #ruby
<rcs>
Does it work?
<bnagy>
rcs: well you can assume that right is always > left
tjr9898 has joined #ruby
<bnagy>
if your inputs are always sw ne
<Krypt>
I don't believe it works, it just moves the wrapping issue in some direction
<rcs>
bnagy: Right. So left is 359, right is 1. How do you write the contains? to capture 0.
yfeldblum has joined #ruby
<bnagy>
but you're right, it's getting stupid
tjr9898 has quit [Client Quit]
kate_r has joined #ruby
arya_ has quit [Ping timeout: 264 seconds]
<bnagy>
well it would be 359 and 360 not 359 and 1
davedev2_ has quit [Remote host closed the connection]
ghr has joined #ruby
dzhulk has quit [Quit: Leaving.]
<rcs>
bnagy: The box spans the zero. So 359 and 2. or whatever.
<Krypt>
well the rect could traverse through both maybe it starts at 350 then goes to 5
<Krypt>
including 0
Hanmac has quit [Ping timeout: 264 seconds]
sdouglas has quit [Remote host closed the connection]
<bnagy>
yeah to use no wraps you would have to not do that I think
<bnagy>
like you would have 359 and 365 or whatever
tjr9898 has joined #ruby
<bnagy>
so yes, '0' is contained
<bnagy>
but I already gave up and said it was stupid 20 lines ago
lw has quit [Quit: s]
kitak has quit [Remote host closed the connection]
<bnagy>
(it does work though)
ghr has quit [Ping timeout: 240 seconds]
yfeldblu_ has joined #ruby
Lewix has quit [Remote host closed the connection]
dx7 has quit [Remote host closed the connection]
<bnagy>
as long as right >= left then you don't need to deal with underflow, I think
dx7 has joined #ruby
abdulsattar has joined #ruby
<bnagy>
but you do need to check if a OR a+360 is contained
bradhe has joined #ruby
thistle has joined #ruby
SonicX has quit [Remote host closed the connection]
yfeldbl__ has joined #ruby
<bnagy>
right? I mean I know it's crazy, but I think it at least works
mrnugget has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
kitak has joined #ruby
yfeldblu_ has quit [Ping timeout: 246 seconds]
dapz has joined #ruby
dapz has quit [Max SendQ exceeded]
kotakotakota has quit [Ping timeout: 246 seconds]
danno1 has quit [Ping timeout: 246 seconds]
dx7 has quit [Ping timeout: 264 seconds]
okdas has joined #ruby
Amart41 has joined #ruby
greenride has left #ruby [#ruby]
<bnagy>
if right < left you just add 360 to it
lyanchih_ has joined #ruby
<centrx>
How did these rectangles turn into polar coordinates
<bnagy>
cause they're apparently real lat longs
<bnagy>
I am just making hax.
arya__ has quit [Ping timeout: 255 seconds]
SCommette has quit [Quit: SCommette]
vpretzel has joined #ruby
beneggett has joined #ruby
yasushi has quit [Remote host closed the connection]
funburn has joined #ruby
dingus_khan has quit [Remote host closed the connection]
<agent_white>
bnagy and shevy are the hax makers
michael_lee has joined #ruby
<agent_white>
Like Martha Stewart with the gibson
okdas has quit [Ping timeout: 255 seconds]
<bnagy>
rcs: ADMIT I AM RIGHT DAMMIT
<agent_white>
and centrx, soz I didn't say it
<rcs>
bnagy: You're a pimp.
bluehavana_ has quit [Quit: Connection closed for inactivity]
* bnagy
must have the approval of random people on IRC!!
Amart41 has quit [Ping timeout: 255 seconds]
* agent_white
tapers his bnagy poster on his wall
fgo has joined #ruby
<bnagy>
as much as it pains me to say it, imho my way actually lets you write the contains pretty neatly :<
<centrx>
agent_white, Have you seen my latest hack?
vpretzel has quit [Ping timeout: 240 seconds]
<bnagy>
you just check x or x+360 in lat, y or y+180 in long
<bnagy>
uh otherway round
michael_lee has quit [Max SendQ exceeded]
<agent_white>
centrx: I have not yet my friend ;D
<centrx>
Check THIS out!
<bnagy>
oh god
michael_lee has joined #ruby
<centrx>
>> [1,2,3,4] * 'potato'
<bnagy>
SIGH
hamakn has quit [Ping timeout: 246 seconds]
<centrx>
PING EVAL-IN WAKE UP BOT
<centrx>
>> [1,2,3,4] * 'potato'
<centrx>
whatisthisshit
<centrx>
You're running my hack eval-in
<centrx>
ruining
<agent_white>
SOOO. I saw that the other day and it's now a sticky note on my desk...
<centrx>
lol
<centrx>
k good
<agent_white>
As in saw that from you hahah.
* agent_white
faints in fan-boyism
m104 has joined #ruby
hamakn has joined #ruby
<centrx>
bnagy his hiding his being impressed behind faux eye-rolling
fgo has quit [Ping timeout: 240 seconds]
<bnagy>
it was amusing
<bnagy>
THE FIRST 4 TIMES
nari has joined #ruby
<centrx>
Good, I only remember doing it a couple times, so it will still be amusing
<matcouto>
Is it possible to get a let block object dynamically ? For example, let(:vehicle) { LoadVeicle.new(type_of_vehicle)} and then pass the type of vehicle you want to work with?
Inoperab_ has joined #ruby
platzhirsch has left #ruby [#ruby]
Inoperab_ has quit [Read error: Connection reset by peer]
Inoperab_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
thistle has quit [Remote host closed the connection]
Inoperable has quit [Ping timeout: 264 seconds]
thistle has joined #ruby
vpretzel has joined #ruby
blom has joined #ruby
nfk has joined #ruby
okdas_ has joined #ruby
rm_ has joined #ruby
fgo has joined #ruby
funburn has joined #ruby
_justin has joined #ruby
thistle has quit [Ping timeout: 252 seconds]
vpretzel has quit [Ping timeout: 252 seconds]
teddyp1cker has joined #ruby
tylersmith has quit [Remote host closed the connection]
diegoviola has joined #ruby
northfurr has quit [Ping timeout: 264 seconds]
tylersmith has joined #ruby
fgo has quit [Ping timeout: 252 seconds]
blom has quit [Ping timeout: 246 seconds]
<Krypt>
Has anyone heard/used exercism.io?
Elhu has joined #ruby
shiney has joined #ruby
teddyp1cker has quit [Ping timeout: 264 seconds]
tylersmith has quit [Ping timeout: 255 seconds]
yacks has quit [Ping timeout: 240 seconds]
thomasxie has joined #ruby
<shiney>
why are 'not', 'and' and 'or' frowned upon, in favour of '!', '&&' and '||' ?
apeiros has joined #ruby
W0rmDr1nk has quit [Ping timeout: 255 seconds]
W0rmDr1nk has joined #ruby
thomasxie has left #ruby [#ruby]
agent_wh1te has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
jack_rabbit has quit [Ping timeout: 246 seconds]
Celm has quit [Remote host closed the connection]
yacks has joined #ruby
<mozzarella>
they aren't the same
coderxin has joined #ruby
timonv has joined #ruby
tagrudev has joined #ruby
tonni_ has quit [Remote host closed the connection]
moneydouble has quit [Quit: Leaving.]
SrPx has quit [Remote host closed the connection]
<agent_wh1te>
Dear Somebady: Please make make babies with Ncurses and Ruby along with solid documentation; Ncursesw's "Well you needa know how to use Ncurses in C first..." does not fucking work.
<agent_wh1te>
Love, all of us.
bradhe has quit [Remote host closed the connection]
mikepack has joined #ruby
coderxin has quit [Ping timeout: 264 seconds]
<agent_wh1te>
PS - If you maintain ncursesw and are in this channel... please go take a long walk to think about your life. Love, agent_white
ifmatch has quit []
chuk has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
Doppp has joined #ruby
tkuchiki has joined #ruby
mikepack has quit [Ping timeout: 255 seconds]
tectonic has quit []
lilltiger_ has quit [Ping timeout: 240 seconds]
reset has joined #ruby
lilltiger_ has joined #ruby
evenix has joined #ruby
aganov has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
reset has quit [Ping timeout: 246 seconds]
lilltiger_ has quit [Ping timeout: 240 seconds]
amritanshu_RnD has joined #ruby
amritanshu_RnD is now known as Guest72277
marcdel has quit []
marcdel has joined #ruby
lilltiger_ has joined #ruby
cj3kim has quit [Remote host closed the connection]
apeiros has joined #ruby
gaussblurinc has joined #ruby
YamakasY has quit [Remote host closed the connection]
cj3kim has joined #ruby
Inoperab_ has quit [Read error: Connection reset by peer]
timonv has quit [Remote host closed the connection]
Inoperable has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
freerobby has quit [Quit: Leaving.]
tonni has joined #ruby
gilest has joined #ruby
gaussblurinc has quit [Quit: Leaving.]
x77686d has joined #ruby
axsuul has quit [Ping timeout: 264 seconds]
Elhu has joined #ruby
<Krypt>
if I have range 45.0..0 wouldn't shouldn't that include 40?
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
ayaz has joined #ruby
ayaz has quit [Max SendQ exceeded]
apeiros has quit [Read error: Connection reset by peer]
marcdel has quit []
x77686d_ has joined #ruby
momigi has quit [Remote host closed the connection]
x77686d has quit [Ping timeout: 252 seconds]
x77686d_ is now known as x77686d
chuk has quit [Quit: Leaving]
lilltiger_ has quit [Ping timeout: 264 seconds]
lilltiger__ has joined #ruby
SrPx has joined #ruby
alexju has quit [Remote host closed the connection]
mrnugget has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
Dwarf has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
charlie__ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
mrnugget has joined #ruby
bradhe has joined #ruby
charlies_ has quit [Ping timeout: 264 seconds]
noop has joined #ruby
justinxreese has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
charlie__ has quit [Read error: Connection reset by peer]
fgo has joined #ruby
SrPx has quit [Ping timeout: 264 seconds]
lilltiger__ has quit [Ping timeout: 252 seconds]
NovapaX has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
SidWu has joined #ruby
lilltiger__ has joined #ruby
OdNairy has joined #ruby
blom has joined #ruby
crazymykl has quit [Ping timeout: 240 seconds]
vpretzel has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
<bricker`LA>
How would you cram this logic into as little code as possible: If there is a start AND end time, check if we're currently between them. If there's only a start time, check if we're after it. If only an end time, check if we're before it. Basically I want to check if an event is currently happening.
Spleeze has joined #ruby
userx has quit [Ping timeout: 240 seconds]
blom has joined #ruby
momigi has joined #ruby
vpretzel has joined #ruby
<crome>
and why do you want to cram it into as little code as possible?
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
Gabri has joined #ruby
Gabri has quit [Max SendQ exceeded]
mehlah has joined #ruby
lolmaus_ has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
havenwood has quit [Ping timeout: 264 seconds]
lolmaus has quit [Ping timeout: 264 seconds]
Wolland has joined #ruby
Gabri has joined #ruby
Gabri has quit [Max SendQ exceeded]
workmad3 has joined #ruby
Gabri has joined #ruby
jlebrech has joined #ruby
timonv has joined #ruby
kitak has joined #ruby
drx_ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Gabri has quit [Client Quit]
ahmedelgabri has joined #ruby
ahmedelgabri has quit [Client Quit]
RSTJNII has quit [Read error: Connection reset by peer]
drx_ has quit [Read error: Connection reset by peer]
RSTJNII has joined #ruby
Gabri has joined #ruby
Zunonia__ has quit [Quit: Computer has gone to sleep.]
drx_ has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
jlast has joined #ruby
mrnugget has quit [Quit: mrnugget]
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
Gabri has quit []
funburn has quit [Quit: funburn]
Gabri has joined #ruby
cj3kim has joined #ruby
voycey has joined #ruby
drx___ has joined #ruby
reset has joined #ruby
vpretzel has joined #ruby
jespada has joined #ruby
<voycey>
Can anyone recommend a book for Ruby please? (as in an actual printed thing that I can attack with a pencil?), im not new to programming and not a complete novice with Ruby but id like something that is pretty indepth
WormDr1nk has quit [Ping timeout: 246 seconds]
WormDr1nk has joined #ruby
WormDr1nk has quit [Changing host]
WormDr1nk has joined #ruby
<tobiasvl>
voycey: the O'Reilly book The Ruby Programming Language is good (and co-written by matz)
drx_ has quit [Read error: Connection reset by peer]
alexju has quit [Remote host closed the connection]
<ghr>
I still learnt from it after a fair amount of time with ruby though
<voycey>
Thanks guys
cj3kim has quit [Read error: Connection reset by peer]
reset has quit [Ping timeout: 246 seconds]
<voycey>
has there been much of an API change from 1.9 to 2.1?
vpretzel has quit [Ping timeout: 240 seconds]
<voycey>
I dont want to start behind :)
lyanchih_ has joined #ruby
Guest13108 has quit [Ping timeout: 264 seconds]
<ghr>
2.0/2.1 have some new stuff that I haven't used yet :)
fgo has joined #ruby
<ghr>
I think you'd be mostly fine with anything referencing 1.9, and just read some blogs on the new features
drx_ has joined #ruby
rm_ has quit [Remote host closed the connection]
drx_ has quit [Read error: Connection reset by peer]
rm_ has joined #ruby
relix has joined #ruby
<voycey>
Ok sound - thanks :)
obs has quit [Remote host closed the connection]
sdouglas has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
obs has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
Kneferilis has quit [Read error: Connection reset by peer]
<shevy>
voycey ruby 1.9 is mostly like ruby 2.1 really
TMM has quit [Quit: Ex-Chat]
<crome>
bunch of new stuff but no significant changes
<voycey>
cool - now I just need a few extra hours a day to get involved in this :(
kevinykchan has quit [Read error: Connection reset by peer]
rm_ has quit [Ping timeout: 240 seconds]
kevinykchan has joined #ruby
<shevy>
try the weekends
drx_ has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
drx_ has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
lolmaus has joined #ruby
Hanmac has joined #ruby
<voycey>
what is this weekend you talk of?
wjlafrance has quit [Quit: This computer has gone to sleep]
kaliya has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
blom has joined #ruby
RoryHughes has quit [Remote host closed the connection]
claymore has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
Wolland has quit [Ping timeout: 240 seconds]
Guest13108 has joined #ruby
kevinykchan has joined #ruby
<shevy>
it's when you don't have to work
Jetchisel has joined #ruby
pfg has joined #ruby
fgo has joined #ruby
armyriad has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
danshultz has quit [Remote host closed the connection]
drx_ has joined #ruby
tjr9898 has quit [Read error: Connection reset by peer]
mikepack has quit [Ping timeout: 240 seconds]
danshultz has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
abdulsattar has quit [Ping timeout: 240 seconds]
fabrice31 has joined #ruby
tjr9898 has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
drx_ has joined #ruby
blom has quit [Ping timeout: 240 seconds]
danshultz has quit [Ping timeout: 240 seconds]
JasmeetQA1 has joined #ruby
drx___ has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
spergy has left #ruby [#ruby]
mengu has quit [Remote host closed the connection]
WormDr1nk has quit [Ping timeout: 264 seconds]
<voycey>
dont....have....to....work? I dont follow ;)
<voycey>
after next month ill be sound - I just need to get this project out the way and then ill actually have some time!
JasmeetQA2 has joined #ruby
maasha has joined #ruby
_justin has joined #ruby
JasmeetQA has quit [Ping timeout: 264 seconds]
x77686d has joined #ruby
<shevy>
cool
<shevy>
even working on the weekends
<shevy>
at least you'll get rich
nbezzala has quit [Read error: Connection reset by peer]
Atw has quit [Ping timeout: 240 seconds]
<maasha>
gday
JasmeetQA1 has quit [Ping timeout: 240 seconds]
drx___ has quit [Ping timeout: 264 seconds]
drx_ has joined #ruby
<shevy>
hey maasha my bioinfo man
cj3kim has joined #ruby
<maasha>
shevy: ATCGATAGA
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 264 seconds]
drx_ has quit [Read error: Connection reset by peer]
TMM has joined #ruby
<Hanmac>
maasha: lets make a tree that stores Nitro inside its cells to make the wood more "burnable" ;P
cj3kim has quit [Read error: Connection reset by peer]
<maasha>
Hanmac: what about a money tree?
<shevy>
maasha 3' - UAGCUAUCU - 5'
<Hanmac>
nah thats not funny enough
<jlebrech>
I have a rake task which runs fine but right after the task is run I get a test unit error 'file not found taskname', anyone seen this before?
drx_ has quit [Read error: Connection reset by peer]
<voycey>
also what IDE's do people use here? Im a big PHPStorm fan - how does Rubymine stack up?
andrewlio has joined #ruby
<shevy>
voycey bluefish 1.0.7
<voycey>
as in the linux editor?
<crome>
vim
<crome>
;>
kirun has joined #ruby
<shevy>
the problem with IDEs are that they sometimes do non-standard things
<voycey>
such as?
<shevy>
redmine in particular did do stuff that led to problems, and people on IRC then were confused about that behaviour and attributed it to ruby itsself
<shevy>
*itself
<voycey>
vim is my go to for most things
<shevy>
voycey I dont remember the particular error - it was something that redmine did in addition to running on .rb files
<workmad3>
shevy: you mean rubymine, not redmine, right? :)
<voycey>
hmm - not sure how that would happen haha
<shevy>
other than it is a clone of trac of course
<shevy>
:D
WormDr1nk has joined #ruby
WormDr1nk has joined #ruby
WormDr1nk has quit [Changing host]
<workmad3>
voycey: I use vim, but know a variety of people that use rubymine, emacs or sublime text
fannye has joined #ruby
Macaveli has joined #ruby
SrPx has joined #ruby
<voycey>
I like a full IDE usually - I use vim for my everyday stuff, sublime for big file processing and emacs never.... because uni haha
<workmad3>
shevy: and other than that it's a bit shit, way too much overhead and is beaten in almost every way by either github issue tracking or pivotal tracker? :)
<ghr>
voycey TextMate, but sublime is probably the better choice these days
<maasha>
I tried fancy IDE's a couple of times - got frustrated and ran back to vim
Gadgetoid has quit [Ping timeout: 252 seconds]
<shevy>
hmm
drx_ has quit [Read error: Connection reset by peer]
drx___ has joined #ruby
<shevy>
but github is only on github, nowhere else or? rubymine I could setup for my local company
<jlebrech>
do you use tmux + vim + guard?
<voycey>
IDE for easy debugging - plus IntelliJ's git interface is incredible :)
<voycey>
on the subject of that - what debugger is used for ruby?
<workmad3>
voycey: I started out with trying IDEs (Aptana Studio, then Rubymine), but gave up on them and switched to vim
<shevy>
the brain voycey
Hanmac has quit [Ping timeout: 240 seconds]
<shevy>
and pp
<workmad3>
voycey: tests, stack traces and binding.pry with pry-byebug
<shevy>
and unfortunately, larger projects won't work well without testing :(
drx___ has quit [Read error: Connection reset by peer]
<voycey>
sure - TDD is crucial - im coming from a mostly PHP / Compiled bg
Gadgetoid has joined #ruby
<shevy>
you poor man
<shevy>
php is worse than vodka
<voycey>
workmad3: is there a step through debugger for ruby? (e..g like Xdebug for PHP)
<workmad3>
voycey: binding.pry with pry-byebug
<voycey>
php earns me a very comfortable living ;)
<voycey>
work
timonv has joined #ruby
<voycey>
workmad3: cheers - ill take a look :)
<jlebrech>
we should share vim "ides" via vagrant boxes
<workmad3>
voycey: there's also other debuggers... but pry is awesome for the style of debugging I use (it drops you into a pry console where you can examine and play with the local context, then pry-byebug gives you step, next and continue to go through code-flow)
<workmad3>
jlebrech: or the typical way, with gists or git repos of our dotfiles :)
SrPx has quit [Ping timeout: 240 seconds]
<shevy>
oh man
<voycey>
cool - if I can keep to a workflow similar to I have now then ill be pretty happy
<shevy>
you are all a bunch of vimsters
<workmad3>
jlebrech: vundler makes that possible, as then your plugins are declared as part of your vimrc :)
ItSANgo has quit [Quit: Leaving...]
<shevy>
bundler!
<workmad3>
shevy: I said vundler, not bundler
<shevy>
bundler!!!
Elhu has quit [Quit: Computer has gone to sleep.]
<workmad3>
shevy: although bundler is also good :P
<shevy>
you sundler you
<jlebrech>
yeah, need to see tmux settings and a sample project that integrates tests
amskah has quit [Quit: Leaving]
drx_ has joined #ruby
<voycey>
another question: does everyone use Rails here or are there actually pure Ruby ppl still around?
<crome>
both
<popl>
voycey: Why do you ask?
drx_ has quit [Read error: Connection reset by peer]
<shevy>
is anyone of you creating spreadsheets with ruby?
drx_ has joined #ruby
* crome
looks mortified
Elhu has joined #ruby
sailias has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
<workmad3>
voycey: plenty of plain ruby peeps in here and in #ruby-lang
<workmad3>
(I'm not one of them though)
<voycey>
popl: mostly because I tend to use Frameworks with PHP - and searching for anything Ruby automatically brings up everything Rails - im a great believer in learning the language rather than the framework
<voycey>
I have unfortunately met too many people that think if the framework cant accomplish it - it cant be done in that language - I guess I have a biased view from Google lol
<popl>
What's that got to do with the question you asked, though?
<voycey>
Curiosity
Hanmac1 is now known as Hanmac
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<popl>
I don't see many cats around here.
<voycey>
I'm learning Ruby because I want to get into Rails
teleko has quit [Read error: Operation timed out]
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ghr>
voycey I use ruby as a general purpose language. I also use an appropriate web framework when writing a web app (mostly Sinatra or Rails).
<shevy>
voycey I use ruby as a glue language; just about any task I have related to computers, I throw at ruby
<diegoviola>
i'm trying to write a small ruby script to keep track of my time, what should i use for timers?
sk87 has joined #ruby
hamakn has quit [Remote host closed the connection]
<voycey>
cool - it seems pretty versatile :) I use Python occasionally as a glue language but rarely - cant wait to get started!
kitak has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
blom has joined #ruby
aaronmcadam has joined #ruby
havenwood has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
Wolland has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
fgo has joined #ruby
ctp has joined #ruby
sm1ly has quit [Quit: Leaving]
mark_locklear has joined #ruby
aagdbl has quit [Read error: Connection reset by peer]
fgo has quit [Ping timeout: 240 seconds]
beauby has joined #ruby
aagdbl has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
blom has quit [Ping timeout: 240 seconds]
mengu has quit [Remote host closed the connection]
beauby has quit [Read error: Connection reset by peer]
x77686d has quit [Quit: x77686d]
claymore has joined #ruby
<apeiros>
ghr: only 7 hours? nice
havenwood has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
<ghr>
First key I hit :)
havenwood has joined #ruby
yasushi has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
drx_ has joined #ruby
Kneferilis has joined #ruby
pirelenito has joined #ruby
abdulsattar has quit [Ping timeout: 264 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
Gabri has joined #ruby
Gabri has quit [Max SendQ exceeded]
yokel has quit [Remote host closed the connection]
yokel has joined #ruby
yasushi has quit [Remote host closed the connection]
yokel has quit [Remote host closed the connection]
fabrice31 has joined #ruby
linojon has joined #ruby
koos303 has joined #ruby
drx_ has quit [Ping timeout: 240 seconds]
tt1187 has joined #ruby
sk87 has joined #ruby
banister has joined #ruby
jlast has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
crystal77 has quit [Quit: Computer has gone to sleep.]
cj3kim has joined #ruby
yokel has joined #ruby
lxsameer has quit [Quit: Leaving]
drx_ has joined #ruby
tvw has quit []
tvw has joined #ruby
zigomir has joined #ruby
rootshift has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
Al__ has quit [Quit: Al__]
<benzrf>
hej da
nari has joined #ruby
voycey has left #ruby [#ruby]
<benzrf>
how can i analyze C data types and structs n shit from ruby
<benzrf>
is there a hook with libclang or something
<benzrf>
basically i wanna feed it a C project and get out json descriptions of structs and types or some shit
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<benzrf>
to be precise im hoping to generate some serialization code
cj3kim has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
Mon_Ouie has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
bluehavana_ has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
havenwood has joined #ruby
nateberkopec has joined #ruby
Al__ has joined #ruby
jollyy_ has joined #ruby
jollyy has quit [Ping timeout: 240 seconds]
jollyy_ is now known as jollyy
thistle has joined #ruby
drx_ has joined #ruby
joonty has quit [Quit: WeeChat 0.4.2]
Wolland has joined #ruby
mjs2600 has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
drx_ has quit [Read error: Connection reset by peer]
tvw has quit [Ping timeout: 264 seconds]
mrnugget has quit [Quit: mrnugget]
poikon__ has joined #ruby
amundj has quit [Read error: Connection reset by peer]
Gabri has joined #ruby
Gabri has quit [Max SendQ exceeded]
amundj has joined #ruby
tvw has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
Gabri has joined #ruby
drx_ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thistle has quit [Ping timeout: 240 seconds]
Rollabunna has joined #ruby
DouweM has joined #ruby
Wolland has quit [Ping timeout: 240 seconds]
poikon_ has quit [Ping timeout: 246 seconds]
<DouweM>
EuRuko 2014 was just cancelled :(
<avril14th>
Hello, when I start my ruby application, I get a W, [2014-03-19T12:32:50.022566 #4590] WARN -- : uninitialized constant Stuffs::Period . Is there any more verbose warning that tells me where this is raised?
drx_ has quit [Read error: Connection reset by peer]
<pontiki>
what is your ruby application?
<avril14th>
a rails app :)
<pontiki>
did you write it?
<avril14th>
i did
joonty has joined #ruby
rootshift has joined #ruby
<pontiki>
look in the rails log for the environment you're getting that error in
drx_ has joined #ruby
lxsameer has joined #ruby
havenwood has quit [Remote host closed the connection]
kevinykchan has quit [Read error: Connection reset by peer]
* avril14th
opens the log
havenwood has joined #ruby
kevinykchan has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
drx_ has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
Mon_Ouie has quit [Ping timeout: 246 seconds]
<avril14th>
sa
<avril14th>
it says nothing more, hmm
rmorello has joined #ruby
<shevy>
lol
mrnugget has joined #ruby
jollyy has quit [Read error: No route to host]
drx_ has joined #ruby
jjbohn has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<pontiki>
what is Stuffs::Period?
<avril14th>
a module in a module
<pontiki>
never mind
sailias has joined #ruby
gnagno has quit [Ping timeout: 264 seconds]
drx_ has quit [Read error: Connection reset by peer]
_tpavel has quit [Quit: Leaving]
<shevy>
hehe
senayar has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
alexju has quit [Remote host closed the connection]
<DouweM>
you can just prefix it, as rdark might not now, the 0 is just an indication to the Ruby interpreter that the following digits should be interpreted as octal
drx___ has joined #ruby
<rdark>
yep, that's fine I can store it as a string and then just convert to octal integer
Wolland has joined #ruby
drx_ has quit [Ping timeout: 246 seconds]
braincrash has joined #ruby
geoffw8_ has joined #ruby
drx___ has quit [Read error: Connection reset by peer]
atlas__ has joined #ruby
jlast has joined #ruby
tjr9898 has quit [Read error: Connection reset by peer]
claymore has quit [Ping timeout: 246 seconds]
tjr9898 has joined #ruby
tjr9898 has quit [Remote host closed the connection]
meinside has quit [Quit: Connection closed for inactivity]
dkamioka has joined #ruby
tjr9898 has joined #ruby
drx_ has joined #ruby
kpshek has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
benzrf is now known as benzrf|offline
Wolland has quit [Ping timeout: 240 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
kpshek has quit [Client Quit]
aagdbl has quit [Quit: This computer has gone to sleep]
Lewix has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
drx_ has joined #ruby
mengu has quit [Remote host closed the connection]
browndawg1 has quit [Quit: Leaving.]
browndawg has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
Advocation has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
sailias has joined #ruby
blom has joined #ruby
reset has quit [Ping timeout: 264 seconds]
Elhu has joined #ruby
jeregrine has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
makara has quit [Ping timeout: 255 seconds]
ffranz has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
aspires has quit []
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
jackneill has joined #ruby
LekeFly has joined #ruby
mary5030 has joined #ruby
Avahey_ has joined #ruby
blom has quit [Ping timeout: 246 seconds]
cj3kim has joined #ruby
drx_ has joined #ruby
lyanchih_ has joined #ruby
tylersmith has joined #ruby
shaunbaker has joined #ruby
flowerhack has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
pirelenito has quit [Quit: pirelenito]
ffranz has quit [Excess Flood]
AlexRussia has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
ffranz has joined #ruby
LekeFly has quit [Ping timeout: 264 seconds]
vpretzel has quit [Quit: Adios!]
sdouglas has quit [Remote host closed the connection]
relix_ has joined #ruby
meatherly has joined #ruby
sdouglas has joined #ruby
vpretzel has joined #ruby
MrThePlague has joined #ruby
MrThePlague has joined #ruby
relix has quit [Read error: Connection reset by peer]
poikon_ has joined #ruby
poikon_ has quit [Remote host closed the connection]
eichenwald has joined #ruby
poikon_ has joined #ruby
crystal77 has joined #ruby
pirelenito has joined #ruby
lxsameer has quit [Quit: Leaving]
drx_ has joined #ruby
vt102 has joined #ruby
jjbohn has joined #ruby
dx7 has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
drx_ has quit [Read error: Connection reset by peer]
andrewlio1 has joined #ruby
_justin has quit [Quit: _justin]
poikon__ has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
andrewlio has quit [Ping timeout: 240 seconds]
drx_ has joined #ruby
danno1 has joined #ruby
krz has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
bynaryshef has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
drx_ has quit [Read error: Connection reset by peer]
alexju has joined #ruby
drx_ has joined #ruby
SCommette has joined #ruby
brkattk has joined #ruby
sdouglas has joined #ruby
shaunbaker has quit [Remote host closed the connection]
juarlex has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
kevinykchan has quit [Read error: Connection reset by peer]
JaTochNietDan has quit [Ping timeout: 246 seconds]
banister has joined #ruby
kevinykchan has joined #ruby
sdouglas has quit [Remote host closed the connection]
pu22l3r has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mikemar10 has joined #ruby
mikemar10 has quit [Max SendQ exceeded]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JaTochNietDan has joined #ruby
drx_ has joined #ruby
stringoO has joined #ruby
daxroc has joined #ruby
<daxroc>
Evening all
drx_ has quit [Read error: Connection reset by peer]
<stringoO>
This might be a really simple question, but if I set a variable to an element of a hash, how do I change the variable without changing the value in the hash? I've illustrated my problem here - https://gist.github.com/surajreddy/e58efe81a5ed7fdbc059
Xeago has quit [Remote host closed the connection]
<stringoO>
morning daxroc!
niharvey is now known as niharvey|brb
<daxroc>
What does the tilde do in 'x =~ /regexp/'
MatthewsFace has joined #ruby
Xeago has joined #ruby
pirelenito has quit [Quit: pirelenito]
<xea>
tests if your string matches with the regular expression
fgo has joined #ruby
pu22l3r has quit [Ping timeout: 270 seconds]
benzrf|offline is now known as benzrf
drx_ has joined #ruby
gnagno has joined #ruby
<daxroc>
xea: Thanks
arietis has quit [Quit: Computer has gone to sleep.]
<stringoO>
cool!
drx_ has quit [Read error: Connection reset by peer]
jackneill has quit [Ping timeout: 264 seconds]
mansi has joined #ruby
jackneill1 has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
fgo has quit [Ping timeout: 240 seconds]
drx_ has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
Xeago has quit [Ping timeout: 264 seconds]
evenix has joined #ruby
Lewix has joined #ruby
x77686d has joined #ruby
<Lewix>
yo
mansi has quit [Read error: Connection reset by peer]
drx_ has quit [Read error: Connection reset by peer]
mansi has joined #ruby
drx_ has joined #ruby
<abdulsattar>
stringoO: x = a[:b].dup
cj3kim has joined #ruby
kevinykchan has joined #ruby
<stringoO>
thanks abdulsattar! :)
jlebrech has quit [Ping timeout: 240 seconds]
lw has joined #ruby
juarlex has quit [Remote host closed the connection]
hamakn has quit [Remote host closed the connection]
Hamburglr has joined #ruby
atraylen has joined #ruby
vlad_starkov has joined #ruby
jobewan has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
LekeFly has joined #ruby
bal has quit [Quit: bal]
kevinykchan has joined #ruby
drx_ has quit [Ping timeout: 246 seconds]
Wolland has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
drx_ has joined #ruby
SonicX has quit [Read error: Connection reset by peer]
drx_ has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 240 seconds]
maasha has quit [Quit: Page closed]
drx_ has joined #ruby
shaunbaker has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
wwalker has joined #ruby
zz_jrhorn424 is now known as jrhorn424
bal has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
noop has quit [Ping timeout: 240 seconds]
lmickh has joined #ruby
Wolland has quit [Ping timeout: 264 seconds]
_Andres has quit [Quit: jazz]
vlad_starkov has joined #ruby
<wwalker>
what method or class would I use to tell whether these wer upper, lower, or mixed case: УХОДИТЬ I think its Russian Cyryllic but what if I didn't even know the charset?
drx_ has joined #ruby
vlad_sta_ has joined #ruby
nerdman has quit [Quit: leaving]
nhmood has joined #ruby
lw has quit [Quit: s]
maroloccio has joined #ruby
lyanchih_ has quit [Quit: lyanchih_]
drx___ has joined #ruby
lyanchih has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
shaunbaker has quit [Remote host closed the connection]
geopet has joined #ruby
momigi has joined #ruby
drx___ has quit [Ping timeout: 246 seconds]
xerxas has joined #ruby
ctp has quit [Quit: Leaving...]
arubincloud has joined #ruby
iceden has joined #ruby
drx_ has joined #ruby
momigi has quit [Remote host closed the connection]
<jmaister>
wwalker: Uppercase it, see if it matches, lowercase it, see if it matches, default is mixed?
momigi has joined #ruby
cina has joined #ruby
momigi has quit [Read error: Connection reset by peer]
drx_ has quit [Read error: Connection reset by peer]
momigi has joined #ruby
jgabrielygalan has joined #ruby
<jmaister>
wwalker: or regex /[[:upper:]]/.match("УХОДИТЬ") etc
jgabrielygalan has quit [Client Quit]
yfeldblum has quit [Ping timeout: 240 seconds]
jgabrielygalan has joined #ruby
reset has joined #ruby
<cina>
ARGF is an IO stream, can I open the IO class and add a method that is used by ARGF? e.g. ARGF.hi, which is defined in `class IO; def hi; "hi"; end; end'
geggam has joined #ruby
<Photism>
learning ruby as my first programming language, it's so much fun
drx_ has joined #ruby
mercwithamouth has joined #ruby
meatherly has quit [Remote host closed the connection]
<wwalker>
ah [[ I was trying to use posix classes with just [:upper:] Thanks jmaister
meatherly has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
Spami has joined #ruby
Xeago has joined #ruby
<jmaister>
Photism: Have you read Why's poignant guide to Ruby?
<Photism>
nope, do I need to buy it or is it a free resource?
<Photism>
any learning resources that's easy to understand for complete newbies to programming would be greatly appreciated
<ghr>
Anyone know how I can inject a stylesheet with Nokogiri? Nokogiri::XML::ProcessingInstruction Is almost what I want except the tags are formatted as XML tags (i.e. <?link rel...)=
<xea>
poignant guide is a absolutely vital even for non-programmers
<xea>
possibly the greatest book ever
bynaryshef has quit []
<tobiasvl>
agreed
<jmaister>
My dad doesn't know shit about programming. He loved the book
RaCx has joined #ruby
<Photism>
thanks friends! greatly appreciated
eichenwald has quit [Quit: eichenwald]
drx_ has joined #ruby
reset has quit [Ping timeout: 269 seconds]
sk87 has joined #ruby
meatherly has quit [Ping timeout: 240 seconds]
tonni has quit [Remote host closed the connection]
drx___ has joined #ruby
tonni has joined #ruby
eichenwald has joined #ruby
drx___ has quit [Read error: Connection reset by peer]
chrisseaton has joined #ruby
sambao21 has joined #ruby
tonni has quit [Read error: Connection reset by peer]
braincrash has quit [Quit: bye bye]
bbloom has joined #ruby
drx_ has quit [Ping timeout: 240 seconds]
duggiefresh has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
duggiefresh has joined #ruby
cj3kim has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
mansi has quit [Remote host closed the connection]
drx_ has quit [Read error: Connection reset by peer]
mansi has joined #ruby
braincrash has joined #ruby
fantazo has joined #ruby
hopkin has joined #ruby
zachallett has quit []
krz has quit [Quit: WeeChat 0.4.3]
niharvey|brb is now known as Niharvey
Niharvey is now known as niharvey
<hopkin>
Hello, I am learning ruby here and when I try to return the length of a variable it is adding 1 character to the return, I tried chomping the variable but still it adds one https://gist.github.com/hopkin78/9643810 is the code
cj3kim has quit [Ping timeout: 240 seconds]
<hopkin>
So if I put in Cam it should return 3 not 4 but it returns 4, what am I doing wrong?
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
zachallett has joined #ruby
mikepack has joined #ruby
tylersmith has quit [Remote host closed the connection]
RaCx has quit [Quit: Computer has gone to sleep.]
<benzrf>
hopkin: String#chomp is non-mutating
<benzrf>
either do this:
nomenkun has quit [Remote host closed the connection]
zachallett has quit [Client Quit]
<benzrf>
name = name.chomp
<benzrf>
or do this:
<benzrf>
name.chomp!
tylersmith has joined #ruby
fgo has joined #ruby
nomenkun has joined #ruby
zachallett has joined #ruby
mmoretti has joined #ruby
meatherly has joined #ruby
drx_ has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
fortin has joined #ruby
mansi_ has quit [Remote host closed the connection]
blom_ has joined #ruby
uxp has quit [Quit: Lost terminal]
QuintinAdam has joined #ruby
<fortin>
hi folks. I'd like to get a non random integer from a string. Any way to do this easily?
uxp has joined #ruby
<fortin>
v1.8
drx_ has quit [Read error: Connection reset by peer]
MatthewsFace has quit [Quit: This computer has gone to sleep]
AlexRussia has quit [Read error: Connection reset by peer]
sski has joined #ruby
shredding has joined #ruby
cj3kim has joined #ruby
Advocation has joined #ruby
LastWhisper has joined #ruby
atlas__ has quit [Ping timeout: 270 seconds]
beneg has joined #ruby
<mjc_>
lethjakman: so in the case of nil coming back from params, dealing with them right away and making sure they don't get passed to the code that runs it is good
rm_ has joined #ruby
bal has joined #ruby
rippa has joined #ruby
robbyoconnor has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
<pontiki>
this is one of the issues i have with using the current_user in rails that comes from devise.
mikepack_ has quit [Ping timeout: 246 seconds]
<pontiki>
it's all over our code now
<pontiki>
current_user.try(:blah)
<pontiki>
i hate it
mansi has quit [Remote host closed the connection]
beneggett has quit [Read error: Connection reset by peer]
<mjc_>
I try to avoid putting it in views and that seems to help
cj3kim has quit [Ping timeout: 240 seconds]
koos303 has quit [Quit: leaving]
relix has joined #ruby
beneggett has joined #ruby
mansi has joined #ruby
<pontiki>
that's what i've been doing when i am in code like that
juarlex has joined #ruby
<mjc_>
decorators can be helpful for views
nisstyre has joined #ruby
freerobby has joined #ruby
thomasxie has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
tdahlke has joined #ruby
<mjc_>
say you have a top bar where you put the user name and whatnot, I use a decorator for those
beneg has quit [Ping timeout: 240 seconds]
mansi has quit [Read error: Connection reset by peer]
<mjc_>
cells also looks like a neat concept but I haven't tried that yet
browndawg has quit [Quit: Leaving.]
drx_ has joined #ruby
claymore has quit [Ping timeout: 264 seconds]
eichenwald has quit [Quit: eichenwald]
matson has left #ruby [#ruby]
mark_locklear has quit [Ping timeout: 240 seconds]
eichenwald has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
coderxin has quit [Remote host closed the connection]
drx_ has joined #ruby
eichenwald has quit [Read error: Connection reset by peer]
tdahlke has quit [Client Quit]
claymore has joined #ruby
mansi has joined #ruby
travisd has joined #ruby
Celm has joined #ruby
tonni has joined #ruby
beneg has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
travisd has left #ruby [#ruby]
cina has joined #ruby
beneggett has quit [Ping timeout: 240 seconds]
lethjakman has quit [Ping timeout: 240 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
beneggett has joined #ruby
<clocKwize>
guys, anyone know how to stub a builder type method?
drx_ has joined #ruby
acrussell has joined #ruby
<clocKwize>
e.g. one that takes a block and calls it with a config object
mercwithamouth has joined #ruby
<clocKwize>
to set it up
<clocKwize>
I want to check its giving it the right settings
<cina>
hello guys, how do I add a method to ARGF? should I open the IO class?
drx_ has quit [Read error: Connection reset by peer]
pirelenito has joined #ruby
mjs2600 has quit [Remote host closed the connection]
arya__ has quit [Read error: Connection reset by peer]
brkattk has left #ruby [#ruby]
beneg has joined #ruby
sk87 has joined #ruby
blom__ has joined #ruby
blom_ has quit [Ping timeout: 240 seconds]
geopet has quit [Ping timeout: 240 seconds]
pr0ggie has joined #ruby
beneggett has quit [Ping timeout: 240 seconds]
bal has quit [Quit: bal]
arya_ has joined #ruby
dingus_khan has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<pontiki>
wow, thanks; i'm going to have to study that more
geopet has joined #ruby
chrisseaton has quit []
travis-d has joined #ruby
timonv has quit [Remote host closed the connection]
travis-d has quit [Client Quit]
<mjc_>
pontiki: a decorator is a good option as well, easier to get going than something like cells
travis-d has joined #ruby
s2013 has joined #ruby
<mjc_>
draper is one example of a gem for helping with that but you can even make them with POROs
<s2013>
if i have a hash. how do i select the first 5 keys only?
<s2013>
and do operations on that
IcyDragon has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
reset has joined #ruby
michaeldeol has joined #ruby
IceDragon has quit [Ping timeout: 240 seconds]
travis-d has quit [Client Quit]
IcyDragon is now known as IceDragon
travis-d has joined #ruby
vlad_sta_ has quit [Write error: Broken pipe]
beneggett has joined #ruby
alex88 has quit [Ping timeout: 240 seconds]
lilltiger__ has joined #ruby
lilltiger__ is now known as lilltiger
beneg has quit [Ping timeout: 246 seconds]
lw has joined #ruby
rootshift has joined #ruby
rvraghav93_ has quit [Ping timeout: 264 seconds]
travis-d has quit [Remote host closed the connection]
travis-d has joined #ruby
reset has quit [Ping timeout: 240 seconds]
duggiefresh has quit [Remote host closed the connection]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Wolland has quit [Ping timeout: 253 seconds]
<s2013>
anyone?
drx_ has joined #ruby
rvraghav93 has joined #ruby
sonicbee has joined #ruby
einarj has quit [Remote host closed the connection]
pr0ggie has quit [Max SendQ exceeded]
kaspergrubbe has quit [Remote host closed the connection]
drx_ has quit [Read error: Connection reset by peer]
Spami has quit [Quit: This computer has gone to sleep]
pr0ggie has joined #ruby
mostlybadfly has joined #ruby
<crome>
s2013: there is no such thing as first 5 keys in a hash
moted has joined #ruby
beneggett has quit [Read error: No route to host]
<s2013>
darn
<s2013>
ok
<crome>
you can do Hash#keys and do something
beneggett has joined #ruby
<crome>
like sort them and pick the first 5
<s2013>
i found a better way that would work for now
braincrash has joined #ruby
<s2013>
cause the keys i need are all ints
<s2013>
so i just did h.select{ |k,v| k.is_a? Fixnum }
<s2013>
should do the trick for now
<pontiki>
mjc_: I just looked at one partial, there's about 20 checks for current_user.nil? (or equiv)
bluOxigen has quit [Ping timeout: 246 seconds]
ga1j1n has quit [Remote host closed the connection]
<pontiki>
and the code repeats over and over and over :(
ga1j1n has joined #ruby
<mjc_>
pontiki: so a quick fix would be a decorator that handles the nil checks and maybe also formatting so you can just do current_user.name or whatnot
<shevy>
can you prove that you worked without payment?
<apeiros>
what? you must be a citizen in order to sue?
<diegoviola>
I'm alone in this country, nobody will help me
<dorei>
diegoviola: next time insert time bombs into your code :D
drx_ has joined #ruby
<shevy>
diegoviola that's ok, I am alone in my home country as well ;)
Php_user has left #ruby [#ruby]
RaCx has joined #ruby
timonv has quit [Read error: Connection reset by peer]
<diegoviola>
they asked me to write a rails application as a "trial", I spent 10 days working on that, I passed the test, they "hired" me for 3 months as a probationary trial/test/whatever, then after that I was going to be a full-time employee supposedly, but they fired me after 2 weeks with some shit excuse
george2|chakra has joined #ruby
timonv has joined #ruby
<diegoviola>
so I sent them an invoice for the 2 weeks, and 1 month later they tell me they're not going to pay
Rober9393 has joined #ruby
beneggett has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
drx___ has joined #ruby
jollyy has quit [Ping timeout: 240 seconds]
mrnugget has quit [Ping timeout: 240 seconds]
timonv has quit [Read error: Connection reset by peer]
jonatasdp has joined #ruby
samuel02 has joined #ruby
george2 has quit [Ping timeout: 264 seconds]
<RubyPanther>
diegoviola: Send them to collections, then their bank will tell them to pay it next time they get a loan
reset has joined #ruby
pirelenito_ has joined #ruby
<diegoviola>
none of that was rewarded
<diegoviola>
RubyPanther: how to do this?
<pontiki>
should have made the trial open source
pirelenito_ has quit [Client Quit]
timonv has joined #ruby
drx___ has quit [Read error: Connection reset by peer]
<diegoviola>
pontiki: i can do that, i still have the code
pirelenito has quit [Ping timeout: 246 seconds]
wallerdev has joined #ruby
pirelenito_ has joined #ruby
<diegoviola>
pontiki: they asked me to not to make it open source
dagobah has quit [Quit: Leaving...]
<pontiki>
too bad for them
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<pontiki>
anything in writing on that?
<apeiros>
anything not paid for is yours. I'd wait until you're sure you have no recourse, though
<pontiki>
anything in writing at all?
<diegoviola>
yes i still have all the emails
<apeiros>
otherwise they'll refuse based on you publishing the code
jollyy has joined #ruby
pirelenito_ has quit [Client Quit]
ga1j1n has quit [Remote host closed the connection]
<diegoviola>
it's fine, they can keep the money, it wasn't that much anyway
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<diegoviola>
i just hope they don't do this to other developers
<pontiki>
work is work regardless of whether code is open source or not
jespada has quit [Quit: Leaving]
<RubyPanther>
diegoviola: you have to either pay the collection agency a fee, or sell them the debt for a percent
<apeiros>
diegoviola: publish it e.g. on glassdoor
baroquebobcat has joined #ruby
<RubyPanther>
diegoviola: also, if they didn't pay you, you own the copyright on the code you wrote; you could publish it
<diegoviola>
they said they rejected the invoice because I didn't provide a full list of things I've did for the company, but they know everything I did because they were the people who told me what to do in the first place, I was in every meeting, I woke up at 08:00 AM every day and was working until 7PM sometimes, it was a full time employment
reset has quit [Ping timeout: 240 seconds]
<diegoviola>
so why would they tell me to look at the chat logs or git commits?
<diegoviola>
it's stupid
drx_ has joined #ruby
cina has quit [Ping timeout: 240 seconds]
<RubyPanther>
diegoviola: invoice them again and put each day as a line item, and the hours worked that day
maletor has quit [Quit: Computer has gone to sleep.]
m1lt0n_ has quit [Quit: leaving]
<havenn>
and a late fee tacked on
<pontiki>
if they've told you what they need in order to pay you, why would you not provide it?
ga1j1n_ has joined #ruby
<diegoviola>
from the conversation I had with the person yesterday, it sounded to me like they wanted me to charge for the features I wrote only
momigi has quit [Remote host closed the connection]
hobodave has joined #ruby
<shevy>
diegoviola did you offer them a certain amount they should pay?
<pontiki>
charge for the time you worked, unless you're selling an end product
drx___ has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
cina has joined #ruby
sdouglas has joined #ruby
maletor has joined #ruby
<RubyPanther>
it is a standard tactic, and if you list it wrong, for example if you do what they're trying to talk you into doing and list the features you wrote, then they'll say you only did 1 days work or something like that. That is the game of asking for line items on hourly or salaried work. The only way to win is to give them correct paperwork, INSTEAD of what they ask for; listing the days
momigi has joined #ruby
canton7 has quit [Remote host closed the connection]
<pontiki>
but if you are selling an end product, you are not working for them
ga1j1n_ has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
canton7 has joined #ruby
lyanchih has quit [Ping timeout: 241 seconds]
OdNairy has joined #ruby
beneggett has quit [Read error: No route to host]
<RubyPanther>
if you're selling finished features you don't have things like trial/probation periods. Those are only for time-based pay.
<pontiki>
exactly
ga1j1n has joined #ruby
x1337807x has joined #ruby
<pontiki>
exactly redux
yano has joined #ruby
camilasa_ has quit []
<pontiki>
all that said, i do track hours i spend working on specific stories, defects, chores, and so on
<RubyPanther>
diegoviola: do you have any documentation for the days you worked, like a time card?
diegovio1 has joined #ruby
diegoviola is now known as Guest64734
dgfdgf has joined #ruby
diegovio1 is now known as diegoviola
<diegoviola>
sorry my connection just dropped here as usual...
<pontiki>
what did you see last?
AlexRussia has joined #ruby
<diegoviola>
i'm afraid if i post something about this company online and publicly they will do something against me
<pontiki>
they might
Guest64734 has quit [Ping timeout: 269 seconds]
<diegoviola>
14:05:34 pontiki | if they've told you what they need in order to pay you, why would you not provide it?
<pontiki>
they could
<pontiki>
so do it anonymously
<RubyPanther>
diegoviola: it is a standard tactic, and if you list it wrong, for example if you do what they're trying to talk you into doing and list the features you wrote, then they'll say you only did 1 days work or something like that. That is the game of asking for line items on hourly or salaried work. The only way to win is to give them correct paperwork, INSTEAD of what they ask for; listing the days
<havenn>
even if you have no valid contract, promissory estoppel should get you paid
<diegoviola>
even more that i haven't gained my citizenship here in this country
toastynerd has joined #ruby
`MArceLL` has quit [Ping timeout: 246 seconds]
drx___ has quit [Ping timeout: 246 seconds]
<havenn>
well, in a common law country :P
<pontiki>
brazillian firm?
atlas__ has quit [Remote host closed the connection]
beneggett has joined #ruby
ga1j1n has quit [Ping timeout: 240 seconds]
sdouglas has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
Hanmac has joined #ruby
<diegoviola>
pontiki: yes
<diegoviola>
RubyPanther: right, i think that's what they're looking for, to belittle the work i did and say that it wasn't valuable so they don't have to pay for the actual days/hours as we agreed at the beginning
drx_ has joined #ruby
<RubyPanther>
diegoviola: right, so play around them, list the part the pay is based on and not the part they want to belittle
<shevy>
diegoviola have they not given you anything in written form?
rebelshrug has joined #ruby
<shevy>
diegoviola like that you actually worked for them during that time
drx___ has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
maletor_ has joined #ruby
kaspergrubbe has joined #ruby
twiceaday has quit [Ping timeout: 252 seconds]
Mrdarknezz has quit [Ping timeout: 264 seconds]
twiceaday has joined #ruby
drx___ has quit [Read error: Connection reset by peer]
enricostn has quit [Remote host closed the connection]
QuintinAdam has quit [Remote host closed the connection]
tvw has quit [Write error: Broken pipe]
MrThePlague has quit [Ping timeout: 264 seconds]
beneg has joined #ruby
Xeago has joined #ruby
Hanmac1 has quit [Ping timeout: 524 seconds]
daxroc has quit [Ping timeout: 264 seconds]
<diegoviola>
RubyPanther: I just did that, I reminded them about the original agreement, which was $x per hour and 40 hours a week, etc, they haven't responded to my emails
jamto11 has joined #ruby
beneggett has quit [Ping timeout: 246 seconds]
zigomir has quit [Remote host closed the connection]
robert_ has quit [Read error: Connection reset by peer]
dkamioka has joined #ruby
arietis has joined #ruby
<diegoviola>
shevy: no, nothing in formal writing, only emails
tvw has joined #ruby
<diegoviola>
thanks for your help guys, i appreciate it a lot -- i don't want the money anymore, i just want to forget i ever deal with them
<diegoviola>
the person yesterday who told to cancel the invoice didn't even had the decency to apologize, i think they are shady as hell and just bad people
kaspergrubbe has quit [Ping timeout: 246 seconds]
crystal77 has joined #ruby
<diegoviola>
i'm also an idiot to work for anyone without a contract, won't do the same mistake again
beneggett has joined #ruby
luckyruby has joined #ruby
<havenn>
diegoviola: emails is likely plenty, whether they think so or not, sounds like you want to just let it go but a single letter from a lawyer would probably get you paid (minus 30% or whatever for lawyer's commission).
jollyy has quit [Ping timeout: 240 seconds]
Shidash has joined #ruby
ephemerian has quit [Quit: Leaving.]
<diegoviola>
havenn: ok i see
<havenn>
though maybe not worth the effor
<diegoviola>
havenn: i'll try contacting a lawyer
ga1j1n has joined #ruby
<havenn>
diegoviola: do try, sounds like a cut-and-dry commission case
Advocation has quit [Quit: Advocation]
beneg has quit [Ping timeout: 240 seconds]
<havenn>
diegoviola: may take very little of your time, just a call
<diegoviola>
yes
<diegoviola>
thanks
macclearich_ has joined #ruby
<lethjakman>
diegoviola: usually emails are a pretty good foothold, that's why it's important to get everything in writing.
ga1j1n has quit [Remote host closed the connection]
Wolland has joined #ruby
jollyy has joined #ruby
<lethjakman>
just saw your issue, that's disgusting to me. I hate peoplo who try to get everything for free out of programmers.
<diegoviola>
yes
RaCx has quit [Quit: Computer has gone to sleep.]
ga1j1n has joined #ruby
<havenn>
lethjakman: for sure, something in writing makes all the difference - even if just on a napkin!
<RubyPanther>
diegoviola: it might take a day or 2 to even make it into the right meeting for them to react
dzhulk has joined #ruby
<lethjakman>
havenn: it's saved my butt more than once!
farn has quit [Quit: farn]
smathieu has joined #ruby
<lethjakman>
bleh...client work.
<lethjakman>
don't miss those days
kraljev6 has joined #ruby
beneg has joined #ruby
blom_ has quit [Remote host closed the connection]
<kraljev6>
if Regexp === el
<kraljev6>
/\A#{el}\z/
<kraljev6>
else
blackmesa has joined #ruby
<kraljev6>
el
<kraljev6>
end
geopet has quit []
<kraljev6>
how can I shorten this code?
farn has joined #ruby
<diegoviola>
thanks guys
<dstynchula>
diegoviola: If you dont plan on doing business with them in the future(I wouldn't)...
<diegoviola>
:)
beneg has quit [Client Quit]
blom_ has joined #ruby
<apeiros>
kraljev6: wut?
mikepack_ has joined #ruby
<apeiros>
kraljev6: if it's a regexp already, you wrap it in a regex again?
<dstynchula>
I'd recommend a strongly worded letter from a law firm demanding the original value of the invoice plus the cost of the letter
<diegoviola>
dstynchula: I will never do business with them in the future again, rest assure of it. :)
phansch has joined #ruby
<apeiros>
oh, commute time
rootshift has joined #ruby
* apeiros
off, sorry
<dstynchula>
that will get your invoice paid with a lot less fuss.
<kraljev6>
apeiros: If it is a regex, I make sure it matches a whole string
<kraljev6>
nothing to special :)
<dstynchula>
worst case, you have to take it to litigation and you still get paid, albeit more slowly.
<diegoviola>
dstynchula: I'll try to visit a law firm and I will ask if that's possible, thanks. :)
dkamioka has quit [Read error: Connection reset by peer]
dkamioka_ has joined #ruby
apeiros has quit [Remote host closed the connection]
<dstynchula>
it's possible.
beneggett has quit [Ping timeout: 240 seconds]
ctp has quit [Quit: Leaving...]
<dstynchula>
A letter should cost between $100 and $200
<dstynchula>
depending on the hourly rate
<diegoviola>
ok
<dstynchula>
(~1hour to draft)
apeiros has joined #ruby
<dstynchula>
and invoice that as a line item
<shevy>
more than his payment ;)
<dstynchula>
(attorney's fees)
ga1j1n has quit [Ping timeout: 246 seconds]
<dstynchula>
I've had to go this route with a couple of clients in the past
<shevy>
it worked?
<dstynchula>
every time
<diegoviola>
dstynchula: did you had a contract?
<dstynchula>
the reality is, an invoice of $10,000 or less will get dwarfed in legal fees if it goes to litigation
<diegoviola>
with them
DaniG2k has quit [Quit: leaving]
maximski has quit []
<dstynchula>
and judges are notoriously unsympathetic to companies acting in bad faith
chrisseaton has quit []
<dstynchula>
In one case yes, in one case, a verbal agreement was all I had to go to court with
<havenn>
diegoviola: or see if you can pull some bluster and get them to fold, something like: I performed service for which I am due payment under Article 422 of the Brazilian Civil Code. See Gagliano and Pamplona Filho ‘Contratos: Teoria Geral’ supra at 8, at 78.
<shevy>
dstynchula how could you prove that there was a verbal agreement if they said there was none?
mikepack_ has quit [Ping timeout: 240 seconds]
blom_ has quit [Ping timeout: 240 seconds]
chrisseaton has joined #ruby
<dstynchula>
I didn't need to
<shevy>
hmm
<dstynchula>
we never went to court
<havenn>
diegoviola: let them know you'll lawyer up and get paid, or they can just make it go away with a check
<shevy>
ah ok
<dstynchula>
it was more expensive for them to defend a lawsuit than it was to pay up
<shevy>
but you had to sign something to get that payment?
<dstynchula>
yes.
<havenn>
^ they know they're in bad faith, and want to just screw you not actually go to court
<shevy>
ok, makes sense to me now, thanks
zeropx has joined #ruby
kaspergrubbe has joined #ruby
<dstynchula>
I had to sign an agreement with the client agreeing the matter was settled in full.
<dstynchula>
mutually agreeable outcome
<shevy>
diegoviola so there you go, get them to sign something
<dstynchula>
after I received the check
<dstynchula>
lol
<dstynchula>
the thing is, a super cheap lawsuit can easily cost a company $100K+ to defend
<dstynchula>
so if your invoice is 10-20k
pr0ggie has quit [Ping timeout: 240 seconds]
<diegoviola>
havenn: ok thanks
<dstynchula>
it's a come to jesus moment
<diegoviola>
shevy: ok
<dstynchula>
lol
apeiros has quit [Ping timeout: 240 seconds]
carraroj has joined #ruby
shaunbaker has quit [Remote host closed the connection]
drx_ has joined #ruby
<havenn>
i feel lucky to not have gotten screwed like that
<shevy>
havenn did you have to work in brazil yet
coderxin has joined #ruby
<havenn>
shevy: nope
<shevy>
me neither
dzhulk1 has joined #ruby
Hanmac1 has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
<kraljev6>
Ok, what is the best way to ensure strong type of method parameters
pel_daniel has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
abdulsattar has quit [Ping timeout: 246 seconds]
<diegoviola>
portuguese is not my primary/mother language, so I'll try my best to explain this to the lawyer
<kraljev6>
rescue "Parameter must be Integer" unless Integer === param
drx_ has joined #ruby
<kraljev6>
anything better?
sski has quit [Remote host closed the connection]
fantazo has quit [Quit: Verlassend]
brain_shim has joined #ruby
kevinykchan has joined #ruby
sski has joined #ruby
dzhulk has quit [Ping timeout: 246 seconds]
jollyy has quit [Ping timeout: 246 seconds]
aagdbl has joined #ruby
lolmaus has quit [Remote host closed the connection]
<diegoviola>
thanks again, guys
lolmaus has joined #ruby
<diegoviola>
:)
Hanmac has quit [Ping timeout: 240 seconds]
drx_ has quit [Read error: Connection reset by peer]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dgarstang>
ie I'm trying to access the 'us1' 'us2' bits from k
Solnse has joined #ruby
<dgarstang>
but k gives me the whole thing
drx___ has joined #ruby
<apeiros>
.each_with_index do |(k, v), index|
<dgarstang>
good grief. thanks
toastynerd has quit [Remote host closed the connection]
endash has quit [Read error: No route to host]
endash_ is now known as endash
CaptainJet has joined #ruby
toastynerd has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
<dgarstang>
"undefined method `each_with_index' for "us2":String" *sigh*
toastynerd has quit [Remote host closed the connection]
endash_ has joined #ruby
Gabri has quit [Quit: leaving]
drx_ has quit [Ping timeout: 240 seconds]
jquave has joined #ruby
SCommette has quit [Quit: SCommette]
Gabri has joined #ruby
xcv_ has joined #ruby
jollyy_ has quit [Quit: jollyy_]
drx_ has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has joined #ruby
r0nin has quit [Remote host closed the connection]
jollyy has joined #ruby
MrThePlague has joined #ruby
drx___ has quit [Ping timeout: 246 seconds]
xcv has quit [Read error: Connection reset by peer]
jollyy has quit [Client Quit]
drx_ has quit [Read error: Connection reset by peer]
<toretore>
dgarstang: you have to know what the values you're working with are
nomenkun has joined #ruby
MrThePlague has quit [Remote host closed the connection]
noop has joined #ruby
<apeiros>
dgarstang: k is the *key*, v is the value
atraylen has joined #ruby
<apeiros>
only your values are hashes
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<philcrissman>
dgarstang: is there even a reason you're using each_with_index? What are you using the index for? Also, having a nested each_with_index and using the local variable 'index' in both scopes might lead to confusion.
m8 has joined #ruby
reset has joined #ruby
inkblot_ has joined #ruby
agent_white has joined #ruby
gnagno has quit [Ping timeout: 264 seconds]
michaeldeol has joined #ruby
vlad_starkov has joined #ruby
<apeiros>
indeed
chrisja has joined #ruby
niharvey|afk is now known as niharvey
postmodern has joined #ruby
dermot has joined #ruby
<dermot>
anyone have any idea what could cause rake assets:precompile to fail in one directory containing a repo with the exact same commit as another directory where the command succeeds? ruby -v returns the same stuff (same with rvm info)
p8952 has quit [Ping timeout: 264 seconds]
drx_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<crome>
is there any nonretarded way of passing context variables to an inline ERB template?
nomenkun has quit [Read error: Connection reset by peer]
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
Gabri has quit [Quit: leaving]
vlad_starkov has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
sparrovv has quit [Remote host closed the connection]
drx_ has quit [Read error: Connection reset by peer]
SCommette has joined #ruby
Gabri has joined #ruby
Gabri has quit [Max SendQ exceeded]
senayar has joined #ruby
<havenwood>
dermot: might try #rubyonrails
Gabri has joined #ruby
senayar has quit [Remote host closed the connection]
cbetta has quit [Ping timeout: 264 seconds]
dzhulk has quit [Quit: Leaving.]
meatherly has quit [Remote host closed the connection]
nomenkun has joined #ruby
mikepack has quit [Ping timeout: 241 seconds]
senayar has joined #ruby
<diegoviola>
i've just sent a message over Skype to this person, he is ignoring me but it's not surprising
<diegoviola>
:)
<diegoviola>
I wonder if he will ignore the lawyer also
<shevy>
diegoviola hmm
meatherly has joined #ruby
<shevy>
diegoviola have you tried it in old written form by a formal, written letter?
<shevy>
not a normal one but one where they have to sign that they recieved a letter
<diegoviola>
yes, I tried, and I hold all the correspondence and emails
oso|away is now known as oso96_2000
<shevy>
you always have to be prepared for them lying
<diegoviola>
I'm sure they will lie
<diegoviola>
or they already did that
maximski has joined #ruby
cbetta has joined #ruby
rootshift has joined #ruby
peterellisjones has joined #ruby
<diegoviola>
shevy: he wants me to get into Campfire and look at the logs, then quote him a new (lower) price for my work, I think he wants me to say "Oh those features I could've done in a day, so I'll charge you for 1 day of work only" when I worked for 2 weeks
sambao21 has quit [Ping timeout: 240 seconds]
Murci3lago has joined #ruby
centrx has joined #ruby
sambao21 has joined #ruby
peterellisjones has quit [Client Quit]
<diegoviola>
it's just dishonesty on their part, I'm not sure if they are running out of money or anything, but it sounds to me like it's the case
<diegoviola>
and I've already wasted too much time on this bs
jamto11 has quit [Remote host closed the connection]
eichenwald has joined #ruby
poikon_ has quit []
<shevy>
hmm
mikecmpbll has joined #ruby
<shevy>
it's a company right?
davy__ has quit [Remote host closed the connection]
<shevy>
don't they have to keep a reserve of money somewhere upon founding a new company?
ktosiek has joined #ruby
<diegoviola>
yes it's a company, they have a few rails apps
<diegoviola>
they write apps for the governments to use
<shevy>
well here in austria, a company can only be founded when some money is deposited upfront in the very event when a company goes bankrupt
p8952 has joined #ruby
<diegoviola>
I see
aagdbl has quit [Quit: This computer has gone to sleep]
RaCx has quit [Quit: Computer has gone to sleep.]
Villadelfia has joined #ruby
decoponio has quit [Quit: Leaving...]
toastynerd has joined #ruby
<diegoviola>
I told him I'm not going to get into Campfire, that I don't have time, and that I already emailed him the hours I worked on and the invoice :)
Astralum has joined #ruby
<shevy>
diegoviola btw doesn't the brazilian government have a "code of conduct" as well? as in things like "we will not allow companies who make use of child workers" etc...
phansch has quit [Quit: WeeChat 0.4.2]
mercwithamouth has quit [Ping timeout: 246 seconds]
teddyp1cker has quit [Remote host closed the connection]
Spami has quit [Read error: Connection reset by peer]
Spami has joined #ruby
bahar has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
<diegoviola>
shevy: I'm sure Brazil has something like that, but I'm not sure, I'm not familiar with Brazilian laws
<diegoviola>
shevy: I'm from Paraguay, but I'm living in Brazil
Gabri has quit [Read error: No route to host]
<shevy>
diegoviola well, in this case it's working without pay
<shevy>
I don't know myself either
<diegoviola>
yes
<shevy>
perhaps it is legal in brazil :)))
Gabri has joined #ruby
Gabri has quit [Max SendQ exceeded]
Villadelfia has quit [Ping timeout: 246 seconds]
smathieu has quit [Remote host closed the connection]
<diegoviola>
I think slavery ended a long time ago in Brazil
Gabri has joined #ruby
SonicX has quit [Remote host closed the connection]
Gabri has quit [Max SendQ exceeded]
smathieu has joined #ruby
<diegoviola>
but they probably thought they would get away with it since I'm from Paraguay
<diegoviola>
not sure..
MattStra_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<diegoviola>
either way, I'll lawyer up
meatherly has quit [Remote host closed the connection]
<diegoviola>
ty
Gabri has joined #ruby
Gabri has quit [Max SendQ exceeded]
meatherly has joined #ruby
smathieu has quit [Remote host closed the connection]
AlSquire has quit [Quit: This computer has gone to sleep]
Avahey_ has quit [Quit: Connection closed for inactivity]
cj3kim has joined #ruby
pu22l3r has quit [Remote host closed the connection]
ga1j1n has joined #ruby
lethjakman has quit [Ping timeout: 240 seconds]
pu22l3r has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
cj3kim has quit [Read error: Connection reset by peer]
noop has quit [Ping timeout: 240 seconds]
DrShoggoth has joined #ruby
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
kpshek has joined #ruby
<droptone>
Question: Asked in #RoR but no one is around right now, just wondering if anyone in here knows.
<droptone>
In a Rails 4 controller, if I add a render 'template' statement, will that stop controller code execution?
danno1 has quit [Ping timeout: 240 seconds]
<droptone>
for example, say I have a rest-client or XLMRPC call and I'm using a begin/rescue statement, in the rescue section on error, I want it to render a template and stop controller execution
mikepack_ has quit [Remote host closed the connection]
aaronmcadam has quit [Quit: Leaving...]
coderxin has quit [Remote host closed the connection]
<Hanmac>
droptone: try #RubyOnRails
eichenwald has quit [Quit: eichenwald]
<droptone>
lol, I just said I asked in there and no one was available
<droptone>
15:13 < droptone> Question: Asked in #RoR but no one is around right now, just wondering if anyone in here knows.
wallerdev has quit [Quit: wallerdev]
<centrx>
droptone, You need to be more patient
<droptone>
so no one in here knows, got it.
<Hanmac>
"#RoR" is not "#RubyOnRails" and also not "#Rails"
<centrx>
droptone, It was already answered in #rubyonrails
mikepack has joined #ruby
chipotle has quit [Quit: cya]
<centrx>
Now you are on ignore
sambao21 has quit [Quit: Computer has gone to sleep.]
<mmachine3000>
so I've been messing around with jekyll and i love it, though i wish it could do more than just 'posts' (or abstractions of posts). is there a static framework that does this a bit better?
jollyy has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
<shevy>
droptone hmm many folks here don't really know rails
<centrx>
zachallett, Use /whois
SCommette has joined #ruby
sambao21 has joined #ruby
hiall has quit [Ping timeout: 264 seconds]
mehlah has quit [Quit: Leaving...]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
Gabri has quit []
blom_ has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
jollyy has quit [Client Quit]
ephemerian has joined #ruby
arietis has joined #ruby
kevinykchan has quit [Ping timeout: 240 seconds]
brain_shim has quit [Read error: Connection reset by peer]
xcv_ has quit [Remote host closed the connection]
xcv has joined #ruby
mikepack has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
RearAdmiralWolfy has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
gnagno has quit [Ping timeout: 240 seconds]
<RearAdmiralWolfy>
how do i install ruby using rails? on ubuntu 14.04
wallerdev has joined #ruby
<centrx>
RearAdmiralWolfy, I would install ruby2.0 and then use gems to get the latest version of rails
kevinykchan has joined #ruby
sambao21 has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
megaputer has quit [Remote host closed the connection]
ga1j1n has quit [Remote host closed the connection]
Quintus_q has joined #ruby
sambao21 has quit [Client Quit]
kevinykchan has joined #ruby
rakm has joined #ruby
fannye has quit [Read error: Connection reset by peer]
coderxin has joined #ruby
macclearich has joined #ruby
xcv has quit [Ping timeout: 240 seconds]
RyanV has joined #ruby
neo1691 has joined #ruby
agarie has quit [Ping timeout: 240 seconds]
tt1187 has joined #ruby
duggiefresh has quit [Remote host closed the connection]
jollyy has joined #ruby
<neo1691>
Guys, I am installing an app that uses ruby, so no idea about ruby! I ran bundle install command under the source directory of the app. Its talking lot of time installing the gems, I just want to ask that are those gems getting downloaded from the internet? As I am a little tight on bandwidth!
kotakotakota has quit [Quit: Leaving]
mr_snowf1ake has joined #ruby
ga1j1n has joined #ruby
<toretore>
yes, they are being downloaded
<toretore>
and yes, it takes a long time
maletor has joined #ruby
baroquebobcat has joined #ruby
havenwood has quit [Remote host closed the connection]
RearAdmiralWolfy has left #ruby ["Leaving"]
<centrx>
neo1691, Most of the time rubygems take is in compiling the documentation
timonv has quit [Remote host closed the connection]
<youssefeid>
can i do that with other websites too?
timonv has joined #ruby
<youssefeid>
i think i can
<toretore>
yes, unless they specifically make it difficult
<toretore>
it's just how the web works
<Solnse>
depends... most of the mechanize and net/http stuff I've done was on sites that needed authentication... but if you're just submitting search queries and scraping with nokogiri, it should be simple.
gnagno has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 240 seconds]
toastyne_ has joined #ruby
<youssefeid>
should i scrape with Ruby or PHP?
<philcrissman>
If you really want to search BBY, they actually have an API. https://bbyopen.com/
cj3kim has quit [Ping timeout: 240 seconds]
<philcrissman>
So you wouldn't need to scrape at all.
<Solnse>
that's even better
benegget_ has quit [Read error: No route to host]
bradhe has quit [Remote host closed the connection]
<Solnse>
that api return JSON?
<philcrissman>
Solnse: I'm pretty sure it does.
<Solnse>
that would make it all super easy.
jonathanwallace has joined #ruby
Hanmac1 has joined #ruby
<youssefeid>
but im not only searching bestbuy
<philcrissman>
I worked alongside the team that made it, but not on the API itself. They had a really good team on that.
<Solnse>
and you could do it all in ruby.
neo1691 has quit [Ping timeout: 241 seconds]
<philcrissman>
youssefeid: oh. Well, just trying to help. :)
mansi has quit [Remote host closed the connection]
beneggett has joined #ruby
Xeago_ has quit [Read error: Connection reset by peer]
<Solnse>
youssefeid: chances are you're going to create a method call for each site. very little chance of them all conforming to the same code.
<youssefeid>
so should i just replace the query then scrape the website to pull its HTML code?
<toretore>
it's simple. just write different search handlers for each site, extracting out any common components, and have them conform to a common interface
Hanmac has quit [Ping timeout: 246 seconds]
<youssefeid>
gotcha!
<philcrissman>
heh.
Xeago has joined #ruby
<toretore>
you're not going to fine one algorithm that works for everything
yokel has quit [Remote host closed the connection]
neo1691 has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
<Solnse>
yeah but that would be back end... after you've retrieved the info from the site.
<Solnse>
I did 100+ bonus program calls last year... the only ones that worked under the same code were front-ends that just rebranded the back-end... like all safeway stores and their various subsidiaries could be called with the same method.
mansi has joined #ruby
QuintinAdam has quit [Remote host closed the connection]
arietis has quit [Quit: Computer has gone to sleep.]
endash_ has quit [Ping timeout: 240 seconds]
mark_locklear has quit [Quit: Leaving]
<Solnse>
'computors' will probably yield 0 results :)
montyboy has joined #ruby
<toretore>
computar returned 1, surprisingly
beneggett has quit [Read error: No route to host]
beneg has joined #ruby
<Solnse>
those damn data-entry interns
juarlex has quit [Remote host closed the connection]
momigi has quit [Read error: Connection reset by peer]
noodman has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
_drb has left #ruby [#ruby]
volecek has joined #ruby
momigi has joined #ruby
kaspergrubbe has joined #ruby
p8952 has joined #ruby
ikaros has quit [Quit: Ex-Chat]
<noodman>
I'm trying to send json to an api using openssl
mansi has quit [Remote host closed the connection]
volecek has quit [Client Quit]
xcv has joined #ruby
mansi has joined #ruby
youssefeid has quit [Remote host closed the connection]
<Solnse>
why do you need to use openssl?
<noodman>
I have a private key, client cert, server cert - however I can't figure out how to do it. Anyone throw me in the right direction?
<Solnse>
mechanize has a flag for it.
pablovilas has quit [Read error: Connection reset by peer]
inkblot_ has quit [Ping timeout: 240 seconds]
okdas__ has quit [Ping timeout: 246 seconds]
senayar has quit [Remote host closed the connection]
pablovilas has joined #ruby
x77686d has joined #ruby
wilbert_ has joined #ruby
wilbert_ has quit [Client Quit]
agarie_ has joined #ruby
wilbert_ has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
agent_white has quit [Quit: leaving]
Inoperable has quit [Quit: sleep subroutine enabled]
kaspergrubbe has joined #ruby
wilbert_ has quit [Client Quit]
mansi has quit [Ping timeout: 240 seconds]
kaspergrubbe has quit [Client Quit]
gstamp has quit [Ping timeout: 256 seconds]
maletor has joined #ruby
wilbert_ has joined #ruby
wilbert_ has quit [Client Quit]
mikepack_ has joined #ruby
SonicX has joined #ruby
montyboy has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
vlad_starkov has quit [Remote host closed the connection]
chrisja_ has joined #ruby
beneggett has joined #ruby
wilbert_ has joined #ruby
beneg has quit [Read error: No route to host]
budrose has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<noodman>
Solnse: So for sending a post request with ssl you suggest mechanize?
motto has joined #ruby
geopet has joined #ruby
DouweM has quit [Excess Flood]
m8 has quit [Ping timeout: 246 seconds]
ktosiek has quit [Excess Flood]
havenwood has joined #ruby
wilbert_ has quit [Client Quit]
AlexRussia has quit [Remote host closed the connection]
mehlah has joined #ruby
rootshift has joined #ruby
pu22l3r has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
george2|chakra has quit [Excess Flood]
wilbert_ has joined #ruby
chrisja has quit [Write error: Broken pipe]
yokel has quit [Write error: Broken pipe]
carraroj has quit [Write error: Broken pipe]
tvw has quit [Write error: Broken pipe]
agarie has quit [Write error: Connection reset by peer]
wilbert has quit [Write error: Broken pipe]
camt has quit [Remote host closed the connection]
obs has joined #ruby
daxroc has joined #ruby
yxhuvvd has joined #ruby
<Solnse>
I've had lick with it before.
yxhuvud has quit [Excess Flood]
Xeago has quit [Excess Flood]
pu22l3r has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
iceden has quit [Excess Flood]
rmorello has quit [Excess Flood]
nateberkopec has quit [Excess Flood]
s2013 has quit [Excess Flood]
lmickh has quit [Excess Flood]
withnale has quit [Excess Flood]
<Solnse>
either mechanize or net/http
Xeago has joined #ruby
geggam has quit [Excess Flood]
<Solnse>
http.use_ssl = true
pu22l3r has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
<benzrf>
ahaha
dgaffney has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
<dgaffney>
anyone ever work with sidekiq at all?
<dgaffney>
I'm having an issue getting sidekiq-status to do its job....
jrhorn424 is now known as zz_jrhorn424
teddyp1cker has joined #ruby
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
Hobogrammer has joined #ruby
blom_ has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
blom_ has joined #ruby
Lewix has quit [Remote host closed the connection]
cj3kim has joined #ruby
Quintus_q has quit [Quit: WeeChat 0.4.3]
RaCx has quit [Quit: Computer has gone to sleep.]
qubit has joined #ruby
x1337807x has joined #ruby
DaniG2k has joined #ruby
teddyp1cker has quit [Ping timeout: 240 seconds]
RoryHughes has joined #ruby
mxweas has quit [Quit: Leaving...]
<lethjakman>
dgaffney: yep, never had that issue though. I'd recommend posting more details
efeldhusen has quit [Quit: Leaving]
danshultz has quit [Remote host closed the connection]
montyboy has joined #ruby
danshultz has joined #ruby
<dgaffney>
not much to report here, lethjakman - I've set it up according to spec on the GH page, and throughout the entire life cycle of the job, all I ever see is this status: {"update_time"=>"1395260589", "status"=>"queued"}
jmpf has joined #ruby
senayar has quit [Remote host closed the connection]
camilasan has joined #ruby
bradhe has joined #ruby
mrevd has joined #ruby
cj3kim has quit [Ping timeout: 265 seconds]
samuel02 has quit [Remote host closed the connection]
<mrevd>
hey all, running my specs i get a new error for an uninitialized constant. but i can't find that constant anywhere in the code base…
beneggett has joined #ruby
daxroc has quit [Quit: Leaving.]
brain_shim has joined #ruby
senayar has joined #ruby
<dgaffney>
lethjakman: I'm thinking that the next move *could* be to use the variable sending mechanism that is in sidekiq-status to roughly fix the problem, but I'll be using the tool the wrong way and that just feels bad.... It seems so simple? Dunno if it's worth actually digging into the source to find the issue though....
senayar_ has joined #ruby
<hopkin>
Hi all I am trying to write a small program that takes 2 user inputted numbers and returns the two multiplied together, issue is they always need two decimal regardless of the numbers used, so far I have this: https://gist.github.com/hopkin78/9650888
mrnugget has quit [Quit: mrnugget]
<hopkin>
but my output is always exact decimal, I don't want to use sprintf to convert to a string if possible
Astralum has quit [Ping timeout: 240 seconds]
danshultz has quit [Ping timeout: 265 seconds]
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
jfelchner_ has joined #ruby
DaniG2k has quit [Quit: leaving]
rockelb has joined #ruby
nateberkopec has joined #ruby
linojon has quit [Quit: linojon]
<shevy>
hopkin do you store it as a float?
nomenkun has quit [Read error: Connection reset by peer]
<hopkin>
I am doing gets.to_f on each variable
zachallett has quit [Remote host closed the connection]
<shevy>
hopkin btw you dont need to use \n in puts
<hopkin>
oh those were prints but I got a funky error on em so I changed them to puts
nomenkun has quit [Remote host closed the connection]
<shevy>
hopkin if I input 2 and 3, what should be the output?
Xeago has quit []
Vivekananda has joined #ruby
Karpuragauram has joined #ruby
<hopkin>
6.0 but I need 2 decimal
nomenkun has joined #ruby
<shevy>
wait
beneggett has quit [Ping timeout: 264 seconds]
<shevy>
you say the output shall be 6.0
<shevy>
then you say you need 2 decimal
<shevy>
so what shall the output be?
<hopkin>
so 2 * 3 should be 6.00
<shevy>
ok, so you want 6.00
beneggett has joined #ruby
IceyEC has quit [Quit: IceyEC]
juarlex has joined #ruby
<hopkin>
right
RaCx has joined #ruby
<benzrf>
man i want Hash#keys?
SonicX_ has quit [Read error: Connection reset by peer]
x1337807x has joined #ruby
<benzrf>
also, there /really/ needs to be something along the lines of Array#include_all?
<shevy>
hopkin I think you may have to use sprintf of some kind
<shevy>
hopkin an alternative would be to simply add a '0'
brain_shim has quit [Read error: Connection reset by peer]
<havenwood>
shevy: a good riddle is: when does appending a "\n" actually make a difference and make sense with #puts?
dingus_khan has quit [Remote host closed the connection]
<shevy>
havenwood dunno, I guess matz thought that it should automatically add a newline, I was surprised when I did: puts "Hello World!\n\n"
<benzrf>
i hate how #foo? at the end of a sentence can be be either #foo? the method or a question about #foo
<benzrf>
it's annoying >:o
geopet has quit [Ping timeout: 246 seconds]
<jmpf>
been looking @ ripper's lexer - seems like it emits idents - trying to get a list of method local variables; are there better tools for this task?
nomenkun has quit [Ping timeout: 269 seconds]
beneg has joined #ruby
dkamioka has quit [Remote host closed the connection]
<shevy>
hopkin https://gist.github.com/shevegen/9651144 - of course the proper way to solve it would be to formulate when you need more decimals, and how many of these you would need
sailias has quit [Ping timeout: 240 seconds]
<havenwood>
shevy: it does add a newline, but with multithreading the ordering can get off because the newline is a separate operation
mjs2600 has quit [Remote host closed the connection]
<shevy>
havenwood huh lol
<havenwood>
shevy: if you have a "\n" at the end, they go together
Lewix has joined #ruby
Lewix has quit [Remote host closed the connection]
<shevy>
wait
<shevy>
are you saying that:
<shevy>
puts "Hello world!"
<shevy>
puts "Hello world!\n"
<shevy>
puts "Hello world!\n\n"
<shevy>
are three different things?
funktor has joined #ruby
beneggett has quit [Ping timeout: 264 seconds]
<havenwood>
shevy: yes, for sure
<hopkin>
Thanks shevy but the problem then becomes on the other end where say 3.001 * 3.001 should be 9.00
mikepack_ has joined #ruby
nopolitica has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
<b00stfr3ak>
shevy: getting rid of the Readline::HISTORY.length-2 and just putting -2 worked
<shevy>
\o/
<b00stfr3ak>
shevy: thanks
zachallett has joined #ruby
<shevy>
\o~
<shevy>
~o~
<shevy>
let's dance
chrisseaton has quit [Ping timeout: 246 seconds]
<b00stfr3ak>
^(o.0)^
crystal77 has joined #ruby
failshell has quit [Ping timeout: 240 seconds]
alexju has quit [Remote host closed the connection]
beneggett has quit [Ping timeout: 240 seconds]
failshel_ has quit [Ping timeout: 240 seconds]
toastynerd has joined #ruby
YamakasY has quit [Read error: Connection reset by peer]
claymore has quit [Quit: Leaving]
acrussell has quit [Quit: Leaving.]
Guest77532 is now known as inversesquarelaw
Azure has quit [Quit: My MBP went to sleep.]
beneggett has joined #ruby
derek_c has quit [Ping timeout: 265 seconds]
pu22l3r has joined #ruby
mlpinit has quit [Read error: Connection reset by peer]
mlpinit has joined #ruby
timfoo has quit [Quit: leaving]
beneg has joined #ruby
timonv has joined #ruby
cina has quit [Ping timeout: 246 seconds]
timfoo has joined #ruby
beneggett has quit [Ping timeout: 240 seconds]
chipotle has quit [Quit: cya]
samuel02 has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
pu22l3r has quit [Remote host closed the connection]
rebelshrug has quit []
havenwood has quit [Remote host closed the connection]
ffranz has quit [Quit: Leaving]
beneggett has joined #ruby
havenwood has joined #ruby
beneg has quit [Read error: Connection reset by peer]
Cache_Money has quit [Quit: Cache_Money]
fgo has joined #ruby
BuSerD has joined #ruby
funktor has joined #ruby
s00pcan has joined #ruby
r0nin has joined #ruby
baroquebobcat_ has joined #ruby
samuel02 has quit [Ping timeout: 265 seconds]
beneg has joined #ruby
meatherly has joined #ruby
funktor_ has joined #ruby
ikaros has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
eichenwald has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
himsin has quit [Quit: himsin]
beneggett has quit [Ping timeout: 265 seconds]
creede has joined #ruby
ffranz has joined #ruby
funktor has quit [Read error: Connection reset by peer]
baroquebobcat has quit [Ping timeout: 240 seconds]
rootshift has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
camilasan has quit [Ping timeout: 265 seconds]
beneggett has joined #ruby
baroquebobcat_ is now known as baroquebobcat
mlpinit has quit [Remote host closed the connection]
<bricker`LA>
Can someone explain the different between a gemspecs "development dependencies" and a Gemfile in the same library?
<bricker`LA>
difference*
<bricker`LA>
At this point I'm just moving dependencies between the two files until the tests will run
gf3 has joined #ruby
beneg has quit [Ping timeout: 265 seconds]
confounds_afk has quit []
motto has quit [Quit: Sto andando via]
<canton7>
one's installed though 'gem', the other with bundler
hobodave has quit [Ping timeout: 265 seconds]
confounds has joined #ruby
WillAmes has joined #ruby
<bricker`LA>
I don't totally understand that explanation
beneggett has quit [Read error: Connection reset by peer]
nwertman has joined #ruby
<bnagy>
gemfiles are new fangled fluff
<bnagy>
only the gemspec is part of the gem
RaCx has quit [Quit: Computer has gone to sleep.]
QuintinAdam has joined #ruby
<bnagy>
you can live a full and happy life without bundler every screwing up your gems with its semver insanity
<bricker`LA>
I think I get it. So `add_development_dependency` is necessary if you're not using bundler
agarie_ has quit [Remote host closed the connection]
beneggett has joined #ruby
<Senjai>
bricker`LA: Yea I think so, iirc
<bnagy>
if it's in the gemspec then it's gemmy
<bnagy>
development dependencies are if you want to develop on the gem
<bricker`LA>
Now I understand why the stuff wasn't loading properly. Thanks bnagy
<jhass>
I tend to add non essential development dependencies to the Gemfile, like pry or test coverage stuff, essential stuff to run the tests go into the gemspec for me
<bnagy>
don't know how many gems have them these days, but you can have dependencies that everyone needs and extra stuff only devs need
yubrew has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
RaCx has joined #ruby
sdouglas has quit [Remote host closed the connection]
funktor_ has quit [Remote host closed the connection]
yubrew has joined #ruby
jlast has quit [Remote host closed the connection]
qubit has quit [Ping timeout: 265 seconds]
yubrew has quit [Remote host closed the connection]
sdouglas has joined #ruby
<nwertman>
What testing technology would you guys suggest from some rather nasty integration tests I need to write?
<nwertman>
I have to manipulate data/validate/manipulate it further/validate state changes/...
baroquebobcat_ has joined #ruby
<nwertman>
Basically I need to ensure that a pile of code (about 5000 lines) properly manipulates some server data as state changes.
sdouglas has quit [Read error: Connection reset by peer]
sdouglas has joined #ruby
<nwertman>
It seems that rspec/minitest are geared to unit testing and running in random orders
mikepack_ has joined #ruby
agent_white has joined #ruby
blackmes1 has joined #ruby
maletor has joined #ruby
<bnagy>
if it's webby there are a few frameworks that will drive a browser for you
blackmesa has quit [Ping timeout: 240 seconds]
<bnagy>
so you can write your tests as do A, check thing, do B ...
<jhass>
I've also seen CLI tool testing with cucumber
baroquebobcat has quit [Ping timeout: 240 seconds]
baroquebobcat_ is now known as baroquebobcat
<nwertman>
No, this is all CLI.
<jhass>
that is blackbox testing, really calling the script through a shell
wallerdev has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
byprdct has quit [Ping timeout: 246 seconds]
<bnagy>
then I'm not sure why you can't just use rspec.. or anything really?
<bnagy>
just write longer tests for the multiphase bits
eichenwald has left #ruby [#ruby]
<nwertman>
This code is horribly written... I need to build a fairly good overarching integration test suite before my employeer will allow me to refactor a bunch of it.
spider-mario has quit [Read error: Connection reset by peer]
maximski has quit []
nateberkopec has quit [Quit: Leaving...]
<agent_white>
Muahaha I have two windows in Ncurses!
* agent_white
flexes
<bnagy>
tbh for most of my tests I just use no framework
qubit has joined #ruby
<nwertman>
bnagy: I have some of those rspec tests. If all the logic is contained within a single 'it' block, then I don't get periodic messages saying things pass. It makes it hard to tell if things are running or stuck in a loop.
derek_c has joined #ruby
<bnagy>
like rake test will run everything in your test dir
juarlex has quit [Remote host closed the connection]
<bnagy>
so you just write you tests as rubies
<popl>
gems?
<nwertman>
bnagy:Interesting. What do you do for validation? Do you use matchers or just plain jane ruby
hobodave has joined #ruby
dingus_khan has joined #ruby
<bnagy>
just ruby, cause normally I am testing stuff that is not TDD friendly
<bnagy>
like if I had to stub I would have to stub all the interesting stuff
jobewan has quit [Quit: Leaving]
juarlex has joined #ruby
<bnagy>
so ( and this is almost certainly crazy ) I would probably just write a set of scripts that interact with the code to be refactored and also write a 'manual inspection hatch' for the raw server data
claymore has joined #ruby
<bnagy>
but it's not very frameworky :/
doodlehaus has quit [Remote host closed the connection]
ktosiek has quit [Ping timeout: 240 seconds]
<jhass>
nwertman: adding --order default to your rspec options also would make your tests run in the order they're written (apparently, never done this)
<bnagy>
I missed out on the whole ruby-style testing wave sorry :(
Shidash has quit [Ping timeout: 240 seconds]
hobodave_ has joined #ruby
MatthewsFace has quit [Ping timeout: 246 seconds]
baroquebobcat has quit [Ping timeout: 240 seconds]
MatthewsFace has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
dblessing has quit [Quit: dblessing]
QuintinAdam has quit [Ping timeout: 265 seconds]
<nwertman>
jhass: I'll look into that. There are some ugly problems with that, but I might be able to make it work.
<jhass>
I'm still digesting what this actually does
mike_k has quit [Remote host closed the connection]
<Muhammad_>
hehe
davy_ has quit [Ping timeout: 240 seconds]
<Speed>
:)
ga1j1n has quit [Remote host closed the connection]
* Speed
gets back to what he was doing
<bnagy>
yeah first rule of comments - explain what you're actually doing
chrisja_ has quit [Quit: leaving]
<bnagy>
I'm just assuming it's to make the puts work
<jhass>
is that a variation of the game of life or what is it?
<bnagy>
in which case.. rewrite the whole thing imho
ga1j1n has joined #ruby
nateberkopec has joined #ruby
<shevy>
what is the rationale behind naming arguments to methods with long names? as in: def foo(a,b) vs. def foo(run_tests, do_report)
<bnagy>
you just want to see adds and leaves on a month by month basis?
toastynerd has quit [Remote host closed the connection]
<Muhammad_>
Gold Quest
<Muhammad_>
Does it make sense?
<jhass>
shevy: you declare intent, it comments your code without writing comments (which rotten much faster)
<Muhammad_>
The idea is to simulate the system.
<shevy>
jhass but people also dislike very long names
Xeago has joined #ruby
<Muhammad_>
The result has shown me that it's a fake system.
<bnagy>
things like a,b ( two ordered items with b>=a and x,y ( any two numbers, usually in 2-space ) are special though
<bnagy>
like i,j,k for generic counters
<jhass>
shevy: very lazy people do
Xeago has quit [Remote host closed the connection]
<shevy>
hmm that reminds me of something else
<jhass>
just lazy people understand that writing longer names means less work when they need to come back to the code ;)
lolmaus has quit [Read error: Connection reset by peer]
<shevy>
what should people use:
<shevy>
def foo bla
<shevy>
vs.
<shevy>
def foo(bla)
lolmaus has joined #ruby
<QKO>
shevy: ad a programmer it's your job to say the most with the smallest lines/words
<shevy>
QKO yeah. a,b,c,d,e,f,g :)
<QKO>
foo(a,b) isn't saying anything
<Muhammad_>
Don't like old style coding style.
jjbohn has quit [Quit: Leaving...]
<QKO>
you could also name it foo(test, report)
<QKO>
which is understandable and comes closer to your more verbose example
toastynerd has joined #ruby
<Muhammad_>
623971 are added in 25th month and 258457 person[s] have left.
ga1j1n has quit [Ping timeout: 265 seconds]
<QKO>
with arrays it's nicer
<QKO>
with lists and stuff... meh
ixti has quit [Quit: WeeChat 0.4.3]
ixti has joined #ruby
pu22l3r has quit [Remote host closed the connection]
<bnagy>
Muhammad_: still no idea what your algorithm is. Try writing that up
<bnagy>
or if it's homework, which seems extremely likely, give us the problem
<Muhammad_>
Well, I told once that I'm simulating a system where each person adds another person to the system each month and if that person's life time(number of months) is greater than leave the system.
mikepack_ has quit [Remote host closed the connection]
<Muhammad_>
*is greater than 3
<Muhammad_>
bnagy: Do you need more explanation?
centrx has quit [Quit: All this computer hacking is making me thirsty]
h4mz1d has joined #ruby
<bnagy>
hm.. ok..
artgoeshere has quit [Quit: I'll see myself out.]
teddyp1cker has joined #ruby
<Muhammad_>
So, any idea to improve the solution and make it run faster?
<bnagy>
do they add before they get culled?
blom_ has quit [Remote host closed the connection]
blom has joined #ruby
<bnagy>
I would just use select and reject
<Muhammad_>
Nope.
artgoeshere has joined #ruby
<bnagy>
so if they're over the counter they get removed, then the new additions get calculated
daxroc has quit [Quit: Leaving.]
armyriad has quit [Ping timeout: 265 seconds]
<bnagy>
so modem it as [[0]] ( one person, first generation )
blom has quit [Read error: Connection reset by peer]
thoraxe has joined #ruby
ixti has quit [Quit: WeeChat 0.4.3]
ixti has joined #ruby
<thoraxe>
ok stupid question... in ruby 2.0.0 in irb if I do SecureRandom i am getting uninitialized constant... but I thought it was part of core ruby
<bnagy>
then each round #reject! any elem > counter then add as many [0] people as are left
<bnagy>
done
MatthewsFace has joined #ruby
<bnagy>
thoraxe: no, it's part of the openssl stuff afaik
<bnagy>
core MRI is mersenne twister
<thoraxe>
bnagy: so: require 'openssl' or something?
coderxin has quit [Remote host closed the connection]
yubrew has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby
<bnagy>
using an explicit Person is going to be a little slower, but hey it's an OO lang
<atmosx>
hello
mikepack has joined #ruby
michael_lee has quit [Ping timeout: 246 seconds]
samuel02 has joined #ruby
SCommette has quit [Client Quit]
blom has joined #ruby
<bnagy>
jhass: I was thinking about avoiding reject! by doing something like dead, people = people.partition &:dead?
senayar_ has quit []
blom has quit [Remote host closed the connection]
confound_ has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<bnagy>
but it's kind of excessively flashy :/
<Muhammad_>
jhass: Good. Could you tell me the difference? How would it run faster? What's the key idea behind it? Note that 635622 was the result on 25th month on my side.
<jhass>
bnagy: yeah I thought about that too but decided I'd like rather try to reduce the number of arrays created
blom has joined #ruby
momigi has quit [Remote host closed the connection]
e4xit has quit [Quit: e4xit]
<bnagy>
probably does make a difference, yep
senayar has joined #ruby
DrShoggoth has quit [Quit: Leaving]
mansi has quit [Remote host closed the connection]
<bnagy>
but it's one less runthrough too
<bnagy>
if I cared I'd bench :D
mansi has joined #ruby
<bnagy>
Muhammad_: it probably runs faster because it's the most straightforward possible way to write that algorithm
e4xit has joined #ruby
Elico has joined #ruby
mikemar10 has quit []
<bnagy>
like, I can instantly read that and see what it's doing
<Muhammad_>
What the hell!?
<bnagy>
IME easy to read code is usually faster
<jhass>
Muhammad_: I coded it at the specifications you gave by answering bnagys questions, not too much by your code
<Muhammad_>
Why I couldn't coded in that way?!
<bnagy>
practice, probably
<jhass>
I'm not sure what your version is exactly doing still
mikepack has quit [Ping timeout: 265 seconds]
<bnagy>
writing any code is practice for writing clear code
klaut has quit [Remote host closed the connection]
beneggett has joined #ruby
<jhass>
is it adding a new person for every person that was added by a not dead person?
h4mz1d has quit [Ping timeout: 240 seconds]
<Muhammad_>
Yup.
<bnagy>
mixing push and delete_at gives me eyestrain
<jhass>
so it's +2 persons for each alive person each iteration
<bnagy>
it is?
<jhass>
bnagy: that + modifying the array you iterate over
hackeron has quit [Remote host closed the connection]
blom has quit [Ping timeout: 240 seconds]
samuel02 has quit [Ping timeout: 265 seconds]
dik_dak has quit [Ping timeout: 240 seconds]
neo1691 has quit [Read error: Connection reset by peer]
montyboy has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<bnagy>
yeah.. I think that messes up with push actually
<bnagy>
have to unshift
<bnagy>
or just Don't Do That
<jhass>
I'm more worried about delete_at
mike_k has joined #ruby
r0nin has quit [Remote host closed the connection]
<jhass>
that might skip elements
mansi has quit [Ping timeout: 265 seconds]
mven has quit [Quit: Leaving]
cpruitt has quit [Quit: cpruitt]
<jhass>
Muhammad_: so I can't tell what's the correct result, mine or yours, we still lack a very clear description of the algorithm
mven has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
MatthewsFace has quit [Quit: This computer has gone to sleep]
hackeron has joined #ruby
mike_k has quit [Remote host closed the connection]
mike_k has joined #ruby
ga1j1n has joined #ruby
e4xit has quit [Ping timeout: 240 seconds]
<jhass>
Muhammad_: about your other code I too have no idea what it does but it really really really wants to be a class, that's so clear by the fact you want to share a global across your methods
<jhass>
that global want's to be an instance variable of a class
<jhass>
never use global
<jhass>
s
rebelshrug has joined #ruby
chipotle has joined #ruby
<jhass>
and again, for digit in 0..9-> 0.upto(9) do |digit|
chrisseaton has joined #ruby
reset has quit [Quit: Leaving...]
toastynerd has quit [Remote host closed the connection]
<Muhammad_>
jhass: A person adds another person each month and if the person exists more than three month we delete it. Does it make more sense?
<bnagy>
personal opinion: I hate upto. I always (0..9).each
agjacome has joined #ruby
tkuchiki has joined #ruby
<Muhammad_>
*months
<bnagy>
but upto is valid, for x in y is like saying 'I am really a python programmer'
funburn has joined #ruby
<jhass>
Muhammad_: so then again, does the person who dies in the current iteration add another one before doing so?
spyderman4g63 has quit [Remote host closed the connection]
maximski has joined #ruby
mike_k has quit [Remote host closed the connection]
<jhass>
bnagy: I always forget to add the parens around a..b, so I got used to writing .upto instead ;)
spyderman4g63 has joined #ruby
<Muhammad_>
jhass: We check the person life time in current iteration; if it's less than 3, it adds and otherwise it doesn't.
<jhass>
so it doesn't
MatthewsFace has joined #ruby
<jhass>
then that's exactly what my code does and I fear your results are wrong
<Muhammad_>
I fear too.
smathieu has quit [Remote host closed the connection]
kobain has joined #ruby
freerobby has quit [Quit: Leaving.]
smathieu has joined #ruby
chris_thomson has joined #ruby
<bnagy>
if I were a betting man I would put money on runaway execution in yours, Muhammed
Murci3lago has quit []
artgoeshere has quit [Quit: I'll see myself out.]
<bnagy>
you're possibly lucky that it terminates at all
ga1j1n has quit [Remote host closed the connection]
<Muhammad_>
Hehe!
<Muhammad_>
Me too.
<bnagy>
you could check by using a manual counter and incrementing that inside the each block and comparing that with the array size
<bnagy>
see if they're the same
ga1j1n has joined #ruby
<Muhammad_>
jhass: About the second app I should denoted that it translate an infix expression into a postfix expression. 10+2-4 to 102+4-
artgoeshere has joined #ruby
spyderman4g63 has quit [Ping timeout: 264 seconds]
dx7_ has joined #ruby
<Muhammad_>
*translates
yasushi has joined #ruby
tt1187 has quit [Ping timeout: 264 seconds]
Al__ has joined #ruby
<jhass>
hm, I fear I should grab some sleep and it's too late for me to come up with a nice algorithm for that. But if I would attempt I'd probably first try to parse the input into some sort of stack, maybe reorder it as needed (or do that while parsing already) and then just dump that stack
Fire-Dragon-DoL has joined #ruby
<bnagy>
Muhammad_: uh.. wait just for + and - ?
<bnagy>
that should be about 10 lines max :(
sobersabre has quit [Ping timeout: 240 seconds]
<bnagy>
just use a stack..oic jhass already went there
<bnagy>
I was rereading the paste
<Muhammad_>
Ah.
dx7 has quit [Ping timeout: 240 seconds]
ga1j1n has quit [Ping timeout: 264 seconds]
e4xit has joined #ruby
<bnagy>
tokenise, which looks done for you, then 10, + (yay operator!), 4 (yay 2nd operand!) push 10, 4, operator
sobersabre has joined #ruby
dx7_ has quit [Ping timeout: 265 seconds]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
<bnagy>
it's the exact reverse of writing a simple RPN calculator
<bnagy>
which was yesterday's homework from someone
<bnagy>
you can avoid using a stack, but usually that's exactly what the exercise is trying to teach you about
<jhass>
I guess you could push the first value and then just continue to parse and push operator and operand
davy__ has quit [Remote host closed the connection]
<bnagy>
well you just need to push opnd opnd oprtr once you have a triplet
<bnagy>
that's the only reordering IF you don't have brackets
cj3kim has joined #ruby
bynaryshef has joined #ruby
pr0ggie has joined #ruby
<bnagy>
otherwise you have to use an intermediate stack I think
Al__ has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
funburn has joined #ruby
blom has joined #ruby
mjs2600 has joined #ruby
crucify_me has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<crucify_me>
I uninstalled the pry gem and re.installed it and I still have the history. how do I purge the history file?
<crucify_me>
^^flush
Al__ has joined #ruby
vlad_starkov has joined #ruby
arubin has joined #ruby
mansi has joined #ruby
<benzrf>
crucify_me:
<benzrf>
$ rm ~/.pry_history
* benzrf
bonks crucify_me on the head
apeiros has joined #ruby
<crucify_me>
benzrf: thanks. bonk taken.
jjbohn has joined #ruby
<benzrf>
=3
samuel02 has joined #ruby
VTLob has quit [Quit: VTLob]
vlad_starkov has quit [Ping timeout: 264 seconds]
jhass is now known as jhass|off
senayar_ has joined #ruby
rainmanjam has quit [Remote host closed the connection]
jjbohn_ has joined #ruby
<crucify_me>
benzrf: ...thing is, does that piggy-back on the irb history? why is it stored when the gem and dependencies are uninstalled?
apeiros has quit [Remote host closed the connection]
<benzrf>
crucify_me: because it is just a local file
<benzrf>
it is not part of the software
<crucify_me>
ok benzrf thanks
<benzrf>
i am 90% sure that the vast majority of packages do NOT remove per-user configuration when uninstalled
<benzrf>
yw :)
apeiros has joined #ruby
jjbohn has quit [Ping timeout: 240 seconds]
<crucify_me>
benzrf: sorry, that would be user configuration? I thought it was a sort of buffer.
<benzrf>
well it is
<benzrf>
but by config i meant more like storage and history and general state information
samuel02 has quit [Ping timeout: 265 seconds]
<benzrf>
not necessarily actual config
<crucify_me>
ok thanks benzrf
yubrew has joined #ruby
<crucify_me>
<< see moniker if bonking gets tiresome benzrf:
MatthewsFace has quit [Quit: This computer has gone to sleep]
senayar has quit [Ping timeout: 265 seconds]
mlpinit has joined #ruby
flowerhack has quit [Quit: Connection closed for inactivity]
creede has quit [Ping timeout: 240 seconds]
<benzrf>
hehe
<toretore>
onyone know if there's a vim plugin that does this:? i want to make a file-local "bookmark" by putting a label on a line, then in the top i want to list the bookmarks and then when i put the cursor over a label i can make it jump to the bookmark label?
MatthewsFace has joined #ruby
yasushi has quit [Remote host closed the connection]
<benzrf>
toretore: why not just use marks
<toretore>
i want it to be persisted in the file itself
<benzrf>
ah
<benzrf>
ok, just use a plugin that lists search results :)
<benzrf>
like ack, or something
<benzrf>
and then you can do a simple word match
<benzrf>
*search
<toretore>
i guess
yubrew has quit [Ping timeout: 240 seconds]
derek_c has joined #ruby
snath has quit [Ping timeout: 240 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar_ has quit [Remote host closed the connection]
crucify_me has quit []
pel_daniel has left #ruby [#ruby]
AussieDownUnder has quit [Remote host closed the connection]
davy_ has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
armyriad has quit [Quit: Leaving]
weaksauce has quit [Ping timeout: 240 seconds]
luckyruby has quit [Remote host closed the connection]