leoncamel has quit [Remote host closed the connection]
sonkei has joined #ruby
Spooner has quit [Ping timeout: 264 seconds]
davidcelis has joined #ruby
x77686d has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
pingfloyd has quit [Quit: pingfloyd]
dimday has quit [Ping timeout: 268 seconds]
adeponte has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
chimkan_ has left #ruby [#ruby]
nwest has quit [Quit: Computer has gone to sleep.]
pablo_ has joined #ruby
raul782 has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
Guest5516 has joined #ruby
ananthakumaran has joined #ruby
flori has quit [Ping timeout: 240 seconds]
burgestrand has joined #ruby
datsik33 has joined #ruby
Bosma has quit [Ping timeout: 246 seconds]
sonkei has quit [Quit: Computer has gone to sleep.]
guest2191281 has quit [Quit: Page closed]
dukedave has joined #ruby
<dukedave>
Is there a non-mutable way to remove an element from an array and return that array?
sambio has quit [Quit: Saliendo]
<dukedave>
The closest I've got is (1..4).reject{|x| x == 4}
flori has joined #ruby
adamkittelson has quit [Remote host closed the connection]
qos has joined #ruby
yasushi has joined #ruby
g_rotbart has quit [Ping timeout: 245 seconds]
sqlbyme has joined #ruby
sqlbyme has quit [Client Quit]
bananagram has quit [Ping timeout: 246 seconds]
g_rotbart has joined #ruby
peterpan has quit [Ping timeout: 276 seconds]
maletor has joined #ruby
flori has quit [Ping timeout: 244 seconds]
_|Cupido|_ has joined #ruby
_|Cupido|_ has left #ruby [#ruby]
chendo_ has quit [Ping timeout: 244 seconds]
sonkei has joined #ruby
Elico1 has joined #ruby
eroc has joined #ruby
burgestrand has quit [Quit: Leaving.]
bigkm has joined #ruby
<fowl>
dukedave: #reject is what you want
wpaulson has joined #ruby
<dukedave>
fowl: Yeah, see my second comment, I was just wondering if there was a way to do it without using a block
flori has joined #ruby
<fowl>
dukedave: you just to remove the last item?
<dukedave>
fowl: No it could be anywhere in the array
chendo_ has joined #ruby
jrist is now known as jrist-afk
<fowl>
dukedave: so what you want is a method like array.removeTheItemI'mThinkingAbout()?
<fowl>
array.doWhatIwantWithoutMeTellingYou()
wpaulson has quit [Client Quit]
<dukedave>
fowl: Heh, no, like this: (1..4).reject{|x| x == 4}
<dukedave>
But without the equality checking block
rubious has quit [Quit: Leaving...]
will1000 has quit [Quit: Leaving]
<fowl>
dukedave: well.. #delete will mutate the array(as it should)
<fowl>
you could just dupe it first
kaushik_ has joined #ruby
<fowl>
its painful to use
<dukedave>
fowl: Do you know why the mutable delete isn't delete!
<dukedave>
?
<fowl>
because delete implies mutation
* dukedave
shrugs
<dukedave>
Oh well, thanks anyway :)
<fowl>
same reason push/pop aren't push!/pop!
<dukedave>
I guess that block isn't so bad, better than dupin
und3f has joined #ruby
flori has quit [Ping timeout: 248 seconds]
<dukedave>
You make a valid point
eroc has quit [Quit: eroc]
sleetdrop has quit [Remote host closed the connection]
adeponte has joined #ruby
a_a_g has joined #ruby
sonkei has quit [Quit: Computer has gone to sleep.]
mc0e has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
quest88 has joined #ruby
mc0e has left #ruby [#ruby]
macmartine has joined #ruby
dmiller has quit [Remote host closed the connection]
dmiller has joined #ruby
Guest5516 has quit [Ping timeout: 244 seconds]
macmartine has quit [Read error: Connection reset by peer]
flori has joined #ruby
macmartine has joined #ruby
dimday has joined #ruby
keppy has joined #ruby
dmiller has quit [Ping timeout: 268 seconds]
adamkittelson has joined #ruby
flori has quit [Ping timeout: 260 seconds]
sonkei has joined #ruby
yxhuvud has joined #ruby
yasushi has quit [Remote host closed the connection]
sdwrage has quit [Quit: geekli.st/programmer]
coderhut has joined #ruby
replore_ has quit [Remote host closed the connection]
pingfloyd has joined #ruby
adeponte has quit [Remote host closed the connection]
pablo_ has quit [Ping timeout: 264 seconds]
ori-l is now known as ori-l-away
robbyoconnor has joined #ruby
areil has joined #ruby
robbyoconnor has quit [Read error: No route to host]
quest88 has quit [Quit: quest88]
x77686d has quit [Quit: x77686d]
Moggle has quit [Ping timeout: 245 seconds]
artm has quit [Quit: artm]
artm has joined #ruby
flori has joined #ruby
philcrissman has quit [Remote host closed the connection]
dmiller has joined #ruby
artm has quit [Quit: artm]
recycle has quit [Remote host closed the connection]
tonini has joined #ruby
gilesw has quit [Ping timeout: 244 seconds]
SCommette has joined #ruby
dmiller has quit [Ping timeout: 276 seconds]
uris has quit [Quit: leaving]
arietis has joined #ruby
noyb has joined #ruby
smellynoser has joined #ruby
love_color_text has joined #ruby
minijupe has quit [Quit: minijupe]
minijupe has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
minijupe has quit [Client Quit]
Moggle has joined #ruby
adeponte has joined #ruby
mascool has joined #ruby
coderhut has quit [Quit: Page closed]
peterpan has joined #ruby
noyb has quit [Ping timeout: 252 seconds]
<rking>
Anyone mind if I takeover the channel discussion for a bit? I'm about to get started on my first pass of working on https://github.com/rking/pry-docmore#readme , and it'll involve a lot of questions.
<rking>
(I'll just start, but feel free to tell me to shut up at any point)
<Banistergalaxy>
Sup homo
<rking>
My first one is to document alias. What advantage does Module's alias_method have over plain alias? That you could use it at run-time?
<rking>
Banistergalaxy: I'll need as much input on all of this from you as you're willing to give.
<davidcelis>
Banistergalaxy: hi
<rking>
davidcelis: You answer to "homo"?
sonkei has quit [Quit: Computer has gone to sleep.]
<davidcelis>
what?
<davidcelis>
fuck
<love_color_text>
lol
Chryson has joined #ruby
<davidcelis>
fuck you guys
<rking>
Hehe
<fowl>
haha
Jonah11_ has joined #ruby
noyb has joined #ruby
alec-c4 has joined #ruby
<Jonah11_>
I feel like I have an extra line or 2 in this 4 line function. anyone have a nice way to make it more concise? http://pastie.org/4678218
<Jonah11_>
davidcelis, yes. good point. i actaully have another similar function tho where the map trick wouldn't work. is there any way shorten those two ret lines without map?
<fowl>
Jonah11_: his map and the one you pasted do the same thing
noyb has quit [Ping timeout: 272 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
<Jonah11_>
davidcelis, yeah, you're right. for some reason i was thrown by the multiple lines, since my maps are usuually one liners, but no reason they have to be...
<Jonah11_>
ty
stephenjudkins has quit [Read error: Connection reset by peer]
machty has joined #ruby
stephenjudkins_ has joined #ruby
replore_ has joined #ruby
datsik33 has quit [Quit: This computer has gone to sleep]
timonv has joined #ruby
Kneferilis has joined #ruby
xscc has joined #ruby
xscc has quit [Read error: Connection reset by peer]
<rking>
What's the name for the alias-around trick where you do this?: def foo; 3 end; alias orig_foo foo; def foo; 4 + orig_foo end
yubiwasabi2 has joined #ruby
Hanmac1 is now known as Hanmac
tagrudev has joined #ruby
<fowl>
rking: decorating
SCommette has quit [Quit: SCommette]
<rking>
fowl: Thanks.
raul782 has quit [Remote host closed the connection]
banisterfiend has joined #ruby
zommi has joined #ruby
a_a_g has quit [Quit: Leaving.]
Banistergalaxy has quit [Ping timeout: 276 seconds]
<banisterfiend>
they're not easy to monkeypatch atm
<rking>
Darnit banister.
* rking
kicks pry and watches it spill everywhere, and refuses to clean it up.
<rking>
It has to be through "?" or else it's not cool.
stepnem has joined #ruby
replore_ has quit [Remote host closed the connection]
<fowl>
define_method :":>" do "<3"*(1.0/0) end
maesbn has joined #ruby
<banisterfiend>
fowl: btw u dont need to pass symbols
<banisterfiend>
define_method ":>" is fine
<fowl>
o
dmiller has quit [Ping timeout: 244 seconds]
pablo_ has joined #ruby
Morkel has joined #ruby
techsurvivor has quit [Read error: Connection reset by peer]
<rking>
I need to find a really good YARD example.
stephenjudkins_ has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
stephenjudkins has quit [Read error: Connection reset by peer]
maletor has quit [Quit: Computer has gone to sleep.]
yxhuvud has quit [Ping timeout: 244 seconds]
hoelzro|away is now known as hoelzro
jimeh has joined #ruby
mascool has quit [Read error: Operation timed out]
stephenjudkins has joined #ruby
<rking>
I guess I could look up other projects by the YARD authors.
<rking>
Surely they dogfood.
chimay has joined #ruby
chimay has quit [Changing host]
chimay has joined #ruby
<banisterfiend>
rking: what has yard got to do with anything?
<rking>
banisterfiend: IIRC that's the format cirwin said I should do this in.
<Hanmac>
i document my gems in rdoc style ... and hope that yard like that too
<rking>
Hehe
<rking>
Actually yardoc looks pretty cool. Even has stuff like "include" and macros.
<rking>
banisterfiend: Yeah, pry-doc depends on yard anyway. Might as well do so for pry-docmore.
<banisterfiend>
rking: it's not really a 'format', it just has a few tags that do things like list method parameters, return values, blocks etc
<Hanmac>
hmi need to find a way to treat rb_define_attr_method in a similar way like rb_define_attr (attr_method is from me)
<banisterfiend>
rking: stuff like that isnt' really relevant for non-method/non-class stuff
stephenjudkins_ has joined #ruby
<rking>
banisterfiend: Well, for example, I want to talk about the "true" var in some text.
stephenjudkins has quit [Read error: Connection reset by peer]
<banisterfiend>
Hanmac: rdoc is lame, get with the times
stephenjudkins_ is now known as stephenjudkins
<rking>
I'm doing `true` but I don't know if it knows that I mean code-literal, like Markdown would.
luckyruby has joined #ruby
<banisterfiend>
rking: ah, well, you just need to use some markup, the pry processor supports `` and a few other things
<banisterfiend>
but that's not really 'yard'
luckyruby has quit [Remote host closed the connection]
<rking>
Oh. Urf.
luckyruby has joined #ruby
<banisterfiend>
rking: all that pry does to yard tags is strips the @ and colors them differently ;)
<banisterfiend>
we dont do/need to do a lot
<rking>
banisterfiend: Where's the pile of examples of this yPaRrYdoc format?
<rking>
Hrm
<rking>
I see.
<banisterfiend>
rking: there's nothing to it, i can tell you everything you need to know righ there. Just use plain text and use `` when you want to highlight code
qos has quit [Quit: Leaving...]
<banisterfiend>
oh i guess you can also use the @example tag
<banisterfiend>
for when you give little demos of how to use a language feature
<banisterfiend>
but @example is the only tag i can really see being useful to u
qos has joined #ruby
<rking>
If I find others I'll pull req the pry bit.
arturaz has joined #ruby
sgmac has joined #ruby
sgmac has left #ruby [#ruby]
<rking>
Doesn't look like I will, probably.
zigomir has joined #ruby
JeanMertz has joined #ruby
workmad3 has joined #ruby
sonkei has quit [Quit: Computer has gone to sleep.]
dekroning has quit [Ping timeout: 252 seconds]
ananthakumaran has quit [Quit: Leaving.]
vectorshelve has left #ruby [#ruby]
vectorshelve has joined #ruby
maletor has joined #ruby
bigkm has quit [Quit: Computer has gone to sleep.]
JeanMertz has quit []
fsck3r has quit [Read error: Connection reset by peer]
fsck3r has joined #ruby
timonv has quit [Remote host closed the connection]
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins_ has joined #ruby
<rking>
Anyone want to cook up a pair of examples where the precedence of "and" vs "&&" both shine?
keppy has quit [Remote host closed the connection]
<rking>
true and not false # This one's good for "and", because the "&&" version is a syntax error.
<fowl>
>>true && !false
<al2o3cr>
(TrueClass) true
<fowl>
>> true && not false
<al2o3cr>
-e:1:in `eval': (eval):1: syntax error, unexpected keyword_false, expecting '(' (SyntaxError), true && not false, ^, from -e:1:in `<main>'
<fowl>
>> true && (not false)
<al2o3cr>
(TrueClass) true
<workmad3>
>> true && !false
<al2o3cr>
(TrueClass) true
<rking>
All that's doing so far is showing the inferiority of &&.
<fowl>
why ruby has and/or/not anyways
<fowl>
is stupid
<hoelzro>
b/c of Perl
<hoelzro>
Perl has both sets of logic operators
<workmad3>
>> a = true and false; a
<al2o3cr>
(TrueClass) true
<workmad3>
>> a = true && false; a
<al2o3cr>
(FalseClass) false
<fowl>
^^
<fowl>
and just screws you over
JeanMertz has joined #ruby
<workmad3>
and/or/not bind lower than =, basically
<workmad3>
so you can do them to do things like '@a = some_method or return'
stephenjudkins_ has quit [Ping timeout: 272 seconds]
<rking>
The necessity of saying "$_ =~ " makes that less idiomatic than the Perl equivalent.
stephenjudkins__ has joined #ruby
dekroning has joined #ruby
jprovazn has joined #ruby
<rking>
perl -ne 'print if /a/ .. /b/'
<fowl>
you could also do
<Hanmac>
rking do you know: ~/regex/ ?
<rking>
Hanmac: Nope!!
<banisterfiend>
rking: btw, bacon exists as a proof of concept: that you can get 80% of the functionality/power with 20x the speed in 1/20th the lines of code
<Hanmac>
regex has a ~@ method
<banisterfiend>
rking: that's why i like it, because it's not bloated and slow as shit like rspec
punkrawkR has quit [Read error: Connection reset by peer]
<banisterfiend>
rking: and i can still do 80% of the things i'd do in rspec, and the extra 20% is likely just crap anyway
g_rotbart has quit [Remote host closed the connection]
<rking>
Hanmac: Awesome. That's sufficiently golfed that I can use it. ruby -ne 'print if ~/a/..~/b/'
ph^ has quit [Remote host closed the connection]
<fowl>
Error: The method 'Regexp#~@' could not be found. Type `show-doc --help`
ph^ has joined #ruby
<fowl>
wha
<banisterfiend>
rking: if we rewrote pry tests in rspec, i'm certain they'd take an age to run, and we just wouldn't bother to run tests as often when we make changes, resulting in more failures on travis and slower development cycle
charliesome has joined #ruby
<rking>
banisterfiend: I haven't made a full comparison, but I do know I was trying things in bacon and they weren't working and it was making me thing ☠'s in your general direction.
<rking>
banisterfiend: Yes, fast tests are nonoptional.
<rking>
banisterfiend: We need to get guard going. It's great.
<banisterfiend>
rking: what do you use it for currently?
<banisterfiend>
rking: btw, bacon is not only faster than rspec, it's faster than minitest too. afaik it's the fastest testing lib out there
<banisterfiend>
i like that, it makes me feel k00.
<fowl>
test this
<rking>
Hrm. Regexp#~@ exists in Ruby 1.9.2. I wonder why pry-doc isn't picking up on it.
* fowl
points to his junk
<banisterfiend>
fowl: there was 3 errors and 1 failure
ryanf has joined #ruby
<banisterfiend>
fowl: "scrotum not found error"
<rking>
banisterfiend: I use it for 100% of my projects. It's a superhuge win on Rails where boot time is ~15 seconds (that is, when combined with Spork)
<banisterfiend>
rking: you still haven't said what you actually use it for, im not that familiar with it :)
<fowl>
banisterfiend: i pushed it in
<banisterfiend>
rking: you mean @~
<Hanmac>
fowl hm its in the method as :~
<rking>
banisterfiend: It uses Linux's inotify (and OSuX equivalent) to watch the files and tests, then smartly run them.
<fowl>
Hanmac: you
<rking>
banisterfiend: Oh oh oh
<fowl>
're right
stephenjudkins__ has quit [Read error: Connection reset by peer]
<fowl>
i thoguht it was ~@
<banisterfiend>
rking: just do: ? Regexp#~
<rking>
banisterfiend: It's how you can easily snip bracketed sections of a text stream, for example.
stephenjudkins has joined #ruby
noyb has quit [Ping timeout: 244 seconds]
ananthakumaran has joined #ruby
peterpan has quit [Quit: leaving]
lolmaus has joined #ruby
<rking>
ruby -ne 'print if ~/Now the light/../T.S Eliot/' $(locate default_commands/easter_eggs.rb | head -n1)
<rking>
Whoa
<rking>
I left it off on the second one.
<rking>
How the heck did that just work?
<rking>
Nono, I don't even need the first one.
<Hanmac>
because /T.S Eliot/ is true too ... ?
<rking>
Now I'm stunned. I distinctly remember having to put "$_ =~" in places that made me mad.
<rking>
Nope, it works exactly as it should.
<rking>
It's really matching only that section.
<Hanmac>
:P
<banisterfiend>
rking: do you like the t s eliot poem
workmad3 has quit [Ping timeout: 240 seconds]
RORgasm has quit [Remote host closed the connection]
ephemerian has joined #ruby
<rking>
banisterfiend: I don't know if I understand any more to it than it sounds like the vividish description of walking into a town where there is activity, passing by a farm (which is nature quietly being itself regardless of the human presence).
justinmcp has joined #ruby
<banisterfiend>
rking: yeah, it's just capturing a moment
<rking>
kk
<rking>
I like it, then.
pingfloyd has quit [Quit: pingfloyd]
<banisterfiend>
rking: do you liek cohen-poem ?
tyfighter_ has joined #ruby
quazimodo has joined #ruby
cezar has joined #ruby
<rking>
I thought maybe the "dahlias" had a second thing going on, because of the Black Dahlia, but I'm not wikipediaing so.
cezar has quit [Client Quit]
dmiller has joined #ruby
<quazimodo>
whats the correct way to make a method like customer.my_method(attribute_name), where my_method will return order.attribute_name +
<quazimodo>
?
<banisterfiend>
quazimodo: you should probably learn ruby before you learn rails
<rking>
banisterfiend: Is it only about the power of lust?
<quazimodo>
banisterfiend: im doing both
<quazimodo>
but yeah, is there a general way to access an attribute via a string representation of its name?
<banisterfiend>
quazimodo: what doy ou mean by an 'attribute' ?
<quazimodo>
variable getter/setter
<quazimodo>
or even method
<rking>
quazimodo: vim app/models/customer.rb Then put in: def my_method attribute_name; order.send attribute_name end
<banisterfiend>
quazimodo: use send
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
clj_newb has joined #ruby
<banisterfiend>
it's confusing when people talk about 'attributes' in ruby IMO
<quazimodo>
ah thanks :)
<banisterfiend>
unless it's a railsism
skyjumper has quit [Ping timeout: 268 seconds]
<quazimodo>
i think I learnt to think of it like thath in python
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
hoelzro is now known as hoelzro|away
<banisterfiend>
ah ok
maletor has quit [Quit: Computer has gone to sleep.]
skyjumper has joined #ruby
<quazimodo>
im finding ruby... very lispy
dmiller has quit [Ping timeout: 252 seconds]
Ruler_Of_Heaven_ is now known as pipopopo
<fowl>
whys that
BIGX333 has quit [Ping timeout: 264 seconds]
machty_ has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
<banisterfiend>
quazimodo: why is that
robotmay has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
<rking>
Oh wow.
mahmoudimus has joined #ruby
<rking>
Ruby even ported the odd Integer .. Integer flip-flop from Perl:
<rking>
ruby -ne 'print if 1 .. 10' a-file
Banistergalaxy has joined #ruby
wobr has joined #ruby
<rking>
That matches the numbers against $.
<rking>
Against `$.` I should say
<quazimodo>
Banistergalaxy: it just kiiiiinda is
<quazimodo>
its not a valid lisp yet ( i dont think )
<quazimodo>
i mean it kinda feels like that, thats all :)
c0rn_ has joined #ruby
kjellski has joined #ruby
faen has quit [Quit: faen]
<rking>
Banistergalaxy: ruby -ne 'print if 18..20' $(locate default_commands/easter_eggs.rb | head -n1)
<rking>
quazimodo: How is it not? (I don't know Lisp at all)
<quazimodo>
rking: mm im a bit of a lisp noob to be aware of why
jimeh has quit [Ping timeout: 245 seconds]
<quazimodo>
all i know is that when i use ruby, it feels like im somewhere in lisp
thaz has quit [Quit: thaz]
<quazimodo>
i asked the lisp guys, they agreed that they feel that way too
qwerxy has joined #ruby
<quazimodo>
not sure why yet tbh
<quazimodo>
they'llknow
<rking>
Well, I'm intrigued especially by the "a Lisp" part. I know there are such things, but I don't get what makes them so.
nilg`` has quit [Read error: Connection reset by peer]
darthdeus has joined #ruby
<quazimodo>
i think it has to do with the level of abstraction and the way things are laid out
<quazimodo>
notsure
<quazimodo>
one day ill know
<quazimodo>
i think a primary feature is that data and instructions are the same thing
<quazimodo>
theres not much distinction between them at all
<quazimodo>
other than the immediate usage
stoffus1 has joined #ruby
stoffus has quit [Ping timeout: 240 seconds]
qwerxy has quit [Quit: offski]
eldariof has joined #ruby
Chryson has quit [Quit: Leaving]
maesbn_ has joined #ruby
nilg has joined #ruby
<quazimodo>
is using send appropriate for encapsulation purposes?
paul_andrew has joined #ruby
<heftig>
quazimodo: using send how?
<heftig>
use public_send if you want to avoid violating encapsulation
<quazimodo>
like customer.get_addr_thing(:mailing_address) or (:street_address) where def get_addr_thing(arg); unless customer.address.nil? customer.address.send arg
gianlucadv has quit [Ping timeout: 272 seconds]
maesbn has quit [Ping timeout: 240 seconds]
<quazimodo>
so that i dont have to write 15 wrapper methods for each address variable in the address instance
Nathandim has joined #ruby
Banistergalaxy has quit [Remote host closed the connection]
<heftig>
why not expose address?
pskosinski has joined #ruby
xorigin has joined #ruby
<quazimodo>
heftig: not sure
pingfloyd has joined #ruby
<quazimodo>
didn't know that that was an option
pingfloyd has quit [Changing host]
pingfloyd has joined #ruby
<quazimodo>
(also don't know if it's a best practice or not)
wobr1 has joined #ruby
qos has quit [Read error: Connection reset by peer]
bartj3 has joined #ruby
wobr has quit [Ping timeout: 268 seconds]
igotnolegs has quit [Quit: Computer has gone to sleep.]
khakimov has quit [Quit: Computer has gone to sleep.]
lushious has joined #ruby
pablo_ has quit [Ping timeout: 264 seconds]
qos has joined #ruby
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
Nathandim has quit [Quit: Leaving]
gianlucadv has joined #ruby
quazimodo has quit [Ping timeout: 268 seconds]
rakl has quit [Quit: gone]
stephenjudkins has quit [Read error: Connection reset by peer]
<rking>
Hanmac: Perhaps if this idea works I'll send a can to all my ♡ies.
ori-l-away is now known as ori-l
<rking>
quazimodo: OK. Thanks. I'll try to check it out this Sabbath.
<quazimodo>
rking: lol
<Cork>
rking: Iconv.iconv('UTF-8', 'LATIN1', data) works, the problem is i don't know what encoding i'm getting
<Cork>
so i can't run it through it generically
<rking>
Cork: You could always just be a jerk and sub out any byte that has an 8th bit with a "?".
<rking>
That's like poor man's encoding handling.
<Cork>
the problem is i need it :/
<rking>
I don't know how encoding-aware whois is.
<Cork>
don't think its aware at all
diegoviola has quit [Quit: leaving]
<Xeago>
what is the correct english ending to: "If these are in conflict with the original dutch version the latter abc"?
<ori-l>
rking: whoa! i'm not a rubyist, but had to write some ruby code for a project over the past couple of days. pry was indispensable!
<rking>
Cork: I'm having no troubles whatsoever under 1.8
<rking>
ori-l: Pry is tops.
<Cork>
now thats interesting...
<Hanmac>
Cork Iconv is deprecated :(
<Xeago>
"... the latter prevails."?
<rking>
Hanmac: He's on 1.8 though.
<Cork>
rking: thx for looking seams i need to git a lot more in this...
<rking>
Xeago: That sounds like it would work, but there's not a lot of context there.
<Hanmac>
yeah ... and in less than a year he dont get any support from me anymore :P
<quazimodo>
rking: hold on is pry-de a text editor?
<Xeago>
there's a listing I freely translated, however the original version should be used when in doubt or if conflicts arise
<Cork>
Hanmac: if everything works as expected this system will die in 2 months
Moggle has quit [Quit: ChatZilla 0.9.88.2 [Firefox 16.0/20120828083259]]
<Cork>
but the service can't crash every other day cause of encoding problems until that date
<Xeago>
"This listing is freely translated by the author. If these are in conflict with the original dutch version the latter prevails."
<Cork>
(i just wish verisign could provide owner contacts instead of fourcing you to parse whois data >_<)
<Xeago>
where the original dutch version is hyperlinked
Criztian has joined #ruby
<rking>
quazimodo: No, it's an integration with (and subversion of completely).
<Xeago>
rking: this better?: "If these are in conflict with the original dutch version, the latter will prevail."
<Xeago>
e.g. prevails vs will prevail
<rking>
Xeago: Yes
<Xeago>
ok, ty]
<rking>
Xeago: But what's up with the lower-case "dutch"?
<Cork>
interesting... $KCODE = "NONE" seams to "fix" the problem...
aibo has joined #ruby
<Xeago>
rking: no clue, should it be uppercased ?
<ori-l>
Xeago: yes
<Xeago>
bluuugh, we're becoming german!
<rking>
Xeago: Proper nouns are always capitalized, unless they're trendy internet startups.
dmiller has joined #ruby
quazimodo has quit [Ping timeout: 264 seconds]
<Xeago>
it's an adjective right?
<Xeago>
the Dutch version, where version is noun and Dutch adjective
<Mon_Ouie>
The thing is, the definition of "proper" isn't the same in all languages. For instance in French language names and adjectives aren't capitalized.
<ori-l>
Xeago: it's a "demonym"
<ori-l>
and an adjective, yes. sometimes these are classified as "proper adjectives" but that's a contentious term
<rking>
Xeago: You're right. Proper adjectives are the same way.
<rking>
ori-l: Hehe, I was not reading before typing. I curtsy.
<ori-l>
:)
stephenjudkins has quit [Quit: stephenjudkins]
dmiller has quit [Ping timeout: 248 seconds]
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
specialGuest has joined #ruby
machty_ has joined #ruby
specialGuest has joined #ruby
specialGuest has quit [Changing host]
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
<shevy>
when will ruby 2.0 come
<workmad3>
20never
classix has joined #ruby
Foxandxss has joined #ruby
jonathanwallace has quit [Ping timeout: 276 seconds]
<Xeago>
what is the drive in ruby to release a new version
tonini has quit [Remote host closed the connection]
<Xeago>
feature, bug fix, speed and security right?
justinmcp has quit [Remote host closed the connection]
Virunga has joined #ruby
fyolnish_ has quit [Remote host closed the connection]
rohit has joined #ruby
Progster has joined #ruby
DrShoggoth has quit [Quit: Leaving]
ori-l has left #ruby ["Leaving"]
Rochefort has joined #ruby
Rochefort has quit [Remote host closed the connection]
nari has quit [Ping timeout: 245 seconds]
Progster has quit [Ping timeout: 244 seconds]
mneorr has quit [Quit: Leaving.]
justinmcp has joined #ruby
mneorr has joined #ruby
seoaqua has quit [Ping timeout: 245 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
bluOxigen has joined #ruby
artm has quit [Quit: artm]
paul_andrew has joined #ruby
mneorr has quit [Quit: Leaving.]
<Xeago>
an assessment is formed by assessing right?
wuzzzzaah has joined #ruby
<Xeago>
this sentence sucks, anyone have any tips?: "This document will be used during the assessment as the source for the competencies to be proven."
rakunHo has joined #ruby
fermion has joined #ruby
banisterfiend has quit [Ping timeout: 244 seconds]
banisterfiend has joined #ruby
lushious has quit [Ping timeout: 252 seconds]
sumim has joined #ruby
clj_newb has joined #ruby
sumim has quit [Client Quit]
resure has joined #ruby
baphled has joined #ruby
cascalheira has joined #ruby
frogprince has quit [Quit: Leaving...]
<bnagy>
'the Dutch version' is not a demonym
<bnagy>
... afternoon :P
SegFaultAX|work2 has quit [Ping timeout: 272 seconds]
banisterfiend` has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
banisterfiend has quit [Ping timeout: 246 seconds]
Rochefort has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby
Rochefortes has quit [Read error: Connection reset by peer]
Markvilla has quit [Quit: Computer has gone to sleep.]
Rochefort has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<vectorshelve>
I happened to create some guest pasties on pastie.org and pastebin of error logs and I was warned not to do it.. I couldnt delete them as well.. since I was guest user
sgmac has joined #ruby
mercwith1mouth has joined #ruby
burgestrand has quit [Quit: Leaving.]
<vectorshelve>
does private pastie get deleted ?
<Hanmac>
pastebin has Expiration
sgmac has quit [Read error: Connection reset by peer]
Elico1 has quit [Quit: Elico1]
mercwith1mouth has quit [Ping timeout: 248 seconds]
emmanuelux has joined #ruby
sgmac has joined #ruby
tyro has joined #ruby
mark_locklear has joined #ruby
Elico1 has joined #ruby
burgestrand has joined #ruby
s1n4 has left #ruby ["leaving"]
radic has quit [Ping timeout: 252 seconds]
haxrbyte_ has quit [Ping timeout: 255 seconds]
burgestrand has quit [Quit: Leaving.]
haxrbyte has joined #ruby
sgmac has quit [Max SendQ exceeded]
Jay_Levitt has quit [Quit: Jay_Levitt]
seoaqua has joined #ruby
radic has joined #ruby
asklov has joined #ruby
Markvilla has joined #ruby
sgmac has joined #ruby
Criztian has quit []
berkes has joined #ruby
nwest has joined #ruby
vectorshelve has quit [Quit: Page closed]
GoBin has joined #ruby
sgmac has quit [Read error: Connection reset by peer]
sgmac has quit [Read error: Connection reset by peer]
chendo_ has quit [Ping timeout: 244 seconds]
seanyo has joined #ruby
tommyvyo has joined #ruby
sdwrage has joined #ruby
sgmac has joined #ruby
tomeo has joined #ruby
<tomeo>
Could someone please recommend a library which is suitable when working with graphs of vertices and edges?
burgestrand has quit [Quit: Leaving.]
tyro has left #ruby [#ruby]
luckyruby has quit [Remote host closed the connection]
smellynoser has quit [Quit: This computer has gone to sleep]
jclem has joined #ruby
insulator has joined #ruby
<AxonetBE>
Hanmac: yes it is the response of an api we use
philcrissman has quit [Remote host closed the connection]
sgmac has quit [Read error: Connection reset by peer]
<Hanmac>
AxonetBE when you get an xml, use nokogiri to parsing
jonathanwallace has joined #ruby
<AxonetBE>
Hanmac: I use Crack::XML.parse for the moment
<AxonetBE>
not good?
<Xeago>
regardless, it's a damn hash, just navigate it
<Hanmac>
nokogiri is more cool
<Xeago>
if I see it correctly, it's soap so it has a fixed format after checking responseStatus
mark_locklear has quit [Remote host closed the connection]
haxrbyte_ has quit [Ping timeout: 252 seconds]
sgmac has joined #ruby
<AxonetBE>
Xeago: yes, I can navigate through it but I'm stuck at this point. https://gist.github.com/3665770, here I have an array and with different hashes containing "key"=>"keyname", "value"=>"keyvalue", so I have to find the hash with the KEY email in this array and then get the VALUE in this hash. How can I search in this array the hash that contains the key EMAIL?
hoelzro|away is now known as hoelzro
mark_locklear has joined #ruby
haxrbyte has joined #ruby
<Xeago>
when the element in the array conforms to: element['key']=="EMAIL" spit out element['value']
haxrbyte_ has joined #ruby
rakunHo has quit [Remote host closed the connection]
<Hanmac>
ary.find {|h|h["key"]=='EMAIL'}['value']
elux has joined #ruby
lolmaus has quit []
binaryplease has quit [Quit: WeeChat 0.3.8]
<Hanmac>
with nokogiri you could use xpath to get the email adresses
sgmac has quit [Max SendQ exceeded]
haxrbyte has quit [Ping timeout: 246 seconds]
<AxonetBE>
Hanmac: ok, I will take a look at nokogiri
<_bart>
Hi all, I have a new idea.
chussenot has joined #ruby
g33k has quit [Quit: Leaving]
linoj has joined #ruby
<fowl>
_bart: you can't invent the frisbee, somebody did it already
<_bart>
I want to use Genetic Algorithms to determine wether sentences like "Hi, I'm on a horse." and "Kdsf, sdlere, 532s', ddsksd" are crap or really something.
quazimodo has joined #ruby
<_bart>
Anyone experience with genetic algorithms? can they be used for this problem?
jrist-afk is now known as jrist
<_bart>
(the plan is to share the result on github)
<quazimodo>
so i was asking before how to write a generic wrapper method
sgmac has joined #ruby
<quazimodo>
i was told that public_send is useful
robotmay_ has joined #ruby
hadees has quit [Quit: hadees]
robotmay has quit [Ping timeout: 246 seconds]
<quazimodo>
but if I send :foo i still get errors when it doesnt exist
<shevy>
Hanmac I wonder how you can still watch comics man
<fowl>
adventure time is the best
atmosx has quit [Ping timeout: 244 seconds]
<fowl>
btw shevy your examples are identical
<catphish>
case foo; when 'x'; else; end; is obviously marginally slower
<catphish>
though maybe only during compile
<catphish>
i wouldn't say there was any real difference
yhll has joined #ruby
sgmac has quit [Read error: Connection reset by peer]
<shevy>
hmm yeah
<catphish>
else is just what happens if the case doesn't encounter a match, so it doesn't really take any processor instructions to get there
<shevy>
I just had an example where I kept an "else" for debugging purposes
Takehiro has quit [Remote host closed the connection]
<catphish>
i'd take back what i said before and say they're exactly the same
<shevy>
but I'd only need it during debugging... so in 99,9% of when it is called, that else clause was useless to have for me
<catphish>
i wouldn't worry about it
<JonnieCache>
shevy: one way to find out
smellynoser has joined #ruby
<JonnieCache>
use that benchmark module and run each 1000000.times
<fowl>
benchmark lib in ruby is retarded-easy to use
sgmac has joined #ruby
<catphish>
of course, if it reaches the else, it will need to run whats inside it
<yhll>
I have an IO and I'd like to jam it into a tempfile. Any ideas as to how I can do that?
<catphish>
and that might slow you down
<catphish>
yhll: io.reopen(tmpfile)
<catphish>
iirc
<catphish>
unless you mean read the io and write it to a tmp file
<catphish>
thats more complicated
wuzzzzaah has joined #ruby
paralaji has joined #ruby
<yhll>
catphish: Yeah, sorry I wasn't clear, I'd like to write it to a tmp file
internet_user has joined #ruby
<catphish>
write what?
<catphish>
data you are reading from the io?
<catphish>
or data you are writing to it?
sgmac has quit [Read error: Connection reset by peer]
<yhll>
catphish: Reading from it. More specifically I'm downloading a remote image with open uri which returns an IO but I need a tmpfile to pass to an external lib
<catphish>
well you just need to open another IO to a file (File.open(name, 'w'))
<lectrick>
banisterfiend`: Had no idea you were Mr. Pry. Nice work, there. Thanks for all your general assistance here. :)
DuoSRX has joined #ruby
<paralaji>
hello, for example i need divide 7/5 but the result i need round for up
<catphish>
then while(file.write(io.read(1024))) or similar
<catphish>
making sure it handles EOF and IOError
lkba has joined #ruby
<hoelzro>
paralaji: try Numeric.round
<paralaji>
i need the result gimme 2, not 1.
<paralaji>
yes? i will search this, thanks!.
<hoelzro>
paralaji: you also need to divide a float by an integer, or an integer by a float
<hoelzro>
integer division truncates by default
arkiver has quit [Quit: Leaving]
imami|afk is now known as banseljaj
<yhll>
catphish: I'll give that a try. Thanks a lot!
<paralaji>
aaaaa thanks
Xeago_ has joined #ruby
jrist is now known as jrist-phn
datsik33 has joined #ruby
sdwrage has quit [Quit: geekli.st/programmer]
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
sgmac has joined #ruby
spopescu has joined #ruby
<catphish>
(7.to_f/5.to_f).ceil
<catphish>
assuming you always want to round UP
Xeago has quit [Ping timeout: 272 seconds]
<hoelzro>
ah, good call on #ceil
<paralaji>
thanks!
<paralaji>
:D
<catphish>
or .round if you want to round to the neerest number
mucker has quit [Read error: Connection reset by peer]
<paralaji>
thank catphish!
<paralaji>
you are great.
sgmac has quit [Read error: Connection reset by peer]
<catphish>
are there any docs on creating a sockaddr_to in ruby?
resure has quit [Remote host closed the connection]
jorge_ has quit [Remote host closed the connection]
pu22l3r has joined #ruby
x77686d has joined #ruby
sterex has joined #ruby
stkowski has joined #ruby
bluOxigen_ has joined #ruby
rogeruiz has joined #ruby
ylluminate has quit [Quit: Bye!]
mmitchell has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 244 seconds]
haxrbyte has joined #ruby
pricees has joined #ruby
havenn has joined #ruby
frogprince_mac has joined #ruby
mmitchell has joined #ruby
adeponte has joined #ruby
Bosma has quit [Ping timeout: 268 seconds]
qwerxy has joined #ruby
yshh has quit [Remote host closed the connection]
leoncamel has joined #ruby
aristidesfl has joined #ruby
RegEchse has joined #ruby
macmartine has joined #ruby
bbttxu has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
johnlcox has quit [Read error: Operation timed out]
sepp2k1 has joined #ruby
AxonetBE has quit [Quit: Leaving.]
wuzzzzaah has quit [Ping timeout: 264 seconds]
Monie has joined #ruby
johnlcox has joined #ruby
sepp2k has quit [Ping timeout: 276 seconds]
thaz has quit [Quit: thaz]
artOfWar_ has quit [Ping timeout: 240 seconds]
Jamone has quit [Ping timeout: 244 seconds]
khakimov has joined #ruby
aristidesfl has quit [Client Quit]
artOfWar has joined #ruby
fmcgeough has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
xorigin has quit [Remote host closed the connection]
artOfWar has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
xiaotian has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
fyolnish has joined #ruby
br4ndon has quit [Ping timeout: 272 seconds]
aristidesfl has joined #ruby
GuidovanPossum has joined #ruby
wuzzzzaah has joined #ruby
TheShadowFog has joined #ruby
fyolnish has quit [Ping timeout: 252 seconds]
havenn has quit [Remote host closed the connection]
<shevy>
die
<shevy>
I mean, yeah
<shevy>
good weekend to you JonnieCache
havenn has joined #ruby
<blazes816>
run out of meds?
<shevy>
matti it was easier to double click on your name, then press middle mouse button, then enter... I was unable to spend the energy to hit the space key :)
<shevy>
mattimattmattii
<shevy>
vs
<shevy>
matti matti matti matti matti
maletor has joined #ruby
<shevy>
ugh that was annoying
carlos_atx_ has joined #ruby
<lectrick>
(0.1).to_s(2) # ArgumentError: wrong number of arguments(1 for 0) ... Why can't I do that?
timonv has quit [Remote host closed the connection]
<lectrick>
(10).to_s(2) #=> "1010"
<Muz>
Because 10 is a FixNum and 0.1 is a Float.
<canton7>
looks like Float and Fixnum implement to_s differently
<Muz>
And that.
<lectrick>
I know why technically; I want to know why practically.
carlos_atx_ has quit [Client Quit]
<canton7>
and the argument to Fixnum#to_s is the base. base conversions and decimals don't tend to go together
GoGoGarrett has quit [Remote host closed the connection]
mneorr has joined #ruby
ph^ has quit [Read error: Connection reset by peer]
tyfighter has joined #ruby
ph^ has joined #ruby
GuidovanPossum has quit [Read error: Connection reset by peer]
Rochefort has quit [Remote host closed the connection]
<levieraf>
hi guys
<levieraf>
i have a question
<windowns>
oh, hehe. I did upgrade to Ruby 1.9.3 :)
workmad3 has quit [Ping timeout: 252 seconds]
<levieraf>
exists any oscommerce on ruby?
<windowns>
For some reason when i'd install the uv gem it wouldn't copy the files over to the rubyinstalldir\lib\ruby\1.9.1 from the gem's lib folder
<levieraf>
??
<canton7>
lectrick, and the phrase "how floats are represented in binary to Ruby" doesn't make sense. Ruby uses some IEEE floating-point standard for representing them, and you'll have to dig deeper than what that article goes into
<lectrick>
canton7: interesting. just makes me want to stick to bigints for all possible calculations though lol.
<canton7>
lectrick, depends what you're doing. currency? yes, use a fixed point library. most other stuff? the 13th decimal place doesn't matter: just round
<lectrick>
levieraf: oscommerce is bad. try shopify.
faen has quit [Read error: No route to host]
Rochefort has joined #ruby
artOfWar has quit [Ping timeout: 268 seconds]
<lectrick>
canton7: yeah i just don't like the idea of imprecise representations
<canton7>
and tbh, I find that article slightly misleading. it skips over exponent/mantissa stuff, which is kinda key
apok_ has joined #ruby
faen has joined #ruby
indian has joined #ruby
<canton7>
lectrick, yeah that's a pretty standard first impression. then you realise that it doesn't matter
pdtpatrick has joined #ruby
<lectrick>
i imagine so. i'd prefer to represent numbers internally as a fraction if the decimal or binary version of the fraction had an infinite portion
havenn has quit [Remote host closed the connection]
shadoi has joined #ruby
<canton7>
lectrick, look up how floats are actually represented
havenn has joined #ruby
<lectrick>
canton7: also for speed reasons
<lectrick>
(using an algorithm that uses all ints vs. one that uses floats I mean)
wuzzzzaah has quit [Ping timeout: 246 seconds]
<levieraf>
lectrick, is free shopify?
arturaz has quit [Ping timeout: 252 seconds]
<lectrick>
levieraf: Nothing is free :) But it may be cheap.
mmitchell has quit [Remote host closed the connection]
<lectrick>
levieraf: You're going to have to end up paying some payment processor anyway
philcrissman has quit [Remote host closed the connection]
mmitchell has joined #ruby
philcrissman has joined #ruby
adeponte has quit [Remote host closed the connection]
<levieraf>
lectrick, :(
mmitchel_ has joined #ruby
shevy has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
baphled has quit [Ping timeout: 248 seconds]
<windowns>
anyone got any ideas about the odd behavior i'm seeing?
<windowns>
well maybe it's not odd, but normal now with Ruby 1.9.3
<windowns>
i just dont know :(
wuzzzzaah has joined #ruby
thunderstrike has quit [Read error: Connection reset by peer]
bluenemo has quit [Remote host closed the connection]
halfie has joined #ruby
yshh has joined #ruby
<canton7>
lectrick, hmm? how does windows come into this?
<halfie>
I am using rvm and have install plist using "gem install plist", problem is "require 'plist'" is not working. any tip[s to get it working?
<lectrick>
canton7: Most companies still give new hires 2 weeks vacation even though plenty of proof exists that more overall productivity would result from 3+ weeks. Most studies on drug legalization show it to be very effective, yet most countries still ban even the softest drugs. Gay marriages threaten no straight ones, yet most people are still against them. Things are done because they were always done
<lectrick>
and not because they conform to even PRESENTLY KNOWN truths.
<canton7>
and yes, fixed-point has its place, but please learn some more about floating point / fixed point before judging them :P
Takehiro has quit [Read error: Connection reset by peer]
<lectrick>
canton7: I just felt like randomly bashing windows again.
<halfie>
windows pffft :D
<canton7>
windows is unrelated to floating point int all ways :P
<drPoggs>
lectrick: if you want bash on Windows, try Cygwin
<lectrick>
canton7: See my thwack to windowns :)
Takehiro has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
<lectrick>
drPoggs: I know. I had to use cygwin. Back when I was tortured with a windows work computer.
<canton7>
social issues are different ones to computer issues. with a history of limited resources, adopted approaches *tend* to be more efficient ;)
<drPoggs>
lectrick: :( are you recovered and rehabilitated with OS/X or a UNIX?
* windowns
is completely lost
* canton7
same
<lectrick>
drPoggs: For a long time now, yes.
levieraf has quit [Quit: Saliendo]
<halfie>
I am using rvm and have install plist using "gem install plist", problem is "require 'plist'" is not working. any tips to get it working?
<drPoggs>
\o/
<lectrick>
windowns: was just poking at your name :)
<windowns>
halfie, how is it not working
<windowns>
OH
<rking>
lectrick: The threat of allowing gay marriages is not against straight marriages, but against the country's standing as one that will not label that which is unrighteous as that which is acceptable.
beneggett has joined #ruby
<windowns>
haha, i forget about my name sometimes
<lectrick>
canton7: forget the random windows crack, was poking at windowns' name
<halfie>
windowns: cannot load such file -- plist (LoadError)
<rking>
Get it right if you're going to randomly bash something in an utterly off-topic way.
<windowns>
halfie, i just had the same issue when trying to install that today
<halfie>
gem list contains plist in output so installtion is okay
<halfie>
windowns: did you get it fixed?
<windowns>
double check that the files from the gem's lib folder are in the rubyinstalldir/lib/ruby/1.9.1
<lectrick>
rking: What's unrighteous of a thing, and who determines that?
<rking>
lectrick: God does.
<windowns>
i had to manually copy them in myself, which i found odd and which is why i'm here to see if that is normal :)
naz has quit [Read error: Connection reset by peer]
<halfie>
windowns: no plist files exist in ruby folder :(
<windowns>
wait
<lectrick>
rking: He hasn't told me any such thing.
<windowns>
what's the full path that you checked?
<halfie>
gems folder has plist files though
sendoushi has joined #ruby
<rking>
Anything that opposes his nature is unrighteous, so it's not that he has to do any specific adjudication on matters to define sin; but even if he did decide to do something completely arbitrary, that's his right as Sovereign.
<lectrick>
People hate the truth. People want to be popular, though.
<lectrick>
rking: what the fuck are you talking about?
<rking>
lectrick: Then you've neither studied the prophecies nor nature. He spoke it through both on this issue.
<halfie>
how do I import a gem?
BigFatFatty has left #ruby [#ruby]
<rking>
lectrick: I was answering the first part of your question after having jumped directly to the second in my previous answer.
wuzzzzaah has quit [Ping timeout: 248 seconds]
<davidcelis>
what do you mean import
cakehero has joined #ruby
<lectrick>
rking: If you're talking about the Bible, it's imperfect and therefore not an authoritative source by any means: http://www.youtube.com/watch?v=RB3g6mXLEKk If you're talking about God, then which one from which religion is up for question. Even the old testament God differs EXTREMELY from the new testament God. And finally, since all these sources of information are muddled, anyone who cites these
<lectrick>
as a reason to oppress the happiness of adults is committing a sin. In My eyes. :P
<lectrick>
But I digress massively.
flori has joined #ruby
* lectrick
was an altar boy, and is now educated... and critical
dpk has joined #ruby
joofsh has quit [Ping timeout: 245 seconds]
<rking>
lectrick: Your eyes don't matter in the least as far as declaring what is right or wrong.
Takehiro has quit [Read error: Connection reset by peer]
<rking>
In fact it's a safer assumption that a man's eyes see what is right as wrong and vice-versa.
<lectrick>
rking: I know in my heart what is right or wrong, and that is all anyone who has not been brainwashed into a religion needs, and has always needed.
<lectrick>
rking: That last thing you said is pure religion BS.
<rking>
lectrick: This video is not serious at all. If you want to actually talk about any given ~contradiction, I'd be happy to in a privmsg or other channel.
<lectrick>
They want you to think that to keep you in a state of confusion.
ph^ has quit [Read error: Connection reset by peer]
<lectrick>
Confusing things seem mysterious. This is why the Gnostic version of religion was tossed, it was TOO confusing to most people. But put in the right amount of confusion, and people are *fascinated*!
ph^ has joined #ruby
<halfie>
wtf, python has never me such import problems. the very first program i write in ruby it complains about a library :(
* lectrick
is sorry he is digressing here
wallerdev has quit [Quit: wallerdev]
<halfie>
can't use plist, it is installed but require is failing.
TriTodd has joined #ruby
<windowns>
halfie, what's the path to your ruby install directory
<rking>
lectrick: You yourself are doing the same thing. This issue is not that "confusing", it is simple: We are fallen creatures. You can look around and be sure of this. God is still righteous, still pure, still correct in every way — this you cannot as easily see if you look around, as it takes a bit of faith.
pu22l3r has quit [Read error: Connection reset by peer]
<windowns>
thanks :)
moos3 has joined #ruby
<windowns>
from that directory look in /lib/ruby/1.9.1. In there do you see plist folder and plist.rb?
chimkan has joined #ruby
wuzzzzaah has joined #ruby
<windowns>
if you don't have that folder, then our directory structures between windows and *nix are too different for me to be able to help you :(
<rking>
lectrick: But I obviously don't expect to change your mind on that level of issue in this forum. But I strongly stand by my original point, that your assessment of the anti-gay-marriage platform is erroneous.
<halfie>
windowns: I have a gem folder there which contains plist files
<halfie>
no lib exists
sterex has quit [Quit: sterex]
Russell^^ has joined #ruby
jimeh has quit [Quit: bye]
<lectrick>
rking: I will humor you in a bit, but I want you to know that to anyone who has spent time outside the Christian Bubble, you sound quite brainwashed. But regardless, this country has FREEDOM FROM RELIGION. (Sorry, "of"). This means that you cannot use religious tradition to dictate policy. Literally.
bgupta has joined #ruby
bgupta has joined #ruby
bgupta has quit [Excess Flood]
dfr|work has joined #ruby
smellynoser has quit [Quit: This computer has gone to sleep]
<windowns>
halfie, just for clarification you dont have a /home/dsk/.rvm/gems/ruby-1.9.3-p194/lib folder?
<lectrick>
rking: There is no argument against homosexual anything that is not complete bullshit. And this is coming from a guy who is an absolute zero on the Kinsey scale.
bgupta has joined #ruby
bgupta has quit [Excess Flood]
<halfie>
windowns: no, i don't have it
<windowns>
bummer
<rking>
lectrick: That is also debatable. For the most part I think the "separation of church and state" thing is way overblown from a few non-unanymous documents of a tiny fragment of the founding fathers. But regardless, don't pretend like people are opposing homosexual marriage because it "threatens heterosexual marriage"
<windowns>
then i don't know where the files from the plist gem should end up so they can be found by Ruby in a *nix environment
bgupta has joined #ruby
bgupta has quit [Excess Flood]
<rking>
lectrick: Kk. See you at judgement day.
<lectrick>
rking: Religious "arguments" are not arguments, because they are not based on anything externally verifiable or objective.
<rking>
lectrick: Well, at most one side is bassed on something objective.
<rking>
But I agree that an argument is rarely a profitable form of interaction on a topic like this.
<halfie>
windowns: never mind, thanks for help
<halfie>
going back to using Python to do the job at hand
<windowns>
sorry halfie :(
<lectrick>
rking: You have absolutely zero proof or evidence of any of this except from what was beaten into your head or what exists in a 2000 year old book. You cannot prove that your religion is more "right" or "just" than any other religion. Therefore you have no right to base anything on those things. I am not saying belief is wrong, or faith isn't meaningful to people, or spirits or some sort of God do
<lectrick>
n't exist. I'm saying I can't push that onto others. Period.
<mneorr>
is there a mac / linux app (gui) , or a website that can perform OAUTH requests?
<windowns>
maybe someone here familiar with Ruby on *nix could hlep you out :(
<windowns>
oops, that was supposed to be a smiley :)
insulator has quit [Ping timeout: 276 seconds]
<halfie>
windowns:no problem :)
<lectrick>
Evidence-based legislation should be a thing.
<rking>
lectrick: That's only true from the a priori worldview that you have. If God is real, and he told his followers to preach his message in some circumstances, then none of that applies.
<rking>
lectrick: There are plenty of secular countries. Not all of them have to be so.
<rking>
I don't think America was founded on secularism.
<lectrick>
rking: And there are plenty of atheist countries. With LOWER crime rates than this one.
fyolnish has joined #ruby
sendoushi has quit [Remote host closed the connection]
kjellski has quit [Quit: This computer has gone to sleep]
bluOxigen_ has quit [Ping timeout: 246 seconds]
<rking>
lectrick: Well, I don't want to add in a second or third off-topic topic, so I'll definitely not pursue the theonomy vs. secularity line.
bigkevmcd has quit [Quit: outta here]
<rking>
lectrick: This man did a better job at answering that "Problem of evil" better than I have: http://youtu.be/lD1yv4J6ohE
frogprince_mac has quit [Quit: Leaving...]
mikedevita has joined #ruby
<mikedevita>
hey there
<mikedevita>
hello there,
<mikedevita>
I am trying to create an array of %m/%Y's but not have duplicates.. i have an each statement that iterates through rows returned from a db and then i strftime the date into mon/2012 and then push to an array, but i only want to push if the str that im pushing doesn't already exist..
halfie has left #ruby ["WeeChat 0.3.5"]
bbttxu has quit [Quit: bbttxu]
<mikedevita>
i suppose i could use a sort of array search, but i was wondering if the array class has something thats predefined for pushing a str to an array if unique
<rking>
mikedevita: You'd probably prefer a Set.
fyolnish has quit [Ping timeout: 252 seconds]
<mikedevita>
oo you're right
<mikedevita>
<-- ruby nu
<mikedevita>
<-- ruby nub
<mikedevita>
rking: how would i ensure when pushing to the set that it is unique? Or will ruby do that for me?
<mikedevita>
so you just continue to add, and Set will determine if it needs to or not
<rking>
mikedevita: .add is a synonym.
TheFuzzb_ is now known as TheFuzzball
<rking>
mikedevita: The old-school way of doing this is to use a Hash with an unimportant key. Like in Perl it's $seen{$something} = 1, then later keys %seen. A Set is a more communicative way to say the same thing.
sam__ has joined #ruby
<mikedevita>
thanks for your help
<mikedevita>
so far <3 ruby over php
<mikedevita>
how could i create an empty set?
<lectrick>
mikedevita: well, that isn't hard lol
<lectrick>
liking ruby over php i mean
<mikedevita>
as the adding of dates to the Set will be in an each?
<mikedevita>
but what if the set isnt created yet?
<mikedevita>
hmm
<mikedevita>
Dates = Set.new giving me #dynamic constant assignment error
bgupta has joined #ruby
bgupta has quit [Excess Flood]
wuzzzzaah has quit [Ping timeout: 264 seconds]
<rking>
mikedevita: Don't capitalise that left hand thing.
<mikedevita>
ahhh!
<mikedevita>
derp
<rking>
In Ruby it enforces what is already a pretty consistent language tradition, that lower-case names are variables and upper-case-first-letters are constants.
<mikedevita>
yeah
<lectrick>
rking: not here to argue for or against God, religion, spirit, belief or faith. I'm here to argue that you non-externally-verifiable beliefs are zero reason to influence law. like it or not the law is evidence-based and that is for a very good reason. If you dig into many of your religious beliefs (such as hell and the things that threaten to send you there), I think you will see that they are rea
<lectrick>
lly based on fear.
joofsh has joined #ruby
Xeago has quit [Remote host closed the connection]
wuzzzzaah has joined #ruby
<lectrick>
And fear is a powerful motivator. Which is why religions are infused with it.
<mikedevita>
and one more sily question, in php you can use print_r to see the contents of an array. how can i do such thing in a view within RoR
<mikedevita>
erb not ror
CodeVision has quit [Ping timeout: 260 seconds]
<rking>
lectrick: That "zero reason to influence law" part is entirely up to the preexisting worldview.
c0rn_ has joined #ruby
bgupta has joined #ruby
bgupta has quit [Excess Flood]
<rking>
If you believe in God, then there's every reason for his nature to influence laws. If you do not, there is no reason to.
bgupta has joined #ruby
bgupta has quit [Excess Flood]
<mikedevita>
puts
<mikedevita>
nvm
<rking>
mikedevita: Are you debugging or wanting actual output?
bgupta has joined #ruby
bgupta has quit [Excess Flood]
<mikedevita>
that i am
<mikedevita>
debugging
<rking>
<%= debug dates %>
<lectrick>
rking: If I believe in Vishnu and I believe that Vishnu orders you to only have sex with the intention to procreate, I have absolutely zero right to impose that belief on you with a law. Because there is no evidence that procreation-only sex is "better" than sex as it currently exists. (Other than, conveniently, increasing the number of Vishnu believers over time via parental brainwashing.)
<mikedevita>
i ended up using <%= formattedDates.inspect %>
sneakyness_wk has joined #ruby
<mikedevita>
ooo debug?!
insulator has joined #ruby
<mikedevita>
oh thats even sexsier
devnull_ has joined #ruby
bgupta has joined #ruby
bgupta has quit [Excess Flood]
<devnull_>
hello :) https://gist.github.com/3668184 thanks in advance for your help..don't understand why it works fine in another file but not in markaby :'((
<lushious>
how the hell did I join #hinduchat ?
<lectrick>
lushious: Ignore. lol
<lushious>
ok
<rking>
lushious: What if I found a scrap of unclaimed land, and then moved there with some of my buddies and there families, and we said, "You know what? In this, our new country, we're just not going to do _____." Is that somehow a wrong construct? The act of forming our own country that acts a certain way?
apok_ has quit [Remote host closed the connection]
<lectrick>
oops. wrong person.
<rking>
Haha
manizzle has quit [Ping timeout: 276 seconds]
<lupine_85>
rking, good luck with that. they're fresh out of land
<lectrick>
Now you got poor lushious involved
apok has joined #ruby
<lupine_85>
the best you can do is buy autonomy for city-states within honduras
<rking>
lupine_85: But then you are a sovereign nation?
<lectrick>
rking: that would be great (see: pennsylvania dutch country, those crazy luddites) except that at the country level we are a melting pot and cannot do such things.
<lupine_85>
anyway, it's not like religiously-originated legal systems are non-existent among nation states
<lupine_85>
I can't think of a single one of them that I'd like to live in, but they *do* exist
<lushious>
You should be able to whatever the fuck you like as long as you don't cause harm to anyone
<lupine_85>
rking, no, you're an autonomous region
johnlcox has quit [Quit: Computer has gone to sleep.]
<lectrick>
lupine_85: sadly, yeah.
<lushious>
Earth doesn't belong to anyone
<sam__>
i personally believe the more sorcerers we behead the happier we will be as a people
Rochefort has quit [Remote host closed the connection]
<sam__>
in this cold crazy world
<rking>
lupine_85: Do you know of one that says, "The Christian God is the definition of right and wrong, and our laws will reflect that."?
<lushious>
We are just germs spawned on a planet in the middle of nowhere
<lupine_85>
malta
eroc has joined #ruby
<lupine_85>
brazil
<lupine_85>
ireland
<lupine_85>
probably a few others
<rking>
Hrm.
<lectrick>
rking: oh damn you're gonna pack your bags aren't ya. lupine_85 thank you for your intelligence.
<lupine_85>
the UK house of lords is stuffed with christian bishops who vote for and against laws with the voice of the church
<lectrick>
Argentina?
<lushious>
Religion is like IE6, no one gives a shit about it anymore
Synthead has quit [Quit: p33 ba115]
<lectrick>
No, some people still take IE6 VERY seriously. ;)
Nisstyre-laptop has quit [Quit: Leaving]
<lupine_85>
lushious, except for everyone oppressing, and being oppressed, as a result
<fowl>
lupine_85: having the title 'lord' would be pretty k00
<lectrick>
Help! I'm being oppressed!
<lupine_85>
so the analogy is quite sound, since IE6 is a force of oppression
<lushious>
lectrick: only in the far east
Synthead has joined #ruby
<rking>
lectrick: You're making that assumption about what America is based on the current crop of misinterpretations of the founding fathers intentions. See also: 10th amendment abuse. What they made is not what we now live in.
<lupine_85>
lushious, and the middle east, and the west
jrist is now known as jrist-afk
<sam__>
php and religion are not disimmilar.. they served a purpose but slowly became more and more backwards and terrible as everything progressed
<lushious>
I wish I was norweigan
<lupine_85>
but really, we're all off-topic
c0rn_ has quit [Quit: Computer has gone to sleep.]
<lupine_85>
it's not like freenode is absent channels to discuss religion in
<wedgeV>
wait… this isn't #religion?
<fowl>
what channel is that
<lushious>
Error(470): #religion ##namespace Forwarding to another channel
<lectrick>
rking: "But it does me no injury for my neighbor to say there are twenty gods or no God. It neither picks my pocket nor breaks my leg." -Thomas Jefferson. Also "Question with boldness even the existence of a god; because if there be one he must approve of the homage of reason more than that of blindfolded fear."
<lectrick>
rking: "Lighthouses are more helpful then churches." — Benjamin Fuckin' Franklin
tethra has joined #ruby
<lectrick>
oops, spelling there
<lupine_85>
ohai
<lectrick>
lushious: Church of Satan is just as ridiculous.
<sam__>
"Beer is proof that God loves us and wants us to be happy" - Benjamin Fuckin' Franklin
<lushious>
why?
<sam__>
real quote
<rking>
lectrick: These are the sidebar rantings of a minority of them. You will not find such unanimity if you look at the public decisions.
<lupine_85>
eh, church of satan is pretty fine
<lectrick>
sam__: << what that guy said
<lupine_85>
temple of set is nutcase
<lupine_85>
but they're different
<lectrick>
rking: Everyone has an agenda. Every piece of information that comes your way that you did not seek out on your own has an agenda attached to it. Never forget that.
icambridge has joined #ruby
* lectrick
goes to the Temple of Ruby
luxurymode has quit [Quit: Computer has gone to sleep.]
<wedgeV>
9/8 never forget
<fowl>
for example, every bit of information i send out is molded towards my goal of legalizing murder and required abortions
<lectrick>
fowl: You externally-verifiable badness initiator, you
<lectrick>
rking: That logic would sound completely ridiculous when used with *any other thing*. Matz can use imperfect tools to communicate a perfect language. Shit, no wait....
<lupine_85>
rking, non-existent beings cannot do anything
<lupine_85>
they don't exist
<lectrick>
fowl: Nope. P.
Rochefort has joined #ruby
<fowl>
P. lectrick still has potential
<rking>
lupine_85: Time will tell.
<lupine_85>
rking, it already did
timonv has joined #ruby
<rking>
lectrick: Matz, being unspeakably less creative than God, would indeed be unable to do what you say.
<lectrick>
Short for Prognosticator. (My title in my religion.)
<lupine_85>
origin of deities: understood.
JeanMertz has joined #ruby
<lupine_85>
existence: denied
<rking>
lupine_85: Hehe
<lectrick>
rking: There IS the absentee-landlord theory of god...
baroquebobcat has quit [Quit: baroquebobcat]
<lupine_85>
well, deists have got themselves a cool niche, which I can't deny
<lupine_85>
but that niche includes a commitment to never saying what the deity wants humans to do
fantazo has quit [Remote host closed the connection]
<lectrick>
lupine_85: until we entirely understand the origin of life, the jury is still out on some sort of life-force or soul, and if such a thing existed it might still have a source, and it would be a convenient shorthand to just call that "God".
<lupine_85>
lectrick, no it isn't
<lupine_85>
there is no room for soul
<lectrick>
uh... yes there is.
<lupine_85>
where?
<lectrick>
don't even get me started in the other direction
<lupine_85>
why not? :p
<lectrick>
see rking now you got me fighting both sides sigh
<devnull_>
j #markaby
<lectrick>
lupine_85: Once you satisfy Maslow's hierarchy of needs, there are still longings and joys you seek that are irrational.
<lupine_85>
there is no space for supernatural explanations of life-activity
<David_Miller>
no serious philosopher is a dualist these days
<David_Miller>
well except for the religious ones
<lectrick>
lupine_85: When you hear a piece of music that makes you cry.
<lupine_85>
lectrick, entirely non-supernatural
<lectrick>
lupine_85: When you wake up to the most perfect morning ever, the beauty which shocks you.
chussenot has quit [Quit: chussenot]
bananagram has joined #ruby
<fowl>
haha lectrick that just means you're on your period
<lectrick>
lupine_85: Basically, all the unexplainable/irrational things in the world: There will never be a definition of what is beautiful. For that matter, we can't even agree on how to define pornography: http://en.wikipedia.org/wiki/I_know_it_when_I_see_it
Markvilla has quit [Quit: Computer has gone to sleep.]
Xeago has joined #ruby
<lectrick>
Yes, I am using pornography to argue for possible soul existence. Because that's how I roll.
<sam__>
what if the pornography i see
<sam__>
isn the pornography everyone else does
<lectrick>
sam__: You're still "seeing pornography" though.
<rking>
lectrick: I'm impressed that you hold this view.
<lectrick>
The differing of definitions does not invalidate the experience
<lectrick>
sam__: There is no way for me to prove that the "red" I see is the "red" you see. (That's the 'qualia' problem in a nutshell.) Wavelength measurement is not good enough. That doesn't explain why it "seems red" in your mind's eye
<fowl>
devnull_: yo, try putting a `puts curly` between your curly = ... and simian = .. line so you can see what output you're getting from curl (if any)
cuit has joined #ruby
<lectrick>
rking: thanks.
<devnull_>
fowl: yes I do get the full thing if I use puts curly what doesn't work is when I try to parse the title both with match or nokogiri
wuzzzzaah has quit [Ping timeout: 248 seconds]
<cuit>
hi im just teaching some ruby but i havent used 1.9.*, do default-installed libraries get required dynamically if the code contains a call to a function in those libraries that hasnt been defined in the code being executed?
<lectrick>
rking: i took two religious studies classes (albeit critical ones) and some philosophy in college. and I was a psych major. who now programs. Ben Franklin is my idol lol.
<sam__>
so when im "seeing pink" so to speak
<devnull_>
fowl: puts curly gives me the full page so that is fine
<sam__>
i might actually be seeing cyan
<sam__>
per the inverted color problem
tommyvyo has joined #ruby
<rking>
lectrick: Did you listen to that Voddie Baucham clip?
<fowl>
devnull_: oo i see there's another split on that line
insulator has quit [Ping timeout: 276 seconds]
<lectrick>
cuit: No. You still have to require it.
<fowl>
devnull_: until it works, i recommend splitting it up onto different lines
insulator has joined #ruby
bbttxu has joined #ruby
<lectrick>
cuit: Some are required by default, but not all of them, even the standard library ones.
<cuit>
fowl: this program is working without it
<cuit>
lectrick: ah so is date required by default in all ruby programs now?
<devnull_>
fowl: anything with split on it retuns undefined method `split' for nil:NilClass ..same with match
<lectrick>
sam__: exactly (re: inverted color problem)
<lectrick>
cuit: I'm not sure. I'd have to check in IRB.
<wedgeV>
lectrick: and how would it matter in any way?
<fowl>
devnull_: that means the object you're calling it is nil, so break it up and step through it and you 'll be able to see whats going wrong
<lectrick>
wedgeV: that there are things that only my mind's eye perceives that I cannot show to anyone no matter what? You don't think that's kind of deep?
wuzzzzaah has joined #ruby
<lectrick>
To my great disappointment, I cannot show my girlfriend why I find some techno beautiful and moving.
<lectrick>
I cannot show people outside this community why Ruby is fucking beautiful (well, sometimes haha)
<Hanmac>
cuit Date is part of the core, DateTime is in stdlib
<fowl>
devnull_: whats an example subdomain.me.com so i can try this in my terminal
CoverSlide has joined #ruby
<lectrick>
I cannot show people how amazing that one orgasm with that one crazy girl back in '93 was like. No matter what.
<wedgeV>
lectrick: yea sure… but those things are kinda obvious
* lectrick
considers replaying of neuronal signals via future technology but still thinks it would not capture the essence of the subjective experience
<fowl>
lectrick: you could mind-meld with them
adeponte has joined #ruby
<devnull_>
fowl: example would be odin.1.ai
<wedgeV>
lectrick: you are you, so you see things the way you do… and any other brain with inputs will perceive things differently
sdwrage has quit [Quit: geekli.st/programmer]
<devnull_>
fowl: thanks for your help ... the thing is that curly does return the full HTML just when I try match, split etc. it gives me now for match... undefined method `[]' for nil:NilClass
cj3kim has quit [Quit: This computer has gone to sleep]
<lectrick>
Oh, and another thing, and rking might wanna listen up to this. I think there's a purpose to all this. I think it's intangible, this purpose, but real. That is to say, if anything, I am anti-nihilist. And the accumulation of this purpose is sort of an education of what? My soul, I figure. And for it to not cease to exist, that purpose must continue in some form. :)
wuzzzzaah has quit [Ping timeout: 268 seconds]
GoGoGarrett has joined #ruby
<fowl>
devnull_: i just walked through the curly version in my terminal and it worked
<lectrick>
ok enough philosophy, i want to talk ruby, and how I want to backport Refinements into 1.9....
<devnull_>
fowl: yes it works fine outside markaby :)
Xeago has quit [Remote host closed the connection]
<devnull_>
fowl: I am jsut trying to find out what doesn't make it work inside the app..outside works fine
Xeago has joined #ruby
<fowl>
devnull_: how come you dont use the nokogiri method that you have above? it seems to work fine too
beneggett has quit [Quit: Computer has gone to sleep.]
sam__ has quit [Quit: Lost terminal]
clj_newb has quit [Ping timeout: 272 seconds]
wuzzzzaah has joined #ruby
<devnull_>
fowl: nokogiri method returns this error "undefined method `text' for nil:NilClass"
fermion has quit [Quit: P]
<devnull_>
fowl: the error comes from /markaby-0.7.2/lib/markaby/builder.rb: in instance_eval no idea how to bypass that :)
programR has joined #ruby
Smartracer has joined #ruby
<fowl>
devnull_: i'd call it a bug in markaby then
Smartracer has left #ruby [#ruby]
<devnull_>
fowl: I think so too..I will try to build a class outside it and see if it works :) thanks a lot for trying thou :D
<lectrick>
it's the same thing basically. mikedevita just be careful that you are not confusing symbol keys with string keys. They are NOT the same (unless you use a HashWithIndifferentAccess)
c0rn_ has joined #ruby
beneggett has joined #ruby
<lectrick>
mikedevita: for arrays it's array_variable[some_index_number]
<thamster>
hey all, soliciting suggestions for rapid front end developement. currently using haml and sass with grids, still taking an inordinate amount of time any simple quicker alternatives?
<mikedevita>
for instance counts = Hash.new; counts['Aug/12'] = 1; puts 'The total Count is: ' + counts[monthYear]; but i get an error
<mikedevita>
actually i dont get anything back at all
chimkan has quit [Quit: chimkan]
niklasb has quit [Ping timeout: 244 seconds]
beneggett has quit [Client Quit]
<lectrick>
mikedevita: what is monthYear in that case?
havenn has quit [Remote host closed the connection]
<lectrick>
spanner: most of the time it's the same. no leading 's' tho. $1 may have to be \1, I forget. Also you'll have to change that from sed syntax to a simple regex like string.gsub(/\D*(\d+)/, '$1') (not sure if the $1 is a \1, I constantly forget)
cakehero has quit [Quit: Computer has gone to sleep.]
<lectrick>
>> (counts = {})[month_year='Aug/12']=1; puts "The total count is: #{counts[monthYear]}"
<al2o3cr>
-e:1:in `eval': undefined local variable or method `monthYear' for main:Object (NameError), from -e:1:in `eval', from -e:1:in `<main>'
<lectrick>
crap lol
<lectrick>
(counts = {})[month_year='Aug/12']=1; puts "The total count is: #{counts[month_year]}"
<lectrick>
>>(counts = {})[month_year='Aug/12']=1; puts "The total count is: #{counts[month_year]}"
<al2o3cr>
(NilClass) nil, Console: The total count is: 1
<lectrick>
there we go
<mikedevita>
i just realized thats an irb
<mikedevita>
lol
<billiam>
I like the way hastebin generates urls.
<lectrick>
yes lol. someone hooked up a bot here to eval >> things
<lectrick>
mikedevita: in my version of that, i took advantage of the fact that an assignment statement returns the thing just assigned.
ericwood has quit [Ping timeout: 252 seconds]
<lectrick>
mikedevita: I'd also recommend, just stylistically, to name variables word_otherword instead of wordOtherWord. https://github.com/styleguide/ruby
tyfighter has quit [Quit: tyfighter]
stephenjudkins has joined #ruby
reset has joined #ruby
w400z has joined #ruby
<mikedevita>
okay
thamster has left #ruby [#ruby]
c0rn_ has joined #ruby
Xeago has quit [Ping timeout: 248 seconds]
kidoz has joined #ruby
adeponte has quit [Remote host closed the connection]
<joofsh>
Sorry for the noob question: if I have 2 version of the same gem installed, How can I enable the older version to be used by my ruby script?
rmcafee has joined #ruby
Rochefort has quit [Remote host closed the connection]
jgarvey has joined #ruby
mneorr has quit [Quit: Leaving.]
snuglepuss has joined #ruby
<shevy>
joofsh not sure there is a way. perhaps you can require a specific version... or you can uninstall the newer version :D
<joofsh>
shevy is there an easy way to uninstall the newer version? i don't mind reinstalling it later
Chryson has joined #ruby
<shevy>
not sure about conflicting gems
<shevy>
command is:
<shevy>
gem uninstall name
<shevy>
gem uninstall rails
<shevy>
:D
fmcgeough has quit [Quit: fmcgeough]
<shevy>
you can find a copy of all .gem files
<shevy>
in i.e. /usr/lib/ruby/gems/1.8/cache/
<shevy>
or
<shevy>
/usr/lib/ruby/gems/1.9.1/cache/
<shevy>
if on windows, /usr is wherever you installed windows into... usually c:\ruby*
<shevy>
or Ruby* something
<shevy>
I actually always use only one version
maletor has quit [Quit: Computer has gone to sleep.]
wuzzzzaah has quit [Ping timeout: 255 seconds]
sambio has quit [Ping timeout: 246 seconds]
wuzzzzaah has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
cj3kim has quit [Quit: This computer has gone to sleep]
rmcafee has quit [Quit: rmcafee]
rmcafee has joined #ruby
luxurymode has joined #ruby
wuzzzzaah has quit [Ping timeout: 240 seconds]
adamkittelson has quit [Remote host closed the connection]
replore_ has quit [Remote host closed the connection]
wuzzzzaah has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
EuroTrash has quit [Read error: Connection reset by peer]
stopbit has quit [Read error: Connection reset by peer]
awarner has quit [Remote host closed the connection]
adamkittelson has joined #ruby
Virunga is now known as Peto
QKO_ has joined #ruby
CoverSlide has quit [Ping timeout: 264 seconds]
Peto is now known as SberleGratis
stopbit has joined #ruby
seanyo_ has joined #ruby
QKO has quit [Ping timeout: 276 seconds]
thedarkone_ has left #ruby [#ruby]
JeanMertz has joined #ruby
Axsuul has joined #ruby
manizzle has joined #ruby
seanyo has quit [Ping timeout: 246 seconds]
pu22l3r has joined #ruby
Tref has joined #ruby
pu22l3r_ has quit [Read error: Connection reset by peer]
geekbri has quit [Remote host closed the connection]
joelsotherbeard has quit [Ping timeout: 246 seconds]
pricees has quit [Ping timeout: 244 seconds]
fyolnish_ has quit [Ping timeout: 240 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
dpk has joined #ruby
stephenjudkins has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
luxurymode has quit [Quit: Computer has gone to sleep.]
<trooney>
Anyone know how I can get access to the JSON Payload in Sinatra? I'm look in request.body, request.post... i can only find it with request.env['rack.input'].read
workmad3 has joined #ruby
rmcafee has quit [Quit: rmcafee]
Nisstyre-laptop has joined #ruby
Coolhand has quit [Remote host closed the connection]
manizzle has quit [Read error: Connection reset by peer]
manizzle has joined #ruby
manizzle has quit [Read error: Connection reset by peer]
wuzzzzaah has joined #ruby
manizzle has joined #ruby
datsik33 has quit [Ping timeout: 260 seconds]
datsik33 has joined #ruby
shinobi_one has quit [Quit: Leaving.]
datsik33 has quit [Client Quit]
rippa has quit [Ping timeout: 244 seconds]
joelsotherbeard has joined #ruby
doomMonkey has joined #ruby
xorgnak has quit [Remote host closed the connection]
tommyvyo has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
rogeruiz has quit [Remote host closed the connection]
moted has quit [Remote host closed the connection]
moted has joined #ruby
allsystemsarego has quit [Quit: Leaving]
withnale has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
sdwrage has quit [Quit: geekli.st/programmer]
Xeago has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
sdwrage has joined #ruby
justinmcp has joined #ruby
kvirani has joined #ruby
BSaboia has joined #ruby
hoelzro|away is now known as hoelzro
metrix has quit [Quit: ChatZilla 0.9.88.2 [Firefox 15.0/20120824154833]]
TheShadowFog has quit [Remote host closed the connection]
<zburt>
Is it possible to put a button inside a link_to ?
imami|afk is now known as banseljaj
jlogsdon has joined #ruby
<Hanmac>
zburt: i think you want to ask there #rubyonrails
eignerchris has joined #ruby
zburt is now known as zackattack
<mib_mib>
hi guys, i installed rvm on one users account in ubuntu, but it isn't in the path for the other users account, how do i make it so both users can use rvm? do i need to duplicate the .rvm folder?
<ryanf>
if you install it into $HOME/.rvm, different users are completely independent of each other
<ryanf>
so you'd just install it again for that user
<Jonah11_>
rubymine is giving me an unreachable code warning on line 13 -- i can't tell why: http://pastie.org/4682292
jlogsdon has quit [Remote host closed the connection]
Danielpk_ has joined #ruby
Danielpk has quit [Ping timeout: 246 seconds]
Danielpk_ is now known as Danielpk
<windowns>
anyone here know how to get gem install oniguruma --platform=mswin32 to work in a gemfile?
<windowns>
it keeps wanting to install the non windows version
s0ber has quit [Read error: Connection reset by peer]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<mib_mib>
havenn: i installed rvm using sudo for the multi-user install, but now i want to install ruby 1.9.3, and doing rvm install 1.9.3 just says a lot of permissions denied, do i need to run it with sudo? I thought thats what you're not supposed to do
answer_42 has quit [Quit: WeeChat 0.3.8]
<Hanmac>
yeah
s0ber has joined #ruby
<havenn>
mib_mib: rvmsudo
<Hanmac>
when you installed rvm with sudo, you need to install it with sudo (or rvmsudo)
ip` has joined #ruby
devnull_ has joined #ruby
ip` has left #ruby [#ruby]
banisterfiend has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
<devnull_>
hello :D close to solve an issue your help is *much* appreciated http://pastebin.com/XbdyD8v7 thanks in advance
pricees has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
davidcelis has quit [Quit: K-Lined.]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
reset_ has joined #ruby
reset has quit [Ping timeout: 260 seconds]
fyolnish_ has joined #ruby
ken_barber has joined #ruby
love_color_text has quit [Remote host closed the connection]
machty_ has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
bbttxu has quit [Quit: bbttxu]
dpk has quit [Ping timeout: 244 seconds]
banisterfiend has quit [Remote host closed the connection]
GoGoGarrett has quit [Remote host closed the connection]
CarlB_the_great has quit [Remote host closed the connection]
LouisGB has quit [Ping timeout: 244 seconds]
<havenn>
devnull_: to install nokogiri gem: gem install nokogiri
BigFatFatty has joined #ruby
mwilson` has quit [Excess Flood]
wuzzzzaah has joined #ruby
mwilson` has joined #ruby
Nisstyre-laptop has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
philcrissman has quit [Ping timeout: 240 seconds]
pricees has quit [Quit: leaving]
lushious has joined #ruby
wuzzzzaah has quit [Ping timeout: 260 seconds]
<mib_mib>
havenn: so i installed it, and i created a group called rvm, and i added both users to the group - it works fine for one user, but it only works for the other user if i type 'source /etc/profile' - what do i do here?
<devnull_>
havenn: thanks but Nokogiri::HTML(open url) doesn't work either with domains with underscore in subdomain e.g. me_me.1.ai because of uri
<windowns>
i have a gem that requires the following parameter when i install it "--platform=mswin32"
joofsh has quit [Ping timeout: 245 seconds]
<windowns>
i read about how you can setup the bundle config for build parameters, but it's not taking. it still tries to install the gem without the parameter
<windowns>
any ideas?
alanp has quit [Read error: Connection reset by peer]
<havenn>
devnull_: If that is what you're wanting to do. >.>
Morkel has quit [Quit: Morkel]
budha has joined #ruby
<havenn>
mib_mib: Prolly need to add the RVM sourcing file in your other users' .bash_profile (or whatever). Guys in #rvm would known right away.
infinitiguy has quit [Quit: Leaving.]
budha has left #ruby [#ruby]
ph^ has quit [Ping timeout: 260 seconds]
stephenjudkins has joined #ruby
uris has quit [Quit: leaving]
aaroncm has quit [Quit: Computer has gone to sleep.]
jgarvey has quit [Quit: Leaving]
<havenn>
windowns: Did you put --platform=mswin32 in your .gemrc file?
<windowns>
nope, where would that be? :)
<havenn>
windowns: in your home folder, it is hidden since it is a 'dot-file'
cj3kim has quit [Quit: This computer has gone to sleep]
<windowns>
hmm it's not there, i have a .gem folder
ezra has quit [Ping timeout: 276 seconds]
qwerxy has quit [Quit: offski]
<havenn>
windowns: create a .gemrc file that just has this in it: gem: --no-ri --no-rdoc --platform=mswin32
bwlang has left #ruby [#ruby]
rmcafee has joined #ruby
<havenn>
windowns: the --no-ri and --no-rdoc make gem installs a great bit faster, if you don't actually use them
<windowns>
what does --no-ri and --no-rdoc do?
<windowns>
ahh
<windowns>
got ya
<havenn>
windowns: If you use ri, then just: gem: --platform=mswin32
<windowns>
bundle is still doing the same thing
DrShoggoth has quit [Quit: Leaving]
<windowns>
still trying to install without the --platform=mswin32
joelsotherbeard has quit [Ping timeout: 268 seconds]
stkowski has quit [Quit: stkowski]
etehtsea has quit [Quit: Computer has gone to sleep.]
<windowns>
BUT running gem install oniguruma will install with the appropriate --platform=mswin32 flag
<windowns>
so know i don't have to always add that for certain ones
<windowns>
it's just this whole bundle thing is messing with me
khakimov has joined #ruby
stim371 has joined #ruby
<devnull_>
havenn: thanks testing now :D
chrishunt has quit [Quit: WeeChat 0.3.8]
chrishunt has joined #ruby
ken_barber has quit [Remote host closed the connection]
<Hanmac>
windowns you could try to anoy the users on #bundler
diegok has joined #ruby
LouisGB has joined #ruby
justinmcp has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
LouisGB has quit [Client Quit]
johnlcox has quit [Ping timeout: 260 seconds]
Tomasso has joined #ruby
Banistergalaxy has joined #ruby
mascool has joined #ruby
hoelzro is now known as hoelzro|away
wpaulson has joined #ruby
wpaulson has quit [Client Quit]
<devnull_>
havenn: wooo that worked :) now I have another rebus on the same thing.. what to do for the error "invalid byte sequence in UTF-8" which seems to happen for a page with a design like this one http://voldemortas.1.ai
joelsotherbeard has joined #ruby
joshman_ has quit [Ping timeout: 245 seconds]
specialGuest has quit [Quit: WeeChat 0.3.8]
recycle has joined #ruby
<windowns>
hehe, i just might
LouisGB has joined #ruby
emmanuelux has joined #ruby
<havenn>
devnull_: What do you want to have happen when the page isn't html, has no title?
<havenn>
devnull_: simian = "" ?
<devnull_>
havenn: to continue parsing the next one ?
<devnull_>
havenn: yes :)
c0rn_ has quit [Quit: Computer has gone to sleep.]
<devnull_>
havenn: or to write no html
emmanuelux has quit [Remote host closed the connection]
<devnull_>
Hanmac: can't be it works for me ? both ping both curl and normal browser ??
mengu has joined #ruby
<blazes816>
works for me too
<Hanmac>
hm it works for browser but not for ping :P
<havenn>
The url works for me, but open-uri chokes.
<devnull_>
Hanmac: it does even with curl I think sub domains can certainly have _ no ?
qwerxy has joined #ruby
<Hanmac>
dump i ... i need to remove the http:// when i use ping ...
fyolnish_ has joined #ruby
<Hanmac>
i can ping, but i cant use uri
<devnull_>
havenn: yeah this is why I wasted a lot of time on it tried also haprikot etc then I decided to go the curl way so at least I know what i get :P but didn't know how to remove the ruby things and you helped a lot
beneggett has joined #ruby
sdwrage has joined #ruby
deryl has joined #ruby
c0rn_ has joined #ruby
yasushi has quit [Ping timeout: 268 seconds]
Progster has quit [Ping timeout: 245 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
wuzzzzaah has quit [Ping timeout: 260 seconds]
qwerxy has quit [Quit: offski]
fyolnish_ has quit [Ping timeout: 264 seconds]
deryl has quit [Client Quit]
Russell^^ has quit [Quit: Russell^^]
wuzzzzaah has joined #ruby
iamlacroix has joined #ruby
deryl has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
deryl has quit [Client Quit]
bier has joined #ruby
machty has quit [Quit: machty]
deryl has joined #ruby
deryl is now known as Guest39894
Guest39894 has quit [Client Quit]
erichmenge has joined #ruby
havenn has quit [Remote host closed the connection]
erichmenge has quit [Client Quit]
pricees has joined #ruby
iamlacroix has quit [Remote host closed the connection]
cakehero has joined #ruby
snorkdude has joined #ruby
ph^ has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
insulator has quit [Ping timeout: 276 seconds]
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
SCommette has quit [Quit: SCommette]
gverri has quit [Quit: gverri]
recycle has joined #ruby
snorkdude has quit [Remote host closed the connection]
ph^ has quit [Ping timeout: 246 seconds]
CannedCorn has joined #ruby
recycle has quit [Remote host closed the connection]
workmad3 has joined #ruby
CannedCorn has quit [Client Quit]
luckyruby has quit [Remote host closed the connection]
mneorr has joined #ruby
banseljaj is now known as imami|afk
h4mz1d has quit [Ping timeout: 244 seconds]
fully_human has joined #ruby
seanstickle has joined #ruby
<fully_human>
Is it just me or is the rubyforge site having trouble?
<havenn>
devnull_: Nokogiri parses the html after curl fetches it.
<havenn>
devnull_: Nokogiri is good at finding the <title> tag efficiently and without breaking stuff.
<devnull_>
havenn: thanks a lot :) is this more advisable then just checking the title on curl ?
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
<havenn>
devnull_: Yes.
emmanuelux has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
cj3kim has quit [Client Quit]
<devnull_>
havenn: thanks lot :) will try to change the other one with this althou I am not super enthusiast about too many gem dependencies since the old method..thanks to your magic..works :P
jarred has joined #ruby
justsee has quit [Quit: Leaving...]
ezra has quit [Ping timeout: 276 seconds]
mascool has quit [Quit: leaving]
<jarred>
For an app I'm making, I need to create a forward proxy (sorta like hidemyass.com). How do I do that, while sending things like HTTP headers and cookies? Right now, I have it just do a Net::HTTP.get to the URL the user specified. But, that won't send headers or cookies, and it needs to do that
krnlsndrs has joined #ruby
locriani has quit [Remote host closed the connection]
<jarred>
wait
recycle has joined #ruby
<jarred>
I think I'm over thinking it. Is there anything more to it than send HTTP headers and send over the page?
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
locriani_ has joined #ruby
billyoc has joined #ruby
artOfWar has joined #ruby
wuzzzzaah has quit [Ping timeout: 240 seconds]
artOfWar has quit [Remote host closed the connection]
shinobi_one has joined #ruby
artOfWar has joined #ruby
<shinobi_one>
is it better to use STDIN.gets.chomp! or STDIN.gets.strip! ?
bluOxigen has joined #ruby
locriani has quit [Ping timeout: 248 seconds]
<shinobi_one>
i'm leaning towards strip
ephemerian has quit [Quit: Leaving.]
recycle has quit [Remote host closed the connection]
jonathanwallace has quit [Remote host closed the connection]
blob has left #ruby [#ruby]
<canton7>
depends whether you want to strip the newline or all whitespce
<devnull_>
just in general is anyone here doing freelance work....for something which takes a bit of time to fix (a gem) that doesn't work in certain cases ...again just asking if is anyone into this
<canton7>
also, the bang methods aren't what you should be using here
bluOxigen has quit [Ping timeout: 252 seconds]
fyolnish has joined #ruby
jonathanwallace has joined #ruby
<havenn>
devnull_: I'm doing freelance work (shannonskipper@gmail.com).
wuzzzzaah has joined #ruby
artOfWar_ has joined #ruby
<havenn>
shinobi_one: Or #squish: require 'active_support/core_ext'; ' dfsa sf dfs fdsfds '.squish
artOfWar has quit [Ping timeout: 240 seconds]
artOfWar_ has quit [Remote host closed the connection]
eignerchris has quit [Remote host closed the connection]
artOfWar has joined #ruby
khakimov has joined #ruby
<havenn>
shinobi_one: The #squish! in ActiveSupport is implemented like: def squish!; strip!; gsub /\s+/, '; self; end