nhhagen has quit [Remote host closed the connection]
hesco has quit [Quit: Leaving.]
arya has joined #ruby
awarner has quit [Ping timeout: 248 seconds]
sean_s has quit [Quit: sean_s]
ixti has quit [Quit: WeeChat 0.4.0]
emergion has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 248 seconds]
tjbiddle_ has joined #ruby
tealmage has joined #ruby
lahwran has quit [Ping timeout: 264 seconds]
slash_nick has quit [Ping timeout: 258 seconds]
tjbiddle has quit [Ping timeout: 256 seconds]
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
arya has joined #ruby
tjbiddle_ has quit [Ping timeout: 258 seconds]
niklasb has quit [Ping timeout: 258 seconds]
mklappstuhl has quit [Remote host closed the connection]
Lo^15 has quit [Read error: Operation timed out]
CyberMaN has quit []
mmitchell has quit [Remote host closed the connection]
atno has quit [Remote host closed the connection]
hiyakashi has quit [Quit: お前は知りすぎた]
Tricon has quit [Quit: Leaving...]
phantasm66 has quit [Quit: *poof*]
splittingred has joined #ruby
shadoi has joined #ruby
shadoi has quit [Client Quit]
splittingred has quit [Client Quit]
Cultofmetatron has quit [Remote host closed the connection]
splittingred has joined #ruby
_br_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Quit: whyyyyyy]
hamakn has joined #ruby
tylersmith has quit [Remote host closed the connection]
sambao21 has joined #ruby
bubblehead has quit [Remote host closed the connection]
jbueza has joined #ruby
Cultofmetatron has joined #ruby
rickmasta has joined #ruby
arya has quit [Ping timeout: 248 seconds]
<brotatos>
I'm getting this error when doing a `rails new blog`: /usr/lib/ruby/gems/2.0.0/gems/rails-2.3.15/lib/rails_generator/generators/applications/app/app_generator.rb:7:in `<class:AppGenerator>': Use RbConfig instead of obsolete and deprecated Config.
kofno has quit [Remote host closed the connection]
kemist has quit [Quit: kemist]
arya has joined #ruby
dmiller has quit [Ping timeout: 258 seconds]
jdunck has quit [Quit: Computer has gone to sleep.]
quantsini has quit [Quit: Leaving.]
ariedler_ has quit [Remote host closed the connection]
lufi has quit [Excess Flood]
lufi has joined #ruby
quantsini has joined #ruby
crodas has joined #ruby
sambao21 has quit [Ping timeout: 258 seconds]
nari_ has joined #ruby
mmitchell has joined #ruby
yannis has quit [Quit: yannis]
tk_ has joined #ruby
tjbiddle has joined #ruby
mmitchell has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
eboaz has joined #ruby
wroathe has quit [Ping timeout: 256 seconds]
Kricir has quit [Remote host closed the connection]
arya has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
MrPoT4tO has joined #ruby
quantsini has quit [Quit: Leaving.]
brotatos has quit [Quit: WeeChat 0.4.1-dev]
sambao21 has joined #ruby
kofno has joined #ruby
sambao21 has quit [Client Quit]
_br_ has quit [Ping timeout: 258 seconds]
freewizard has quit [Remote host closed the connection]
snorkdude has joined #ruby
insel has quit []
jimg has joined #ruby
kofno has quit [Remote host closed the connection]
kofno has joined #ruby
Kricir has joined #ruby
akhet has quit [Remote host closed the connection]
failshell has joined #ruby
kofno has quit [Ping timeout: 268 seconds]
failshell has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
nari_ has quit [Ping timeout: 276 seconds]
charliesome has joined #ruby
akashj87 has joined #ruby
mockra has quit [Remote host closed the connection]
mockra has joined #ruby
freewizard has joined #ruby
arya has joined #ruby
eka has joined #ruby
Leighton has joined #ruby
[Rickmasta] has joined #ruby
rickmasta has quit [Ping timeout: 258 seconds]
Nisstyre has quit [Quit: Leaving]
eka has quit [Ping timeout: 256 seconds]
indyrl has joined #ruby
Nisstyre has joined #ruby
braincra- has joined #ruby
[Rickmasta] has quit [Client Quit]
jimg has quit [Remote host closed the connection]
braincrash has quit [Ping timeout: 276 seconds]
slainer68 has quit [Remote host closed the connection]
blakeeb has quit [Ping timeout: 252 seconds]
s2013 has joined #ruby
tealmage has quit [Remote host closed the connection]
<snorkdude>
How do I parse the value of a JS variable on an HTML page in Ruby?
osvico has joined #ruby
<snorkdude>
Can this be done with Nokogiri/HPricot
<snorkdude>
?
Cultofmetatron has quit [Remote host closed the connection]
<Mon_Ouie>
It's because those are more than one character
<Mon_Ouie>
27 is "\e" (escape character)
* slash_nick
nods...
<slash_nick>
Thanks :)
haxrbyte has quit [Remote host closed the connection]
icantbecool has joined #ruby
sayan has joined #ruby
osvico has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
nmeum has quit [Quit: WeeChat 0.4.1-dev]
nmeum has joined #ruby
kobain has quit []
nmeum has left #ruby [#ruby]
ossareh has quit [Ping timeout: 256 seconds]
fixl has joined #ruby
Leighton has quit [Quit: Leaving]
rickruby has quit [Remote host closed the connection]
Leighton has joined #ruby
ossareh has joined #ruby
skroon has joined #ruby
nomenkun has joined #ruby
it_tard has joined #ruby
it_tard has quit [Changing host]
it_tard has joined #ruby
arya has quit [Ping timeout: 248 seconds]
eka has joined #ruby
tjbiddle has joined #ruby
arya has joined #ruby
eka has quit [Ping timeout: 252 seconds]
cyong has quit [Quit: Leaving.]
icecandy has quit [Remote host closed the connection]
anirudh24seven has quit [Read error: Connection reset by peer]
mklappstuhl has joined #ruby
icantbecool has quit [Quit: Computer has gone to sleep.]
akashj87 has quit [Ping timeout: 248 seconds]
<shevy>
slash_chick!
skroon has left #ruby [#ruby]
tealmage has joined #ruby
anirudh24seven has joined #ruby
vlad_starkov has joined #ruby
mr0wl has quit [Read error: Operation timed out]
sayan has quit [Read error: Connection reset by peer]
osvico has quit [Ping timeout: 246 seconds]
<whowantstolivefo>
hiya, i am working on ruby koans and and i am at the file of about_methods.rb .. i have an example so >> def test_calling_global_methods_without_parentheses result = my_global_method 2, 3 assert_equal __ , result end <<< and i change the "__" line with the 5 or any number, and after i typed rake i get the following error. what should i do ?
<whowantstolivefo>
bnagy: yes. what to do for fix ?
<bnagy>
you probably shouldn't be doing the koans until you can actually write ruby
<whowantstolivefo>
"5" ? or parantheses ?
<whowantstolivefo>
bnagy: i started to koans with the people at here suggestions
<bnagy>
they're not really for learning the language, they're for learning weird language internals
<whowantstolivefo>
bnagy: i listen your advice for learning ruby ?
yshh__ has joined #ruby
ab3 has joined #ruby
seanmccann has joined #ruby
megha has quit [Ping timeout: 268 seconds]
<bnagy>
don't know
<whowantstolivefo>
:)
<bnagy>
I learned by coding and reading the docs, but I knew how to program
postmodern has joined #ruby
<whowantstolivefo>
you suggest me to read docs ?
yshh__ has quit [Read error: Connection reset by peer]
jlast has quit [Remote host closed the connection]
yshh__ has joined #ruby
<bnagy>
no, I just said that's what I did
yshh has quit [Ping timeout: 268 seconds]
bluOxigen has joined #ruby
yshh__ has quit [Read error: Connection reset by peer]
<whowantstolivefo>
bnagy: your not helping me
<whowantstolivefo>
:)
yshh has joined #ruby
BizarreCake has joined #ruby
ephemerian has joined #ruby
cofin has joined #ruby
cofin has quit [Quit: cofin]
cofin has joined #ruby
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
cofin has quit [Client Quit]
megha has joined #ruby
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
tonini has joined #ruby
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
postmodern has quit [Ping timeout: 256 seconds]
mklappstuhl has quit [Remote host closed the connection]
yshh_ has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
nhhagen has joined #ruby
sayan has joined #ruby
daniel_- has joined #ruby
benlieb has joined #ruby
mneorr has quit [Remote host closed the connection]
yshh has quit [Ping timeout: 260 seconds]
thomasl__ has quit [Remote host closed the connection]
balishag has joined #ruby
mneorr has joined #ruby
akashj87 has joined #ruby
<passerine>
does ruby have something like interfaces or abstract base classes?
mneorr has quit [Remote host closed the connection]
indyrl has left #ruby [#ruby]
johchri has joined #ruby
seanmccann has quit [Quit: seanmccann]
kiri has quit [Ping timeout: 245 seconds]
osvico has joined #ruby
ephemerian has quit [Quit: Leaving.]
Neomex has joined #ruby
Neomex has quit [Client Quit]
c0rn has quit [Quit: Computer has gone to sleep.]
skogis has quit [Ping timeout: 264 seconds]
skogis has joined #ruby
wesside has quit [Quit: Computer has gone to sleep.]
daniel_- has quit [Read error: Operation timed out]
sayan has quit [Read error: Connection reset by peer]
rickruby has joined #ruby
<shevy>
sorry for asking again, I fell asleep
<shevy>
do we have a ruby gem that maps "1" to "one" or "341" to "three hundred forty one"
<shevy>
passerine, what is an abstract class?
<shevy>
whowantstolivefo only way to learn ruby is by writing .rb files on your own
danneu1 has joined #ruby
anirudh24seven has quit [Ping timeout: 268 seconds]
freewizard has quit [Remote host closed the connection]
freewizard has joined #ruby
rickruby has quit [Ping timeout: 256 seconds]
<passerine>
shevy, C++ allows declaring methods without implementations in the base class. It requires them to be defined in derived classes. I suppose I could define the method in the base class that throws an exception if it gets called.
<passerine>
slash_nick, the method wants different implementations so needs to be defined in the derived class
ab3 has quit [Ping timeout: 264 seconds]
chandankumar has quit [Quit: Leaving]
vlad_starkov has joined #ruby
<slash_nick>
your derived class can redefine the method... when (re)defining, you're free to call super (executing whatever the inherited version of the method would've executed)
dhruvasagar has joined #ruby
<slash_nick>
passerine try: class Base;def foo; puts "bar"; end; end; class Derived; def foo; puts "super"; super; end; end; Derived.new.foo
<passerine>
shevy, thanks - after reading those I think I'll just define the base's method to throw an exception, and more for "self-documenting code" than any real runtime benefit.
vlad_starkov has quit [Ping timeout: 248 seconds]
monkegjinni has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
lkba has quit [Ping timeout: 268 seconds]
patronus has quit [Ping timeout: 255 seconds]
<bnagy>
passerine: we have NotImplementedError for that ( among other things )
<passerine>
bnagy, i see. Thanks
infecto has quit [Read error: Operation timed out]
<bnagy>
reading back... you still won't get an error if someone forgets to define the method
<bnagy>
only at runtime
infecto has joined #ruby
<passerine>
slash_nick, thanks for your inputs too.
zommi has joined #ruby
robottinosino has joined #ruby
tonini has quit [Remote host closed the connection]
mneorr has joined #ruby
mixel has joined #ruby
xardas has joined #ruby
[Cordobesa] has joined #ruby
[Cordobesa] has left #ruby [#ruby]
<whowantstolivefo>
shevy: thank you, you know i have no programming background, this is why i am getting this much hard.
freewizard has joined #ruby
eka has joined #ruby
berkes has joined #ruby
brianpWins has quit [Quit: brianpWins]
emergion has joined #ruby
arya has joined #ruby
ab3 has joined #ruby
<shevy>
whowantstolivefo I had neither, but there are some elements the same in every language
<shevy>
functions/methods are basically almost the same everywhere
<shevy>
input -> process it -> output
<shevy>
some languages differ between side effects during the processing stage and others dont
<shevy>
and what is also typical of most language, is what data containers are used
mneorr has quit [Remote host closed the connection]
balishag has quit [Quit: Leaving]
nimor has quit [Quit: Leaving]
Davey has quit [Quit: Computer has gone to sleep.]
b0oh has joined #ruby
m8 has joined #ruby
e-dard has left #ruby [#ruby]
skattyadz has joined #ruby
mklappstuhl has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
r0bglees0n has quit [Ping timeout: 248 seconds]
MrZYX|off is now known as MrZYX
sayan has joined #ruby
kirun has joined #ruby
m8 has quit [Read error: Connection reset by peer]
m8 has joined #ruby
letstest has joined #ruby
emergion has joined #ruby
ttt has joined #ruby
m8 has quit [Max SendQ exceeded]
ttt has quit [Remote host closed the connection]
m8 has joined #ruby
vlad_starkov has joined #ruby
<letstest>
Hi, hope this is ok to ask here. This is a very basic question. I want to simply print something continuously for 5 minutes. i.e puts "hello world" for 5 minutes. I assume it is something obvious. But, I can't seem to be able to do it
forlin has quit [Remote host closed the connection]
pothibo has joined #ruby
devurandom has joined #ruby
<devurandom>
Hello!
<sideshowcoder>
hi
<devurandom>
I have a question regarding #!hashbangs on different Linux distros: On Gentoo Ruby 1.9 is named ruby19, but on Ubuntu it is ruby1.9.1 or ruby1.9.3 (I have both). How do I write my hashbang, so that my script executes on both distros?
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby
<sideshowcoder>
devurandom: doesn't #!/usr/bin/env ruby give you a correct version?
io_syl has joined #ruby
<devurandom>
sideshowcoder: That gives me Ruby 1.8.
<devurandom>
I do not want to force users of my script to change the default interpreter, and the default on Ubuntu is 1.8 apparently.
<sideshowcoder>
a I see, well you could use rbenv or alike and set a .ruby-version for the folder your scripts are in
<sideshowcoder>
I don't think there is a common convention on how ruby versions are named across distros
koddsson has left #ruby [#ruby]
<Brutus->
You could check the ruby version at runtime and stop if version != 1.9
Squarepy has quit [Quit: Leaving]
insulator has joined #ruby
<sideshowcoder>
and if not 1.9 provide an error to the user to run with a ruby 1.9
<Banistergalaxy>
Kraljev2 irb is the pits, use pry ftw
txdv has quit [Ping timeout: 272 seconds]
akashj87_ has joined #ruby
txdv has joined #ruby
_maes_ has joined #ruby
progbyperm has quit [Quit: Lost terminal]
<waxjar>
kraljev2, there is no elegant solution. the code for those methods specifically returns a new Array object. to only "catch all" solution would be to write a wrapper and apply some method_missing magic. i don't think you'd wanna do that, though
<shevy>
Brutus- hmm yeah I think that works fine, let me test on a 2000 lines of code case menu
browndawg has joined #ruby
<shevy>
hmm no that seems to give me several duplicates
akashj87 has quit [Ping timeout: 248 seconds]
<shevy>
["ras','rasmol"] from when 'ras','rasmol'
yacks has joined #ruby
<injekt>
shevy: use a set and use File#each_line
<injekt>
shevy: sets are very fast and does not contain dups
<injekt>
and each_line does not slurp the file contents into memory
<injekt>
like read/readlines
<injekt>
Banistergalaxy: almost at 2.5 million for pry, nice work
<injekt>
I noticed because slop is about 100k behind
<Banistergalaxy>
Cool
<injekt>
aw slop is almost taking over chronic
akashj87_ has quit [Read error: Connection reset by peer]
Czupa has quit [Remote host closed the connection]
<injekt>
it's not needed, but using map and compact already creates that new array implicitly anyway
Czupa has joined #ruby
chipotle_ has joined #ruby
<bonhoeffer>
much cleaner -- perfect help, thanks!
<bonhoeffer>
btw, i use several of your gems, thanks for all your work
<injekt>
mine?
<bonhoeffer>
yeah -- your gist gem i believe
robottinosino has joined #ruby
<injekt>
I dont think I have a gist gem :)
<injekt>
defunkt wrote gist
<bonhoeffer>
ok . . . well then . . .
<injekt>
but you're welcome for the help!
skulker has joined #ruby
akashj87_ has quit [Quit: leaving]
akashj87 has joined #ruby
robottinosino has quit [Ping timeout: 252 seconds]
<bonhoeffer>
i'm coming back to ruby after a long pause -- i'm trying to update a gem, and want to test in irb -- the gem is govtrack -- why can't i require 'govtrack'
ZachBeta has joined #ruby
<bonhoeffer>
the rb file has to be in the path, right?
<MrZYX>
what's your ruby version?
skulker has quit [Remote host closed the connection]
<julianhurley>
However, I have no idea how I could work out how to split this content, aside from using a monospaced font, working out how many words there are per page and diving the total number of words by page number.
<julianhurley>
However, I'd like to use a different number of fonts, insert images and diagrams. I'm currently thinking that something that dynamically finds out the widths of each font character and then counts each character per page and from there works out how to split them. That's getting a bit mad though.
<julianhurley>
How does a Word Processor know how to split pages, and could this realistically be replicated using ruby?
<julianhurley>
Simply an idea for a non-crucial project :)
<julianhurley>
Not sure if this is the place to ask!
poga has quit [Remote host closed the connection]
<apeiros>
julianhurley: you'd need metrics on what is how big. the naive algorithm would be to just overflow to the next page when the container is full.
tealmage has quit [Ping timeout: 256 seconds]
<julianhurley>
hmm
mmitchell has joined #ruby
<apeiros>
and yes, this can realistically be done in ruby. but the "how" depends on the graphical toolkit you use.
<julianhurley>
Ah interesting that this can be done realistically!
richcollins has quit [Quit: richcollins]
<julianhurley>
Realistically's always good :)
<julianhurley>
Apologies, but could you elaborate on 'graphical toolkit'
<apeiros>
I prefer surrealism, though :-p
rdark has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Ping timeout: 252 seconds]
<julianhurley>
haha
<apeiros>
julianhurley: well, the thing which renders your images and text
<apeiros>
such as gtk, qt, swing, (whatever the cocoa one is currently called) etc.
<banisterfiend>
apeiros: where did u go in caribbean
<apeiros>
banisterfiend: dom rep
<julianhurley>
Ahh, I see!
<banisterfiend>
apeiros: cool, i know a girl from there
<Dan39>
so /pattern/.match will always return a like true or false, where string.match might raise an exception if its not a string which wouldnt have a match method..
chandankumar has joined #ruby
NiteRain has quit [Read error: Connection timed out]
<spider-mario>
right
<DouweM>
pretty much
maden has quit [Read error: Connection reset by peer]
skattyadz has quit [Quit: skattyadz]
NiteRain has joined #ruby
<Hanmac>
and there is a VERY BIG difference when you use an regex literal with named groups
<spider-mario>
(well, it fails on numbers, for example)
mahmoudimus has joined #ruby
<spider-mario>
(and returns nil for nil)
<Dan39>
well match returns a match when it matches i guess, but im only interested in if it matches or not :P
<Hanmac>
hm ok it does not hapen with the match method but with the similar =~ one
<Dan39>
ok and question on if this code works like it should... its not mine: if answer.match(/cross-domain-policy/||/xml version=/)
<Hanmac>
Dan39: look also at =~ if you dont want the match pbject
<Dan39>
it didnt seem to, to me
<Dan39>
i changed it to: if /cross-domain-policy|xml version=/.match(answer)
jdunck has joined #ruby
<Dan39>
which seems to work like expected
<MrZYX>
a Regexp object is always true so the original version will only ever match /cross-domain-policy/
<Dan39>
i dont even get how that would work with the match method
<Dan39>
Hanmac: yea read up, i said: 13:04:12 Dan39 | i changed it to: if /cross-domain-policy|xml version=/.match(answer)
<Dan39>
:P
yacks has quit [Quit: Leaving]
<Dan39>
was just wondering if the original code was bad or it was just something wrong
<apeiros>
Dan39: || always evaluates to the first non-nil/false value
<apeiros>
otherwise it evaluates to the last nil/false value
<Dan39>
im surprised it returns /cross-domain-policy/ tho
<Dan39>
id think trying to evaluate /cross-domain-policy/ by itself would throw nil or an error
jdunck has quit [Quit: Computer has gone to sleep.]
Kricir has joined #ruby
<DouweM>
It's a Regexp literal, it's just an object. And objects are, obviously, truthy
<Dan39>
yea
<Dan39>
but then wouldnt it just return true?
<apeiros>
the same as 12 or "foo" don't *raise* (not throw) a nil error
<Dan39>
so it would be string.match(true) ?
kristofers has joined #ruby
<MrZYX>
no
<r0bglees0n>
why would it return true dude
<DouweM>
it'll evaluate to the first non-nil/false, so the Regexp object
<Dan39>
ok
<DouweM>
there's no "boolean casting"
ariedler has joined #ruby
DonRichie has quit [Ping timeout: 268 seconds]
DonRichie has joined #ruby
cyberarm has joined #ruby
mmitchell has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
k611 has quit [Ping timeout: 256 seconds]
generali_ has joined #ruby
<julianhurley>
apeiros: Could I PM you?
DouweM has quit [Quit: Leaving...]
timkohrumel has joined #ruby
Shiva has joined #ruby
iPhoneMRZ has joined #ruby
johchri has joined #ruby
iPhoneMRZ has quit [Client Quit]
bjensen has quit [Quit: bjensen]
v0n has quit [Read error: Operation timed out]
<apeiros>
julianhurley: if it's about a programming problem, then no. I'm not a consultant. I only give my knowledge away for free in public.
<apeiros>
otherweise, yes
<apeiros>
*wise
machuga is now known as machuga|away
<julianhurley>
'fraid it is programming :P
dhruvasagar has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
splittingred has joined #ruby
mockra has joined #ruby
<apeiros>
julianhurley: just ask in public.
wedgex has joined #ruby
nezumi has quit [Ping timeout: 260 seconds]
tommyvyo has joined #ruby
Cultofmetatron has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
rickmasta has quit [Quit: Leaving...]
mixel has joined #ruby
vlad_starkov has joined #ruby
wedgex has quit [Remote host closed the connection]
<julianhurley>
It's just I'm looking into GTK and thinking of using it for my pagination program. Not quite sure how I'd get the text to overflow when the container's full. Do you think finding out the size of each character dynamically, and then counting the frequency of each character, and using that to split the text over multiple images is a good idea?
<julianhurley>
*sorry, multiple pages, not images
<julianhurley>
multiple pages
ramblex has quit [Remote host closed the connection]
bjensen has joined #ruby
browndawg has quit [Quit: Leaving.]
mixel has quit [Client Quit]
Hanmac1 has joined #ruby
ariedler has quit [Remote host closed the connection]
ariedler has joined #ruby
<julianhurley>
I mean, browsers aren't exactly compliant. That approach may work in one browser, but not another. What if IE (it would be IE) decided to render a certain character a tincy bit bigger than normal? The effect would be sheer chaos! :P
workmad3 has joined #ruby
tealmage has joined #ruby
Hanmac has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby
RagingDave has joined #ruby
<julianhurley>
I don't know much about the inner workings of browsers. Just that the way they render text is actually really complicated. And this approach doesn't feel very solid, you know?
brianpWins has joined #ruby
ariedler has quit [Ping timeout: 252 seconds]
ariedler has joined #ruby
bluOxigen has joined #ruby
Catbuntu has joined #ruby
zeade has joined #ruby
tealmage has quit [Ping timeout: 264 seconds]
Boki has quit []
slainer68 has quit [Remote host closed the connection]
tk_ has quit [Quit: ばいばい]
subbyyy has joined #ruby
iPhoneMRZ has joined #ruby
NiteRain has quit [Ping timeout: 260 seconds]
iPhoneMRZ has quit [Client Quit]
threesome has quit [Read error: Connection reset by peer]
mixel has joined #ruby
Shiva has quit [Read error: Connection reset by peer]
generali_ has quit [Remote host closed the connection]
lethan has quit [Remote host closed the connection]
Neomex has quit [Quit: Neomex]
mr0wl has joined #ruby
workmad3 has joined #ruby
<slash_nick>
great I'm going to try it a bit... I'd like the gem to execute an arbitrary block when the konami code is given :)
_nex_ has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
tealmage has quit [Ping timeout: 260 seconds]
sandGorgon has quit [Ping timeout: 260 seconds]
sandGorgon has joined #ruby
splittingred has quit [Quit: splittingred]
robscomputer_ has joined #ruby
robscomputer_ has quit [Remote host closed the connection]
josedonizetti has quit [Quit: josedonizetti]
robscomputer_ has joined #ruby
LennyLinux has quit [Remote host closed the connection]
toquonce has quit [Ping timeout: 245 seconds]
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Client Quit]
bjensen has joined #ruby
ToApolytoXaos has quit [Quit: Leaving]
felipillo has joined #ruby
tealmage has joined #ruby
sambao21_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
sambao21_ is now known as sambao21
mr0wl has quit [Quit: leaving]
codezombie has joined #ruby
slainer68 has joined #ruby
workmad3 has quit [Read error: Operation timed out]
icantbecool has joined #ruby
sambao21 has quit [Client Quit]
jbpros_ has joined #ruby
jbpros has quit [Ping timeout: 252 seconds]
jbpros_ is now known as jbpros
slainer68 has quit [Ping timeout: 256 seconds]
slash_nick has quit [Ping timeout: 256 seconds]
icantbecool has quit [Quit: Computer has gone to sleep.]
mattbl has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
kaffepan1a is now known as kaffepanna
end_guy has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
Hobogrammer_ has joined #ruby
DrCode has joined #ruby
breakingthings has quit [Quit: breakingthings]
rickmasta has joined #ruby
farhad_hf_ has left #ruby ["Konversation terminated!"]
jbpros has quit [Quit: jbpros]
Hobogrammer has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
end_guy has joined #ruby
c0rn has joined #ruby
tylersmith has joined #ruby
Czupa has quit [Ping timeout: 256 seconds]
mr0wl has joined #ruby
icecandy has quit [Remote host closed the connection]
pbertain has joined #ruby
pbertain has quit [Remote host closed the connection]
graeme has joined #ruby
jgarvey has quit [Quit: Leaving]
computer has joined #ruby
staafl has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
mahmoudimus has joined #ruby
slash_nick has joined #ruby
staafl has quit [Read error: Connection reset by peer]
staafl has joined #ruby
Proshot has quit [Quit: Leaving]
staafl has quit [Read error: Connection reset by peer]
staafl has joined #ruby
josedonizetti has joined #ruby
brianpWins has quit [Quit: brianpWins]
iaj has left #ruby [#ruby]
mixel has quit [Quit: mixel]
Tobiaschib has joined #ruby
johnnygoodmancpa has joined #ruby
timkohrumel has quit [Ping timeout: 276 seconds]
pyx has joined #ruby
khismetix has joined #ruby
<shevy>
what means this /^\s*$/ ?
<shevy>
from beginning of line, to end of line... hmm
TheFuzzball has quit [Quit: Computer has gone to sleep.]
<shevy>
\s Any whitespace character
<shevy>
ok so all whitespace characters
<Mon_Ouie>
A (possibly empty) line with only whitespace
<shevy>
that is \t and ' ' ?
<shevy>
ok
graeme has quit [Quit: graeme]
<MrZYX>
\n and \r too
rickmasta has quit [Quit: Leaving...]
<MrZYX>
I guess non-breaking space etc too
<Mon_Ouie>
Nope
<Mon_Ouie>
To match those you can use unicode properties though
wormwood has quit [Quit: WeeChat 0.4.0]
mercwithamouth has quit [Ping timeout: 255 seconds]
<Mon_Ouie>
And well, unbreaking space is likely not to be matched by the most common of them by design (so that a split on any whitespace character doesn't split on _unbreaking_ spaces)
altivec has joined #ruby
Squarepy has quit [Remote host closed the connection]
rdg has joined #ruby
rdg has quit [Remote host closed the connection]
rdg has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
wroathe has quit [Ping timeout: 252 seconds]
brianpWins has joined #ruby
kstone has joined #ruby
chandankumar has quit [Quit: Leaving]
jetblack has quit [Quit: leaving]
chandankumar has joined #ruby
brain_shim_ has joined #ruby
banjara has joined #ruby
altivec has quit [Quit: Computer has gone to sleep.]
kstone has left #ruby [#ruby]
<apeiros>
are non-breaking spaces also called unbreaking spaces? o0
wormwood has joined #ruby
<MrZYX>
maybe.. there are also small non-breaking spaces and soft spaces
akashj87 has quit [Read error: Connection reset by peer]
<apeiros>
there are like 20 different kinds of spaces
mr0wl has quit [Quit: leaving]
Shiva has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
chandankumar has quit [Quit: Leaving]
dv__ has joined #ruby
goto has quit [Quit: Leaving]
rdg has quit [Quit: ttfn]
dv_ has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
jetblack has joined #ruby
akashj87 has joined #ruby
mercwithamouth has joined #ruby
huoxito has joined #ruby
mattbl has quit [Quit: Leaving]
<ddfreyne>
Does anybody have a recommendation for a framework/library for building games (Or game prototypes) in Ruby?
<ddfreyne>
I know of rubygame and gosu.
<Hanmac1>
gosu is nice
Hanmac1 is now known as Hanmac
Shiva has quit [Client Quit]
<Hanmac>
i have something for 3d but its not finish yet ;(
wesside has joined #ruby
<ddfreyne>
I wrote a 2D engine in Obj-C, then converted it to C, but now I want to start with a different project and I want a language that I can use to prototype something *quickly*
c0rn has quit [Quit: Computer has gone to sleep.]
<ddfreyne>
So the library doesn’t have to be feature-complete or fast; it just needs to allow me to prototype something quickly
<brain_shim_>
Or things I should research to get a better handle on it?
<MrZYX>
brain_shim maybe you should point to the part you do not understand
<brain_shim_>
I under stand that there is some meta programming involved. I'm just more spotty on the "why" of it.
<Mon_Ouie>
brain_shim_: Looks like he's reading a YAML file and automatically defining accessors for them
<Mon_Ouie>
for the properties that have been read from it, that is
<Mon_Ouie>
Why not ask the people you're working with though?
brennanMKE has joined #ruby
<brain_shim_>
it's kind of a challenge
<brain_shim_>
of sorts
johnnygoodmancpa has left #ruby [#ruby]
tomzx_mac has joined #ruby
slash_nick has quit [Ping timeout: 245 seconds]
<Spooner>
Someone reinventing the OpenStruct wheel by the look of it.
<brain_shim_>
He basically *defied* me to understand it, and I want to know why.
<MrZYX>
hm, OpenStruct is recursive?
<Mon_Ouie>
Because there's no point in defying someone to understand properly written code!
<brain_shim_>
Yeah basically.
slash_nick has joined #ruby
<MrZYX>
maybe explain what you think it's doing line by line (or block by block) and we point out where you're mistaken
<brain_shim_>
kk
<Spooner>
MrZYX, No, it isn't recursive, but it could map the hashes to OpenStructs and get most of the same effect.
<Mon_Ouie>
MrZYX: It isn't. It also doesn't have a default proc like hash does
<Spooner>
Without a bag of meta.
<MrZYX>
hm, yeah
<MrZYX>
so how about we write a smarter version of it and brain_shim can shoot back? :D
Jackneill has quit [Remote host closed the connection]
jbpros has joined #ruby
<brain_shim_>
When I look at def self.reload!, it looks to me like he's grabbing some values that normally aren't accessible, and inserting them into a context where he can get at them more conveniently.
<brain_shim_>
I guess I should do an Ack on the codebase to see where this class gets called for more context.
<Mon_Ouie>
Not really. Instead of having his data in a hash accessible with foo["bar"]["baz"] he's creating methods, so he can do AppConfig.bar.baz
<brain_shim_>
Spooner: It certainly looks less complex. :)
emmanuelux has joined #ruby
<Spooner>
But as workmad3 says, it is already done in configation's from_hash
<MrZYX>
Spooner: except that you need to inherit from SimpleDelegate and do __setobj__(yaml_config) at the end
<Spooner>
MrZYX, You do?
<MrZYX>
well currently there's no way to access it?
<Spooner>
There wasn't in the original.
<MrZYX>
the original defined singleton methods
karnowski has joined #ruby
phasma has joined #ruby
brennanMKE has quit [Remote host closed the connection]
idkazuma has joined #ruby
xerxas has joined #ruby
akells` has joined #ruby
kristofers has quit [Read error: Connection reset by peer]
rdg has joined #ruby
arya has quit [Ping timeout: 248 seconds]
freerobby has quit [Quit: Leaving.]
chrishough has joined #ruby
kristofers has joined #ruby
rickmasta has joined #ruby
chessguy has joined #ruby
s2013 has quit [Ping timeout: 256 seconds]
lkba has quit [Ping timeout: 246 seconds]
arya has joined #ruby
JohnRKD has joined #ruby
freerobby has joined #ruby
mneorr has joined #ruby
F1skr has joined #ruby
babykosh has joined #ruby
tylersmith has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
rdg has quit [Quit: ttfn]
tricon_ has joined #ruby
suporte85 has quit [Read error: Connection reset by peer]
saarinen has joined #ruby
tjbiddle has joined #ruby
jetblack has quit [Remote host closed the connection]
pitzips has quit [Quit: Leaving]
saarinen has quit [Client Quit]
babykosh has quit [Quit: babykosh]
jamesfung14 has joined #ruby
xbhya has joined #ruby
Tricon has quit [Ping timeout: 264 seconds]
arya has quit [Ping timeout: 248 seconds]
computer has joined #ruby
juarlex has joined #ruby
backjlack has joined #ruby
<slash_nick>
injekt: thanks again... check out the gem "konamio" if you're up for it :) it's neat
ckrailo has joined #ruby
lkba has joined #ruby
subbyyy has quit [Ping timeout: 256 seconds]
joofsh has joined #ruby
saarinen has joined #ruby
<Banistergalaxy>
Slash_nick what does that gem do?
<slash_nick>
Listens to stdin til you enter the konami code... then it congratulates you and executes the block you gave it (if you gave it one)
<slash_nick>
up up down down left right left right B A
mklappstuhl has joined #ruby
ravster has joined #ruby
infecto has quit [Read error: Operation timed out]
infecto has joined #ruby
wallerdev has quit [Quit: wallerdev]
corehook has joined #ruby
toquonce has quit [Quit: toquonce]
<slash_nick>
Banistergalaxy: It was just a toy. Built it as an exercise and as a demonstration of a pattern I'm fond of... the pattern's "powered by" pay_dirt
jbpros has quit [Quit: jbpros]
pyx has quit [Quit: WeeChat 0.4.0]
ab3 has quit [Ping timeout: 246 seconds]
wallerdev has joined #ruby
ziprar has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
chrishough has quit [Quit: chrishough]
niceguyjames has joined #ruby
Squarepy has quit [Remote host closed the connection]
zipace has quit [Ping timeout: 260 seconds]
ziprar has quit [Read error: Connection reset by peer]
corehook has quit [Ping timeout: 252 seconds]
tricon_ has quit [Quit: Leaving...]
subbyyy has joined #ruby
nezumi has joined #ruby
arya has joined #ruby
k611 has joined #ruby
robbyoconnor has joined #ruby
AgentWillyWonka has joined #ruby
backjlack has quit [Remote host closed the connection]
<Vivekananda>
someone gave me a good link for data structures in java on youtube and for the life of me I dont remember who. I am trying to search in youtube and also ask in case I can get it again :)
nhhagen has joined #ruby
johnnygoodmancpa has joined #ruby
nhhagen has quit [Remote host closed the connection]
rushed has joined #ruby
ehaliewicz has joined #ruby
rushed has quit [Client Quit]
guilleiguaran_ has joined #ruby
jonathanwallace has quit [Read error: Operation timed out]
davout has joined #ruby
zipace has joined #ruby
freewizard has quit [Remote host closed the connection]
freewizard has joined #ruby
kristofers has quit []
codecop has quit [Remote host closed the connection]
freewizard has quit [Ping timeout: 252 seconds]
bonhoeffer has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
<altker128>
Hey all. Does anyone here use the TracksApp (http://getontracks.org/)? I have the basic setup working using the Mongrel web server but the response time is absurdly bad, like 10's of seconds ; the server is a Core i7-2710 ; Ruby 1.92 . I wanted to understand if this was normal or not.
akells` has quit [Remote host closed the connection]
LennyLinux has quit [Remote host closed the connection]
Jedi_SCT1 has quit [Quit: See ya]
breakingthings has joined #ruby
<apeiros>
altker128: I doubt that 10s is normal
mercwithamouth has joined #ruby
Jedi_SCT1 has joined #ruby
<apeiros>
altker128: sounds a bit as if it was a rails app and got restarted upon every request
<altker128>
apeiros: I wouldn't think so either. The console shows reasonable times to 'render' pieces, in the 10's of ms, but the web brower on the client side is jacked
<apeiros>
that OTOH sounds different
<apeiros>
no idea, though
<altker128>
apeiros: I meant to say, on the client-side (web browser) it takes 10's of seconds to change. It sounds abnormal to me too...time to rip up this jail
sepp2k1 has joined #ruby
felipillo has joined #ruby
sepp2k has quit [Ping timeout: 258 seconds]
bjensen has quit [Quit: bjensen]
marr has quit [Ping timeout: 256 seconds]
<altker128>
apeiros: Fixed it! :)
<apeiros>
congrats :)
<whowantstolivef1>
i've done examples in ruby koans today
<altker128>
apeiros: It was doing a reverse DNS look-up which was totally killing the performance
<apeiros>
or just don't use webrick
<apeiros>
there are much faster ruby based webservers out there
<apeiros>
thin and unicorn e.g.
generalissimo has quit [Remote host closed the connection]
<altker128>
apeiros: I keep hearing that...but I have no idea how to integrate that with Tracks. Anything Ruby related is really brand new to me.
<codezombie>
When using array.zip is it possible to keep the extra elements from the array being passed in? For example ["a","b"].zip(["c","d",e"]). `e` would be lost in the merge. I'd like to preserve it if possible.
csaunders has quit [Quit: Computer has gone to sleep.]
<altker128>
apeiros: I mean, I guess if performance was truly a concern I'd use Apache or lighttpd or nginx or something
joofsh has joined #ruby
<apeiros>
codezombie: how?
bjensen has joined #ruby
<codezombie>
apeiros: ["a","b"].zip(["c","d","e"]) produces [["a", "c"], ["b", "d"]] - I'm asking if there's a way to keep "e" in this instance.
<apeiros>
altker128: is there a file "Gemfile" in the toplevel of the project? if so, just add `gem "thin"` to it
<apeiros>
codezombie: yes. keep it *how*
<altker128>
apeiros: Yes, there is a Gemfile. Just add gem thin? That's really it?
<codezombie>
apeiros: no idea. Just thought I'd ask if there was a known way to preserve it.
<altker128>
apeiros: Well, that and use bundle to get the gem, right?
<codezombie>
apeiros: in the result
<apeiros>
altker128: not `gem thin`, `gem "thin"`, the quotes are needed.
<apeiros>
codezombie: then your question makes no sense.
Squarepy has quit [Quit: Leaving]
Umren has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
bluOxigen has quit [Ping timeout: 260 seconds]
<altker128>
apeiros: Ok, looking at the format of the Gemfile , I understand what you mean. But once I add thin , and launch it via
_Drewch has joined #ruby
<apeiros>
altker128: correct
brianpWins has quit [Quit: brianpWins]
<altker128>
"bundle exec rails server -e production" evreything will work?
<apeiros>
yes
<apeiros>
should, at least :)
<altker128>
OK. Let me give it a shot :)
<_Drewch>
Can you overload Hash's => operator, or add another operator that acts in the same way as =>
<apeiros>
_Drewch: no
freerobby has quit [Quit: Leaving.]
bonhoeffer has quit [Quit: bonhoeffer]
<_Drewch>
Bummer, thanks
<apeiros>
that's syntax. you can't change syntax without changing the ruby executable itself (i.e. change parse.y and whatnot and recompile)
indyrl has quit [Read error: Connection reset by peer]
<codezombie>
apeiros: maybe my full example would help. https://gist.github.com/gitt/1bd2f688b0534b133947 - If there are more elements in @target_list, then columns, I'd ultimately like to still hadd them to the hash with the lists key.
<_Drewch>
yeah that's what I figured but ruby has surprised me before
chessguy has quit [Remote host closed the connection]
<apeiros>
codezombie: the desired result of such a modified zip would be better. as that would show how you'd like it preserved.
zackiv31 has joined #ruby
kirun has quit [Quit: Client exiting]
<apeiros>
_Drewch: sure, and asking doesn't hurt :)
<altker128>
apeiros: But I think that's client-side delays (slower desktop). Anyway, thank you again. I'll keep using thin, this is great!
cofin has quit [Quit: cofin]
<pilgo>
Hi all. I'm trying to learn Ruby using koans. I'm getting this error, though: <KeyError> exception expected but was Class: <IndexError> Message: <"key not found"> ---Backtrace--- ./about_hashes.rb:27:in `fetch' ./about_hashes.rb:27:in `test_accessing_hashes_with_fetch' ---------------
<pilgo>
Spooner: That seems different. I don't see test_accessing_hashes_with_fetch
Palantir has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
altker128 has left #ruby ["Konversation terminated!"]
arya has quit [Ping timeout: 248 seconds]
marr has quit [Ping timeout: 264 seconds]
Xeago has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 252 seconds]
_br_ has quit [Ping timeout: 260 seconds]
<Spooner>
pilgo, I worked out the problem. In 1.8.7 (which is what the Koans are run in), a bad fetch raises an IndexError, but in 1.9+, it raises a KeyError
<pilgo>
Right, that's dandy.
<pilgo>
However, how do I find that discrepancy in the docs?
<pilgo>
BTW, my local ruby is ruby 1.8.7
postmodern has joined #ruby
<Spooner>
Oh well, it is the other way around then (Koans are expecting 1.9, but you are answering for 1.8).
<pilgo>
Spooner: Mind you, I've shared my koans on dropbox and access them from multiple machines (which could have different ruby versions)
F1skr has quit [Read error: Operation timed out]
<Spooner>
I'm not sure where the difference is documented.
marr has joined #ruby
<pilgo>
:(
freerobby has joined #ruby
davout has quit [Remote host closed the connection]
Guest36627 has quit [Ping timeout: 258 seconds]
<Spooner>
1.8.7 is about to hit end of life though, so needn't worry too much!
bjensen has quit [Quit: bjensen]
teclator has quit [Ping timeout: 256 seconds]
rickmasta has quit [Quit: Leaving...]
predator117 has joined #ruby
digifiv5e has joined #ruby
Palantir has quit [Ping timeout: 256 seconds]
jonathanwallace has joined #ruby
digifiv5e is now known as Guest32784
<pilgo>
Spooner: Well, just thinking about the general docs. In python docs, it's clearly stated what version a function is obsolete or new, etc.
wargasm has quit [Read error: Connection reset by peer]
<pilgo>
Just trying to find that in ruby docs, I guess
Elico has joined #ruby
it_tard has quit [Quit: yawn]
<Spooner>
Yeah, it is pretty crappy that we don't have a "version added in" in our docs.
moos3 has quit [Quit: Computer has gone to sleep.]
predator217 has quit [Ping timeout: 248 seconds]
mklappstuhl has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 248 seconds]
<apeiros>
pilgo: might be in the changelog
<apeiros>
I'd search for "Hash#fetch", if that doesn't yield anything, then just "fetch", and last just "Hash"
<apeiros>
and/or search for "IndexError" and "KeyError"
<pilgo>
The only place i found version was in the URL and the main header
mercwithamouth has quit [Ping timeout: 256 seconds]
brianherman has quit [Read error: Connection reset by peer]