vlad_starkov has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
timonv has quit [Ping timeout: 265 seconds]
pwh has joined #ruby
<benzrf>
oh wait thers a problem there
<benzrf>
ugh
Brolen has quit [Quit: Brolen]
drumusician has joined #ruby
<RubyPanther>
benzrf: Don't use singletons until you actually, really have to (almost never)
<benzrf>
hmmm
<benzrf>
I was going to use flyweight for inactive tiles
<benzrf>
i.e. flooring
<benzrf>
& i figured singleton was the way to go there
blarghmatey has joined #ruby
tylersmi_ has joined #ruby
<shevy>
where are the directories!
<shevy>
mkdir lib
<shevy>
cd lib
<benzrf>
pfft
<benzrf>
who needs fancy directory structures
<benzrf>
not this guy
<shevy>
it's important for gem install name
<benzrf>
B)
petey has joined #ruby
<RubyPanther>
benzrf: You should break the directions out into another class instead of using symbols, that way it will be easier on somebody adding 8 direction support
<benzrf>
RubyPanther: hmm, you sure?
<benzrf>
I want to be able to use literals like that
<benzrf>
its v convenient
<RubyPanther>
Yes, of course I am sure.
<benzrf>
shevy: then ill reorder it if I turn it into a gem
<benzrf>
i will probably give up on it halfway through
<shevy>
:(
<benzrf>
@ which point reordering will have been a waste
pwh has quit [Ping timeout: 252 seconds]
<shevy>
!!!
<benzrf>
of time
tylersmith has quit [Ping timeout: 264 seconds]
DrShoggoth has quit [Quit: Leaving]
<benzrf>
RubyPanther: what would using a new class do to help?
maletor has quit [Quit: Computer has gone to sleep.]
<RubyPanther>
Because then directions would be abstract ducks, instead of hardcoded WTFs
pwh has joined #ruby
<shevy>
heeh
<shevy>
hardcoded WTFs
<shevy>
did you know that you were doing hardcoded WTFs benzrf?
<shevy>
benzrf you should also move the attr* calls right after the class definition
<benzrf>
yeah?
<benzrf>
i tend to put initialize first...
<shevy>
yeah!
<shevy>
but that is a method
<shevy>
so you have one method, then the attrs, then other methods
<shevy>
ERROR: Failed to build gem native extension.
<shevy>
wow
<shevy>
You'll need to rebuild Ruby with --enable-shared to use this library.
<shevy>
:(
Guest70356 has joined #ruby
<RubyPanther>
If you're adding support for an 8 direction joystick, you want your code to be a beautiful flock of ducks, or a bunch of sacks full of arbitrary C interns hiding behind strings (aka Symbols)
nisstyre has quit [Quit: Leaving]
<benzrf>
but muh literals
nisstyre has joined #ruby
platzhirsch has quit [Ping timeout: 246 seconds]
<RubyPanther>
shevy: why don't you have shared ruby libraries?
<shevy>
RubyPanther hmmm
jmo has joined #ruby
<benzrf>
so how does including a module differ at all from extending a class anyway?
<benzrf>
the semantics seem nigh identical
<shevy>
extending a class?
<shevy>
if you include a module, you extend the class, or?
<benzrf>
*subclassing
<benzrf>
sorry, javaspeak
<shevy>
yeah
ace_striker has joined #ruby
<shevy>
that distinction is rather arbitrary in ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has quit [Changing host]
ace_striker has joined #ruby
<benzrf>
python has MI so you can do mixins with that, and it seems to work basically the same way
<RubyPanther>
benzrf: Here is a bigger problem I see, you're testing the class of arguments instead of testing the interface. Instead of "when Positioned" you should be testing like, when other.respond_to?(:max_x) # or some other method that the array won't have
simoz12 has quit [Ping timeout: 272 seconds]
<benzrf>
hmm
<RubyPanther>
benzrf: The better way is to test the Array first with .respond_to?(:to_ary)
ahawkins_ has joined #ruby
<benzrf>
oh hmm
<RubyPanther>
Then after testing for the standard types, you can just assume it is a special type with the expected interface
<benzrf>
it's ary and not array?
<benzrf>
or arr
<RubyPanther>
Right, having the method #to_ary implies that the object is considered a "real" array
<RubyPanther>
Same for #to_str
mary5030 has quit [Remote host closed the connection]
guardian_c has joined #ruby
<benzrf>
i know of this o:
<benzrf>
any other suggestions?
<RubyPanther>
to_ary gives you back the object converted to an array, so it has to already be an array. Whereas to_a is giving you a "representation" of the object as an array, not a conversion
ahawkins_ has quit [Read error: Operation timed out]
<benzrf>
09:13 < benzrf> i know of this o:
<RubyPanther>
Then it all quacks and you can build a Dwemthy's Array type of game with it :)
<benzrf>
;p
skulker has quit [Remote host closed the connection]
<benzrf>
i intend to mimic the feel of the top-down zeldas as close as I can
<benzrf>
particularly the Oracle ones
brtdv has joined #ruby
<benzrf>
my end goal is to be able to read zipped bundles of any of sprite or tile definitions, ascii-art maps, and spritesheets as 'games'
<benzrf>
and play them as such
<benzrf>
:)
asmodlol has joined #ruby
cbetta is now known as cbetta_afk
<benzrf>
ive seen excellent romhacks, and I figured that it would be nice to have something like that which does not require fiddly bit flipping
meatherly has joined #ruby
klaut has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
<shevy>
hey
<shevy>
you'll give up soon
<benzrf>
yup!
<benzrf>
but maybe i can find somebody to shove it onto and get a little farther
<benzrf>
and convince them to pass it on
<benzrf>
^_^
<benzrf>
who knows!
<benzrf>
i already have most of the higher-level architecture planned out in my head
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ando has joined #ruby
horofox_ has joined #ruby
yasushi has joined #ruby
horofox_ has quit [Client Quit]
Zesty has joined #ruby
Asher has quit [Quit: Leaving.]
burlyscudd has quit [Quit: Leaving.]
f0ster has quit [Ping timeout: 240 seconds]
eka has quit [Quit: Computer has gone to sleep.]
EngierkO has joined #ruby
joaoh82 has joined #ruby
lnemo has joined #ruby
<shevy>
now I have a libruby.so
dostoyevsky has joined #ruby
<dostoyevsky>
The ruby accessor for kyoto cabinet seems to be retarded... it won't let you do ^C while you are iterating over the keys in the database, even if that may take hours to complete... The only way to exit the program somewhat orderly is to create a file called "stop" and then call exit! inside the iteration loop... It will ignore return or raise inside the loop...
<shevy>
time to write a replacement dostoyevsky ;)
atal421 has joined #ruby
Brolen has joined #ruby
jamesaanderson has quit [Client Quit]
Brolen has quit [Client Quit]
mojjojo has joined #ruby
hiall has joined #ruby
mneorr has quit [Remote host closed the connection]
mojjojo has quit [Client Quit]
lukec has joined #ruby
mneorr has joined #ruby
gyre007 has quit [Remote host closed the connection]
jmo has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
lewix has quit [Remote host closed the connection]
pierre1 has joined #ruby
lewix has joined #ruby
Nilium has quit [Ping timeout: 246 seconds]
lukec has quit [Quit: lukec]
ahawkins_ has joined #ruby
Kidron has joined #ruby
Nilium has joined #ruby
Guest70356 has quit [Quit: Guest70356]
ahawkins_ has quit [Ping timeout: 272 seconds]
arclitgold has joined #ruby
macuser has joined #ruby
macuser is now known as Guest58713
ambushsabre has quit [Quit: rip]
ambushsabre has joined #ruby
mary5030 has joined #ruby
Wolland has quit [Remote host closed the connection]
fedesilv_ has quit [Remote host closed the connection]
benzrf has left #ruby [#ruby]
mary5030 has quit [Ping timeout: 272 seconds]
nfk has quit [Quit: yawn]
mjburgess has left #ruby [#ruby]
cycorld has quit [Remote host closed the connection]
zzak has quit [Quit: leaving]
zzak_ is now known as zzak
Wolland has joined #ruby
petey has quit [Remote host closed the connection]
LexicalScope has joined #ruby
LexicalScope` has joined #ruby
w4pm has quit [Ping timeout: 272 seconds]
petey has joined #ruby
<pontiki>
we need a new dostoyevsky ?
Bumptious has joined #ruby
Kidron has quit [Quit: Kidron]
AlSquire has quit [Quit: This computer has gone to sleep]
lioninawhat2 has joined #ruby
atal421 has quit [Quit: atal421]
petey has quit [Ping timeout: 272 seconds]
bigbadbear has quit [Ping timeout: 245 seconds]
yasushi has quit [Remote host closed the connection]
butblack has quit [Quit: butblack]
timonv has joined #ruby
butblack has joined #ruby
brennanMKE has joined #ruby
brennanMKE has quit [Remote host closed the connection]
brennanMKE has joined #ruby
lioninawhat2 is now known as lioninawhat
ando has quit [Ping timeout: 260 seconds]
dapz has quit [Ping timeout: 272 seconds]
timonv has quit [Ping timeout: 272 seconds]
LexicalScope` has quit [Ping timeout: 260 seconds]
asteve has joined #ruby
asteve has quit [Max SendQ exceeded]
LexicalScope has quit [Ping timeout: 260 seconds]
sheap has joined #ruby
asteve has joined #ruby
asteve has quit [Changing host]
asteve has joined #ruby
dogweather has joined #ruby
jmimi has quit [Quit: Leaving.]
maroloccio has quit [Quit: WeeChat 0.4.2]
atal421 has joined #ruby
radic has quit [Ping timeout: 272 seconds]
radic has joined #ruby
Barrin6 has quit [Quit: Leaving]
atal421 has quit [Client Quit]
grep_away is now known as grep_awesome
joaoh82 has joined #ruby
ehaliewicz has quit [Ping timeout: 272 seconds]
fractastical has quit [Quit: fractastical]
skulker has joined #ruby
mneorr has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
gquental has quit [Ping timeout: 245 seconds]
mneorr has joined #ruby
joaoh82 has quit [Ping timeout: 264 seconds]
yasushi has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
braincrash has quit [Quit: bye bye]
bigbadbear has joined #ruby
blarghmatey has quit [Ping timeout: 272 seconds]
braincrash has joined #ruby
kitak has joined #ruby
grep_awesome is now known as grep_away
skulker has quit [Ping timeout: 272 seconds]
skulker_ has joined #ruby
Xaitec has joined #ruby
mneorr has quit [Ping timeout: 272 seconds]
Xaitec has quit [Remote host closed the connection]
Xaitec has joined #ruby
Xaitec has quit [Client Quit]
Brolen has joined #ruby
skulker_ has quit [Read error: Connection reset by peer]
skulker has joined #ruby
ahawkins_ has joined #ruby
<RubyPanther>
Yeah the old one had a broken cabinet, no good
yasushi has quit [Remote host closed the connection]
ahawkins_ has quit [Read error: Operation timed out]
Brolen has quit [Quit: Brolen]
JuanDaugherty has quit [Ping timeout: 272 seconds]
gquental has joined #ruby
skulker has quit [Ping timeout: 245 seconds]
Guest58713 is now known as NICK____
skulker has joined #ruby
fractastical has joined #ruby
NICK____ is now known as gilcosson
smathieu has joined #ruby
caldwell has quit [Remote host closed the connection]
postmodern has quit [Ping timeout: 240 seconds]
jandris has joined #ruby
skulker_ has joined #ruby
skulker has quit [Ping timeout: 272 seconds]
ambushsabre has quit [Quit: rip]
Brolen has joined #ruby
nobitanobi has joined #ruby
w4pm has joined #ruby
skulker_ has quit [Ping timeout: 246 seconds]
nannes has joined #ruby
<nannes>
Hey
<nannes>
Big problem with "thin" ruby webserver
dima_ has joined #ruby
skulker has joined #ruby
<nannes>
After I launch "bundle exec thin start" the program starts sending output to the user's console.
<nannes>
Even if I use `&` I get those messages
<nannes>
THe problem is: When I quit the ssh session with "exit", suddenly the webserver stops too, for some reason
rickruby has joined #ruby
skulker has quit [Ping timeout: 252 seconds]
fijimunkii has quit [Ping timeout: 260 seconds]
<nannes>
Is there a gem parameter that allows me to launch programs in the background?
mneorr has joined #ruby
grep_away is now known as grep_awesome
smathieu has quit [Remote host closed the connection]
aspires has joined #ruby
smathieu has joined #ruby
ace_striker has quit [Ping timeout: 272 seconds]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
<kure_>
To suppress all messages you could do `&>/dev/null`, but to keep running even after `exit`... idk
<nannes>
Big problem with "thin" ruby webserver... After I launch "bundle exec thin start" I cannot "exit" the ssh session, otherwise the webserver stops running :S
<nannes>
The program starts sending output to the user's console. Even using `&` changes just nothing. Any help? Is there a gem parameter that allows me to launch programs in the background?
<nannes>
kure_: ok thx
mneorr has quit [Ping timeout: 264 seconds]
smathieu has quit [Ping timeout: 264 seconds]
<nannes>
kure_: Does exist any manual for the ruby gems installed? If yes, then how can I get it?
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nannes>
(Nice that worked, but SUCKS that there's no documentation at all about this issue
<bnagy>
rdevilla: yeah well ruby has mutable objects, soo.. comparisons with lisp or whatever aren't really going to help you understand it
sheap has left #ruby [#ruby]
<rdevilla>
bnagy: I am simply making the case that there are indeed several people who would expect push to return a new array with the argument appended to it
<bnagy>
anyway the core of the answer is 'faulty premise' - that's not what ! means
<rdevilla>
just as sort does
<rdevilla>
but ok
Megtastique has quit []
<bnagy>
what about clear? Should that return a new empty array?
<rdevilla>
bnagy: why not
robertrv has joined #ruby
<kure_>
What do you mean by "be careful" then?
<rdevilla>
perhaps a method Array#clear! without an Array#clear would make more sense
<bnagy>
because it's an OO language
<rdevilla>
bnagy: not really sure what that implies
robbyoconnor has quit [Quit: Konversation terminated!]
<RubyPanther>
rdevilla: push doesn't have a non-mutable form, so it doesn't need the flagged version. Also keep in mind that originally ! suffix meant the method altered the receiver, but then Rails used it to just mean something that might be dangerous, which of course includes changing the receiver. And then Matz endorsed that view on the mailing list. So that is all it means now, warning be careful
<bnagy>
mutable object state
cycorld has joined #ruby
<dogweather>
Anyone here have strong opinions about gem naming?
butblack has quit [Quit: butblack]
toastynerd has quit [Remote host closed the connection]
<RubyPanther>
rdevilla: Another thing to keep in mind is that Ruby is always pragmatic and never ideological. So they don't actually even ask if everything is perfectly symmetrical. They only deal with each method name, and what is the least-surprising thing to name it
<rdevilla>
RubyPanther: that is a fair response
<RubyPanther>
dogweather: Yes, name your gem something without a generic meaning
kitak has quit [Read error: Connection reset by peer]
<dogweather>
:-) Definitely. What about a gem with custom RSpec matchers? rspec-thing? rspec-matchers-thing? rspec_thing?
sepp2k1 has quit [Read error: Connection reset by peer]
toastynerd has quit [Remote host closed the connection]
fijimunkii has joined #ruby
robbyoconnor has joined #ruby
lfox has quit [Quit: ZZZzzz…]
<RubyPanther>
Right, if it is rspec-ponytails or rspec-moonunit then there is no conflict. If it is rspec-somegenericcspattern then it is going to conflict and is a horrible selfish greedy name
<MartynKeigher>
trying to split this is kinda hard to do. i have tried the suggested method but still no luck
ahmedelgabri has quit [Remote host closed the connection]
ahmedelgabri has joined #ruby
joaoh82 has quit [Ping timeout: 272 seconds]
<dogweather>
Interesting. my matchers are for testing webservices. e.g. the ssl certificate has been properly installed. so i've been thinking 'rspec-webservice'.
<RubyPanther>
That is exactly what you should NOT name it, dogweather.
<dogweather>
!!
<RubyPanther>
That is entirely generic, it is greedy
<dogweather>
Ah hah, ah hah - i think i'm seeing what you mean
<RubyPanther>
rspec-dogweather is a better name
<dogweather>
ok
<dogweather>
because e.g. 20 diff people may make rspec webservice custom matchers...
pskosinski has joined #ruby
kitak has quit [Read error: Connection reset by peer]
<RubyPanther>
Plus if people start using your library, it really is more searchable. There was once a web framework named "ServerSide" it was a great framework, but it was unsearchable. Compare that to searching for "Ruby Passenger"
<dogweather>
true
kitak has joined #ruby
Hanmac1 has joined #ruby
jamesaanderson has joined #ruby
jameshyde has quit [Quit: Leaving.]
tectonic has joined #ruby
Hanmac has quit [Ping timeout: 260 seconds]
nobitanobi has quit [Quit: Leaving]
kitak has quit [Read error: Connection reset by peer]
roberto has joined #ruby
burlyscudd has joined #ruby
ahawkins has joined #ruby
w4pm has quit [Ping timeout: 272 seconds]
robertrv has quit [Quit: Leaving]
lfox has joined #ruby
w4pm has joined #ruby
mlpinit has quit [Remote host closed the connection]
roberto is now known as robertrv
fijimunkii has quit [Ping timeout: 246 seconds]
burlyscudd has quit [Client Quit]
arclitgold has quit [Ping timeout: 265 seconds]
Brolen has quit [Quit: Brolen]
ahawkins has quit [Ping timeout: 272 seconds]
Hanmac has joined #ruby
tt1187 has quit [Ping timeout: 272 seconds]
kitak has joined #ruby
jameshyde has joined #ruby
Hanmac1 has quit [Ping timeout: 260 seconds]
aetaric has quit [Ping timeout: 240 seconds]
w4pm has quit [Ping timeout: 245 seconds]
bigbadbear has quit [Ping timeout: 245 seconds]
hakunin has quit [Remote host closed the connection]
brennanMKE has quit [Remote host closed the connection]
brennanMKE has joined #ruby
yasushi has joined #ruby
baroquebobcat has joined #ruby
timonv has joined #ruby
baroquebobcat has quit [Client Quit]
speakingcode has quit [Ping timeout: 272 seconds]
aetaric has joined #ruby
yasushi has quit [Ping timeout: 245 seconds]
Naoe-Kanno has joined #ruby
brennanMKE has quit [Ping timeout: 264 seconds]
bigbadbear has joined #ruby
SHyx0rmZ has quit [Ping timeout: 246 seconds]
ConstantineXVI has quit [Ping timeout: 260 seconds]
ehaliewicz has quit [Remote host closed the connection]
charliesome has joined #ruby
bigbadbear has quit [Ping timeout: 264 seconds]
max96at has joined #ruby
timonv has quit [Remote host closed the connection]
habanany has quit [Ping timeout: 272 seconds]
m8 has joined #ruby
eka has joined #ruby
asmodlol has quit [Remote host closed the connection]
JPascal has joined #ruby
banister has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.2]
alexherbo2 has joined #ruby
natano has left #ruby [#ruby]
ahawkins has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest7728 has quit [Ping timeout: 260 seconds]
riku- has joined #ruby
Garo__ has quit [Ping timeout: 260 seconds]
joaoh82 has quit [Remote host closed the connection]
Garo_ has joined #ruby
parduse is now known as Guest24463
Guest24463 has quit [Killed (adams.freenode.net (Nickname regained by services))]
parduse has joined #ruby
riku- has quit [Excess Flood]
ahawkins has quit [Ping timeout: 272 seconds]
simoz12 has joined #ruby
Cannon4TI has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
kitak has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
utkarsh has quit [Changing host]
utkarsh has joined #ruby
kitak has joined #ruby
riku- has joined #ruby
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
JPascal has quit [Ping timeout: 246 seconds]
klaut has quit [Remote host closed the connection]
kung has quit [Read error: Connection reset by peer]
kung has joined #ruby
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
shime has joined #ruby
krz has quit [Read error: Connection reset by peer]
krz has joined #ruby
krz has joined #ruby
krz has quit [Changing host]
spider-mario has joined #ruby
marr has joined #ruby
ahmedelgabri has joined #ruby
skulker has joined #ruby
nw has quit [Ping timeout: 272 seconds]
Garo_ has quit [Ping timeout: 245 seconds]
sinm has joined #ruby
shaman42 has quit [Ping timeout: 240 seconds]
Jamo has quit [Ping timeout: 252 seconds]
cbetta_afk is now known as cbetta
mlpinit has joined #ruby
ferr has joined #ruby
mneorr has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
brennanMKE has joined #ruby
skulker has quit [Ping timeout: 264 seconds]
achru has joined #ruby
kung has quit [Read error: Connection reset by peer]
mlpinit has quit [Ping timeout: 252 seconds]
jkhwan has joined #ruby
kung has joined #ruby
nw has joined #ruby
mneorr has quit [Ping timeout: 260 seconds]
shime has quit [Ping timeout: 264 seconds]
mklappstuhl has quit [Remote host closed the connection]
Garo_ has joined #ruby
Jamo has joined #ruby
OdNairy has quit []
pipecloud_ is now known as pipecloud
OdNairy has joined #ruby
pipecloud has quit [Changing host]
pipecloud has joined #ruby
pipecloud has joined #ruby
m-r-r has joined #ruby
<m-r-r>
Hello
jkhwan has quit [Ping timeout: 272 seconds]
shaman42 has joined #ruby
<m-r-r>
What is the difference between '{:a=>1,:b=>2}.each { | h, v | puts "#{v}" }' and '{:a=>1,:b=>2}.each do | h, v | puts "#{v}" end' ? It seems both are working ...
klaut has joined #ruby
brtdv has quit []
brennanMKE has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
atmosx has joined #ruby
LadyRainicorn has joined #ruby
Rainicorn has joined #ruby
vlad_starkov has quit [Read error: Operation timed out]
LadyRainicorn has quit [Disconnected by services]
Rainicorn is now known as LadyRainicorn
codenapper has joined #ruby
<ace_striker>
m-r-r: both are equivalent ..{ } is one line sytax while do ..end is multiline sytax
<LadyRainicorn>
(almost equivalent)
codenapper has quit [Read error: Connection reset by peer]
codenapper has joined #ruby
timonv has joined #ruby
krz has quit [Ping timeout: 245 seconds]
kep has joined #ruby
<charliesome>
ace_striker:
ehaliewicz has joined #ruby
<charliesome>
ace_striker: I like to use { .. } for blocks where the return value is signficant, and do...end otherwise
<charliesome>
so each do .. end, map { .. }, etc.
spider-mario has quit [Remote host closed the connection]
codenapper has quit [Client Quit]
krz has joined #ruby
zegerjan has joined #ruby
codenapper has joined #ruby
ando has joined #ruby
yasushi has joined #ruby
codenapper has quit [Client Quit]
ph8 has joined #ruby
<m-r-r>
charliesome: ok, thanks
ando has quit [Remote host closed the connection]
codenapper has joined #ruby
ando has joined #ruby
shedd has joined #ruby
keen_ has joined #ruby
keen_ has quit [Client Quit]
yasushi has quit [Remote host closed the connection]
brtdv has joined #ruby
<ace_striker>
charliesome: what do you mean by "return value is significant " ?
<charliesome>
ace_striker: the caller of the block makes use of the return value of the block
<ferr>
https://gist.github.com/anonymous/8267540 I've been trying to understand this code. I know what everything means, I followed the code myself and understand computer reads it but I do not get it logically, could anyone explain me?
ando has quit [Ping timeout: 246 seconds]
<ace_striker>
charliesome: return value is equally significant is both { } and do ..end ..i guess
<charliesome>
ace_striker: so for #each I'd always use do...end since the return value is insignificant and i'm only iterating for the block's side effects
zegerjan has quit [Quit: WeeChat 0.4.2]
mehlah has joined #ruby
simoz12 has quit [Ping timeout: 264 seconds]
<charliesome>
ace_striker: sure, but I'm saying I make the distinction between { ... } and do ... end myself
<charliesome>
as a hint to whoever's reading the code
shedd has quit [Ping timeout: 252 seconds]
<ace_striker>
charliesome: but do ..end blocks do return values ... but it's fine what you are saying
ahawkins has joined #ruby
<charliesome>
ace_striker: I know do...end blocks return values, but I use them to indicate that the value they return is unused
camilasan has joined #ruby
relix has joined #ruby
relix has quit [Client Quit]
carraroj has joined #ruby
<ace_striker>
yeah...i now agree .. i have seen this convention in codes.... charliesome : nice ..thanks
<charliesome>
np
ahmedelgabri has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
popl has quit [Ping timeout: 272 seconds]
AndChat|87561 has joined #ruby
mklappst_ has joined #ruby
ahawkins has quit [Ping timeout: 272 seconds]
kitak has quit [Remote host closed the connection]
<intent>
LadyRainicorn: that's what I'm trying to do
tommyvyo has joined #ruby
skulker has quit [Ping timeout: 272 seconds]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
bashdy has joined #ruby
otherj has quit []
<LadyRainicorn>
Remove the script tags and indent it like the JS you wany to replace.
<LadyRainicorn>
You probably should learn to code before trying to alter .erb files though
carraroj has quit [Read error: Operation timed out]
dr_bob has joined #ruby
ando has joined #ruby
yasushi has joined #ruby
mlpinit has joined #ruby
mneorr has joined #ruby
mlpinit has quit [Read error: Connection reset by peer]
<intent>
its a .haml file
Czupa has joined #ruby
<hiall>
or include an external js
<intent>
So basically :javascript replaces <script> and %noscript replaces <noscript>, I got that much, but doing this still gives a generic error the programmer coded in that is a public facing "oops" message
<intent>
That would probably be so much easier hiall
dr_bob has left #ruby [#ruby]
<hiall>
%script{ :src => "somefile" }
<hiall>
is all you would need
<intent>
That would take care of no script as well as long as no script is defined in the .js file?
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
<intent>
hiall: i included the same code in a JS file and it appears in the source but it doesn't display anything
kate_r has quit [Client Quit]
justinmcp has joined #ruby
krz has quit [Ping timeout: 245 seconds]
vlad_sta_ has joined #ruby
kaichanvong has quit [Quit: _]
hoelzro has quit [Ping timeout: 246 seconds]
peterhu has quit [Ping timeout: 245 seconds]
kaichanvong___ has joined #ruby
kaichanvong___ is now known as kaichanvong
vlad_sta_ has quit [Remote host closed the connection]
emocakes has quit [Quit: Leaving...]
hoelzro has joined #ruby
wmoxam has joined #ruby
wang has quit [Ping timeout: 260 seconds]
kayloos has quit [Remote host closed the connection]
peterhu has joined #ruby
tylersmith has quit [Ping timeout: 272 seconds]
<hiall>
thats down to your js
<hiall>
not the ruby
vlad_sta_ has joined #ruby
<intent>
Ah thats because I just had dupe tags
<intent>
You're right
wang has joined #ruby
<intent>
Now how about the <noscript>
<intent>
Do I need to make a special case in haml or can i just include that in the js?
<hiall>
well noscript is a html tag
LBRapid has joined #ruby
<hiall>
not a js tag
<hiall>
Have you ever coded before?
veterinarian has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
<intent>
Yes but only lightly with js-related things
vlad_sta_ has joined #ruby
<hiall>
I see well the noscript tag needs to be in the html
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<hiall>
%noscript or so in haml
shedd has joined #ruby
<hiall>
I did give you a html->haml converter
<hiall>
either learn haml or use that is my suggestion
vlad_starkov has quit [Ping timeout: 264 seconds]
horofox_ has quit [Read error: Connection reset by peer]
horofox_ has joined #ruby
shedd has quit [Ping timeout: 264 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has quit [Remote host closed the connection]
ahawkins has joined #ruby
lewix has joined #ruby
mojjojo has joined #ruby
horofox_ has quit [Quit: horofox_]
joaoh82 has joined #ruby
relix has joined #ruby
nfk has joined #ruby
<intent>
Right I see, thank you
brtdv has quit []
ahawkins has quit [Ping timeout: 260 seconds]
brennanMKE has joined #ruby
xjiujiu has quit [Ping timeout: 264 seconds]
Brolen has joined #ruby
mojjojo has quit [Quit: mojjojo]
dapz has quit [Ping timeout: 245 seconds]
Hanmac1 has joined #ruby
brennanMKE has quit [Ping timeout: 272 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hanmac has quit [Ping timeout: 260 seconds]
aryaching has quit [Ping timeout: 260 seconds]
<drPoggs>
I'm trying to test Redis pubsub functionality using RSpec tests - but coming unstuck because I need to have a subscriber running in parallel with my publisher... I've tried to do this with a Thread.new, but it seems messy... anyone got any ideas
<drPoggs>
?
Brolen has quit [Quit: Brolen]
skulker has joined #ruby
Brolen has joined #ruby
intent has quit [Read error: Connection reset by peer]
ferr has joined #ruby
intent has joined #ruby
skulker has quit [Remote host closed the connection]
IceDragon has joined #ruby
ahmedelgabri has joined #ruby
bittyx has joined #ruby
<bittyx>
Hiya! I have Ruby installed on my Linux Mint 15 - "ruby -v" returns the version (1.9.3p429) - but I don't have "gem", which I need to install gems (specifically, I need it to install "sass"). Can anyone advise me on what exactly I need to install? I've seen a bunch of different suggestions on Google, and I can't decide which one I should choose (most seem to suggest installing "rvm", but I have no idea if/how that will conflict with the ruby I already h
<bittyx>
ave installed).
arietis has joined #ruby
fijimunkii has joined #ruby
mneorr has joined #ruby
<bittyx>
Uh, actually, scratch that, it seems I *do* have "gem", it just wouldn't work when I tried running it with "sudo". Thanks anyway.
<platzhirsch>
unexpected token at '{"snapshot":{"date":"2013-12-24","score":-nan}}'
<platzhirsch>
- NaN? uhm
timonv has joined #ruby
veterinarian has quit [Read error: Connection reset by peer]
shedd has quit [Ping timeout: 265 seconds]
hl has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
ahawkins has joined #ruby
skulker has joined #ruby
razibog has quit [Ping timeout: 260 seconds]
soobus has joined #ruby
asmodlol has quit [Remote host closed the connection]
butblack has joined #ruby
EngierkO has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
sepp2k has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
ahawkins has quit [Ping timeout: 272 seconds]
larissa has joined #ruby
brennanMKE has joined #ruby
skulker has quit []
ando has quit [Remote host closed the connection]
ando has joined #ruby
Chillectual has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
nateberkopec has joined #ruby
fijimunkii has quit [Ping timeout: 272 seconds]
sleepee has quit [Ping timeout: 252 seconds]
razibog has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
davidw has joined #ruby
ando has quit [Remote host closed the connection]
LinearInterpol has quit [Ping timeout: 265 seconds]
ando has joined #ruby
brennanMKE has quit [Ping timeout: 272 seconds]
<davidw>
nokogiri is going to drive me mad... to_xhtml and to_html print out different things. I want xhtml, but I want it without the pretty printing, or it adds unwanted spaces!
LulzonAway has joined #ruby
<davidw>
For formatted output, use Node#to_xhtml instead. <- say the docs....
<davidw>
so that would indicate that I use to_html. But then it doesn't do stuff like <br />
<davidw>
even if I use the save_with options.... argh
vlad_starkov has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
ahmedelgabri has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
bittyx has quit [Quit: Leaving]
LulzonAway is now known as Lulzon
burlyscudd has joined #ruby
ringaroses has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
<shevy>
XML will drive everyone mad
eka has quit [Quit: Computer has gone to sleep.]
blackmesa has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
ambushsabre has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
mneorr has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
zcreative has joined #ruby
jamesaanderson has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
Landshark753 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ringaroses has quit [Ping timeout: 260 seconds]
grep_away is now known as grep_awesome
nowthatsamatt has joined #ruby
jkhwan has joined #ruby
ringaroses has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
sasg has joined #ruby
fijimunkii has joined #ruby
mneorr has quit [Ping timeout: 272 seconds]
sasg has left #ruby [#ruby]
iMe has joined #ruby
Hanmac1 has quit [Ping timeout: 264 seconds]
lioninawhat has quit [Remote host closed the connection]
Wolland has joined #ruby
lioninawhat has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
sassamo has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
ringaroses1 has joined #ruby
JuanDaugherty has quit [Ping timeout: 260 seconds]
grep_awesome is now known as grep_away
ringaroses has quit [Ping timeout: 260 seconds]
Chillectual has quit [Read error: Connection timed out]
burlyscudd has quit [Quit: Leaving.]
enebo has joined #ruby
benzrf has joined #ruby
<benzrf>
hello ruby enthusiast
<benzrf>
s
Chillectual has joined #ruby
lukec has joined #ruby
hackeron has quit [Remote host closed the connection]
<canton7>
"for some reason it doesn't work" isn't enough to help you
shedd has joined #ruby
<benzrf>
MartynKeigher: ima look at it one sec
nateberkopec has quit [Quit: Leaving...]
<MartynKeigher>
thank you canton7, i edited the post. didnt mean to be vague!
ringaroses2 has joined #ruby
colonolGron has joined #ruby
kayloos has quit [Ping timeout: 260 seconds]
<MartynKeigher>
and thank you benzrf ... would really appreciate it. it s the structuring of the ('stuff') thats its not liking for sure. there is just no error logs with this dash, so to exactly whast wrong is tricky
vlad_starkov has quit [Remote host closed the connection]
doodlehaus has joined #ruby
vlad_starkov has joined #ruby
<benzrf>
MartynKeigher: is it that you're using "require 'blah'" instead of "require './blah'"?
<MartynKeigher>
hmmm??? ok i'll try that. good catch there. brb
shedd has quit [Ping timeout: 252 seconds]
ringaroses1 has quit [Ping timeout: 260 seconds]
ahawkins has joined #ruby
Hanmac has joined #ruby
<canton7>
MartynKeigher, we need a pastie showing exactly what you're doing. Your problem isn't with mysql2, btw, so you should close off the issue there
sassamo has quit [Remote host closed the connection]
wallerdev has joined #ruby
spyderman4g63 has joined #ruby
sassamo has joined #ruby
<MartynKeigher>
building it back up now based on the require ./my_db.rb
butblack has quit [Quit: butblack]
zxd has quit [Ping timeout: 265 seconds]
<MartynKeigher>
give me 2mins to get it in place and test
<canton7>
that, or require_relative 'my_db'
<canton7>
don't include the .rb extension in requires, also
MindfulMonk has joined #ruby
zxd has joined #ruby
camilasan has quit [Ping timeout: 246 seconds]
wallerdev has quit [Client Quit]
ahawkins has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
geggam has quit [Quit: Leaving]
geggam has joined #ruby
yarou has joined #ruby
threesome has joined #ruby
Guest has joined #ruby
geggam has quit [Client Quit]
Guest has quit [Client Quit]
brennanMKE has joined #ruby
geggam has joined #ruby
<MartynKeigher>
ok thanks. going through it now
grep_away is now known as grep_awesome
grep_awesome is now known as grep_away
pushpak has joined #ruby
doodlehaus has quit [Remote host closed the connection]
ferr has joined #ruby
<bittyx>
Hiya! I'm running Linux Mint 15 (based on Ubuntu 13.04), and I have ruby pre-installed (ruby 1.9.3p429, and gem 1.8.25). However, I'm having some problems - when I install a gem (specifically, "gem install sass"), it's not in my path, so running "sass" displays an error ("gem list" shows it as correctly installed). Secondly, and this may be related, "sudo ruby -v" and "sudo gem -v" display "command not found" errors.
<bittyx>
Any ideas how to fix this?
ambushsabre has joined #ruby
<MartynKeigher>
hey canton7 ...... THAT DID IT!!!! :)
<MartynKeigher>
u are a legend! :)
<benzrf>
am i not a legend :)
<benzrf>
* :(
<MartynKeigher>
hehe...
<MartynKeigher>
i did try that, but it failed again..... but you both were right on the money with it! :)
<MartynKeigher>
require '.my_db.rb' did not work
devdazed has quit [Quit: Bye]
<MartynKeigher>
require_relative 'my_db' DID work!
<benzrf>
you left off the slash -.-
<benzrf>
./my_db
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benzrf>
not .my_db ;p
dukz has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
<canton7>
details... they're important
<canton7>
benzrf's syntax should work, too
<canton7>
s/should/does
vlad_starkov has quit [Ping timeout: 272 seconds]
spyderman4g63 has joined #ruby
<matti>
bittyx: What do you need to do? Have Ruby just for yourself for development?
razibog has quit [Ping timeout: 245 seconds]
brennanMKE has quit [Ping timeout: 272 seconds]
<matti>
bittyx: In such case I'd recommend rvm/rbenv/chruby/whatnot for local user.
lioninawhat has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
psyl0n has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby
lioninawhat has joined #ruby
psyl0n has joined #ruby
tt1187 has joined #ruby
<bittyx>
matti: Actually, I just need to have "sass" available, I don't really use ruby for development.
<bittyx>
matti: And while searching for what to do, I've found suggestions to use rvm/rbenv etc. but there so many options, I have no idea which to choose.
blackmesa has quit [Ping timeout: 240 seconds]
<MartynKeigher>
ah... that was a typo here in the IRC chat!
<bittyx>
matti: There's even a "ruby-sass" package available via my OS's package manager (though I'd prefer to install the gem manually, so I'd have better control over which version is installed etc.)
<MartynKeigher>
i did try require './my_db.rb'
<matti>
bittyx: I'd get rid of OS Ruby.
<shevy>
you typo everywhere! :P
xdrone has joined #ruby
<matti>
bittyx: And follow installation steps on RVM web site.
<matti>
bittyx: To begin with.
nm_ has joined #ruby
Hanmac has quit [Ping timeout: 265 seconds]
<shevy>
matti how is the weather in London?
filo3sofie is now known as FiLoSsOfIe
<canton7>
MartynKeigher, without the .rb ')
<canton7>
* ;)
nm_ has quit [Client Quit]
<shevy>
yeah
<shevy>
use .php there
vlad_starkov has quit [Ping timeout: 260 seconds]
<matti>
shevy: Amazing!
<bittyx>
matti: Okay, thank you, I'll try that.
<matti>
shevy: Sun shining, hot.
<matti>
shevy: Girls in bikinis.
<matti>
...
<matti>
shevy: What do you think, really? ;]
<bittyx>
matti: The usual London weather, right?
Hanmac has joined #ruby
<matti>
bittyx: You might need to install some -dev packages as well as make, build-essential etc.
<matti>
bittyx: RVM has you covered there, as it will tell you what to do.
estebanrules has joined #ruby
<matti>
bittyx: Web site is also well-documented.
<matti>
bittyx: Weather - totally ;p
<matti>
Haha
<bittyx>
Thank you, I'm currently removing the OS-provided Ruby.
bittyx has quit [Remote host closed the connection]
Chillectual is now known as LinearInterpol
JuanDaugherty has joined #ruby
flubba has joined #ruby
switchspan has joined #ruby
<waxjar>
ferr, instead of using two Arrays, you could use a Hash
qurve has joined #ruby
lioninawhat has quit [Remote host closed the connection]
Yan__ has joined #ruby
<qurve>
Hey all, what is the "best" core lib/gem to use currently for opening commands and being able to interact with stdout/in/err/pid/return? I'm looking at the open4 gem by ahoward which seems to be somewhat popular, are there any better options?
<qurve>
I'm using ruby 2.0 for everything, but supporting 1.9 would be nice as well.
shedd has quit [Ping timeout: 246 seconds]
jamesaanderson has joined #ruby
<qurve>
I've never actually had to do this before, so pretty much anyone will have a better opinion than me.
smathieu has quit [Remote host closed the connection]
<qurve>
The actual use case is for kicking off the chef omnibus installer from within a thor command and wanting to be able to interact with it as necessary.
smathieu has joined #ruby
ringaroses2 has quit [Ping timeout: 252 seconds]
smathieu_ has joined #ruby
ahawkins_ has joined #ruby
horofox has quit [Quit: horofox]
mehlah has quit [Ping timeout: 264 seconds]
klaut_ has quit [Remote host closed the connection]
ziyadb has joined #ruby
Galgorth has quit [Quit: Galgorth]
Asher has joined #ruby
smathieu has quit [Ping timeout: 260 seconds]
burlyscudd has joined #ruby
Brolen has quit [Quit: Brolen]
lioninawhat has joined #ruby
<shevy>
I am still using 1.9.3
<shevy>
I can't upgrade yet due to my system being described in invalid yaml files
dukz has quit [Remote host closed the connection]
ahawkins_ has quit [Ping timeout: 245 seconds]
smathieu_ has quit [Ping timeout: 252 seconds]
_honning_ has joined #ruby
<ferr>
is it the same with the while loop as .each iterator as adding more text to variable doesn't work?
qurve has quit [Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]]
Gu_______ has joined #ruby
drumusician has joined #ruby
kung has quit [Read error: Connection reset by peer]
<ferr>
so I am asking the other who are still here
<ferr>
I'm doing my exercises for 8 hours and not really sure if I am so dumb
rankine has quit [Ping timeout: 260 seconds]
Yan__ has quit [Ping timeout: 252 seconds]
frxx has left #ruby [#ruby]
lioninawhat has quit [Remote host closed the connection]
fijimunkii has quit [Ping timeout: 252 seconds]
Galgorth has joined #ruby
<canton7>
ferr, not sure what you meabn
<canton7>
*mean
petey has joined #ruby
mojjojo has quit [Quit: mojjojo]
sethen has joined #ruby
Seldan has joined #ruby
Seldan is now known as Mahiro
cbetta is now known as cbetta_afk
Mahiro has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
Nikkitou has joined #ruby
vlad_starkov has joined #ruby
smathieu has joined #ruby
shedd has joined #ruby
apeiros has joined #ruby
mojjojo has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bittyx-desktop has joined #ruby
<Nikkitou>
Hello
vlad_sta_ has quit [Ping timeout: 272 seconds]
Butcho has joined #ruby
<bittyx-desktop>
Hiya. I need Ruby in order to install/use sass (http://sass-lang.com). Which Ruby version should I install?
lioninawhat has joined #ruby
brtdv has joined #ruby
shedd has quit [Remote host closed the connection]
lioninawhat has quit [Remote host closed the connection]
lioninawhat has joined #ruby
Xaitec has joined #ruby
<canton7>
bittyx-desktop, when in doubt, go for the latest stable
Megtastique has joined #ruby
bean has joined #ruby
Advocation has quit [Quit: Advocation]
<bittyx-desktop>
canton7: Actually, in the meantime, I've searched through sass's github issues, and found that 2.1.0 breaks some compatibility, and their .travis.yml file lists 1.9.3 as the latest version their run their tests for, so I figure I'll go for that. Thanks for the tip, though.
xdrone has quit [Read error: Connection reset by peer]
<Mattx>
is there a method like .update wich doesn't change the original hash?
<Mattx>
I don't know why it's not called .update!
Hanmac has quit [Ping timeout: 248 seconds]
veterinarian_ has joined #ruby
Deele has joined #ruby
veterinarian_ has quit [Remote host closed the connection]
<shevy>
hmm merge perhaps?
<Mattx>
ah, I can use .merge
<Mattx>
right
<Mattx>
.update is an alias of .merge! it seems
kayloos has quit [Ping timeout: 252 seconds]
<canton7>
a method ending in an exclamation mark doesn't usually mean "this method mutates"
<Butcho>
trying to write a ruby script to do something like --> "curl -X POST -d request.txt http://url:port/analysis/rest/search/event -H "Content-Type:application/json" and seeing if timedOut:true or hasError:true is present, then fail the test. it's for a nagios script. New to ruby but trying too dive right in.
blackmesa has joined #ruby
<shevy>
the ! nomenclature in ruby is a bit wobbly
<Mattx>
canton7, doesn't usually?
<Mattx>
it does in 90% of cases
<shevy>
class String has replace() method
petey has quit [Remote host closed the connection]
<canton7>
rather, in the standard library, exclamation marks only generally appear on methods which have a non-exclamation-mark counterpoint
Yan__ has quit [Ping timeout: 264 seconds]
<canton7>
(i.e. for every foo! there's a foo)
<shevy>
but there is no replace!()
<canton7>
and it marks that variant as being the more dangerous, or doing the more unexpected thing
petey has joined #ruby
<shevy>
>> puts 'test'
<shevy>
the bot is still down :(
<shevy>
the new year was bad for the bot
CaptainJet has joined #ruby
butblack has joined #ruby
<shevy>
Mattx, x = "abx"; x.replace 'hi'; x # => "hi"
bashdy has joined #ruby
phansch_ has joined #ruby
mklappstuhl has joined #ruby
enebo has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
phansch has quit [Ping timeout: 246 seconds]
petey has quit [Read error: Operation timed out]
mklappstuhl has quit [Read error: Connection reset by peer]
ahawkins_ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
keen_ has quit [Quit: Tiarra 0.1: SIGTERM received; exit]
<Hanmac>
yeah Icy that how it works, but the most users does not know it
<IceDragon>
:3
smiles_ has joined #ruby
smiles_ has quit [Max SendQ exceeded]
smiles_ has joined #ruby
<sickweezle>
What the heck?
* sickweezle
fails at understanding what IceDragon wrote. :(
<IceDragon>
bang! methods don't usually return self
smiles_ has quit [Client Quit]
<IceDragon>
so we use tap instead :3
<IceDragon>
What tap does, is gives you self, and returns self
<sickweezle>
The &: bit?
decoponio has quit [Quit: Leaving...]
<IceDragon>
Symbol#to_proc
zcreative has quit [Quit: Computer has gone to sleep.]
<IceDragon>
[1, 2, 3].map(&:succ) # => 2, 3, 4
kiba has quit [Ping timeout: 245 seconds]
drumusician has quit [Remote host closed the connection]
<sickweezle>
Hm. Sort of get it. ^^;
<IceDragon>
try it yourself
<sickweezle>
Aye. i'm going to have to play with it later.
drumusician has joined #ruby
<IceDragon>
;3 You'll be abusing ruby's sugar in no time
<sickweezle>
I get the pleasure of shopping with a niece and the wife....... >.<
<IceDragon>
...
* IceDragon
is single...
* IceDragon
weeps in corner
<IceDragon>
4EvaAlone
yarou has joined #ruby
yarou has joined #ruby
yarou has quit [Changing host]
* sickweezle
hugs IceDragon
baroquebobcat has joined #ruby
freebs has joined #ruby
Dwarf has quit [Ping timeout: 240 seconds]
flame_ has quit [Quit: Computer has gone to sleep.]
<sickweezle>
thankee for the info! :)
relix has joined #ruby
Dwarf has joined #ruby
shedd has joined #ruby
freebs1 has joined #ruby
mary5030_ has joined #ruby
<Hanmac>
sickweezle: about ! methods ... for sample String#upcase! only returns self when the string has changed ... so you can use it in a if condition
Bumptiou_ has joined #ruby
freebs has quit [Ping timeout: 240 seconds]
sharms has quit [Ping timeout: 240 seconds]
davorb has quit [Ping timeout: 240 seconds]
kapowaz has quit [Ping timeout: 240 seconds]
<shevy>
IceDragon looks like you got a follower
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
XxLocutusxX has joined #ruby
<IceDragon>
:O
XxLocutusxX has left #ruby [#ruby]
davorb has joined #ruby
kapowaz has joined #ruby
<IceDragon>
An apprentice!?
<shevy>
or a virgin
<shevy>
well ok
<shevy>
could be both in one actually
mary5030 has quit [Ping timeout: 240 seconds]
Bumptious has quit [Ping timeout: 240 seconds]
<IceDragon>
:x
sharms has joined #ruby
tt1187 has joined #ruby
shedd has quit [Ping timeout: 246 seconds]
gja has quit [Quit: This computer has gone to sleep]
<pontiki>
i'm just wondering what exception .yeah! raises when it fails...
<pontiki>
YeahRightError
<IceDragon>
XD
<pontiki>
gods, i should implement that
mneorr has joined #ruby
<pontiki>
it's PERFECT
<shevy>
lol
<shevy>
make it a project
<shevy>
gem install yeah
<pontiki>
ikr?
<pontiki>
ooo
<pontiki>
.ikr?
<shevy>
ERROR: Could not find a valid gem 'yeah!' (>= 0) in any repository
<pontiki>
.ftw v. .ftw!
<IceDragon>
(1 == 1).ikr?
<pontiki>
there could be a whole module of these
<pontiki>
mix it in to Object
workmad3 has joined #ruby
<shevy>
Fetching: yeah-0.2.2.gem (100%)
<shevy>
Successfully installed yeah-0.2.2
<shevy>
damn
<shevy>
it already exists
<shevy>
RDoc::Parser::Ruby failure around line 7 of
<shevy>
lib/yeah.rb
<shevy>
but whoever wrote it was incompetent
<shevy>
or perhaps the rdoc author was incompetent ;)
croaky has joined #ruby
<pontiki>
description: Programming video games should have a positive impact on your health!
<pontiki>
summary: The positive video game framework
drumusician has quit [Remote host closed the connection]
<pontiki>
crikey, ftw exists too
<shevy>
lol
drumusician has joined #ruby
tjaco has joined #ruby
<pontiki>
this is like the JS library drinking game
smiles_ has joined #ruby
mneorr has joined #ruby
smiles_ has quit [Max SendQ exceeded]
<pontiki>
think of a noun, add .js. if it exists, take a drink
<pontiki>
lots of drunk javascripters out there
<pontiki>
ikr is open!!
<IceDragon>
marijuana.js # smoke the competition with the most competent web framework to date!
amedeiros has quit [Ping timeout: 272 seconds]
alexherbo2 has joined #ruby
drumusician has quit [Read error: Connection reset by peer]
mklappstuhl has joined #ruby
tjaco has quit [Read error: Connection reset by peer]
m-o-s has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
smathieu has joined #ruby
smiles_ has joined #ruby
drumusician has joined #ruby
tjaco has joined #ruby
grep_away is now known as grep_awesome
bashdy has quit []
Megtastique has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tjaco has quit [Client Quit]
drumusician has quit [Client Quit]
psyl0n has quit [Remote host closed the connection]
relix has joined #ruby
relix has quit [Client Quit]
mzemel has joined #ruby
drumusician has joined #ruby
mklappstuhl has quit [Ping timeout: 272 seconds]
endash has joined #ruby
toastynerd has joined #ruby
Advocation has joined #ruby
mojjojo has quit [Quit: mojjojo]
toastynerd has quit [Remote host closed the connection]
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
amedeiros has joined #ruby
wildroman2 has quit [Remote host closed the connection]
zipper has joined #ruby
m-o-s has quit []
smiles_ has quit [Ping timeout: 248 seconds]
<Nikkitou>
when i execute this piece of code with ruby ./test.rb it prints 3 times exit (Is it raising some kind of ExitExeption?), when i run it from irb it actually exits as i expected it to (this is what irritates me). Why does that happen? Shouldnt the same happen in both cases? can someone here please help me? http://pastebin.com/mfMFbyqe
landon__ has left #ruby [#ruby]
landon__ has joined #ruby
kep has quit [Quit: WeeChat 0.4.2]
<apeiros>
Nikkitou: yes, exit raises SystemExit
<apeiros>
you should NOT rescue Exception
<apeiros>
rescue defaults to StandardError, and that's what you should use at max too.
<apeiros>
Exception will rescue things you really shouldn't rescue.
asteve has joined #ruby
asteve has quit [Max SendQ exceeded]
<Nikkitou>
thanks
MatthewsFace has joined #ruby
<Nikkitou>
Though i wonder why irb actually exits now.
asteve has joined #ruby
<Nikkitou>
shouldn't it also just print exit then?
Xaitec has quit [Remote host closed the connection]
ItSANgo has joined #ruby
m8 has joined #ruby
arclitgold has quit [Quit: leaving]
felixjet_ has joined #ruby
codenapper is now known as 21WAB3P0J
codenapper has joined #ruby
timonv_ has joined #ruby
ahawkins_ has joined #ruby
zumba_addict_ has joined #ruby
ahmedelgabri has joined #ruby
Wolland_ has joined #ruby
ahawkins_ has quit [Client Quit]
Galgorth_ has joined #ruby
virt|away has joined #ruby
robert___ has joined #ruby
robert___ has quit [Changing host]
robert___ has joined #ruby
burlyscudd1 has joined #ruby
asteve has joined #ruby
asteve has quit [Max SendQ exceeded]
mroth has joined #ruby
lioninawhat_ has joined #ruby
achru_ has joined #ruby
ereslibre_laptop has joined #ruby
aagdbl_ has joined #ruby
asteve has joined #ruby
dada has joined #ruby
dada is now known as dada123
vadviktor_ has joined #ruby
mattp_ has joined #ruby
asteve has quit [Max SendQ exceeded]
shreknet has joined #ruby
tonini has joined #ruby
micah` has joined #ruby
simoz13 has joined #ruby
hostess has joined #ruby
<apeiros>
ugh, gem update is broken? :-S
soobus has quit [Ping timeout: 272 seconds]
tommyvyo_ has joined #ruby
asteve has joined #ruby
mtraptor4_ has joined #ruby
jerius has joined #ruby
<platzhirsch>
?
PaulePanter has joined #ruby
yo61_ has joined #ruby
aef_ has joined #ruby
<platzhirsch>
It's probably not?
sguselnikov has joined #ruby
mephux_ has joined #ruby
wang has quit [Ping timeout: 260 seconds]
ringaroses1 has quit [Ping timeout: 260 seconds]
mattp__ has quit [Ping timeout: 260 seconds]
wykydtron has quit [Ping timeout: 260 seconds]
wykydtron has joined #ruby
BombAw has joined #ruby
Hien_ has joined #ruby
ReinH_ has joined #ruby
brandonblack_ has joined #ruby
monomyth_ has joined #ruby
<dada123>
hi. i am marking a rails mountable engine. that engine is provided by the root application a config initializer "user_getter_method", and in engine there is "Engine.user_method" variable that holds a method name, for example "current_user" for Devise. Now I want to call "current_user" or whetever it is from Engine.user_method, I mean Engine.user_method is a string, but holds a method name, which I need to call. like Call Engine.user_me
willb2 has joined #ruby
miah_ has joined #ruby
_whitelogger_ has joined #ruby
Zhwazi has quit [Remote host closed the connection]
wuest has quit [Remote host closed the connection]
aep has quit [Remote host closed the connection]
kitak has quit [*.net *.split]
colonolGron has quit [Quit: leaving]
<Mattx>
not working? weird
wlanboy has quit [Remote host closed the connection]
Davedo has quit [Write error: Connection reset by peer]
nomadic has quit [Write error: Connection reset by peer]
jellow has quit [Write error: Connection reset by peer]
kstephens has quit [Write error: Broken pipe]
machuga has quit [Write error: Connection reset by peer]
Davey has quit [Read error: Connection reset by peer]
Sthebig has quit [Read error: Connection reset by peer]
JuanDaugherty has quit [*.net *.split]
lewix has quit [*.net *.split]
AlSquire has quit [*.net *.split]
nowthatsamatt has quit [*.net *.split]
Mattx has quit [*.net *.split]
peterhu has quit [*.net *.split]
Czupa has quit [*.net *.split]
itamaryu has quit [*.net *.split]
rubyracer has quit [*.net *.split]
agjacome has quit [*.net *.split]
VTLob has quit [*.net *.split]
ckinni has quit [*.net *.split]
binw has quit [*.net *.split]
jcarouth has quit [*.net *.split]
gilcosson has quit [*.net *.split]
michael_mbp has quit [*.net *.split]
sivoais has quit [*.net *.split]
bbloom has quit [*.net *.split]
Guest77105 has quit [*.net *.split]
L8D has quit [*.net *.split]
wald0 has quit [*.net *.split]
jaimef has quit [*.net *.split]
bmaland has quit [*.net *.split]
thelamest has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
m_3_ has quit [*.net *.split]
Cork has quit [*.net *.split]
Akuma has quit [*.net *.split]
terlar has quit [*.net *.split]
Xiti has quit [*.net *.split]
joast has quit [*.net *.split]
23LAAS91H has quit [*.net *.split]
Kneferilis has quit [*.net *.split]
zigidias_ has quit [*.net *.split]
jericon_ has quit [*.net *.split]
dross has quit [*.net *.split]
gregorg has quit [*.net *.split]
Derander_ has quit [*.net *.split]
Muz has quit [*.net *.split]
fflush has quit [*.net *.split]
icedp has quit [*.net *.split]
shoMo has quit [*.net *.split]
stopbit has quit [*.net *.split]
Cope has quit [*.net *.split]
skinny_much has quit [*.net *.split]
bluntman has quit [*.net *.split]
Afal has quit [*.net *.split]
deepy has quit [*.net *.split]
SecretAgent has quit [*.net *.split]
bw_ has quit [*.net *.split]
thejoecarroll has quit [*.net *.split]
dandrade has quit [*.net *.split]
uxp has quit [*.net *.split]
BeanDip has quit [*.net *.split]
AntelopeSalad has quit [*.net *.split]
fbernier has quit [*.net *.split]
sweeper has quit [*.net *.split]
patronus has quit [*.net *.split]
rtl has quit [*.net *.split]
ji0n has quit [*.net *.split]
monsieurp has quit [*.net *.split]
brjannc has quit [*.net *.split]
crazedpsyc has quit [*.net *.split]
WanderingGlitch has quit [*.net *.split]
samuelkadolph has quit [*.net *.split]
JoeTheGuest_ has joined #ruby
mpereira_ has joined #ruby
gstamp has quit [*.net *.split]
JoeTheGuest_ has joined #ruby
xsdg_ has joined #ruby
drumusician has joined #ruby
wookiehangover has joined #ruby
xargoon_ has joined #ruby
mpereira_ has joined #ruby
threesome has joined #ruby
machuga_ is now known as machuga
eshy has quit [*.net *.split]
dreamchaser has quit [Read error: Connection reset by peer]
zz_karupanerura has quit [*.net *.split]
robert___ has quit [*.net *.split]
fumduq has quit [Read error: Connection reset by peer]
Fraeon has quit [Ping timeout: 272 seconds]
camt has quit [Read error: Connection reset by peer]
kstephens_ is now known as kstephens
w4pm has quit [Ping timeout: 265 seconds]
<Waheed>
where is the fucking admin :)
razibog has joined #ruby
Guest25777 has joined #ruby
lioninawhat_ has quit [Remote host closed the connection]
Advocation has quit [Quit: Advocation]
kitak has joined #ruby
xargoon_ is now known as xargoon
JoeTheGuest_ is now known as JoeTheGuest
horofox has quit [Client Quit]
RTG` has quit [Remote host closed the connection]
_whitelogger has quit [Remote host closed the connection]
roodee has quit [Ping timeout: 310 seconds]
yosafbridge has joined #ruby
Mattx has joined #ruby
agjacome has joined #ruby
lewix has joined #ruby
gilcosson has joined #ruby
nowthatsamatt has joined #ruby
Guest77105 has joined #ruby
AlSquire has joined #ruby
thelamest has joined #ruby
rubyracer has joined #ruby
Czupa has joined #ruby
bmaland has joined #ruby
bbloom has joined #ruby
JuanDaugherty has joined #ruby
VTLob has joined #ruby
michael_mbp has joined #ruby
sivoais has joined #ruby
binw has joined #ruby
ckinni has joined #ruby
jaimef has joined #ruby
jcarouth has joined #ruby
terlar has joined #ruby
L8D has joined #ruby
wald0 has joined #ruby
itamaryu has joined #ruby
Kneferilis has joined #ruby
m_3_ has joined #ruby
Akuma has joined #ruby
zigidias_ has joined #ruby
jericon_ has joined #ruby
dross has joined #ruby
Xiti has joined #ruby
Cork has joined #ruby
Derander_ has joined #ruby
23LAAS91H has joined #ruby
joast has joined #ruby
peterhu has joined #ruby
Muz has joined #ruby
fflush has joined #ruby
icedp has joined #ruby
gregorg has joined #ruby
shoMo has joined #ruby
Cope has joined #ruby
stopbit has joined #ruby
skinny_much has joined #ruby
bluntman has joined #ruby
Afal has joined #ruby
ji0n has joined #ruby
deepy has joined #ruby
SecretAgent has joined #ruby
monsieurp has joined #ruby
bw_ has joined #ruby
thejoecarroll has joined #ruby
uxp has joined #ruby
WanderingGlitch has joined #ruby
AntelopeSalad has joined #ruby
crazedpsyc has joined #ruby
brjannc has joined #ruby
fbernier has joined #ruby
rtl has joined #ruby
samuelkadolph has joined #ruby
dandrade has joined #ruby
patronus has joined #ruby
sweeper has joined #ruby
BeanDip has joined #ruby
wildroman2 has joined #ruby
lioninawhat has joined #ruby
thelamest has quit [Max SendQ exceeded]
SecretAgent has quit [Max SendQ exceeded]
Davedo has joined #ruby
atmosx has joined #ruby
SecretAgent has joined #ruby
Davey has joined #ruby
headius has quit [Ping timeout: 240 seconds]
shaker75 has joined #ruby
mpereira has quit [Ping timeout: 247 seconds]
hypnosb has joined #ruby
timonv_ has quit [Remote host closed the connection]
deepender has quit [Ping timeout: 260 seconds]
robert___ has joined #ruby
zz_karupanerura has joined #ruby
gstamp has joined #ruby
eshy has joined #ruby
drumusician has quit [Read error: Operation timed out]
tjaco has joined #ruby
sassamo has quit [Ping timeout: 260 seconds]
camt has joined #ruby
zarul has joined #ruby
mojjojo has joined #ruby
marr has joined #ruby
Waheed has quit [Quit: Waheed]
mneorr_ has quit [Remote host closed the connection]
mneorr has joined #ruby
Kabaka has quit [Ping timeout: 272 seconds]
klaut has joined #ruby
eka has joined #ruby
shedd has joined #ruby
workmad3_ has quit [Ping timeout: 276 seconds]
smathieu has joined #ruby
eka has quit [Client Quit]
thelamest has joined #ruby
<shevy>
hmm
<shevy>
got a question about Struct
wykydtron has joined #ruby
<shevy>
a struct may not have any initial methods right? because they could conflict with methods defined lateron, on that struct
<apeiros>
it has accessors to all members
<apeiros>
also inspect and to_a
<shevy>
hmm
<apeiros>
you'd have to check what else
Rylee has quit [Ping timeout: 252 seconds]
pcarrier has joined #ruby
shedd has quit [Ping timeout: 246 seconds]
sassamo has joined #ruby
sassamo has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
<cong>
i was thinking i wouldn't need weiteln in line 11
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jmo has quit [Ping timeout: 276 seconds]
relix has joined #ruby
croaky has quit [Ping timeout: 276 seconds]
<pontiki>
is this so you can write pascal instead of ruby? :))
<shevy>
cong you can omit all the ; there
AlSquire has quit [Quit: This computer has gone to sleep]
<cong>
i like pascal too
<shevy>
do you like java as well?
<cong>
but i haven't done much of it
<cong>
hell no. java is awful
<cong>
too much packaging and things
Anonomastos has quit [Quit: Quitte]
<cong>
and exceptions being required is just wrong
lioninawhat has joined #ruby
<shevy>
well ruby has exceptions too
<cong>
but they aren't require when when using streams and stuff
<shevy>
begin 1/0; rescue Exception => error; p error; end
<shevy>
#<ZeroDivisionError: divided by 0>
Kar- has quit [Ping timeout: 264 seconds]
relix has quit [Ping timeout: 240 seconds]
emocakes has quit [Quit: Leaving...]
Kabaka has joined #ruby
choobie has quit [Ping timeout: 245 seconds]
<abstr4ct>
got a line with a lot of gsubs in a string. that i use more than once. how can i "variablize" them in effors to be less messy oc.search(venue_day).inner_text.gsub("\u00BD", "½").gsub("\u00E9", "é").gsub("\u00A0", "").gsub("\r\n", "").gsub
<shevy>
dont see how you can make this shorter abstr4ct
<shevy>
perhaps make an array for all things that have to be removed, then iterate through
<abstr4ct>
yeah
vlad_starkov has joined #ruby
<abstr4ct>
i was wondering if i could do something wierd like make it a string and somehow place it in... but all my efforts have failed
<abstr4ct>
also this is in a "def" and i would need the "variable" to be outside, assuming that matters
<shevy>
well oc.search(venue_day).inner_text apparently returns a string
<shevy>
_ = oc.search(venue_day).inner_text
wildroman2 has joined #ruby
<shevy>
_.gsub!("\u00A0", "")
zxd has joined #ruby
<abstr4ct>
right, but the oc.search(venue_day).inner_text is not the messy part
<abstr4ct>
image a lot more gsubs, i only pasted a few
ocline``` has joined #ruby
<abstr4ct>
so i am really trying to focus on somehow shortning the gsubs... also imagine that line like 20 times... heheh
emocakes has joined #ruby
<pontiki>
you could use tr instead of gsub and put them together
<pontiki>
maybe?
<pontiki>
idk
<abstr4ct>
not familar with tr, time for google
<pontiki>
no, sorry, you can't do that, my mistake
<pontiki>
tr is like the unix tr command, character transliteration
<pontiki>
but you subbing characters for strings
<pontiki>
i would be there is a encode/decode arrangement though, UTF-8 to HTML-ENTITY
speakingcode has quit [Ping timeout: 248 seconds]
kotk has joined #ruby
<abstr4ct>
yeah, i just have not figured it out yet, so i was using gsubs
<pontiki>
you could also put them in a hash or table to make them more readable as variables
ocline`` has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
<pontiki>
still using the gsubs
<abstr4ct>
well i was thinking i could somehow take the entire string of gsubs and make it a variable, that just gets plopped down and run, but i have not been able to make it work
Rylee has joined #ruby
<abstr4ct>
because i have that string 20-30 times...
zxd has quit [Ping timeout: 240 seconds]
kayloos has joined #ruby
wildroman2 has quit [Ping timeout: 272 seconds]
<abstr4ct>
so even if the string is the same length, but only once, that would be useful
<pontiki>
is it the same collection of substitutions?
<abstr4ct>
yes
<pontiki>
everyone is going to yell at me, monkeypatch String?
kalrover has joined #ruby
kalrover has quit [Client Quit]
<abstr4ct>
uhm what dat is?
kotk1 has quit [Ping timeout: 276 seconds]
<pontiki>
it's where you reopen the String class and add a method to it, such as:
<cong>
monkey patching redefining the string class
<pontiki>
class String; def my_method; self.gsub(...).... ; end ; end