<chridal>
havenwood: Would there be any reason to use Sinatra tho, if you were to go with grape running on pure Rack?
dingus_khan has quit [Remote host closed the connection]
<chridal>
is there anything that Sinatra can add to that mix?
Nirgali42 has joined #ruby
webgen has joined #ruby
sdouglas has quit [Remote host closed the connection]
<havenwood>
chridal: Its DSL niceties, though I've never used Grape with pure Rack to give a well-reasoned opinion on the merits of the differences.
dingus_khan has joined #ruby
toastynerd has quit [Remote host closed the connection]
sdouglas has joined #ruby
jjbohn has joined #ruby
<chridal>
say you were using Sinatra tho; what benefits are you getting from adding Grape on top?
Mongey has quit [Quit: Mongey]
<havenwood>
chridal: If you prefer the convention over configuration route. You can do API versioning, etc, etc in pure Sinatra, but Grape has an opinionated existing way to do it.
spider-mario has quit [Read error: Connection reset by peer]
fedesilva has joined #ruby
scttnlsn has joined #ruby
<rawtaz>
havenwood, apeiros, postmodern, toretore, bnagy, RubyPanther: i really cant thank you enough for all the kind help and patience you summoned today. big thanks for helping me get a nice slim ruby setup (small use case, but nonetheless!). i have my Gemfile stuff working now, and there's not a sign of the weirdness i had when using RVM ( basically the thing was that the old system gem was used even though i had new ruby and rvm and stuff set up)
<rawtaz>
so big thanks!!
jlast has quit [Remote host closed the connection]
brunops has quit [Ping timeout: 240 seconds]
brunops has joined #ruby
rainmanjam has quit [Remote host closed the connection]
<rawtaz>
especially havenwood since he's been with me for the entire evening ;-)
nari has joined #ruby
prc has quit [Quit: Leaving.]
<postmodern>
rawtaz, now get on with the coding :)
<rawtaz>
this is truly one of the most helpful chans ive been in ever
prc has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
yubrew has joined #ruby
<rawtaz>
postmodern: nah, too late for that! ;D
<rawtaz>
dinner calling. at 1:15 am :D
DropsOfS_ has quit [Ping timeout: 240 seconds]
hermanmunster has quit [Ping timeout: 265 seconds]
frog0909 has quit [Quit: ciao]
mgberlin has joined #ruby
<benzrf>
rawtaz: #ruby is only second to #haskell when it comes to helpfulness!
slowcon has joined #ruby
mgberlin has quit [Remote host closed the connection]
toastynerd has joined #ruby
rainmanjam has joined #ruby
DropsOfSerenity has joined #ruby
DropsOfSerenity has quit [Max SendQ exceeded]
<rawtaz>
pfft ;)
ephemerian has quit [Quit: Leaving.]
DropsOfSerenity has joined #ruby
chipotle has joined #ruby
yubrew has quit [Ping timeout: 264 seconds]
<benzrf>
*second only
rbartos has joined #ruby
x77686d has quit [Quit: x77686d]
Speed has joined #ruby
ChangJoo-Park has joined #ruby
<yoshokatana>
bnagy: your code works great if I want to remove hashes from the array, but how do I remove (matching) strings from the other array? this looks...wrong: label_toggles.reject { |l| current_labels.each { |x| x[:name] == l } } # eliminate labels that match
<slowcon>
what up guys
rainmanjam has quit [Ping timeout: 240 seconds]
<benzrf>
nmu
<benzrf>
yoshokatana: you may mean Enumerable#all?
<benzrf>
not each
guinslym has joined #ruby
<benzrf>
Array#each just returns the array
<benzrf>
*when given a block
<yoshokatana>
ahh, yeah
DropsOfSerenity has quit [Ping timeout: 252 seconds]
fridim__ has joined #ruby
w1zeman1p has joined #ruby
<havenwood>
yoshokatana: you want #all? or #any?, hard to tell?
crystal77 has quit [Quit: Computer has gone to sleep.]
DropsOfSerenity has joined #ruby
<guinslym>
include return true or false but mine is returning "1"
<yoshokatana>
havenwood: I think I want #all
lw has joined #ruby
<yoshokatana>
hmm
<jhass>
guinslym: is that a question? if so you need to elaborate a lot more and provide a lot more context, ideally with actual code or minimal code reproducing your problem
<yoshokatana>
ohh wait I want any
joelroa has joined #ruby
<benzrf>
lol
<havenwood>
i was suspicous :P
<yoshokatana>
like so? label_toggles.reject { |l| current_labels.any? { |x| x[:name] == l } } # remove strings from label_toggles that match the name of any hash in current_labels
zz_karupanerura is now known as karupanerura
<yoshokatana>
yep, that worked :-)
aryaching has joined #ruby
joelroa has quit [Ping timeout: 264 seconds]
griffindy has joined #ruby
brunops has quit [Ping timeout: 240 seconds]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
DropsOfSerenity has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<guinslym>
jhass : now it's working? I don't why :0
shashin has quit [Quit: shashin]
brunops has joined #ruby
<jhass>
guinslym: probably rails code reloading or something like that. Btw. the better place for rails related questions is #rubyonrails
<guinslym>
jhass: ok thanks! I'm switching channel.
lw has joined #ruby
guinslym has left #ruby [#ruby]
webgen has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Remote host closed the connection]
b00stfr3ak has joined #ruby
pel_daniel has left #ruby [#ruby]
estebanrules has quit [Ping timeout: 265 seconds]
<chridal>
Anyone have any good recommendations as for books on Sinatra / Rack?
Kricir has joined #ruby
lw has quit [Client Quit]
shinobi_one has left #ruby [#ruby]
mjs2600 has joined #ruby
stringoO has quit [Quit: stringoO]
<olivier_bK>
i have another littel problem how i can search with white space before the string in my array ? ( diskStorage : 0, )
<olivier_bK>
if i try with grep or find i get nothing gr..
rainmanjam has joined #ruby
<existensil>
olivier_bK: what are you talking about? that isn't an array, isn't valid ruby, and there is no string present
IceDragon has quit [Ping timeout: 244 seconds]
IceDragon has joined #ruby
<olivier_bK>
existensil, i read a php file and this file begin with white space
<havenwood>
olivier_bK: Put quotes around a String!
mjs2600 has quit [Ping timeout: 240 seconds]
jcs222 has quit [Quit: leaving]
Geniack has quit [Read error: Operation timed out]
<existensil>
also what is the question you are trying to answer? do you just want to test if there is whitespace at the beginning of a file or what? what does your code look like now?
vlad_starkov has quit [Remote host closed the connection]
Mongey has joined #ruby
<havenwood>
YamakasY: Which version of Ubuntu?: lsb_release -a
<YamakasY>
havenwood: 12.0.4.1
bilbo_swaggins has joined #ruby
<no0code>
hello, i wrote my little sinatra app on the / route - but i use sinatra with thin and proxy to lighttpd to another route /bla - and sinatra does not find /bla, because it looks for / route, how to change this?
<havenwood>
YamakasY: Do you have the ruby1.9.1 package installed?
robustus has quit [Ping timeout: 252 seconds]
<YamakasY>
havenwood: also
mikecmpbll has quit [Quit: i've nodded off.]
jjbohn has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
dingus_khan has quit [Remote host closed the connection]
sparrovv has quit [Remote host closed the connection]
<havenwood>
YamakasY: `update-alternatives --config ruby` and `update-alternatives --config gem` to select the correct Ruby and RubyGems.
<havenwood>
YamakasY: Do update to a newer Ruby if you can, as 1.8 is past end-of-life.
agjacome has quit [Ping timeout: 244 seconds]
<YamakasY>
havenwood: I have 1.9
mjs2600 has joined #ruby
robustus has joined #ruby
<havenwood>
YamakasY: Select the `ruby` and `gem` you want from update-alternatives and you should be able to proceed.
<havenwood>
YamakasY: make sure Ruby and Gem are set accordingly
<YamakasY>
havenwood: both are
<havenwood>
YamakasY: Now try doing whatever it is you're doing. :)
<YamakasY>
havenwood: uhm I want to remove that 0.0.23
<havenwood>
no0code: I've never used lighttpd. Like it?
<YamakasY>
ok
<havenwood>
YamakasY: Is it installed on the Ruby you're now using?
musl has quit [Quit: WeeChat 0.4.3-dev]
crystal77 has quit [Client Quit]
<YamakasY>
havenwood: yap
<YamakasY>
uhm
<YamakasY>
no, I don't see it local
fraterlaetus has quit []
<YamakasY>
so I'm not sure
nmokru has quit [Quit: nmokru]
brandonjmckay has quit [Ping timeout: 265 seconds]
<havenwood>
YamakasY: So install the version you want. What are you doing exactly?
aryaching_ has joined #ruby
toastynerd has quit [Remote host closed the connection]
nmokru has joined #ruby
<havenwood>
no0code: Seems everyone is moving to nginx.
<YamakasY>
havenwood: I'm trying to remove that 0.0.23 version that is in foreman :)
<YamakasY>
I need to let it use 0.0.21 again
crystal77 has joined #ruby
Megtastique has joined #ruby
twiceaday has joined #ruby
slowcon has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
Faris has quit [Ping timeout: 252 seconds]
sarlalian has joined #ruby
musl has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
RoxasShadowRS has joined #ruby
timonv has joined #ruby
aryaching has quit [Ping timeout: 265 seconds]
nmokru has quit [Client Quit]
young has joined #ruby
brunops has quit [Ping timeout: 264 seconds]
nmokru has joined #ruby
necrotic_ has joined #ruby
necrotic_ has quit [Remote host closed the connection]
<YamakasY>
havenwood: so I wonder if you can just remove it :)
trentson has joined #ruby
<havenwood>
YamakasY: How'd you install it in the first place? You certainly could just go to the dir and delete it :O, but I don't know about about apt's whacky RubyGems/Forman to know if that is safe or what.
Hobogrammer has quit [Ping timeout: 252 seconds]
<havenwood>
YamakasY: But yeah, i was suggesting switching to a newer Ruby thinking just leave behind 1.8 stuff.
mercwithamouth has quit [Ping timeout: 252 seconds]
rbartos has joined #ruby
rahult_ is now known as rahult
<YamakasY>
havenwood: yeah deleting doesn't work
kukyakya has joined #ruby
soheil has quit [Remote host closed the connection]
mjs2600 has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 252 seconds]
<havenwood>
YamakasY: i don't know what is going on with the forman vendor, so afraid i can't be much help
<havenwood>
YamakasY: maybe someone else knows!
nmokru has quit [Client Quit]
nmokru has joined #ruby
slowcon has joined #ruby
dingus_khan has quit [Remote host closed the connection]
ctp has quit [Quit: Leaving...]
trentson has quit [Ping timeout: 265 seconds]
<YamakasY>
havenwood: man ruby is broken fast
<havenwood>
YamakasY: **Debian Ruby :P
<YamakasY>
how come
simono has quit [Read error: Connection reset by peer]
grampajoe has joined #ruby
<havenwood>
YamakasY: I use ruby-install/chruby on Debian, because i can't make heads or tails of their packaged Ruby practices (though it seems to be getting better in vary recent releases).
axl_ has quit [Quit: axl_]
sdouglas has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
joelroa has joined #ruby
<havenwood>
YamakasY: dunno
l3ck has quit [Quit: Leaving...]
scttnlsn has quit [Ping timeout: 240 seconds]
<havenwood>
YamakasY: Someone who actually uses apt-get Ruby would know better!
root_empire has quit [Read error: Connection reset by peer]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joelroa has quit [Max SendQ exceeded]
jkamenik has quit [Quit: Leaving.]
<YamakasY>
hehe
joelroa has joined #ruby
Zunonia_ has joined #ruby
nmokru has quit [Quit: nmokru]
b00stfr3ak has quit [Ping timeout: 240 seconds]
nmokru has joined #ruby
aaronransley has joined #ruby
aaronransley has quit [Remote host closed the connection]
soheil has quit [Remote host closed the connection]
Jake232 has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
ubyte has quit [Quit: Leaving...]
soheil has joined #ruby
tedstriker has quit [Quit: Anti-Fraping status set.]
mando has quit [Remote host closed the connection]
tedstriker has joined #ruby
Hobogrammer has quit [Ping timeout: 241 seconds]
speakingcode has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
soheil has quit [Ping timeout: 240 seconds]
Cope has quit [Ping timeout: 240 seconds]
jcs222 has quit [Quit: leaving]
_lynX has quit [Read error: Connection reset by peer]
markisonfire has quit [Quit: markisonfire]
ctp has quit [Ping timeout: 265 seconds]
Cope has joined #ruby
vlad_starkov has joined #ruby
YamakasY has quit [Read error: Connection reset by peer]
YamakasY_ has joined #ruby
<RubyPanther>
YamakasY: this is why nobody uses system ruby, they install through a ruby version manager rvm/rbenv/chruby and then use bundler to manage gem versions
ritek has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
aryaching has quit [Ping timeout: 265 seconds]
razrunelord has quit []
<postmodern>
RubyPanther, although I must say, Fedora's system ruby is actually pretty nice
mercwithamouth has joined #ruby
YamakasY_ has quit [Read error: Operation timed out]
<RubyPanther>
I use Fedora, but I don't use the system Ruby. heh but yeah, they do at least follow the upstream norms
<benzrf>
are you euphoric?
x1337807x has quit [Ping timeout: 241 seconds]
sski has quit [Remote host closed the connection]
sski has joined #ruby
<RubyPanther>
traditionally a compiled ruby is twice as fast as a fedora binary, or most distro binaries, because of compiler flags and portability
<RubyPanther>
well, 25% or something, anyways
vlad_starkov has quit [Ping timeout: 252 seconds]
rbartos has quit [Ping timeout: 240 seconds]
<RubyPanther>
there was a hoax for awhile about REE being faster than MRI that was based on that difference, funny stuff
sarlalian has quit [Quit: WeeChat 0.4.0]
<benzrf>
REE?
iliketurtles has quit [Quit: zzzzz…..]
angusiguess has quit [Remote host closed the connection]
<eval-in___>
RubyPanther => undefined local variable or method `i' for main:Object (NameError) ... (https://eval.in/108945)
<benzrf>
=]
benzrf has quit [Quit: zzz]
Salve has quit [Remote host closed the connection]
Salve has joined #ruby
grvgr has joined #ruby
<albedoa>
if we can use `each` for [1, 2].each {|x| puts x} then why do we have to use `collect` for ["A", "B"].collect {|x| x.succ } ? what does `collect` do differently?
<centrx>
albedoa, collect/map collects or maps your old array into a new array based on the rule you specified in the block
sepp2k has quit [Read error: Connection reset by peer]
<centrx>
albedoa, each simply loops through
Megtastique has quit []
Hanmac1 has joined #ruby
<havenwood>
albedoa: Usually we use #map, an alias for #collect. But `[1, 2].each { |n| n.succ } #=> [1, 2]` while `[1, 2].map { |n| n.succ } #=> [2, 3]`.
<albedoa>
centrx i'm confused, both look to be looping through the array and acting on each element (puts and succ).
grvgr has quit [Remote host closed the connection]
fschuindt has joined #ruby
rm_ has quit [Read error: Connection reset by peer]
invinceable has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sski has joined #ruby
<centrx>
albedoa, Yes, but only collect/map puts the return value of the block into a new element of an error
<havenwood>
albedoa: #each returns the Array you started with, while #max returns a new Array from what you return from the block on each iteration.
rm_ has joined #ruby
<centrx>
#map
<havenwood>
#map**
cashnguns has joined #ruby
<albedoa>
centrx havenwood i understand, thank you
Hanmac has quit [Ping timeout: 240 seconds]
<centrx>
s/error/array
andy__ has joined #ruby
<albedoa>
got it :)
angoragoats has quit [Quit: angoragoats]
byprdct has joined #ruby
reset has quit [Quit: Leaving...]
phantasm66 has joined #ruby
freerobby has joined #ruby
Megtastique has joined #ruby
sski has quit [Ping timeout: 264 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
meinside__ has joined #ruby
<agent_white>
Is there a single go-to ncurses gem for Ruby? Looks like there's a bazillion to choose from.
<RubyPanther>
agent_white: curses in stdlib
axl_ has quit [Quit: axl_]
tylersmith has joined #ruby
<agent_white>
RubyPanther: Ah yeah, I'm checking it out now... seems like it may not like my window manager ;P
xaq has joined #ruby
<havenwood>
also gemified and removed from stdlib in 2.1
<TuxLyn>
centrx, in my case it would be something like > Regexp.union(data, regex)
<TuxLyn>
but of course its not working ^_^ > no implicit conversion of Array into String
mjs2600 has quit [Ping timeout: 252 seconds]
<havenwood>
Regexp.union(*regex)
<havenwood>
TuxLyn: splat that Array!
<havenwood>
explode eet
thomasxie has quit [Remote host closed the connection]
tjr9898 has quit [Ping timeout: 265 seconds]
thomasxie has joined #ruby
<bricker`LA>
someone ask me a challenging question, something that will make me open the ruby source (I asked #ror too but I think you guys will have a better answer)
pranny has quit [Quit: Leaving.]
alexju has joined #ruby
tjr9898 has joined #ruby
mikepack has quit [Remote host closed the connection]
<RubyPanther>
bricker`LA: is a class really an object, or did they fake it?
<bricker`LA>
RubyPanther: good question
Fire-Dragon-DoL has quit [Quit: Leaving.]
<bricker`LA>
RubyPanther: I'm trying to figure out why Enumerable#permutation is slower in Ruby 2 (via centrx in #ror) first
<havenwood>
bricker`LA: one from #ruby the other day: `['09:15', '10:30', '12:55']` is the expected input, `[{9=>2700, 10=>1800}, {10=>1800, 11=>3600, 12=>3300}]` is expected output, make it happen!
fridim__ has quit [Ping timeout: 265 seconds]
Celm has quit [Remote host closed the connection]
<centrx>
havenwood, Is the input missing an element?
<bricker`LA>
RubyPanther: Okay, without looking into it *too* much, I think it's faked, only because the bottom of class.c doesn't have the normal list of methods https://github.com/ruby/ruby/blob/trunk/array.c#L4781
yfeldblu_ has quit [Remote host closed the connection]
<havenwood>
i think up till that fail i had them right, sorry bout that
<havenwood>
another challenge!!
radic has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
davy has joined #ruby
kitak has quit [Remote host closed the connection]
ctp has joined #ruby
thomasxie has quit [Remote host closed the connection]
kitak has joined #ruby
tedstriker has quit [Quit: Anti-Fraping status set.]
thomasxie has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
Salve has joined #ruby
<havenwood>
here's a self-imposed challenge i had fun with. create an #arity_range method that returns a Range representing the number of parameters allowed from min to max: https://gist.github.com/havenwood/95fbe7d70d8794b75cae
braincrash has quit [Quit: bye bye]
<havenwood>
bricker`LA: that one ^ should require referencing the docs, or at least Pry/irb :P
<bricker`LA>
:D
thomasxie has quit [Remote host closed the connection]
<havenwood>
apeiros pointed out the extra credit part to me, i totally missed it
thomasxie has joined #ruby
shaileshg has joined #ruby
multi_io has quit [Remote host closed the connection]
multi_io has joined #ruby
ctp has quit [Ping timeout: 265 seconds]
griffindy has quit [Quit: Computer has gone to sleep.]
braincrash has joined #ruby
ukd1 has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<bnagy>
hahah I just thought of a truly appalling approach to the time one :)
trentson has joined #ruby
<bricker`LA>
share share sahre
<bricker`LA>
share*(
<bricker`LA>
**
<bnagy>
convert both times to seconds, then start incrementing a counter, and push back an hour counter when the second counter %3600==0 until you arrive
<crystal77>
Why does this produce a syntax error? I'm 100% sure I've the syntax correct: x = 5; x > 6 ? puts "Yay!" : puts "No!"
<centrx>
>> x = 5; x > 6 ? puts "Yay!" : puts "No!"
<eval-in___>
centrx => /tmp/execpad-8255284602ca/source-8255284602ca:2: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' ... (https://eval.in/109010)
<bricker`LA>
And wasn't turning off greedy matching
<bricker`LA>
so many probem
<bricker`LA>
TuxLyn come back please
<centrx>
Doesn't work if the Javascript inserts HTML in its code
<bricker`LA>
I have solution for you
<bricker`LA>
centrx: of course not :)
ner0x has quit [Quit: Leaving]
maximski has joined #ruby
trentson has quit [Read error: Connection reset by peer]
<centrx>
He is gone bricker`LA
maximski has quit [Max SendQ exceeded]
<bricker`LA>
centrx: but then again, neither would nokogiri
<RubyPanther>
JS != HTML
<centrx>
He has gone to the dark side
Salve has quit [Ping timeout: 244 seconds]
xjiujiu_ has quit [Quit: No Ping reply in 180 seconds.]
io_syl has joined #ruby
xjiujiu_ has joined #ruby
io_syl has quit [Client Quit]
Vovko has quit [Remote host closed the connection]
hfp is now known as hfp`away
circuit has joined #ruby
duggiefresh has quit [Ping timeout: 244 seconds]
rankine has quit [Quit: leaving]
<circuit>
any suggestions on ruby books?
h4mz1d has quit [Ping timeout: 240 seconds]
wereHamster has quit [Read error: Connection reset by peer]
<Senjai>
circuit: Programming Ruby 1.9 & 2.0 is the best one I've read
<Senjai>
bricker`LA: :( I think I made him leave, I would have wanted a bit more entertainment though.
marcdel has joined #ruby
Shidash has joined #ruby
Kricir has quit [Remote host closed the connection]
x1337807x has joined #ruby
xjiujiu_ has quit [Quit: No Ping reply in 180 seconds.]
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
xjiujiu_ has joined #ruby
charlies_ has joined #ruby
<RubyPanther>
Senjai: Yeah, you were a bit of a jerk to him. Even in centrx's link it says, "It's considered good form to demand that regular expressions be considered verboten, totally off limits for processing HTML, but I think that's just as wrongheaded as demanding every trivial HTML processing task be handled by a full-blown parsing engine. It's more important to understand the tools, and their strengths and weaknesses, than it is to knuckle
<RubyPanther>
under to knee-jerk dogmatism."
charlie__ has joined #ruby
joelroa has quit [Ping timeout: 240 seconds]
charliesome has quit [Ping timeout: 240 seconds]
<RubyPanther>
smashing yourself against the rocks of SGML scraping is a good learning tool. Similar to the way Shaolin monks kick each other in the balls in order to toughen themselves and become immune to real attacks.
<Senjai>
RubyPanther: Maybe, but when several people say it's the wrong approach and there are countless articles state that is the wrong way to approach the problem, I can't not come to that conclusion
<Senjai>
RubyPanther: It's like someone saying, "trust me it's hot", no matter how easy it is to heed the advice, you still go and touch it anyway.
<RubyPanther>
Oh, several people said so, I guess that makes it a good enough reason to berate others and call them names.
charlies_ has quit [Ping timeout: 240 seconds]
ffranz has quit [Quit: Leaving]
<RubyPanther>
Senjai: Calling him an idiot was you being one
<Senjai>
RubyPanther: No, it was me being an asshole, and perhaps you're right, I'll try to be nicer from now on.
<Senjai>
Deal?
<RubyPanther>
Somebody says, "trust me it's hot," and somebody else says, "actually if you have right gloves it is fine" and then you insist it is always wrong
<RubyPanther>
Being an asshole in a public channel like that IS idiotic, it ruins the community
<Senjai>
That's not relevant, the right gloves in this case is using regex for it's intended purpose
<RubyPanther>
only a complete idiot would piss all over a community they're claiming to be part of
sarlalian has joined #ruby
<Senjai>
Why are you still on about this? I said I'd try and be nicer.
<Senjai>
Now you're just being a hypocrite.
xjiujiu_ has quit [Quit: No Ping reply in 180 seconds.]
fgo has quit []
xjiujiu_ has joined #ruby
sensen has quit [Ping timeout: 240 seconds]
sensen has joined #ruby
<bricker`LA>
everybody shhhhhhhh
bthesorceror has joined #ruby
<bricker`LA>
we're all adults here
Faris has joined #ruby
mgberlin has quit [Remote host closed the connection]
yubrew has joined #ruby
mgberlin has joined #ruby
JasmeetQA has joined #ruby
charlie__ has quit [Read error: Connection reset by peer]
yubrew has quit [Ping timeout: 252 seconds]
lxsameer has joined #ruby
armyriad has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby
jherbst has quit [Ping timeout: 240 seconds]
mgberlin has quit [Ping timeout: 265 seconds]
l3ck has joined #ruby
mikepack has joined #ruby
recurrence has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikepack has quit [Read error: Connection reset by peer]
Cache_Money_ has joined #ruby
<agent_white>
I always miss the fights :(
mikepack has joined #ruby
<agent_white>
Well... vim is best anyways.
xerox357 has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
fgo has joined #ruby
charliesome has joined #ruby
xjiujiu_ has quit [Remote host closed the connection]
TuxLyn has joined #ruby
<bricker`LA>
You're absolutely right, vim is best for people who still think it's 1996
<bricker`LA>
(osnap)
<TuxLyn>
told you its possible ^_^ > html.gsub(/(<script.*?<\/script>)/m,'')
<TuxLyn>
I got it ;)
mostlybadfly has quit [Quit: Connection closed for inactivity]
<TuxLyn>
that all I needed thanks everyone.
TuxLyn has quit [Client Quit]
<bricker`LA>
TuxLyn: if you hadn't rage quit, you would have seen that we gave you an answer
decoponio has joined #ruby
<agent_white>
bricker`LA: Pfft, its only dependency is competence.
jamto11 has joined #ruby
<agent_white>
Which I don't have any of, but seem to get by somehow.
<bricker`LA>
I would take on any vim expert on any task, and do it faster in sublime, I guarantee
<bricker`LA>
and I've only been using sublime for a few months
timonv has joined #ruby
<agent_white>
Haha possibly. I just don't like scratching walls when I ssh into a box.
mikepack has quit [Ping timeout: 244 seconds]
Cache_Money_ is now known as Cache_Money
<bricker`LA>
yeah me neither... I know just enough vim to feel incompetent in that scenario :P
fgo has quit []
<agent_white>
But in all seriousness, we all use nano.
<agent_white>
Who doesn't?
<bricker`LA>
lol
<Senjai>
Lol
<Senjai>
That was hilarious
<Senjai>
He hit-and-run trolled :P
jamto11 has quit [Ping timeout: 240 seconds]
<bricker`LA>
He's so proud of himself
bthesorceror has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
armyriad has joined #ruby
bthesorceror has joined #ruby
timonv has quit [Ping timeout: 244 seconds]
<circuit>
soo other than web apps what can ruby be used for
joelroa has joined #ruby
Deele has joined #ruby
<Senjai>
circuit: I'm making a modern IRC framework with it using celluloid :/
kitak has joined #ruby
<agent_white>
^ Hey! I'm attempting to write an IRC client! :D
<Senjai>
I also use it for most things you'd use shell scripts for.
<agent_white>
Senjai: Yeah right now I'm at the point of needing the separation of a text area for input, then the area for the actual channel text. Guess this is the point of needing to learn curses?
<Senjai>
RubyPanther: It's just that curses was programmed in C, and the ruby bindings are cumbersome
<RubyPanther>
agent_white: I once had a client who whose preferred method of communication was to ssh into a box I was connected to and use wall(1) to send messages
<Senjai>
agent_white: You could also look into shoes for a gui, but I've never used it
slowcon has joined #ruby
<Senjai>
shaileshg: And gem update --system doesn't help?
axl_ has quit [Quit: axl_]
mindcake has quit [Quit: mindcake]
<agent_white>
RubyPanther: That's awesome! I tried it for the first time the other day with a buddy while we were building a server, good stuff :)
<Senjai>
lol wall, really
<shaileshg>
Senjai: hangs.. doing nothing
<RubyPanther>
curses bindings are just... curses. The bindings aren't the source of the kruftiness. It should be easy on the scale of Tk for the GUI
<agent_white>
Senjai: I was thinking about that, but I want it to be a console-interface instead. Kinda like a irssi-clone :)
<Senjai>
shaileshg: Either your box can't connect to rubygems or the internet, or you have a faulty rubygems installation
hiyosi has joined #ruby
xerox357 has quit [Remote host closed the connection]
<Senjai>
agent_white: If you just want to do it for fun, or to experiment, do it in ruby if it pleases you. Feature wise, as it grows you may find ruby to not be the best choice
<agent_white>
shaileshg: Probs some DNS issue, if you're here and can still access other sites.
ukd1 has joined #ruby
xerox357 has joined #ruby
<RubyPanther>
agent_white: I know, right? So cool! Except for the mess in logs
<Senjai>
agent_white: Against any of the native applications.
<RubyPanther>
I'd be in the middle of creating a file with cat, and he'd spam my terminal, I'd be thinking, "darn, now I need a line editor"
freerobby has quit [Quit: Leaving.]
sparrovv has quit [Ping timeout: 240 seconds]
circuit has quit [Quit: Leaving]
<shaileshg>
Senjai: hmm.. uninstalling and installing rubygems again
<shaileshg>
agent_white: I don't think so..
<bnagy>
agent_white: have you seen termbox?
oso96_2000 has quit [Ping timeout: 265 seconds]
<bnagy>
I dunno what the ruby bindings are like, the I used it from Go and it was pretty great
<agent_white>
RubyPanther: Hahah. I guess the messiness _is_ what makes it fun :P
<agent_white>
bnagy: Never even heard of it!
<bnagy>
super clean API, crossplatform
<bnagy>
many less features than curses
<agent_white>
Senjai: Yeah it's more for fun and learning, not expecting anyone to use it but myself :P But I do need an excuse to dabble in some C++, so that could be it.
inversesquarelaw has quit [Read error: Connection reset by peer]
<agent_white>
bnagy: Ooo I'll check it out. Definitely not looking for anything fancy.
xerox357 has quit [Ping timeout: 240 seconds]
<bnagy>
imvho don't dabble in C++ unless you really want to be a 3d game programmer
hiyosi has quit [Ping timeout: 265 seconds]
<bnagy>
there are good reasons to know C ( although... )
<bnagy>
but C++ is just hell on skates
<RubyPanther>
yeah, most libraries are in C
benzrf has joined #ruby
<benzrf>
hellote
<havenwood>
shaileshg: what OS are you on? openssl >= 1.0.1? can you update RubyGems successfully to 2.2.2?: gem update --system
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bnagy>
it's kind of normal for it to take a while, especially on slow internets
<agent_white>
bnagy: Haha, when head back to school to finish up my final years I'll be back into C++ (the CSE track teaches it). I think pointers are pretty awesome :D
<shaileshg>
bnagy: maybe.. but it doesn't show anything either.. in verbose mode too
<havenwood>
shaileshg: You could double check: openssl s_client -host rubygems.org -port 443
<bnagy>
like it downloads a full gem list or something kind of screwy
<bnagy>
drives me a bit nuts :/
mgberlin has joined #ruby
<bnagy>
I spend most of my life with < 64k internet
<havenwood>
shaileshg: is that the same problem as before or different?
<Senjai>
agent_white: valid C is valid C++
<shaileshg>
havenwood: its the same problem as before
<agent_white>
bnagy: Good to hear :D I'll just have to apologize to my semicolon for the neglect before diving in.
<Senjai>
agent_white: I've just never used C without C++ is all. But I've heard that C++ isn't too great of a thing, even though I cannot really attest as to why.
<Senjai>
agent_white: Simply: If you like coding in it, code in it.
sensen has quit [Ping timeout: 252 seconds]
<havenwood>
shaileshg: i'm sure we could suss it out, but i'd suggest just building a modern Ruby, anyways 2.1.1 is out and is great so a good time to update :)
<agent_white>
Senjai: Yeah I don't know any better. Furthest I've gotten into C++ was writing a "library catalog". And I _just_ wrote a "hello world" in C the other day... until I realized I should be studying Ruby instead of hopping ;P
<havenwood>
shaileshg: or if you need 2.0.0, at least rebuild it, since you may have built against a problematic ruby-build
oso|away has quit [Ping timeout: 240 seconds]
<agent_white>
Senjai: AND C can be bound to Ruby!!! I totally forgot. Badass.
<shaileshg>
havenwood: hmm. let me do that
<havenwood>
shaileshg: I'm a ruby-install/chruby user so i'm not quite sure about ruby-build/rbenv best practices but there are users of that here as well.
zastern_ has quit [Quit: WeeChat 0.4.2]
zastern has joined #ruby
<Senjai>
agent_white So can C++, but it's a pain :P
sdwrage_ has quit [Quit: This computer has gone to sleep]
sdwrage has quit [Quit: This computer has gone to sleep]
kzrl has quit [Quit: leaving]
nism has quit [Quit: Leaving]
<havenwood>
shaileshg: if you go the ruby-build route do tell us your `ruby-build --version` before you build, so someone can sanity check it is latest
<havenwood>
shaileshg: if you per chance installed from head, Homebrew can be finicky is why i suggest ^
andy__ has quit [Ping timeout: 240 seconds]
<agent_white>
Senjai: Oh no shit? Damn. Well I guess maybe I'll try out some C and see how it goes!
<shaileshg>
havenwood: i m little confused here.. there is homebrew, rbenv, gem and source way of installing ruby
<shaileshg>
could you plz suggest what to do
sameerynho has joined #ruby
<shaileshg>
would learn more about them to know why so
<Senjai>
shaileshg: You can use ruby-build and chruby
jprovazn has joined #ruby
<Senjai>
ruby-install*
<shaileshg>
Senjai: okay
xerox357 has quit [Remote host closed the connection]
<havenwood>
shaileshg: Ruby ships with RubyGems (so you get `ruby` and `gem`). Homebrew is an OS X package manager (it can install packages needed by Ruby or Ruby itself). RVM, ruby-install/chruby, and ruby-build/rbenv are all options to install and then select the Ruby you want to use.
makara has joined #ruby
xerox357 has joined #ruby
oso|away has joined #ruby
oso|away is now known as oso96_2000
xerox357 has quit [Read error: Connection reset by peer]
yubrew has joined #ruby
xerox357 has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
<Senjai>
shaileshg: I dont use mac, I use linux, so I'd listen to havenwood over myself.
<havenwood>
Senjai: I use ruby-install and chruby too. :P
<shaileshg>
Senjai: hmm.. i m looking at options..
<shaileshg>
havenwood: hmm.. i m thinking of installing ruby 2.1.1
<havenwood>
shaileshg: do!
yubrew has quit [Ping timeout: 240 seconds]
<shaileshg>
just selecting what to use to install it
<shaileshg>
it always confuses the sh*t out of me
<Senjai>
shaileshg: I recommend ruby-install
<Senjai>
and chruby
<Senjai>
if you want to be hipster like myself and havenwood
<centrx>
Darn hipsters.
<shaileshg>
Senjai: hmm.. and use gem to install gems
<shaileshg>
or brew?
<Senjai>
shaileshg: gem
<Senjai>
shaileshg: alwaysss gem
<havenwood>
shaileshg: to get 2.1.1: brew install ruby-install && ruby-install ruby
<Senjai>
:P
<havenwood>
shaileshg: gems are installed with the `gem` that comes with 2.1.1
<shaileshg>
Senjai: difference.. ?
<shaileshg>
havenwood: hmm
<havenwood>
shaileshg: RubyGems ships with Ruby in modern Rubies.
<shaileshg>
bundle install is equivalent to gem install ?
<Senjai>
shaileshg: Uhh, bundler is the de facto ruby gem distributor. Using any other service for gems cannot possibly be more up to date less bundling straight from git
Solnse has quit [Quit: Leaving.]
<Senjai>
shaileshg: no
<Senjai>
shaileshg: gem install installs a gem on your system
<havenwood>
shaileshg: bundle is in addition to RubyGems, it itself is a gem
<Senjai>
shaileshg: bundle isntall makes sure you have the gems required for a project to run
<havenwood>
shaileshg: gem install bundler
marcdel has quit []
yfeldblum has quit [Ping timeout: 269 seconds]
<bnagy>
I've never understood this. Regular dependencies work fine for me.
<bnagy>
I only ever seem to hear rails people talking about bundler
marcdel has joined #ruby
<havenwood>
bnagy: and now we can: gem install --file
<havenwood>
or: gem i -g
Wolland has joined #ruby
<havenwood>
to install deps from the Gemfile
<centrx>
bnagy, It makes it easy to have all the developers and the production environment to have the same versions of the same gems
<havenwood>
RESOLVE ALL THE DEPS \o/
sdouglas has quit [Remote host closed the connection]
<bnagy>
sounds wacky to me
sdouglas has joined #ruby
axl_ has quit [Quit: axl_]
<bnagy>
like.. if your stuff doesn't work with the latest version of whatever gem why not just fix it instead of being an ass?
<centrx>
havenwood, Does bundler look through all the gems to figure out the right dependencies to get in one go?
<shaileshg>
havenwood: rubygems is gem program?
<centrx>
bnagy, Because it's a production environment, you can't upgrade every release
<havenwood>
centrx: yeah, or -g, --file in new RubyGems
<bnagy>
anyway I'm sure webs are super complicated and stuff and there are good reasons for not being able to code properly
<havenwood>
shaileshg: RubyGems is what you get the `gem` command from, part of Ruby.
<shaileshg>
havenwood: rubygems is package manager for ruby, its libraries and gems
<Senjai>
bnagy: lol.. There have been many a time when "fixes" have been "wrong" and cause things to break.
<shaileshg>
hmm
<Senjai>
bnagy: and stating your dependencies clearly in a single file is helpful to everyone
<pipework>
bnagy: As a rubyist, I use bundler all the time.
<Senjai>
pipework: Me too, for every project
spinlock has quit [Quit: terminated!]
himsin has joined #ruby
<Senjai>
bnagy: HTTParty is a prime example
Salve_ has quit [Remote host closed the connection]
<Senjai>
my code doesn't work on versions greater that 0.11 despite using the correct syntax. Still an open issue :?
<pipework>
People are still using httparty?
Salve has joined #ruby
<bnagy>
yeah I would just fix it or ditch it
<bnagy>
but I'm in research :)
bluOxigen has joined #ruby
circuit has joined #ruby
northfurr has quit [Ping timeout: 240 seconds]
aganov has joined #ruby
Salve has quit [Ping timeout: 240 seconds]
<Senjai>
pipework: Aye
<pipework>
huh, interesting.
slowcon has quit [Quit: slowcon]
invinceable has joined #ruby
dawkirst has quit [Read error: Connection reset by peer]
invinceable has quit [Client Quit]
invinceable has joined #ruby
jprovazn has quit [Ping timeout: 252 seconds]
m104 has quit [Quit: brb]
kukyakya has quit [Remote host closed the connection]
phansch has joined #ruby
ctp has joined #ruby
oso96_2000 is now known as oso|away
mgberlin has quit [Remote host closed the connection]
timonv has joined #ruby
james_d_h has joined #ruby
invinceable has quit [Read error: Connection reset by peer]
james_d_h has quit [Client Quit]
james_d_h has joined #ruby
sensen has joined #ruby
thomasxie has left #ruby [#ruby]
mgberlin has joined #ruby
ctp has quit [Ping timeout: 244 seconds]
mgberlin has quit [Remote host closed the connection]
<shaileshg>
i m also getting the same issue.. specifically ERROR: Failed to build gem native extension.
<shaileshg>
havenwood: with ruby 2.1.0, it worked..
<shaileshg>
Senjai: thanks
ValicekB has quit [Ping timeout: 244 seconds]
lxsameer_ has joined #ruby
closer has joined #ruby
<havenwood>
shaileshg: good deal. to build native extensions you need to have xcode build tools installed. make sure you have latest xcode installed, then: xcode-select --install
<havenwood>
then click "Install"
<shaileshg>
hmm
hiyosi has quit [Ping timeout: 244 seconds]
<havenwood>
shaileshg: make sure to update debugger to the latest version
<Mon_Ouie>
If you need to evaluate code in the same Ruby VM as your main code, that's a much more difficult problem
hermanmunster has quit [Read error: Connection reset by peer]
parduse has quit [Ping timeout: 252 seconds]
<iIlL10Oo_>
Mon_Ouie: but why ruby 1.8 can do chat ?
hermanmunster has joined #ruby
<iIlL10Oo_>
that
mikepack has joined #ruby
timonv has joined #ruby
parduse has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
Boohbah has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mengu has joined #ruby
x77686d has quit [Quit: x77686d]
<Mon_Ouie>
It can't do it quite safely either. They're removing those features, as said in the link, because if you use them, you get a false sense of security
hermanmunster has quit [Remote host closed the connection]
<bnagy>
<3
<bnagy>
die SAFE die
mikepack has quit [Ping timeout: 240 seconds]
<Nilium>
Do people actually use that?
amritanshu_RnD has joined #ruby
closures999 has quit []
Es0teric has quit [Quit: Computer has gone to sleep.]
amritanshu_RnD is now known as Guest77723
<bnagy>
However, safe level 4 is considered harmful, because it provides a pseudo sandbox, which is vulnerable by design.
<bnagy>
(from the bugrep)
marcdel has joined #ruby
recurrence has joined #ruby
<Nilium>
I think I used to taint some stuff in my gems but removed that code 'cause it was useless.
Celm has joined #ruby
<bnagy>
yep
<bnagy>
that's a good bugrep, tbh
<bnagy>
headius and charliesome comments are all gold
<charliesome>
bnagy: which bug is this?
<bnagy>
AUGH it lives
<bnagy>
charliesome: removal of $SAFE=4
<charliesome>
oh
<charliesome>
$SAFE should go completely imo
<bnagy>
I agree
<bnagy>
hey have you OSS'd your eval-in sandbox?
<centrx>
"It's OK for me to leave $SAFE < 3 because it's just a fail-safe feature. However, safe level 4 is considered harmful, because it provides a pseudo sandbox, which is vulnerable by design. People tend to expect it as a real sandbox, but it really isn't."
funburn has quit [Quit: funburn]
<bnagy>
I keep looking on your GH every time someone wanders in and says "HOW DO I HAZ RUBBY SANDBOX" and it's never there
Avahey has quit [Quit: Connection closed for inactivity]
<charliesome>
nah it's not oss
fgo has joined #ruby
<bnagy>
cause it sucks or cause you want to sell it?
<Nilium>
'Cause it's actually run by humans
<charliesome>
i'm a little bit afraid of what people might find if it's open lol
<Nilium>
He's got about 300 people doing everything manually.
<iIlL10Oo_>
I see , thank you
WormDrink has joined #ruby
WormDrink has quit [Changing host]
WormDrink has joined #ruby
<Nilium>
The experiment where half the workforce was replaced by literal guinea pigs was promising, though
<bnagy>
charliesome: but Many Eyes Make Secure Software!
<charliesome>
heh
circuit has quit [Quit: leaving]
<charliesome>
and whiteboxing is also significantly easier than blackboxing ;)
<bnagy>
well
<bnagy>
better, yeah
lxsameer_ has joined #ruby
<bnagy>
never, IME, easier
toastynerd has quit [Remote host closed the connection]
toastynerd has joined #ruby
<bnagy>
based on 20 years in security :<
sameerynho has quit [Ping timeout: 265 seconds]
<charliesome>
do you disagree that it's easier to exploit a vulnerable system if you have the source?
jamto11 has joined #ruby
<apeiros>
I wish I did
<apeiros>
(disagree)
armyriad has quit [Ping timeout: 240 seconds]
<bnagy>
charliesome: yeah, probably
<bnagy>
it's pretty much the same
<bnagy>
source / binary
<bnagy>
not having any access at all, yes. More dofficult. :)
<bnagy>
*difficult
<charliesome>
that's what i mean in the context of eval.in
<bnagy>
the FireEye Gambit
<charliesome>
having the source would make it easier to break compared to it just being a remote service
armyriad has joined #ruby
<charliesome>
brb
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Macaveli has joined #ruby
* apeiros
off
apeiros has quit [Remote host closed the connection]
nari has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
mary5030 has quit [Remote host closed the connection]
iliketurtles has joined #ruby
slowcon has joined #ruby
<bnagy>
charliesome: I mean yes, sure. I am not any kind of OSS evangelist, although I do release stuff that's not ( or no longer ) sensitive
jamto11 has quit [Ping timeout: 252 seconds]
<bnagy>
but if you are inclined to release the the downside is risk of eval.in getting popped ( no idea what damage that would cause ) upside is whatever. Might get some fixes. Might make some people happy.
Celm has quit [Remote host closed the connection]
<agent_white>
Ok fuck learning C. Ima write this bitch in Ruby.
<agent_white>
Rather I'll save C for later. ;D
<bnagy>
an IRC client?
toastynerd has quit [Remote host closed the connection]
<Nilium>
Ruby: write it in Ruby first, then write it in C later because it's slow.
ValicekB has quit [Ping timeout: 264 seconds]
<agent_white>
bnagy: I think so... I was told that I maybe should do a http server/proxy instead?
apeiros has quit [Ping timeout: 240 seconds]
<bnagy>
well an IRC client is a great use of ruby
<bnagy>
cause it can pretty much never be perf constrained
<bnagy>
http server.. not so much
ukd1 has quit [Remote host closed the connection]
xerox357 has joined #ruby
ctp has joined #ruby
<agent_white>
bnagy: Well think of it in that it's not under any "CAN YOU SCALE TO TWITTER?!?". Just more of, can you handle a single request? :P
Kricir has quit [Remote host closed the connection]
<bnagy>
that's where it starts
<agent_white>
In _that_ sense, which would be best?
<agent_white>
bnagy: Well in that it's a personal project.
ITDev2__ has joined #ruby
xerox357 has quit [Remote host closed the connection]
<bnagy>
security-wise, anything in a memory safe HLL is 'better'
xerox357_ has joined #ruby
ikaros has joined #ruby
<bnagy>
also writing a webserver from 0 in C would probably make me claw my eyes out
sameerynho has joined #ruby
<Nilium>
I would not want to write a web server in C.
craigp has quit [Remote host closed the connection]
<shaileshg>
havenwood: on running sudo bundle update, it is saying `Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0`; however, on ruby -v, its output is `ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]`
<shaileshg>
i guess its because of ruby-install and ruby-build
<agent_white>
bnagy: Ohhhhh I'm holding off on the C portion of it all... this will be in Ruby. Then if I can get it working nicely, I'll look into learning C and then moving on to re-writing in C :P
<shaileshg>
so, i want to uninstall ruby-build
poguez has joined #ruby
craigp has joined #ruby
<havenwood>
shaileshg: make sure on ruby-2.1.1 you've run: gem install bundler
<shaileshg>
but can't do it as i had uninstalled rbenv earlier
<bnagy>
shaileshg: your sudo stuff is probably using different paths to your user stuff
<bnagy>
you probably want to arrange so that you never have to sudo anything
ndrei has joined #ruby
<bnagy>
(ruby related)
<shaileshg>
but i have remains of previous version under cd ~/.gem/ruby/
<shaileshg>
namely, 1.8 and 2.0.0
yarou has quit [Remote host closed the connection]
lxsameer_ has quit [Ping timeout: 244 seconds]
<shaileshg>
bnagy: i know.. but when i had configured it to work w/o sudo, it used to give me some weird warning.. about path
ITDev2_ has quit [Ping timeout: 264 seconds]
CaptainJet has quit []
ctp has quit [Ping timeout: 265 seconds]
Nyyx has quit [Ping timeout: 240 seconds]
<bnagy>
did you run weird --no ?
x1337807x has joined #ruby
iIlL10Oo_ is now known as wiiw
thomas_d has joined #ruby
<shaileshg>
havenwood: hmm. are remnants under ~/.gem/ruby of concern?
<havenwood>
shaileshg: nope
yeticry has quit [Ping timeout: 264 seconds]
cdime has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
<havenwood>
shaileshg: if you ever want to freshen up your gems: gem pristine --all --env-shebang
<shaileshg>
havenwood: hmm.. its working
<havenwood>
shaileshg: good ;)
lxsameer_ has joined #ruby
<shaileshg>
so, its installing gems all over again after running gem install bundler
Es0teric has joined #ruby
ValicekB has joined #ruby
hiyosi has joined #ruby
<havenwood>
shaileshg: read the bottom of `gem help pristine` for a synopsis
<shaileshg>
havenwood: hmm.
Nyyx has joined #ruby
sameerynho has quit [Ping timeout: 265 seconds]
bal has joined #ruby
jbueza has joined #ruby
thomasxie has left #ruby [#ruby]
vpretzel has quit [Ping timeout: 265 seconds]
<havenwood>
shaileshg: so your `ruby -v` is 2.1.1 and `gem -v` is 2.2.2? and `bundle` is working?
<shaileshg>
havenwood: Oh. I see. Installation dir is ~/.gem/ruby and executable dir is ~/.rubies/ruby-2.1.0/bin/ruby
<shaileshg>
havenwood: yes! :)
<shaileshg>
all true
<havenwood>
shaileshg: \o/
<shaileshg>
\m/
hiyosi has quit [Ping timeout: 240 seconds]
yeticry has joined #ruby
xerox357_ has quit [Remote host closed the connection]
cs02rm0 has joined #ruby
xerox357 has joined #ruby
mengu has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
lxsameer_ has quit [Ping timeout: 240 seconds]
slowcon has quit [Quit: slowcon]
mary5030 has joined #ruby
cs02rm0 has quit [Ping timeout: 240 seconds]
lsmola has joined #ruby
amclain has quit [Quit: Leaving]
xerox357 has quit [Ping timeout: 265 seconds]
<agent_white>
┌(・。・)┘
jcs222 has joined #ruby
<agent_white>
mt... Fuck I need window highlights in irssi.
mary5030 has quit [Remote host closed the connection]
carraroj has quit [Ping timeout: 240 seconds]
mjs2600 has joined #ruby
browndawg has joined #ruby
dawkirst has joined #ruby
jph98 has joined #ruby
mlpinit has quit [Remote host closed the connection]
mlpinit has joined #ruby
yubrew has joined #ruby
<blahblah>
pidgin got irc support @agent_white
terence has joined #ruby
<agent_white>
blahblah: Wait wat?
mlpinit has quit [Remote host closed the connection]
<blahblah>
pidgin
<agent_white>
blahblah: I'm not looking to download an IRC client, I'm looking to write one ;)
<blahblah>
oh
psyprus has quit [Ping timeout: 265 seconds]
<blahblah>
thts cool too
<blahblah>
ruby?
<agent_white>
Aye! I use irssi otherwise, though. :P
<agent_white>
blahblah: Yup!
<blahblah>
github repo?
<terence>
hi guys! I have a method defined in C and called in Ruby, but Ruby says it's undefined, I'm using rb_define_singleton_method(), not using ffi.
atmosx has quit [Remote host closed the connection]
<agent_white>
blahblah: Haven't created one yet. I've written some code but more to figure out what the hell I'm doing. Soon, though :P
mjs2600 has quit [Ping timeout: 244 seconds]
mlpinit has joined #ruby
vlad_starkov has joined #ruby
mlpinit has quit [Remote host closed the connection]
yubrew has quit [Ping timeout: 240 seconds]
marcdel has quit []
dagobah has joined #ruby
sigurding has joined #ruby
carraroj has joined #ruby
lxsameer has joined #ruby
psyprus has joined #ruby
yacks has quit [Quit: Leaving]
marcdel has joined #ruby
dawkirst has quit [Quit: Leaving]
dawkirst has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
rm__ has quit [Remote host closed the connection]
rm__ has joined #ruby
slowcon has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
jph98 has quit [Ping timeout: 240 seconds]
Wolland has quit []
dayepa has joined #ruby
ValicekB has quit [Ping timeout: 240 seconds]
klaut_ has joined #ruby
rm__ has quit [Ping timeout: 265 seconds]
ctp has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
zombiebit has joined #ruby
jph98 has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
Es0teric has joined #ruby
jph98 has quit [Client Quit]
Vovko has joined #ruby
kitak has quit [Remote host closed the connection]
ValicekB has joined #ruby
Vovko has quit [Remote host closed the connection]
recurrence has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kitak has joined #ruby
Vovko has joined #ruby
alex88 has joined #ruby
slowcon has quit [Quit: slowcon]
kenneth has joined #ruby
Idel has joined #ruby
oso96_2000 is now known as oso|away
Idel is now known as clodeindustrie
zeade has quit [Quit: zeade]
saarinen has joined #ruby
PSYCLOO has quit [Read error: Connection reset by peer]
sdwrage_ has quit [Quit: This computer has gone to sleep]
sdwrage has quit [Quit: This computer has gone to sleep]
andikr has joined #ruby
lxsameer has quit [Ping timeout: 265 seconds]
shashin has joined #ruby
shashin has joined #ruby
yacks has joined #ruby
yacks has quit [Max SendQ exceeded]
PSYCLOO has joined #ruby
yacks has joined #ruby
clodeindustrie has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Quit: zzzzz…..]
shashin has quit [Client Quit]
yfeldblu_ has joined #ruby
CpuID has quit [Ping timeout: 244 seconds]
<Waheedi>
mr rubies
Matriks has joined #ruby
<Waheedi>
i have been having this problem for about a year now
<Waheedi>
and didn't want to indulge in it and it seems its time to
Es0teric has quit [Quit: Computer has gone to sleep.]
jhass|off is now known as jhass
hiyosi has quit [Read error: Operation timed out]
marcdel has quit []
apeiros has joined #ruby
yubrew has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest77723 has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 240 seconds]
ndrei has quit [Ping timeout: 265 seconds]
akonny has quit [Quit: akonny]
kotakotakota has quit [Ping timeout: 264 seconds]
einarj has joined #ruby
andy__ has quit [Remote host closed the connection]
mikepack has joined #ruby
nfk has joined #ruby
vlad_starkov has joined #ruby
geopet has quit []
<terence>
hi guys! I have a method defined in C and called in Ruby, but Ruby says it's undefined, I'm using rb_define_singleton_method(), not using ffi.
rm__ has joined #ruby
tylersmith has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 264 seconds]
tylersmith has joined #ruby
joelroa has quit [Ping timeout: 252 seconds]
crandersons has joined #ruby
evenix has joined #ruby
crantron has quit [Ping timeout: 264 seconds]
mikepack has quit [Ping timeout: 240 seconds]
mlpinit has joined #ruby
kitak_ has joined #ruby
kitak has quit [Read error: Connection reset by peer]
dayepa has quit [Remote host closed the connection]
claymore has joined #ruby
soc42 has joined #ruby
tylersmith has quit [Ping timeout: 244 seconds]
bricker`1A has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
mlpinit has quit [Ping timeout: 240 seconds]
shvelo has joined #ruby
sparrovv has joined #ruby
meinside__ is now known as meinside
bricker`LA has quit [Ping timeout: 240 seconds]
Kneferilis has joined #ruby
rm__ has quit [Remote host closed the connection]
tjr9898 has quit [Ping timeout: 265 seconds]
rm__ has joined #ruby
mikecmpbll has joined #ruby
toretore has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
<terence>
hi guys! I have a method defined in C and called in Ruby, but Ruby says it's undefined, I'm using rb_define_singleton_method(), not using ffi.
havenwood has quit []
sk87 has joined #ruby
tjr9898 has joined #ruby
olivier_bK has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
rm__ has quit [Ping timeout: 240 seconds]
dblessing has joined #ruby
ndrei has joined #ruby
Kneferilis has quit [Quit: Leaving]
browndawg has left #ruby [#ruby]
kitak_ has quit [Read error: Connection reset by peer]
kitak has joined #ruby
ephemerian has joined #ruby
esposito has joined #ruby
young has quit [Read error: Connection reset by peer]
Kricir has quit [Remote host closed the connection]
bluepojo_ has joined #ruby
cjsarette has joined #ruby
Guest77723 has joined #ruby
alexherbo2 has joined #ruby
wiiw has quit [Remote host closed the connection]
evenix has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
young has joined #ruby
marcgg_ is now known as marcgg
timonv has joined #ruby
jamto11 has joined #ruby
derek_c has quit [Quit: Leaving]
snyp has joined #ruby
snyp has left #ruby [#ruby]
marcgg is now known as Nyalab
shredding has joined #ruby
saarinen has quit [Read error: Connection reset by peer]
Nyalab is now known as _
_ is now known as nick____
agent_white has quit [Quit: bbl]
nick____ is now known as marcgg
dawkirst has quit [Remote host closed the connection]
jamto11 has quit [Ping timeout: 240 seconds]
crandersons has quit [Ping timeout: 244 seconds]
mikecmpbll has joined #ruby
jlebrech has joined #ruby
robbyoconnor has joined #ruby
tesuji has joined #ruby
alexherbo2 has quit [Ping timeout: 265 seconds]
albedoa has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davidcollom is now known as davidcollom_
robbyoconnor has quit [Remote host closed the connection]
poguez has quit [Quit: Connection closed for inactivity]
m1lt0n_ has joined #ruby
robbyoconnor has joined #ruby
beardedn1nja has quit [Quit: leaving]
evenix has joined #ruby
Es0teric has joined #ruby
<terence>
hi guys! I have a method defined in C and called in Ruby, but Ruby says it's undefined, I'm using rb_define_singleton_method(), not using ffi.
TMM has joined #ruby
roolo has joined #ruby
Es0teric has quit [Remote host closed the connection]
shredding has quit [Read error: Connection reset by peer]
kukyakya has joined #ruby
j0wker has joined #ruby
dumdedum has joined #ruby
sensen has quit [Ping timeout: 240 seconds]
Faris has quit [Ping timeout: 244 seconds]
ayaz has joined #ruby
CpuID has quit [Quit: This computer has gone to sleep]
joelroa has joined #ruby
shredding has joined #ruby
relix has joined #ruby
yubrew has joined #ruby
sensen has joined #ruby
ehaliewicz has joined #ruby
<esposito>
terence: are you sure you need to define a singleton method and not a standard method?
workmad3 has joined #ruby
davy has joined #ruby
elaptics`away is now known as elaptics
brunops has joined #ruby
andrewlio has joined #ruby
alexherbo2 has joined #ruby
canton7-mac has joined #ruby
<terence>
esposito: in fact, I try both, but Ruby says undefined!
<esposito>
Probably it's my ignorance, but I never thought you can define a module under a class...
<jhass>
classes are modules ;)
lkba has quit [Ping timeout: 244 seconds]
guilleiguaran has quit [Quit: Connection closed for inactivity]
<terence>
because I want to keep the namespace consistent with the parent project SciRuby/NMatrix
<esposito>
jhass: thanks! Interesting turns of events ;-)
<terence>
or maybe use class/modules for the two instead
mlpinit has joined #ruby
<jhass>
let's take out the stupid ones first. What do you require in your tests?
_|x|_ has left #ruby ["Leaving"]
shredding has quit [Quit: shredding]
<terence>
I require 'nmatrix-gemv'
brunops has quit [Ping timeout: 264 seconds]
mjs2600 has quit [Ping timeout: 265 seconds]
YamakasY has joined #ruby
JustMozzy has joined #ruby
brunops has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
AlSquire has joined #ruby
greenarrow has quit [Quit: 500]
Azulinho has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
mlpinit has quit [Ping timeout: 244 seconds]
sk87 has joined #ruby
young has quit [Read error: Connection reset by peer]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
ndrei has joined #ruby
greenarrow has joined #ruby
<terence>
and I still require 'nmatrix' to do the initialization job
cs02rm0 has joined #ruby
phantomtiger has joined #ruby
brunops has quit [Ping timeout: 240 seconds]
lewix has quit [Quit: Leaving...]
<jhass>
hm, are you sure cNMatrix actually maps the NMatrix class in ruby land?
<terence>
Ehh...
<jhass>
try making class NMatrix; module BLAS -> module NMatrix::BLAS to see if the constant actually is already initialized
andy___ has joined #ruby
tvw has joined #ruby
andy___ is now known as Guest7572
<jhass>
(and do it in a clean session that required nothing but your gem)
khoury has joined #ruby
khoury has left #ruby [#ruby]
rdark has joined #ruby
tylersmith has joined #ruby
<terence>
it works!
<terence>
NMatrix and BLAS is defined!
<terence>
NMatrix and BLAS and map
kitak has quit [Remote host closed the connection]
Guest7572 has quit [Ping timeout: 240 seconds]
kitak has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
francisfish has joined #ruby
tylersmith has quit [Ping timeout: 265 seconds]
vlad_starkov has joined #ruby
The_NetZ has joined #ruby
achru has joined #ruby
<terence>
In fact I port the origin NMatrix to nmatrix-gemv, and delete a bunch of files!
ndrei has quit [Ping timeout: 244 seconds]
Zunonia_ has quit [Ping timeout: 240 seconds]
<The_NetZ>
hey. writing a c++ program with an embedded ruby interpreter; it compiles fine, but running it via debugger causes it to fail at "VALUE cZlib = rb_const_get(rb_cObject, rb_intern("Zlib"))"; is there some error here?
arietis has joined #ruby
<The_NetZ>
using ruby 2.1.1
Kricir has joined #ruby
ndrei has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
<olivier_bK>
how can i search a params in array and delete it ?
eval-in___ has quit [Remote host closed the connection]
eval-in has joined #ruby
<esposito>
olivier_bK: delete_if
<TMM>
Could someone tell me what happens if you run module methods in an application running under passenger? Does every passenger thread have its own copy of the module? Is it possible that there will be threads/instances that won't have the method called on their copy of the module?
<apeiros>
doesn't passenger fork?
<apeiros>
i.e., new child process
<ruisantos>
olivier_bK: depending on what you want to return, delete_if or keep_if will do the trick
vlad_starkov has joined #ruby
<TMM>
I think so but I don't know if it has magic to share that kind of global state or not
<TMM>
it does a lot of weird shit(r0
<jhass>
The_NetZ: what's the error? Is the zlib stdlib required at that point?
<olivier_bK>
i dont want to return anything i only want to delete a params
<Hanmac>
The_NetZ: you forgot to require it first
<ruisantos>
olivier_bK: then you can use either
<The_NetZ>
Hanmac: and how does one do that in C/++?
<terence>
jhass: could you figure it out the problem?
alexherbo2 has joined #ruby
<The_NetZ>
wait a minute...
<The_NetZ>
nevermind, forgot to include some stuff :P
<jhass>
terence: nope, that stuff is way too convoluted for my current c++ / ruby c ext experience. Hanmac is our CPP/C ext master here...
falood has quit [Read error: Connection reset by peer]
<olivier_bK>
i try to delete this param on my array users_external : nbr , the probleme is i have a white space before users
falood has joined #ruby
<terence>
jhass: thanks for your work!
dEPy has joined #ruby
<esposito>
Hey guys, how do I convince rdoc to document the methods in a C extension? I've tried with "Document-method" with no luck. Anything non-obvious I should know?
Speed has joined #ruby
achru has quit []
j0wker has joined #ruby
j0wker has quit [Client Quit]
<RubyPanther>
TMM: generally stuff is designed with the "share nothing" principle, so you can scale horizontally
Kricir has quit [Ping timeout: 265 seconds]
RSTJNII has quit [Remote host closed the connection]
DaniG2k has joined #ruby
<TMM>
RubyPanther, I have a per-process cache that doesn't need to be shared but I'd like to be able to invalidate it in every instance from a single endpoint
RSTJNII has joined #ruby
aaronmcadam has joined #ruby
bricker`1A has quit [Ping timeout: 252 seconds]
spider-mario has joined #ruby
<The_NetZ>
Hanmac: do you remember me? I'm under another nick due to a certain irc server thinking my main, ntzrmtthihu777, is a bot XD
aaronmcada has joined #ruby
<Hanmac>
yeah ;D
karupanerura is now known as zz_karupanerura
<terence>
Hanmac: Hi, I have a method defined in C and called in Ruby, after compiling(no errors), I build and install the gem, I run the test but Ruby says method undefined, I'm using rb_define_method() and not ffi, could you help me?
<Hanmac>
terence: show me your code in a gist or a repo
<olivier_bK>
since one hours i try with a.delete_if {|f| f == "/\s+/users_external/"}
<olivier_bK>
jhass, thanks !!
<jhass>
olivier_bK: match regexps with .match or ~=, what you did was comparing the regexp object to the string objects in your array
eval-in has quit [Remote host closed the connection]
eval-in has joined #ruby
<Hanmac>
terence: hm i can find it from only looking ... you need to check if both Init_nmatrix_gemv & nm_math_init_blas functions are called
<RubyPanther>
TMM: you could also use a drb process to keep the cache
<jhass>
olivier_bK: oh actually that isn't even a regexp object, it's a simple string
yubrew has quit [Ping timeout: 265 seconds]
young has joined #ruby
JBreit has quit [Ping timeout: 240 seconds]
<LiohAu>
what's the syntax to use a method that takes a block as parameter like this one : "def each_object_list_item(&block) end"
mikepack has joined #ruby
Kneferilis has joined #ruby
<jhass>
LiohAu: each_object_list_item { my block } or each_object_list_item do my block end
<TMM>
RubyPanther, that's interesting I'll look into it, although it's probably a bit overkill. The caches really don't need to be invalidated very often we're likely talking maybe like once a month, once a week at the very most
<LiohAu>
jhass: and how do I get the parameter ?
young_ has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
alexju has quit [Remote host closed the connection]
<LiohAu>
each_object_list_item | each_item | { my block } ?
<jhass>
LiohAu: what do you mean? the parameter passed to the block or how do you call the block if it's captured that way?
<jhass>
LiohAu: so the first. each_object_list_item {|item| item.bla } or each_object_list_item do |item| item.bla end
<jhass>
no, each_object_list_item(something) {|item| item.bla } or each_object_list_item(something) do |item| item.bla end. Note how I passed an parameter because we do not add (you can but nobody does) them if there are none
young has quit [Ping timeout: 244 seconds]
<terence>
Hanmac: As my class NMatrix and module BLAS is defined in Init_nmatrix_gemv and nm_math_init_blas respectively, and there's no error while I run : NMatrix::BLAS
<gr33n7007h>
Is this right? def y_test; yield "Yield Sting"; end; y_test {|y| puts "A #{y}" } Whats after the yield is in the block `y` variable?
<jhass>
LiohAu: yes, and if you try to run it ruby should tell you that
nomenkun has quit [Client Quit]
joelroa has quit [Ping timeout: 244 seconds]
<LiohAu>
it's like if the "block" parameter of the "each_object_list_item" method was not considered as a parameter
<LiohAu>
weird
Mongey has joined #ruby
ringaroses has joined #ruby
mengu has quit [Remote host closed the connection]
plexus has joined #ruby
boboc has joined #ruby
<terence>
Hanmac: right!
fgo has quit [Remote host closed the connection]
<jhass>
LiohAu: it's because a block is syntactical construct in ruby. The normal way to call it is doing def each_object_list_item; items.each do |item| yield item end end. yield here calls the block. doing def foo(&somevariable) converts the block into a Proc object and assigns it to somevariable. We call that capturing the block
<terence>
Ruby says cblas_gemv is undefined, NoMethodError
Matriks has quit [Remote host closed the connection]
Mongey has quit [Ping timeout: 264 seconds]
mlpinit has joined #ruby
sski has joined #ruby
young has joined #ruby
dawkirst has joined #ruby
Kricir has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
<esposito>
I have a problem in documenting a C++ extension. The problem is: C++ requires a cast in front of the fun names in the rb_define_method call. rdoc does not recognise the fun name due to the cast and then it does not document the method. Anybody has any idea how to do it properly?
armyriad has quit [Ping timeout: 240 seconds]
nomenkun has joined #ruby
<esposito>
and btw, anybody can confirm that it is indeed normal for the c++ compiler to require the above mentioned cast?
<esposito>
an example is: rb_define_method(PriorityQueue, "push", (VALUE(*)(ANYARGS)) pq_push, 2);
blackmesa has joined #ruby
<esposito>
if I omit the cast (VALUE(*)(ANYARGS)) the c++ compiler complains with a fatal error (no problem if the file is pure C).
<Hanmac>
esposito: use RUBY_METHOD_FUNC macro
dEPy has quit [Quit: Computer has gone to sleep.]
davy has joined #ruby
<The_NetZ>
Hanmac: hey, question. rb_file_open; where can I find the proper args for that?
Slavox|AFK is now known as Slavox
<esposito>
Hanmac: Thanks! I've lost so many time in trying to figure this out... Could not find any doc anywhere. You have any pointer to good docs about making extensions?
mehlah has joined #ruby
ndrei has joined #ruby
yacks has quit [Ping timeout: 264 seconds]
<terence>
yes, I 'm searching the good docs too!
ehaliewicz has quit [Remote host closed the connection]
<certainty>
moin
davy has quit [Ping timeout: 240 seconds]
crus has joined #ruby
crus` has quit [Ping timeout: 265 seconds]
NovapaX has joined #ruby
falood has quit [Remote host closed the connection]
shevy has joined #ruby
tvw has quit []
falood has joined #ruby
maroloccio has joined #ruby
falood has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
<Hanmac>
esposito: ruby source README.EXT
<Hanmac>
The_NetZ do you mean from Ruby or from C side?
<Hanmac>
oh you mean rb_file_open(const char*, const char*); right?
<jxport>
def issue(day = (Date.today - 1).to_s)
dANOKELOFF has joined #ruby
<Hanmac>
The_NetZ: its (path, mode)
Asher has quit [Read error: Connection reset by peer]
<jxport>
I have a default parameter value here. day defaults to yesterday -- but it's not clear that it means 'yesterday'
<esposito>
Hanmac: thanks, but I did know it and, while it is a valuable resource, it lacks much details. For instance it does not mention RUBY_METHOD_FUN at all. :(
Asher has joined #ruby
<The_NetZ>
Hanmac: either or; I'm currently failing at VALUE file = rb_file_open(Config::ScriptsPath.c_str(), "rb");
<jxport>
what is the best way to communicate this? there seems to be a loss of information when you set the "generic default" to an otherwise unnamed "specific default"
yasushi has joined #ruby
<jxport>
def issue(day = yesterday = (Date.today - 1).to_s) # does anybody do this?
calleerlandsson has joined #ruby
<shevy>
not really
dEPy has joined #ruby
<shevy>
usually you only need one assigned variable
<jxport>
shevy: I thought not - but the information loss is clear
<shevy>
and if you really, for any reason, need two, you could do so in the method body
<Hanmac>
The_NetZ: i think the problem could be the current path ... try to make the path absolute from where you want it
<shevy>
what information loss exactly? you can do the same in the method body
<Hanmac>
jxport: i only wonder why you need .to_s ... :/
<terence>
Hanmac: and Ruby says cblas_gemv is undefined!
<jxport>
Hanmac: because I won't be passing Date objects on the command line
<jxport>
The input from which, Thor will be relaying straight to issue()
<Hanmac>
terence: yeah sorry i didnt find out why yet :(
<The_NetZ>
Hanmac: inconvinient; if I have a binary at "binary/here", I'd like to be able to specify a path relative to that, as "binary/input/file/here"
<shevy>
Hanmac how are rwx bindings coming along? :)
<jxport>
shevy: setting genericParameter to specificDefault, when 'specificDefault' isn't actually named - loses the information of what that specific default actually means
<Hanmac>
shevy: i am currently in a "holiday" that means i have something todo, but no idea where to start and currently i dont wana do something ;P (is currenly very lazy)
razibog has joined #ruby
<shevy>
jxport what information do you mean here, the name of a variable?
<shevy>
def issue(a = b = (Date.today - 1).to_s)
<terence>
it doesn't matter. it bothers me half a month!
<jhass>
jxport: I think your issue is that you named your variable after your default instead after what is about, like since or until
mengu has joined #ruby
<shevy>
Hanmac get out of holiday already!
<shevy>
Hanmac there is documentation wanted to be written
pangur has joined #ruby
<shevy>
and examples
<Hanmac>
i also whated to write some kind of fanfiction ... i still didnt begin with that ;P
<Hanmac>
and rwx as some kind of examples ... only they are not finished yet
jamto11 has joined #ruby
<jxport>
jhass: you're definitely addressing it in similar terms to what I'm thinking but it's not quite the same thing - I'm naming the variable after what it's about, the particular "day" that is getting issue()d
<jxport>
jhass: so what I'm in fact losing is the name of what the default value actually means
<shevy>
ok so the name of the variable
<shevy>
jxport you could switch to use a method or a class, and in that class store the default name if you really want to
<shevy>
I mean as default parameter
<jxport>
That seems far worse than localising that potential default value to the method itself
<jhass>
jxport: describe a bit more what your method does and how the parameter affects its behavior
<jxport>
def issue(day = yesterday = Date.today - 1) # This seems to lose no information at all, constraining the potential default to only the relevant method's scope
pfg has joined #ruby
<Hanmac>
jxport: i meaned that the to_s should be done in the code of the methods and not in the default parameters
<olivier_bK>
how to send data in array before the last line ?
<shevy>
olivier_bK send data? you mean insert something?
<krz>
how do i turn %w[per_quarter per_year per_campaign] to ['Plan::PerQuarter', 'Plan::PerYear', 'Plan::PerCampaign']
<jhass>
krz: internally does another map and depends on activesupport
_5kg has quit [Ping timeout: 240 seconds]
<shevy>
let's get matz to add camelize
fgo has joined #ruby
<pangur>
I have a bunch of streets in the form of "PAISLEY ROAD WEST" and I want to turn it into "Paisley Road West". I can do street.downcase.capitalize but, of course, that only makes the first word capitalized. When I tried street.map!(&:capitalize), I got an error: " undefined method `map!'" What else do I need to do, please?
<shevy>
and cameolize
<shevy>
pangur you could turn it into an array first, then apply map, then rejoin
<Hanmac>
hm it seems that the 6th echo is broken ;P
<shevy>
the bot is weird sometimes
<shevy>
I mean, not only that he sometimes refuses to do anything, he also returns strange things... I forgot what I did like 2 days ago, but he did not return the same as IRB or plain ruby did
yfeldblu_ has quit [Remote host closed the connection]
<matti>
shevy: ;]
dEPy has quit [Client Quit]
AlSquire has quit [Ping timeout: 269 seconds]
craigp_ has joined #ruby
craigp has quit [Ping timeout: 240 seconds]
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kitak has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
swks has joined #ruby
tedstriker has joined #ruby
sigurding has quit [Quit: sigurding]
hiyosi has joined #ruby
fgo has quit [Remote host closed the connection]
skaflem has joined #ruby
klaut_ has quit [Remote host closed the connection]
CpuID has joined #ruby
Mongey has joined #ruby
jackneill has joined #ruby
mostlybadfly has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
aaronmcadam has quit [Remote host closed the connection]
aaronmcadam has joined #ruby
ukoki000 has joined #ruby
young has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
yubrew has quit [Ping timeout: 269 seconds]
young has joined #ruby
Beoran_ has joined #ruby
mikepack has joined #ruby
danshultz has joined #ruby
skkeeper has joined #ruby
Slavox is now known as Slavox|AFK
sparrovv_ has quit [Remote host closed the connection]
Hanmac1 is now known as Hanmac
<chridal>
Is there any way of keeping a ruby script running, and monitoring the directory for changes to re-run? Tried googling, but only found MiniTest suite
boboc has joined #ruby
Kneferilis has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 264 seconds]
<apeiros>
charliesome: nice php issue you've got there :)
<shevy>
Hanmac I may consider switching to ruby 2.x soon, which will have to also include a switch away from my editor
<charliesome>
apeiros: already found a bunch of vulns in popular software
maroloccio has quit [Ping timeout: 265 seconds]
<apeiros>
charliesome: static analyzer?
<esposito>
is there any standard place to put "performance tests" in a ruby project? It seems that the 'test' dir is not the right place to me.
akonny has quit [Quit: akonny]
<workmad3>
esposito: the closest to a 'standard' would be test/performance
<charliesome>
apeiros: nah just manual spelunking
hiyosi has joined #ruby
elaptics is now known as elaptics`away
<esposito>
workmad3: thanks!
<apeiros>
charliesome: oy
<apeiros>
sounds tiresome
<workmad3>
esposito: but that's just a convention... you could put them in e.g. performance_tests if you wanted
claymore has quit [Ping timeout: 240 seconds]
<esposito>
workmad3: yes, I know, but I would exactly searching for the convention followed by the community
bricker`LA has joined #ruby
<esposito>
s/would/was/
<apeiros>
+1 for test/performance
claymore has joined #ruby
* apeiros
puts his unit tests into test/unit
Megtastique has joined #ruby
elaptics`away is now known as elaptics
<workmad3>
esposito: yeah, I'd go for test/performance unless I had a reason not to (e.g. I wanted to never pick up performance tests when doing something equivalent to rspec spec)
browndawg has quit [Ping timeout: 252 seconds]
maroloccio has joined #ruby
rm__ has quit [Remote host closed the connection]
<esposito>
workmad3: ok! It seems reasonable to me, and if I'm not mistaken I can start the file name with perf_ so that it is not picked up by test libs.
shredding has quit [Quit: shredding]
rm__ has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
<workmad3>
esposito: I wouldn't do that unless there was a good reason for it, but yeah :)
himsin has quit [Quit: himsin]
<esposito>
workmad3: then how would you call the file? test_something?
hiyosi has quit [Ping timeout: 240 seconds]
<workmad3>
esposito: test_foo_bar_performance.rb
<esposito>
ok
<esposito>
thanks again
<workmad3>
esposito: that's just me considering my own preferences though
<certainty>
my fubar performance is generally pretty good
<apeiros>
if it's in test/performance, any prefix or suffix is redundant IMO
bricker`LA has quit [Ping timeout: 244 seconds]
<The_NetZ>
workmad3: kk
<workmad3>
apeiros: true
<apeiros>
one advantage of suffix/prefix naming - it's easier to distinguish your tabs in the editor…
julian` has joined #ruby
griffindy has joined #ruby
cjsarette has joined #ruby
<workmad3>
apeiros: I quite like minibuf explorer in vim for that... if I have two files with the same name, it'll put enough of the file-path in front to distinguish them :)
<julian`>
anyone familiar with the httpclient gem here?
<apeiros>
workmad3: sublime tries that too
<apeiros>
workmad3: but that quickly exhausts available space
kukyakya has quit [Remote host closed the connection]
shaileshg has quit [Quit: Connection closed for inactivity]
<workmad3>
apeiros: can do... don't notice it too often, but mostly it happens with views in rails tbh, and then only one extra level is normally enough
<apeiros>
workmad3: I just wondered whether it'd be possible to add a sublime plugin which intelligently adds {lib|unit|perf|doc|model|service|…etc} in front of the filename
tkuchiki_ has joined #ruby
sigurding has joined #ruby
rm__ has quit [Ping timeout: 264 seconds]
Faris has joined #ruby
<workmad3>
apeiros: you could possibly do it less intelligently but in 'reverse', so it does 'lib/.../file', 'test/.../file', etc.
<workmad3>
apeiros: so it distinguishes from the project root rather than from the next level up...
<apeiros>
workmad3: hm, generic algorithm is actually possible
<apeiros>
replace common directories with …
ValicekB has quit [Ping timeout: 244 seconds]
<apeiros>
and display first differing
JasmeetQA has quit [Quit: Leaving.]
<workmad3>
apeiros: display first differing then display ... again until file?
tkuchiki has quit [Ping timeout: 240 seconds]
socek has left #ruby [#ruby]
<workmad3>
could work
<apeiros>
yes
<workmad3>
apeiros: I'd be almost tempted to suggest it completely removes common dirs from the start up to first difference, then ... for the rest
<apeiros>
fun, seems to actually be what sublime3 does
davedev24 has joined #ruby
<workmad3>
apeiros: that way, you'd remove 'test' from test/unit/foo.rb test/performance/foo.rb, leaving just unit/ and performance/
kukyakya has joined #ruby
<apeiros>
workmad3: to speak of the same thing, my suggestion is that /foo/project/lib/x/y/bar.rb and /foo/project/test/unit/x/y/bar.rb ---> becomes --> lib/…/bar.rb and test/…/bar.rb
cjsarette has quit [Ping timeout: 245 seconds]
tkuchiki_ has quit [Ping timeout: 265 seconds]
<apeiros>
and it doesn't even need to know that /foo/project is the root
simono has joined #ruby
<apeiros>
oh, actually
<apeiros>
yeah
<apeiros>
lib/…/bar.rb and unit/…/bar.rb
<apeiros>
you're correct
kukyakya has quit [Remote host closed the connection]
<workmad3>
apeiros: that still completely removes the common prefix rather than eliding it ;)
<apeiros>
hm, question is how it does with N files of the same name :)
mlpinit has joined #ruby
Mon_Ouie has joined #ruby
joelroa has joined #ruby
kukyakya has joined #ruby
cjsarette has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<certainty>
you seem to be pretty concerned about that :)
<apeiros>
I'm not concerned by it. but it's something which frequently bugs me
browndawg has joined #ruby
<workmad3>
apeiros: hmm... I can envisage how the algorithm for that should work, but I can't quite get it out in decent english :)
JasmeetQA has joined #ruby
<The_NetZ>
workmad3: oh, solved my issue. problem is I screwed up formatting the json file, forgot a colon between keys and values
<workmad3>
The_NetZ: ah :D
cjsarette has quit [Excess Flood]
mlpinit has quit [Ping timeout: 240 seconds]
cjsarette has joined #ruby
terence has quit [Ping timeout: 245 seconds]
sparrovv has joined #ruby
joelroa has quit [Ping timeout: 265 seconds]
<certainty>
emacs has uniquify for this. It basically does what you suggested
ctp has quit [Quit: Leaving...]
ValicekB has joined #ruby
<apeiros>
that's certaintified?
ndrei has quit [Ping timeout: 240 seconds]
IceDragon has joined #ruby
davy has joined #ruby
<certainty>
almost, it does not the ?-stuff i think
boboc has quit []
<The_NetZ>
workmad3: but, I may use it to cut down on external libs, if I'm including ruby already.
cjsarette has quit [Ping timeout: 245 seconds]
<apeiros>
certainty: ?-stuff?
<apeiros>
don't tell me you see … as ?
young has joined #ruby
cjsarette has joined #ruby
<certainty>
apeiros: i do
<apeiros>
go, join shevy in the corner of shame
_5kg has joined #ruby
<shevy>
this is the corner of power here
<certainty>
i assume that was the unicode elipsis?
<apeiros>
you assume correctly
<The_NetZ>
apeiros: if you mean you meant ...-stuff... then yes, I saw ?-stuff? instead
<certainty>
haha
<certainty>
apeiros: i'm afraid over here. shevy gives me shivers :)
<shevy>
actually
<shevy>
the only faulty character in the last 30 lines came from apeiros
<apeiros>
The_NetZ: I wrote "?-stuff?"
jmeeuwen has quit [Ping timeout: 240 seconds]
bluehavana_ has joined #ruby
davy has quit [Ping timeout: 265 seconds]
mlpinit has joined #ruby
sparrovv has quit [Remote host closed the connection]
Kricir has joined #ruby
jmeeuwen has joined #ruby
mlpinit has quit [Remote host closed the connection]
koell has joined #ruby
rahult is now known as rahult_
rahult_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<certainty>
shevy: why are you here? I mean in the corner of shame
sparrovv has joined #ruby
<shevy>
certainty the corner of power is the one where we can idle to the best level
Advocation has joined #ruby
<apeiros>
it's the unicode-fail corner of shame
<shevy>
on the other hand is the unicode nazi corner over there
<certainty>
shevy: i see
<The_NetZ>
god in heaven why does this hate me =_=
dANOKELOFF has joined #ruby
<apeiros>
nazis wouldn't have needed unicode. they'd have forced everybody to learn german.
<shevy>
certainty there is the happiness corner with LadyRainicorn too
Kricir has quit [Ping timeout: 252 seconds]
<certainty>
i have no control over the shell account i have this screen session running :p
<shevy>
apeiros but I have to use unicode for proper usage of yaml :(
<apeiros>
shevy: maybe one day you'll see the light :-p
tkuchiki has joined #ruby
<shevy>
I think json mandates unicode as well, there are not many other options
jrhe has joined #ruby
<apeiros>
shevy: you're probably giving yourself a harder time than necessary by trying not to use unicode as much as possible instead of just going with it
<apeiros>
yes, json requires unicode.
<certainty>
shevy: i see. I don't believe in happines. I think it's a trick of sadness so that it feels even worse.
ndrei has joined #ruby
Speed has quit [Ping timeout: 244 seconds]
yubrew has joined #ruby
<The_NetZ>
someone care to give an example of how to file = File.open("some.file"); results = Marshal.load(file) in c/++ ?
<shevy>
certainty I think HAL 9000 in "A Space Odyssey" was a happy program
<The_NetZ>
I seem to be having extreme difficulty here =_=
<shevy>
in C++??
<workmad3>
shevy: I suspect HAL was... insane, but happy
<workmad3>
odd how those things go together at times, isn't it?
ringaroses has quit [Quit: Leaving]
himsin has joined #ruby
<certainty>
workmad3: make total sense to me
<certainty>
makes
<workmad3>
certainty: true... I guess if your mind is going to break, it may as well flood itself with endorphins while doing so...
<lilltiger>
killing people is always fun
<shevy>
The_NetZ well there is marshal.c file
<certainty>
it certainly doesn't most of the time, but hey we're in a happy centuary where happyness comes in the form of pills :D
<lilltiger>
The_NetZ: if you want ot be able to store objects in files in c++ take a look at boost::serialize
<certainty>
killing is killing whether done for duty, profit or fun. (Richard "The Night Stalker" Ramirez)
danshultz has quit []
yubrew has quit [Ping timeout: 265 seconds]
tvw has joined #ruby
<The_NetZ>
shevy: yes, in c++, and thank you
simono has quit [Read error: Connection reset by peer]
<The_NetZ>
lilltiger: they need to be accessible from rubyland
<certainty>
workmad3: hah!
<lilltiger>
ahh
<workmad3>
banister: just winding down for lunch :)
jamto11 has joined #ruby
<The_NetZ>
shevy: and marshall.c is from the ruby source code, then?
alex88 has quit [Quit: Leaving...]
<The_NetZ>
shevy: because, I'm currently in the process of git cloning it.
duggiefresh has joined #ruby
<workmad3>
certainty: I like Jonathan Coulton... I especially like his site's music store... 'Already stole it? No problem, but if you want to donate, just use the paypal button'
<banister>
workmad3 do u have much experience with SOA in rails
<banister>
workmad3 or ruby in general
phutch1ns has quit [Quit: leaving]
<shevy>
The_NetZ yeah, I guess it handles all of the internals of the Marshall module
<shevy>
The_NetZ somewhere it loads up stuff into the ruby dataset
<workmad3>
banister: a bit... it'll depend a bit on what exactly you're asking about ;)
<workmad3>
banister: SOA is a rather large topic after all...
<shevy>
The_NetZ Data_Wrap_Struct is ruby's way to somehow populate data into ruby objects
jamto11 has quit [Ping timeout: 240 seconds]
<banister>
workmad3 say you wanted to offer up some of your models as a service, how would you do it? ActiveResource or sth else?
<shevy>
void Init_marshal(void)
<shevy>
The_NetZ and all Init_* functions should be automagically called
Xuerian_ has joined #ruby
yasushi has joined #ruby
<workmad3>
banister: hmm... I'd probably use something similar to the stuff provided by rails-api and use active-model-serializers
Xuerian_ is now known as Xuerian
<The_NetZ>
hrm...
<The_NetZ>
shevy: ok, one sec...
<workmad3>
banister: i.e. I'd probably roll it mostly by hand... ActiveResource tends to end up in the same situation as a lot of SOAP-esque services whereby the stuff becomes a right PITA to get working if you use it outside of ActiveResource
<banister>
workmad3 do u know of any gems that improve on the activeresource situation bbg
kukyakya has quit [Remote host closed the connection]
bthesorceror has joined #ruby
<workmad3>
banister: as I said, I'd personally use rails-api for the controllers (or hand-roll my API base class) and active-model-serializers to generate json output in a reasonable manner
<workmad3>
banister: and then I'd probably write a client gem that can load client-side models from the AM JSON
anekos has joined #ruby
mahlon_ has joined #ruby
tobiasvl has quit [Remote host closed the connection]
<banister>
workmad3 ya it was more your "roll it mostly by hand" part, i wondered if there was something out there that already did what you'd likely be writing by hand, but i guess it depends on your app..
tjr9898_ has joined #ruby
tjr9898 has quit [Ping timeout: 265 seconds]
<workmad3>
banister: yeah... and how homogenous your service languages are :)
bthesorceror has quit [Remote host closed the connection]
<workmad3>
banister: there might be something out there than can load AM-serializer json into ruby objects automatically, for example
tvl has joined #ruby
infoget has quit [Ping timeout: 264 seconds]
<workmad3>
but mostly when I've dealt with it, I've needed to load the JSON up with javascript
bthesorceror has joined #ruby
bthesorceror has quit [Remote host closed the connection]
tvl is now known as tobiasvl
JasmeetQA has quit [Ping timeout: 240 seconds]
tobiasvl has quit [Remote host closed the connection]
kukyakya has joined #ruby
itadder has joined #ruby
tvl has joined #ruby
tvl is now known as tobiasvl
<workmad3>
banister: you could also reconsider whether you want your services talking over HTTP or if you're going to connect them together with e.g. ZeroMQ or some other messaging system(s)
leonardoro has joined #ruby
<certainty>
also my client downcases all input, which is why PITA is the same as pita for me. An endless source of confusion
<banister>
workmad3 very cool
Advocation has quit [Quit: Advocation]
craigp has quit [Remote host closed the connection]
<workmad3>
banister: and if you have a lot of HTTP services that you need to pull together in a single front-end service, you should definitely consider using something like Typhoeus (probably as the backend in Faraday) as it has some decent abilities to paralize HTTP requests
<certainty>
having a service bus of any kind instead of having the components to know each other can be a great benifit
Advocation has joined #ruby
kaliya has joined #ruby
<workmad3>
banister: of course, if you're going really large-scale distributed architecture with message buses, I'd be tempted to suggest that you crack open JRuby and consider Apache Camel to wire your services together :)
zeeraw has joined #ruby
<workmad3>
that's overkill in a lot of situations though :)
<certainty>
of course you then have to take special care of the stable parts of the system
<banister>
workmad3 thanks guy, interesting stuff
infoget has joined #ruby
<workmad3>
banister: most of the stuff I've dealt with directly, I could just get away with a quick HTTParty wrapper around an API that pulled JSON into client-side ruby objects to be used by the rest of the system btw
xcv has joined #ruby
leonardoro has quit [Remote host closed the connection]
sk87 has joined #ruby
Advocation has quit [Client Quit]
<workmad3>
banister: oh, and one system where I had a rails front-end which had an API to dump data into it, and used RabbitMQ to control back-end services (the back-end services used the update API to put data into the rails db for users to see)
<certainty>
+1 for rabbitmq in case you need a message queue
yacks has joined #ruby
<workmad3>
or any AMQP system :)
peterellisjones has joined #ruby
Aryasam has quit [Ping timeout: 240 seconds]
duggiefresh has quit [Ping timeout: 240 seconds]
<workmad3>
ok, need lunch now... hope that helps you, banister
_tpavel has joined #ruby
awkisopen has quit [Read error: Connection reset by peer]
bluehavana_ has quit [Changing host]
bluehavana_ has joined #ruby
jrhe has quit [Changing host]
jrhe has joined #ruby
<banister>
workmad3 thanks, any books on thist stuff btw?
sdouglas has joined #ruby
hiyosi has joined #ruby
<workmad3>
banister: hmm... Enterprise Integration Patterns has a lot of stuff on how to use message queues... there's also a book on SOA in rails, but it's fairly light on a lot of stuff IMO...
<banister>
workmad3 you're tlaking about the one by paul dix?
shredding has joined #ruby
philcrissman has joined #ruby
<workmad3>
banister: could be... been a while since I read it and I'm bad at remembering the authors of books I consider fairly unremarkable :)
<workmad3>
it's well written... just fairly light on the design details IMO :)
<itadder>
why have I not yet found a good ruby book
<workmad3>
banister: other than that... I'd probably suggest books like RESTful Web Services and REST In Practice
<itadder>
that does not fource me to look all over google for more information
<banister>
workmad3 thanks
arietis has quit [Quit: Computer has gone to sleep.]
<workmad3>
banister: oh, and digging through blog posts (you may need to dig through java blog posts for some stuff)
thomasxie has joined #ruby
hiyosi has quit [Ping timeout: 252 seconds]
mourest has joined #ruby
lsmola has quit [Ping timeout: 240 seconds]
Wolland has joined #ruby
sdouglas has quit [Ping timeout: 264 seconds]
ekarlso has joined #ruby
<workmad3>
banister: I wouldn't suggest the SOA books by Erl though... they sound good in summary, but they're mostly talking about very much JavaEE style Enterprise SOA stuff with crap about pre-built Service Repositories, Service Locators (and over-specified standards for such things), etc. without really giving decent concrete examples of them :)
<The_NetZ>
shevy: what was that marshal init code again?
<banister>
workmad3 who is erl
mark_locklear has joined #ruby
<workmad3>
banister: some guy who wrote a load of SOA books ;)
thomasxie has quit [Remote host closed the connection]
<workmad3>
banister: I was just warning in case you did a search for SOA books on amazon and came across them
thomasxie has joined #ruby
<banister>
workmad3 thx
<itadder>
wow I am late
swks has quit [Remote host closed the connection]
<workmad3>
banister: I've no doubt they're useful for many people... but they're not very useful to how SOA tends to be approached in rails, and they're dry yawn-factories to boot :)
<workmad3>
ok, lunch...
fgo has quit [Remote host closed the connection]
<shevy>
The_NetZ hmm i forgot... I need to leave here soon, will be back in ~4 hours about
<banister>
workmad3 thanks, enjoy lunch guy!
<workmad3>
before I get distracted again :)
<workmad3>
banister: will do... and stop distracting me with one of my favourite topics... books ;)
<banister>
hehehe
<banister>
sry :)
workmad3 is now known as wm3|lunch
philcrissman has quit [Remote host closed the connection]
diegoviola has joined #ruby
ocher has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
rdark has quit [Ping timeout: 240 seconds]
diegoviola has quit [Client Quit]
<ocher>
hi. i've got a question concerning ruby 1.9 encodings
Mongey has quit [Quit: Mongey]
philcrissman has joined #ruby
<ocher>
let's say that i've got an UTF-8 string with invalid characters. how to remove these characters or replace them with question marks
Ch4rAss has joined #ruby
sambao21 has joined #ruby
foredoomed has joined #ruby
<The_NetZ>
shevy: k
awkisopen has quit [Remote host closed the connection]
rdark has joined #ruby
arietis has joined #ruby
<ocher>
in Ruby 1.8 I would use: iconv and ('UTF-8//IGNORE', 'UTF-8'), and how about Ruby 1.9?
Alina-malina has quit [Quit: Leaving to RealWorld]
yubrew has joined #ruby
<apeiros>
in ruby 2.1, you can use String#scrub
kaldrenon has quit [Client Quit]
Kricir has joined #ruby
stringoO has joined #ruby
<ocher>
apeiros: thank you
kobain has joined #ruby
Matriks has quit [Ping timeout: 240 seconds]
akitada has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
Alina-malina has joined #ruby
andy___ has joined #ruby
andy___ is now known as Guest16998
yubrew has quit [Ping timeout: 240 seconds]
rahult has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
vpretzel has joined #ruby
alexju has joined #ruby
mikepack has joined #ruby
<The_NetZ>
sigh
akonny has joined #ruby
lkba has joined #ruby
Guest16998 has quit [Remote host closed the connection]
Mongey has joined #ruby
davedev2_ has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
fridim__ has joined #ruby
davedev24 has quit [Ping timeout: 244 seconds]
mikepack has quit [Ping timeout: 240 seconds]
kennym has joined #ruby
Waheedi has quit [Quit: Waheedi]
diegoviola has joined #ruby
fgo has joined #ruby
ValicekB has joined #ruby
alexherbo2 has quit [Ping timeout: 244 seconds]
freerobby has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
foredoomed has quit [Remote host closed the connection]
kennym1 has joined #ruby
ItSANgo has quit [Quit: Leaving...]
philcrissman has quit [Remote host closed the connection]
akonny has quit [Quit: akonny]
momomomomo has joined #ruby
<LiohAu>
I'm trying to break like that in a "times" loop : "break if count == (index + 1)" but with the debugger I see the next line executed when the condition is true, is it normal?
julian` has quit [Ping timeout: 240 seconds]
boboc has joined #ruby
jsilver_ has joined #ruby
TheLarkInn has joined #ruby
jsilver has quit [Read error: Connection reset by peer]
sparrovv has quit [Remote host closed the connection]
<momomomomo>
i can see why - paste bin is a lot cleaner, with less ads
foredoomed has joined #ruby
kevind has joined #ruby
fgo has joined #ruby
<The_NetZ>
sprunge <3
Kricir has joined #ruby
Salve has joined #ruby
lxsameer has quit [Quit: Leaving]
<LiohAu>
yeah I know there are a lot of ads, but I really dislike having my pastie (that are usually the worst code you write, since I usually use it when I need help) associated to my account.
<The_NetZ>
again, sprunge <3
claymore has joined #ruby
<jhass>
LiohAu: since your example is nothing we can run to reproduce and look into your issue, why don't you just if the line if your want to skip it on the last iteration?
<esposito>
LiohAu: records_count is not an integer? If it is not, why do you expect index+1 to ever be equal to it? If it is, why do you convert to an integer?
duggiefresh has joined #ruby
craigp has joined #ruby
bricker`LA has joined #ruby
young has quit [Ping timeout: 252 seconds]
<LiohAu>
esposito: ok, I think you found my mistake, the .to_i is not changing records_count, but only returning a converted int :§
<LiohAu>
:(*
<momomomomo>
lol
ItSANgo has joined #ruby
noopq has quit [Ping timeout: 265 seconds]
<LiohAu>
jhass: could work also, but I try different syntaxes to learn ruby
<LiohAu>
the "break if ..." is not something I'm used to
<jhass>
there are superior constructs in most cases
<peterellisjones>
rather than doing something special on the last iteration of a loop, you can just do the loop n-1 times, and do that special case outside the loop afterwards
<jhass>
peterellisjones: it's doing that thing every time but in the last iteration
jamto11 has joined #ruby
bricker`LA has quit [Ping timeout: 240 seconds]
zerun0 has quit [Ping timeout: 252 seconds]
ritek has joined #ruby
ritek has quit [Changing host]
ritek has joined #ruby
ritek has joined #ruby
ritek has quit [Changing host]
<peterellisjones>
yeah so do the whole loop n-1 times, then afterwards just the bit that you need to do in the last iteration outside the loop
<LiohAu>
jhass: peterellisjones is right, I could do (records_count.to_i - 1).times ?
<jhass>
peterellisjones: hm, so you would favor duplicating code?
<LiohAu>
Yes I would duplicate the first "step" line
sailias has joined #ruby
<LiohAu>
instead of comparing 2 integers in each iteration
zerun0 has joined #ruby
<jhass>
I'd just if, especially if it's a single line
<jhass>
you won't notice the comparison
alexherbo2 has joined #ruby
kaldrenon has joined #ruby
rudisimo has joined #ruby
blackmesa has quit [Read error: No route to host]
freerobby has quit [Quit: Leaving.]
<jhass>
number_of_records = records_count.to_i # normalize input. number_of_records.times do |iteration| do_a; do_b unless iteration+1 == number_of_times; end
mlpinit has joined #ruby
<jhass>
or actually 1.upto(number_of_records) do |iteration| do_a; do_b unless iteration == number_of_records; end
sdwrage has joined #ruby
blackmesa has joined #ruby
sdwrage_ has joined #ruby
maroloccio has quit [Ping timeout: 240 seconds]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sdwrage_ has quit [Client Quit]
sdwrage has quit [Client Quit]
<esposito>
+1 for jhass version. I find also it more explicit in its intent (do everything n times except this little part here, which you don't do in the last iteration)
zachallett has joined #ruby
Matriks has joined #ruby
Advocation has joined #ruby
sparrovv has joined #ruby
claymore has quit [Read error: Operation timed out]
sigurding has quit [Quit: sigurding]
<apeiros>
I prefer peterellisjones' solution. you can extract what you do in a method, to avoid repetition.
sparrovv has quit [Remote host closed the connection]
sparrovv has joined #ruby
blueOxigen has joined #ruby
geopet has joined #ruby
hfp`away is now known as hfp
lsmola has quit [Ping timeout: 240 seconds]
<peterellisjones>
apeiros — as long as nobody choose this solution :) i = 0; do_a while (i+=1) < records_count.to_i && do_b
<jhass>
it's easier to accidentally have complex/changing stuff in the parameters though, so it does require a higher self discipline to not introduce duplication that way. (I define duplication by having to change one thing in multiple places if it really is actually the same thing, that are already things like changing a number or a string)
slowcon has joined #ruby
wm3|lunch is now known as workmad3
sparrovv has quit [Remote host closed the connection]
`MArceLL` has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
dik_dak has joined #ruby
philcrissman has joined #ruby
itadder has quit [Remote host closed the connection]
itadder has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.3]
geopet has quit []
freerobby has joined #ruby
geopet has joined #ruby
kcombs has joined #ruby
<esposito>
I've a c++ extension with the following problem: docs get created correctly if i "rdoc .", but they are not when installing the gem. Anyone has any idea?
m1lt0n_ has quit [Quit: leaving]
lsmola has joined #ruby
lsmola has quit [Read error: Connection reset by peer]
itadder has quit [Ping timeout: 240 seconds]
joelroa has joined #ruby
lsmola has joined #ruby
claymore has joined #ruby
joelroa has quit [Ping timeout: 244 seconds]
momomomomo has quit [Quit: momomomomo]
<certainty>
LiohAu: awww, you've removed the paste
fedesilva has quit [Remote host closed the connection]
<certainty>
now my backlog doesn't make as much sense
<LiohAu>
uh?
<LiohAu>
I did not removed it, I just always use an expiration date of 10 mn :D
<certainty>
LiohAu: aha!
<certainty>
that's removal as well :p
<The_NetZ>
anyone care to give something of mine a shot? I'm about to push it all to git, its pissing me off I can't make it work. Linux, I've not setup windows compiling yet.
<The_NetZ>
wmoxam: gonna compile with debugging symbols without stripping to assist in my debugging =_=
sski has quit [Remote host closed the connection]
sski has joined #ruby
phantasm66 has joined #ruby
Guest77723 has quit [Quit: Leaving]
geggam has joined #ruby
<apeiros>
certainty: for 700..900 it's about twice as fast
ahawkins has quit [Remote host closed the connection]
itadder has quit [Ping timeout: 265 seconds]
<certainty>
i'm currently looking at the docs of prime?. It doesn't say which algorithm it uses. The parameters somehow suggest that it uses a generator in some way. Do you happen to know which algorithm is used?
<apeiros>
as of 2.0 it has iirc 3 or 4 different possible generators
<certainty>
yeah but how does it use those?
griffindy has quit [Quit: Computer has gone to sleep.]
<Fidelix>
jhass: thanks. That was also Soulcutter's suggestion, and it works.
sdwrage_ has quit [Quit: This computer has gone to sleep]
sdwrage has quit [Quit: This computer has gone to sleep]
<The_NetZ>
rarg
The_NetZ has quit [Remote host closed the connection]
relaxati9 is now known as relaxer
aryaching has joined #ruby
rayners has quit [Remote host closed the connection]
esuave has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
oso|away is now known as oso96_2000
apeiros has joined #ruby
camilasa_ has joined #ruby
Blaze_Boy has quit [Quit: Returning to his Planet.]
axl_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
S0da has joined #ruby
camilasan has quit [Ping timeout: 252 seconds]
acrussell has joined #ruby
ndrei has joined #ruby
Macaveli has quit [Ping timeout: 244 seconds]
apeiros has quit [Ping timeout: 252 seconds]
leonidlm has quit [Ping timeout: 244 seconds]
Nirgali42 has quit [Ping timeout: 241 seconds]
budrose has quit [Ping timeout: 264 seconds]
joelroa has joined #ruby
x77686d has joined #ruby
xaq has joined #ruby
centrx has joined #ruby
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby
_maes_ has joined #ruby
mgberlin has joined #ruby
zellio_ has joined #ruby
Nirgali42 has joined #ruby
snath has joined #ruby
_maes_ has quit [Client Quit]
zellio has quit [Ping timeout: 264 seconds]
_maes_ has joined #ruby
zellio_ is now known as zellio
joelroa has quit [Ping timeout: 265 seconds]
camilasa_ has quit []
chipotle has quit [Quit: cya]
tylersmith has quit [Ping timeout: 244 seconds]
davy has joined #ruby
<yoshokatana>
hmm. is there an easy way to step through sinatra apps? I keep getting "can't convert nil into String" in common.rb, but it doesn't reference anything in my actual app.rb
Nirgali42 has quit [Ping timeout: 244 seconds]
claymore has quit [Ping timeout: 264 seconds]
<yoshokatana>
oh wait a minute, could this be it? push = JSON.parse(params[:payload])
Avahey has joined #ruby
<zaargy>
yep
<zaargy>
it could be
Guest44286 has quit [Read error: Connection reset by peer]
yasushi has quit [Remote host closed the connection]
<yoshokatana>
should I use push = JSON.parse(request.body.read) instead?
koell has quit [Read error: Connection reset by peer]
mansi_ has quit [Remote host closed the connection]
JustMozzy has quit [Remote host closed the connection]
mansi_ has joined #ruby
mansi_ has quit [Read error: Connection reset by peer]
jjbohn has quit [Quit: Leaving...]
davy has quit [Ping timeout: 240 seconds]
mansi_ has joined #ruby
havenwood has joined #ruby
<certainty>
if you want to read potentially abritarily large user input you can do so
mlpinit has quit [Remote host closed the connection]
rayners has joined #ruby
<LadyRainicorn>
Arbitrarily large input can still cause memory exhaustion.
<yoshokatana>
I'm trying to read the POST data from a github-postreceive-hook
jjbohn has joined #ruby
yfeldblum has joined #ruby
<LadyRainicorn>
That should be fine then as long as you've authenticated it FIRST.
<certainty>
LadyRainicorn: that's my point :) though practically most server will impose some limit here
jjbohn has quit [Client Quit]
<LadyRainicorn>
oh, I read it as "that's a safe way to parse arbitearily large input"
wallerdev has joined #ruby
Guest34641 is now known as rippa
figgleberry has joined #ruby
fedesilva has joined #ruby
tgkokk has quit [Remote host closed the connection]
zachallett has joined #ruby
wedgeV has quit [Quit: wedgeV]
pel_daniel has joined #ruby
momomomomo has quit [Quit: momomomomo]
<yoshokatana>
hmm ok
momomomomo has joined #ruby
Nirgali42 has joined #ruby
itadder has joined #ruby
<yoshokatana>
yeah, sinatra gave me some really mean warnings about authenticating input when I tested it :3
<e4xit>
hi
figgleberry has quit [Client Quit]
yfeldblum has quit [Ping timeout: 244 seconds]
<havenwood>
yoshokatana: my first though (though i haven't had coffee): payload = params[:payload]; push = JSON.parse(payload) if payload
<havenwood>
e4xit: hi
<e4xit>
perhaps this isn't the right channel for this (let me know if it isn't) but I am trying to install ruby via RVM so have run 'dvm requirements' in terminal, but now have frozen terminal at line:
<Karu>
Hi folks! I'm wondering if there's a clever way one can pass a Hash's contents into a block. In this case i'm setting up the Mail gem and I don't want my config in my code: http://rubydoc.info/gems/mail/file/README.md#Making_an_email
soulcake has quit [Read error: Connection reset by peer]
<yoshokatana>
does the "attack prevented" thing mean that the post data wasn't passed through? because it still seems to be running and trying to call the github api (even though my github auth needs fixing)
jeregrine has joined #ruby
jprovazn has joined #ruby
mechanicles has joined #ruby
<yoshokatana>
if I print it, it gives me the post data...
xaq_ has joined #ruby
<yoshokatana>
how can I find out where the "undefined method `split' for nil:NilClass" error is occurring?
rm_ has joined #ruby
xaq has quit [Write error: Connection reset by peer]
<mikecmpbll>
the reason that you're not getting a stack trace is because you're catching the error.
<yoshokatana>
it's still giving me a noMethodError with no stack trace, and I commented out all the begin / rescue blocks
<yoshokatana>
havenwood: gedsunteit
greenarrow has quit [Quit: 500]
Vovko has joined #ruby
<havenwood>
yoshokatana: hrm, `[/\=[[[:alnum:]]-]+/]` would be alphabetic and numeric characters or a endash
<yoshokatana>
havenwood: doesn't /\=[a-zA-Z0-9\-]+/ do the job...?
<havenwood>
yoshokatana: yup :)
<yoshokatana>
:p
<havenwood>
yoshokatana: no need to escape the -, right?
<yoshokatana>
it's still giving me this error though, and I can't figure out where: undefined method `bytesize' for #<Hash:0x007fea2c091ac8>
sdwrage has joined #ruby
sdwrage_ has joined #ruby
ajay has joined #ruby
jamto11 has quit [Remote host closed the connection]
Voodoofish430 has joined #ruby
freezey has quit [Remote host closed the connection]
chrisja has joined #ruby
bluepojo_ has quit [Read error: Connection reset by peer]
fedesilva has quit [Remote host closed the connection]
bufferloss has joined #ruby
lw has quit [Ping timeout: 265 seconds]
thumpba_ has joined #ruby
hanikazmi_ has joined #ruby
ohcibi_ has joined #ruby
artmann_ has joined #ruby
yarou has joined #ruby
mourest has quit [Ping timeout: 240 seconds]
axl_ has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.3]
recurrence has joined #ruby
qqw_ has joined #ruby
mechanicles has quit []
davy has joined #ruby
lw has joined #ruby
mourest has joined #ruby
mark_locklear has quit [Quit: Leaving]
saarinen has joined #ruby
anicet has joined #ruby
recurrence has quit [Client Quit]
phrozen7- has joined #ruby
halfie_ has joined #ruby
jinie_ has joined #ruby
anicet is now known as Guest10041
Angelous- has joined #ruby
enebo has quit [Quit: enebo]
olivier_bK has quit [Ping timeout: 264 seconds]
akitada has quit [Quit: Connection closed for inactivity]
sparrovv has joined #ruby
sparrovv has quit [Remote host closed the connection]
`MArceLL` has quit [*.net *.split]
mikee has quit [*.net *.split]
justinxreese has quit [*.net *.split]
qqw has quit [*.net *.split]
gl- has quit [*.net *.split]
maZtah has quit [*.net *.split]
Sammael has quit [*.net *.split]
ohcibi has quit [*.net *.split]
Angelous has quit [*.net *.split]
halfie has quit [*.net *.split]
tommyblue has quit [*.net *.split]
jinie has quit [*.net *.split]
phrozen77 has quit [*.net *.split]
hanikazmi has quit [*.net *.split]
artmann has quit [*.net *.split]
Soulcutter has quit [*.net *.split]
juni0r has quit [*.net *.split]
tommyblu` has joined #ruby
halfie_ is now known as halfie
maletor has joined #ruby
skaflem has quit [Quit: Leaving]
einarj has quit [Remote host closed the connection]
foredoomed has joined #ruby
timonv has quit [Remote host closed the connection]
shredding has quit [Quit: shredding]
Voodoofish430 has left #ruby [#ruby]
jherbst has joined #ruby
maletor_ has joined #ruby
maletor has quit [Read error: Connection reset by peer]
jcs222 has quit [Quit: leaving]
<yoshokatana>
ehh? Curl::Easy doesn't have an http_patch() method? huh...
roolo has quit [Quit: Leaving...]
sambao21 has joined #ruby
poguez has joined #ruby
toastynerd has quit [Remote host closed the connection]
kenneth has joined #ruby
Guest10041 is now known as juni0r
dumdedum has quit [Quit: foo]
foredoomed has quit [Ping timeout: 244 seconds]
<Macaveli>
How can I check strings to regex in console? "test".regexp("")?
craigp has quit [Remote host closed the connection]
<Macaveli>
It needs match
soheil has joined #ruby
mgberlin has quit [Remote host closed the connection]
ajay has quit []
toastynerd has joined #ruby
<centrx>
Macaveli, String#match
Soulcutter has joined #ruby
<centrx>
Macaveli, Or =~
l3ck has joined #ruby
sambao21 has quit [Client Quit]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tylersmith has joined #ruby
Mongey has quit [Quit: Mongey]
afex has joined #ruby
hobodave has joined #ruby
michael_lee has quit [Read error: Connection reset by peer]
dANOKELOFF has joined #ruby
<The_NetZ>
certainty: hey, care to answer a question regarding a c/++ equivalent of a ruby thing?
Slavox is now known as Slavox|AFK
davy has quit [Remote host closed the connection]
chrisseaton has quit []
<shevy>
how do you call ~ in english
<shevy>
is that the tilde?
<havenwood>
ya
<shevy>
thanks
<cout>
aka the squiggle
<shevy>
the squirrel?
Angelous- is now known as Angelous
davy has joined #ruby
<cout>
that too
<The_NetZ>
shevy: I call it home, but to each his own :P
<shevy>
hehe
pranny has joined #ruby
elcontrastador has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doubleemms has joined #ruby
<The_NetZ>
ok..., what is something.each {|s| dosomething(s)} called in ruby? I've used it, but I don't know the proper name, and I need to translate it into c++ so... makes for difficult research XD
kevind_ has joined #ruby
aaronmcadam has quit [Ping timeout: 240 seconds]
<shevy>
an iterator or?
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jbueza has joined #ruby
<shevy>
The_NetZ you could always think of it as an inventory (your container), and then you iterate over each element of that container
<shevy>
or every
<shevy>
damn the english language!
<havenwood>
The_NetZ: I'd say an Enumerator with a block.
browndawg has left #ruby [#ruby]
elcontrastador has joined #ruby
<havenwood>
>> [].each.class
<The_NetZ>
ok... now what to do to do that in c++ :P
<doubleemms>
when i use Array(thingy), it wraps the thingy in an array, if it's not already one, but it also wraps all the things inside the thingy, as well. is there any way to stop it at the top level of a hash? is there a more idiomatic way to ensure i'm always returning my result(s) wrapped in an array?
<The_NetZ>
cuz I need to do basically script.each {|s| TOPLEVEL_BINDING.eval(Zlib::Inflate.inflate(s.at(2))) } in c land :P
kevind_ is now known as kevind
rmorello has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<centrx>
for (i = 0; i < length; i++)
mikee has joined #ruby
justinxreese has joined #ruby
`MArceLL` has joined #ruby
gl- has joined #ruby
freezey has joined #ruby
<The_NetZ>
centrx: ah... a good for loop, shoulda thought of that XD
enebo has joined #ruby
Kricir has joined #ruby
ktosiek has joined #ruby
toastynerd has quit [Remote host closed the connection]
greenrose has joined #ruby
<havenwood>
or enum
<havenwood>
meh
<shevy>
doubleemms your question is so long
<shevy>
doubleemms can you use a method that you defined?
<The_NetZ>
w00t! I got it working! now, to just link ruby statically to it!
<havenwood>
yoshokatana: JSON is expected but you're giving it a Hash or something?
Nirgali42 has quit [Ping timeout: 264 seconds]
<yoshokatana>
hmm
<havenwood>
yoshokatana: #to_json
<havenwood>
dunno
i5dr0id has joined #ruby
craigp has joined #ruby
<yoshokatana>
hmmmmm
fozworth has joined #ruby
sdouglas has quit [Remote host closed the connection]
<yoshokatana>
hmm, I'm giving it a string, looks like
thesheff17 has joined #ruby
<havenwood>
yoshokatana: ''.bytesize #=> 0
codeitagile1 has joined #ruby
<yoshokatana>
ahh it has something to do with json octets
codeitagile has quit [Ping timeout: 264 seconds]
<certainty>
The_NetZ: the c++ equivalent to something.each{ |s| dosomething(s) } would probably be std::for_each(yourcontainer.begin(),yourcontainer.end(),someFunctor()); but my c++ is rusty
<certainty>
where dosomething would be implemented in the functor
vlad_starkov has quit [Remote host closed the connection]
leonidlm has joined #ruby
<The_NetZ>
certainty: many thanks; to get around that for a bit, I dumped my zlib compressed script to a text file for testing, but thanks, I hope to get that working soon :P
v1n has quit [Client Quit]
shinobi_one has joined #ruby
freerobby has joined #ruby
mattmcclure has joined #ruby
<yoshokatana>
what does this sentence mean? "Your getting this error because Sinatra takes the return value of a route and converts it into a string before trying to display it to the client."
<shevy>
I guess they tell you that you get a string back yoshokatana
<bufferloss>
yoshokatana: #sinatra
shvelo has joined #ruby
<bufferloss>
or maybe #sinatrarb
agent_white has joined #ruby
Voodoofish430 has joined #ruby
<yoshokatana>
hmm
akonny has quit [Quit: akonny]
bePolite has joined #ruby
itadder has joined #ruby
bePolite has left #ruby ["Leaving"]
ukd1 has joined #ruby
momomomomo has quit [Quit: momomomomo]
budrose has joined #ruby
andikr has quit [Remote host closed the connection]
aaronmcadam has joined #ruby
ageis has quit [Ping timeout: 245 seconds]
juanp has joined #ruby
itadder has quit [Ping timeout: 244 seconds]
mjs2600 has quit [Remote host closed the connection]
Nirgali42 has joined #ruby
mjs2600 has joined #ruby
Xiti has joined #ruby
robbyoconnor has quit [Ping timeout: 240 seconds]
craigp has joined #ruby
juanp has left #ruby [#ruby]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rbartos has joined #ruby
mansi has joined #ruby
<aspiers>
can anyone recommend a class hierarchy diagram generator tool? all the ones I've found seem to be obsolete :-/
<The_NetZ>
how does one statically link ruby to an executable?
<aspiers>
it needs to work by running my specs and tracing requires etc., rather than by grepping the code for "require"
shinobi_one has quit [Quit: shinobi_one]
peterellisjones has joined #ruby
mourest has quit [Read error: Connection reset by peer]
AlSquire has quit [Quit: This computer has gone to sleep]
fozworth has quit [Quit: Computer has gone to sleep.]
v0n has joined #ruby
sambao21 has joined #ruby
fozworth has joined #ruby
relaxer has joined #ruby
shvelo has quit [Read error: Operation timed out]
xlogic has joined #ruby
tgkokk has joined #ruby
tgkokk has quit [Max SendQ exceeded]
martis has joined #ruby
codeitagile1 has quit [Quit: Leaving.]
cjsarette has quit [Ping timeout: 245 seconds]
<martis>
why does this code return false?
<martis>
[2014-03-04 19:13:16] Daavid: def check_usertype if @user.access_int == 0 #Checks which user type the current logged in user is @type == "Member" elsif @user.access_int == 1 @type == "Admin" else @type == "unknown" return type.to_s end end [2014-03-04 19:13:27] Daavid: <p>User type: <%= check_usertype.to_s %> </p>'
<The_NetZ>
Macaveli: its a really lightweight pastebin site/api; you on linux?
Hanmac1 has joined #ruby
nmokru has joined #ruby
<Macaveli>
The_NetZ, i'm on unix with apple
Hanmac has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 244 seconds]
<certainty>
i'm on pills with red color
sepp2k has joined #ruby
mary5030_ has joined #ruby
ephemerian has joined #ruby
mary5030_ has quit [Remote host closed the connection]
randomnick_ has joined #ruby
axsuul has quit [Ping timeout: 244 seconds]
mary5030_ has joined #ruby
<shevy>
I take the blue ones
<shevy>
the red ones are commie pills
tjr9898_ has joined #ruby
shock_one has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
tjr9898 has quit [Ping timeout: 265 seconds]
visof_ has joined #ruby
koell has joined #ruby
peterellisjones has quit [Quit: Leaving.]
olivier_bK has joined #ruby
visof has quit [Ping timeout: 240 seconds]
mary5030 has quit [Ping timeout: 244 seconds]
peterellisjones has joined #ruby
mikecmpbll has joined #ruby
maletor has joined #ruby
<shock_one>
Hi. I use RMagick to create a gif. I can receive something like this http://imgur.com/dPLJle4 , but I'd like each scene to remove all the previous ones. Any ideas how to accomplish that?
diegoviola has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
sdwrage_ has quit [Quit: This computer has gone to sleep]
mikepack has joined #ruby
SHyx0rmZ has joined #ruby
piggybox has joined #ruby
bry4n_ has quit [Ping timeout: 264 seconds]
<a-priori>
looks like you're doing something like this (total pseudocode, don't know RMagick):
<The_NetZ>
and no. I'm not veiwing anything off of 9gag =_=
mikepack has quit [Ping timeout: 244 seconds]
<Macaveli>
The_NetZ, Lol It's my post on my mastiff
<Macaveli>
Ultimate hipster
<The_NetZ>
beh
agent_white has quit [Quit: leaving]
e4xit has quit [Ping timeout: 240 seconds]
ageis_ has joined #ruby
maletor has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
aspires has quit []
akonny has quit [Quit: akonny]
maletor has joined #ruby
<The_NetZ>
a-priori: also, I got it working; with ruby compiled from git, I linked static, then uninstalled, and the program runs rubyscripts fine :D
tgkokk has joined #ruby
phantomtiger has quit [Quit: phantomtiger]
Jdubs has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 264 seconds]
tgkokk has quit [Max SendQ exceeded]
<a-priori>
nice
<shock_one>
a-priori: I can't neither google anything on 'rmagick clear frame' nor find anything useful in the manual. Could you tell me how to do that?
<The_NetZ>
very, for windows users at least :P
<a-priori>
never used it myself
shvelo has joined #ruby
chrisseaton has quit []
<The_NetZ>
I'll just hook it as a dep on linux, lol.
bry4n_ has joined #ruby
<a-priori>
shock_one: nope, sorry, can't help you there, never used rmagick
<The_NetZ>
a-priori: windows?
sk87 has joined #ruby
chrisseaton has joined #ruby
<a-priori>
The_NetZ: sorry? don't follow
toastynerd has joined #ruby
<The_NetZ>
a-priori: you said, "never used it myself" shortly after my comment on widnows, before I noticed shock_one's rmagick question :P
maroloccio has quit [Ping timeout: 244 seconds]
sk87 has quit [Client Quit]
urael has joined #ruby
<a-priori>
sorry, got two conversations going at once :) the 'never used it myself' was to you, about mruby
<a-priori>
never used it, on windows or otherwise
<a-priori>
but yeah, also never used rmagick :)
agent_white has joined #ruby
pfg has joined #ruby
<The_NetZ>
a-priori: oh, lol. I've never used it either; I mean, I used normal ruby, compiled from git into a pacman package, compiled static, then uninstalled, and it works :P
Avahey has joined #ruby
visof has joined #ruby
<centrx>
People still use Windows?
<The_NetZ>
centrx: yeah, apparently :P
linojon has joined #ruby
momomomomo has joined #ruby
<a-priori>
lol, working on a windows store app right now believe it or not :)
joelroa has joined #ruby
<centrx>
eww
boboc has joined #ruby
mehlah has quit [Quit: Leaving...]
aspires has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
maletor has quit [Ping timeout: 240 seconds]
<a-priori>
winrt's a quirky fucker but you get used to it ;)
<Macaveli>
shevy, it is and his nickname is called Makaveli but I work on a Mac so I adapted it to Macaveli
<centrx>
Macaveli, Well it describes blocks in there...
<Macaveli>
You guys have twitter? :)
<Macaveli>
If you want you can PM it!
<razrunelord>
Macaveli: big4life!
rankine has quit [Client Quit]
rankine has joined #ruby
<shevy>
Macaveli hmm
<shevy>
mac users scare me
<Macaveli>
razrunelord, WEST COAST
JBreit has joined #ruby
<Macaveli>
:D
<Macaveli>
shevy, linux? ;)
mikecmpbll has joined #ruby
<Macaveli>
you
<shevy>
yea
Xiti` has joined #ruby
<Macaveli>
shevy, Arch?
mlpinit_ has quit [Ping timeout: 264 seconds]
<shevy>
nah, always source compiles. if any distribution, the philosophy of gobolinux and perhaps nixos (without those awful syntax for their packages)
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<razrunelord>
Macaveli: EAST COAST! biggie is the GOAT!
sski has joined #ruby
xerox35__ has quit [Remote host closed the connection]
<Macaveli>
shevy, I only use mac cause it's handy and it's trendy and it's for free
<The_NetZ>
I'm an archer, lol. the PKGBUILD is soo useful; can compile from source, but still remove with a package manager :P
xerox357 has joined #ruby
<shevy>
Macaveli it is for free?
<Macaveli>
shevy, work gives me free mac
<The_NetZ>
shevy: yeah, mavericks is free on the app store.
<shevy>
The_NetZ yeah, you get that through AppDirs for free though, without having to use any package manager at all
<Macaveli>
The_NetZ, and free car :D
<The_NetZ>
shevy: appdirs?
<shevy>
The_NetZ, yeah, in essence that you have everything in one versioned directory ready
<The_NetZ>
oh ruck that. I just want shit layed out nicely organized :P
ace_striker has joined #ruby
<shevy>
indeed, then you use a package manager because you dont know what belongs where to without it :>
ace_striker is now known as Guest22492
<The_NetZ>
exactly, lol, and I'm not ashamed to admit it :P
rbartos has quit [Remote host closed the connection]
Xiti has quit [Ping timeout: 244 seconds]
agent_white has quit [Quit: leaving]
agent_white has joined #ruby
geopet has joined #ruby
<The_NetZ>
while I realize that executables go in /usr/bin/, libs in /usr/lib/, and include files in /usr/include/ I'd really hate managing all that manually.
xerox357 has quit [Ping timeout: 240 seconds]
<shevy>
you couldn't anyway
xerox357 has joined #ruby
<shevy>
because there is also /etc and /usr/local /opt and your home dir, and any amount of subdirs in all of them
momomomomo has quit [Quit: momomomomo]
<The_NetZ>
exactly @_@
maletor has quit [Quit: Computer has gone to sleep.]
<The_NetZ>
keeping $HOME neat is hard enough XD
<agent_white>
ping
coderhs has quit [Ping timeout: 244 seconds]
toastynerd has joined #ruby
TMM has joined #ruby
<shevy>
The_NetZ yes, if you use that model. of course it is easy if you abandon it :)
<The_NetZ>
nope, I'm too CDO to do that XD
cjsarette has joined #ruby
jcs222 has joined #ruby
kenneth has joined #ruby
tgkokk has joined #ruby
tgkokk has quit [Max SendQ exceeded]
olivier_bK has quit [Ping timeout: 240 seconds]
<jhass>
shevy: doesn't get dynamic linking a lot more complex with the appdirs approach?
Slavox|AFK is now known as Slavox
philcris_ has joined #ruby
philcris_ is now known as philcrissman_
<shevy>
jhass I suppose so, the appdir approach using ones like nixos or gobolinux always have to use symlinks
mansi_ has quit [Remote host closed the connection]
<shevy>
I don't know how to avoid having to use symlinks
<jhass>
so you kinda trade a package manager for a simplified package manager + a symlink manager
<shevy>
perhaps you could aufs-mount into central locations to simulate traditional linux filestructure
joelroa has joined #ruby
<shevy>
jhass well it depends on how you define a package manager exactly
xerox357 has quit [Remote host closed the connection]
<shevy>
is "rm" a package manager if you have to do it manually? what if you use a set of shell scripts that do so for you? :)
xerox357 has joined #ruby
flowerhack has joined #ruby
<jhass>
a package manager for me is a tool to install, update and remove software
<jhass>
how it achieves that, I don't care
zachallett has quit [Remote host closed the connection]
<jhass>
(well I do, but not on the level of abstraction we're currently looking at)
philcrissman has quit [Ping timeout: 265 seconds]
<shevy>
ok, that is the broadest definition then
<jhass>
sure, I totally consider things like toast a package manager
<shevy>
isn't toast something to eat?
xerox357_ has joined #ruby
postmodern has joined #ruby
<jhass>
"... because silly names is what we do best" - Linus Torvalds ;)
<shevy>
and pacman is a game, while we are at it :P
itadder has joined #ruby
xerox357 has quit [Read error: Connection reset by peer]
cjsarette has quit [Ping timeout: 245 seconds]
afex has quit [Ping timeout: 265 seconds]
<shevy>
ah
<shevy>
one definition
<shevy>
jhass, does a package manager have to include a (at least one) central repository?
<jhass>
nope, see toast
<shevy>
I have no idea what is toast but you make me hungry
rm_ has quit [Remote host closed the connection]
<shevy>
hmm
<shevy>
jhass I think most package managers have a repository though
<slowcon>
hey guys, havent done a ton of research on this but wanted to see if anyone ran ito this problem before. anyone ever tried scraping a website in a different language, but with translations?
xerox357_ has quit [Read error: Connection reset by peer]
atno has joined #ruby
teenwolf has quit [Read error: Connection reset by peer]
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
xerox357 has joined #ruby
sethen has joined #ruby
<shevy>
a different language?
jmeeuwen has joined #ruby
hiyosi has joined #ruby
<shevy>
I always speak in deep russian when scraping
<slowcon>
shevy: well thats perfect hahahaha
<jhass>
slowcon: not sure what you mean. But if I understand you correctly (by ignoring "with translations") I don't see how the language should affect anything
<slowcon>
i use chromes built in translator to browse it, but wondering if theres a way to scrape it, headless with the translations
tgkokk has joined #ruby
wookiehangover has quit [Ping timeout: 245 seconds]
ebwise has joined #ruby
<jhass>
you want to scrape the translated content? because for html element extraction you should only rely on the html structure with its tags, classes and ids
<slowcon>
jhass: yeah for example if i wanted to grab the title of a post, but in english
agent_white has quit [Quit: leaving]
<slowcon>
jhass: not dealing with the actual elements for scraping, just the text
<jhass>
not sure if that link actually works for you :P
aaronmcadam has quit [Quit: Leaving...]
<slowcon>
jhass: ahh nice that worked
SirFunk has joined #ruby
rankine has quit [Quit: leaving]
sindork has joined #ruby
pranny has joined #ruby
chrisseaton has quit []
jan1337z has quit [Excess Flood]
<shevy>
hmm
derek_c has quit [Client Quit]
<shevy>
what is the minimal amount of testing that could reasonably be done?
jan1337z has joined #ruby
derek_c has joined #ruby
Faris has joined #ruby
rankine has joined #ruby
rankine has quit [Changing host]
rankine has joined #ruby
<shevy>
something along the lines "this and that feature should work in general but I don't care about testing the individual subcomponents as long as the overall feature works"
chrisseaton has joined #ruby
<centrx>
Sounds minimal enough
rbartos has joined #ruby
maletor has joined #ruby
rankine has quit [Client Quit]
<shevy>
well I don't know if any testing library in ruby aims for that
jsilver-ipod has quit [Remote host closed the connection]
alvaro_o has joined #ruby
kcombs has quit [Remote host closed the connection]
andy__ has quit [Read error: Connection reset by peer]
mando_ has joined #ruby
joelroa has joined #ruby
danfo has quit [Client Quit]
andy__ has joined #ruby
mjs2600 has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
sdwrage_ has quit [Quit: This computer has gone to sleep]
griffindy has quit [Quit: Computer has gone to sleep.]
claymore has joined #ruby
toastyne_ has joined #ruby
philcrissman has quit [Remote host closed the connection]
xcv has quit [Ping timeout: 252 seconds]
saarinen has joined #ruby
xcv_ has quit [Ping timeout: 240 seconds]
maletor has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
toastynerd has quit [Ping timeout: 265 seconds]
Jake232 has joined #ruby
nateberkopec has joined #ruby
joelroa has quit [Ping timeout: 240 seconds]
phreax has quit [Ping timeout: 244 seconds]
falood has quit [Remote host closed the connection]
albedoa has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xcv has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
zxq9 has quit [Quit: Konversation terminated!]
Megtastique has quit []
<yoshokatana>
dumb question, but how do I get the server response in Curb? I tried curl.on_success { |res| p res } but it doesn't work: https://gist.github.com/yoshokatana/9356783
<yoshokatana>
(in that example, 'added labels' prints
<yoshokatana>
)
<yoshokatana>
do I need to define on_success in the block itself?
mansi has joined #ruby
<yoshokatana>
...that doesn't work either
nikkos has joined #ruby
<nikkos>
i am new to ruby and i need some help
<yoshokatana>
nikkos: you and me both
renderful has joined #ruby
nomadic has joined #ruby
<nikkos>
i am doing an exersice for employee's wages
mlpinit has quit [Read error: Connection reset by peer]
<bricker>
I'm trying to figure out why the rb_fd_select function is taking up a lot of memory since we updated to 2.1.1 - whether it's ruby's fault or libc's