<volty>
yes, i see. I'm just curious what ppl arround use. I saw ruby-debug's page, and I find it a bit messy, cluttered, so I was curious how many ppl use it
bradhe has quit [Remote host closed the connection]
i_s has quit [Remote host closed the connection]
axl_ has joined #ruby
Andrevan has quit [Quit: WeeChat 0.4.2-rc1]
sambao21 has joined #ruby
bradhe has joined #ruby
i_s has joined #ruby
<volty>
yes, i tried binding.pry, it worked even out of a qt app
hanmac has joined #ruby
mansi has quit [Ping timeout: 265 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lukec has quit [Quit: lukec]
kofno_ has quit [Ping timeout: 256 seconds]
kofno has quit [Ping timeout: 256 seconds]
Guest54830 has quit [Quit: Guest54830]
<volty>
but i just prefer to incrementally add what I need, pry could be one of the options, though invoked not manually but through a breakpoint
mansi has joined #ruby
cutmail has joined #ruby
dzhulk has quit [Quit: Leaving.]
Asher2 has quit [Quit: Leaving.]
i_s has quit [Ping timeout: 248 seconds]
Asher has joined #ruby
hanmac has quit [Ping timeout: 264 seconds]
bradhe has quit [Ping timeout: 240 seconds]
aspires has quit [Quit: aspires]
endash has joined #ruby
<volty>
can I require 'pry' in eval.in ?
xk_id has quit [Quit:
dankest has joined #ruby
GeissT has joined #ruby
jkline has quit [Quit: jkline]
kofno has joined #ruby
kofno_ has joined #ruby
burlyscudd has joined #ruby
<volty>
no, pity :)
c0rn has quit [Quit: Computer has gone to sleep.]
bricker`1A is now known as bricker`LA
c0rn has joined #ruby
krawchyk has quit [Remote host closed the connection]
<volty>
( before the pedants come out with "you cannot do that!": a have an example that can run (and return from) pry there )
<volty>
( if it was possible to require it )
jkline has joined #ruby
<popl>
who are you talking to volty?
<banisterfiend>
volty pry is for n00bs
kobain_ has quit [Ping timeout: 252 seconds]
<volty>
popl: to everybody, like the others in a public channel // in particular ? ... you know that
axl_ has quit [Quit: axl_]
kobain has joined #ruby
<volty>
banisterfiend: wait me to google that :)
<popl>
If I knew I wouldn't ask.
<popl>
:)
bradhe has joined #ruby
<popl>
I just mean, you ask some rhetorical question then answer it five minutes later. If you're going to ramble, at least make it enlightening. :P
<volty>
you know you know, who I mean, the lecturer :)
axl_ has joined #ruby
havenwood has quit [Remote host closed the connection]
<volty>
To enlighten you I have to know how much you are already lighted
krawchyk has joined #ruby
dankest has quit [Quit: Peace]
krawchyk has quit [Remote host closed the connection]
<banisterfiend>
volty u need to sleep, it's 3am
Kabaka has quit [Remote host closed the connection]
<volty>
banisterfiend: i do agree, but will leave b (binding).pry as an option at no cost// I tried pry just ones
iliketurtles has quit [Quit: zzzzz…..]
mark06 has joined #ruby
krawchyk has joined #ruby
tkuchiki has joined #ruby
Kabaka has joined #ruby
<mark06>
why there are two channels, #ruby and #ruby-lang?
<volty>
popl: questions help a lot -- because you have to concentrate on that single problem to state it properly
<volty>
banisterfiend: where u ?
<banisterfiend>
volty netherlands
<volty>
3am too
<mark06>
I don't remember why I'm using Ruby 1.8, any particular reason for not upgrading to 1.9? I found out e.g. 1.23.round(2) does not work in 1.8
<banisterfiend>
volty yes but you should held to a higher standard
deens has joined #ruby
harrymoreno has quit [Quit: harrymoreno]
DrCode has quit [Remote host closed the connection]
<volty>
you are right, but talking a few minutes here is like a sleeping pill
sevenseacat has joined #ruby
smoothbutta has quit [Ping timeout: 248 seconds]
plotter has quit [Quit: Leaving]
plotter has joined #ruby
plotter has joined #ruby
plotter has quit [Changing host]
<volty>
banisterfiend: are you all hackers here?
plotter has quit [Read error: Connection reset by peer]
<volty>
(i mean ruby-hackers)
plotter has joined #ruby
<banisterfiend>
volty you want me to answer for everyone ? :)
<volty>
naaa, just a vague judgement
mark06 has left #ruby [#ruby]
<banisterfiend>
i guess the people here at least interested in ruby
<banisterfiend>
not sure how many actually use it as their primary langauge
<volty>
i saw you somewhere around stackflow and saw that you are interested in programming too
DrCode has joined #ruby
<banisterfiend>
?
<banisterfiend>
this is a programming channel mang
<banisterfiend>
of course i'm interested in programming :)
jejacks0n has joined #ruby
<volty>
you are right, i have to go to sleep, i'm exellent in english if I can write it in a letter form, but not here
<volty>
maybe another time about "ruby-hacker" vs "programmer" (generic)
<volty>
gn
volty has quit [Quit: Konversation terminated!]
kobain_ has joined #ruby
pwh has quit []
randomnick_ has quit [Quit: Leaving]
imthenachoman has joined #ruby
<jejacks0n>
Hi everybody, I asked this over in #ruby-lang, but will ask here as well. I don't need code or anything, but I wanted to see if there were any novel approaches to this problem. I'm considering writing a gem that uses ActiveModel::Serializers to collect the serializers into JSON, which can then be used to help document an apis resources, or to generate client friendly representations of your resources -- eg. useful to mix into
<jejacks0n>
backbone/spine models.
<jejacks0n>
I know I can use Class#descendants, but the serializers are autoloaded, so not always available.
<jejacks0n>
do I require all files to get them to load, or is there something else I can do to force their load?
<imthenachoman>
hey guys. i dont really use ruby but i'm trying to install a program that does. to install it i need fxruby. in irb if i do "require 'fox16'" i get error, but if i first require rubygems then it works
kobain has quit [Ping timeout: 256 seconds]
<imthenachoman>
anyway to make it so i dont need to require rubygems?
<jejacks0n>
what's the error you get?
<bnagy>
imthenachoman: upgrade your ruby version
<imthenachoman>
bnagy: i'm at 1.8
<imthenachoman>
you think i still need 1.9?
<bnagy>
yeah, I can tell :) 1.9 and later doesn't need require 'rubygems'
<bnagy>
1.8 is deprecated anyway
<imthenachoman>
but i dont know if this program will work. it hasnt been developed in years
lukec has joined #ruby
<jejacks0n>
interesting, I didn't know that about requiring rubygems. =) good to know.
<sevenseacat>
[gnubie]: remove the space between << and EOF
<popl>
[gnubie]: what error?
zoee has quit [Ping timeout: 245 seconds]
sayan has joined #ruby
iliketurtles has joined #ruby
hanmac has joined #ruby
aspires has quit [Quit: aspires]
philcrissman_ has joined #ruby
dzhulk has quit [Client Quit]
<[gnubie]>
popl: previously, it was /highload.rb:36: syntax error, unexpected ':', expecting keyword_end\ncpu_threshold: #{cpu_threshold_value}
<[gnubie]>
sevenseacat: i removed the space in between << and EOF and now i got a different error: ./highload.rb:68:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
<sevenseacat>
and which line is that because that doesnt match any in that file
coderhs has quit [Ping timeout: 264 seconds]
ananthakumaran has joined #ruby
<[gnubie]>
sevenseacat: line 59
<sevenseacat>
so config is nil
<sevenseacat>
reading error messages is fun!
hanmac has quit [Ping timeout: 248 seconds]
<popl>
maybe [gnubie] doesn't understand the idea of objects in ruby
iliketurtles has quit [Ping timeout: 264 seconds]
sayan has quit [Ping timeout: 240 seconds]
<[gnubie]>
sevenseacat: sorry, my actual script comes with more comments that is why in the stderr it was in line 68 rather than 59
<[gnubie]>
popl: sorry, i'm newbie here. i just want to convert my bash script to ruby in order for me to learn this language.
<sevenseacat>
thats not how you learn an OO language
kenneth has quit [Quit: kenneth]
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby
baroquebobcat has joined #ruby
<[gnubie]>
sevenseacat: i read about it but applying it is different. gradually.
T_T has joined #ruby
<[gnubie]>
the error only appears when the config.yml is created with heredoc. if it's already there, i got it working.
<popl>
>> 1.times do 'we are all objects'.upcase end
<havenwood>
bambanx: Ahh, gem version is your problem
<havenwood>
bambanx: that is the borked one
<sevenseacat>
gem update --system
<havenwood>
bambanx: Might take this opportunity to grab latest and greatest stable Ruby, which comes with a newer RubyGems: http://rubyinstaller.org/downloads/
ehc has quit [Quit: ehc]
<havenwood>
bambanx: Ruby 2.0.0-p247
<bambanx>
Latest version currently installed. Aborting.
<bambanx>
yeah i will reinstall i think
<havenwood>
bambanx: You *could* fix this, but grab 2.0! :)
mattias_ has joined #ruby
krz has joined #ruby
<mattias_>
Whoa here was a lot of people..
<bambanx>
thanks havenwood :)
<havenwood>
bambanx: no prob
axl_ has quit [Quit: axl_]
dash_ has joined #ruby
fgo has joined #ruby
r0bgleeson has quit [Ping timeout: 264 seconds]
iliketurtles has quit [Ping timeout: 252 seconds]
intuxicated has quit [Read error: Connection reset by peer]
Tearan has quit [Quit: Sleepy Badger....]
Guest68736 is now known as sumark
digitalcake has quit [Ping timeout: 252 seconds]
ahawkins has quit [Ping timeout: 240 seconds]
sergicles has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
_dv_ is now known as dv_
T_T has quit [Remote host closed the connection]
T_T has joined #ruby
justsee has quit [Ping timeout: 252 seconds]
Mon_Ouie has quit [Ping timeout: 248 seconds]
Niamkik_ has quit [Quit: Disconnecting from stoned server.]
zoee has joined #ruby
<mattias_>
I'm looking to create a webservice in ruby, I've been searching for a tutorial for a while but I only find RoR stuff. Does anyone have a good tutorial or can point me in some direction?
<havenwood>
mattias_: what kinda webservice?
Niamkik has joined #ruby
<havenwood>
mattias_: like a simple web app or api?
<havenwood>
mattias_: Sinatra is a very popular Rack DSL. Have you looked at Sinatra?
gja has quit [Quit: This computer has gone to sleep]
<mattias_>
havenwood: Thanks :) I'll look into it.. just trying to create something simple to get started. The app itself only needs authentication and a getOrder service
rjhunter has quit [Remote host closed the connection]
carraroj has quit [Quit: Konversation terminated!]
havenwood has quit [Remote host closed the connection]
deanrock0 has joined #ruby
hanmac has quit [Ping timeout: 264 seconds]
skaflem has joined #ruby
havenwood has joined #ruby
JohnBat26 has joined #ruby
dangerousdave has joined #ruby
threesome has quit [Ping timeout: 252 seconds]
|jemc| has quit [Read error: Operation timed out]
havenwood has quit [Read error: Connection reset by peer]
hanmac has joined #ruby
gja has joined #ruby
T_T has quit [Remote host closed the connection]
rahulkmr has joined #ruby
carraroj has joined #ruby
aagdbl has joined #ruby
ahawkins has joined #ruby
funburn has quit [Quit: funburn]
ahawkins_ has joined #ruby
mrsolo_ has joined #ruby
sayan has joined #ruby
aagdbl has quit [Quit: Leaving.]
ukd1_ has joined #ruby
jprovazn has joined #ruby
kaspergrubbe has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
h_kon has joined #ruby
kaspergrubbe has joined #ruby
raphaelivan has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
mlpinit has quit [Remote host closed the connection]
mlpinit has joined #ruby
v0n has quit [Ping timeout: 248 seconds]
funburn has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
carraroj has quit [Quit: Konversation terminated!]
mklappst_ has joined #ruby
mklappstuhl has quit [Read error: Connection reset by peer]
kpwz has quit [Quit: leaving]
mark_locklear has joined #ruby
asobrasil has joined #ruby
funburn has quit [Ping timeout: 240 seconds]
heftig has quit [Ping timeout: 248 seconds]
sabayonuser has joined #ruby
mklappst_ has quit [Remote host closed the connection]
cescalante is now known as ce_afk
mklappstuhl has joined #ruby
ioNull has quit [Quit: Computer has gone to sleep.]
<Squarepy>
what is referencing it?
sabayonuser has quit [Quit: Leaving]
ravster has joined #ruby
breakingthings has joined #ruby
kindjal has joined #ruby
digitalcake has joined #ruby
mklappstuhl has quit [Ping timeout: 248 seconds]
gja has quit [Quit: This computer has gone to sleep]
UberC has quit [Ping timeout: 248 seconds]
sedeki has quit [Quit: Computer has gone to sleep.]
g0bl1n has joined #ruby
mrsolo_ has quit [Ping timeout: 248 seconds]
d45h has quit [Ping timeout: 245 seconds]
mrsolo_ has joined #ruby
<shevy>
hmm... if I have two .rb files, one of them should run in the background, and I want to send data to it... what would be the simplest way to do this in ruby?
aspiers has quit [Remote host closed the connection]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nism has quit [Ping timeout: 248 seconds]
tonni has joined #ruby
carraroj has joined #ruby
iamjarvo has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
<Snail>
Hey guys, i'm trying to get a substring of an array, so i have a regex method to get this string, but since i'm new to ruby, i'm having a bit of a hard time getting together the loop
Ox6abe has quit [Remote host closed the connection]
<Snail>
Something like, @latestShot.comments.each do |i| @CommBody << self[i].string_between_markers("@body=",">")
<hoelzro>
Snail: would you mind pasting some code on a pastebin and sending us a link?
Ox6abe has joined #ruby
<hoelzro>
ah, read my mind =)
<Snail>
haha no worries :)
BizarreCake has joined #ruby
ce_afk is now known as cescalante
UberC has joined #ruby
<hoelzro>
I would probably do something like @latestShot.comment.map { |comment| comment.match(/@body=(.*?)>/)[1] }
maz-dev has quit [Remote host closed the connection]
<hanmac>
hoelzro: what about comment[/@body=(.*?)>/,1]
carraroj has quit [Ping timeout: 248 seconds]
tonni has quit [Ping timeout: 248 seconds]
UberC has quit [Client Quit]
<hoelzro>
that works too
sedeki has joined #ruby
<hoelzro>
I just prefer .match
nism has joined #ruby
nemesit|znc has quit [Ping timeout: 248 seconds]
<hoelzro>
TIMTOWTDI =)
graydot has joined #ruby
zz_michael_mbp is now known as michael_mbp
Ox6abe has quit [Ping timeout: 245 seconds]
maoko has joined #ruby
butblack has joined #ruby
butblack has left #ruby [#ruby]
<hanmac>
hoelzro: you need to be careful match can return nil and then [1] bites you in your ass
iamjarvo has quit [Remote host closed the connection]
dzhulk has quit [Quit: Leaving.]
iamjarvo has joined #ruby
kindjal has quit [Ping timeout: 252 seconds]
dash_ has joined #ruby
<Veejay>
If anyone here uses SublimeText 3 and knows of a way to get decent syntax highlighting, that'd be awesome. I've been a long-time vim user and am now using ST to interface better with colleagues and would like my UX to be as good as it was prior to the switch.
Eaven has quit [Read error: Connection reset by peer]
<Veejay>
Syntax highlighting for Ruby I mean.
tvw has joined #ruby
Eaven has joined #ruby
sedeki has quit [Quit: Computer has gone to sleep.]
<rhunter>
Veejay, I'm no expert but ST2 had a "package management" interface, which you could use to install language bundles
tonni has joined #ruby
jonr22 has joined #ruby
Ahti333 has joined #ruby
<rhunter>
I forget the name and hot key, but it was in the menus somewhere reasonable
<rhunter>
ST2 had very good Ruby support (syntax but also running tools etc) so I imagine that's still true in ST3
mikecmpbll has joined #ruby
decoponio has joined #ruby
<rhunter>
Command-Option-P, I think it might have been (on Mac)
wildroman has joined #ruby
<Veejay>
rhunter: Right, that's the part I can get around. But I can't find a decent highlighting package. And by default module names are not highlighte and instance variables are not either
sergicles has quit [Quit: sergicles]
<Veejay>
Which is quite sad cause I like my code to look like a pack of Skittles heh
krawchyk has joined #ruby
narcan has joined #ruby
mrsolo_ has quit [Ping timeout: 252 seconds]
gja has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
mrsolo_ has joined #ruby
rjhunter has joined #ruby
<rjhunter>
I'm just switching from my phone to a computer with a proper keyboard :-)
<rjhunter>
Veejay, make sure the file is being displayed in Ruby mode -- the status bar should say what's going on
Mon_Ouie has joined #ruby
<rjhunter>
you may need to close and re-open the file for autodetect to kick in
Guest38715 has quit [Ping timeout: 248 seconds]
<Veejay>
rjhunter: The file is properly seen as a Ruby file
<Veejay>
It's even highlighted. Just not sufficiently well. I don't want my module names to appear in white. Same for instance variables
sr78ger has quit [Ping timeout: 264 seconds]
<rjhunter>
In that case I imagine it's just the color scheme options
jerius has joined #ruby
<Veejay>
Yeah I guess, which is why I want to find one that doesn't suck.
<rjhunter>
Try switching overall theme to one of the famous ones like Vivid Chalk
nessib has quit [Ping timeout: 240 seconds]
maz-dev has joined #ruby
Sail has joined #ruby
<Veejay>
rjhunter: I really like Monokai. It's what I was using on vim and it had proper highlighting range. The ST version for some reason seems half-assed
ace_striker has quit [Ping timeout: 250 seconds]
<Veejay>
Seems like solarized_dark does the proper highlighting for example
<rjhunter>
The ST version probably is half-assed -- I imagine the author plugged in the rules for the languages they used and didn't get around to things like "String embedded-source"
graydot has quit [Quit: graydot]
jaynewstrom has joined #ruby
jcromart_ has joined #ruby
kobain has joined #ruby
Speed has joined #ruby
<Sail>
So a quick question, i tried to parse an array with some regex, turns out that was a bit silly. With something like this http://pastebin.com/raw.php?i=ARA98Tif
<Veejay>
rjhunter: Thanks a lot anyway, I'll try to find one that has both the nice colors and the extended highlighting
<Sail>
So this is returned from the dribbble API, i was expecting json.. and well, i don't know how to handle this
<rjhunter>
It's apparently relatively easy to tack on rules to an existing theme, if you can be bothered with that kind of thing
<Sail>
Its an array, but its in this data type set by Swish, so i can't treat it as an array
<Sail>
Any idea of what the @tags are? Are they just suffixs.. just because? or can ruby read them?
<rjhunter>
Sail: I don't know Swish or Dribble, but if nobody else chimes in I'll help you figure it out
gja has quit [Quit: This computer has gone to sleep]
<Sail>
So, if i'm understanding this right, i can interact with those tags?
<rjhunter>
the @names you're seeing is how Ruby shows instance variables when you inspect an object
<Sail>
oh wow!
zoee has quit [Quit: zoee]
<Sail>
So different from C#
<Sail>
Liking it a lot.
gregorg has joined #ruby
<rjhunter>
PaginatedList inherits from an Array, so you should be able to treat it like an array regardless of what shows up in inspect
<rjhunter>
(you'll also be able to send messages like pages
<rjhunter>
)
funburn has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Remote host closed the connection]
v0n has joined #ruby
T_T has joined #ruby
mrsolo_ has quit [Read error: Connection reset by peer]
Macaveli has quit [Remote host closed the connection]
mrsolo_ has joined #ruby
iamjarvo has joined #ruby
<rjhunter>
comments.first.body
snovak has quit [Quit: Leaving...]
<rjhunter>
comments.last.body
<hanmac>
Sail: you should not inherit from Array or Hash itself because it could make unwanted results …
<Sail>
So lets say @latestShot has the data i posted above (since it does), i can just write @latestShot.comments.[n].body?
platzhirsch has joined #ruby
<Sail>
hanmac: Thats not my code, but i'll keep that in mind, may i ask why though?
plotter has joined #ruby
Guest26260 has joined #ruby
nhhagen has joined #ruby
<rjhunter>
Sail: close -- Ruby syntax leaves off the . before [] method calls
momomomomo has joined #ruby
threesome has quit [Ping timeout: 264 seconds]
<rjhunter>
Sail: and I suspect you don't need 'comments'
<Sail>
rjhunter: nice! Thanks a ton!
diegoviola has quit [Ping timeout: 252 seconds]
<rjhunter>
Sail: @latestShot[n].body
digitalcake has joined #ruby
momomomomo has quit [Client Quit]
<rjhunter>
Sail: it's rare that you need to refer to an array by numeric index like that, though, so if you're ready to have your mind blown a bit more, come back :-)
funburn has joined #ruby
<breakingthings>
rjhunter: Wouldn't that get the body of @latestShot, whereas I think he's trying to get the body of a comment via relation to @latestShot…?
burlyscudd has joined #ruby
iamjarvo has quit [Ping timeout: 252 seconds]
<hanmac>
Sail: for some methods that returned an new array like sample will return an new array even if you cann PaginatedList.new().sample
r0bgleeson has quit [Quit: WeeChat 0.4.1]
r0bgleeson has joined #ruby
aetaric has quit [Ping timeout: 260 seconds]
lyanchih has joined #ruby
nemesit|znc has quit [Max SendQ exceeded]
<rjhunter>
breakingthings: I'm kinda guessing based on the dump... If @latestShot is responding to `inspect` the way his dump showed, it looks like @latestShot is an array-like object containing items which all have @body variables
burlyscudd has quit [Client Quit]
nemesit|znc has joined #ruby
<breakingthings>
I thought that dump was a comment. If it was latestShot then you'd be right.
aetaric has joined #ruby
ner0x has joined #ruby
burlyscudd has joined #ruby
sailias has joined #ruby
digitalcake has quit [Ping timeout: 248 seconds]
<Sail>
rjhunter: Just insane! You mentioned its rare to call it by numeric index, why is that?
<Sail>
Is there a fast way to iterate though each one?
Macaveli has joined #ruby
<rjhunter>
there are *so* many ways :-D
alex` has joined #ruby
<Sail>
I know in C langauges i'd have to for-loop it
funburn has quit [Ping timeout: 248 seconds]
<Sail>
but ruby..
<Sail>
So awesome
<rjhunter>
>> [5,6,7,8].each {|n| puts n} # let's start closer to the familiar
<rjhunter>
Sail: close -- you wouldn't need [n] in your case, because "each" would yield the entire comment itself
it_tard has joined #ruby
alekst has joined #ruby
Xiti has joined #ruby
<rjhunter>
which is to say you could write @latestShot.comments.each {|comment| comment.body }
<hanmac>
Sail, you may need this @latestSort.map(&:body).join
alexju has joined #ruby
lkba has joined #ruby
<Morrolan>
rjhunter: comment.body has probably no side-effects, so that wouldn't be too useful.
MrThePlague has joined #ruby
<rjhunter>
Morrolan: you're right, but I'm trying to move a step at a time
<alex`>
rjhunter: STDIN.read if STDIN.fcntl(Fcntl::F_GETFL, 0).zero?
markus_ has quit [Client Quit]
kevind has joined #ruby
phantasm66 has joined #ruby
phantasm66 has joined #ruby
<rjhunter>
alex`: hmmm, nice!
v0n has quit [Ping timeout: 240 seconds]
nism has joined #ruby
Clooth has joined #ruby
<rjhunter>
OK, I'm gonna head off -- don't blow Sail's mind too much all at once now! :-)
hukl has joined #ruby
<Sail>
hahaha
<Sail>
thanks!
alx- has joined #ruby
NinjaPenguin has joined #ruby
<Morrolan>
Hard to believe there's no way to do this which doesn't look like C. :P
Guest32557 has joined #ruby
xk_id has joined #ruby
Xiti has quit [Ping timeout: 265 seconds]
tonni has quit [Remote host closed the connection]
Fly80 has joined #ruby
<Fly80>
hello
it_tard has quit [Ping timeout: 264 seconds]
<shevy>
C is just too dominating
atSetKey has joined #ruby
xk_id has quit [Client Quit]
ce_afk is now known as cescalante
<hanmac>
Ruby needs some thing like Preprocessor macros like in C *run and hides*
diegoviola has quit [Ping timeout: 240 seconds]
<wuest>
hanmac: hehehe, yes >:D
<Fly80>
I'm new to Ruby, i'm looking at OSM RailsPort implementation and I've found an object BoundingBox. Is it a class core-defined or in external gem/package?
<Sail>
I tried writing @latestShot.comments.each {|comment| comment.body }, but its just dumping the whole dataset
<hanmac>
shevy that was a test, it happens for other chars too (and rbx still have a similar bug because it doesnt understand this encoding currectly)
newbiehacker has quit [Read error: Connection reset by peer]
cody-- has joined #ruby
newbiehacker has joined #ruby
tomzx_mac has quit [Ping timeout: 245 seconds]
tziOm has quit [Remote host closed the connection]
Clooth has quit [Quit: Leaving...]
nutella has joined #ruby
Intrepidd has joined #ruby
Macaveli has quit [Remote host closed the connection]
nutella is now known as Guest92431
cody-- has quit [Client Quit]
kaspergrubbe has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
buibex has quit [Remote host closed the connection]
cody-- has joined #ruby
buibex has joined #ruby
Guest92431 has quit [Ping timeout: 240 seconds]
platzhirsch has left #ruby [#ruby]
wildroman has quit [Remote host closed the connection]
wildroman has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
<Briareos1>
Squarepy: it shall be used by a jekyll plugin .. so by "referencing it", I mean to achieve that the final HTML will be able to correctly point to the JS file
Vivekananda_ has joined #ruby
kofno has joined #ruby
fridim_ has quit [Read error: No route to host]
buibex_ has joined #ruby
<Fly80>
shevy: now a language question. If I find something like "if params[:foo]" what does it mean? That the object "params" is an array containing the key "foo"?
jaikeerthi has joined #ruby
digitalcake has joined #ruby
buibex has quit [Ping timeout: 252 seconds]
jlast has joined #ruby
<Intrepidd>
Fly80: params is a hash and :foo is one of its keys
<Squarepy>
Briareos1, ok and where does the html reside?
platzhirsch has joined #ruby
wildroman has quit [Ping timeout: 245 seconds]
<Fly80>
an hash converted with to_s() or something?
robbyoconnor has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
<Briareos1>
Squarepy: the HTML is generated by jekyll and will reside in the according output directory
<Intrepidd>
Fly80: Why converted ?
admin0 has joined #ruby
<Fly80>
don't know, I supposed the Hash was constructed by a function
mengu has quit [Remote host closed the connection]
<_br_>
Does anyone here have a working Warden Strategy for Facebook?
<Briareos1>
but anyway, even before generating the HTML I could still put it into the HTML template, but here the question is: what do I type in my <script ...> tag in order to "access" the JS that's only in the gem
<Briareos1>
^-- Squarepy
jonathanwallace has quit [Read error: Operation timed out]
<Fly80>
Intrepidd: now I understand what a "hash" is in ruby ;-)
nari has joined #ruby
<Intrepidd>
\o/
<workmad3>
Briareos1: one possibility would be to include a 'thor' generator in your gem that will copy the js file out of the gem and into a js/ or javascripts/ folder in the app <-- just pasting across from #rubygems to add to the discussion here :)
<Fly80>
sorry for newbie question ;)
<Squarepy>
thanks workmad3
<shevy>
Fly80 the method is [], you can define such a method on your class
jbpros has quit [Quit: jbpros]
mrsolo_ has quit [Quit: Leaving]
<shevy>
>> class Foo; def [](i); puts 'Input is: '+i; end;end;Foo.new['3']
<shevy>
one could use def self.[] I guess... hmm.... or not? hmmmmm
<workmad3>
Briareos1: afaik, jekyll doesn't have a concept of 'gemified assets', so you basically need a way to copy the js file(s) into the project and then just link to them normally
varfoo has quit [Quit: WeeChat 0.4.0]
ffranz has joined #ruby
<shevy>
>> class Foo; def self.[](i); puts 'Input is: '+i; end;end;Foo['3']
<shevy>
Fly80, yup indeed, one can. looks a bit better
<shevy>
I mean, the usage looks better... the definition is ugly
<Fly80>
in the class that I am looking at, it often uses "self"
<shevy>
for methods?
<shevy>
def self.foo ?
rahulkmr has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
<bean__>
those are class level methods then
<shevy>
perhaps he means stuff like this
<shevy>
def foo
<shevy>
self.bla
<shevy>
self.ble
<shevy>
end
<Fly80>
yes for methods
<Fly80>
like this: def self.from_bbox_params(params)
<shevy>
yeah
<shevy>
a class method
<shevy>
so you can avoid having to type .new
dangerousdave has quit [Quit: Leaving...]
<shevy>
rails loves it because ... things get so much more descriptive!!!
<shevy>
Books.find()
<shevy>
Php.sucks()
<Intrepidd>
:D
<Briareos1>
workmad3: seems like for the first release I'll explain a manual setup accordingly ... in this case there's still the question on how to make it as simple as possible. It's strange saying, "simply do a gem install foo ..AND then, go to ~/.rvm/bar, copy the JS to ... and .. so on. Any ideas?
<Fly80>
ummm... but if it's the class definition, isn't obvious that they are classes' methods?
<shevy>
my only gripe with ruby is that it is too complex for newcomers...
lkba has joined #ruby
<Intrepidd>
It's a bit hard to explain at first
c07952 has joined #ruby
<Intrepidd>
But it's really worth the shot
c07952 has left #ruby [#ruby]
<workmad3>
Briareos1: that's why I'd suggest a thor task
narcan has quit [Ping timeout: 248 seconds]
<workmad3>
Briareos1: as then it's 'gem install foo; then do 'foo install-js'
<workmad3>
Briareos1: and that's a pretty easy thor task to write ;)
<Briareos1>
workmad3: ah ok, never used that before, but sounds like a good idea.
<Briareos1>
thanks for the hint
Soda has joined #ruby
<Fly80>
there are definition with self, and other without, in the same class. Not sure to understand why. Maybe self indicates that the method should be used only with a concrete class?
<Fly80>
otherwise other methods ar like.. static methods?
v0n has joined #ruby
<workmad3>
Fly80: a class method's closest analogue in java would be a static method
<Intrepidd>
class methods (def self.foo) are like static methods in other languages, they do not relate with an instance but the class itself
lyanchih has quit [Quit: lyanchih]
<workmad3>
Fly80: they get called on the class, not on the instance
<Fly80>
ah, so the exact contrary I said :D
<workmad3>
Fly80: and you define them with 'def self.foobar'
<workmad3>
(well, that's one way)
<Fly80>
and from a user of that class?
Zeeraw has quit [Quit: Computer has gone to sleep.]
bklane has joined #ruby
<Intrepidd>
(class << self can be very strange at first)
<workmad3>
ClassName.boobar
<workmad3>
*foobar
mengu has joined #ruby
<Sail>
Hey guys, now that i'm hitting the dribbble servers with my server, i was wondering how i would go about creating a cooldown for data refreshes?
<Fly80>
directly, without creating it
<workmad3>
Intrepidd: you can also do 'def ClassName.foobar' (both inside and outside the class)
<Intrepidd>
Indeed
kaspergrubbe has joined #ruby
<Intrepidd>
Understanding those behaviors (along with the singleton class) is one of the first steps of mastering ruby IMHO
dash_ has quit [Quit: dash_]
<Fly80>
so a client could add a method to an already defined class?
<workmad3>
Fly80: yup
<workmad3>
Fly80: classes in ruby are open anyway
<Intrepidd>
That's the magic with ruby
<Fly80>
eheheh
<Intrepidd>
You can even add a method to an already instanciated object :o
xk_id has joined #ruby
<workmad3>
^^ and to just that object
<Fly80>
and if the object is instantiated and the I add a new method?
<Fly80>
to the class
<silasdavis>
I'm trying to use bootstrap-sass with the rails assets pipeline
<workmad3>
Fly80: then it becomes available
<Fly80>
also to the instance???
funburn has joined #ruby
<workmad3>
Fly80: yup
<silasdavis>
in the sass source the use the image-url helper
<Intrepidd>
silasdavis: You should ask in the #RubyOnRails channel
<Fly80>
wo!
larissa has joined #ruby
funburn has quit [Client Quit]
hugohagogo has quit [Ping timeout: 240 seconds]
ehc has quit [Quit: ehc]
<Intrepidd>
Fly80: Actually each instance has a pointer to its ancestors, if the ancestor changes, the object can use the new methods right away
Kar- has quit [Ping timeout: 240 seconds]
Lewix has joined #ruby
<Fly80>
ah alright
tjbarber has joined #ruby
<workmad3>
Fly80: as Intrepidd says, an instance maintains a pointer to the class, and each class has an ancestors list
mary5030 has joined #ruby
<workmad3>
Fly80: method lookup is simply walking that chain to find a matching method :)
<workmad3>
Fly80: it gets interesting it a method isn't found though ;)
silasdavis has left #ruby ["Leaving"]
<Intrepidd>
It also searches in the included modules
<workmad3>
Intrepidd: included modules are added to the ancestors chain ;)
alexju has quit [Remote host closed the connection]
<Fly80>
okey :) understood
narcan has joined #ruby
alexju has joined #ruby
<workmad3>
Fly80: if you're at the level of following this btw, I'd suggest you read the book 'metaprogramming ruby'
<workmad3>
Fly80: it's a good resource for grokking the ruby object model
<Intrepidd>
Here be dragons
rainbyte16 has joined #ruby
danshultz has joined #ruby
boboc has joined #ruby
<Briareos1>
workmad3: just read your "most recent" post. like it. :)
tagrudev has quit [Remote host closed the connection]
pentameter has joined #ruby
petey has joined #ruby
hugohagogo has joined #ruby
* workmad3
is worried
<workmad3>
what post?
<hanmac>
Intrepidd: it also seaches in the extended or prepended modules
<Fly80>
workmad3: i'm at the "first eye" level of ruby knowledge. I have the need to modify a ruby project for work, so I'm tutorialing and looking the classes at the same time
xjiujiu has quit [Read error: Connection reset by peer]
<Fly80>
learning a new language is always interesting
<workmad3>
Briareos1: are you looking at my site? :/
dash_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
tesuji has quit [Ping timeout: 248 seconds]
brennanMKE has joined #ruby
virtualize has joined #ruby
olivier_bK has joined #ruby
Zeeraw has joined #ruby
byprdct has joined #ruby
jprovazn has quit [Quit: Leaving]
<Briareos1>
workmad3: blog
<Briareos1>
workmad3: robots.txt said, it's fine
<Briareos1>
no Disallow Briareos1 there :D
enebo has joined #ruby
<olivier_bK>
i try to call a variable in system command do you know how i can do that ? getPid = system('ps -ef | grep "#{get_Pid_script}"')
havenwood has joined #ruby
<Intrepidd>
olivier_bK: You can use backticks to call a system command : result = `ls -l`
tylersmith has joined #ruby
<workmad3>
Briareos1: I'd like to defend that blog by saying the last posts on there I did while reading 'Zen and the Art of Motorcycle Maintenance' and was really bored on a bus
<Briareos1>
must be tough having to think of motorcicles while actually being on the bus ...
<olivier_bK>
Intrepidd, thanks
elfenars has joined #ruby
kofno has quit [Quit: Lost terminal]
zeel has left #ruby [#ruby]
<Intrepidd>
olivier_bK: Also in your example your string is defined with simple quotes
<Intrepidd>
so #{...} won't work in there
wildroman has joined #ruby
tkuchiki has quit [Remote host closed the connection]
rahulkmr has joined #ruby
tkuchiki has joined #ruby
Alina-malina has joined #ruby
mlpinit has quit [Read error: Connection reset by peer]
yalue has joined #ruby
VTLob has joined #ruby
carraroj has quit [Ping timeout: 248 seconds]
dash_ has quit [Quit: dash_]
mlpinit has joined #ruby
atSetKey has joined #ruby
deweichen has joined #ruby
tkuchiki has quit [Ping timeout: 245 seconds]
<workmad3>
Briareos1: Zen and the Art of Motorcycle Maintenance is a great book btw :) well worth reading if you enjoy semi-autobigraphical philosophy novels
raphaelivan has joined #ruby
alup has quit [Quit: Leaving]
rdark has quit [Ping timeout: 248 seconds]
speakingcode-wor has quit [Read error: Connection reset by peer]
raphaelivan has quit [Read error: Connection reset by peer]
mlpinit has quit [Ping timeout: 248 seconds]
raphaelivan has joined #ruby
momomomomo has joined #ruby
atSetKey has quit [Ping timeout: 240 seconds]
Monie has joined #ruby
mlpinit has joined #ruby
<Fly80>
what is this def? def expand!(bbox, margin = 0)
Ox6abe has quit [Remote host closed the connection]
<Fly80>
is a method?
utkarsh has quit [Remote host closed the connection]
mfilipe has joined #ruby
Ox6abe has joined #ruby
<workmad3>
Fly80: yup
rdark has joined #ruby
mlpinit has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
Eaven has quit [Read error: Connection reset by peer]
nism has quit [Read error: Connection reset by peer]
mlpinit has joined #ruby
<Fly80>
it's a special named method? why that "!" before parameters?
<workmad3>
Fly80: it's part of the method name
speakingcode-wor has joined #ruby
<Todd>
! signifys that it will change the object in place
<mfilipe>
I already tried everything from stackoverflow
d2dchat has joined #ruby
<olivier_bK>
theyre is a counterpart in ruby for $? return 0 if the last command are good
wallerdev has joined #ruby
boboc has quit [Remote host closed the connection]
<workmad3>
Todd: in ruby, the convention is that ! is for a method variant that does something different or potentially dangerous compared to the non-! variant
<Fly80>
ah, ok, a convention
<Todd>
workmad3, except that most of the methods I've worked with which use ! change the object in place
<workmad3>
Todd: which is why there are plenty of in-place modification methods that have no !... because there's no non-! variants
<workmad3>
Todd: yes... when there's a non-! variant that doesn't
Guest65133 has joined #ruby
<workmad3>
Todd: but Array#push, Array#delete, Hash#delete...
<Todd>
workmad3, fair enough
shaunbak_ has quit [Remote host closed the connection]
shaunbaker has joined #ruby
Ox6abe has quit [Ping timeout: 248 seconds]
<Guest65133>
Hello, I'm testing a new IRC client, can someone confirm receiving this? :)
<Fly80>
in the same way i think a method could have a "?" at the end? I see a "update!(bbox) unless complete?"
jonathanwallace has joined #ruby
<workmad3>
Fly80: yup
<Guest65133>
thanks
<Todd>
different or dangerous.. ie. mostly changing an object in place :)
<workmad3>
Todd: that's fairly common yes :)
<workmad3>
Todd: if there's a variant that doesn't, anyway ;)
kindjal has joined #ruby
<Fly80>
and what the convention says about "?"
<workmad3>
Fly80: booleans
Elhu has joined #ruby
<workmad3>
Fly80: so the method should be a query method that returns true/false
<tjbarber>
I think that might be it, thanks eval-in__
<tjbarber>
sorry, banisterfiend ;P
michael_mbp is now known as zz_michael_mbp
cody-- has quit [Quit: derp]
wiak has joined #ruby
Bry8Star{T2 has quit [Remote host closed the connection]
Squarepy has quit [Ping timeout: 245 seconds]
zz_tsykoduk is now known as tsykoduk
zz_michael_mbp is now known as michael_mbp
rahulkmr has quit [Ping timeout: 264 seconds]
siwica has joined #ruby
cody-- has joined #ruby
hukl has joined #ruby
hukl has quit [Remote host closed the connection]
Bry8Star{T2 has joined #ruby
platzhirsch1 has joined #ruby
jaikeerthi has quit [Quit: Leaving.]
utkarsh has quit [Changing host]
utkarsh has joined #ruby
xk_id has joined #ruby
platzhirsch has quit [Ping timeout: 248 seconds]
phantummm has joined #ruby
Ahti333 has quit [Ping timeout: 245 seconds]
aryaching has joined #ruby
rippa has joined #ruby
larissa has quit [Quit: Leaving]
arctarus has joined #ruby
sayan has joined #ruby
Intrepid_ has quit [Ping timeout: 264 seconds]
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
Xeago has quit [Remote host closed the connection]
Intrepidd has joined #ruby
ahawkins has quit [Quit: leaving]
nari has quit [Ping timeout: 248 seconds]
m8 has joined #ruby
vlad_starkov has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
fourqqq has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
Guest65133 is now known as kent_k
btanaka has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
urbanmonk has joined #ruby
admin0 has quit [Quit: Leaving]
ghr has joined #ruby
apeiros has quit [Remote host closed the connection]
<Fly80>
what does it mean a method finishing with "self" ?
<hoelzro>
it returns self
Monie has quit [Ping timeout: 265 seconds]
apeiros has joined #ruby
cody-- has quit [Quit: derp]
publicjohn has joined #ruby
<Fly80>
the instance of the class?
amritanshu_RnD has quit [Quit: Leaving]
publicjohn has quit [Client Quit]
alex__c2022 has quit [Quit: alex__c2022]
<hoelzro>
yeah
<hoelzro>
the current invocant
maletor has joined #ruby
platzhirsch1 has left #ruby [#ruby]
cody-- has joined #ruby
gyre007 has joined #ruby
Monie has joined #ruby
<Fly80>
ah okey, in the !-methods it's needed because the instance is modified?
geggam_ has joined #ruby
blooberr_ has quit [Ping timeout: 246 seconds]
cody-- has quit [Client Quit]
Seventoes has joined #ruby
heidi has quit [Quit: Leaving.]
coderhs has quit [Quit: Leaving]
apeiros has quit [Ping timeout: 252 seconds]
jeffdb has joined #ruby
haxrbyte has quit [Remote host closed the connection]
bluenemo has quit [Remote host closed the connection]
haxrbyte has joined #ruby
dayepa has quit [Ping timeout: 264 seconds]
cody-- has joined #ruby
[0x1a]_ has quit [Ping timeout: 248 seconds]
maletor has quit [Ping timeout: 248 seconds]
dhruvasagar has quit [Ping timeout: 248 seconds]
[Neurotic] has quit [Ping timeout: 260 seconds]
siwica has quit [Quit: siwica]
heidi has joined #ruby
alex` has quit [Ping timeout: 250 seconds]
jtvhantise has joined #ruby
Intrepidd has quit [Ping timeout: 253 seconds]
dayepa has joined #ruby
v0n has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
sedeki has quit [Quit: Computer has gone to sleep.]
b00stfr3ak has joined #ruby
kenneth has quit [Quit: kenneth]
ghr has quit [Quit: Computer has gone to sleep.]
d2dchat has quit [Remote host closed the connection]
Ahti333 has joined #ruby
burlyscudd has quit [Quit: Leaving.]
boboc has joined #ruby
rhunter has quit [Ping timeout: 265 seconds]
mpeg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wildroman has quit [Remote host closed the connection]
ghr has joined #ruby
mengu has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 252 seconds]
wildroman has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
Bofu2U has quit [Ping timeout: 248 seconds]
renanoronfle has joined #ruby
mpeg has joined #ruby
dlind has quit [Ping timeout: 246 seconds]
<boboc>
guys in Ruby any method could take a block parameter? i mean it is optional to any method?
iamjarvo has quit [Remote host closed the connection]
lyanchih has quit [Quit: lyanchih]
Ahti333 has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
Ahti333 has joined #ruby
heidi has quit [Quit: Leaving.]
atSetKey has joined #ruby
mengu has quit [Ping timeout: 245 seconds]
wildroman has quit [Ping timeout: 252 seconds]
ioNull has quit [Ping timeout: 265 seconds]
baordog_ has joined #ruby
<hanmac>
boboc, yes, but some require an block
aryaching has joined #ruby
<boboc>
hanmac: in the docs how can i tell the difference between required block or optional block?
<Briareos1>
workmad3: i'll have a look at it
jbpros has joined #ruby
Sail has quit [Ping timeout: 240 seconds]
Snail has quit [Ping timeout: 240 seconds]
<workmad3>
boboc: there's no difference in how they're defined
ukd1 has quit [Remote host closed the connection]
deens has joined #ruby
Bofu2U has joined #ruby
<workmad3>
boboc: it's just if a method calls 'yield' without checking 'block_given?' then a block is needed
ukd1 has joined #ruby
mocx has joined #ruby
joshAnderson99 has joined #ruby
mocx has left #ruby [#ruby]
<boboc>
workmad3: ok,thanks
ioNull has joined #ruby
mpeg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3>
boboc: or if the method has an explicit &blk parameter and doesn't check if it's nil before calling it ;)
iamjarvo has quit [Ping timeout: 264 seconds]
ioNull has quit [Max SendQ exceeded]
dhruvasagar has joined #ruby
<hanmac>
boboc: for sample each returns an Enumerator is no block is given
atSetKey has quit [Ping timeout: 245 seconds]
ioNull has joined #ruby
<hanmac>
but for sample Enumerable#chunk does not work without block
brennanMKE has quit [Remote host closed the connection]
sevenseacat has quit [Quit: Leaving.]
<boboc>
workmad3: if a method has a Proc or a block as argument how the syntax looks like? "&blk" ?
alex__c2022 has joined #ruby
<boboc>
with & prefixed?
<workmad3>
boboc: that's for making the block argument explicit
<joshAnderson99>
hi, am trying to install libxml on windows ruby, and though install says "1 gem installed", in the C:\Ruby200\lib\ruby\gems\2.0.0\gems\libxml-ruby-1.1.3-x86-mswin32-60\ext\libxml, build.log says rake aborted!
<joshAnderson99>
No Rakefile found (looking for: build.rake). When I try to require 'libxml', it says LoadError: 126: The specified module could not be found. - C:/Ruby200/lib/ruby/gems/2.0.0/gems/libxml-ruby-1.1.3-x86-m
<joshAnderson99>
swin32-60/lib/libxml_ruby.so. Ideas anyone? New to ruby, so not exactly sure why there's a rake error when installing from gem file.
spider-mario has joined #ruby
zarubin has quit [Ping timeout: 248 seconds]
beilabs has quit [Ping timeout: 240 seconds]
glaksmono has joined #ruby
jcromart_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saarinen has joined #ruby
ukd1 has quit [Ping timeout: 264 seconds]
aganov has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
mlpinit_ has quit [Remote host closed the connection]
<_br_>
joshAnderson99: Gem has bindings to LibXML FFI I suppose. Needs locally compile libxml library in order to work correctly. Are you using a Linux/Unix shell emulator?
Tearan has joined #ruby
haxrbyte has joined #ruby
basmoura has joined #ruby
Jdubs has joined #ruby
senayar has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
zarubin has joined #ruby
funburn has joined #ruby
renanoronfle has quit [Quit: This computer has gone to sleep]
senayar has joined #ruby
funburn has quit [Client Quit]
jbpros has quit [Quit: jbpros]
dangerousdave has joined #ruby
raphaelivan has quit [Quit: Leaving.]
Emmanuel_Chanel has joined #ruby
pushpak has joined #ruby
hamakn has quit [Remote host closed the connection]
segmond has quit [Ping timeout: 250 seconds]
gnrlbzik_ has joined #ruby
hamakn has joined #ruby
burlyscudd has quit [Quit: Leaving.]
Steve_1982 has joined #ruby
RubNoob has joined #ruby
pushpak has quit [Client Quit]
<olivier_bK>
how can i find a pid by name or full command line in Ruby
marcdel has joined #ruby
gnrlbzik_ has quit [Remote host closed the connection]
<Briareos1>
workmad3: i'm currently at https://github.com/erikhuda/thor/wiki/Actions <<< do you happen to know if there's a variable that reliably points to the gem path? (so that i can use cope_file("$GEMPATH/foo/bar.js", "./bar.js") or similar
peregrine81 has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
atSetKey has joined #ruby
hamakn has quit [Ping timeout: 240 seconds]
<workmad3>
Briareos1: I'd use '__FILE__'
sguselnikov has joined #ruby
<workmad3>
Briareos1: as that's the current file's path (inc filename)
sguselnikov has quit [Client Quit]
barratt has quit [Ping timeout: 252 seconds]
i_s has quit [Remote host closed the connection]
marcdel has quit [Ping timeout: 240 seconds]
elaptics is now known as elaptics`away
i_s has joined #ruby
<workmad3>
Briareos1: so if you do the fairly usual thing of having this in a bin/ directory in your gem, you can do 'File.dirname(__FILE__) + '../' ' to get the root path of the gem
i_s has quit [Read error: Connection reset by peer]
i_s has joined #ruby
<Briareos1>
workmad3: great! thanks a lot
Ace__ has quit [Ping timeout: 240 seconds]
burlyscudd has joined #ruby
justanotherjason has quit [Quit: justanotherjason]
mark_locklear has quit [Ping timeout: 248 seconds]
whunt has joined #ruby
aspires has quit [Quit: aspires]
kaldrenon has quit [Remote host closed the connection]
Clooth has joined #ruby
i_s has quit [Ping timeout: 248 seconds]
freezey has joined #ruby
kaldrenon has joined #ruby
tjbarber has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
io_syl has joined #ruby
aspires has joined #ruby
obs has quit [Quit: Konversation terminated!]
<joshAnderson99>
_br_: i have mingw and vs2010 compilers installed, but no unix shell emulator like cygwin. would have thought it would compile outside of cygwin, othewise it might only run inside it, rather than in eclipse, the IDE i'm using.
chairabanta has joined #ruby
chairabanta has quit [Client Quit]
guillaum has joined #ruby
Alex- has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 252 seconds]
alx- has joined #ruby
<joshAnderson99>
havenwood: thanks, relevant page you mentioned, the suggestions on which i've tried but without luck.
Sail has joined #ruby
olivier_bK has quit [Ping timeout: 264 seconds]
Snail has joined #ruby
guillaum has quit [Client Quit]
Sail is now known as Guest84616
NinjaPenguin_ has joined #ruby
twoism has joined #ruby
NinjaPenguin has quit [Ping timeout: 248 seconds]
guillaum has joined #ruby
xxi is now known as ixx
kaldrenon has quit [Ping timeout: 240 seconds]
DanKnox_away is now known as DanKnox
dash_ has joined #ruby
Eaven has quit [Remote host closed the connection]
alx- has quit [Read error: Connection reset by peer]
carraroj has quit [Quit: Konversation terminated!]
burlyscudd has joined #ruby
timonv_ has quit [Remote host closed the connection]
tjad has quit [Ping timeout: 252 seconds]
alx- has quit [Read error: Connection reset by peer]
alx- has joined #ruby
alx- has quit [Client Quit]
Steve_1982 has quit []
brennanMKE has quit [Remote host closed the connection]
<joshAnderson99>
_HolyCow: ta, "Note these binaries are available in the liblibs directory", not that i've found this directory, presumably it's lib, and the binaries are the .dlls. copied to \bin as advised, but issue remains unfortunately. have posted to ruby mailing list, with more details, including outputs, which might be more informative.
brennanMKE has joined #ruby
burlyscudd has quit [Client Quit]
jcromart_ has joined #ruby
SilverKey has quit [Quit: Zzzzzz.]
zz_michael_mbp is now known as michael_mbp
urbanmonk has joined #ruby
urbanmonk has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
dangerousdave has quit [Read error: Connection reset by peer]
hanmac has quit [Read error: Connection reset by peer]
hanmac has joined #ruby
Nahra_ has quit [Quit: leaving]
dangerousdave has joined #ruby
Zai00 has quit [Quit: Zai00]
einarj has joined #ruby
brennanMKE has quit [Ping timeout: 245 seconds]
c0rn has joined #ruby
mercwith1mouth has quit [Ping timeout: 240 seconds]
[Neurotic] has joined #ruby
gnrlbzik has quit [Remote host closed the connection]
heidi has joined #ruby
w3pm has joined #ruby
peregrine81 has quit []
kaspergrubbe has joined #ruby
clov3r has joined #ruby
[0x1a]_ has joined #ruby
fourqqq has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
geggam has quit [Disconnected by services]
geggam_ is now known as geggam
zeade has joined #ruby
fgo has quit [Remote host closed the connection]
geggam_ has joined #ruby
Al___ has quit [Quit: Al___]
einarj has quit [Ping timeout: 252 seconds]
codecop has joined #ruby
Ox6abe_ has joined #ruby
guillaum has quit [Quit: Leaving...]
deens has quit [Remote host closed the connection]
kaspergrubbe has quit [Ping timeout: 252 seconds]
Ox6abe has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
marcdel has joined #ruby
jbpros has joined #ruby
kent_k has left #ruby [#ruby]
Nahra has joined #ruby
Authenti1ator has joined #ruby
Authenti1ator has quit [Client Quit]
Ox6abe has joined #ruby
Elhu has joined #ruby
RichardBaker has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 248 seconds]
arastu has quit [Read error: Connection reset by peer]
elfenars has quit [Quit: Leaving.]
arastu has joined #ruby
elfenars has joined #ruby
banisterfiend has joined #ruby
lucazi has quit [Ping timeout: 240 seconds]
pellenation has quit [Quit: Leaving.]
Ox6abe_ has quit [Ping timeout: 248 seconds]
arastu has left #ruby [#ruby]
benweint has joined #ruby
nouitfvf_ has joined #ruby
jbpros has quit [Quit: jbpros]
dhruvasagar has quit [Ping timeout: 264 seconds]
Fire-Dragon-DoL has joined #ruby
atSetKey has joined #ruby
nouitfvf has quit [Ping timeout: 245 seconds]
schaerli has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
Guest32557 has quit [Ping timeout: 248 seconds]
Emmanuel_Chanel has joined #ruby
tatsuya_o has joined #ruby
guillaum has joined #ruby
jlebrech has quit [Quit: Konversation terminated!]
guillaum has quit [Client Quit]
alexju has joined #ruby
sedeki has joined #ruby
tjad has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
w3pm has quit [Quit: Leaving]
gja has quit [Quit: This computer has gone to sleep]
kenneth has joined #ruby
sambao21 has joined #ruby
atSetKey has quit [Ping timeout: 265 seconds]
Ox6abe_ has joined #ruby
BSaboia has quit [Ping timeout: 264 seconds]
tatsuya_o has quit [Ping timeout: 248 seconds]
hamakn has joined #ruby
deweichen has quit [Remote host closed the connection]
interactionjaxsn has quit [Ping timeout: 264 seconds]
gmas has joined #ruby
Ox6abe has quit [Ping timeout: 248 seconds]
interactionjaxsn has joined #ruby
sedeki has quit [Quit: Computer has gone to sleep.]
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jerrad has quit [Quit: Leaving...]
marcdel has joined #ruby
Sail has joined #ruby
sedeki has joined #ruby
Snail has joined #ruby
<Briareos1>
workmad3: As I understood, the script in /bin will be available "system wide" upon "gem install mygem" ... but "thor list" is empty. Any idea regarding this?
fgo has quit [Ping timeout: 265 seconds]
Sail is now known as Guest7901
zigomir has joined #ruby
codecop has quit [Remote host closed the connection]
kobain has joined #ruby
codecop has joined #ruby
byprdct has joined #ruby
<apeiros>
Briareos1: why'd a script in /bin appear in `thor list`?
RichardBaker has joined #ruby
headius has joined #ruby
Guest7901 has quit [Ping timeout: 264 seconds]
Snail has quit [Ping timeout: 265 seconds]
<Briareos1>
apeiros: thought it'd be autodetected as such. just added spec.executables and now it's available "system wide"
smirn0v has joined #ruby
<apeiros>
Briareos1: system wide yes, but why thor list?
shadoi has quit [Quit: Leaving.]
<apeiros>
what does thor list have to do with ordinary executables?
d2dchat has joined #ruby
<Briareos1>
apeiros: it's a .thor, so I thought thor would be aware of it
shadoi has joined #ruby
Voodoofish430 has joined #ruby
mlpinit has quit [Remote host closed the connection]
skaflem has quit [Ping timeout: 240 seconds]
mlpinit has joined #ruby
jerrad has joined #ruby
jerrad has quit [Changing host]
jerrad has joined #ruby
burlyscudd has joined #ruby
DanKnox is now known as DanKnox_away
aagdbl has joined #ruby
jerrad is now known as Underbyte
__Grabarz__ has joined #ruby
aagdbl has quit [Client Quit]
endash has joined #ruby
codecop has quit [Remote host closed the connection]
alvaro_o has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
codecop has joined #ruby
carraroj has joined #ruby
Elhu has joined #ruby
sedeki has quit [Quit: Computer has gone to sleep.]
jonathanwallace has joined #ruby
codecop has quit [Remote host closed the connection]
pwh has quit []
codecop has joined #ruby
atSetKey_ has joined #ruby
iamjarvo_ has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
gdoteof has joined #ruby
<gdoteof>
is there a script/library for getting shifted keys
shaunbaker has joined #ruby
<gdoteof>
so shift_func('6') == '^'
<gdoteof>
and x == shift_func(shift_func(x))
soheil has quit [Read error: Operation timed out]
sambao21 has quit [Quit: Computer has gone to sleep.]
shaunbaker has quit [Remote host closed the connection]
soheil has joined #ruby
<bean__>
gdoteof: I'd doubt it, though it wouldn't be too hard to write a lookup for it.
clov3r has quit [Remote host closed the connection]
arastu has joined #ruby
snuffeluffegus has joined #ruby
momomomomo has joined #ruby
<bean__>
curses might have something
sambao21 has joined #ruby
burlyscudd has quit [Ping timeout: 265 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
maroloccio has joined #ruby
<gdoteof>
bean__: right i could make a lookup, i just didn't want to duplicate effort
Xeago has joined #ruby
Ox6abe has joined #ruby
hadees has quit [Ping timeout: 264 seconds]
havenn has quit [Remote host closed the connection]
Ox6abe has quit [Remote host closed the connection]
momomomomo has quit [Client Quit]
Ox6abe has joined #ruby
kil0byte has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 248 seconds]
jrhorn424 has joined #ruby
sambao21 has quit [Ping timeout: 248 seconds]
deens has joined #ruby
dhruvasagar has joined #ruby
AndChat| has quit [Ping timeout: 264 seconds]
kpshek has quit []
lucazi has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
dangerousdave has joined #ruby
Ox6abe has quit [Ping timeout: 245 seconds]
arietis has joined #ruby
TMM has quit [Quit: Ex-Chat]
rezzack has joined #ruby
kpshek has joined #ruby
aspires has quit [Quit: aspires]
Banistergalaxy has joined #ruby
mansi has quit [Remote host closed the connection]
klaut has joined #ruby
MrHacks has joined #ruby
arastu has left #ruby ["Leaving"]
Xeago has quit [Remote host closed the connection]
Squarepy has joined #ruby
<MrHacks>
Why does this line work: table.map { |i| i.map{ |j| j = j.gsub(res[0],'\1'); j = j.gsub(res[1],'\1'); j = j.gsub(res[2],'\1'); j = j.gsub(res[3],'\1') } } but this line doesn't: table.map { |i| i.map{ |j| res.each { |k| j = j.gsub(k,'\1') } } }
<Mon_Ouie>
Explain how it doesn't work (what it does and what it's supposed to do)
pwh has joined #ruby
<MrHacks>
firstly, res = [/<span class="flagicon">.*<\/span>(.*)/, /<a[^>]*>(.*)<\/a>/, /<t[dh][^>]*>(.*)<\/t[dh]>/, /(.*)<sup[^>]*>.*<\/sup>/]
<MrHacks>
Secondly, this is supposed to replace certain strings found in certain shells.
<MrHacks>
s/shells/cells
axl_ has quit [Quit: axl_]
<MrHacks>
of the array of arrays
vpretzel has joined #ruby
<apeiros>
MrHacks: each returns the receiver
<apeiros>
MrHacks: map returns the values of the block
<MrHacks>
Yes, I know that, apeiros
DanKnox_away is now known as DanKnox
<apeiros>
MrHacks: your code doesn't make it look like you did.
sambao21 has joined #ruby
<apeiros>
whether you assign the blocks value to an lvar or not doesn't change the result.
<Mon_Ouie>
And you need the block you pass to map to return the new value you want for the item it gives you
<Mon_Ouie>
(well, that's just another way to phrase the same thing actually)
<apeiros>
`res.each { |k| j = j.gsub(k,'\1') }` this is a verbose way to say `res`
<apeiros>
and it doesn't make me think you understood the difference of map vs. each.
kaspergrubbe has joined #ruby
soheil has quit [Read error: Connection timed out]
tjbiddle has joined #ruby
Ox6abe has joined #ruby
<MrHacks>
OK, aperos, when I do something like this table.map{ |i| i.map { |j| j } }, IRB returns the arrays
soheil has joined #ruby
<apeiros>
my nick isn't aperos either. I'm not something served before meals.
<banisterfiend>
haha
<MrHacks>
I'm trying to apply each regular expression to a line.
<apeiros>
(though, that'd be without s anyway)
jrhe has joined #ruby
tatsuya_o has joined #ruby
<banisterfiend>
Mon_Ouie how's Oz treating u these days?
<MrHacks>
this line also work but I want something prettier: table.map { |i| i.map{ |j| j.gsub(res[0],'\1').gsub(res[1],'\1').gsub(res[2],'\1').gsub(res[3],'\1') } }
<apeiros>
MrHacks: again, `res.each …` (which you wrote) will just return `res`, which then will be the return value of your block to map and hence the result of your map.
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Mon_Ouie>
Especially the part where you show it off to people without telling them about the fancy block selection algorithm :)
codecop has quit [Remote host closed the connection]
smirn0v has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
you're looking for inject there.
codecop has joined #ruby
<banisterfiend>
Mon_Ouie that's cool, do u have he code on github?
<MrHacks>
table.map { |i| i.map{ |j| res.____ { |k| j = j.gsub(k,'\1') } } } # fill in the blank, reminder res is an array of regular expressions
buibex has joined #ruby
xkickflip has quit [Ping timeout: 264 seconds]
xkickflip_ is now known as xkickflip
RORgasm_ has joined #ruby
nhmood has quit [Quit: leaving]
mlpinit_ has joined #ruby
gyre007 has joined #ruby
nwertman has joined #ruby
iamjarvo_ has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
newbiehacker has quit [Read error: Connection reset by peer]
nhmood has joined #ruby
pellenation has quit [Client Quit]
buibex has quit [Remote host closed the connection]
mlpinit has quit [Ping timeout: 248 seconds]
<MrHacks>
The output should be an array with HTML stripped out
kaspergrubbe has quit [Ping timeout: 264 seconds]
<MrZYX>
table.map { |row| row.map { |column| res.inject(column) { |value, pattern| value.gsub(pattern, '\1') } } } # res is another bad name I had no influence to
maz-dev has quit [Remote host closed the connection]
nhmood has quit [Remote host closed the connection]
rahulkmr has quit [Ping timeout: 265 seconds]
<MrZYX>
now read up again what inject does and why that works
aspires has quit [Quit: aspires]
RORgasm has quit [Ping timeout: 248 seconds]
<Mon_Ouie>
Well, besides the problem you have here (which MrZYX explained), HTML manipulations are better performed by HTML parsers than by regular expressions
<apeiros>
+1
ewnd9 has quit [Ping timeout: 245 seconds]
<MrZYX>
that anyway
jlast has quit [Ping timeout: 248 seconds]
fgo has joined #ruby
<MrHacks>
why is res a bad name for an Array?
<Eiam>
result
<Eiam>
not res
<apeiros>
MrHacks: show it to anybody and ask what it means
<Eiam>
if you must
<MrZYX>
result, resource, resolution?
<MrZYX>
what does it even stand for?
<MrHacks>
res is plural for RE
<Eiam>
in inject I usually use "sum"
<apeiros>
res-tarted
<MrHacks>
RE = Regexp
<apeiros>
gah, typo
<Eiam>
|sum,value|
echevemaster has joined #ruby
<Eiam>
keeps it mentally clean for me in inject
<Mon_Ouie>
Hah, I was wondering why it was called "result" from the start :p
schaerli has quit [Remote host closed the connection]
<Eiam>
I'd use each_with_object instead of inject if it were shorter to type
<MrZYX>
MrHacks: the fact that we can debate what it stands for makes it already a bad name
poisonarms has quit [Quit: Computer has gone to sleep]
k610 has joined #ruby
<MrHacks>
rea
<MrHacks>
Regular Expression Array
nwertman has quit [Ping timeout: 245 seconds]
platzhirsch1 has joined #ruby
<apeiros>
good thing I don't have to work with your code.
* Eiam
is both glad and sad apeiros doesn't work on his code
<Mon_Ouie>
res is obviously Latin for "things".
<apeiros>
in media res
<apeiros>
now if I only remembered what that meant
<MrHacks>
Good point, Mon_Ouie
<MrZYX>
don't make up acronyms describing the technical aspect of your data
<platzhirsch1>
Any idea how I could make Hash.new { |h,k| h[k] = {} } nest with arbitrary need? So everytime there is key, a hash gets nested
<MrZYX>
describe your data
<platzhirsch1>
arbitrary depth*
platzhirsch1 is now known as platzhirsch
<Mon_Ouie>
apeiros: 'In the middle of the action' I believe
<Eiam>
platzhirsch: try default_proc?
plotter has joined #ruby
plotter has quit [Changing host]
plotter has joined #ruby
aspires has joined #ruby
<apeiros>
I think you could translate "things" as "action" depending on context
leynos has quit [Quit: Off to dreams of Laserdiscs and Neo-Geos]
<platzhirsch>
Eiam: I could only imagine a proc that calls itself recursively
siwica has joined #ruby
<Eiam>
hmm yes that would only got 1 level deep anyway
klaut has quit [Remote host closed the connection]
peregrine81 has joined #ruby
<platzhirsch>
that's dark magic
snuffeluffegus has quit [Client Quit]
pushpak has joined #ruby
snuffeluffegus has joined #ruby
<Eiam>
its surreal that I was reading about this (and doing something like it) last night
<Eiam>
I don't get why you have to say &h
<Eiam>
default_proc already returns a proc
<Mon_Ouie>
You just need to get a reference to that proc again to pass it to Hash.new
SilverKey has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
pellenation has joined #ruby
<Mon_Ouie>
It returns a proc, but you have to pass it as a block, not as a regular argument
<apeiros>
Eiam: because you don't want a proc as default value
jrhe has quit [Quit: jrhe]
<apeiros>
you want a block
<apeiros>
Hash.new(proc)[:x] == proc # true
<MrHacks>
I find it interest that when I run that code through IRB, the debugger says it ran an 'each' inside the 'inject' statement despite the fact I did not use an 'each' statement
<platzhirsch>
Hash.new { |h,k| h[k] = Hash.new(self) } would do it, too
<apeiros>
no
krawchyk_ has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
siwica has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
<Mon_Ouie>
inject needs to use each to function, as do all methods in Enumerable
helloworld has quit [Ping timeout: 245 seconds]
<MrZYX>
MrHacks: inject comes from the Enumerable module, which uses #each internally
Xeago has joined #ruby
carraroj has joined #ruby
<Eiam>
ah I see
Sail has joined #ruby
sambao21 has quit [Read error: Connection reset by peer]
<platzhirsch>
ok, got it
<MrHacks>
Then why use #inject when I can easily use 'each'?
Snail has joined #ruby
x2z has joined #ruby
Sail is now known as Guest23250
<apeiros>
…
<Mon_Ouie>
inject is meant to abstract away the pattern of updating the accumulator yourself and returning its final value yourself
x2z has left #ruby [#ruby]
<Mon_Ouie>
Which all can be sources of mistakes, an example of that being your original code
<apeiros>
MrHacks: how about you bother to read the docs? instead of us relying to recount you the tales of the mighty ruby docs?
gyre007 has quit [Remote host closed the connection]
<apeiros>
*relying on us to…
<apeiros>
whatevs
beilabs has quit [Ping timeout: 252 seconds]
deweichen has joined #ruby
gyre007 has joined #ruby
decoponio has quit [Quit: Leaving...]
<MrHacks>
I'm reading the docs, apeiros, the examples for inject aren't germaine to what I need
carraroj has quit [Client Quit]
banisterfiend has quit [Quit: Computer has gone to sleep.]
krawchyk has quit [Ping timeout: 252 seconds]
deweichen has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
teddyp1cker has joined #ruby
SilverKey has quit [Quit: Cheerio!]
<apeiros>
MrHacks: and even if - from reading the docs you still think each and inject did the same? srsly…
ehc has joined #ruby
beilabs has joined #ruby
<MrZYX>
MrHacks: they key to programming is abstraction, the examples are to illustrate the behavior of a method, not to demonstrate all possible usecases
BizarreCake has quit [Read error: Operation timed out]
Snail has quit [Ping timeout: 252 seconds]
Guest23250 has quit [Ping timeout: 248 seconds]
choobie has joined #ruby
<MrHacks>
I had used "each" in similar context in another peice of code. inside a map it doesn't seem to want to work that way
carraroj has quit [Quit: Konversation terminated!]
marcdel has joined #ruby
<MrHacks>
using irssi inside tmux. It made some funkey looking stuff but didn't exceed the line
<atmosx>
pushpak: is that client any good?
iamjarvo has quit [Remote host closed the connection]
zz_tsykoduk has joined #ruby
<MrHacks>
To everyone having headaches with their IRC, sorry
jkamenik has quit [Quit: Leaving.]
s0ber has quit [Read error: Connection reset by peer]
helloworld has quit [Ping timeout: 245 seconds]
yalue has quit [Read error: Connection reset by peer]
<MrHacks>
On the other hand, who was phone?
iamjarvo has joined #ruby
twoism has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
digitalcake has joined #ruby
iamjarvo has joined #ruby
<pushpak>
atmosx: totally worth it
btanaka has quit [Remote host closed the connection]
heidi has joined #ruby
<Mon_Ouie>
You don't need to use Rails to use a proper XML (or HTML) parser
whunt has joined #ruby
<pushpak>
inline images, pastebins mp3 what not
peterhu has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
s0ber has joined #ruby
<Mon_Ouie>
Just install e.g. Nokogiri and use it
theRoUS has quit [Ping timeout: 252 seconds]
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
sparq_ has joined #ruby
mary5030 has joined #ruby
i_s has quit [Ping timeout: 252 seconds]
T_T has joined #ruby
btanaka has joined #ruby
mlpinit has joined #ruby
theRoUS has joined #ruby
freezey has quit [Remote host closed the connection]
aspires has quit [Quit: aspires]
maz-dev has joined #ruby
Jonah11_ has quit [Read error: Connection reset by peer]
harrymoreno has quit [Quit: harrymoreno]
mary5030_ has joined #ruby
JohnBat26 has quit [Ping timeout: 245 seconds]
Jonah11_ has joined #ruby
Jonah11_ has quit [Client Quit]
gyre007 has joined #ruby
senayar has joined #ruby
felixjet has quit [Read error: Connection reset by peer]
freezey has joined #ruby
felixjet has joined #ruby
felixjet has quit [Client Quit]
felixjet has joined #ruby
sparq_ has quit [Ping timeout: 264 seconds]
mary5030 has quit [Ping timeout: 245 seconds]
vim_shim has joined #ruby
aspires has joined #ruby
jonahR has quit [Quit: jonahR]
peterhu has joined #ruby
axl_ has quit [Quit: axl_]
theRoUS has quit [Ping timeout: 245 seconds]
deception has quit [Quit: Goodbye]
JohnBat26 has joined #ruby
joshAnderson99 has quit [Ping timeout: 264 seconds]
sayan has quit [Quit: Leaving]
carlyle has joined #ruby
gyre007 has quit [Ping timeout: 245 seconds]
harrymoreno has joined #ruby
elaptics`away is now known as elaptics
kindjal has quit [Quit: Computer has gone to sleep.]
zachrab has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
zachrab has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
tatsuya_o has joined #ruby
Briareos1 has quit [Remote host closed the connection]
jrhe has joined #ruby
elfenars has quit [Quit: Leaving.]
sambao21 has joined #ruby
funburn has joined #ruby
elfenars has joined #ruby
kindjal has joined #ruby
bradhe has quit [Remote host closed the connection]
peregrine81 has joined #ruby
digitalcake has left #ruby [#ruby]
c0rn has quit [Ping timeout: 264 seconds]
zachrab has quit [Ping timeout: 248 seconds]
bradhe has joined #ruby
helloworld has joined #ruby
tatsuya_o has quit [Ping timeout: 240 seconds]
c0rn has joined #ruby
Nogbit has joined #ruby
Jdubs has joined #ruby
gcds has quit [Quit: gcds]
bradhe has quit [Ping timeout: 252 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fgo has quit [Remote host closed the connection]
postmodern has joined #ruby
axl_ has joined #ruby
ner0x has quit [Quit: Leaving]
tvw has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrZYX is now known as MrZYX|off
Banistergalaxy has quit [Ping timeout: 240 seconds]
starfox21 has joined #ruby
Banistergalaxy has joined #ruby
geekbri has quit [Remote host closed the connection]
starfox21 has quit [Client Quit]
i_s has joined #ruby
theRoUS has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.0]
vasilakisFiL has joined #ruby
iamjarvo has quit [Ping timeout: 252 seconds]
xk_id has quit [Quit:
phantasm66 has quit [Quit: *sleeeep….]
cescalante is now known as ce_afk
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has joined #ruby
<vasilakisFiL>
hello guys.. suppose that I have a dateTime object with a specific time.. how can I convert it to a format smth like: 21 hours ago
<vasilakisFiL>
?
<vasilakisFiL>
is there a gem outside rails that does that?
asobrasil has left #ruby [#ruby]
marcdel has joined #ruby
Mars has joined #ruby
Mars is now known as Guest53254
<bean__>
vasilakisFiL: ah i've done this before! let me try to remember how it's done
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
sambao21 has quit [Ping timeout: 245 seconds]
<vasilakisFiL>
:)
kpshek has quit [Ping timeout: 248 seconds]
IceyEC has quit [Quit: IceyEC]
Kar- has quit [Ping timeout: 264 seconds]
siwica has joined #ruby
jrhe has quit [Quit: jrhe]
travisjeffery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alexju has joined #ruby
kpshek has joined #ruby
claymore has quit [Ping timeout: 248 seconds]
peregrine81 has quit []
nfk has quit [Quit: yawn]
nutella has joined #ruby
jcromart_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nutella is now known as Guest74161
jrhe has joined #ruby
peregrine81 has joined #ruby
nomenkun has quit [Remote host closed the connection]
claymore has joined #ruby
bradhe has joined #ruby
tabolario has joined #ruby
<bean__>
gah, vasilakisFiL, I swear there was a way to do it without rails.
Lewix has quit [Remote host closed the connection]
elfenars has quit [Ping timeout: 240 seconds]
rainbyte16 has quit [Quit: Leaving]
mrsolo_ has joined #ruby
pellenation has quit [Quit: Leaving.]
Lewix has joined #ruby
sambao21 has joined #ruby
elfenars has joined #ruby
apeiros has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
mhodgson has joined #ruby
<Mon_Ouie>
If all you need is hours, (a - b) / 3600 (round however you prefer)
apeiros has joined #ruby
A124 has quit [Remote host closed the connection]
<Mon_Ouie>
Oh, actually DateTime computations are in days, so it would be * 24
IceyEC has joined #ruby
staafl has quit [Read error: Connection reset by peer]
IceyEC has quit [Client Quit]
<banisterfiend>
Mon_Ouie is a math whiz
<vasilakisFiL>
if I include ActionView::Helpers::DateHelper for this single operation on a small ruby project it would be considered as a bad practice ?
theRoUS has quit [Read error: Connection reset by peer]
pentameter has quit [Read error: Connection reset by peer]
<Jdubs>
oh cool
<Jdubs>
xD
<shevy>
it seems very specialized
<shevy>
I can not give any estimate about this, I am a noob when it comes to rails
<Jdubs>
ah alright
<shevy>
could be very popular and I would not know, but just keep adding to it
<Jdubs>
yeah i just need people to use it and tell me what it needs lol
<Jdubs>
so i can add more
<Jdubs>
i just built the functionality I wanted
<terrellt>
Jdubs: Eh, I wouldn't release this as a gem, but to each their own.
tsykoduk is now known as zz_tsykoduk
<Jdubs>
terrellt: :(
osvico has joined #ruby
ChronocityLC has joined #ruby
<Jdubs>
i has a sad
<terrellt>
=(
<terrellt>
Keep up the work though!
<Jdubs>
i just wanna contribute to the community :(
<terrellt>
All my gems just have bot downloads.
<terrellt>
And I just meant I'd just release the javascript.
<Jdubs>
yeah i just want an easy way for people to use it
<terrellt>
But this is useful to the programming community as a whole - should work just as well for PHP projects.
<shevy>
nah
<shevy>
Jdubs I always tell people, make gems
MrThePlague has quit [Remote host closed the connection]
<Jdubs>
shevy: :)
<shevy>
even when it is just one class alone
<shevy>
:D
<shevy>
the larger projects seem to soak up a lot of more time
heidi has quit [Quit: Leaving.]
heidi has joined #ruby
<shevy>
like, potentially more bugs in the various ruby files in a larger project
<volty>
12 downloads by web crawlers, probably // i see no doc there
<shevy>
hehe
<volty>
neither desc
<Jdubs>
volty: what do you mean
Archweasel has joined #ruby
<volty>
ah, my browser sucked, reading now
jetblack has quit [Ping timeout: 240 seconds]
geekjuice has quit [Quit: leaving]
<Veejay>
apeiros: https://gist.github.com/Veejay/cbc017626b59c69f073a it's a rewrite of that HTML tree traversal from yesterday. It's full of gimmicks but it works well, it's way more generic and reusable and it abstracts some things away
v0n has quit [Ping timeout: 264 seconds]
<Veejay>
And it was overall a fun exercise
<Veejay>
Which is what matters anyway :)
redondos has quit [Remote host closed the connection]
kindjal has quit [Ping timeout: 240 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aspires has quit [Quit: aspires]
senayar has joined #ruby
marcdel has joined #ruby
mikeg has joined #ruby
Zeeraw has quit [Quit: Computer has gone to sleep.]
sheerun has joined #ruby
dankest has quit [Quit: Peace]
dankest has joined #ruby
Zeeraw has joined #ruby
sheerun has quit [Client Quit]
Ox6abe has quit [Remote host closed the connection]
Zeeraw has quit [Client Quit]
Ox6abe has joined #ruby
<Eiam>
I'm making a silly 500 error page in all 3d css
<Eiam>
cause aren't error pages the place you get to do tech demos?!
<Eiam>
I'm going with a 3d dude shrugging his shoulders.
aedorn has quit [Quit: Leaving]
emmanuelux has quit [Quit: emmanuelux]
Ox6abe has quit [Ping timeout: 240 seconds]
dankest has quit [Quit: Peace]
pragmatism has joined #ruby
aspires has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
mobileblue has quit [Read error: Connection reset by peer]
AlSquire has quit [Quit: This computer has gone to sleep]
kurt21 has quit [Ping timeout: 264 seconds]
zz_michael_mbp is now known as michael_mbp
sambao21 has joined #ruby
ehaliewicz has joined #ruby
nutella_ has quit [Ping timeout: 248 seconds]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
kevinykchan has joined #ruby
mlpinit has quit [Remote host closed the connection]
michael_mbp is now known as zz_michael_mbp
mlpinit has joined #ruby
platzhirsch has joined #ruby
Xeago has quit [Remote host closed the connection]
Jdubs has quit [Remote host closed the connection]
Ox6abe has quit [Remote host closed the connection]
jetblack has joined #ruby
Jdubs has joined #ruby
Ox6abe has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 248 seconds]
zz_tsykoduk is now known as tsykoduk
mobileblue has joined #ruby
justsee has joined #ruby
justsee has quit [Client Quit]
Jdubs has quit [Read error: No route to host]
Jdubs has joined #ruby
<platzhirsch>
According to my GitHub statistics, Java is a lot more line hungry than Ruby. Okay, Captain Obvious here, but it seems to be really a magnitude more
urbanmonk has joined #ruby
v0n has joined #ruby
<platzhirsch>
54.000 additions in three months, as opposed to 32.530 additions in six months ...
carlyle has joined #ruby
Ox6abe has quit [Ping timeout: 248 seconds]
<Veejay>
That speed has a price
Spami has quit [Read error: Connection timed out]
Senjai has joined #ruby
Spami has joined #ruby
zachrab has joined #ruby
deweichen has quit [Remote host closed the connection]
<vasilakisFiL>
java is very verbose indeed
mlpinit has quit [Ping timeout: 240 seconds]
<vasilakisFiL>
platzhirsch how did you get the statistics ?
<platzhirsch>
vasilakisFiL: GitHub Graphs on your repository page
<vasilakisFiL>
aaa ok I thought they were total statistics about all repos
brennanMKE has joined #ruby
Ox6abe has joined #ruby
vim_shim has quit [Ping timeout: 248 seconds]
RORgasm_ has quit [Remote host closed the connection]
beilabs has quit [Ping timeout: 240 seconds]
tsykoduk is now known as zz_tsykoduk
kevind has quit [Quit: kevind]
alex__c2022 has quit [Quit: alex__c2022]
rins has quit [Ping timeout: 248 seconds]
ephemerian has joined #ruby
zachrab has quit [Read error: Connection reset by peer]
zachrab has joined #ruby
jbeatty has quit [Ping timeout: 250 seconds]
g0bl1n has quit [Quit: g0bl1n]
jlast_ has joined #ruby
carlyle has quit [Ping timeout: 245 seconds]
Jdubs has quit [Remote host closed the connection]
sepp2k1 has quit [Read error: Connection reset by peer]
Ox6abe_ has joined #ruby
Jdubs has joined #ruby
kitak has joined #ruby
burlyscudd has quit [Quit: Leaving.]
beilabs has joined #ruby
cody-- has joined #ruby
burlyscudd has joined #ruby
jlast has quit [Ping timeout: 248 seconds]
w3pm has joined #ruby
fuhgeddaboudit has joined #ruby
Ox6abe has quit [Ping timeout: 248 seconds]
jlast_ has quit [Ping timeout: 248 seconds]
Ox6abe has joined #ruby
Jdubs has quit [Ping timeout: 265 seconds]
jetblack has quit [Quit: leaving]
shadoi has quit [Quit: Leaving.]
mikeg has quit [Remote host closed the connection]
newbiehacker has quit [Ping timeout: 240 seconds]
Kar- has joined #ruby
Ox6abe_ has quit [Ping timeout: 248 seconds]
tomzx_mac has joined #ruby
fgo has joined #ruby
ravster has quit [Quit: Leaving.]
mikeg has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Kar- has quit [Ping timeout: 264 seconds]
farn has left #ruby [#ruby]
yacks has quit [Read error: Connection reset by peer]
predator217 has joined #ruby
justsee has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
zeade has joined #ruby
nisstyre has quit [Quit: Leaving]
twoism has quit [Ping timeout: 264 seconds]
predator117 has quit [Ping timeout: 245 seconds]
mklappstuhl has joined #ruby
twoism has joined #ruby
ephemerian has quit [Quit: Leaving.]
gyzmodo has quit []
jnoob22 has joined #ruby
Guest65723 has quit [Remote host closed the connection]
maz-dev has quit [Remote host closed the connection]
kay__ has joined #ruby
mikeg has quit [Remote host closed the connection]
asym has left #ruby [#ruby]
mikeg has joined #ruby
T_T has quit [Remote host closed the connection]
udoprog has quit [Ping timeout: 240 seconds]
Jetchisel has joined #ruby
basmoura has quit [Read error: Connection reset by peer]
kay__ has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
hanmac has quit [Quit: Leaving.]
udoprog has joined #ruby
mercwith1mouth has quit [Ping timeout: 265 seconds]
jezen has joined #ruby
amacgregor has quit [Ping timeout: 264 seconds]
zachrab has quit [Remote host closed the connection]
farn has joined #ruby
VTLob has quit [Quit: VTLob]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
mark2_ has joined #ruby
tvw has quit []
twoism has quit [Remote host closed the connection]
mark2_ has quit [Client Quit]
twoism has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
mrsolo_ has quit [Quit: Leaving]
araujo has quit [Read error: Connection reset by peer]
senayar has quit [Ping timeout: 240 seconds]
araujo has joined #ruby
Ox6abe has quit [Remote host closed the connection]
SilverKey has quit [Quit: Zzzzzz.]
Ox6abe has joined #ruby
<platzhirsch>
so quiet
mercwith1mouth has joined #ruby
Archweasel has quit [Remote host closed the connection]
twoism has quit [Ping timeout: 240 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Ox6abe has quit [Ping timeout: 248 seconds]
SilverKey has joined #ruby
<jrhorn424>
platzhirsch: every freenode channel i'm in has been quiet for a good 15 minutes. it's disturbing.
<platzhirsch>
jrobeson: oh my.. the apocalypse ?
kurt21 has joined #ruby
alekst has quit [Ping timeout: 264 seconds]
<volty>
yes, a very slow one -- more and more zombies, day after day
nutella has joined #ruby
nutella is now known as Guest17567
peregrine81 has joined #ruby
centos_ has joined #ruby
<platzhirsch>
Why so socio-critical? :P
ce_afk is now known as cescalante
<banister`sleep>
jrobeson americans are either asleep or just getting ready for work :)
<banister`sleep>
or perhaps their govt shutdown has started to affect their internet access :)
<banister`sleep>
err jrhorn424
<SilverKey>
'murica
<volty>
because I used to have a lot of fun in the first days (or better years) of irc . They were generic channels, no technical.
heidi has quit [Quit: Leaving.]
centos_ has quit [Client Quit]
<jrhorn424>
banister`sleep: :D
mercwith1mouth has quit [Ping timeout: 265 seconds]
<platzhirsch>
volty: what about #defocus? Though I can only recommend this channel under heavy drug influence
w3pm has quit [Quit: Leaving]
<volty>
no drugs // banister`sleep 's sleep because he wants to get to the upper levels of self-consciousness
<jrhorn424>
platzhirsch: nice, i didn't know about #defocus
<volty>
platzhirsch: thx, I will monitor that one for a while
<platzhirsch>
volty: huh?
jrhe has quit [Quit: jrhe]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<volty>
(defocus)
<platzhirsch>
Monitoring for what?
tjbiddle has quit [Read error: Connection reset by peer]
<volty>
for what's happening there, if it's interesting (for me)