vvgomes has quit [Read error: Connection reset by peer]
vvgomes has joined #ruby
th3g33k has joined #ruby
tommyvyo has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
iamjarvo has quit [Read error: Connection reset by peer]
vvgomes has quit [Read error: Operation timed out]
<ryanf>
lkahtz: you could use flat_map
johnjohnson has joined #ruby
linoj has joined #ruby
dibgreg has joined #ruby
<lkahtz>
Thanks~ That's something I didn't realize before
<dibgreg>
join #rails
<lkahtz>
ryanf: Thanks~ That's something I didn't realize before
axl_ has joined #ruby
r1chelt has joined #ruby
dibgreg has quit [Client Quit]
r1chelt has quit [Quit: r1chelt]
fflush has joined #ruby
r1chelt has joined #ruby
<Spooner>
lkahtz : the answer you already have does a good job.
<lkahtz>
Spooner: Thanks, it takes a couple of hours of meditation :)
<Spooner>
For your code, you would be better with: str.each_char.with_index.map do |s,i|
<lkahtz>
right~ Spooner. That's cleaner
<lkahtz>
:-)
<Spooner>
Well, not really important, but avoids creating an array of chars, but rather iterates them directly. I love pointless optimisations like that :)
Gab0 has quit [Remote host closed the connection]
<Spooner>
lkahtz: I'm not sure why you want to re-write permutation though. Maybe look at the C code if you are keen?
<lkahtz>
Haven't check the code of each_char_with_index, but it removes the temp chars created indeed :)
<lkahtz>
Just want to hone my ruby-fu... nothin' much~
<Spooner>
each_char.with_index (except for each_with_index, you have to use #with_index)
<lkahtz>
maybe I should read C code since it is more earth grounded
<lkahtz>
cool
fridim_ has quit [Ping timeout: 246 seconds]
Synthead has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<Spooner>
lkahtz : You know how to get the C from pry?
<lkahtz>
dunno man...
<lkahtz>
but that sounds very cool
<Spooner>
gem install pry pry-doc
<lkahtz>
will check out :)
baroquebobcat has joined #ruby
<Spooner>
open a pry session with "pry" then "show-source Array#permutation"
<lkahtz>
Awesome~~~ Let me do this :-)
<banisterfiend>
Spooner: did u know that we share the same girlfriend
<Spooner>
What, you don't have a girlfriend either? :P
<Spooner>
Oh nil, how could you two-time me?
<banisterfiend>
Yeah
<lkahtz>
hahaha :-D
Stalkr_ has quit [Quit: Leaving...]
deryl has quit [Quit: deryl]
deryl has joined #ruby
<Spooner>
Oh, while I'm here, C question. I'm using float x = NUM2DBL(value) on Float::INFINITY and it is ending up NaN. What am I missing?
<banisterfiend>
Spooner: double x
<banisterfiend>
hmm
tompsony has quit [Quit: CyberScript - if you don't try it, you can't tell me it sucks. (www.cyberscript.org)]
<Spooner>
Surely floats have infinity too?
<banisterfiend>
naw it'll downgrade it anyway
<banisterfiend>
Yeah
<Spooner>
Actually, I should try it and see if it is a double issue. One minute.
moshee has quit [Ping timeout: 272 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<GeekOnCoffee>
Spooner: how can it be more than issue at once? :P
<Spooner>
What?
<Spooner>
Oh dear.
r1chelt_ has joined #ruby
alphabitcity has joined #ruby
<alphabitcity>
What's the best way to write tests for a gem that wraps an authenticated API? I was thinking of using fixtures, but the tests become useless if the api changes
<GeekOnCoffee>
alphabitcity: I think the idea is you should be testing your interaction, not their API
chimkan has quit [Quit: chimkan]
williamherry has joined #ruby
<alphabitcity>
GeekOnCoffee: can you please clarify what you mean by interaction?
ryanf has quit [Quit: leaving]
r1chelt_ has quit [Quit: r1chelt_]
jonathanwallace has quit [Remote host closed the connection]
<GeekOnCoffee>
you want to test your wrapper code quickly, you almost have to assume that the API won't change
<alphabitcity>
ok, so fixtures are the best bet here?
bluenemo has quit [Remote host closed the connection]
ryanf has joined #ruby
<banisterfiend>
ryanf: wb
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
th3g33k has quit [Quit: Leaving.]
justsee is now known as justsee|away
ZachBeta has quit [Read error: Connection reset by peer]
ZachBeta has joined #ruby
khakimov has joined #ruby
justsee|away is now known as justsee
<Spooner>
banisterfiend : Oops, I was breaking infinity myself! How careless :D
jhunter has quit [Ping timeout: 246 seconds]
<banisterfiend>
Spooner: how
<Spooner>
It was based on how I set values in particles. Usually I do stuff to pick a value between min and max when creating a new particle, but if both were INFINITY, it broke my naive code.
<Spooner>
banisterfiend So it appeared to be creating NaN from infinity, but I was thinking it was happening earlier than it was.
<banisterfiend>
oh ok
<Spooner>
Coder error all the way :D
johnjohnson has quit []
lkahtz has quit [Remote host closed the connection]
jarred has joined #ruby
<Spooner>
banisterfiend: And yay for printf from C. Debuggers are for the weak :D
axl_ has quit [Quit: axl_]
cantonic has quit [Read error: Connection reset by peer]
rizzy has quit [Ping timeout: 255 seconds]
ringotwo has joined #ruby
cantonic has joined #ruby
axl_ has joined #ruby
<GeekOnCoffee>
alphabitcity: I'd say in general, fixtures will be your best bet
<deryl>
i'm such a puts lover for debugging :) Along with well placed Binding.pry lines :)
<Spooner>
deryl : p [x, y, z] for debugging, surely :D
<deryl>
p puts and Binding.pry better? ;)
<alphabitcity>
GeekOnCoffee: ok, thanks for the help
iori has joined #ruby
zodiak has quit [Remote host closed the connection]
luckyruby has joined #ruby
linoj has quit [Quit: linoj]
ianbrandt has quit [Quit: ianbrandt]
iori has quit [Remote host closed the connection]
vvgomes has joined #ruby
phinfonet has quit [Quit: phinfonet]
paradoja has quit [Remote host closed the connection]
Tulak has quit [Quit: Leaving.]
jsnwtsn has joined #ruby
preller has quit [Read error: Operation timed out]
fflush has quit [Ping timeout: 244 seconds]
preller has joined #ruby
liluo has joined #ruby
jonathanwallace has joined #ruby
jdiez has joined #ruby
<jdiez>
hello, I come from a python background and I want to learn ruby, what are some good tutorials?
niklasb has quit [Ping timeout: 264 seconds]
techsurvivor has left #ruby ["WeeChat 0.3.8"]
<banisterfiend>
jdiez: why do you want to learn ruby if you already know python?
baroquebobcat has quit [Quit: baroquebobcat]
jonnn has joined #ruby
<jdiez>
why not?
<jdiez>
I enjoy learning new languages
<banisterfiend>
jdiez: i'm just curious
<jdiez>
oh
<jdiez>
I'm curious too :P
<jdiez>
I don't know, some of the ruby stuff intrigues me
<banisterfiend>
jdiez: cool, which ruby stuff?
<jdiez>
like the method? and method!
<banisterfiend>
hehe
<jdiez>
I have no idea what that does
<banisterfiend>
:P
<banisterfiend>
jdiez: method? is just for predicates, so say i have an array
<banisterfiend>
jdiez: to find out if the array is empty i go: array.empty?
<banisterfiend>
and it returns true or false
<jdiez>
so how is it different from saying "if array.empty()" ?
<banisterfiend>
jdiez: it's not, it's just potentially more readable as it's clear the method returns a boolean value
<fowl>
empty is a verb, so it should be clearing the array
<banisterfiend>
that it's a method strictly for querying an object
<banisterfiend>
exactly
<jdiez>
okay, I get it, fair point
<jdiez>
and the method! stuff?
<ryanf>
in a language without ? you'd probably say like is_empty
Abbas| has quit [Quit: BadingaDongDongDong-TwitchVeryStrongStrongStrong]
<ryanf>
because otherwise empty() could mean "empty this array"
<jdiez>
also, I have seen some function calls without () around the arguments
<ryanf>
so it's just a nicer way of doing the same thing
<banisterfiend>
jdiez: yeah, we dont need () in ruby ;)
<jdiez>
hmm
<jdiez>
interdasting
<heftig>
jdiez: "dangerous" variants, mostly because they modify the receiver instead of returning a copy
vvgomes has quit [Ping timeout: 272 seconds]
<heftig>
e.g. Array#shuffle and Array#shuffle!
<jdiez>
also, doing "def method?" is equal to doing "def method", right?
<heftig>
jdiez: no, it's not
<heftig>
the former creates the method named "method?", the latter the method named "method"
<banisterfiend>
jdiez: just that ? and ! are valid characters to be used in a method name (if they're the last character)
<jdiez>
hmm
<jdiez>
okay
<jdiez>
so ? and ! are just conventions?
<banisterfiend>
Yeah
<heftig>
yes. language-wise they have no special function
<jdiez>
hmm
<jdiez>
interesting
<jdiez>
okay
<jdiez>
also, what is an attr_reader and why do I need those?
<banisterfiend>
jdiez: but really, those things are the least interesting aprt of ruby, 'blocks' are the coolest part, also executable class bodies
<heftig>
attr_reader :foo, :bar is a quick way of doing def foo; @foo; end; def bar; @bar; end
<jdiez>
yeah, those were the things that intrigued me the most :P what are blocks?
<banisterfiend>
jdiez: a full explanation of what attr_reader is, and how it works will probably impress u
<banisterfiend>
hopefully heftig will explain, i have 1 min of battery left :)
<jdiez>
haha
<jdiez>
I'm all ears
<jdiez>
and I'm also intrigued about blocks
<heftig>
blocks are closures attached to a method call
<heftig>
if that means anything to you
<jdiez>
hmm
<jdiez>
do a local function
<jdiez>
?
<jdiez>
so*
<fowl>
blocks are the building experience of Happy Ruby ^^;
<banisterfiend>
heftig: ';' doesnt do what u think it does, the stupid processor breaks up expressions by ; and processes them separately in different ruby instances
<banisterfiend>
i think
<heftig>
>> foo = 3; foo
<al2o3cr>
heftig: (Fixnum) 3
AwayLex is now known as Quadlex
<banisterfiend>
hmm
<heftig>
>> foo = 3; foo + 1
<al2o3cr>
heftig: (Fixnum) 4
<heftig>
nope
<banisterfiend>
maybe not anymore then
<banisterfiend>
it used to be the cas
<banisterfiend>
>> "hello; baby"
<al2o3cr>
banisterfiend: (String) "SyntaxError: sandrbox:1: unterminated string meets end of file"
<banisterfiend>
>> "hello baby"
<al2o3cr>
banisterfiend: (String) "hello baby"
<banisterfiend>
heftig: ^
<heftig>
hm
<heftig>
>> class Fixnum \n alias_method :oldp, :+ \n def +(other) oldp(other).oldp(1) \n end \n end \n 3 + 4
<al2o3cr>
heftig: The Ruby interpreter exited with nonzero status. Hanmac is probably to blame.
<heftig>
wow
<heftig>
that seriously broke things
<heftig>
>> 2
<al2o3cr>
heftig: (Fixnum) 2
<heftig>
banisterfiend: try running my line there
<banisterfiend>
>> class Fixnum \n alias_method :oldp, :+ \n def +(other) oldp(other).oldp(1) \n end \n end \n 3 + 4
<al2o3cr>
banisterfiend: The Ruby interpreter exited with nonzero status. Hanmac is probably to blame.
w0lverine has quit [Quit: w0lverine]
otters has quit [Quit: WeeChat 0.3.8]
seanstickle has quit [Quit: seanstickle]
vvgomes has quit [Ping timeout: 272 seconds]
otters has joined #ruby
bothra has quit [Ping timeout: 245 seconds]
rizzy has quit [Quit: Leaving]
Asphyxiated|Dk has quit [Ping timeout: 246 seconds]
jrajav has quit [Quit: The best darkness is strange and surprising]
jhunter has quit [Read error: Connection reset by peer]
v0n has joined #ruby
jhunter has joined #ruby
chimkan_ has joined #ruby
w400z has joined #ruby
dhaivatpandya has joined #ruby
TorpedoSkyline has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
cakehero has joined #ruby
syamajala has joined #ruby
iori has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
Asphyxiated|Dk has joined #ruby
alindeman has quit [Read error: Connection reset by peer]
vertroa has quit [Ping timeout: 246 seconds]
dhaivatpandya has quit [Quit: dhaivatpandya]
alindeman has joined #ruby
savage- has quit [Remote host closed the connection]
tjbarber09 has joined #ruby
iamjarvo has joined #ruby
bradhe has quit [Remote host closed the connection]
ngoldman has joined #ruby
vvgomes has joined #ruby
jhunter has quit [Read error: Connection reset by peer]
jsnwtsn has quit [Quit: Leaving]
jhunter has joined #ruby
chimkan_ has quit [Quit: chimkan_]
savage- has joined #ruby
dhruvasagar has joined #ruby
Asphyxiated|Dk has quit [Ping timeout: 244 seconds]
stopbit has quit [Quit: Leaving]
jhunter has quit [Read error: Connection reset by peer]
centipedefarmer has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
mockra has joined #ruby
zeromodulus has joined #ruby
jxf has quit [Ping timeout: 264 seconds]
ryanf has joined #ruby
banisterfiend has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 264 seconds]
hemanth has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
adeponte has joined #ruby
sevvie has quit [Quit: sevvie]
jhunter has quit [Ping timeout: 246 seconds]
jhunter has joined #ruby
nateberkopec has quit [Quit: Leaving...]
mark06 has joined #ruby
mac_br has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
rburton- has quit [Ping timeout: 244 seconds]
savage- has quit [Remote host closed the connection]
vvgomes has quit [Remote host closed the connection]
w0lverine has joined #ruby
yoklov has quit [Quit: computer sleeping]
mockra has joined #ruby
ringotwo has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
axl_ has quit [Quit: axl_]
mark06 has left #ruby [#ruby]
dpk has quit [Quit: Asleep at the keyboard.]
vvgomes has joined #ruby
rodj has quit [Quit: rodj]
dpk has joined #ruby
dpk has quit [Client Quit]
ringotwo has joined #ruby
dpk has joined #ruby
dpk has quit [Client Quit]
ngoldman has quit [Remote host closed the connection]
minzy1407 has joined #ruby
<minzy1407>
hi
<minzy1407>
i got a question
<minzy1407>
Can I convert a string into an object?
burgestrand has joined #ruby
otters has quit [Ping timeout: 246 seconds]
<minzy1407>
is anyone here?
mac_br has left #ruby [#ruby]
<heftig>
a string is an object
nari has quit [Ping timeout: 248 seconds]
w0lverine has quit [Quit: w0lverine]
* burgestrand
moos
ananthakumaran has joined #ruby
syamajala has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
dhruvasagar has quit [Quit: leaving]
dhruvasagar has joined #ruby
otters has joined #ruby
<minzy1407>
but something like this
<minzy1407>
if a got a variable with the name of a class can I call the class from that name on the string?
hemanth has joined #ruby
<fowl>
calling a class?
<minzy1407>
yes
<minzy1407>
like (name).new
vvgomes has quit [Ping timeout: 244 seconds]
<burgestrand>
minzy1407: yes, but you need to find the class from that name first
Guest89851 has joined #ruby
<burgestrand>
minzy1407: you could do eval(name).new, or Object.const_get(name).new
<minzy1407>
how would u do that
vvgomes has joined #ruby
<minzy1407>
which way is better?
skryking has joined #ruby
defendguin has joined #ruby
<burgestrand>
For the general case const_get, since it’s less dangerous.
Abbas| has quit [Read error: Connection reset by peer]
<burgestrand>
However, const_get approach requries some modification to work fully with namespaces in the names, e.g. MyModue::MyClass
<minzy1407>
I'm gonna take a look at it
<felipecvo>
what can I do with fibers?
bradhe has joined #ruby
<minzy1407>
thanks a lot
<minzy1407>
bye bye
minzy1407 has quit [Quit: Page closed]
<burgestrand>
felipecvo: pretty much all use cases for fibers are clever things, and they often involve some kind of concurrency
deryldoucette has joined #ruby
<burgestrand>
felipecvo: em-synchrony uses fibers to make evented code look like synchronous code, more or less wrapping the entire event loop in a fiber
luckyrub_ has joined #ruby
<burgestrand>
felipecvo: celluloid uses fibers to allow pausing and resuming tasks in actors
w0lverine has joined #ruby
<burgestrand>
felipecvo: you could use fibers to implement enumerators as well
subbyyy1 has joined #ruby
kpshek has joined #ruby
<burgestrand>
most people don’t need to get familiar with fibers, however
subbyyy has quit [Ping timeout: 250 seconds]
r0bby has joined #ruby
luckyruby has quit [Ping timeout: 250 seconds]
deryl has quit [Ping timeout: 244 seconds]
deryldoucette is now known as deryl
robbyoconnor has quit [Ping timeout: 244 seconds]
luckyrub_ is now known as luckyruby
alphabitcity has quit [Quit: Leaving.]
hadees has quit [Ping timeout: 244 seconds]
yasushi has joined #ruby
vitor-br has quit [Ping timeout: 246 seconds]
yasushi has quit [Read error: Connection reset by peer]
yasushi_ has joined #ruby
kpshek has quit [Ping timeout: 264 seconds]
mfcabrera has joined #ruby
reuf has joined #ruby
ringotwo has joined #ruby
w400z has quit []
Dreamer3 has quit [Quit: Leaving...]
Dreamer3 has joined #ruby
defendguin has quit [Quit: Leaving.]
burgestrand has quit [Quit: Leaving.]
PapaSierra has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
savage- has joined #ruby
eph3meral has quit [Quit: Leaving]
v0n has quit [Ping timeout: 240 seconds]
sebastorama has joined #ruby
nari has joined #ruby
daniel_hinojosa has quit [Ping timeout: 246 seconds]
vitor-br has joined #ruby
vvgomes has quit [Ping timeout: 240 seconds]
yxhuvud has joined #ruby
deryl has quit [Quit: deryl]
wargasm has quit [Read error: Connection reset by peer]
wargasm has joined #ruby
ringotwo has quit [Remote host closed the connection]
havenn has joined #ruby
bradhe has quit [Remote host closed the connection]
uris has quit [Quit: leaving]
gokul has joined #ruby
gokul has quit [Client Quit]
gokul has joined #ruby
Guest89851 has quit [Quit: Guest89851]
PapaSierra has joined #ruby
banisterfiend has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Leaving...]
banisterfiend has joined #ruby
td123 has joined #ruby
yasushi_ has quit [Remote host closed the connection]
yasushi has joined #ruby
vitor-br has quit [Quit: Saindo]
yasushi has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
yasushi has quit [Remote host closed the connection]
jameshyde has joined #ruby
reuf has quit [Quit: Leaving]
yasushi has joined #ruby
mockra has quit [Remote host closed the connection]
burgestrand has joined #ruby
wallerdev has quit [Quit: wallerdev]
yasushi has quit [Ping timeout: 240 seconds]
kpshek has joined #ruby
mascool has joined #ruby
kpshek has quit [Read error: Operation timed out]
a_a_g has joined #ruby
brg has joined #ruby
s1n4 has joined #ruby
a_a_g has quit [Client Quit]
a_a_g has joined #ruby
Chryson has quit [Quit: Leaving]
libryder has joined #ruby
jorge has quit [Remote host closed the connection]
<libryder>
ok, just saw that… i'm going to continue it here if that's ok
ananthakumaran has quit [Quit: Leaving.]
<libryder>
samuelkadolph said: Because those are all instance methods. And by including the module into Object, it becomes available as a class method to all classes/modules
<samuelkadolph>
There's nothing to continue. Those are instance methods you cannot call them as class methods
sailias has joined #ruby
kpshek has joined #ruby
tonini has joined #ruby
sdwrage has joined #ruby
sailias has quit [Client Quit]
<banisterfiend>
libryder: what dont you understand
<banisterfiend>
libryder: you only included MyShinyModule into Object, so it's method will be invoked. The 'nested' modules were not included so their methods cannot be invoked
<libryder>
MyShinyModule::FirstModule.my_method worked, but it called the method from its parent class
<banisterfiend>
its*
mohits has joined #ruby
<banisterfiend>
libryder: yes, because FirstModule#my_method is an instance method, it can't be invoked on FirstModule
<libryder>
if i do include FirstModule, then FirstModule.my_method, it works as expected
<samuelkadolph>
libryder: You included MyShinyModule
<samuelkadolph>
Not MyShinyModule::FirstModule
<banisterfiend>
libryder: you need to read about difference between instance methods and class methods
Godslastering has quit [Read error: Connection reset by peer]
<libryder>
banisterfiend: i understand that
<banisterfiend>
in order to invoked FirstModule#my_module on FirstModule you have to (in this case) include FirstModule into Object, which you didnt do
<banisterfiend>
my_method
mascool has quit [Ping timeout: 240 seconds]
<samuelkadolph>
libryder: You included the module that returns "the parent method", what don't you understand?
<libryder>
samuelkadolph: by that logic, could i do MyShinyModlue::DoesNotExist.my_method and expect it to work?
<samuelkadolph>
If DoesNotExist was a class or module, yes
<libryder>
but before including it, it would call its parent method?
<samuelkadolph>
You've included a module into Object, it will be available to any class/module as class methods
<banisterfiend>
libryder: it has nothing to do with 'parent'
justsee has quit [Ping timeout: 246 seconds]
dhaivatpandya has joined #ruby
<samuelkadolph>
Just forget about your silly FirstModule SecondModule example
<samuelkadolph>
module M; def abc; "abc"; end; end; include M; Fixnum.abc
<samuelkadolph>
There
r1chelt has joined #ruby
savage- has quit [Remote host closed the connection]
<libryder>
light bulb
<samuelkadolph>
There ya go
dhaivatpandya has quit [Client Quit]
hadees has joined #ruby
vectorshelve has joined #ruby
dhruvasagar has quit [Ping timeout: 272 seconds]
<libryder>
samuelkadolph: if you don't specify a class to extend in a module, it just overrides Object, regardless of how the module is namespaced?
<samuelkadolph>
No
<samuelkadolph>
It's because irb runs inside of main which is special instance of Object
laen_ has quit [Read error: Connection reset by peer]
laen__ has joined #ruby
<_br_>
macer1: [1,2,3].pack("C*") See #pack for more details on this.
<macer1>
thank you _br_ :)
<_br_>
welcome
Nanuq has joined #ruby
Eldariof-ru has joined #ruby
CodeVision has quit [Quit: WeeChat 0.3.8]
tatsuya_o has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
Banistergalaxy has joined #ruby
shadoi1 has quit [Quit: Leaving.]
<shevy>
macer1 what are you writing right now?
mmokrysz has joined #ruby
mmokrysz has left #ruby [#ruby]
<macer1>
shevy: byte array => ASN1
<shevy>
ah
<macer1>
looks like that part works :P
<macer1>
now even more encryption
<macer1>
I need an random RC4 key
<macer1>
OpenSSL::Cipher::RC4.new does that create a random one?
hoelzro|away is now known as hoelzro
Shrink has quit [Changing host]
Shrink has joined #ruby
tayy has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
crhan has joined #ruby
dhruvasagar has joined #ruby
g_rotbart has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
Hama has joined #ruby
mockra has joined #ruby
mneorr has joined #ruby
crhan has left #ruby ["Leaving"]
jameshyde has quit [Quit: Leaving]
sdwrage has quit [Quit: geekli.st/programmer]
Banistergalaxy has quit [Ping timeout: 246 seconds]
mockra has quit [Ping timeout: 245 seconds]
Banistergalaxy has joined #ruby
baphled has joined #ruby
arturaz has quit [Remote host closed the connection]
SegFaultAX has joined #ruby
<kjellski>
how can I escape % when using strings % method to format?
brg has joined #ruby
Shahor has joined #ruby
Shahor has quit [Client Quit]
Banistergalaxy has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
<Hanmac>
%%
<mog>
is there a way i can set a documentroot in webrick but have a function there to limit what files can be accessed
brg1 has quit [Ping timeout: 246 seconds]
<Hanmac>
kjellski:
<Hanmac>
>> "2 %d %% %s" % [1,"e"]
<al2o3cr>
Hanmac: (String) "2 1 % e"
<macer1>
>> "Hello " + "bot"
<al2o3cr>
macer1: (String) "Hello bot"
<macer1>
oh cool
jimeh has joined #ruby
<Hanmac>
macer1 but when you broke the bot, its owner is not there to restart them :P
dominikh has quit [Remote host closed the connection]
poppiez has joined #ruby
<macer1>
:D
TPFC-SYSTEM has joined #ruby
* Hanmac
has managed to broke the bot multible times :P
onto has joined #ruby
Banistergalaxy has joined #ruby
dominikh has joined #ruby
<s1n4>
:D
<onto>
Hi! I am trying to create a simple http (over ssl) server using webrick and sinatra. I have the following http://pastebin.com/RRQE42J4 but when I hit Ctrl+C to quit the webrick server, it throws the following: ERROR Interrupt: ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/webrick/server.rb:98:in `select'
<onto>
and does not shutdown the server
<Hanmac>
onto you could ask in #sinatra
<onto>
Hanmac: but it's not a sinatra issue ... it's a webrick issue, isn't it?
<Hanmac>
hm i dont think this is an error ...
<Hanmac>
ctrl-c is for interrupting ... to the error is okay
<onto>
I tried adding Signal.trap at the end of the script file (assuming Rack::Handler::Webrick returns a webrick server instance) and sending the "shutdown" message to that object but it didn't seem to work :(
<Hanmac>
i cant help with webrick questions ... maybe the guys in #rubyonrails are more helpful
<onto>
Hanmac: ok, will go there
Poapfel has quit [Quit: WeeChat 0.3.7]
cezar has joined #ruby
r0bby is now known as robbyoconnor
cezar has quit [Client Quit]
PapaSierra2 has joined #ruby
Agis__ has joined #ruby
Rizzle has quit [Read error: Connection reset by peer]
PapaSierra has quit [Ping timeout: 246 seconds]
Rizzle has joined #ruby
elhu has quit [Ping timeout: 272 seconds]
Rizzle has quit [Read error: Connection reset by peer]
Rizzle has joined #ruby
elhu has joined #ruby
ik6 has joined #ruby
Guest89851 has joined #ruby
Poapfel has joined #ruby
mucker has joined #ruby
mucker has quit [Client Quit]
Rizzle has quit [Read error: Connection reset by peer]
mucker has joined #ruby
mog has left #ruby ["Leaving"]
kn330 has quit [Ping timeout: 272 seconds]
Rizzle has joined #ruby
Rizzle has quit [Read error: Connection reset by peer]
Rizzle has quit [Read error: Connection reset by peer]
arietis has quit [Quit: Computer has gone to sleep.]
<ik6>
Hanmac, thanks for the response. Nokogiri is the next lesson :-) Kind of annoying that this copied code isn't working. Thought I could learn something from the error...
gmci has quit [Quit: Computer has gone to sleep.]
Rizzle has joined #ruby
Rizzle has quit [Read error: Connection reset by peer]
Araxia has quit [Quit: Araxia]
<ik6>
I just noticed that some of the data rows are 'territory' instead of 'state', I wonder if that could be the problem..
JonghwanHyeon has quit [Remote host closed the connection]
<kjellski>
Hanmac: thanks for the reply… was out for a walk =)
Rizzle has joined #ruby
<nw>
ik6: i haven't really used the crack gem, but it looks like if you replace line 7 with this, it works: Crack::XML.parse(open(URL).read)['map']['view']['totals']['state'].each do |state|
<bnagy>
no, you found a way to crash an external lib in one version of (I assume) MRI
mjbamford has joined #ruby
tonini has quit [Remote host closed the connection]
Kabaka has joined #ruby
gokul has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
gokul is now known as Guest46343
g_rotbart has joined #ruby
<macer1>
isn't openssl in stdlib?
<macer1>
it segfaults all ruby
<bnagy>
not jruby
<bnagy>
which is the only one I checked, cause it's what I run :)
<Hanmac>
macer1 ... what ruby do you have?
<macer1>
Hanmac: OSX 1.9.3-p194
<Hanmac>
do you compiled your ruby self?
<macer1>
yes
<macer1>
rvm
<Hanmac>
... did you install openssl dev packages before you install rvm?
<macer1>
yes
<macer1>
openssl works :P
<vandemar>
also segfaults in linux gentoo 1.9.3-p194 w/ openssl 1.0.1c
<bnagy>
it's definitely a bug, just not in 'ruby'
<macer1>
I need to file a bug, I think
<Hanmac>
ok segfault there too
qwerxy has joined #ruby
mjbamford has quit [Ping timeout: 245 seconds]
<vandemar>
the stacktrace shows the codepath goes through RSA_Size() and BN_num_bits() in libcrypto.so, before triggering a segfault and bouncing back to ruby's signal handler
<vandemar>
macer1: I assume it's caused by not having a private key to encrypt with?
tvw has joined #ruby
lkba has quit [Quit: Bye]
macer1 has quit [Ping timeout: 244 seconds]
fugit has quit [Ping timeout: 265 seconds]
fugit has joined #ruby
ij has joined #ruby
berserkr has joined #ruby
eddie_ has joined #ruby
elhu has joined #ruby
niklasb has joined #ruby
heftig has quit [Ping timeout: 248 seconds]
just4dos has joined #ruby
emmanuelux has joined #ruby
macer1 has joined #ruby
<macer1>
maybe the problem is with public key generating?
<macer1>
when encrypting using external public key it don't segfaults
<banisterfiend>
macer1: can u step through it in gdb
<vandemar>
there's no public key generation in that snippet. Do you think it's supposed to autogenerate one as part of public_encrypt if it doesn't have a key yet?
<macer1>
OpenSSL::PKey::RSA.new
<macer1>
return public key
<macer1>
--begin public key--- blabla --end public key --
<macer1>
is it normal that encrypting 16 bytes gives...a lot of bytes?
Synthead has quit [Ping timeout: 244 seconds]
Rochefort has quit [Remote host closed the connection]
<hoelzro>
macer1: depending on the algorithm, the input may be padded
<macer1>
oh yes, I need to pad that :P
<hoelzro>
some algorithms require blocks of certain sizes for encryption
<macer1>
where are padding functions? I have no idea about that
Bofu has joined #ruby
<bnagy>
macer1: you didn't give it a keysize
<vandemar>
macer1: oh, at least on my system, it's generating some trivial size rsa key by default. try saving the rsa key to a var then printing it before calling var.public_encrypt
<bnagy>
(require 'openssl'); OpenSSL::PKey::RSA.new(1024).public_encrypt 'a' try that
<macer1>
no segfautl
<macer1>
good progress
<vandemar>
macer1: if I manually do a 128 bit key, I get a different error about the key being not long enough to encrypt the data. Only at 256 and above does public_encrypt actually succeed
<macer1>
hoelzro: how to pad it? server says something about unpackV15
fearoffish has joined #ruby
<bnagy>
it's still a bug imho, but it's misuse of the API
<macer1>
"On receipt of a 0xFD from the server, the client will generate a 16-byte shared secret, to be used with the AES/CFB8 stream cipher. It then encrypts it with the server's public key (PKCS#1 padded), and sends it to the server along the token recieved in 0xFD encrypted with server's public key with a 0xFC."
<macer1>
this is what I am doing...I think
fourlastor has joined #ruby
<bnagy>
public_encrypt is correct, and it will use PKCS1 by default
<vandemar>
I think ruby is doing something wrong when RSA.new is called without a keysize.
<fourlastor>
let's say i want to implement a "clickable" behaviour, as in many different objects have 2 methods: click and clicked, the first takes a block of code as a parameter and saves it for later execution, the seconds fires it. would be better to use a mixin or inheritance? i'd say mixin but since i have to store the block somewhere it sounds more as a super class
<fourlastor>
many different classes*
<macer1>
the problem with padding is somewhere there... public_key.public_encrypt(@key).unpack("C*")
<ij>
Why can't I define Foo#bar<<?
<bnagy>
macer1: as I said, public_encrypt will correctly pad
sspiff has quit [Ping timeout: 240 seconds]
<shevy>
ij, depends how you do it
<shevy>
ij, can you show the code you tried on pastie.org ?
<macer1>
bnagy: server says something diffrent :<
<bnagy>
macer1: although I don't know why you're unpacking it
<ij>
shevy, Well it wants to call bar and then ask << to it, right?
<macer1>
bnagy: to bytes
vectorshelve has quit [Ping timeout: 245 seconds]
<bnagy>
it already is bytes :) that unpack will give you an array of ints
<macer1>
no, it's a byte string
<bnagy>
I don't know what you think a 'byte string' is
<workmad3>
ij: some_foo.bar << "whatever" get's parsed as 'some_foo.bar().<<("whatever")', not as 'some_foo.bar<<("whatever")'
<macer1>
it is "\x00\x11" etc.
<macer1>
In protocol I need to send this as array of ints :)
<bnagy>
yeah that's just a string :)
sspiff has joined #ruby
<macer1>
bytes*
dhruvasagar has quit [Ping timeout: 246 seconds]
<workmad3>
ij: which is in contrast to 'some_foo.bar = "whatever"', which get's interpreted as 'some_foo.bar=("whatever")'
<ij>
workmad3, Myeah, I somewhy thought I can make it work like I want it. Ha.
<workmad3>
ij: well, it just means you need to override the << method on the object returned by bar, not some non-existant bar<< method ;)
<bnagy>
macer1: how can you send a ruby array full of ints in a packet?
<shevy>
ij ahhh now I understand
dhruvasagar has joined #ruby
<shevy>
you meant a "bar<<" method
<macer1>
bnagy: bindata
<ij>
workmad3, Unfortunately that object's array, which I won't define methods on. :]
<bnagy>
let me guess... you're going to pack them. And end up with exactly the same as before you started :)
<shevy>
wasn't bindata written by bnagy?
<macer1>
I can delete the unpack there, it is converted in other class anyway
<bnagy>
no I have my own version
<shevy>
or what was the name again... hmm
<workmad3>
ij: wrap it in a proxy that provides your method override when you return it from bar
<shevy>
ah yes
<bnagy>
binstruct
<workmad3>
ij: or extend the specific instance with a module that provides your specialised method
<bnagy>
macer1: a ruby string is just a collection of raw bytes
<workmad3>
ij: there are a lot of ways within ruby that are great for specialising specific instances of a class, without monkey-patching the entirety of a core class :)
mneorr has quit [Quit: Leaving.]
<ij>
workmad3, How do I do the proxying? Is there some standard way to do it?
ZachBeta has joined #ruby
<bnagy>
macer1: so basically that string should be 128 bytes, and appear in the final packet
<ij>
Object#class is douchebaggery. I can call it only through obj.class, but not class.
<workmad3>
ij: with 1.9, a fairly standard way would be to subclass BasicObject, give it an initializer that takes the object to proxy to, a simple method_missing that forwards on all methods, and the overridden methods you want
<macer1>
this is how it works
afd__ has joined #ruby
Stalkr_ has joined #ruby
<bnagy>
def to_s; self.data.to_a.pack("C*"); end
<bnagy>
told you :)
<macer1>
emm
<macer1>
I told too
<macer1>
it is unpacking in other part of code anyway :S
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
<bnagy>
the unpack is useless, basically
<bnagy>
but whatever, that shouldn't be what makes it not work
<macer1>
array :data, :type => :mc_byte
<bnagy>
as long as the string you're getting is 128 bytes then it's sorrectly padded
<macer1>
I need to make that bytes somehow :)
<bnagy>
a ... string... IS ... BYTES
<macer1>
but ARRAY :S
Spooner has joined #ruby
<macer1>
ARRAY OF BYTES
<bnagy>
you're converting a string to an array or ints, storing that, and then converting the array of ints back into exactly the same string to drop it onto the wire
williamherry has quit [Ping timeout: 264 seconds]
<bnagy>
ie you're unpacking and packing for 0 reason
<macer1>
to_s is uselss here
<macer1>
deleted that
<macer1>
also deleted unpack at .shared_secret
AlbireoX has quit [Remote host closed the connection]
<ij>
workmad3, Cool. Also, didn't delegators do the same thing?
sepp2k has joined #ruby
ananthakumaran has quit [Read error: Connection timed out]
<workmad3>
ij: delegators do something similar... but I've never bothered to get my head around how they work because I find the BasicObject approach nice and easy :)
Tulak1 has joined #ruby
zxc__ has joined #ruby
r1chelt has joined #ruby
ananthakumaran has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<ij>
workmad3, They're doing the method_missing magic for you. And something more.
x0F_ is now known as x0F
Tulak has quit [Ping timeout: 244 seconds]
<ij>
They delegate themselves, so you wouldn't have to, hence Delegate(-ors).
<workmad3>
ij: if I was being a good citizen, I'd also override respond_to_missing
<workmad3>
ij: and iirc, with delegators you tend to have to say what you want to delegate
<macer1>
bnagy: the encrypted shared secret is 128 bytes as you said
<Spooner>
All they do is create wrapper methods, like the attr_ methods. What they don't do is proxy everything though.
<workmad3>
Spooner: thanks :)
mockra has joined #ruby
<Spooner>
So you'd def_delegators :@proxy_array, :size, :[], etc
<ij>
Hmm. I've to re-read up on that.
<macer1>
bnagy: it starts with byte 32 and server wants it to start with 0
<bnagy>
what is 'it' here?
<macer1>
oh, it's the encrypted shared secret
ik6 has joined #ruby
<macer1>
look the message up
<bnagy>
well that encrypted shared secret will start with a random byte
<macer1>
yes
<macer1>
32 was an example
dhruvasagar has quit [Ping timeout: 246 seconds]
<macer1>
also giving array longer than 128 gives error about; can't be longer than 128
<macer1>
so it's something with byte order/padding
<bnagy>
it is not padding or byte order
dhruvasagar has joined #ruby
<macer1>
hm?
mockra has quit [Ping timeout: 272 seconds]
<bnagy>
it's more likely that your kooky packet format wants a nullbyte
<bnagy>
and then the ciphertext
<macer1>
hmm...
<bnagy>
but what comes out of public_encrypt will be correctly padded, and there is nowhere for any kind of byte order to get involved
<bnagy>
it's not an integer of any kind
<bnagy>
I would check that the final packet is the correct length according to your spec, first and foremost
chitradeep has joined #ruby
<macer1>
hmm ok
iori has quit [Remote host closed the connection]
iori has joined #ruby
jjang has quit [Remote host closed the connection]
w0lverine has quit [Quit: w0lverine]
<macer1>
that java exception is when ..."decrypted data is not bounded by the appropriate padding bytes"
flint has quit [Ping timeout: 240 seconds]
<macer1>
also it says something about; at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:308)
Iszak has joined #ruby
flint has joined #ruby
<Iszak>
So I need to implement an algorithm that'll find common substring amongst infinite number of strings.
<Iszak>
Anyone know how to do this? or can point me in the right direction?
afd__ has quit [Read error: Connection reset by peer]
iori has quit [Ping timeout: 246 seconds]
<bnagy>
LCS ?
dhaivatpandya has joined #ruby
bj0ern has joined #ruby
anildigital_work has joined #ruby
vectorshelve has joined #ruby
nari has quit [Ping timeout: 245 seconds]
elhu has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Ping timeout: 244 seconds]
<bnagy>
I think if you google MLCS you'll find lots of lit
<bnagy>
this is basically a pure compsci question
Morkel has quit [Quit: Morkel]
dhruvasagar has joined #ruby
<Iszak>
yeah, I've looked into LCS but seem a bit over my head.
<bnagy>
ok, well there's your first issue :)
<Iszak>
yeah, certainly is.
mmokrysz has joined #ruby
jjp has quit [Ping timeout: 250 seconds]
<Iszak>
Basically, I want to analyse multiple strings, find patterns within them, and output a regular expression.
<bnagy>
ok I have no idea what you're talking about now :)
SphericalCow has joined #ruby
zxc__ has quit [Quit: Page closed]
heftig has joined #ruby
<Iszak>
On it's simplest level it'll take multiple strings and find common substrings, from there, it will then proceed to calculate a common range, then from that it'll generate a regex.
s1n4 has quit [Quit: leaving]
<bnagy>
ok well those sound like three different phases
<bnagy>
phase 1 is NP hard
<Spooner>
Iszak : It was infinite strings a minute ago, not just multiple strings. Good to see you are becoming more realistic :)
<bnagy>
but there's a lot of lit
<bnagy>
basically, look at algorithms from any language, or just general papers, don't limit yourself to looking at ruby implementations
<bnagy>
I bet there's a java lib for this :P
charliesome has quit [Ping timeout: 244 seconds]
<workmad3>
Iszak: so, basically, it's a way to generate a pattern that matches a set of strings?
<Iszak>
All the data is in the database, maybe PostgreSQL has something like this.
<workmad3>
Iszak: well, to go beyond that, you are going to need to describe how it should be parameterised... how close a match do you want to allow?
<workmad3>
Iszak: is another fuzzy match algorithm maybe more appropriate?
<Iszak>
workmad3: parameterised, the regex?
<workmad3>
Iszak: as I'm guessing that's your goal... to generate a regex that will determine if string X is somehow 'close' to strings A,B,C
<workmad3>
Iszak: the closeness needs to be parameterised...
r1chelt has quit [Remote host closed the connection]
<Iszak>
it must match the length (variable) and the common substring, the other characters will definitively be alpha numerical.
<Iszak>
so something like [A-Z0-9
<workmad3>
Iszak: so you can describe what is close and what isn't (e.g. more than 10% difference, less than 5 characters difference, no more than 2 adjacent characters different...)
<Iszak>
[A-Z0-9]{3}ABC[A-Z0-9]{6}
future_chimp has joined #ruby
<Iszak>
well, I can't really put a percentage on it because it can be more if it's longer.
Rochefort has joined #ruby
<workmad3>
Iszak: that sounds very like a percentage then...
<Iszak>
Not necessarily.
<Iszak>
it could be the same length, but different percentage depending on the common substring.
<workmad3>
Iszak: ok... it actually sounds like you don't know exactly what you need I'm afraid
<workmad3>
Iszak: which makes coming up with a concrete algorithm pretty much impossible
<workmad3>
Iszak: I'd personally suggest doing a few worked examples on paper, going from source string(s) to regex
<workmad3>
Iszak: and then try to extract some sort of pattern from that
<Iszak>
I know exactly the regular expression I'm looking for, but like I said, it all depends.
<bnagy>
I still think regexp probably doesn't belong here
<bnagy>
but without a concrete problem statement it's all handwaving
<workmad3>
Iszak: if 'it all depends' is code for 'there isn't a pattern', then what you have is a set of special cases that you'll need to code explicitly
Lachryma` has joined #ruby
<workmad3>
Iszak: if that set of special cases is infinite in size... sucks to be you, you'll be coding them for a long time ;)
<workmad3>
Iszak: if there is a pattern though... you need to work out what it is
<Iszak>
well it's really calculating two different things, first is the common substring problem, then it's calculating the length range (easy).
Progster has joined #ruby
<workmad3>
Iszak: and in all fairness... this is your job...
<Iszak>
but I can't do it and hence is why I'm here for guidance.
<workmad3>
Iszak: which is what I'm trying to give... guidance to how to tackle the problem
<workmad3>
Iszak: guidance != doing your job for you
<bnagy>
what are you going to do with these magic regexps once you have them?
<Iszak>
match input.
<bnagy>
to what end?
<Iszak>
to better provide a result to the users input.
<workmad3>
ah, wishy washy requirements too, great fun
jarr0dsz has joined #ruby
<bnagy>
...
<bnagy>
not trying to be rude, but dude you can't communicate
jarr0dsz has left #ruby [#ruby]
<bnagy>
if you can't state your problem nobody can help you
<Iszak>
I think all these questions has confused what I really want.
<bnagy>
and if you don't know why you want something then who knows if you actually need it, or if there's a better approach
<Iszak>
I know why I want it.
rutkla_ has joined #ruby
Rochefortes has joined #ruby
rutkla has quit [Ping timeout: 264 seconds]
<bnagy>
based on experience, this sounds like putting the cart before the horse - you want help in doing XYZ because you've decided that is how goal Q should be approached
bullicon has quit [Quit: Computer has gone to sleep.]
<bnagy>
but given that you're unable to express goal Q, pff. I dunno.
<Iszak>
Here's the full problem, so basically the user inputs a string, we then make multiple requires to multiple APIs, they will return whether it's a match or not. Now instead of having to call every API, it would be nice to match the user string first against a common pattern which each API has. This common pattern can change at any time so I can't hard code it unfortunately.
<Iszak>
s/requires/requests/
felipecvo has quit [Ping timeout: 246 seconds]
Stalkr_ has joined #ruby
Rochefort has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
<bnagy>
uh
dhruvasagar has joined #ruby
SeanTAllen has joined #ruby
busybox42 has quit [Read error: Connection reset by peer]
<bnagy>
no, sorry, unable to parse that
<Iszak>
well.. not sure I can convey it any better.
<workmad3>
Iszak: wait... each API has a particular pattern... but it can change at any point, meaning it isn't actually a particular pattern, just noise that you're trying to assign meaning to
zemanel has quit [Quit: Remote hottie closed the connection]
<Iszak>
well, there is a pattern, just for a certain period of time, then it changes.
elhu has joined #ruby
<Iszak>
there's still a probability that the users input will still match multiple API's and that's fine, but instead of calling 100 APIs I only have to call 10.
berserkr has quit [Quit: Leaving.]
Stalkr_ has quit [Ping timeout: 272 seconds]
r1chelt has joined #ruby
jjp has quit [Quit: Lost terminal]
r1chelt has quit [Changing host]
r1chelt has joined #ruby
mockra has joined #ruby
cloud|droid has joined #ruby
dhaivatpandya has quit [Quit: dhaivatpandya]
<dr_bob>
Iszak: maybe a two step approach works: each API publishes a pattern, you collect these in a Hash which uses the pattern as key and an Array of APIs as value. Of course your APIs would need to write the patterns in a uniform way so enough of them have the same pattern. Then you only match against keys in the Hash and for a match you match against all APIs (or until you find a match).
nilg has joined #ruby
mockra has quit [Ping timeout: 240 seconds]
TheDeadSerious has quit [Quit: Leaving.]
dhruvasagar has quit [Ping timeout: 246 seconds]
<Iszak>
dr_bob: that would certainly work, but I want the code base to automatically determine these patterns.
Foxandxss has joined #ruby
<shevy>
oh
<shevy>
array of symbols can not be sorted?
cascalheira has joined #ruby
<shevy>
oh no wait
<shevy>
I had a mixed array with both symbols and strings
dhruvasagar has joined #ruby
Morkel has joined #ruby
<shevy>
[:a, :b, :c, "d"].sort ArgumentError: comparison of Symbol with String failed
Morkel has quit [Client Quit]
Morkel has joined #ruby
Morkel has quit [Client Quit]
<workmad3>
shevy: heh
<dr_bob>
Iszak: another approch is to use a Trie for storage. Then you can step through the user input until you find the single matching API.
Morkel has joined #ruby
<Iszak>
Never heard of a Trie, will have to look into it - thanks!
<dr_bob>
shevy: [:a, :b, :c, "d"].sort_by &:to_s
TheShadowFog has quit [Read error: Connection reset by peer]
<shevy>
I still dont entirely get it... why is the @ needed there?
<workmad3>
Hanmac: do you need the @ suffix for ! and ~ ?
<shevy>
isn't that an instance variable usually
<workmad3>
shevy: because :- and :-@ are different methods
<ij>
workmad3, For ~, yeah
<shevy>
stop those smileys!
<shevy>
I can't concentrate on non-smiley meaning
<workmad3>
shevy: :- is the binary -, so 1 - 2 is 1.-(2)
Guest46343 has quit [Quit: Leaving]
ananthakumaran has quit [Read error: Connection timed out]
<workmad3>
shevy: while :-@ is the unary -, so - 1 is 1.-@()
<shevy>
:~@
<shevy>
1.-@() <--- smiley as well
<shevy>
:(
<workmad3>
shevy: 1.-@() is actually valid ruby code btw ;)
chitradeep has quit [Quit: chitradeep]
<workmad3>
shevy: as is -1.+@()
<shevy>
hmm
<Hanmac>
meth?(&:=~) is valid ruby too :P
<workmad3>
shevy: the @ suffix is an unfortunate consequence of ruby not allowing polymorphic method calls btw
<shevy>
aha
<workmad3>
shevy: as it needed a way to distinguish operator overloads of 1 - 2 from - 1
dhruvasagar has quit [Ping timeout: 246 seconds]
<workmad3>
shevy: so the unary operator overloads got an @ suffix
<workmad3>
shevy: rather than being able to determine them just from having a - overload with 1 argument from a - overload with 0 arguments
ppawel has quit [Ping timeout: 264 seconds]
chitradeep has joined #ruby
dhruvasagar has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
<Hanmac>
>> defined?(-1)
<al2o3cr>
Hanmac: (NilClass) nil
<workmad3>
>>defined?(- 1)
<al2o3cr>
workmad3: (NilClass) nil
<workmad3>
heh
<Hanmac>
:'(
<workmad3>
Hanmac: note I'm using - 1, not -1, to avoid you pointing out that -1 is a literal expression ;)
clocKwize has joined #ruby
<Spooner>
>> "are you broken?"
<al2o3cr>
Spooner: (String) "are you broken?"
* workmad3
is aware of the level of pedantry here
<workmad3>
>> 1 + 1
<al2o3cr>
workmad3: (Fixnum) 2
<shevy>
>> 1.-@()
<workmad3>
>> _
<al2o3cr>
shevy: (Fixnum) -1
<al2o3cr>
workmad3: (String) "NameError: undefined local variable or method `_' for main:Object"
<shevy>
hehe
<workmad3>
>> ----1.-@()
<al2o3cr>
workmad3: (Fixnum) -1
<workmad3>
>> ---1.-@()
<al2o3cr>
workmad3: (Fixnum) 1
<workmad3>
-1**4
<workmad3>
>>-1**4
<al2o3cr>
workmad3: (Fixnum) -1
<workmad3>
oops
<workmad3>
>>-1**5
<al2o3cr>
workmad3: (Fixnum) -1
ik6 has quit [Ping timeout: 240 seconds]
<workmad3>
>>Complex(0,1)**2
<al2o3cr>
workmad3: (Complex) (-1+0i)
<workmad3>
>>Complex(0,1)**3
<al2o3cr>
workmad3: (Complex) (0-1i)
<workmad3>
>>Complex(0,1)**4
<al2o3cr>
workmad3: (Complex) (1+0i)
liluo has quit [Remote host closed the connection]
* workmad3
loves roots of unity
r1chelt_ has quit [Quit: r1chelt_]
bothra has joined #ruby
<workmad3>
shevy: are complex numbers too complex for you? :)
geekbri has joined #ruby
arturaz has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
<ij>
>> fork while fork
<al2o3cr>
ij: (String) "NameError: undefined local variable or method `fork' for Kernel:Module"
<clocKwize>
guys, I have a has_many where all the children have a expiry date - would it be wrong to run a cron job every hour to set expired = true on the model if all of its children have expired? I'm trying to index my data with Thinking Sphinx and its just getting a bit of a nightmare
kn330 has joined #ruby
<shevy>
workmad3 yeah
<shevy>
I prefer numbers like 1,2,3,4
<workmad3>
shevy: but complex numbers are so simple in reality! :P
<workmad3>
shevy: they add less complexity than real numbers do
* workmad3
taunts shevy about his dislike of anything that even mentions the word 'complex' :P
<shevy>
I dont like complexity
`brendan has joined #ruby
macer1 has quit [Remote host closed the connection]
<workmad3>
shevy: complexity is where things get interesting though... otherwise all you ever really deal with are trivialities
bothra has quit [Ping timeout: 245 seconds]
<workmad3>
shevy: needless complication, I'm right behind you... that stuff sucks
<workmad3>
shevy: to paraphrase - 'things should be as complex as they need to be, and no more'
<ohcibi>
hm it seems like the examples for String#[rl]strip(!) are wrong... the example for rstrip should be the example for lstrip ("asdf ".rstrip ==> "asdf", the doc says " asdf".rstrip ==> "asdf")
<ohcibi>
jrajav: they are... as i said: i cant read today...
sevvie has joined #ruby
mengu has joined #ruby
mmokrysz has quit [Quit: Leaving.]
bothra has joined #ruby
tk_ has joined #ruby
busybox42 has joined #ruby
vlad_starkov has joined #ruby
havenn has joined #ruby
yasushi has joined #ruby
yasushi has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
tommyvyo has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
gmci has quit [Quit: Computer has gone to sleep.]
ananthakumaran has joined #ruby
cloud|droid has joined #ruby
dhruvasagar has joined #ruby
lorandi has joined #ruby
yeggeps has quit [Read error: Connection reset by peer]
wereHamster has quit [Ping timeout: 246 seconds]
dhaivatpandya has joined #ruby
yeggeps has joined #ruby
<ik6>
is there a simple way to skip an iteration during an 'each' statement?
<virunga>
next
<ik6>
if(a == 2) next else print 'not a 3' ?
<ik6>
'not a 2'
<virunga>
let's try
<ik6>
:)
<Muz>
(1..4).each { |i| next if i == 2; puts i }
<virunga>
>> [1, 2].map { |x| next if x == 2 }
<al2o3cr>
virunga: (Array) [nil, nil]
<Muz>
>> (1..4).each { |i| next if i == 2; puts i }
<al2o3cr>
Muz: (String) "SyntaxError: sandrbox: syntax error, unexpected tIDENTIFIER, expecting '}'\n(1..4).each { |i| next if i == 2puts i }\n ^"
<jrajav>
No stdout, sorry
aganov has quit [Ping timeout: 240 seconds]
<virunga>
>> [1, 2].map { |x| next if x == 2 else x }
<al2o3cr>
virunga: (String) "SyntaxError: sandrbox: syntax error, unexpected keyword_else, expecting '}'\n[1, 2].map { |x| next if x == 2 else x };\n ^"
<hoelzro>
wouldn't that map to [1, nil]?
<virunga>
maybe
<virunga>
:P
<virunga>
i'm a noob
Rochefortes has joined #ruby
<Hanmac>
>> [1, 2].map { |x| x == 2 ? next : x }
<al2o3cr>
Hanmac: (Array) [1, nil]
<hoelzro>
>> [1, 2].map { |x| next if x == 2 x }
<al2o3cr>
hoelzro: (String) "SyntaxError: sandrbox: syntax error, unexpected tIDENTIFIER, expecting '}'\n[1, 2].map { |x| next if x == 2 x };\n ^"
<hoelzro>
>> [1, 2].map { |x| next if x == 2 ; x }
<al2o3cr>
hoelzro: (String) "SyntaxError: sandrbox: syntax error, unexpected tIDENTIFIER, expecting '}'\n[1, 2].map { |x| next if x == 2x }\n ^"
<jrajav>
Hanmac: LXC on the way
* hoelzro
doesn't know how to do Ruby one-liners
cezar has joined #ruby
ppawel has joined #ruby
cezar has quit [Client Quit]
xorigin has quit [Quit: leaving]
iamjarvo has quit [Quit: Leaving...]
johnjohnson has quit []
Rochefort has quit [Ping timeout: 246 seconds]
yoklov has joined #ruby
<ij>
>> [3.superclass, 3.class] # <-- noooo! :[
<al2o3cr>
ij: (NilClass) nil
dhruvasagar has quit [Ping timeout: 246 seconds]
<ik6>
ok, that worked. thanks!
<Mon_Ouie>
hoelzro: Your first version *was* correct; it's just a bug in the Sandbox used by the bot (or something I would consider a bug anyway)
dhruvasagar has joined #ruby
<ik6>
how about: next if(x.text == "1" or x.text == "2"); puts...
yeggeps has quit [Read error: Connection reset by peer]
<hoelzro>
haha
<hoelzro>
*ahah
<hoelzro>
thanks for letting me know =)
yeggeps has joined #ruby
<Mon_Ouie>
And I wouldn't use next in that case anyway
<Mon_Ouie>
Just if condition then puts … end
nari has joined #ruby
mucker has quit [Remote host closed the connection]
<ik6>
if(x != 2 or x != 1); puts ... end ?
<bnagy>
puts x unless x < 3
arietis has joined #ruby
Rochefort has joined #ruby
<peterhellberg>
[1,2,3,4].each { |n| puts n unless [2,3].include?(n) } :)
<ik6>
it's a string
<ik6>
parsing html
lorn_ has joined #ruby
<bnagy>
puts x unless %w(1 2).include? x
caveat- has quit [Quit: leaving]
mucker has joined #ruby
cezar has joined #ruby
aganov has joined #ruby
Tulak has joined #ruby
lorn has quit [Ping timeout: 276 seconds]
lorn_ is now known as lorn
cezar has quit [Client Quit]
caveat- has joined #ruby
cousine has joined #ruby
g_rotbart has quit [Remote host closed the connection]
flype has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
Rochefortes has quit [Ping timeout: 264 seconds]
Tulak1 has quit [Ping timeout: 272 seconds]
yeggeps has quit [Read error: Connection reset by peer]
yeggeps has joined #ruby
GoGoGarrett has joined #ruby
<Muz>
jrajav: had an idea for long (and terminated) output, why not post it to pastie/pastebin/whatever and have the bot return a link to that?
<Muz>
s/it/STDOUT/
<jrajav>
That's an okay idea
<jrajav>
Might be a little unwieldy
<jrajav>
I'm more inclined to avoid automatically pastebinning anything as long as there's not an actual problem with sending tons of output through IRC PM
<jrajav>
And I haven't seen one
<workmad3>
jrajav: there is a limit on message length
<jrajav>
workmad3: Do you know what it is?
<Muz>
And a flood limit as demonstrated earlier.
<workmad3>
jrajav: I think it's something like 400 chars on freenode
<workmad3>
^^
<jrajav>
It's DEFINITELY longer than that
<jrajav>
haha
<workmad3>
jrajav: it might be longer in PM :)
<jrajav>
Muz: Demonstrated earlier? Something happen while I was gone?
<workmad3>
jrajav: what would be nice actually is if you could 'save' a bot command
aces23up has joined #ruby
<workmad3>
jrajav: maybe with a different token
aces1up has quit [Ping timeout: 240 seconds]
<Muz>
13:19 -!- al2o3cr [~js-irc@167.68.114.6] has quit [Excess Flood]
<Muz>
About an hour ago.
<workmad3>
jrajav: so... dunno... !gist >> "whatever" will save the command and the output in a gist and give a link
<jrajav>
Muz: :O
<jrajav>
workmad3: Yeah that would be great
<workmad3>
jrajav: get on it then ;)
mockra has joined #ruby
<jrajav>
Muz: I still don't understand why my bot didn't just quit. It's supposed to quit upon disconnecting, whichever party cut the connection
<jrajav>
Muz: And when it quits, forever brings it back up, so it would rejoin
<jrajav>
So it's annoying that it didn't quit :P
* Muz
shrugs.
yasushi has quit [Remote host closed the connection]
yasushi has joined #ruby
Solnse2 has joined #ruby
chico_chicote has joined #ruby
yasushi has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
jgarvey has joined #ruby
Solnse has quit [Ping timeout: 264 seconds]
johnjohnson has joined #ruby
mockra has quit [Ping timeout: 248 seconds]
Stalkr_ has quit [Quit: Leaving...]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
mfrost503 has left #ruby [#ruby]
v0n has joined #ruby
bluenemo has joined #ruby
bananastalktome has joined #ruby
Michagogo has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
emsilva has joined #ruby
emsilva has quit [Changing host]
emsilva has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby
chrisja has joined #ruby
johnjohnson has quit []
arkiver has joined #ruby
yoklov has quit [Quit: computer sleeping]
kpshek has joined #ruby
ksk has quit [Ping timeout: 246 seconds]
<ik6>
thanks bnagy! just got it :-)
dv310p3r has joined #ruby
uris has joined #ruby
cantbecool has joined #ruby
nateberkopec has joined #ruby
hynkle has joined #ruby
cousine has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
wereHamster has joined #ruby
verto|off is now known as verto
dekroning has joined #ruby
<dekroning>
hi
<hoelzro>
greetings!
<emsilva>
curiosity landed!
fowlzzzzzzzzzzzz is now known as fowl
<Michagogo>
Why is there a #ruby and a #ruby-lang?
vectorshelve has quit [Quit: Page closed]
<virunga>
so you can ask the same question in two different channel
<virunga>
i'm kidding
<virunga>
#ruby-lang should be the official channel of ruby i think
<virunga>
but i dunno why there are two channels
jimeh has quit [Quit: bye]
r1chelt has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
<Hanmac>
Michagogo: ruby-lang is offical, but you need to be registered ...
<Hanmac>
you are not forced to use rails, you can walk too :P
<peterhellberg>
Didn’t you just say that you do that before uploading the output?
jonnn_ has joined #ruby
lkba has joined #ruby
<ik6>
yeah, i guess what I meant was that it should dynamic... does that make sense?
`vitoravelino is now known as vitoravelino
<peterhellberg>
ik6: Do you want the scraping to be done in real time or does it take a lot of time?
<ik6>
it could happen in real time, i think
<peterhellberg>
If you want to do the scraping in real time then I would suggest using the Sinatra framework and then deploy it to Heroku (free for small apps)
andrewh has quit [Ping timeout: 272 seconds]
<ik6>
oh, I saw Sinatra earlier today
ananthakumaran has joined #ruby
<ik6>
ok, i'll have a look into that
d3vic3 has quit [Quit: leaving]
<ik6>
thanks heaps :-)
<peterhellberg>
Heroku is just a suggestion though, there are a few different hosting companies where you can deploy your Ruby-apps for free/cheaply
syamajala has joined #ruby
cloud|droid has quit [Remote host closed the connection]
tayy has quit [Remote host closed the connection]
<ik6>
If I used Heroku
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
<ik6>
That would be with Sinatra?
<peterhellberg>
It could be, but that is just a combination that I prefer :)
Speed has quit [Client Quit]
<peterhellberg>
Sinatra is a web framework, just like Ruby on Rails.
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
NimeshNeema has joined #ruby
maesbn has quit [Remote host closed the connection]
Spooner has joined #ruby
maesbn has joined #ruby
v0n has joined #ruby
Tulak has quit [Quit: Leaving.]
dv310p3r has quit [Ping timeout: 272 seconds]
<Sou|cutter>
is there a non-commercial tool for profiling memory usage in 1.9.x?
maesbn has quit [Ping timeout: 244 seconds]
gilead has quit [Quit: This computer has gone to sleep]
deryl has quit [Quit: deryl]
alanp has quit [Remote host closed the connection]
balki_ has quit [Remote host closed the connection]
Iszak has quit [Ping timeout: 245 seconds]
<Sou|cutter>
ruby-prof seems to have a memory reporting mode, but I'm a bit confused by docs stating it requires a patched interpretter
jasonLaster has joined #ruby
Tulak has joined #ruby
andrewhl has joined #ruby
ckrailo has joined #ruby
balki has joined #ruby
alanp has joined #ruby
KillerFox has quit [Ping timeout: 265 seconds]
davidcelis has quit [Quit: K-Lined.]
ppawel has joined #ruby
berserkr has joined #ruby
deryl has joined #ruby
KillerFox has joined #ruby
Godslastering has joined #ruby
Godslastering has quit [Client Quit]
ladder4 has joined #ruby
Bacalli has joined #ruby
shevy has quit [Ping timeout: 246 seconds]
slux_ has joined #ruby
<Sou|cutter>
I am tempted to see if I can get this code running on jruby and use java's profiling tools...
Urthwhyte has left #ruby [#ruby]
tk_ has quit [Quit: ばいばい]
yasushi has quit [Remote host closed the connection]
yasushi has joined #ruby
yasushi_ has joined #ruby
yasushi has quit [Read error: Connection reset by peer]
MasterIdler has quit [Quit: MasterIdler]
Godslastering has joined #ruby
Godslastering has quit [Client Quit]
jrbing has left #ruby [#ruby]
Bauer has left #ruby [#ruby]
yasushi_ has quit [Ping timeout: 264 seconds]
apeiros_ has joined #ruby
Godslastering has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
conor_ireland has quit [Quit: conor_ireland]
conor_ireland has joined #ruby
Iszak has joined #ruby
<Iszak>
Sou|cutter: did you find one?
<Sou|cutter>
no..
<Iszak>
Sou|cutter: do you know of a commercial one?
<Sou|cutter>
nope
shevy has joined #ruby
cassianoleal has joined #ruby
<cassianoleal>
anyone has any experience with webmock+vcr?
peterhellberg has quit [Remote host closed the connection]
conor_ireland has quit [Client Quit]
arkiver has quit [Quit: Leaving]
dpk has quit [Quit: Asleep at the keyboard.]
<Sou|cutter>
cassianoleal: I've used them, sure
mneorr has quit [Quit: Leaving.]
bradhe has joined #ruby
mengu has quit [Remote host closed the connection]
<cassianoleal>
Sou|cutter: I have a problem with verifying a post call with basic_auth
<Sou|cutter>
howso?
<cassianoleal>
Sou|cutter: it receives user@pass on the request's URL, but I don't set them on the URL itself
<Sou|cutter>
sounds like a basic_auth problem?
<cassianoleal>
so the verification fails, as it expects http://some-url/, but receives http://user@pass:some-url/
<cassianoleal>
not entirely sure
<apeiros_>
cassianoleal: it's disadvised (stronlgy so) to use user@pass in the url
<apeiros_>
cassianoleal: and not just because it's non-standard
<cassianoleal>
apeiros_: yeah, but it's not I doing it…
carloslopes has quit [Quit: Leaving.]
<cassianoleal>
it seems like it's httparty who appends them to the url
<apeiros_>
o0
Ethan has quit [Read error: Connection reset by peer]
<apeiros_>
I'd check the docs, and if that reveals nothing, contact the author
<apeiros_>
that's rather improper basic auth. proper one uses headers.
conor_ireland has joined #ruby
<nateberkopec>
is it kosher for a "?" method to return a value that isn't 'true' or 'false'? like if Order.subscribed? returns nil?
<nateberkopec>
speaking idiomatically
cantonic has joined #ruby
<apeiros_>
it's uncommon
<Sou|cutter>
nateberkopec: idiomatically, it only needs to be "truthy"
<apeiros_>
and I'd not do it
<apeiros_>
but there are examples of non true/false returns in core/stdlib
<apeiros_>
(File.size? iirc being one)
<nateberkopec>
k, that's what I thought.
<dr_bob>
Sou|cutter: a primitive size monitoring would count instances via ObjectSpace. I once did a bit of coding around that with delta output which helped finding memory leaks.
<nateberkopec>
thanks!
<Sou|cutter>
dr_bob: that sounds like I'd have to get my hands pretty dirty
Rochefort has quit [Remote host closed the connection]
Beoran has quit [Read error: Connection reset by peer]
busybox42 has quit [Quit: Leaving.]
jonathanwallace has quit [Remote host closed the connection]
busybox42 has joined #ruby
<infinitiguy>
Hi All, I'm very new to ruby and I'm trying to figure out how to pull out certain key/value pairs. For example - here is a snippet of code and the response.
<infinitiguy>
How would I pull out say the InstanceIds?
<infinitiguy>
do I need to go down the chain to be able to find it?
<davidcelis>
that looks like XML; maybe you should be using an XML parser like Nokogiri
<Muz>
It's not XML.
<Muz>
It's JSON. It looks like a JSON representation of data that was originally stored in XML for some reason.
<davidcelis>
Looks like XML converted to a hash to me
<infinitiguy>
it might be - I'm using a rubygem for amazon ec2. I think it may use nokogiri under the covers
* otters
waits very patiently for pastebin to load
chimkan___ has joined #ruby
erichmenge has quit [Quit: Be back later]
baphled has quit [Ping timeout: 246 seconds]
erichmenge has joined #ruby
maletor has joined #ruby
chimkan has quit [Ping timeout: 246 seconds]
chimkan___ is now known as chimkan
Araxia has joined #ruby
erichmenge has quit [Client Quit]
jillsmitt has quit [Remote host closed the connection]
jillsmitt has joined #ruby
arturaz has quit [Ping timeout: 246 seconds]
<shevy>
cuddly otters!!!
<apeiros_>
there's people who confuse XML and JSON? o0
<Guest83725>
ugly codgers!
SQLStud has joined #ruby
fforbeck has joined #ruby
<apeiros_>
and all the while it is neither…
Abbas| has joined #ruby
Hanmac has joined #ruby
<otters>
Hi shevy
<apeiros_>
sorry guys, but infinitiguy clearly wrote that he *pp*ed the data. this is an ordinary ruby structure…
<davidcelis>
apeiros_: the casing and structure made it look like a nokogiri XML object being represented as a hash
verto is now known as verto|off
<apeiros_>
davidcelis: it probably *was* but it clearly is no longer
<apeiros_>
infinitiguy: mylb.class returns what?
<infinitiguy>
I was very excited when I was able to actually get the data - now I just don't know what to do with it :(
<infinitiguy>
lets see..
<apeiros_>
err, rather, mylb.Listeners.class
chimkan has quit [Quit: chimkan]
<infinitiguy>
both have no results
<infinitiguy>
puts "Classing LB"
<infinitiguy>
mylb.class
<infinitiguy>
puts "2Classing LB"
<infinitiguy>
mylb.Listeners.class
<davidcelis>
no, puts the .class lines
<davidcelis>
we need to see what those output
cantonic has quit [Quit: cantonic]
<apeiros_>
but the answer is probably mylb.Listeners["DescribeLoadBalancersResult"]["LoadBalancerDescriptions"]["member"].flat_map { |instance| instance["member"].map { |member| member["InstanceId"] } }
<apeiros_>
depends a bit on the actual data. but maybe you get the idea.
<infinitiguy>
ah - mylb.class = hash
<infinitiguy>
mylb.listeners.class = NilClass
<apeiros_>
yepp. so it's *not* xml, it's *not* json. it's plain old ruby. the conversion has already happened.
<davidcelis>
most unfortunate
<apeiros_>
(and yes, it probably was xml once, xmlns tells us as much)
<infinitiguy>
so all the output I see is a big hash?
<davidcelis>
yep, just a big ol' Hash
<infinitiguy>
I see - In ruby how can you chop up a Hash? (if that's even the right way to phrase it)
apok has quit [Quit: apok]
<infinitiguy>
In this case - I don't care about most of it - only a couple values
<apeiros_>
infinitiguy: use `ri Hash` in your console (bash…)
<apeiros_>
and I gave you an approach above
<RubyPanther>
with #delete
<davidcelis>
you probably don't want to "chop it up", just pull out what you want like apeiros_ showed you
<infinitiguy>
what is ri? I don't have that command
<apeiros_>
infinitiguy: look at Hash#[], #values_at, #each, #each_key and #each_value
<apeiros_>
infinitiguy: ri is the documentation tool. your ruby installation is rather incomplete if you don't have it.
<RubyPanther>
ri is a long wait for a weak search
<apeiros_>
you can use rdoc.info or ruby-doc.org instead
<apeiros_>
RubyPanther: BS
<infinitiguy>
hrm - I have ruby-rdoc installed (rpm -qa)
<infinitiguy>
assuming it's not included with that?
<apeiros_>
maybe if you're still on a 486…
<apeiros_>
ugh, rpm
<RubyPanther>
apeiros_: lots and lots of people don't use it, pointing out two weaknesses doesn't improve it. And, capital letters doesn't take my opinion away, or make it like yours.
greenysan has quit [Ping timeout: 272 seconds]
<apeiros_>
RubyPanther: keep babbling. it's still BS.
syamajala has quit [Remote host closed the connection]
<RubyPanther>
_fact_ It is a poor tool according to me and lots of people. Even just ruby-doc.org is a better reference
<apeiros_>
RubyPanther: blablabla
<infinitiguy>
ok - i'll do some reading up - I think I have enough to go on. Appreciate the pointers :)
<davidcelis>
now now, kids
<RubyPanther>
No sense complaining that other people's opinions are "BS" that is just being rude, not improving the tool... or really even defending it, since there is no content.
<davidcelis>
whoev: did you just camelCase a method definition
erichmenge has joined #ruby
<whoev>
i'm out of control over here
<davidcelis>
THIS ISN'T JAVA, BOY
<whoev>
;)
<apeiros_>
whoev: *shrug* it's your code. shoot yourself in the foot all you want.
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
bluenemo_ has quit [Remote host closed the connection]
<davidcelis>
maybe he's trying to protect his secret sauce
<whoev>
does textmate support unicode?
<Muz>
To a degree, yes.
<whoev>
the only ppl working on this are using vim and textmate
<Mon_Ouie>
shοοτ_in(fοοτ)
jonathanwallace has joined #ruby
<Muz>
To the same degree as other text editors? Debatable.
Iszak has quit [Quit: Page closed]
<apeiros_>
you have coworkers for that? I feel sorry for them…
stkowski has joined #ruby
<Synthead>
is there a way I can enumerate through a hash kind of like Array's .each_with_key ?
<apeiros_>
I'd insta-defenstrate a coworker for that :-p
<whoev>
for what
jorge has joined #ruby
<apeiros_>
Synthead: Hash#each, #each_key, #each_value - whatever you need…
<whoev>
maybe i'll just write all my code in haskell from now on
<whoev>
lol
<apeiros_>
and I don't think there's an Array#each_with_key…
shadoi has joined #ruby
<whoev>
def ꝤꞆ(ꝖꝊꝉꝖꝊꝉꝖꝊꝉꝖꝊꝉꝖꝊꝉ)
blazes816 has joined #ruby
<whoev>
logger.info ꝖꝊꝉꝖꝊꝉꝖꝊꝉꝖꝊꝉꝖꝊꝉ
<whoev>
end
<apeiros_>
yes, defenstration seems adequate.
<Muz>
How is it this channel has edged closer towards going full-retard in little under 15 minutes.
<Muz>
It was all so nice and sensical before!
<Synthead>
apeiros_: I'm looking to have it "count" the hash keys. So { 'a' => 1, 'b' => 2, 'c' => 3 }.each_with_key { |key, value, i| puts "\##{i}: #{key}: #{value}" }, if it existed
<apeiros_>
Muz: you went silent. speak up and make it non-retard again.
<whoev>
throw a "map" in there while you're at it
<whoev>
actually, alias "map" to ꝎꝏꝎꝏ
<Muz>
apeiros_: the cycling on the McLympics is far too fascinating right now.
<apeiros_>
Synthead: again, there is no Array#each_with_key. I don't know what you're fantasizing there…
<apeiros_>
Synthead: you can do each_with_index, but that makes so little sense with a hash.
<fennec>
so according to http://www.ruby-doc.org/core-1.9.3/IO.html#method-c-popen, "If a block is given, Ruby will run the command as a child connected to Ruby with a pipe. Ruby’s end of the pipe will be passed as a parameter to the block. At the end of block, Ruby close the pipe and sets $?."
<fennec>
buuuuut I've been seeing $? of nil right after a popen block.
adamkittelson has joined #ruby
solussd has joined #ruby
chrismcg is now known as zz_chrismcg
<fennec>
does that sound legit? am I supposed to be waitpid()ing or anything if I actually want $?
apok has quit [Remote host closed the connection]
apok has joined #ruby
havenn has joined #ruby
future_chimp has quit [Quit: Leaving]
flip_digits has joined #ruby
conor_ireland has quit [Quit: conor_ireland]
geekbri has quit [Remote host closed the connection]
dv310p3r has joined #ruby
bluOxigen has quit []
Rajesh_ has quit [Max SendQ exceeded]
kenichi has quit [Remote host closed the connection]
TPFC-SYSTEM has joined #ruby
luwei has quit [Quit: 暂离]
kenichi has joined #ruby
Stalkr_ has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
echobravo has quit [Quit: Beware of programmers who carry screwdrivers.]
SegFaultAX|work2 has joined #ruby
macer1 has quit [Quit: No Ping reply in 180 seconds.]
jillsmitt_ has quit [Remote host closed the connection]
macer1 has joined #ruby
jorge has quit [Remote host closed the connection]
jorge has joined #ruby
<cassianoleal>
Sou|cutter: remember the problem I described earlier with webmock+vcr and basic_auth?
jillsmitt has joined #ruby
Ethan has quit [Ping timeout: 250 seconds]
dv310p3r has quit [Ping timeout: 264 seconds]
Eldariof-ru has joined #ruby
jillsmitt has quit [Remote host closed the connection]
qwerxy has quit [Read error: Operation timed out]
khakimov has joined #ruby
strg has quit [Ping timeout: 250 seconds]
JonghwanHyeon has quit [Remote host closed the connection]
jillsmitt has joined #ruby
JonghwanHyeon has joined #ruby
arturaz has joined #ruby
rakunHo has joined #ruby
JonghwanHyeon has quit [Remote host closed the connection]
dhaivatpandya has quit [Quit: dhaivatpandya]
fridim_ has quit [Ping timeout: 246 seconds]
andrewh has joined #ruby
JonghwanHyeon has joined #ruby
JonghwanHyeon has quit [Remote host closed the connection]
burgestrand has joined #ruby
havenn has quit [Remote host closed the connection]
ppawel has quit [Ping timeout: 246 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
yeggeps has quit [Read error: Connection reset by peer]
dhaivatpandya has joined #ruby
Morkel has quit [Quit: Morkel]
yeggeps has joined #ruby
rcassidy has quit [Quit: leaving]
TorpedoSkyline has joined #ruby
geekbri has joined #ruby
burgestrand has quit [Ping timeout: 244 seconds]
JonghwanHyeon has joined #ruby
JonghwanHyeon has quit [Remote host closed the connection]
Gab0 has joined #ruby
yeggeps has quit [Read error: Connection reset by peer]
yeggeps_ has joined #ruby
<cassianoleal>
so, I'm using VCR to record HTTP calls with basic_auth and then using a_request matcher from webmock to validate the requests
<cassianoleal>
I'm having a problem with that because apparently VCR records the basic_auth credentials in the URL (http://user:pass@some-url) instead of in the headers
Nowaker has quit [Ping timeout: 244 seconds]
<cassianoleal>
I captured the HTTP packets on the network interface to make sure that it wasn't something to do with httparty or Net::HTTP, but it's fine there
mneorr has quit [Quit: Leaving.]
36DABVV2S is now known as ForSpareParts
<cassianoleal>
is there anything I could do to either have VCR record the credentials as headers, or to have webmock ignore that and use the fqdn only?
jbw has quit [Ping timeout: 264 seconds]
<apeiros_>
sounds like a bug in VCR to me
ppawel has joined #ruby
Nowaker has joined #ruby
jarred has joined #ruby
<cassianoleal>
apeiros_: yeah, I have the same feeling
<cassianoleal>
might as well e-mail the author
mneorr has joined #ruby
<apeiros_>
I'd check the issues section on github first
<apeiros_>
and/or readme & api docs (maybe it's configurable)
Agis__ has quit [Ping timeout: 246 seconds]
<cassianoleal>
yeah, I checked those… couldn't find anything
<apeiros_>
then contact the author it is :)
kidoz has joined #ruby
maletor has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 246 seconds]
yeggeps_ has quit [Read error: Connection reset by peer]
fbernier has quit [Ping timeout: 246 seconds]
kidoz has quit [Client Quit]
maletor has joined #ruby
ppawel has quit [Ping timeout: 244 seconds]
naz has joined #ruby
yeggeps has joined #ruby
slux_ has quit [Remote host closed the connection]
rutkla has joined #ruby
jrajav has joined #ruby
<jrajav>
al2o3cr is going down for a bit
al2o3cr has quit [Remote host closed the connection]
blazes816 has quit [Quit: Leaving]
fourlastor has quit [Quit: Sto andando via]
bluenemo_ has joined #ruby
Agis__ has joined #ruby
bluenemo_ has quit [Read error: Connection reset by peer]
w0lverine has quit [Quit: w0lverine]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
<shevy>
Errno::ENOENT: No such file or directory - getcwd
<shevy>
s/started/where ruby's current working directory is
plynch has left #ruby ["Leaving"]
<Hanmac>
removing the current dir is bad in bashshell too
phinfonet has joined #ruby
<shevy>
hmm
<shevy>
let's test
<Hanmac>
its like cuting the branch where are you sittning on
<shevy>
well
<shevy>
the errors are different
<shevy>
:(
<shevy>
mkdir oh
<shevy>
mkdir: cannot create directory `oh': No such file or directory
mascool has joined #ruby
lkba has joined #ruby
<davidcelis>
worx 4 me
<shevy>
you removed the directory bash is in?
<shevy>
I mean the current working directory
<shevy>
not /bin :D
<shevy>
hmm what happens if /bin is removed ...
lorn has quit [Changing host]
lorn has joined #ruby
sevvie has quit [Quit: sevvie]
rakunHo has quit [Remote host closed the connection]
<shevy>
undefined method `<<' for #<Errno::ENOENT: No such file or directory - getcwd>
Ethan has joined #ruby
w400z has joined #ruby
flype has joined #ruby
jaylevitt has joined #ruby
w0lverine has joined #ruby
s0ber_ has joined #ruby
tdubz has joined #ruby
tdubz is now known as Guest64051
bluenemo_ has joined #ruby
bluenemo_ has quit [Read error: Connection reset by peer]
lupine_85 has quit [Excess Flood]
samsonjs has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
chichou has joined #ruby
My_Hearing has joined #ruby
s0ber has quit [Write error: Broken pipe]
Yuu-chan has joined #ruby
lupine_86 has joined #ruby
s0ber_ is now known as s0ber
elspeth_ has joined #ruby
pavelz has joined #ruby
Illiux has joined #ruby
d-best has joined #ruby
cout_ has joined #ruby
alexhanh has joined #ruby
Emmanuel_Chanel_ has joined #ruby
vaicine has joined #ruby
maletor has quit [Ping timeout: 264 seconds]
ekaleido has joined #ruby
Emmanuel_Chanel has quit [Excess Flood]
uxp_ has joined #ruby
phreax_ has joined #ruby
nobdrais1ntone has joined #ruby
chiel_ has joined #ruby
sprink_ has joined #ruby
matti_ has joined #ruby
flagg0205 has joined #ruby
davidcelis has quit [Read error: Connection reset by peer]
uris_ has joined #ruby
Yuu-chan has left #ruby [#ruby]
chriskk has joined #ruby
dhruvasa1ar has joined #ruby
Yuu-chan has joined #ruby
Aenigma has joined #ruby
Yuu-chan has left #ruby [#ruby]
deadSnow1an has joined #ruby
AwesomeG1rethMan has joined #ruby
thomas has quit [Killed (cameron.freenode.net (Nickname regained by services))]
Guest64051 is now known as thomas
iamtakin1iteasy has joined #ruby
davidcelis has joined #ruby
lupine_86 has quit [Changing host]
lupine_86 has joined #ruby
lupine_86 is now known as lupine_85
kevincolyar has left #ruby ["WeeChat 0.3.7"]
maletor has joined #ruby
havenn has quit [Remote host closed the connection]
dangerousdave has quit [Excess Flood]
Jay_Levitt has quit [Excess Flood]
jjbohn has quit [Excess Flood]
jprovazn_away has quit [Excess Flood]
klaas has quit [Excess Flood]
dangerousdave has joined #ruby
Jay_Levitt has joined #ruby
jjbohn has joined #ruby
jprovazn_away has joined #ruby
ppawel has joined #ruby
elspeth_ is now known as epseth
klaas has joined #ruby
faitswulff has joined #ruby
<faitswulff>
crap
sinful_ has joined #ruby
maletor has quit [Ping timeout: 246 seconds]
dekroning has quit [Quit: leaving]
dv_ has quit [Excess Flood]
Hien has quit [Remote host closed the connection]
vaicine_ has quit [Write error: Broken pipe]
ekaleido_ has quit [Write error: Broken pipe]
phreax has quit [Write error: Broken pipe]
pavelz_ has quit [Write error: Broken pipe]
Aenigma_ has quit [Write error: Broken pipe]
elspeth has quit [Write error: Broken pipe]
Illiux_ has quit [Write error: Broken pipe]
alexhanh_ has quit [Write error: Broken pipe]
flagg0204 has quit [Write error: Broken pipe]
iamtakingiteasy has quit [Write error: Broken pipe]
cout has quit [Write error: Broken pipe]
dhruvasagar has quit [Write error: Broken pipe]
nobdraisentone has quit [Write error: Broken pipe]
d-snp has quit [Write error: Broken pipe]
AwesomeGarethMan has quit [Write error: Broken pipe]
Mon_Ouie has quit [Write error: Broken pipe]
sinful has quit [Excess Flood]
sprink has quit [Remote host closed the connection]
FlyingFoX has quit [Excess Flood]
deadSnowman has quit [Remote host closed the connection]
ggreer has quit [Excess Flood]
dv__ has joined #ruby
eighty4 has quit [Ping timeout: 646 seconds]
zigidias has quit [Ping timeout: 646 seconds]
thomasfedb has quit [Ping timeout: 646 seconds]
gry has quit [Ping timeout: 826 seconds]
gianlucadv has quit [Ping timeout: 646 seconds]
vjt has quit [Remote host closed the connection]
Drakevr has quit [Remote host closed the connection]
uxp has quit [Remote host closed the connection]
chiel has quit [Remote host closed the connection]
matti has quit [Remote host closed the connection]
uris has quit [Remote host closed the connection]
matti_ is now known as matti
samsonjs has quit [Quit: lemur]
zigidias_ has joined #ruby
thomasfedb has joined #ruby
samsonjs has joined #ruby
epseth is now known as elspeth
locriani has quit [Remote host closed the connection]
rakunHo has joined #ruby
AngryParsley has joined #ruby
AngryParsley is now known as ggreer
ggreer has quit [Changing host]
ggreer has joined #ruby
FlyingFoX has joined #ruby
blazes816 has joined #ruby
maletor has joined #ruby
gianlucadv has joined #ruby
samsonjs has quit [Read error: Connection reset by peer]
Araxia has quit [Ping timeout: 257 seconds]
eighty4_ has joined #ruby
r1chelt has quit [Remote host closed the connection]
faitswulff has quit [Ping timeout: 245 seconds]
Drakevr has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
jjbohn is now known as jjbohn|afk
jasonLaster has quit [Remote host closed the connection]
jasonLaster has joined #ruby
aces1up has quit [Read error: Connection reset by peer]
aces23up has joined #ruby
tvw has quit [Remote host closed the connection]
Hien has joined #ruby
r1chelt has joined #ruby
r1chelt has quit [Changing host]
r1chelt has joined #ruby
aces23up has quit [Client Quit]
daniel_hinojosa has quit [Ping timeout: 246 seconds]
jasonLaster has quit [Read error: Operation timed out]
ph^_ has joined #ruby
Agis__ has quit [Quit: Agis__]
Araxia has joined #ruby
bgupta has quit [Quit: bgupta]
jjbohn|afk is now known as jjbohn
ph^ has quit [Ping timeout: 246 seconds]
berserkr has quit [Quit: Leaving.]
moted has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
Eldariof59-ru has joined #ruby
r1chelt has quit [Remote host closed the connection]
Eldariof-ru has quit [Read error: Operation timed out]
wargasm has quit [Read error: Connection reset by peer]
bontaq has joined #ruby
wargasm has joined #ruby
bluenemo has quit [Quit: Verlassend]
jasonLaster has joined #ruby
sinned has joined #ruby
moted has joined #ruby
<sinned>
hello! anybody used the em-http-server gem lately?
<sinned>
i am trying to get the sample code running, but something is wrong with the gem loading. i receive "uninitialized constant EventMachine::Http"
<sinned>
gems "eventmachine" and "event-http-server" are installed as rvm gem and bundler version. none of both ways seem to work correctly.
daniel_hinojosa has joined #ruby
gry has joined #ruby
Speed has joined #ruby
w400z has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
emmanuelux has quit [Ping timeout: 264 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
<jrajav>
Welp. I think al2o3cr will be gone for a bit, guys
<jrajav>
I'm reimplementing him but I can't work out all the quirks just yet
Gab0 has quit [Remote host closed the connection]
<jrajav>
And I'm out for the day
axl_ has quit [Read error: Connection reset by peer]
Gab0 has joined #ruby
axl_ has joined #ruby
cout_ is now known as cout
GoGoGarrett has quit [Remote host closed the connection]
jasonLaster has quit [Read error: Connection reset by peer]
adamkittelson has quit [Remote host closed the connection]
abra has quit [Ping timeout: 276 seconds]
Lachryma` has quit [Remote host closed the connection]
<skyjumper>
spoke too soon. seems [params[:modelname]].flatten will work
BrianJ_ has quit [Ping timeout: 250 seconds]
Axsuul has joined #ruby
elhu has joined #ruby
monkegjinni has joined #ruby
vandemar has quit [Ping timeout: 245 seconds]
minijupe has joined #ruby
ij has quit [Ping timeout: 246 seconds]
atrika has joined #ruby
<atrika>
hey guys, in which situation should I use ruby over python ?
jrist-afk is now known as jrist
Eldariof59-ru has quit [Remote host closed the connection]
mwilson_ has quit [Excess Flood]
<Hanmac>
atrika in every :P
davidcelis has joined #ruby
mwilson_ has joined #ruby
havenn has quit [Remote host closed the connection]
mmokrysz has quit [Quit: Leaving.]
<arturaz>
atrika, depends on your preferences
<arturaz>
python has some math libs that ruby does not
<arturaz>
ruby probably has some libs that python does not
<arturaz>
one way or another, it's personal preference
<arturaz>
however jruby is fairly mature and has real threads, if you need those
<atrika>
is ruby better than python at anything or are they pretty much the same ?
chimkan_ has joined #ruby
<arturaz>
atrika, I'd say they're very comparable
Eldariof-ru has joined #ruby
<arturaz>
python doesn't have anonymous functions except lambda expressions
vandemar has joined #ruby
<arturaz>
but the difference mostly lies in stle
<arturaz>
style*
<atrika>
does ruby have good libraries for SDL and gui programming ?
deryl has joined #ruby
SegFaultAX has quit [Ping timeout: 240 seconds]
<asteve>
i read that as "python has some meth labs"
<asteve>
too much breaking bad
My_Hearing is now known as Mon_Ouie
vlad_starkov has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
<workmad3>
asteve: python is good for meth now? :)
<Mon_Ouie>
atrika: I've been using Qt in Ruby lately and it works fine (well, some people seem to have troubles installing it)
SegFaultAX has joined #ruby
mneorr has joined #ruby
laen__ is now known as laen_
headius_ has joined #ruby
headius has quit [Disconnected by services]
headius_ is now known as headius
ij has joined #ruby
<Mon_Ouie>
As for SDL-related stuff, there's a direct binding for it, but I'd rather recommend Gosu (or my own library — Ray — but I haven't touched it in a while)
adamkittelson has joined #ruby
jrajav has quit [Quit: The best darkness is strange and surprising]
croz has quit [Read error: Operation timed out]
SegFaultAX has quit [Read error: Operation timed out]
TomRone has quit [Ping timeout: 245 seconds]
monkegjinni has quit [Remote host closed the connection]
slux has quit [Ping timeout: 250 seconds]
axl_ has quit [Read error: Connection reset by peer]
nyuszika7h is now known as \n
<atrika>
is gosu better than pygame ?
axl_ has joined #ruby
<atrika>
it looks less mature
Guest42577 is now known as ged
SegFaultAX has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
chitradeep has quit [Quit: chitradeep]
<ged>
atrika: I'm curious: what metric are you using to determine relative maturity?
<atrika>
honestly, the apparence of the website
strg has joined #ruby
cascalheira has joined #ruby
<blazes816>
that sounds fair
<Mon_Ouie>
I don't think so, but anyway what's wrong with it?
<ged>
Interesting.
davidcelis has quit [Ping timeout: 246 seconds]
<Mon_Ouie>
(On a sidenote, I really don't like those shades of green all over pygame's website)
<atrika>
anyone here worked with both ?
<atrika>
the pygame website is ugly, but there seems to be tons of project, documentation and tutorials
<Mon_Ouie>
#gosu does have an IRC channel where you could ask your question
pxjorge has joined #ruby
wargasm has joined #ruby
<atrika>
okay, ill ask em
stephenjudkins has quit [Quit: stephenjudkins]
davidcelis has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
wargasm has joined #ruby
johnlcox has quit [Ping timeout: 246 seconds]
Hanmac has quit [Ping timeout: 272 seconds]
wallerdev has joined #ruby
bontaq has quit [Read error: Connection reset by peer]
johnlcox has joined #ruby
kirun has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
ringotwo has quit [Read error: Connection reset by peer]
voodoofish4301 has joined #ruby
ringotwo has joined #ruby
r1chelt has joined #ruby
r1chelt has quit [Changing host]
r1chelt has joined #ruby
voodoofish430 has quit [Ping timeout: 250 seconds]
ken_barber has quit [Ping timeout: 246 seconds]
r1chelt has quit [Remote host closed the connection]
<arturaz>
atrika, I'd advise you against using an intepreted language in game development
<arturaz>
Take Java/Scala/Mono instead
jjbohn is now known as jjbohn|lunch
<atrika>
isnt java interpreted ?
whitedawg1 has joined #ruby
<arturaz>
not really, its JIT compiled
<atrika>
and isn't python also compiled ?
<arturaz>
python is sort of compiled into intermediary representation
<arturaz>
the problem is that java virtual machine is far superior and faster than one in python
<Mon_Ouie>
Called bytecode. But that's like any recent programming language.
<Mon_Ouie>
Some like Java also generate native code at runtime; There are implementations of booth Python and Ruby that use the same technique (respectively Pypy and Rubinius)
Gab0 has quit [Remote host closed the connection]
<Spooner>
arturaz : I am not sure that interpreted matters. Certainly, the CRuby garbage collection is not game-friendly, but there is no problem at all with writing games in it other than that.
Gab0 has joined #ruby
<arturaz>
Spooner, well, as long as you don't hit cpu bottleneck :)
whitedawg has quit [Ping timeout: 244 seconds]
<arturaz>
or need threads for that matter
ken_barber has joined #ruby
<Spooner>
Yes, but that is an issue of requirements, not a real limit. If you want to write a AAA 3D game, you have to do it in C++ with probably some dropping into assembler for your bottlenecks. If you want to make a simple 2D game, then there isn't an issue with Ruby.
macer1 has quit [Changing host]
macer1 has joined #ruby
<arturaz>
true
<arturaz>
However I was truly amazed how smooth Bastion was :)
<Spooner>
e.g. Unity of Command is 100% Python.
<Spooner>
Isn't that XNA?
<Spooner>
with C#?
<arturaz>
indeed
<arturaz>
and ported to mono and monoxna
<Spooner>
You could write that in Ruby :D
SegFaultAX has quit [Ping timeout: 240 seconds]
Eldariof-ru has quit []
Hanmac has joined #ruby
<arturaz>
You could. I wouldn't bet on performance though :)
fennec has quit [Quit: Leaving]
<Spooner>
I don't know. You could drop to C where it mattered. After all, most Ruby is just calling C stuff (like Gosu or Chipmunk or whatever else). Just depends how much of your engine you could write in C (or rather was already written/wrapped) and how much in Ruby.
lurch007 has joined #ruby
<arturaz>
Spooner, what's exactly the point of writing ruby then? :) And why not take, erm, lets say, scala?
<Spooner>
You write in C++ without using libraries?
<Spooner>
So why is there a difference between using C/C++ libraries from Ruby?
<codora>
arturaz: would you write scale as a replacement for C?
<codora>
*scala
<codora>
i'm confused.
greenysan has joined #ruby
<arturaz>
Spooner, I write Ruby using Ruby libraries. I don't write Ruby and then write C libraries myself.
<arturaz>
codora, scala is statically typed and runs on jvm. Pretty fast.
<codora>
jvm? so a java technology?
<Spooner>
Sorry, I didn't mean writing your own C libraries (though I did mention that, it was not the point I was trying to make).
<codora>
interesting.
davidcelis has quit [Ping timeout: 265 seconds]
u_u has quit [Ping timeout: 246 seconds]
SegFaultAX has joined #ruby
<Hanmac>
codora did you heard about wxwidgets or CEGUI or OGRE? all of them could be ported to ruby
<codora>
Spooner: you know what would be cool? a full ruby desktop, with C for the low level stuff, like kernel and hardware acceleration, but otherwise pure ruby for all application and gui layer stuff.
<codora>
Hanmac: i have.
<codora>
wxruby exists.
<codora>
cegui and ogre i have only heard about
<codora>
googling.
davidcelis has joined #ruby
<Hanmac>
wxruby is rubbish
<Spooner>
arturaz : What I was meaning is that a significant number of Ruby libraries, not just games, are written in C (or are wrappers around C/C++ code). Sometimes people seem to get into the idea that using C to do the work for you isn't the Ruby way.
<arturaz>
codora, there's still one big problem. Duck typing is slow :)
<arturaz>
especially in ruby way
<arturaz>
a + b needs a lot more operations than it would on java/scala
<codora>
arturaz: that may be, but hardware is getting faster and faster, and the need to babysit the metal is less and less the more cores and more hardware acceleration we throw in there.
dv310p3r has quit [Quit: Leaving]
<codora>
just how bad is duck typing? why is scala/java so much better to code in?
<arturaz>
codora, yeah, thats all nice and everything, but I've cut parsing time in one app from 3 days into 1 hour by rewriting the code from jruby into scala.
<codora>
wait, isnt java nonfree?
<arturaz>
codora, check out openjdk :)
<arturaz>
and duck typing, well...
<arturaz>
a + b. What is a? What is b? What + in this context means?
<bperry>
you could use C# and mono :)
<codora>
i was told that the vast majority of tools in java are not covered in icedtea and openjdk. i was also told that java7 does not exist in open source.
<codora>
bperry: yes, because C# and mono is so great :P
<arturaz>
codora, openjdk7 and oracle jvm 7 is basically the same thing :)
<bperry>
totally is
<Spooner>
arturaz : But if you had 3 days with nothing better to do, then that optimisation was pointless. Same if you want a 2D game with a dozen sprites moving around. Why write that in C (6000fps) when you can do it in Ruby (60fps). Human eye can't tell the difference.
<arturaz>
just with different branding
<arturaz>
Spooner, I do not object :)
TomRone has joined #ruby
<Spooner>
In fact, the great thing about coding in faster languages is that they allow you to be crap and get away with it :D In Ruby, you have to know what you are doing to get a workable FPS :P
<arturaz>
Although I find I can write scala code as fast as ruby.
xaq has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
<codora>
hey Spooner, can ruby compile ahead of time, or do options only exist for just in time compilation? yes i know ruby is an interpreted language, but is it possible to compile it ahead of time?
xaq has joined #ruby
<Hanmac>
arturaz & Spooner: thats why i write bindings ... the power of C combined with the flexable of Ruby
<codora>
Hanmac: bindings are nice.
<codora>
it means i dont have to write any damned C code.
<Hanmac>
only swig is shit
<arturaz>
codora, AFAIK ruby cannot do that.
<Spooner>
codora : Nope, we can't do that (Ruby 2.0 hopefully allows that though).
phinfonet has quit [Quit: phinfonet]
<codora>
ruby 2.0? we're already evolving that fast?
<codora>
it would be nice to have rbc like in python
yoklov has joined #ruby
<Spooner>
codora : However, I am talking only about CRuby. JRuby and Rubinius both offer pre-compilation (At least to byte code).
mockra has joined #ruby
qwerxy has joined #ruby
<Mon_Ouie>
"already" is kind of funny nearly 5 years after 1.9.0 came out
<Spooner>
Ruby 2.0 is being worked on. Anyone know how well that is going on?
vjt has joined #ruby
<Spooner>
Yeah, but barely anyone used 1.9.1 and even now with 1.9.3 there is a lot of resistance to moving from something that "works" (1.8.6/7).
mockra has quit [Remote host closed the connection]
<eam>
Spooner: it's been "being worked on" for about a decade now
<Spooner>
eam Oh, fair enough.
Ethan has quit [Ping timeout: 240 seconds]
<Spooner>
Still mark and sweep though, I hear, so not very game friendly, regardless of pre-compilation to bytecode. Oh well.
<codora>
Spooner: it would be a massive performance gain to precompile ruby to *.rbc assembly after running ruby code once. subsequent executions would be a lot faster without having to write C.
<codora>
what's mark and sweep?
khakimov has joined #ruby
<Mon_Ouie>
eam: Not quite. Before, the next release was never marked as being 2.0.
<codora>
i used sbcl for a bit, and it ran really fast, comparable to C++ equivalent code, after running it twice.
chriskk has quit [Quit: chriskk]
<Spooner>
It is the type of garbage collection. It halts everything every few seconds, which is fine for anything except real-time apps :)
<codora>
D:
<headius>
the move to 1.9.x has accelerated a lot…I'd be surprised if a majority of users weren't on 1.9.x by now
jan0232 has joined #ruby
<codora>
would it be possible to switch garbage collection types this late in development?
<codora>
to where maybe garbage collection could run in seperate threads?
<Mon_Ouie>
codora: Notice there are tons of variants of mark and sweep algorithms
<eam>
headius: no way, 1.9 isn't a default system ruby in nearly any distro
<codora>
Mon_Ouie: i know nothing about garbage collection.
apok_ has joined #ruby
<headius>
the limitation is not as much getting a new GC in but making it compatible with MRI's over-invasive C API
<arturaz>
codora, jruby can switch gc's (due to jvm)
<jan0232>
does anybody know a library that can fetch websites? i mean entirely…all needed images, stylesheets, referenced resources within stylesheets etc.?
<codora>
arturaz: yeah, but if you are using jruby, why not just write scala? like you want?
emmanuelux has joined #ruby
<headius>
MRI will never be able to do compacting GC, which rules out almost all the best systems
Goles has joined #ruby
<arturaz>
codora, ruby libs? Perhaps you don't like static typing :)
<codora>
headius: there is still rubinius.
<codora>
arturaz: i am NOT a fan of static typing.
<jan0232>
or what could help me implement that?? could probably be done with nokogiri??
<arturaz>
well, i wasn't either, until scla :)
SegFaultAX has quit [Ping timeout: 248 seconds]
<codora>
i learned java. i hated every second of it.
<eam>
how can you dislike static typing?
bricker88 has joined #ruby
<codora>
having to declare every variable.
<headius>
rubinius definitely brings a better GC to the table, but it's still nowhere near the JVM and arguably still pretty immature
<codora>
headius: maybe rubinious or a similar alternative vm would make it better?
<arturaz>
codora, scala is rather a different beast :)
<eam>
codora: static typing has nothing to do with variable declaration
<headius>
not to slam rubinius or anything…it's just hard to shake out real-world user issues when you haven't had a release in over a year
u_u has joined #ruby
<codora>
eam: fair enough.
<codora>
brb.
apok has quit [Ping timeout: 246 seconds]
apok_ is now known as apok
<headius>
"just use master" is a pretty poor way to stabilize a project
SegFaultAX has joined #ruby
powerplay has joined #ruby
<bricker88>
When comparing two arrays with &, does it always go in the order of the first array? I hope that makes sense.
stephenjudkins has joined #ruby
<bricker88>
[1, 2, 3] & [3, 1, 2] will *always* return [1,2,3], or is that not reliable?
<powerplay>
hey everyone, im looking for a gem that simply makes basic http requests (GET and POST) with the best performance. Any suggestions? I did research and ppl are suggesting curl or patron..
SneakySeal has joined #ruby
<SneakySeal>
hi
tomeo has joined #ruby
<tomeo>
hi
<SneakySeal>
why wud some1 store rss feeds in db
<SneakySeal>
this is for a new site im working on
<SneakySeal>
that some idiot built
dv__ has quit [Quit: No Ping reply in 180 seconds.]
dv_ has joined #ruby
cassianoleal has quit [Quit: Leaving.]
<tomeo>
Could someone please help me with how to grab certain fields from a list and return them as a new array? It'd be like this in python [(h.email, h.id) for h in Handler.all]
khakimov has quit [Quit: Computer has gone to sleep.]
fn0rd has joined #ruby
<arturaz>
list.map { |i| [i.email, i.id] }
<Mon_Ouie>
bricker88: It's not documented so it's not reliable. In MRI 1.9, where it is implemented by generating a hash and where hashes respect insertion order, I guess it will work
johnlcox has quit [Remote host closed the connection]
PerfM has joined #ruby
zeen has quit [Ping timeout: 250 seconds]
<PerfM>
YEAH
<PerfM>
Hi frendz
<PerfM>
where dem hoes @
<Spooner>
bricker88: ([1, 2, 3] & [3, 1, 2]).sort will *always* return [1,2,3], if you are paranoid.
<SneakySeal>
lol
<SneakySeal>
dun sai dat
<tomeo>
arturaz: thanks!
havenn has joined #ruby
<eam>
Mon_Ouie: it hashes the right hand side enumerable though, right?
<arturaz>
tomeo, np :)
elhu has quit [Quit: Computer has gone to sleep.]
<PerfM>
SneakySeal, let's be bfffs k
<PerfM>
bffs for everyone
arturaz has quit [Remote host closed the connection]
<eam>
and iterate the LHS -- though if it's undocumented the implementation doesn't matter much
pu22l3r has quit [Ping timeout: 272 seconds]
answer_42 has quit [Quit: WeeChat 0.3.8]
<bricker88>
Spooner: Mon_Ouie Thanks!
Ethan has joined #ruby
jjbohn|lunch is now known as back
<PerfM>
I have the blues clues song stuck in my head
back is now known as jjbohn
<PerfM>
da fuk, rite
<Mon_Ouie>
Ah, well it seems to push new elements in a third array as it iterates over the first one
apok has quit [Remote host closed the connection]
apok has joined #ruby
<fn0rd>
Does Zed Shaw come here?
<PerfM>
YEAH
<SneakySeal>
omg get outa hear gaize
johnlcox has joined #ruby
<PerfM>
me 2
PerfM has quit []
<SneakySeal>
this is a no LOL zone
<SneakySeal>
srs
<Mon_Ouie>
Oh, he actually left.
indstry has joined #ruby
<davidcelis>
Well, one of them, anyway
workmad3 has joined #ruby
<Mon_Ouie>
That one didn't seem to be here just to troll at least
macer1 has quit [Ping timeout: 250 seconds]
<davidcelis>
SneakySeal: When you say store RSS feeds... Do you mean URLs to the feeds, or they're storing entire XML documents from those feeds?
jrist is now known as jrist-mtg
<SneakySeal>
the data
<SneakySeal>
also saving the images in the rss feeds
<davidcelis>
sounds dum
<SneakySeal>
and its creating a giant, already 6gb images folder
<SneakySeal>
ive never seen any1 do this bolney
<SneakySeal>
baloney
<davidcelis>
balogna
<SneakySeal>
and also thinking that it kindof defeats teh purpose of rss
<SneakySeal>
wat u think?
elhu has joined #ruby
<Spooner>
Maybe the original dev was trying to back up the Internet, knowing that Skynet will soon take over and delete all the good bits?
<TorpedoSkyline>
davidcelis, I never understood the spelling of "balogna". It's proof that English is a terrible language.
<havenn>
TorpedoSkyline: I think you're thinking 'baloney'.
<virunga>
The italian word is Bologna
<eam>
workmad3: yes but bologna is italian
<virunga>
not Balogna
<TorpedoSkyline>
XD
<eam>
as is the meat
bgupta has joined #ruby
<davidcelis>
GUYS.
<davidcelis>
#balogna
<virunga>
Bologna
<workmad3>
eam: yeah, but that's bologna, not balogna ;)
<TorpedoSkyline>
Maybe it was an English insult fail, but at this point with all the contention I have no idea.
<davidcelis>
Take this shit to #balogna
<eam>
workmad3: right, TorpedoSkyline misspelled it
<workmad3>
eam: also, looks like bologna is american
workmad3 has quit [Quit: Lost terminal]
<TorpedoSkyline>
eam, davidcelis misspelled it.
geekbri has quit [Remote host closed the connection]
<TorpedoSkyline>
[15:55:24] <davidcelis> balogna
<smw_work>
hi all, can anyone help me with this small piece of code? I am very new to ruby. http://fpaste.org/oVd0/ . The goal of this program is to run a command that returns json, parse and create an array of installed packages, then see if a certain package is installed.
workmad3 has joined #ruby
<davidcelis>
I didn't misspell shit!
headius has quit [Quit: headius]
<davidcelis>
Balogna is a place in France.
<eam>
americans spell it "baloney"
<workmad3>
d'oh, killed irssi instead of pasting linke
johnlcox has quit [Remote host closed the connection]
<virunga>
workmad3: it's common thought that the bologna is made mainly near Bologna
bothra2 has quit [Ping timeout: 245 seconds]
<virunga>
maybe it's wrong
<havenn>
salami > balogna
<virunga>
im talking about Italians
<davidcelis>
does ruby have lazy lists and lots of monads
rodj has joined #ruby
<workmad3>
virunga: the references also point out that bologna (the american stuff) is finely ground and sometimes even made out of turkey and chicken
<workmad3>
virunga: as opposed to to mortadella, which is always pork and contains larger lumps of lard
<davidcelis>
nvm u guise r weird im just gunna go write my own lang
strg has quit [Quit: strg]
<virunga>
workmad3: ah ok. To us they are the same thing
hynkle has quit [Quit: Computer has gone to sleep.]
<havenn>
It is odd how a lot of people don't realize that #ruby is for EW's reality-based TV show about Ruby Gettinger's battle with weight loss. #ruby-lang is for the programming language...
<workmad3>
virunga: 'us' as in americans, or 'us' as in italians?
<SneakySeal>
no but srsly
<havenn>
so, back to nutritional value of salami..
<SneakySeal>
y was he saving the feeds
<SneakySeal>
he runs a cronjob
<virunga>
workmad3: italians
<SneakySeal>
every 12 mins and saves the feeds
aldodelgado has quit [Quit: aldodelgado]
<SneakySeal>
then the site jus displays them from db
<SneakySeal>
wtf?
<workmad3>
virunga: ah, could just be that what americans call mortadella you call bologna :)
wargasm has quit [Read error: Connection reset by peer]
faen has joined #ruby
<davidcelis>
virunga: ಠ_ಠ
<asteve>
ಠ_ಠ
<asteve>
reddit!
kn330 has quit [Read error: Connection reset by peer]
<havenn>
(╯°□°)╯
kn330 has joined #ruby
xaq has quit [Read error: Connection reset by peer]
jonathanwallace has quit [Remote host closed the connection]
xaq has joined #ruby
techsurvivor has joined #ruby
<davidcelis>
(╯ಠ_ಠ)╯
smw_work has quit [Read error: Connection reset by peer]
fforbeck has quit [Quit: Leaving]
<virunga>
isn't an american here?
<virunga>
isn't there an american here?
<davidcelis>
Yes, I am American
<davidcelis>
You want American, I am American
<virunga>
hi
<davidcelis>
hi
<virunga>
:)
<havenn>
ლ(ಠ益ಠლ) Y U NO AMERICAN?
<virunga>
davidcelis: can i ask where do you live?
workmad3 has quit [Ping timeout: 244 seconds]
<davidcelis>
Portland
<virunga>
davidcelis: are you following the olimpics? Yesterday you kick us out of the olimpics in two sports :(
krz has joined #ruby
<davidcelis>
Who is "us"
<virunga>
Italy
mbriggs has joined #ruby
<virunga>
beach volley and swiming volley
ilyam has joined #ruby
<davidcelis>
I haven't really been watching, but lol
ppawel has joined #ruby
<virunga>
:)
<virunga>
davidboy: is it raining there?
<virunga>
hihihi
<davidcelis>
No it's summer
sent-hil has joined #ruby
jrist-mtg is now known as jrist
cantonic has joined #ruby
<sent-hil>
how do I include search in a macruby app? i'm assuming some kind of basic search plugin exists
<virunga>
davidboy: a serious question: what do you think about the spread of guns in America?
<davidcelis>
there's a gun problem in america?
<davidcelis>
shit, i should get a gun
<virunga>
yep
<virunga>
it's a "circolo vizioso"
<virunga>
i don't know how say it in english
<davidcelis>
vicious circle
<virunga>
right
<virunga>
thankis
<Hanmac>
"another child shot itself with a gun" ... i read this news more than i could count ... and it seems allways be in america ...
<eam>
it's not a vicious circle; there are plenty of countries with widespread gun ownership and little violence
<eam>
America has a mental health crisis, not a gun crisis
<davidcelis>
sarcasm is a thing
<eam>
it's a health care problem
<infinitiguy>
Guns make it easy for people with mental health issues to cause chaos
tatsuya__ has joined #ruby
<eam>
davidcelis: I was addressing both of you
<Hanmac>
the "gun" problem could be some evil kind of "natural selection"
alfism has joined #ruby
<davidcelis>
social selection
<davidcelis>
FTFY
<eam>
infinitiguy: common misconception
<virunga>
where there are less guns there are less crimes
<infinitiguy>
if all that was available were machete's - it would be tougher to massacre a bunch of people
<virunga>
and people live better
<eam>
infinitiguy: not true
<eam>
rampage killers with the greatest murders have not used guns
<eam>
they used fire, and large buildings
<infinitiguy>
tougher - both for logistical reasons (close combat) and for mental reasons - hacking someone to bits is harder on the brain than pulling a trigger from far away
sent-hil has quit [Remote host closed the connection]
<Hanmac>
infinitiguy: the problem is: even if you say someone that you have "mental issues" and that you need help, you will be ignored
tatsuya_o has quit [Ping timeout: 246 seconds]
<eam>
infinitiguy: pouring gasoline in a basement and lighting a match will kill more people, hands down
scriabin_ has quit [Quit: leaving]
<davidcelis>
man what's up with this channel today
<eam>
wikipedia has a great list detailing this information
<davidcelis>
can we go back to talking about bologna?
<infinitiguy>
true - but gasoline is something that is a daily need
<eam>
as are guns
<infinitiguy>
we need guns?
<davidcelis>
plenty of people prove that guns aren't a "need"
<eam>
and if you disagree, disarm your police force and see how far you get
<infinitiguy>
as civilians?
baroquebobcat has joined #ruby
<infinitiguy>
I don't see the british around
<havenn>
I saw a dog running around a puddle of gas, round and round in a parking lot. Eventually he fell over.
<havenn>
Out of gas...
<eam>
police are civilians
<infinitiguy>
police are government employees
<infinitiguy>
I'm a civilian
<Hanmac>
in my country the normal police dont have guns ...
<eam>
infinitiguy: so am I, and so is any non-military personell
<virunga>
state not govern
<virunga>
:P
<infinitiguy>
as a system engineer - I don't need a gun.
<eam>
you in particular do not, we as a society do
yxhuvud has quit [Ping timeout: 264 seconds]
<Spooner>
Our police have guns in airports and in armed response vans. Don't generally use anything more than batons and pepper spray though. We get by fine, thanks (UK).
<infinitiguy>
why? Is it to protect against martial law?
<Hanmac>
infinitiguy: you have a root console ... its more mighty than a gun :P
vandemar has quit [Ping timeout: 240 seconds]
<eam>
infinitiguy: it is to protect civil rights. The premise of the Second Amendment is that the power to police and defend ought to be shared between local law enforcement and the people they govern
<Spooner>
Americans started off needing guns to overthrow unlawful governments, but that is largely forgotten nowadays.
<davidcelis>
What society NEEDS is bologna
ph^_ has quit [Remote host closed the connection]
<davidcelis>
Fact.
<infinitiguy>
@spooner - exactly
ken_barber has quit [Remote host closed the connection]
<eam>
if you look at American history you will see a repeated pattern of American authorities discriminating (and failing to protect) various minority classes
<eam>
this is why sharing this power with regular citizens is so important
ken_barber has joined #ruby
r1chelt has joined #ruby
<eam>
add to this, in the US the police are under no obligation to protect citizens
<virunga>
davidcelis: is there only the software engineer or there's also the informatic in America?
<Spooner>
It is good to know that the Civil Rights movement was primarily one of armed civilians against a state.
<shevy>
guns never worked against "unlawful" governments. just make laws that protect the powers to be and everything is fine :P
<davidcelis>
informatic?
<eam>
Spooner: I know you're joking, but you don't realize you're right
<virunga>
davidcelis: in Italy they are two distinct degree
korczis has quit [Remote host closed the connection]
<eam>
the riots going on as context behind King's movement were crucial
<shevy>
virunga in which town do you live again btw?
<Spooner>
eam I was joking and I don't realise I'm right.
<eam>
Spooner: well you are, like it or not. Study up
<virunga>
shevy: Milano
<davidcelis>
virunga: We have Computer Science, Computer Engineering, Informatics, and a lot of other specialty degrees
<Spooner>
I haven't worked in 10 years and have never earned > $12/hour. The education bit is true and the area largely is, but that is mainly because I live in the UK outside the center of a major city (which isn't 100% about wealth).
<Spooner>
I can't imagine I'd choose to own a gun, wherever I lived though. This world-view is just as ingrained into me just as yours in in you, I'm sure.
thone_ has quit [Ping timeout: 246 seconds]
<virunga>
shevy: i was thinking the same thing today. Towns and cities with rivers are more beautiful
<shevy>
the USA is gun nut
<codora>
Spooner: i was raised in texas. disarming the population is enslaving them.
Resure has joined #ruby
<eam>
that's more or less my point. You and I have more effective means at our disposal
sent-hil has left #ruby [#ruby]
<havenn>
Ruby, you'll shoot your eye out...
<shevy>
would be nice
<shevy>
I'd duel ... all of you
<TorpedoSkyline>
+1 codora
wargasm has joined #ruby
<codora>
eam: i wish they law allowed the general public to own modern military-grade automatic rifles. i'd buy those in a hot second.
<eam>
just keep in mind, you might have a different opinion if you were a black gay muslim living in Alabama. The 2nd Amendment exists to give those people equal access to the same power local police leverage to protect us all
<virunga>
think that there are place where policemen have not guns :O
<codora>
*the law
joshman_ has quit [Read error: Operation timed out]
skrewler has joined #ruby
<shevy>
once they all have nukes they will feel super secure
<eam>
Spooner: you may also want to keep an eye on the direction your country is going after having banned guns
<eam>
Spooner: I do know your violent crime hasn't really changed
<shevy>
social tension leads to more crime
vandemar has joined #ruby
<eam>
Spooner: and I've seen some scary things on film re: your recent student protests
<virunga>
like Totenam riots
baroquebobcat has quit [Ping timeout: 245 seconds]
Ethan has quit [Ping timeout: 246 seconds]
<eam>
your country no longer has a check and balance against the abuse of police power
<eam>
the problem of police violence against minorities is a thousand times larger than shootings by mentally ill people
<virunga>
eam: what country?
GoGoGarrett has quit [Remote host closed the connection]
<eam>
virunga: UK
<eam>
the difference is a crazy person gets on TV for a week -- but police violence against minorities is covered up
mwilson_ has quit [Excess Flood]
Foxandxss has joined #ruby
ylluminate has joined #ruby
<Spooner>
Er, we didn't "ban guns". All we did was ban handguns, which we never had a ingrained belief in owning,which is a bit different. The Issue is that if we hadn't would the crime be more or less than now. If more, then it was good. If the same, then no problem with removing guns that had no effect other than being a possibility of accident. If we are worse off now, _because we banned handguns_, then I'd like to hear proof.
linoj_ has joined #ruby
mwilson_ has joined #ruby
und3f has quit [Quit: Leaving.]
<Hanmac>
eam or there is a gang that kills minorities, and the covernment deletes all documents about the gang ...
<havenn>
Hanmac: That gang is called 'police'. Hate that gang!
banisterfiend has quit [Read error: Connection reset by peer]
havenn has quit [Remote host closed the connection]
tty01 has left #ruby [#ruby]
SCommette has quit [Quit: SCommette]
<Spooner>
eam _we never had this check in the first place_. Barely anyone owned handguns before. People who owned rifles and shotguns were very rare (farmers and toffs really).
<eam>
Hanmac: well, the majority of gun homicide in america is suicide (about 51%) After that, it's almost entirely drug related gang violence
mwilson_ has quit [Excess Flood]
<codora>
the check and balance against police is having bigger guns than the police.
<eam>
the number of people killed in rampage shootings is statistically insignificant
SCommette has joined #ruby
hunglin has joined #ruby
<Hanmac>
eam google "NSU germany" that what i meaned
mwilson_ has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
havenn has joined #ruby
<eam>
but then you get these knee-jerk crazies who want to ban guns because they're terrible at math
jan0232 has left #ruby [#ruby]
<eam>
and they have the gall to call everyone else crazy :)
linoj has quit [Ping timeout: 240 seconds]
<eam>
Hanmac: oh, I agree
w400z has quit [Quit: Computer has gone to sleep.]
sailias has joined #ruby
dpk has joined #ruby
baphled has quit [Ping timeout: 246 seconds]
linoj_ has quit [Ping timeout: 252 seconds]
w400z has joined #ruby
<codora>
eam: yeah, that really bothers me.
banisterfiend has joined #ruby
asteve has quit []
<Hanmac>
eam an gang that kills minorities is bad enougth, but when they get "protected" by the police then it gets worse
kn330 has quit [Ping timeout: 255 seconds]
<codora>
Hanmac: so in germany, the gangs that kill minorities are protected by police?
jonathanwallace has joined #ruby
<Hanmac>
codora not by the police direcly but on higher goverment groups
r1chelt has quit []
<codora>
Hanmac: i see.
<havenn>
Hanmac: We just call those gangs 'police' to legitimize the endeavor.
dhruvasa1ar has quit [Ping timeout: 250 seconds]
havenn has quit [Remote host closed the connection]
<codora>
htHanmac: that's pretty bad.
<codora>
*Hanmac
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
chichou has joined #ruby
<Hanmac>
havenn: the NSU group killed itself "by accident" after arounded by police ... and in the same moment the documents about the group get shredderd
luckyruby has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
<codora>
Hanmac: wow, that's... really obviously suspicious. do they really think no one would notice?
maletor has quit [Ping timeout: 250 seconds]
<virunga>
Is there any Spanish here? We're kicking your asses ahahahah
maletor has joined #ruby
<virunga>
WON!!
nwest has quit [Quit: Computer has gone to sleep.]
kenichi has quit [Remote host closed the connection]
wereHamster has quit [Quit: Lost terminal]
yoklov has quit [Quit: computer sleeping]
asobrasil has left #ruby [#ruby]
jonathanwallace has joined #ruby
internet_user has quit [Remote host closed the connection]
hadees has quit [Quit: hadees]
alfism has quit [Quit: alfism]
balki_ has joined #ruby
alanp_ has joined #ruby
<Hanmac>
codora we have something called "Verfassungsschutz" that should protected our "Basic law" ... but it seems that this org is infected by conservative-radical forces ...
balki has quit [Ping timeout: 240 seconds]
alanp has quit [Ping timeout: 240 seconds]
<codora>
Hanmac: someone needs to shoot them.
krusty_ar has quit [Remote host closed the connection]
kn330 has quit [Ping timeout: 265 seconds]
<Hanmac>
another sample: one of our radical "parties" couldnt be banned because of to much agents inside the party
<blazes816>
Hanmac: on what grounds should they have been banned?
kn330 has joined #ruby
kenichi has joined #ruby
kn330 has quit [Read error: Connection reset by peer]
whitedawg1 has quit [Ping timeout: 248 seconds]
lurch_ has joined #ruby
<Hanmac>
its a party similar to nazis ... (and we germans have a problem with nazis)
<shevy>
pffft
<blazes816>
lol, I understand that
theRoUS has quit [Ping timeout: 246 seconds]
<shevy>
british nazis are worse, they can really slug
apok_ has joined #ruby
SCommette has quit [Quit: SCommette]
<blazes816>
i'm glad i live in the US away from crazy fascists
<Hanmac>
yeah something similar to them and we try to get rib of them but we cant because there are to much agents inside the party :/ (we cant ban the party without sacrefice them)
SCommette has joined #ruby
<shevy>
(at least those guys who recieved the taxpayer money)
kn330 has joined #ruby
<TorpedoSkyline>
Hanmac, Germany still has Nazis?
<TorpedoSkyline>
blazes816 lol
ricogallo has quit [Remote host closed the connection]
<TorpedoSkyline>
That was sarcasm, right?
mfcabrera_ has quit [Quit: This computer has gone to sleep]
mengu has joined #ruby
<shevy>
blazes816, they used taxpayer money to infiltrate that political party, then tried to get it banned, but they were also involved in criminal activities on their own all the time, so the reason for banishment was tainted
<blazes816>
that's fucked up
u_u has quit [Ping timeout: 252 seconds]
bbttxu has quit [Quit: bbttxu]
lurch007 has quit [Ping timeout: 268 seconds]
<blazes816>
definitely
<TorpedoSkyline>
Then I take off my hat and bow to you, good sir.
<blazes816>
they're commies!
infinitiguy has quit [Ping timeout: 246 seconds]
<shevy>
hehe commies
<shevy>
there is always this time of [insert fear-topic here]
<shevy>
commies... terrorists... war on drugs, war on terror... something always has to happen
<shevy>
liberals!
baroquebobcat has joined #ruby
<blazes816>
the only thing humans agree on is fear
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<TorpedoSkyline>
and food.
<shevy>
yeah and excitement
apok has quit [Ping timeout: 240 seconds]
apok_ is now known as apok
<shevy>
dunno. there is lots of food
<TorpedoSkyline>
Unless you're Jewish or Muslim, because if that's the case you don't like bacon.
<shevy>
what about vegetarian
<blazes816>
cursed with the bacon hating gene
<Muz>
TorpedoSkyline: that's bullshit.
<Muz>
I'm Jewish and I love the taste of bacon.
abra has quit [Remote host closed the connection]
<Hanmac>
the usa not want to win the fight against drugs and terror ... because they get much money from it
<shevy>
well perhaps they would like it
greenysan has quit [Ping timeout: 268 seconds]
<blazes816>
:0
<shevy>
I mean, you could be a vegetarian, love steak, but don't eat it
<TorpedoSkyline>
LOL Muz, then you don't practice Judaism.
<TorpedoSkyline>
MEH
lurch_ has quit [Quit: lurch_]
<Muz>
shevy: tell me about it :(
abra has joined #ruby
<shevy>
Hanmac, yeah. capitalism lesson one. the more money you throw into it, the greedier it gets
<Muz>
Not eaten meat for the last few weeks, really miss a good steak, or lobster.
<shevy>
hehe
<TorpedoSkyline>
I want a taco.
<blazes816>
shevy: agriculture lesson one. stalk pile resources, and you've created a system to control
stopbit has quit [Quit: Leaving]
<blazes816>
stock*
<shevy>
blazes816 yeah. it's sad
<Hanmac>
>3000Years B.C. that thing was called moloch ...
<Muz>
TorpedoSkyline: technically, there's kosher bacon salt and baconnaise, and even if one doesn't eat bacon /now/ doesn't mean that they haven't tried it. :)
<shevy>
or patent genetical information to "design" food, and sue people who "steal" the technology
<blazes816>
got to run been it's been great gettin deep with you all
<TorpedoSkyline>
Muz, true. I wasn't talking about the physicality of being Jewish though, I was talking about the religion. ;P
<Muz>
One can be culturally Jewish too.
<Hanmac>
shevy did you see the movie "thank you for smoking"?
ppawel has quit [Quit: Leaving]
<TorpedoSkyline>
Jewish folk love bacon as much as everyone else, they're just not allowed to eat it.
mbriggs has quit [Remote host closed the connection]
<shevy>
Hanmac, yeah. I like the main actor, he was funny. the movie was ok too... 6 or 7 points out of 10 maximum from me
<shevy>
it was a little bit too overdramatized though
yoklov has joined #ruby
<Hanmac>
the group was funny, the "mercants of death" ;P
headius has joined #ruby
<shevy>
yeah, a bit cliched... but the weapons dealer guy was funny... trying to give the kid a gun to defend himself... clichee :P
dpk has quit [Quit: Asleep at the keyboard.]
<Hanmac>
yeah and this guy in a metal detection control: "this could take a while"
indstry has quit [Remote host closed the connection]
Progster has quit [Ping timeout: 248 seconds]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
strg has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
<shevy>
hehe
<shevy>
this is what I sometimes don't like about movies... when things seem to go into a rush
sailias has quit [Quit: Leaving.]
mwilson_ has quit [Client Quit]
<shevy>
and they don't explain things much in a plausible way... just because they have a script and want to finish a movie in this or that time
<shevy>
is why movies like Blade Runner should only have been distributed in the longest director cut version
<Hanmac>
shevy: do you know that scene i hate and like at most? when they say: "this is real life" :P
mrdodo has quit [Ping timeout: 240 seconds]
lorandi has quit [Quit: Leaving]
axl__ has joined #ruby
jjbohn has quit [Quit: Leaving...]
<shevy>
where?
<shevy>
I mean, in what movie
<Hanmac>
it was not in this movie i mean in general
<shevy>
aha
jgarvey has quit [Quit: Leaving]
<shevy>
dunno... movies are much more action packed than real life hehehe
<shevy>
I liked inception a lot
tatsuya__ has quit [Remote host closed the connection]
axl_ has quit [Ping timeout: 244 seconds]
axl__ is now known as axl_
tatsuya_o has joined #ruby
u_u has joined #ruby
<Hanmac>
shevy and like "last action hero"? xD
<shevy>
nah, that one was bad... the idea behind it wasn't total crap, but the realization of it sucked
<shevy>
omg
<shevy>
20 years old already :(
acemtp has joined #ruby
chichou has quit [Remote host closed the connection]
graft has quit [Quit: leaving]
andremaha has joined #ruby
sgronblom has quit [Ping timeout: 246 seconds]
ace has quit [Ping timeout: 246 seconds]
tatsuya_o has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
headius has quit [Quit: headius]
devdazed has quit [Quit: Bye]
dangerousdave has quit [Quit: Leaving...]
hunglin has quit [Ping timeout: 252 seconds]
nazty has joined #ruby
nohonor has quit [Read error: Connection reset by peer]
<bricker88>
What do you think, is Python smarter for allowing trailing commas, or is Ruby smarter for *not* allowing them?
krzkrzkrz has joined #ruby
sailias has quit [Read error: Connection reset by peer]
sailias1 has joined #ruby
<davidcelis>
why would you code trailing commas
Maniacal has joined #ruby
<davidcelis>
that's messy
mrdodo has joined #ruby
krz has quit [Ping timeout: 252 seconds]
krzkrzkrz is now known as krz
akem has quit [Ping timeout: 240 seconds]
deryl-android is now known as deryldoucette
<Resure>
Is there any good manual for creating Ruby C extensions?
<Spooner>
bricker88 : Not sure what you mean by trailing commas. I do have confusion sometimes that it allows [1, 2,], but not frog(1, 2, ) :D Not because I want one or the other, but because it isn't terribly consistent.
<davidcelis>
Spooner: He probably means trailing commas in hashes and arrays
<Spooner>
davidcelis : That comma was punctuation. I did write [1, 2,]
<Spooner>
davidcelis : Sorry, in-line code is always confusing :)
<davidcelis>
Oh woops
<davidcelis>
Ah so it does allow trailing commas
tomeo has quit [Remote host closed the connection]
<davidcelis>
sad
eywu has joined #ruby
<Resure>
Spooner: thanks
eywu has quit [Client Quit]
<Spooner>
I use them all the time, but only if I am using a multi-line hash/array. That way, if I add another line, I don't get the line I had to add a comma to being marked as changed by git.
<shevy>
bricker88 what is a trailing comma again?
_whitelogger has joined #ruby
SCommette has quit [Quit: SCommette]
<jezebel>
well one of my friends worked as a staffer at an employment agency
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<jezebel>
he told me alot of the jobs were looking for people skilled in ruby, so i figured id come ask you guys
jjang has joined #ruby
subbyyy has joined #ruby
<deryldoucette>
Well if he is a staffer then he has the ability to connect you to the jobs if you have the ruby skills.
apok has quit [Remote host closed the connection]
apok has joined #ruby
andrewhl has quit [Ping timeout: 245 seconds]
smw_work has quit [Remote host closed the connection]
seanstickle has joined #ruby
brdude has quit [Quit: brdude]
mbriggs has joined #ruby
HRabbit has quit [Ping timeout: 244 seconds]
<jezebel>
yeah
pskosinski has quit [Ping timeout: 240 seconds]
<jezebel>
but i guess i didnt realy want the ruby skills
<jezebel>
if you guys are the ones in demand
ephemerian has left #ruby [#ruby]
<jezebel>
and you tell me php and java is worth more
<jezebel>
then either a) you guys are lying to me
<jezebel>
or b) you guys know better than my staffer
<jezebel>
so i have to take your opinion into consideration too
<seanstickle>
Worth is a tricky thing
<seanstickle>
Depends on the buyer
<deryldoucette>
Exactly
<davidcelis>
for instance, i may be a ruby developer, but i'm utterly worthless!
<davidcelis>
just don't tell my employers
sgronblom has joined #ruby
<seanstickle>
Ha
<davidcelis>
they haven't figured that out yet
<deryldoucette>
Hehe
codora has quit [Quit: Heaven is not a place, it's being with people who love you.]
<fowl>
this is #RUBY. there will be at least 20 minutes of philosophizing before anything gets done
bozhidar has quit [Remote host closed the connection]
<deryldoucette>
Woot
<fowl>
get back to meditating!
mikepack has quit [Remote host closed the connection]
<zaargy>
that doesn't sound like ruby
<deryldoucette>
The koans, the koans!
<zaargy>
ruby is hack it til it works
<jezebel>
i feel like i expected chat in this room to be alot more active
Maniacal has quit [Remote host closed the connection]
<jezebel>
considering how there are 500+ people in here
<seanstickle>
jezebel: judge not from numbers, for they will lead you astray
<jezebel>
thats a good point
<deryldoucette>
This and #RUBY-lang tend to keep the channel focused. And the channel has people from all over the world. Most are either working ir sleeping probably
jezebel has left #ruby [#ruby]
mbriggs has quit [Remote host closed the connection]
opus has joined #ruby
jrist is now known as jrist-afk
HRabbit has joined #ruby
SneakySeal has quit [Ping timeout: 245 seconds]
chclto has quit [Read error: Connection reset by peer]
baroquebobcat has quit [Quit: baroquebobcat]
<Spooner>
davidcelis : And I thought I was the only one (worthless dev) :D
thecreators has quit [Quit: thecreators]
shadda has joined #ruby
banisterfiend has quit [Remote host closed the connection]
piotr_ has quit [Ping timeout: 246 seconds]
SCommette has joined #ruby
SCommette has quit [Client Quit]
brdude has joined #ruby
mneorr1 has quit [Quit: Leaving.]
chussenot has quit [Quit: chussenot]
w400z has quit [Quit: Computer has gone to sleep.]
specialGuest has quit [Remote host closed the connection]
mucker has quit [Read error: Connection reset by peer]