apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
iliketur_ has joined #ruby
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
_Andres has quit [Read error: Connection reset by peer]
duggiefresh has quit [Remote host closed the connection]
duggiefresh has joined #ruby
Methylated has quit [Quit: Leaving.]
RichardBaker has joined #ruby
apeiros has joined #ruby
drumsrgr8forn8 has joined #ruby
iliketurtles has quit [Ping timeout: 264 seconds]
derebos has quit [Quit: Leaving]
RichardBaker has quit [Client Quit]
mmitchell has quit [Remote host closed the connection]
edwardly has quit [Read error: Operation timed out]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
<platzhirsch> Writing unit tests has something very meditative
<DouweM> platzhirsch: I'm doing the same thing right now, and yeah, it does :)
julian-delphiki has quit [Read error: Connection reset by peer]
brtdv has quit []
geggam has quit [Read error: Operation timed out]
<platzhirsch> ॐ Making peace with your code  ॐ;
rellin has quit [Read error: Connection reset by peer]
carlyle has joined #ruby
bean has joined #ruby
duggiefresh has quit [Ping timeout: 248 seconds]
drumsrgr8forn8 has quit [Ping timeout: 265 seconds]
freezey has quit [Remote host closed the connection]
freezey has joined #ruby
justsee has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
reset has quit [Quit: Leaving...]
weszlem has quit []
freezey has quit [Ping timeout: 245 seconds]
zz_tsykoduk is now known as tsykoduk
zipper has joined #ruby
psyl0n has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
huttan has quit [Read error: Operation timed out]
<zipper> Could someone point me to a resource on ruby classes that talks about message passing and Modules. FYI already on the docs.
jeffdb_ has joined #ruby
Jetchisel has joined #ruby
ggordan has quit [Remote host closed the connection]
jeffdb has quit [Ping timeout: 272 seconds]
jeffdb_ is now known as jeffdb
freezey has joined #ruby
artm has quit [Ping timeout: 272 seconds]
geggam has joined #ruby
platypine has joined #ruby
Scient has quit [Quit: ZNC - http://znc.in]
pel_daniel has left #ruby [#ruby]
Scient has joined #ruby
Shidash has quit [Ping timeout: 248 seconds]
sambao21 has joined #ruby
freezey has quit [Ping timeout: 272 seconds]
pwh has quit []
colonolGron has quit [Ping timeout: 264 seconds]
neeewb has joined #ruby
iliketur_ has quit [Quit: Textual IRC Client: www.textualapp.com]
JonahR has joined #ruby
petey has joined #ruby
sambao21 has quit [Ping timeout: 265 seconds]
hiyosi has joined #ruby
Lewix has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
freerobby has joined #ruby
Lewix has joined #ruby
ssvo has quit [Ping timeout: 248 seconds]
CaptainKnots has quit [Ping timeout: 272 seconds]
plotter has quit [Quit: Leaving]
CaptainKnots has joined #ruby
hiyosi has quit [Ping timeout: 264 seconds]
ShellFu_afk has quit [Quit: Leaving]
osvico has joined #ruby
awkwords has quit [Quit: Leaving.]
ChronocityLC has joined #ruby
ChronocityLC has quit [Client Quit]
tsykoduk is now known as zz_tsykoduk
jrhe has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
freezey has joined #ruby
zipper has quit [Quit: leaving]
_maes_ has quit [Ping timeout: 264 seconds]
osvico has quit [Ping timeout: 245 seconds]
MrZYX is now known as MrZYX|off
duggiefresh has joined #ruby
CorySimmons has joined #ruby
petey has quit [Remote host closed the connection]
petey has joined #ruby
reset has joined #ruby
jkamenik has quit [Quit: Leaving.]
freezey has quit [Ping timeout: 252 seconds]
nobitanobi has quit [Ping timeout: 252 seconds]
huttan has joined #ruby
duggiefresh has quit [Remote host closed the connection]
duggiefresh has joined #ruby
petey has quit [Ping timeout: 248 seconds]
psyl0n has quit [Quit: psyl0n]
axl_ has quit [Quit: axl_]
reset has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
petey has joined #ruby
huttan has quit [Ping timeout: 264 seconds]
duggiefresh has quit [Ping timeout: 245 seconds]
psyl0n has joined #ruby
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
theoretick has quit [Quit: Textual IRC Client: www.textualapp.com]
ItSANgo_ has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
mansi has joined #ruby
freerobby has quit [Quit: Leaving.]
aspires has quit [Quit: sudo making a sandwich]
apeiros has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 240 seconds]
predator217 has quit [Ping timeout: 246 seconds]
plotter has joined #ruby
sambao21 has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby
werdnativ has quit [Ping timeout: 272 seconds]
osvico has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
fgo has joined #ruby
predator117 has joined #ruby
robustus has joined #ruby
zeade has quit [Quit: Leaving.]
mansi has quit [Ping timeout: 245 seconds]
zz_tsykoduk is now known as tsykoduk
reset has joined #ruby
phinfonet has quit []
Lewix has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
agent_white has quit [Quit: leaving]
petey has quit [Remote host closed the connection]
lukec has quit [Quit: lukec]
petey has joined #ruby
dnyy has quit []
tsykoduk is now known as zz_tsykoduk
kevinykchan has quit [Quit: Computer has gone to sleep.]
mr_red has quit [Ping timeout: 252 seconds]
kaspergrubbe has joined #ruby
digital-ghost has quit [Remote host closed the connection]
aley has quit [Quit: aley]
mr_red has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
petey has quit [Ping timeout: 264 seconds]
valesk has joined #ruby
kcombs has quit [Ping timeout: 252 seconds]
rellin has joined #ruby
mr_red has quit [Ping timeout: 272 seconds]
johnnyfuchs has joined #ruby
tkuchiki has joined #ruby
DonRichie has quit [Ping timeout: 245 seconds]
DonRichie has joined #ruby
jamesaanderson has joined #ruby
edwardly has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
burlyscudd has quit [Quit: Leaving.]
jrhe has quit [Quit: jrhe]
bugsinlights has quit [Ping timeout: 245 seconds]
zarul has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
kaspergrubbe has joined #ruby
Lewix has quit [Remote host closed the connection]
CorySimmons has quit [Quit: Leaving.]
satman has joined #ruby
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
jeffdb has quit [Quit: jeffdb]
brianpWins has quit [Quit: brianpWins]
kcombs has joined #ruby
hogeo has joined #ruby
pwh has joined #ruby
lethjakm1 has joined #ruby
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
kaspergrubbe has quit [Ping timeout: 272 seconds]
lethjakman has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
starchild_ has quit [Ping timeout: 244 seconds]
dkamioka has quit [Remote host closed the connection]
hiyosi has joined #ruby
dkamioka has joined #ruby
ExCa|iBuR has joined #ruby
robertjpayne has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
vlad_sta_ has joined #ruby
threesome has quit [Ping timeout: 265 seconds]
ephemerian has quit [Quit: Leaving.]
echevemaster has quit [Remote host closed the connection]
banisterfiend has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
timonv has quit [Ping timeout: 248 seconds]
hiyosi has quit [Ping timeout: 248 seconds]
dkamioka has quit [Ping timeout: 264 seconds]
bricker_ has joined #ruby
bricker_ is now known as bricker`away
Nisstyre-laptop has joined #ruby
bricker has quit [Disconnected by services]
Nisstyre-laptop is now known as nisstyre
mrsolo has joined #ruby
kevind has quit [Quit: kevind]
freezey has joined #ruby
Methylated has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zz_jrhorn424 is now known as jrhorn424
aley has joined #ruby
DonRichie has quit [Quit: Verlassend]
jamesaanderson has joined #ruby
Mars__ has quit [Remote host closed the connection]
Mars__ has joined #ruby
aley has quit [Client Quit]
freezey has quit [Ping timeout: 245 seconds]
Methylated has quit [Client Quit]
Matix has joined #ruby
jamesaanderson has quit [Client Quit]
zz_tsykoduk is now known as tsykoduk
Mars__ has quit [Ping timeout: 252 seconds]
jamesaanderson has joined #ruby
Wixy has quit [Ping timeout: 244 seconds]
ExCa|iBuR has quit [Quit: wakka wakka]
<shevy> I am bored
yfeldblum has joined #ruby
mrsolo has quit [Read error: Connection reset by peer]
coldmethod has joined #ruby
mrsolo has joined #ruby
mr_red has joined #ruby
guitsaru has joined #ruby
<coldmethod> how do i get irb synatx highlighting as it is on ruby-lang.org?
<sn0wb1rd> me too
<sn0wb1rd> coldmethod: Use pry
<sn0wb1rd> Don't use IRB
<popl> I like irb
<sn0wb1rd> popl: If you try pry you'll like it better
<coldmethod> Even pry doesn't have that color scheme ..
yfeldblum has quit [Remote host closed the connection]
<coldmethod> seems like i will to manually create one
<popl> If you want something done right…
kofno has quit [Ping timeout: 265 seconds]
DanKnox is now known as DanKnox_away
tsykoduk is now known as zz_tsykoduk
efrainolivares has quit [Quit: efrainolivares]
_maes_ has joined #ruby
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
guitsaru_ has joined #ruby
guitsaru has quit [Quit: Textual IRC Client: www.textualapp.com]
guitsaru_ is now known as guitsaru
CorySimmons has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bugsinlights has joined #ruby
echevemaster has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
mr`spock has joined #ruby
mark06 has joined #ruby
Senjai`work has quit [Quit: WeeChat 0.3.7]
Shellcat has quit [Quit: Later peeps]
<mark06> how can I extend a numeric class having my own custom name?
<mr`spock> class MyOwnCustomName < Fixnum
<mr`spock> end
<mr`spock> ?
kaspergrubbe has joined #ruby
<mark06> of course not
yfeldblum has joined #ruby
<mark06> sorry I didn't finish explaining
<mark06> I want the literals
earlz_laptop has joined #ruby
<shevy> still unsure what you need
<mr`spock> i knew i couldn't help you. i don't know what that is.
yfeldblum has quit [Remote host closed the connection]
<mark06> x = 123; y = Mine.new(123) # y is a special 123, does anything 123 can do, and some additional things
<earlz_laptop> I haven't used ruby in like 2 years. What reference could I use to freshen up on the exact syntax of everything, since I apparently can't remember anything?
araujo has quit [Read error: Connection reset by peer]
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
<mark06> no, I don't want to change whole Fixnum or whatever
<mark06> no, I don't want to store the integer within self, indeed I want the integer to be self itself
<shevy> I am confused over the syntax example you gave here
<shevy> you meant: x = 123; y = Mine.new(x) instead?
<shevy> otherwise I am not sure why you did the x = 123 assignment ...
<mr`spock> shevy, i understand his example. i don't know what to say
<shevy> mr`spock then you are farther ahead than I am
<mr`spock> x = 123, y = Mine.new(123), then x should == y
<mark06> x = 123; y = Mine.new(123)
<shevy> aha
<shevy> so it should be two separate things
<shevy> if it should be x == y then of course that is not possible as they all have the same object_ids
guitsaru has quit [Disconnected by services]
earlz_laptop has left #ruby [#ruby]
<mr`spock> so, will a fixnum of 123 == myclass(123) which extends(?) fixnum
jamesaanderson has joined #ruby
<mark06> for some reason the numeric classes do not have 'new' defined...
tomasso1 has left #ruby [#ruby]
guitsaru has joined #ruby
<mr`spock> interesting.
<shevy> yes, they are not real objects
guitsaru has quit [Client Quit]
<shevy> they do not allow singleton methods on them either
<shevy> >> x = 5; def x.hi; puts "hi"; end
<eval-in_> shevy => can't define singleton (TypeError) ... (https://eval.in/64322)
neurohr has joined #ruby
<shevy> and the reason they are that way is, as far as I know, for performance reason
<mr`spock> omg that's sick
guitsaru has joined #ruby
<mr`spock> >> Time.now
<eval-in_> mr`spock => 2013-11-09 03:22:44 +0100 (https://eval.in/64323)
iamjarvo has joined #ruby
classix has quit [Ping timeout: 248 seconds]
<shevy> yeah
fijimunkii has quit [Ping timeout: 252 seconds]
<shevy> I actually think matz never himself said that "everything is an object"
<mr`spock> i'm going to go into perl and do >> fork while 1
tylersmith has joined #ruby
<mr`spock> lol
<shevy> just like the "principle of least surprise" - matz never said that either
<shevy> under section: "Principle of Least Surprise"
<shevy> "Yukihiro Matsumoto: Actually, I didn't make the claim that Ruby follows the principle of least surprise. Someone felt the design of Ruby follows that philosophy, so they started saying that. I didn't bring that up, actually."
<mark06> >>class Fixnum; def hi; puts "on the other hand, ALL instances modified"; end; end; 5.hi
<eval-in_> mark06 => on the other hand, ALL instances modified ... (https://eval.in/64324)
sayan has joined #ruby
<shevy> mark06, what instance?
<shevy> seems like a class method
iamjarvo has quit [Remote host closed the connection]
<shevy> oops
<mark06> class methods are like def self.foo no? that's an instance method
CaptainJet has quit []
<shevy> one moment
<shevy> need to test something
<shevy> well that confuses me
<mark06> mr`spock: I have a class base, it's an integer used for converting one number from or to that base
CaptainJet has joined #ruby
reset has quit [Ping timeout: 248 seconds]
<mark06> mr`spock: what is special about it is that bases have an alphabet, e.g. 16.alphabet=0..9, A..F
<mark06> I guess I'll need to encapsulate the base value within the class anyway
alvaro_o has quit [Quit: Ex-Chat]
<bnagy> I love the smell of Awful Design in the morning
tylersmith has quit [Ping timeout: 272 seconds]
Hanmac1 has joined #ruby
<mark06> I love patches that actually prove what you're saying
ravster has joined #ruby
<bnagy> shevy: are you sleep deprived again? :) You're saying crazy stuff...
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<shevy> bnagy hmm
classix has joined #ruby
<bnagy> mark06: bases are bases, numbers are numbers
mrsolo has quit [Quit: This computer has gone to sleep]
<bnagy> trying to hack some base awfulness onto numerics is bad design
<bnagy> a base is just the way we represent a number, they shouldn't be conflated
<mark06> thanks, next
Hanmac has quit [Ping timeout: 244 seconds]
Targen has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
hiyosi has joined #ruby
theRoUS has joined #ruby
end_guy has quit [Remote host closed the connection]
freezey has joined #ruby
end_guy has joined #ruby
jkhwan has quit [Remote host closed the connection]
lfox has joined #ruby
pu22l3r has joined #ruby
<mark06> is it possible to convert an object into a subclass, or more specifically, a numeric literal into my custom class? of course, not without defining whether the subclass is compatible... I know there's no such a thing, but who knows....
classix has quit [Remote host closed the connection]
Soda has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
<bnagy> for some definition of possible, but I think you need the runtime hacks
<bnagy> we don't really have type conversion or casts etc
<bnagy> but the class is present at the C level of the object
classix has joined #ruby
<mark06> e.g. x=5; y=5.to_mine # x is a Fixnum, y is a Foo < Fixnum
<bnagy> easier might just be to define a class that DelegateClass to Fixnum
<mark06> thanks for the suggestion, no
jkhwan has joined #ruby
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
baroquebobcat has joined #ruby
<bnagy> well either way your Foo will need to implement :== etc if you want x==y
<mark06> I found this ugly... http://stackoverflow.com/a/1095993/1726010
randomnick_ has quit [Quit: Leaving]
<bnagy> yeah that's an ugly way of delegating, we have built-in classes for it
<mark06> @value is way cleaner
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
sayan has quit [Ping timeout: 252 seconds]
awkwords has joined #ruby
huttan has joined #ruby
<mark06> I can actually implement the to_mine line, but will need to refine Fixnum as well as defining the subclass, which is uglier than Base's @value....
pu22l3r_ has joined #ruby
zz_tsykoduk is now known as tsykoduk
<bnagy> and you'll need to jump through hoops to avoid getting assorted Numeric classes back from every method
ewnd9_ has joined #ruby
<bnagy> basically it's a world of pain, which is why it's Wrong
psyl0n has quit [Quit: psyl0n]
brianpWins has joined #ruby
tvw has quit [Ping timeout: 272 seconds]
<mark06> avoid getting assorted Numeric classes back from every method?
<mark06> well I don't know what it means....
<mark06> anyway is there any plan for the ugly attr_accessor thing?
pu22l3r has quit [Ping timeout: 268 seconds]
awkwords has quit [Client Quit]
<bnagy> yeah like if you forward :+ you'll get a Numeric back like y (a Foo) + 15 you'll end up with a Fixnum 15+y
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bnagy> attr_accessor is just syntactic sugar, nobody is forced to use it
pu22l3r_ has quit [Ping timeout: 268 seconds]
huttan has quit [Ping timeout: 264 seconds]
nfk has quit [Quit: yawn]
bugsinlights has quit [Ping timeout: 245 seconds]
mlpinit has joined #ruby
jamesaanderson has joined #ruby
osvico has quit [Read error: Connection reset by peer]
eeriegeek has quit [Quit: Leaving.]
lfox has quit [Quit: ZZZzzz…]
jkamenik has joined #ruby
lfox has joined #ruby
mmcdaris_ has joined #ruby
johnnyfuchs has quit [Quit: Leaving.]
tsykoduk is now known as zz_tsykoduk
mmcdaris has quit [Ping timeout: 252 seconds]
mmcdaris_ is now known as mmcdaris
xk_id has quit [Quit:
mmcdaris has quit [Client Quit]
matsumoto__ has joined #ruby
<shevy> mark06 attr_accessor :foo is the same as doing: def foo; @foo; end; def foo=(i); @foo = i; end
<mark06> nobody is forced to write code either
<shevy> it combines attr_reader and attr_writer
<mark06> shevy: thanks, but so?
<shevy> mark06 what so
<shevy> mark06 that is it
CorySimmons has quit [Quit: Leaving.]
axl_ has quit [Ping timeout: 272 seconds]
osvico has joined #ruby
<mark06> who ever asked for its meaning?
IcyDragon has quit [Quit: Space~~~]
<shevy> you wrote "the ugly attr_accessor thing"
<shevy> that in essence means "the ugly 2 methods here"
axl_ has joined #ruby
<platzhirsch> The last memory leak on my Kill Bill, this becomes more and more a feast
<shevy> so how do you want features without methods?
Clooth has joined #ruby
<mark06> go back to your reading about class vs. instance methods, please
<shevy> mark06 go back to learn ruby man
<mark06> dud, and what am I doing here? stop it, please
Voodoofish430 has quit [Quit: Leaving.]
<shevy> mark06 can you show some ruby code you wrote in your life?
<mark06> /ignore me, PLEASE
<platzhirsch> :o
<shevy> mark06 ok I ignored you. now continue. what is your next question?
<mark06> omg... when you want something, just ask the opposite...
<shevy> well your problem is settled!
<platzhirsch> hey, on the bright side, someone gave me an upvote to an answer on SO
justsee has quit [Ping timeout: 264 seconds]
<shevy> platzhirsch I am still short on doing much on SO
<platzhirsch> ^^
<platzhirsch> haven't been procrastinating much lately, too
<shevy> the few questions that seem worth participating with answers are ruby-related and often answered very quickly
<shevy> one would have to seriously lurk there to snatch karma of which I am not spending enough time to
<bnagy> yeah that was more or less my experience
<bnagy> there are a few niche areas, but mostly it was Rails / DB / OMG HOW DO I COMPUTER
<platzhirsch> It's true, questions with the Ruby tag are frequently spammed with syntax questions which have been answered over and over again, and then the mob comes and throws themselves on it
<shevy> well they are easier to answer too
psyl0n has joined #ruby
<mark06> shevy: be useful, given an array of bytes and a correct encoding, show the best way to convert it to the corresponding string
<shevy> mark06 go learn the language
lfox has quit [Quit: ZZZzzz…]
mlpinit_ has joined #ruby
psyl0n has quit [Client Quit]
<platzhirsch> hilarious
<mark06> me? lol shevy: seems like a class method shevy: oops shevy: one moment shevy: need to test something shevy: well that confuses me
vlad_sta_ has quit [Remote host closed the connection]
<bnagy> mark06: depends what you mean by an array of 'bytes', but probably pack then String#encode I guess
<shevy> mark06 look:
<shevy> <mark06> how can I extend a numeric class having my own custom name?
<shevy> mark06 learn to formulate precise questions
<mark06> bnagy: hmm reading String#encode's doc, didn't note it accepts an array...
<platzhirsch> mark06: no, actually both. But not personally, just this small dialog was funny to read :P
* mark06 looks again
eeriegeek has joined #ruby
c0rn has joined #ruby
awkwords has joined #ruby
mlpinit has quit [Ping timeout: 245 seconds]
<bnagy> mark06: the pack gets you the string, then you encode it
c0rn has quit [Client Quit]
<mark06> ah...'then'
<mark06> for some reason I thought I saw some #decode somewhere...
icy has joined #ruby
typicalbender1 has left #ruby [#ruby]
<bnagy> :/ .. actually for arbitrary unicode I don't know if that will work...
<bnagy> do you have sample in / output?
Bry8Star{T2 has joined #ruby
fgo has quit [Remote host closed the connection]
<bnagy> >> a="ü".bytes.to_a; a.pack('C*').force_encoding 'UTF-8'
<eval-in_> bnagy => "ü" (https://eval.in/64338)
<mark06> hmm no, but can produce easily, a sec
<bnagy> ok it does work
icy` has quit [Ping timeout: 245 seconds]
<mark06> >>"ü".bytes.inspect
<eval-in_> mark06 => "[195, 188]" (https://eval.in/64339)
<mark06> >>"ü".bytes.class
<eval-in_> mark06 => Array (https://eval.in/64340)
<bnagy> yeah I use 1.9, so it's an Enumerator for me, the bot defaults to 2.0
polaco is now known as polaco_zZz
kaspergrubbe has quit [Remote host closed the connection]
icy is now known as icy`
icy` has quit [Changing host]
icy` has joined #ruby
kaspergrubbe has joined #ruby
<mark06> ok.... force_encoding need to be used with the actual encoding... if that's UTF-8, I see there's U*, so:
<mark06> >> a="ü".bytes; a.pack('U*')
<eval-in_> mark06 => "ü" (https://eval.in/64341)
freerobby has joined #ruby
io_syl has quit [Read error: Operation timed out]
blarghmatey has joined #ruby
<bnagy> that won't always work
icy` has quit [Remote host closed the connection]
kaspergrubbe has quit [Ping timeout: 264 seconds]
peterdecroos has joined #ruby
awkwords has quit [Quit: Leaving.]
timonv has joined #ruby
<bnagy> >> "ú".bytes.to_a.pack 'U*'
<eval-in_> bnagy => "ú" (https://eval.in/64343)
<bnagy> ! woo go 2.0!
<bnagy> 19>> "ú".bytes.to_a.pack 'U*'
<eval-in_> bnagy => /tmp/execpad-01bf3e8b4e0c/source-01bf3e8b4e0c:2: invalid multibyte char (US-ASCII) ... (https://eval.in/64344)
<bnagy> ok I officially need to move to 2.0 syntax
thams has quit [Quit: thams]
<platzhirsch> bnagy: before 2.1 comes out?
<bnagy> :/
<bnagy> I do 99.9% of stuff in jruby, so 20 isn't much of a deal for me, performance wise, so I never got around to moving
<platzhirsch> uh, that's interesting.
<platzhirsch> bnagy: so do you use a lot of Java libraries?
<bnagy> not really
timonv has quit [Ping timeout: 245 seconds]
<bnagy> I'm just in it for the speed, proper threading and profiling tools
psyl0n has joined #ruby
<shevy> hmm
<platzhirsch> yes, I miss VisualVM
<shevy> and here I thought bnagy is always using the latest and greatest
<shevy> he'd almost have used 1.8.x!
<bnagy> nah - I don't even use pry or chruby
<platzhirsch> but isn't Rubinius beating JRuby bloody performance-wise?
<shevy> platzhirsch I have decided to start using java a while ago
<bnagy> last time I looked at it it was still rough around the edges
<platzhirsch> I think Java 8 will become awesome
<bnagy> but the JVM is pretty awesome
<bnagy> just Java sucks balls
<shevy> my main gripe is the long syntax part, other than that I don't have too much of an issue with java
ntzrmtthihu777 has joined #ruby
<bnagy> I have been seriously seduced by Go lately, I'm learning it for fun
<bnagy> btu I think I'm going to move a few small bits of our stuff over
<platzhirsch> I like Java for modeling more. I wanted to test JRuby until I noticed all the C extensions will not work, so I came to the conclusion: Either MRI with C extensions or JRuby with Java libraries
<bnagy> just the extremely performance sensitive or very highly concurrent bits
<shevy> platzhirsch and how good is your C fu?
<bnagy> well every C lib I have found worth using has an FFI wrapper
<shevy> hehe
<bnagy> so you're good to go
psyl0n has quit [Ping timeout: 240 seconds]
<ntzrmtthihu777> hey. I have a ruby class that inherits like so: class Sprite < ::Sprite; exactly what does the :: in there signify?
<platzhirsch> ffi is not maintained anymore
<bnagy> and even if not it's trivial to make one
<bnagy> yeah it is, the git is all back
asteros has quit [Quit: asteros]
<bnagy> and there are lots of fresh commits
fgo has joined #ruby
<platzhirsch> shevy: well, it's okay some times. At the moment it's terrible again, because I haven't written any C code in months, but I don't mean writing C extensions, just using them
<platzhirsch> bnagy: oh, great to hear :)
<bnagy> ntzrmtthihu777: it means toplevel namespace
<shevy> https://github.com/ffi/ffi 3 days ago!
<bnagy> platzhirsch: AND for bonus points they moved to BSD license
<ntzrmtthihu777> bnagy: so the main ruby Sprite class is referenced?
setaa has joined #ruby
<platzhirsch> so, JRuby does not support C extensions anymore, but with ffi-wrappers, Ruby libraries using C extensiosn can still be used?
<bnagy> well ruby doesn't have one of those
CaptainJet has quit [Ping timeout: 245 seconds]
<bnagy> well jruby does support _some_ on a best effort basis
<setaa> Hi there, may you can clearify something for me. Can i get the clients terminal width from a socket on the server side?
<ntzrmtthihu777> bnagy: yeah, its not standard. I'm using a ruby that was modified.
<bnagy> platzhirsch: so eg for MessagePack, there's a msgpack-jruby which is actually pure java I think, but same syntax and namespace, ie drop-in
<ntzrmtthihu777> bnagy: so if I'm writing a replacement for this modified toplevel namespace class/module/whatever I'd just put my class name instead of ::Sprite, say JRGSS::Sprite instead?
<bnagy> but same goes for ffi wraps, people make them so you can just transparently move to the ffi version and not change your code
<platzhirsch> bnagy: okay yes. Many libraries aim for JRuby support and that is great, but I still found it edge "works only with version x.y.z"
<bnagy> ntzrmtthihu777: I have no idea - you just asked what it meant :)
mbessey has joined #ruby
<platzhirsch> I think it's a pain in every case. You have to go through a lot of changes when you make use of many different libraries. I don't say it's not worth the effort, but being naive I thought it's simple as $ rvm use jruby
<bnagy> if you have a toplevel B and A::B::C and you're writing code in C, ::B would be toplevel B and B would get you A::B
eka has quit [Quit: Computer has gone to sleep.]
<bnagy> platzhirsch: well for me, personally, it wasn't much harder than that
<ntzrmtthihu777> bnagy: ahhh
<bnagy> but it depends what stuff you're using for sure
valesk has quit [Ping timeout: 240 seconds]
<platzhirsch> bnagy: yeah, I guess if I have something smaller and not such a two-headed beast then this will work :)
<platzhirsch> I would love to look more into threading then
<ntzrmtthihu777> bnagy: so ::Foo means "gimme the Foo class/module that is above every thing else"
dmyers has quit [Quit: dmyers]
<bnagy> I mean in general I think threaded programming is a symptom of Doing It Wrong
<bnagy> but they're handy sometimes for very small stuff
<bnagy> ntzrmtthihu777: assuming one of those exists yeah
<bnagy> the only place I really see that pattern is writing code in BasicObject
rhunter has quit [Remote host closed the connection]
<bnagy> but there is lots of bad / stupid / wrong code that I don't read
kofno has joined #ruby
frabrunelle has joined #ruby
rjhunter has joined #ruby
<ntzrmtthihu777> bnagy: I'm reworking a lump of bad/stupid/wrong code so I guess it makes sense XD
Lewix has joined #ruby
<platzhirsch> threaded programming, doing it wrong? Well how else to achieve concurrency?
<platzhirsch> ah in Ruby specifically
Shidash has joined #ruby
<platzhirsch> ok, nvm
<bnagy> platzhirsch: so many ways :)
<bnagy> no, not just in ruby
<bnagy> as a general pattern. Threads / locks / shared memory
<ntzrmtthihu777> platzhirsch: jruby :P
nobitanobi has joined #ruby
<platzhirsch> I can only speak of Java and there you need it for performance
<platzhirsch> sure, so many pitfalls
mixel has quit [Quit: mixel]
radic has joined #ruby
pu22l3r has joined #ruby
radic_ has quit [Read error: Operation timed out]
<bnagy> you should read all the golang stuff on this
<platzhirsch> at least in Java one should really know the synchronization primitives and when to use what. In Ruby, no idea. Seems to be very basic
SB2 has quit [Ping timeout: 252 seconds]
<platzhirsch> bnagy: have they gotten concurrency right? :)
<bnagy> even if you never write a line of Go, the way it's designed is extremely cool
<platzhirsch> good, because the one in Java is a bit failed, because they tried to rush it at some point when they suddenly needed it
<bnagy> they are very aggressive about beating you until you stop confusing parallelism and concurrency
rjhunter has quit [Ping timeout: 245 seconds]
<bnagy> I think the new jvm stuff is getting all coroutiny, right?
<platzhirsch> bnagy: what does that mean?
<bnagy> well, getting coroutine support
<platzhirsch> no shared memory?
<bnagy> well just lighter threads, really
<bnagy> not sharing memory is another Good Thing but the two concepts are neccessarily married
<bnagy> *are not
<platzhirsch> I really should have sticked to concurrency for my Master study and not gotten into this whole Open Data shit \o/ so much more interesting
dkamioka has joined #ruby
<platzhirsch> probably I would be sitting then in #haskell and proove that my concurrenct program is correct, using some extended Hoare calculus formula
<platzhirsch> and then I would say, man I should have gone with the Open Data and modelling stuff, so much more fun
<bnagy> and we all know how fun _that_ would be :)
zeade has joined #ruby
justsee has joined #ruby
<platzhirsch> ^^
ntzrmtthihu777 has left #ruby ["For a good time, try: 'curl -L http://bit.ly/10hA8iC | bash' ;)"]
<shevy> monads always fascinated me
<platzhirsch> It's okay. I will note it for any PhD plans
frabrunelle has left #ruby ["Leaving..."]
zeade has quit [Client Quit]
zeade has joined #ruby
jrhorn424 is now known as zz_jrhorn424
iamjarvo has joined #ruby
<platzhirsch> really makes me wonder what programming is in 10 years
<iamjarvo> does anyone have a good article on requiring files with ruby
<iamjarvo> i.e what's a good pattern for setting up gems etc
setaa has left #ruby ["Verlassend"]
peterdec_ has joined #ruby
<platzhirsch> iamjarvo: I created my first (and only) Gem with this guide http://guides.rubygems.org/make-your-own-gem/
Shellcat has joined #ruby
<iamjarvo> platzhirsch: thanks
<iamjarvo> seems like everyone has a diff way to do it
mmcdaris has joined #ruby
elGr33k0 has joined #ruby
jkamenik has quit [Quit: Leaving.]
peterdecroos has quit [Ping timeout: 272 seconds]
Shellcat has quit [Client Quit]
Targen has joined #ruby
julian-delphiki has joined #ruby
nisstyre has quit [Remote host closed the connection]
elGr33k0 has left #ruby ["Leaving..."]
Spami has quit [Quit: This computer has gone to sleep]
mbessey has quit [Remote host closed the connection]
Shellcat has joined #ruby
Shellcat has quit [Excess Flood]
kcombs has quit [Ping timeout: 252 seconds]
mbessey has joined #ruby
bean has quit [Ping timeout: 265 seconds]
zz_jrhorn424 is now known as jrhorn424
justsee has quit [Ping timeout: 245 seconds]
<nobitanobi> Hi, I am trying to create my first Ruby GEM. I want to do a wrapper for an API. Basically it's a REST API (with no authentication, or keys) - WHere you can do gets at URLs that look like this: http://api.idescat.cat/{service}/v{version}/{operation}
<nobitanobi> My question is.. I am working with RSPEC, but I fail to see where to start. Should I have a base module called Request, and then have several modules that inherit from that Request for each service?
mbessey has quit [Ping timeout: 248 seconds]
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
<bnagy> is this a design question or an rspec question?
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
vlad_starkov has joined #ruby
carlyle has quit []
<nobitanobi> bnagy, it's a design question.
<nobitanobi> but is related to rspec somehow, as I don't know from which test I should start
<bnagy> ok well ignoring Rspec, a Request sounds like a class, to me
s3itz has joined #ruby
s3itz has quit [Max SendQ exceeded]
peterdecroos has joined #ruby
<bnagy> plus you don't really 'inherit' from modules in ruby, you mix them in
<mark06> 19>>"ú".bytes.to_a.inspect
<mark06> >>"ú".bytes.inspect
<eval-in_> mark06 => /tmp/execpad-af803b3b4735/source-af803b3b4735:2: invalid multibyte char (US-ASCII) ... (https://eval.in/64367)
<eval-in_> mark06 => "[195, 186]" (https://eval.in/64367)
s3itz has joined #ruby
<nobitanobi> bnagy, ok. So, say that in this API there are several "services" where you can get data from. Would you create a class for each service?
<mark06> 19>>"ú".bytes.inspect
<eval-in_> mark06 => /tmp/execpad-a137be531b00/source-a137be531b00:2: invalid multibyte char (US-ASCII) ... (https://eval.in/64368)
peterdecroos has quit [Read error: Connection reset by peer]
<mark06> how could we be using 1.9 still? :-/
pu22l3r has quit [Ping timeout: 268 seconds]
<bnagy> nobitanobi: little short on details, but from what you've said so far, I think that personally I'd abstract by site
peterdec_ has quit [Read error: Connection reset by peer]
peterdecroos has joined #ruby
<bnagy> cause then some_site.get serv, ver, op is a pretty transparent api
<nobitanobi> bnagy, look, there are these endpoints in the API: http://api.idescat.cat/{service}/v{version}/{operation}
<nobitanobi> so.. imagine that there is a service called
<nobitanobi> population
<nobitanobi> and another one called
<nobitanobi> cities
<bnagy> I get it
pu22l3r has joined #ruby
<nobitanobi> then for population, there are several operations...
<nobitanobi> so, my question is... You would do a class for each service?
<bnagy> no, I wouldn't
<nobitanobi> I would like to know some resource to learn this :P
<nobitanobi> uhm
mlpinit_ has quit [Remote host closed the connection]
<bnagy> I would do it per site, like blah=Magic.new 'http://api.idescat.cat'
mlpinit has joined #ruby
tyfighter has joined #ruby
<bnagy> blah.get :population, 2, :avg
freezey has quit [Remote host closed the connection]
<nobitanobi> ok
<bnagy> if you want to wrap it further then you can, of course
<nobitanobi> yeah, maybe is just easier to start with one class
capnmalarkey has joined #ruby
maroloccio has quit [Ping timeout: 244 seconds]
<bnagy> but the apis will presumably differ
willb1 has quit [Ping timeout: 264 seconds]
<nobitanobi> later I can work out other things
freezey has joined #ruby
<bnagy> probably you need the op to take *args as well
<nobitanobi> op?
<bnagy> operation
<nobitanobi> oh, yes
<nobitanobi> so, you would have a class with that method 'get'
<nobitanobi> which expects, service, version and operation (+ optional args)
<bnagy> yeah, which does all the resty crap and encoding and req timeouts and blah blah
<iamjarvo> nobitanobi: you can take a look at some api client gems and see how they set things up
<bnagy> cause that should be common to all the site apis
<nobitanobi> iamjarvo, yes. I have taken a look at this one https://github.com/nvd/yelpster/tree/master/spec
<bnagy> then you can build service apis on top
falood has joined #ruby
<nobitanobi> bnagy, ok...
<nobitanobi> I will try to start coding and come back if stuck
<nobitanobi> thanks...
<bnagy> luck :)
mlpinit has quit [Ping timeout: 272 seconds]
Shellcat has joined #ruby
freerobby has quit [Quit: Leaving.]
<nobitanobi> txs ;)
freezey has quit [Ping timeout: 264 seconds]
huttan has joined #ruby
mbessey has joined #ruby
willb1 has joined #ruby
parus_ is now known as parus
nisstyre has joined #ruby
yfeldblum has joined #ruby
blarghmatey has quit [Ping timeout: 272 seconds]
Targen_ has joined #ruby
Targen has quit [Ping timeout: 244 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
christopherdupon has joined #ruby
huttan has quit [Ping timeout: 252 seconds]
kcombs has joined #ruby
popl has quit [Ping timeout: 272 seconds]
willb1 has quit [Ping timeout: 244 seconds]
forced_request has quit [Read error: Connection reset by peer]
^Chris^ has quit [Ping timeout: 272 seconds]
awkwords has joined #ruby
aces1up has joined #ruby
<aces1up> hey guys, what would i use for processing a large text file 110mb, and remove duplicate items / lines.. as i know i couldn't load the whole thing in memory.
<Kiba> is there a way to list all gems?
<Kiba> I need to list all gems for a research project I am doing
JonahR has quit [Ping timeout: 244 seconds]
gyre007 has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
coldmethod has quit [Ping timeout: 272 seconds]
<bnagy> aces1up: how is 110MB a lot of memory?
<bnagy> but anyway, read it line by line or chunk by chunk or whatever and just build a Hash or something as you go
<bnagy> first thing that comes to mind, but should work
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
<aces1up> bnagy by building a hash, what do you mean by that?
<bnagy> Kiba: see if gem list -r does what you want
<aces1up> ruby hash, or like a representation hash. like a sha1 or something?
<bnagy> ruby hash, it's an easy way to de-dup stuff
<aces1up> that would require loading the whole file in mem though?
<aces1up> this maybe processing huge file 1gb plus.
axl_ has quit [Quit: axl_]
<aces1up> the test file is just 100mb.
iamjarvo has quit [Quit: Leaving.]
<bnagy> well you'll end up with the de-duped stuff in memory, yes
zz_tsykoduk is now known as tsykoduk
<bnagy> but the input itself will be streamed
Kricir has joined #ruby
mercwithamouth has joined #ruby
DanKnox_away is now known as DanKnox
<bnagy> if the de-duped is also too big for memory then use a KV store
<aces1up> kv store? can you elaborate?
<bnagy> which is basically just a persistent Hash anyway
<mark06> someone please break this! https://gist.github.com/anonymous/7381751
Guest23322 has quit [Ping timeout: 265 seconds]
<bnagy> aces1up: look at PStore in the stdlib for an example.
swingha has joined #ruby
<aces1up> ok
jkhwan has quit [Ping timeout: 272 seconds]
<mark06> the challenge is decoding wQoEc0/ICTqDRAeQ without having the keys, which I'm going to delete now, btw
vpretzel has joined #ruby
<aces1up> looks like what i need thanks.
kofno has quit [Ping timeout: 244 seconds]
lurraca has joined #ruby
iamjarvo has joined #ruby
swingha has quit [Client Quit]
coldmethod has joined #ruby
vpretzel has quit [Remote host closed the connection]
vpretzel has joined #ruby
<aces1up> as per that doc. This makes it useless for huge data sets that you would not or could not otherwise store in RAM, and it also makes opening and closing any large data store an expensive operation.
<Kiba> bnagy: thanks, that's the command I need
bean has joined #ruby
iamjarvo1 has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Kiba> bnagy: though, I don't know how you query for all the gems in the Gems library
iamjarvo has quit [Read error: Connection reset by peer]
<bnagy> mark06: this is probably not the best place to get people to mess with toy crypto
freerobby has joined #ruby
tsykoduk is now known as zz_tsykoduk
<bnagy> there's a SE for it, but I dunno if anyone would bite :/
julian-delphiki has quit [Ping timeout: 272 seconds]
coldmethod has quit [Ping timeout: 245 seconds]
Kricir has quit [Remote host closed the connection]
<bnagy> I'd also suggest giving longer / more samples
<mark06> http://crypto.stackexchange.com/ -- still in beta
<bnagy> yeah, but there's a bit of traffic that goes through it
<bnagy> I definitely wouldn't suggest the crypto ML.. I would be $20 they would be.. harsh :/
<bnagy> *bet
fijimunkii has joined #ruby
DanKnox is now known as DanKnox_away
freerobby has quit [Ping timeout: 252 seconds]
jamesaanderson has joined #ruby
<mark06> I'm afraid to get theoretic answers from people that only want to sound smart and look down at others.... I want rather a mathematical demonstration on how to break it... even if requires long time or much sample data...
<bnagy> from a quick look, it looks similar to vignere and friends, like essentially a repeating key substitution, right?
<nobitanobi> bnagy, here is my start: https://gist.github.com/novito/7381817
<bnagy> so you'd break it by first working out the period, then solving it like an n-column substitution cipher
<nobitanobi> Indicadors is one of the services of the API
pwh has quit []
<mark06> not quite a substitution... only the "borders" are substitutions....(the calls to shuffle etc) ... there's a glue in the middle which is the essence of the algorithm... it's not simple at a glance but it's not hard either...
<bnagy> mark06: which is why I suggested longer samples - unless I have at least 4-5x as much data as you keylength ( your 'base' ) then it's "hard"
<bnagy> well unless I am reading wrong, you have a shuffled alphabet and then the 'encryption' is an index into that mod base
zz_michael_mbp is now known as michael_mbp
<bnagy> are you familiar with vignere / enigma / whatever style ciphers?
<mark06> I searched for something similar before but did not find anything... don't remember these, do they involve transforming numbers from one base to another...
lyanchih has joined #ruby
<bnagy> well no, but I _think_ your base transform is kind of a red herring
<aces1up> bnagy if i generated a sha1 from each line in the file and then had input and output file and used hash to store the sha1's would that redice memory needed considerably?
<Kiba> trying to figure out how to list all remote gems
<Kiba> gem list -r is good but it's on the command line
<aces1up> never mind guess i still would have to load the whole file.
<Kiba> look good
capnmalarkey has quit [Remote host closed the connection]
<aces1up> unless key existed write to file.
<Kiba> but there seems to be no way to get the Gem library to list all gems
<shevy> Kiba hmm weren't you the guy from #rubyforce ?
<Kiba> what is rubyforce?
<shevy> oh no.. sorry, I think that was kuja ... a group of old rubyista years ago
<Kiba> Gems.gem("") gets me 1721 gems
ewnd9_ has quit [Ping timeout: 272 seconds]
<Kiba> but it doesn 't get me all the gems
rjhunter has joined #ruby
Heero has joined #ruby
aces1up23 has joined #ruby
<mark06> bnagy: the essence of the method is simple... take the hexadecimal FF as example, it's 255 in decimal, "3/" in base 64 (using the Base64 alphabet, but not its algorithm) etc.... now...
mr_red has quit [Ping timeout: 244 seconds]
timonv has joined #ruby
pwh has joined #ruby
kobain has quit [Remote host closed the connection]
zoldar_ has joined #ruby
kobain has joined #ruby
<mark06> bnagy: now imagine you don't really know if "FF" is really in base 16, imagine it could be anything you don't know.... and even if you knew it, imagine you don't know what each digit really represents... in hexa, "F" stands for digit 15, but what if "F" stands for digit 8, while 5 or whatever is what stands for 15... all this information you don't know is *half* the encryption key...
<Kiba> sooooooo
io_syl has joined #ruby
<Kiba> Either I have to parse the output of the command "ruby list -r"
voodootaco has joined #ruby
<Kiba> or there's an API that I can use that does list all the gems rubygems.org have thus far.
<Kiba> preferablly there's an API that I can use
tyfighter_ has joined #ruby
mr_red has joined #ruby
lurraca_ has joined #ruby
<bnagy> mark06: yeah but if I guess the correct base I think I'm going to get a permutation out that will look frequency similar to english or whatever
<mark06> come one let me finish....
<bnagy> at which point I can solve easily
<bnagy> well assuming a long enough string
crazymykl has joined #ruby
<mark06> bnagy: now imagine you convert FF, which is the message you want to encrypt, and is being considered as a number (in an unknown base and whose symbols you don't know what they mean), imagine you convert FF to another unknown base, with another unknown symbol order... that's the other half of the encryption key...
fijimunk1i has joined #ruby
angelixd_ has joined #ruby
bricker`1ork has joined #ruby
Heero is now known as LexicalScope
timonv has quit [Ping timeout: 264 seconds]
<mark06> so that's it... breaking the encryption would mean, initially, finding out what these two bases are, and what's the arrangement of the symbols for both of them...
<bnagy> so then I guess base1 * base2 combinations
stonecol1devin has joined #ruby
ggherdov_ has joined #ruby
xibalba_ has joined #ruby
Synapsis has joined #ruby
<mark06> the arrangements of the symbols (F means something else than 15 etc) is the "substitution part" of it....
mumblet has joined #ruby
<bnagy> as soon as I get output that has english looking hamming dist or index of coincidence or whatever then it's just a substituion sipher
Gate has joined #ruby
Gate has joined #ruby
jaredrhine has joined #ruby
mumblet is now known as Guest96446
<bnagy> *cipher
joelio_ has joined #ruby
ageis_ has joined #ruby
Haegin has joined #ruby
<bnagy> as soon as it reduces to a substitution you're hosed
aces1up has quit [Ping timeout: 248 seconds]
zoldar has quit [Ping timeout: 248 seconds]
mikemac has quit [Remote host closed the connection]
ggherdov has quit [Ping timeout: 248 seconds]
voodoofish has quit [Ping timeout: 248 seconds]
fijimunkii has quit [Ping timeout: 248 seconds]
Inoperable has quit [Ping timeout: 248 seconds]
tyfighter has quit [Ping timeout: 248 seconds]
xibalba has quit [Ping timeout: 248 seconds]
angelixd has quit [Ping timeout: 248 seconds]
canton7 has quit [Ping timeout: 248 seconds]
stonecolddevin has quit [Ping timeout: 248 seconds]
bricker`work has quit [Ping timeout: 248 seconds]
lurraca has quit [Ping timeout: 248 seconds]
ageis has quit [Ping timeout: 248 seconds]
naquad has quit [Ping timeout: 248 seconds]
Gate_ has quit [Ping timeout: 248 seconds]
joelio has quit [Ping timeout: 248 seconds]
mumblerit has quit [Ping timeout: 248 seconds]
mnemon has quit [Ping timeout: 248 seconds]
TDJACR has quit [Ping timeout: 248 seconds]
jpun has quit [Ping timeout: 248 seconds]
Haegin_ has quit [Ping timeout: 248 seconds]
jaredrhine_ has quit [Ping timeout: 248 seconds]
jpun has joined #ruby
error404 has quit [Ping timeout: 248 seconds]
xibalba_ is now known as xibalba
Guest96446 is now known as mumblerit
Synapsis is now known as Inoperable
tyfighter_ is now known as tyfighter
xibalba has quit [Changing host]
xibalba has joined #ruby
larissa has quit [Ping timeout: 248 seconds]
<bnagy> again, if and only if I have enough data
vereteran has joined #ruby
ggherdov_ is now known as ggherdov
error404 has joined #ruby
mumblerit is now known as Guest89829
TDJACR has joined #ruby
larissa has joined #ruby
peterdec_ has joined #ruby
<bnagy> ignoring the base part for a sec, if you have an n symbol alphabet and you map plain -> cipher with that, I will need at least 2x n to start to make effective guesses
mmcdaris has quit [Quit: mmcdaris]
<bnagy> unless you're unlucky
mnemon has joined #ruby
<mark06> bnagy: you can generate any sample data with that... it's a standalone program.... if your program can break it with some amount of data, that's ok to discard the original challenge...
<bnagy> the thing that I think is wrong with it, basically, is that I will be able to see frequncy distribution as soon as I guess your base(s)
<mark06> code! code! code! code! code! code!
<bnagy> code it yourself, dude
<mark06> hahaha
<mark06> I don't know how to break it
<bnagy> that's how people learn crypto - you gotta break it yourself
<mark06> I asked....
<bnagy> ok, start by coding something to do frequency analysis
peterdecroos has quit [Ping timeout: 245 seconds]
<mark06> I don't know how that applies to it
<bnagy> then work out how to compare observed frequency with the frequency of your input language ( the plain )
<mark06> don't 'ignore' the bases... it's the core of it
<bnagy> because if I know the bases all I need to do is substitute, right?
<mark06> there's no concept of language
<mark06> it encrypts a set of bytes
<bnagy> at that point it's just a shuffled alphabet
<bnagy> yeah but let's say those bytes are english text
<mark06> then prove what you're saying.... or join those that just sound really cool without making it! :P
<mark06> no
<mark06> no english text....
<bnagy> well if you encrypt random noise then any algorithm looks good :)
<mark06> unless you mean we take bytes which are english text on a given encoding....
lyanchih has quit [Quit: lyanchih]
fgo has quit [Remote host closed the connection]
<mr`spock> encryption is easy. just md5 it
<bnagy> well encoding doesn't really come into it
s_e_ has joined #ruby
<mark06> ah wait the program has a bug in parameter handling!
<mark06> which proves no one really ran it! :P
<mr`spock> /s
<bnagy> I read it - running it is kind of irrelevant
<mark06> *a bug in help text
mbessey_ has joined #ruby
fgo_ has joined #ruby
s_e has quit [Ping timeout: 246 seconds]
pr0ggie has quit [Ping timeout: 246 seconds]
Kovensky has quit [Ping timeout: 246 seconds]
pu22l3r has quit [Remote host closed the connection]
Kovensky has joined #ruby
<bnagy> anyway, if you want to learn then you should break it yourself, not get people to do it for you
pu22l3r has joined #ruby
pr0ggie has joined #ruby
<bnagy> saying "I did this and I can't break it" is a classic beginner crypto thing
zeade has quit [Quit: Leaving.]
<bnagy> if you show that it resists frequency analysis once the base is guessed then people will ( possibly ) at least look at your work
mbessey has quit [Ping timeout: 244 seconds]
platzhirsch has left #ruby [#ruby]
mrsolo has joined #ruby
rickruby has joined #ruby
<bnagy> actually.. I think you need to show it resists frequency analysis even with an unknown base...
<mark06> bnagy: I don't give a damn what kind of question is it...
<bnagy> cause it's not clear to me from reading it that it does
pu22l3r has quit [Ping timeout: 268 seconds]
pwh has quit []
<mark06> dude.... I know about frequency... I just don't get how frequency would apply it....
<mark06> apply to it
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<mark06> there was a frequency problem in the delphi version, which has been replaced with a computation problem now in ruby....
mmcdaris has joined #ruby
<bnagy> what happens when you encrypt say 1000 * 0x41 ?
rickruby has quit [Ping timeout: 252 seconds]
<bnagy> wait your max base is 1024, say 5000
<mark06> the frequency problem in delphi was its integer limit... I didn't bother to work with big integers of arbitrary size... so the old implementation had a formatting phase where I would separate input into blocks.... these blocks being able to be converted to a decimal int64 or something....
havenwood has joined #ruby
<bnagy> if that output doesn't test as random then you're already hosed
<mark06> ... so the encryption was done by encoding a block..... which leads to frequency analysis......or leads more....
<mark06> however in this ruby implementation I did not need to care about integer size, which essentially means ....
<mark06> it means if you pass a big set of bytes as input, say 1MB of input, that 1MB would be interpreted as a *really* big number....which leads to.....
iamjarvo1 has quit [Ping timeout: 244 seconds]
DanBoy has joined #ruby
<mark06> leads to the fact that it does not allow arbitrary sizes, due to computational problem.... but the block size (no idea what is the max size) is way better than before....
mmcdaris has quit [Client Quit]
<bnagy> heh, you should also test 5000 * 0x00 :)
<mark06> I took several lines from a log file as example, and ruby was really fast, a couple of seconds or even less
<mark06> hmmm what's that?
<bnagy> a big block of null as input
<mark06> 1000 * 0x41? ah ok let me see...
<mark06> 0x41 is 'A', right? null? should not be null
vlad_starkov has joined #ruby
<bnagy> no my second comment - test like 5000 0x00
<bnagy> but 5000 * 0x41 is also interesting
neeewb has quit [Read error: Connection reset by peer]
thepumpkin has quit [Remote host closed the connection]
<bnagy> anyway the idea is to see if the ciphertext is frequency skewed
<bnagy> if it is then you're in trouble
sayan has joined #ruby
thepumpkin has joined #ruby
Clooth has quit [Quit: Leaving...]
mercwithamouth has quit [Ping timeout: 265 seconds]
sayan has quit [Read error: Connection reset by peer]
baroquebobcat has quit [Quit: baroquebobcat]
sayan has joined #ruby
<mark06> odd... there's a pattern in the middle...
<bnagy> there's a pattern all the way through
<bnagy> unfocus your eyes a bit you'll see the diagonal 'lines' right away
<havenwood> my eyes were unfocused to start with >.> definitely see it
<havenwood> P6gYNCa ad infinitum
<mark06> the min and max base, and the target base 64, no special reason for them... there's some rules (e.g. they obviously can be equal, both bases, or they can't be 10) but it's unclear to me what are 'good bases'
tyfighter has quit [Quit: tyfighter]
thepumpkin has quit [Ping timeout: 272 seconds]
<bnagy> mark06: basically what you're seeing are the 'columns' I'm talking about, it's the base showing through
<bnagy> when you guess the base those will line up
<bnagy> so A at column X will always encrypt to say /
<bnagy> once that happens, I can break each column like it's own 'simple' substitution cipher
<bnagy> *its dammit
<bnagy> fricking freezing AC in here, killing my typing
thams has joined #ruby
wallerdev has quit [Quit: wallerdev]
rjhunter has quit [Remote host closed the connection]
freerobby has joined #ruby
<bnagy> it's kind of cool the pattern doesn't start for a while..
<bnagy> maybe we're seeing a repeating 'remainder' like in long division
<bnagy> but anyway, output with entropy that low from chosen plain is pretty much a 'throw it away and try something else' indicator
<bnagy> sorry :(
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Ping timeout: 252 seconds]
<mark06> this is the result of encoding a sequence of 5000 0x00 bytes: http://pastie.org/8467110
tomzx_mac has quit [Ping timeout: 246 seconds]
byprdct has joined #ruby
<mark06> that basically means a repeated sequence of digits... but only in the middle.... crazy....
Kricir has joined #ruby
<bnagy> no it's repeated all the way after a certain lead-in
<mark06> *they obviously can't be equal
<bnagy> last trigram is VLh, right? Look at all the occurences
<bnagy> it's kind of interesting to work out why, but I don't know if it matters for the purposes of breaking the system
<bnagy> I'm wondering about division precision and remainders, but I'm not sure
TheShaun|AFK is now known as TheShaun
<mark06> no it does not repeat forever....
byprdct has quit [Client Quit]
<mark06> in both examples, the final part is different....
devyn_ has quit [Quit: leaving]
julian-delphiki has joined #ruby
<bnagy> /HTqFFclwbyh5eQ9JXUPm5l+9SYAI0SUVLhGbzerRJuODB7C870jMVG2nc does
kobain has quit []
<bnagy> the very end is different because it's cut off
<mark06> either way if finding out the bases would mean reducing it to a substitution problem, then the natural guess would increase the range of bases, including for the target base which is now static, 64
<bnagy> the VLh appears about halfway through, see?
<mark06> cut off by what?
<bnagy> the end of the input
kcombs has quit [Ping timeout: 252 seconds]
mary5030 has joined #ruby
<mark06> the end of input cut off itself???
<mark06> or rather the program?
<bnagy> no that pattern is um.. 58 bytes long
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
<bnagy> so the input length % 58 isn't 0, that's all
vpretzel has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
vpretzel has joined #ruby
<bnagy> which is not the same as saying 58 is the base, it's an artifact of some sort though
Kricir has quit [Remote host closed the connection]
<mark06> the output is indeed correct, just confirmed
bean has quit [Ping timeout: 265 seconds]
<mark06> I was able to get a 5000 * 0x00 output back when I decoded that long Base64 string....
<bnagy> anyway, mission 1 is to modify it until chosen plaintext encryption passes randomness tests
<mark06> just confirmed in notepad++... 5000 null chars
<bnagy> for all possible bases, as well :<
<bnagy> otherwise you have a weak-key problem
kofno has joined #ruby
DanKnox_away is now known as DanKnox
<mark06> I guess the repetition means just something like converting a number to base 10 and, say, it looks like 211312321999900009999000099990000999900009999000021321423
vpretzel_ has joined #ruby
<bnagy> that's my leading theory, yeah
vpretzel has quit [Read error: Connection reset by peer]
awkwords has quit [Quit: Leaving.]
lukec has joined #ruby
rezzack has quit [Ping timeout: 245 seconds]
<mark06> which in turn, I don't know how problematic it is exactly, even though it looks like.....
vpretzel_ has quit [Read error: Connection reset by peer]
<bnagy> it definitely is, believe me
<DanBoy> hello everybody
vpretzel has joined #ruby
<mark06> but it's funny how 1000 A letters become that thing, but repeated only in the middle.... and the same for 5000 null chars.....
<bnagy> even if I can't tell you _exactly_ why :)
mbessey_ has quit [Remote host closed the connection]
<havenwood> hellooo
pwh has joined #ruby
huttan has joined #ruby
mbessey has joined #ruby
mbessey has quit [Read error: Connection reset by peer]
asteros has joined #ruby
<mark06> if encoding output was all equal I would be sure there's static a relation between input and output... but the pattern is only in the middle.... I do think there's a relation.... it's not a coincidence for sure.....
mbessey has joined #ruby
<bnagy> it's definitely NOT just in the middle
jkhwan has joined #ruby
<bnagy> it just repeats indefinitely after a certain point
<bnagy> if you want to poke around, maybe add an API to fix the bases, and try assorted chosen plain encryptions with given bases
<mark06> NO!
<mark06> THE END is different, even if small for the null example
<bnagy> it's not
<mark06> by middle I don't mean small too
<mark06> IT IS
<bnagy> that's just where you run out of input
kofno has quit [Ping timeout: 264 seconds]
<bnagy> ok sec..
dhruvasagar has joined #ruby
huttan has quit [Ping timeout: 245 seconds]
<bnagy> that's your null, formatted to 58 columns
vlad_starkov has quit [Ping timeout: 252 seconds]
kayloos has joined #ruby
<mark06> ah just confirmed for the A example as well... got confused with npp's highlight....
<mark06> but it's funny how the pattern is cut in the middle... where the single A/null were not "cut in the muddle"....
<mark06> I would expect the pattern to repeat completely in last line....
jkhwan has quit [Remote host closed the connection]
<bnagy> add ... uh.. 15 more nulls, I guess
<bnagy> and encrypt
jkhwan has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
DanKnox is now known as DanKnox_away
<mark06> ah no wait... I was looking at the null sample not A....
jkhwan has quit [Read error: Connection reset by peer]
jkhwan has joined #ruby
jkhwan has quit [Remote host closed the connection]
mrsolo has joined #ruby
dkamioka has quit [Remote host closed the connection]
<mark06> the A sample gets repeated on column 29
nisstyre has quit [Quit: Leaving]
dkamioka has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
Raimondii has joined #ruby
dkamioka has quit [Ping timeout: 264 seconds]
lethjakman has joined #ruby
bricker`LA has joined #ruby
<mark06> so added a few more A's to input and guess what? the *beginning* has changed, not the ending part.... http://pastie.org/8467140
lethjakm1 has quit [Ping timeout: 252 seconds]
aces1up23 has quit []
Raimondi has quit [Ping timeout: 272 seconds]
<bnagy> yeah but it would line up now is all I'm saying. You changed your initial number, so the start is where it's still dividing 'cleanly'
<bnagy> ( I theorise )
mr`spock has quit [Quit: Leaving]
<bnagy> dump out the 'key' - like the base and the shuffled alphabet
<mark06> you said to test if adding a few more units would complete last column, it didn't...
<mark06> about randomization.... the digits are of static length... equal to 1 byte....
fgo_ has quit [Remote host closed the connection]
<bnagy> it didn't? But line 24 is longer, surely if you printed it again wrapped at n it would line up now?
<mark06> if I remember correctly, when I studied RSA, the book was taking blocks from input of as much size as needed.... so....
banghouse2 has joined #ruby
Lewix has quit [Remote host closed the connection]
<bnagy> the repeating portion is not the whole alphabet, so we're hitting offsets in that array - if those offsets are evenly spaced, then I bet you can leak alphabet by chosen plain
ner0x has quit [Quit: Leaving]
<mark06> so what if instead of splitting input into bytes, I rather split it into sets of bits as big as the source base can hold.... that is....
nobitanobi has quit [Ping timeout: 272 seconds]
<DanBoy> guys ever hear of rot13
<bnagy> I only use 2rot13
rippa has joined #ruby
<mark06> hmm that's what they use on my Programming Mother**cker T-Shirt, I guess :D
<bnagy> mark06: I can highly recommend the matasano crypto challenges
zz_karupanerura is now known as karupanerura
<mark06> ...that is... currently digits can be 0..255... what if I allow it to be 256..1023... and heavily increase the base range..... making it not just more random (harder to figure out which base is it) but also allowing the input blocks (currently bytes) to be of arbitrary size (as long as base can hold).... hmmm NOT GOOD
<bnagy> I think getting a feel for some basic building blocks of attacking simple ciphers will help you a lot
thams has quit [Quit: thams]
<bnagy> like I said, you need to break your own ciphers, it's the only way to learn
zz_scottstamp is now known as scottstamp
hamakn has joined #ruby
<bnagy> or at least know some tests to see if they're even worth pursuing
karupanerura is now known as zz_karupanerura
<bnagy> not trying to be condescending
<bnagy> they're also good programming exercises
<mark06> line 24 is longer cause that's the diff in the beginning... this paste is a full diff, all the rest is equal... http://pastie.org/8467140
amritanshu_RnD has joined #ruby
bret has quit [Ping timeout: 244 seconds]
<mark06> hmmm NOT GOOD => because base would have too few possible digits.... or maybe not.... hummm.....
<havenwood> “What you can’t divide by two, is not very good for you.”
lucazi has joined #ruby
ninegrid has quit [Ping timeout: 272 seconds]
<havenwood> 2048ROT13
Lewix has joined #ruby
RichardBaker has joined #ruby
<bnagy> I only use that for password hashes, to increase attack time
<bnagy> it's really only marginally more secure than 512ROT13
<bnagy> because of the meet-in-the-middle attack
sross has quit [Read error: Connection reset by peer]
<havenwood> and not break any 1990's crypto export laws
sross has joined #ruby
<mark06> base.possible_digits(size=1..x) vs. base.possible_digits(size=x+1), where (x+1).to_base10(from_base=base) < base... or something like that
<mark06> your own ciphers, it's the only way to learn -- of course not...
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mark06> havenwood: break it please! if you want of course... https://gist.github.com/anonymous/7382052
peterdec_ has quit [Remote host closed the connection]
<bnagy> you almost have enough to break it yourself, I think :)
peterdecroos has joined #ruby
BizarreCake has joined #ruby
freerobby has joined #ruby
mary5030 has quit [Remote host closed the connection]
<bnagy> especially if it's leaking 'key' bytes like I think it is
dkamioka has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
zigomir has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
shiney has joined #ruby
fijimunk1i has quit [Ping timeout: 240 seconds]
<mark06> s/ base.possible_digits.*// :-/
peterdecroos has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
lurraca_ has quit [Quit: This computer has gone to sleep]
bret has joined #ruby
freerobby has quit [Ping timeout: 272 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
larissa has quit [Quit: Leaving]
ninegrid has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
dkamioka has joined #ruby
waxjar has quit [Quit: ZNC - http://znc.in]
Parduse has quit [Ping timeout: 244 seconds]
fgo has joined #ruby
jkhwan has joined #ruby
jph- has joined #ruby
sergicles has joined #ruby
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
lucazi has quit [Ping timeout: 265 seconds]
<havenwood> mark06: i'll try later, gotta crash now :)
<havenwood> g'night
robertjpayne has joined #ruby
bret has quit [Remote host closed the connection]
havenwood has quit []
<DanBoy> m etoo
dkamioka has quit [Ping timeout: 265 seconds]
pwh has quit []
rodan- has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
earthquake has joined #ruby
rodan- has joined #ruby
simoz has joined #ruby
hiall has quit [Quit: hiall]
<robertjpayne> Are there any mirrors for rubyforge? Have a few gems that host their documentation there and can't find it now :(
rodan- has quit [Ping timeout: 241 seconds]
<mark06> thanks... I had an idea about randomizing the length of the first n digits (currently they're all 1 byte)... then store this pattern as another part of the key... n would be as big as resistant against attacks, and as small as computationally reasonable...
zastern has joined #ruby
<mark06> well... anyway gotta go... thanks all.... thanks bnagy... it was certainly a good start.... good night all!
mark06 has left #ruby [#ruby]
<bnagy> ok, night - don't forget your statistical tests :P
weszlem has joined #ruby
ziyadb has quit [Ping timeout: 260 seconds]
<bnagy> oh
neurohr has quit [Remote host closed the connection]
<bnagy> my
weszlem has quit [Client Quit]
<bnagy> GROD
ziyadb has joined #ruby
<bnagy> well that pretty much made my day
<bnagy> guess it's back to disassembly engine bindings :(
mbessey has quit [Remote host closed the connection]
simoz has quit [Ping timeout: 240 seconds]
deshon has joined #ruby
mbessey has joined #ruby
rockets has quit [Ping timeout: 272 seconds]
mbessey_ has joined #ruby
mbessey has quit [Read error: Connection reset by peer]
lyanchih has joined #ruby
rickruby has joined #ruby
h0rrorvacui has quit [Quit: Leaving]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
rickruby has quit [Ping timeout: 240 seconds]
apeiros has quit [Ping timeout: 245 seconds]
lukec has quit [Quit: lukec]
marr has joined #ruby
peterdecroos has joined #ruby
thepumpkin has joined #ruby
Parduse has joined #ruby
marr has quit [Ping timeout: 244 seconds]
thepumpkin has quit [Ping timeout: 265 seconds]
Astralum has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
brennanMKE has quit [Remote host closed the connection]
Tuxist has joined #ruby
brennanMKE has joined #ruby
freerobby has joined #ruby
brennanMKE has quit [Ping timeout: 241 seconds]
noop has joined #ruby
ChronocityLC has joined #ruby
Parduse has quit []
TheSpectre has joined #ruby
Parduse has joined #ruby
carraroj has joined #ruby
osvico has quit [Ping timeout: 245 seconds]
brtdv has joined #ruby
claymore has joined #ruby
freerobby has quit [Ping timeout: 264 seconds]
decoponio has joined #ruby
huttan has joined #ruby
apeiros has joined #ruby
Lewix has quit [Remote host closed the connection]
vince_prignano has joined #ruby
mbessey_ has quit [Remote host closed the connection]
mbessey has joined #ruby
Raimondi has joined #ruby
huttan has quit [Ping timeout: 272 seconds]
Raimondii has quit [Ping timeout: 265 seconds]
dkamioka has joined #ruby
mbessey has quit [Ping timeout: 245 seconds]
s3itz has quit [Quit: Textual IRC Client: www.textualapp.com]
kofno has joined #ruby
DouweM has quit [Ping timeout: 268 seconds]
dkamioka has quit [Ping timeout: 245 seconds]
mrsolo has joined #ruby
deshon has quit [Remote host closed the connection]
trunnell has joined #ruby
Parduse has quit []
jkhwan has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 245 seconds]
madb055 has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby
Parduse has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
brennanMKE has joined #ruby
kevinykchan has joined #ruby
madb055 has joined #ruby
trunnell has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 272 seconds]
brennanMKE has quit [Ping timeout: 272 seconds]
oyola has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
brtdv has quit []
staafl has joined #ruby
mbessey has joined #ruby
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 245 seconds]
sguselnikov has joined #ruby
krz has joined #ruby
sguselnikov has quit [Client Quit]
timonv has joined #ruby
coca_rails has joined #ruby
sevenseacat has joined #ruby
drumusician has joined #ruby
jwang has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran1 has quit [Ping timeout: 245 seconds]
jwang has joined #ruby
<coca_rails> Anyone here familiar with Blacklight?
coca_rails was kicked from #ruby by apeiros [if you cross-post, at the very least announce in all channels where you post, that you cross-post. thanks. (this is only a kick, not a ban)]
coca_rails has joined #ruby
arietis has joined #ruby
<coca_rails> .
Raimondi has left #ruby ["WeeChat 0.4.2"]
asteros has quit [Quit: asteros]
newbiehacker has joined #ruby
ananthakumaran has quit [Ping timeout: 248 seconds]
shvelo has joined #ruby
asteros has joined #ruby
ananthakumaran has joined #ruby
drumusician has quit [Ping timeout: 245 seconds]
robertjpayne has quit []
asteros has quit [Client Quit]
carraroj has quit [Ping timeout: 264 seconds]
scottstamp is now known as zz_scottstamp
vlad_starkov has joined #ruby
threesome has joined #ruby
zz_scottstamp is now known as zz_zz_scottstamp
kevinykchan has quit [Quit: Computer has gone to sleep.]
InFlames has joined #ruby
Astralum has quit [Ping timeout: 264 seconds]
relix has joined #ruby
brtdv has joined #ruby
valesk has joined #ruby
jaimef has quit [Remote host closed the connection]
_Andres has joined #ruby
peterdecroos has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
peterdecroos has joined #ruby
peterdecroos has quit [Remote host closed the connection]
peterdecroos has joined #ruby
freerobby has joined #ruby
valesk has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
LMolr has joined #ruby
LMolr has quit [Read error: Connection reset by peer]
newbiehacker has quit [Ping timeout: 248 seconds]
peterdecroos has quit [Ping timeout: 265 seconds]
freerobby has quit [Ping timeout: 272 seconds]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
jbpros has joined #ruby
hackeron has quit [Read error: Connection reset by peer]
hackeron has joined #ruby
ChronocityLC has quit [Ping timeout: 264 seconds]
jaimef has joined #ruby
io_syl has quit []
shvelo has quit [Ping timeout: 272 seconds]
kayloos has quit [Remote host closed the connection]
kayloos has joined #ruby
drumusician has joined #ruby
io_syl has joined #ruby
Bry8Star{T2 has joined #ruby
jbpros has quit [Quit: jbpros]
shvelo has joined #ruby
brtdv has quit []
Parduse has quit []
dkamioka has joined #ruby
kayloos has quit [Ping timeout: 244 seconds]
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
Parduse has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
dkamioka has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
brtdv has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
timonv has joined #ruby
vlad_starkov has joined #ruby
drumusician has quit [Ping timeout: 265 seconds]
hogeo has quit [Ping timeout: 272 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
jbpros has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
Kabaka has quit [Ping timeout: 240 seconds]
lyanchih has quit [Quit: lyanchih]
jbpros has quit [Client Quit]
brennanMKE has joined #ruby
Kabaka has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
xk_id has joined #ruby
Jonah11_ has joined #ruby
brennanMKE has quit [Ping timeout: 244 seconds]
xk_id has quit [Client Quit]
<Jonah11_> the various ways of invoking a proc (#[], #call, #===) are listed as instance methods on the Proc class. But there is also the fourth way (my_proc.() ) which is not listed. so what *is* it? is it somehow an alias for call? but if it's an alias, that means it's name is the empty string???
addisaden has joined #ruby
addisaden has left #ruby [#ruby]
carraroj has joined #ruby
carraroj has quit [Changing host]
carraroj has joined #ruby
<Hanmac1> Jonah11_:
<Hanmac1> >> Object.new.()
<eval-in_> Hanmac1 => undefined method `call' for #<Object:0x41b7933c> (NoMethodError) ... (https://eval.in/64483)
Hanmac1 is now known as Hanmac
<Hanmac> its syntax sugAR ;P
xk_id has joined #ruby
<Jonah11_> Hanmac, are you saying it's like a hardcoded syntax shortcut for .call() -- almost working like a C macro, ie, .() is replace with .call() everywhere in your code you use it?
<Hanmac> yeah the parser does that for you
huttan has joined #ruby
<Jonah11_> Hanmac, so technically it is not an alias? it's just a builtin?
<apeiros> Jonah11_: it's syntax
<apeiros> but now I wonder whether it invokes .call or something else
<Jonah11_> apeiros, based on Hanmac's eval-in_ above, it seems it is invoking call...
<Hanmac> i think the parser simply replaces .() with .call()
<apeiros> it invokes call
<apeiros> x = BasicObject.new; def x.method_missing(*args); Kernel.p method_missing: args end; x.("foo", 12)
<apeiros> >> x = BasicObject.new; def x.method_missing(*args); Kernel.p method_missing: args end; x.("foo", 12)
<eval-in_> apeiros => {:method_missing=>[:call, "foo", 12]} ... (https://eval.in/64484)
<apeiros> oh… they changed constant lookup of basic object in 2.0?
<apeiros> I remember that I had to do ::Kernel in 1.9…
<apeiros> 19>> x = BasicObject.new; def x.method_missing(*args); Kernel.p method_missing: args end; x.("foo", 12)
<eval-in_> apeiros => {:method_missing=>[:call, "foo", 12]} ... (https://eval.in/64485)
<apeiros> now I'm confused
Astralum has joined #ruby
<Hanmac> >> puts RubyVM::InstructionSequence.compile("self.()").disasm
<eval-in_> Hanmac => == disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>========== ... (https://eval.in/64486)
<apeiros> aha!
<apeiros> it only applies when subclassing BasicObject
fgo has quit [Remote host closed the connection]
<apeiros> >> class X < BasicObject.new; def method_missing(*args); Kernel.p method_missing: args end; end; X.new.("foo", 12)
<eval-in_> apeiros => superclass must be a Class (BasicObject given) (TypeError) ... (https://eval.in/64487)
<apeiros> >> class X < BasicObject; def method_missing(*args); Kernel.p method_missing: args end; end; X.new.("foo", 12)
<eval-in_> apeiros => uninitialized constant X::Kernel (NameError) ... (https://eval.in/64488)
<apeiros> ^
<apeiros> >> class X < BasicObject; def method_missing(*args); ::Kernel.p method_missing: args end; end; X.new.("foo", 12)
<eval-in_> apeiros => {:method_missing=>[:call, "foo", 12]} ... (https://eval.in/64489)
<apeiros> tadaa
<Hanmac> apeiros: as you can see in my disasm there is no other stuff it direclty trys do call "call"
<apeiros> Hanmac: yupp
<Jonah11_> awesome, ty guys
coca_rails has quit [Remote host closed the connection]
Shellcat has quit [Quit: Later peeps]
xk_id has quit [Quit:
predator117 has quit [Ping timeout: 264 seconds]
thepumpkin has joined #ruby
madb055 has quit [Ping timeout: 245 seconds]
xk_id has joined #ruby
barratt has joined #ruby
thepumpkin has quit [Ping timeout: 272 seconds]
predator117 has joined #ruby
Jetchisel has joined #ruby
FatWreckord has joined #ruby
jrhe has joined #ruby
vince_prignano has quit []
adambeynon has joined #ruby
jwang has quit [Ping timeout: 272 seconds]
freerobby has joined #ruby
freerobby has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Remote host closed the connection]
simoz has joined #ruby
MrZYX|off is now known as MrZYX
vlad_starkov has joined #ruby
sevenseacat has quit [Ping timeout: 240 seconds]
Lewix has quit [Remote host closed the connection]
io_syl has quit []
Parduse has quit []
kayloos has joined #ruby
TheShaun is now known as TheShaun|AFK
artm has joined #ruby
fgo has joined #ruby
jwang has joined #ruby
lyanchih has joined #ruby
sevenseacat has joined #ruby
dkamioka has joined #ruby
coca_rails has joined #ruby
ananthakumaran1 has joined #ruby
flops has joined #ruby
ananthakumaran has quit [Ping timeout: 264 seconds]
kofno has joined #ruby
kaldrenon has joined #ruby
DanBoy has quit [Remote host closed the connection]
DanBoy has joined #ruby
dkamioka has quit [Ping timeout: 245 seconds]
guitsaru has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fgo has quit [Remote host closed the connection]
fgo has joined #ruby
kofno has quit [Ping timeout: 245 seconds]
kaldrenon has quit [Ping timeout: 265 seconds]
dkamioka has joined #ruby
pskosinski has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
simoz has quit [Ping timeout: 252 seconds]
dkamioka has joined #ruby
Hanmac1 has joined #ruby
hogeo has joined #ruby
brennanMKE has joined #ruby
lkba has quit [Ping timeout: 272 seconds]
Hanmac has quit [Ping timeout: 264 seconds]
ananthakumaran1 has quit [Quit: Leaving.]
flops_ has joined #ruby
sepp2k has joined #ruby
dkamioka has quit [Ping timeout: 248 seconds]
Astralum has quit [Ping timeout: 272 seconds]
brennanMKE has quit [Ping timeout: 245 seconds]
hogeo has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
Jetchisel has quit [Ping timeout: 260 seconds]
flops has quit [Ping timeout: 248 seconds]
newbiehacker has joined #ruby
Hanmac1 is now known as Hanmac
rickruby has joined #ruby
kayloos has quit [Remote host closed the connection]
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Parduse has joined #ruby
tkuchiki has joined #ruby
vlad_starkov has joined #ruby
krz has quit [Quit: krz]
vlad_starkov has quit [Remote host closed the connection]
ua_ has joined #ruby
rickruby has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
tkuchiki has quit [Ping timeout: 272 seconds]
ua has quit [Ping timeout: 260 seconds]
bret has joined #ruby
kayloos has joined #ruby
coca_rails has quit [Read error: Connection reset by peer]
banisterfiend has quit [Quit: Computer has gone to sleep.]
coca_rails has joined #ruby
platypine has quit [Ping timeout: 244 seconds]
Tuxist has quit [Quit: No Ping reply in 180 seconds.]
ewnd9 has joined #ruby
Tuxist has joined #ruby
sevenseacat has quit [Ping timeout: 265 seconds]
coca_rails has quit [Ping timeout: 245 seconds]
burgess has joined #ruby
ewnd9 has quit [Read error: Connection reset by peer]
ewnd9_ has joined #ruby
Jetchisel has joined #ruby
simoz has joined #ruby
krz has joined #ruby
banisterfiend has joined #ruby
zarubin has joined #ruby
freerobby has joined #ruby
timonv has joined #ruby
flops_ has quit [Quit: leaving]
brtdv has quit [Read error: Connection reset by peer]
burgess has quit [Quit: ^ddd]
freerobby has quit [Ping timeout: 264 seconds]
Parduse has quit [Read error: Connection reset by peer]
SHyx0rmZ has joined #ruby
_HolyCow1 has joined #ruby
Parduse has joined #ruby
brtdv has joined #ruby
_HolyCow has quit [Ping timeout: 240 seconds]
Parduse has quit [Client Quit]
Tuxist has quit [Remote host closed the connection]
jbpros has joined #ruby
hiall has joined #ruby
Parduse has joined #ruby
xk_id has quit [Quit:
Tuxist has joined #ruby
jrhe has quit [Ping timeout: 248 seconds]
alem0lars has joined #ruby
Parduse has quit []
vlad_starkov has quit [Remote host closed the connection]
jrhe has joined #ruby
vlad_starkov has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
TheShaun|AFK is now known as TheShaun
falood has quit [Remote host closed the connection]
hiall has quit [Quit: hiall]
Parduse has joined #ruby
hiall has joined #ruby
justsee has joined #ruby
alem0lars has quit [Quit: Bye !]
dkamioka has joined #ruby
alem0lars has joined #ruby
<alem0lars> Hi
lyanchih has quit [Quit: lyanchih]
Mon_Ouie has quit [Read error: Operation timed out]
lyanchih has joined #ruby
amacgregor has joined #ruby
dkamioka_ has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
ycy_ has joined #ruby
pardusf has joined #ruby
Parduse has quit [Killed (barjavel.freenode.net (Nickname regained by services))]
pardusf is now known as parduse
ewnd9_ has quit [Ping timeout: 264 seconds]
lyanchih has quit [Client Quit]
dkamioka_ has quit [Ping timeout: 272 seconds]
buscon has joined #ruby
krz has quit [Read error: Connection reset by peer]
olivier_bK has joined #ruby
Astralum has joined #ruby
apeiros has joined #ruby
aapzak has quit [Ping timeout: 245 seconds]
simoz2 has joined #ruby
rickruby has joined #ruby
aapzak has joined #ruby
simoz has quit [Ping timeout: 248 seconds]
apeiros has quit [Ping timeout: 264 seconds]
aagdbl has joined #ruby
pr0ggie has quit [Read error: Operation timed out]
wzbyte has joined #ruby
rickruby has quit [Ping timeout: 240 seconds]
kirun has joined #ruby
pr0ggie has joined #ruby
wzbyte has quit [Read error: Connection reset by peer]
pdimitrov has quit [Ping timeout: 244 seconds]
pdimitrov has joined #ruby
wzbyte has joined #ruby
wzbyte has quit [Remote host closed the connection]
DonRichie has joined #ruby
jbpros has quit [Quit: jbpros]
brtdv has quit []
krz has joined #ruby
coca_rails has joined #ruby
thepumpkin has joined #ruby
ewnd9_ has joined #ruby
coca_rails has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
thepumpkin has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
ZoanthusR has joined #ruby
sayan has quit [Ping timeout: 240 seconds]
InFlames has quit [Ping timeout: 240 seconds]
brtdv has joined #ruby
Mon_Ouie has joined #ruby
jrhe has quit [Quit: jrhe]
simoz2 has quit [Read error: Connection timed out]
freerobby has joined #ruby
sayan has joined #ruby
DaniG2k has joined #ruby
alem0lars has left #ruby [#ruby]
kaspergrubbe has joined #ruby
lkba has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
krz has quit [Read error: Connection reset by peer]
buscon has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 264 seconds]
coca_rails has joined #ruby
osvico has joined #ruby
mrfoto has joined #ruby
sevenseacat has joined #ruby
coca_rails has quit [Ping timeout: 245 seconds]
InFlames has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
osvico has quit [Ping timeout: 272 seconds]
olivier_bK has quit [Ping timeout: 252 seconds]
simoz has joined #ruby
aagdbl has quit [Ping timeout: 244 seconds]
d45h has joined #ruby
eka has joined #ruby
buscon has joined #ruby
simoz has quit [Read error: Connection timed out]
gyre007 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
pr0ggie has quit [Ping timeout: 245 seconds]
pr0ggie has joined #ruby
pdimitrov has quit [Ping timeout: 244 seconds]
pdimitrov has joined #ruby
kofno has joined #ruby
fluffheadsr has joined #ruby
fluffheadsr is now known as Guest51536
jrhe has joined #ruby
ph8 has quit [Read error: Operation timed out]
vlad_starkov has joined #ruby
buscon has quit [Remote host closed the connection]
coca_rails has joined #ruby
kayloos has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 244 seconds]
kayloos has joined #ruby
Matix has quit [Quit: Leaving]
krz has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
michael_mbp is now known as zz_michael_mbp
kayloos_ has joined #ruby
kayloos has quit [Read error: Connection reset by peer]
zz_michael_mbp is now known as michael_mbp
ph8 has joined #ruby
Beoran__ has joined #ruby
gyre007 has joined #ruby
lele has left #ruby ["Leaving"]
coca_rails has quit [Remote host closed the connection]
Beoran_ has quit [Ping timeout: 260 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
SeySayux has quit [Ping timeout: 244 seconds]
DouweM has joined #ruby
bricker`1ork has quit [Ping timeout: 244 seconds]
SeySayux has joined #ruby
Muz has quit [Ping timeout: 252 seconds]
bricker`work has joined #ruby
arietis has joined #ruby
threesome has quit [Ping timeout: 264 seconds]
avo has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
avo has quit [Client Quit]
coca_rails has joined #ruby
coca_rails has quit [Remote host closed the connection]
galanm has joined #ruby
wallerdev has joined #ruby
jrhe has quit [Quit: jrhe]
justsee has quit [Ping timeout: 272 seconds]
mixel has joined #ruby
jibi has joined #ruby
wallerdev has quit [Client Quit]
jrhe has joined #ruby
heftig has quit [Ping timeout: 260 seconds]
heftig has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
krz has quit [Quit: krz]
krz has joined #ruby
barratt has quit [Quit: Leaving...]
khushildep has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DaniG2k has quit [Quit: leaving]
tvw has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
tvw has quit [Ping timeout: 248 seconds]
vlad_starkov has joined #ruby
timonv has joined #ruby
freerobby has joined #ruby
bluenemo has quit [Ping timeout: 245 seconds]
timonv has quit [Read error: Operation timed out]
khushildep has quit [Quit: khushildep]
iaj has quit [Ping timeout: 240 seconds]
freerobby has quit [Ping timeout: 265 seconds]
s_e_ is now known as s_e
barratt has joined #ruby
jalcine has joined #ruby
timonv has joined #ruby
_Andres has quit [Ping timeout: 264 seconds]
jibi has quit [Quit: .]
rockets has joined #ruby
_Andres has joined #ruby
vlad_sta_ has joined #ruby
zastern has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
vlad_sta_ has quit [Remote host closed the connection]
kofno has joined #ruby
kaspergrubbe has quit []
wallerdev has joined #ruby
maroloccio has joined #ruby
nbrosnahan has joined #ruby
wallerdev has quit [Client Quit]
Emmanuel_Chanel has quit [Quit: Leaving]
iaj has joined #ruby
spike|spiegel has quit [Quit: WeeChat 0.4.2]
vlad_starkov has joined #ruby
spike|spiegel has joined #ruby
mercwithamouth has joined #ruby
brennanMKE has joined #ruby
bricker`away has quit [Ping timeout: 264 seconds]
brtdv has quit []
jbpros has joined #ruby
bricker`away has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 272 seconds]
ZoanthusR has quit [Quit: Linkinus - http://linkinus.com]
lyanchih has joined #ruby
jlast has joined #ruby
darkstar| has joined #ruby
michael_mbp is now known as zz_michael_mbp
<darkstar|> hello I've got a question about URI (http://www.ruby-doc.org/stdlib-1.9.3/libdoc/uri/rdoc/URI.html) shouldn't uri.host provide me with only the host portion for. for some reason im getting the www portion too any ideas?
<MrZYX> that's because www. isn't any different from any other subdomain
<MrZYX> it's part of the host
mixel_ has joined #ruby
<darkstar|> MrZYX: is there a way to get the part after www for example just google.com ?
coca_rails has joined #ruby
mixel has quit [Ping timeout: 264 seconds]
mixel_ is now known as mixel
jlast has quit [Ping timeout: 272 seconds]
<MrZYX> .sub(/^www\./, '')
<MrZYX> but it's really part of the host, you shouldn't care
<MrZYX> while it's common practice that www.example.org and example.org point to the same host, it's nowhere guaranteed
platzhirsch has joined #ruby
kayloos_ has quit []
sergicles has quit [Quit: sergicles]
flops has joined #ruby
thepumpkin has joined #ruby
jamesaanderson has joined #ruby
jrhe has quit [Quit: jrhe]
jamesaanderson has quit [Client Quit]
banisterfiend has quit [Quit: Computer has gone to sleep.]
thepumpkin has quit [Ping timeout: 272 seconds]
aryaching has joined #ruby
<DouweM> MrZYX: might be it's for displaying the link like on HN
TheShaun is now known as TheShaun|AFK
carraroj has quit [Ping timeout: 245 seconds]
jamesaanderson has joined #ruby
<MrZYX> doesn't matter what it is for, it'll be just be compensation for a (IMO) bad pratice
darkstar| has quit [Remote host closed the connection]
Shidash has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
freerobby has joined #ruby
tkuchiki has joined #ruby
jrhe has joined #ruby
freerobby has quit [Ping timeout: 244 seconds]
Speed has joined #ruby
mbessey has quit [Remote host closed the connection]
mbessey has joined #ruby
fgo has quit [Remote host closed the connection]
BigBlueBacon has joined #ruby
Guest89829 is now known as mumblerit
mbessey has quit [Ping timeout: 245 seconds]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
Thanatermesis has joined #ruby
shredding has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
coca_rails has quit [Ping timeout: 245 seconds]
carraroj has joined #ruby
coderhs has joined #ruby
oyola has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
varady has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
VTLob has joined #ruby
jonathanwallace has joined #ruby
jrhe has quit [Quit: jrhe]
Jabberish has quit [Read error: Operation timed out]
Banistergalaxy has joined #ruby
jonathanwallace has quit [Client Quit]
mikee has quit [Ping timeout: 246 seconds]
waxjar has joined #ruby
jonathanwallace has joined #ruby
jrhe has joined #ruby
danshult_ has quit [Remote host closed the connection]
danshultz has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
Jabberish has joined #ruby
danshultz has joined #ruby
brennanMKE has joined #ruby
mercwithamouth has quit [Quit: Lost terminal]
jonathanwallace has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Ping timeout: 244 seconds]
parduse has quit []
parduse has joined #ruby
relix has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
justsee has quit [Ping timeout: 264 seconds]
gyre007 has quit [Remote host closed the connection]
coderhs has quit [Ping timeout: 272 seconds]
gyre007 has joined #ruby
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
nbrosnah_ has joined #ruby
mikee has joined #ruby
nbrosnahan has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
banisterfiend has joined #ruby
banisterfiend has quit [Max SendQ exceeded]
gyre007 has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
jbpros has quit [Quit: jbpros]
ananthakumaran1 has joined #ruby
Emmanuel_Chanel has joined #ruby
ananthakumaran has quit [Ping timeout: 248 seconds]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
fgo has quit [Ping timeout: 244 seconds]
jamesaanderson has joined #ruby
jbpros has joined #ruby
zz_zz_scottstamp has quit [Quit: Au revoir!]
timonv has quit [Ping timeout: 272 seconds]
zz_scottstamp has joined #ruby
jbpros has quit [Client Quit]
zz_scottstamp is now known as scottstamp
nignaztic has quit [Read error: Connection reset by peer]
thams has joined #ruby
blarghmatey has joined #ruby
wallerdev has joined #ruby
krz has quit [Quit: krz]
thams has quit [Remote host closed the connection]
coldmethod has joined #ruby
timonv has joined #ruby
axl_ has joined #ruby
JonahR has joined #ruby
nazty has joined #ruby
mbessey has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran1 has quit [Ping timeout: 265 seconds]
ananthakumaran has joined #ruby
blarghmatey has quit [Ping timeout: 272 seconds]
petey has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
axl_ has quit [Client Quit]
mbessey has quit [Ping timeout: 245 seconds]
dorei has joined #ruby
coca_rails has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamesaanderson has joined #ruby
ewnd9_ has quit [Ping timeout: 272 seconds]
jamesaanderson has quit [Client Quit]
mikee has quit [Ping timeout: 246 seconds]
petey_ has joined #ruby
snath has quit [Ping timeout: 272 seconds]
coca_rails has quit [Ping timeout: 245 seconds]
jamesaanderson has joined #ruby
petey has quit [Read error: Operation timed out]
mbessey has joined #ruby
jamesaanderson has quit [Client Quit]
sayan has joined #ruby
io_syl has joined #ruby
petey_ has quit [Remote host closed the connection]
petey has joined #ruby
swingha has joined #ruby
mbessey has quit [Ping timeout: 264 seconds]
petey_ has joined #ruby
newbiehacker has quit [Quit: Leaving]
petey has quit [Read error: Connection reset by peer]
jamesaanderson has joined #ruby
zz_michael_mbp is now known as michael_mbp
dorei has quit [Ping timeout: 244 seconds]
nazty has quit [Ping timeout: 244 seconds]
dorei has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
Clooth has joined #ruby
ejnahc_ has quit [Remote host closed the connection]
sergicles has joined #ruby
eka has joined #ruby
ejnahc has joined #ruby
sayan has quit [Ping timeout: 264 seconds]
nbrosnah_ has quit [Ping timeout: 248 seconds]
xiphias has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby
coderhs has joined #ruby
xiphias has joined #ruby
nbrosnahan has joined #ruby
dr_bob has joined #ruby
zarubin has quit [Ping timeout: 272 seconds]
timonv has quit [Remote host closed the connection]
brennanMKE has joined #ruby
timonv has joined #ruby
sayan has joined #ruby
elux has joined #ruby
Xeago has joined #ruby
nfk has joined #ruby
JonahR has quit [Quit: Leaving]
brennanMKE has quit [Ping timeout: 245 seconds]
timonv has quit [Ping timeout: 272 seconds]
sayan has quit [Read error: Connection reset by peer]
aspiers has joined #ruby
rippa has joined #ruby
bugsinlights has joined #ruby
ewnd9_ has joined #ruby
axl_ has joined #ruby
lukec has joined #ruby
apeiros has joined #ruby
amritanshu_RnD has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 265 seconds]
jrhe has left #ruby [#ruby]
axl_ has quit [Ping timeout: 272 seconds]
axl_ has joined #ruby
jkhwan has joined #ruby
jkamenik has joined #ruby
noop has quit [Ping timeout: 272 seconds]
bugsinlights has quit [Remote host closed the connection]
noop has joined #ruby
taion809 is now known as zzz_taion809
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
thepumpkin has joined #ruby
sevenseacat has quit [Quit: Leaving.]
carraroj has quit [Quit: Konversation terminated!]
carraroj has joined #ruby
Mitchellvanw has joined #ruby
vince_prignano has joined #ruby
kofno has quit [Ping timeout: 265 seconds]
axl_ has quit [Quit: axl_]
niftylettuce has quit [Ping timeout: 260 seconds]
jbpros has joined #ruby
larissa has joined #ruby
thepumpkin has quit [Ping timeout: 272 seconds]
niftylettuce has joined #ruby
kofno has joined #ruby
mrfoto has quit []
polaco_zZz is now known as polaco
timonv has joined #ruby
maxiaojun has joined #ruby
freerobby has quit [Quit: Leaving.]
<maxiaojun> is 1.9.x too old for ruby newbie?
ewnd9_ has quit [Ping timeout: 264 seconds]
sayan has joined #ruby
<dr_bob> no
<maxiaojun> I have some python background and I know the pain of python2/3, not familiar ruby versions though
<MrZYX> if you can't get a 2.0, a 1.9 is fine, however if you can get a 2.0 learning the newest version of the language should be preferred of course ;) but the differences aren't that big anyway
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
Xiti has quit [Quit: Leaving]
flops has quit [Ping timeout: 272 seconds]
Xiti has joined #ruby
sayan has quit [Excess Flood]
tomzx_mac has joined #ruby
sayan has joined #ruby
coca_rails has joined #ruby
_Andres has quit [Read error: Connection reset by peer]
jkhwan has quit [Ping timeout: 272 seconds]
Polysics_ has joined #ruby
<dr_bob> Yep, and many distros still ship 1.9*.
<dr_bob> It's easier to just install via the package mgmt.
jb41 has joined #ruby
jkhwan has joined #ruby
jonathanwallace has joined #ruby
<jb41> what is the best way to debug ruby script? ruby -r debug script.rb isn't working good for me. I require many other files in script.rb
Seus has joined #ruby
<banisterfiend> jb41 http://pryrepl.org
sayan has quit [Ping timeout: 245 seconds]
<jb41> ohhh... I totally forgot about it... -.-"
<jb41> banisterfiend: thanks!
mlpinit has joined #ruby
<Seus> question: if there are some code changes made to this git repo for a gem i'm using, how do i merge those changes with the existing gem that's installed on my system through bundle install?
elux has quit [Quit: Leaving...]
Polysics_ has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
xk_id has joined #ruby
mlpinit has quit [Client Quit]
aspiers has quit [Read error: Operation timed out]
kaldrenon has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AndChat| has joined #ruby
lyanchih has quit [Quit: lyanchih]
jamesaanderson has joined #ruby
haukur has joined #ruby
kaldrenon has quit [Read error: Operation timed out]
threesome has joined #ruby
<haukur> Which is preferred, "array.each { |i| puts i }" or "array.each {|i| puts i}" or "array.each{|i| puts i}" and why?
Banistergalaxy has quit [Ping timeout: 240 seconds]
<shevy> haukur not .each{
<haukur> otherwise either?
<shevy> the other two are quite close but I think .each {|i|
galanm has quit [Remote host closed the connection]
<shevy> the ' ' between { and | gives no real information
<MrZYX> Seus: that is using bundlers git option?
<shevy> and .each{ is harder to read than .each {
AndChat| has quit [Ping timeout: 248 seconds]
<haukur> shevy: okay, thanks
<shevy> :)
jamesaanderson has quit [Client Quit]
Astral_ has joined #ruby
eeriegeek has quit [Quit: Leaving.]
haukur has quit [Client Quit]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
freerobby has joined #ruby
mbessey has joined #ruby
Al_ has joined #ruby
Al_ has quit [Client Quit]
Astralum has quit [Ping timeout: 245 seconds]
Xiti has quit [Quit: Leaving]
brennanMKE has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
freerobby has quit [Ping timeout: 245 seconds]
_Andres has joined #ruby
brennanMKE has quit [Ping timeout: 252 seconds]
<wormwood> Hey all, just wanting to say 'Hello' from RubyConf :) Just a friendly reminder that 1sale.com (gold sponser) is
<wormwood> hiring ruby devs in Miami (Junior / Senior). Let us know if anyone would be interested in working at our Oceanfront office. Lots of interesting challenges await! PM to discuss. Thanks!
coca_rails has quit [Ping timeout: 245 seconds]
thelorax123 has joined #ruby
osvico has joined #ruby
<banisterfiend> wormwood do you have remote positions?
felixjet has quit [Read error: Connection reset by peer]
<Hanmac> wormwood: i think you should say if that job is rails based or not (if you know that) and if yes you may should try also at #rubyonrails
matchaw has quit [Quit: No Ping reply in 180 seconds.]
matchaw has joined #ruby
<Sp4rKy> W14
<shevy> Hanmac whatcha coding lately?
carraroj has quit [Ping timeout: 252 seconds]
Banistergalaxy has joined #ruby
Al_ has joined #ruby
<Hanmac> shevy: currently working on SFML-ruby ... adding Audio module (that means you can play sound stuff for the game engine)
platypine has joined #ruby
Al_ has quit [Client Quit]
<Hanmac> also adding load_memory that can read Font, Texture or Sound files from Strings
thelorax123 has quit [Remote host closed the connection]
jamesaanderson has joined #ruby
<shevy> cool
Mitchellvanw has quit [Quit: Dozing off...]
thelorax123 has joined #ruby
crank1988 has joined #ruby
Mitchellvanw has joined #ruby
thelorax123 has quit [Remote host closed the connection]
platypine has quit [Ping timeout: 240 seconds]
marr has joined #ruby
CorySimmons has joined #ruby
jibi has joined #ruby
<CorySimmons> Hey guys I'm new to Ruby. I come from a CSS/Stylus background. I just ported my framework to SCSS https://github.com/corysimmons/jeet-scss but I'm not sure if this is the most modular way to do it (as in, I don't think it is). Is there a better way to do this so it can easily be added to other projects, for instance, the Rails asset pipeline?
<CorySimmons> Just looking for tips :)
<MrZYX> if you want to support rails, better ask #rubyonrails ;)
rodan- has joined #ruby
Lewix has joined #ruby
mixel has quit [Quit: mixel]
<shevy> the rails folks know the terminology
jonathanwallace has quit [Ping timeout: 252 seconds]
jkamenik has quit [Quit: Leaving.]
jkhwan has quit [Remote host closed the connection]
derebos has joined #ruby
<CorySimmons> Well, it's not just Rails is the thing
_Andres has quit [Ping timeout: 272 seconds]
<CorySimmons> I'd like to make this into something that can be used it a plethora of Ruby projects, from Middleman, to Sinatra, etc.
cjs226 has left #ruby [#ruby]
endash has joined #ruby
<MrZYX> there's no standard for this that I'm aware of
thelorax123 has joined #ruby
Aryasam has joined #ruby
pu22l3r has joined #ruby
freerobby has joined #ruby
thelorax123 has quit [Remote host closed the connection]
<hiall> Hi, I have a problem by which I don't know how the data i am sent will be sent so i have numerous places where I do something like http://paste2.org/xPk4CP4j is there a better more ruby way to achieve this?
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
<CorySimmons> MrZYX: Thanks. Can you suggest some good resources for turning my project into a really clean/modular gem?
jbpros has quit [Quit: jbpros]
Mitchellvanw has left #ruby ["Quiting like a baws"]
thelorax123 has joined #ruby
thelorax123 has quit [Remote host closed the connection]
petey_ has quit [Remote host closed the connection]
<MrZYX> hiall: first of all extract it into a method
awarner has joined #ruby
petey has joined #ruby
freerobby has quit [Ping timeout: 272 seconds]
<MrZYX> then you can do something like field = field.values if field.is_a? Hash
dgfdgf has joined #ruby
thelorax123 has joined #ruby
<hiall> MrZYX: Ill still need loops though?
`MArceLL` has quit [Ping timeout: 246 seconds]
pu22l3r has quit [Ping timeout: 268 seconds]
<MrZYX> then field = nil, [*field] will result in empty array, field = "foo"], [*field] will result in a one element array and field = [a, b], [*field] will result in [a, b] again
lethjakm1 has joined #ruby
<MrZYX> so after the hash check you can just do [*field].each do |value| add_value(value) end
sayan has joined #ruby
zipper has joined #ruby
<hiall> I see ok will try that approach, thanks MrZYX
petey has quit [Ping timeout: 245 seconds]
lethjakman has quit [Ping timeout: 245 seconds]
thelorax123 has quit [Remote host closed the connection]
zipper has quit [Client Quit]
vlad_starkov has joined #ruby
<Hanmac> hiall: (fields.is_a?(Hash) ? fields.values : Array(fields)).each(&method(:add_field))
thelorax123 has joined #ruby
<MrZYX> Hanmac: pls stop that &method stuff, it's ugly :P
sayan has quit [Ping timeout: 240 seconds]
thelorax123 has quit [Remote host closed the connection]
<hiall> hanmac: that will also turn the single item into a array too niiice
<Hanmac> request a shorter synax and i will use it ;P
m_3 has quit [Remote host closed the connection]
<MrZYX> lets see (&method(:add_field)) 21 chars {|v| add_field(v) } 20 chars
<MrZYX> (if I counted right :P)
thelorax123 has joined #ruby
shredding has quit [Quit: shredding]
<hiall> always wondered actually with the &:method can you also send variables with this?
<MrZYX> you could curry the proc, but it's not getting nicer than just writing the block out
<Hanmac> i also have this: https://bugs.ruby-lang.org/issues/9076#note-9 its more nicer than curry ;P
<shevy> Hanmac you should work more on your projects and less on wanting to uglify ruby syntax! ;P
timonv has joined #ruby
pwh has joined #ruby
<shevy> especially documentation
eeriegeek has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonathanwallace has joined #ruby
sayan has joined #ruby
sross has quit [Quit: KVIrc 4.1.1 Equilibrium http://www.kvirc.net/]
<hiall> MrZYX hanmac any good books/sites you recommend for learning tidbits like that?
<MrZYX> this channel is one ;)
<hiall> haha :)
shredding has joined #ruby
<shevy> hiall advanced stuff is rare to find aggregated on the www
<shevy> you could work through some blog posts but that is tedious
<shevy> hiall meta is a synonym for complicated after all
thepumpkin has joined #ruby
mikee has joined #ruby
<MrZYX> hiall: I'm quite serious though, listening here taught me > 90% of that stuff
<MrZYX> and regularly asking questions like yours will also help
postmodern has quit [Quit: Leaving]
<shevy> yes
rodan- has quit [Remote host closed the connection]
<shevy> what is the meaning of life?
<MrZYX> 42
larissa has quit [Quit: Leaving]
rodan- has joined #ruby
<shevy> see hiall? you can find everything here
jbpros has joined #ruby
jamesaanderson has joined #ruby
<shevy> it's non-stop action, 24/7 entertainment
<shevy> the big laughs, the occasional drama and never forget the weekend spankings
wereHams1er has quit [Changing host]
wereHams1er has joined #ruby
wereHams1er is now known as wereHamster
brennanMKE has joined #ruby
<hiall> hmmn ok shevy and MrZYX ill take that advice
m_3 has joined #ruby
<hiall> guess I'll live here from now on ;)
havenwood has joined #ruby
<shevy> yup, under the bridge. like Hanmac
thepumpkin has quit [Ping timeout: 244 seconds]
<shevy> that's where he finds all those psycho cartoons
<shevy> I can only give you the advice... DO NOT CLICK ON WHAT HANMAC SHOWS YOU
<shevy> you have been warned :)
<hiall> haha
<havenwood> You gotta pay the troll toll.
rodan-_ has joined #ruby
Monie has joined #ruby
Clooth has quit [Quit: Leaving...]
barratt has quit [Quit: Linkinus - http://linkinus.com]
coca_rails has joined #ruby
rodan- has quit [Ping timeout: 245 seconds]
<shevy> hiall can you click on this for me and tell me what it is?
<hiall> heh thats true hanmac ;)
<hiall> shevy: trolling
samfisher has joined #ruby
<samfisher> hello guys. how could i create a table with ruby (linux console)
spider-mario has joined #ruby
<havenwood> samfisher: a table?
brennanMKE has quit [Ping timeout: 272 seconds]
<samfisher> yea, you know, columns and rows
<samfisher> found it:
<samfisher> gem install terminal-table
thelorax123 has quit [Remote host closed the connection]
<havenwood> samfisher: Like an ascii art table?
EvanR has joined #ruby
<samfisher> havenwood: yes yes
<havenwood> ahh
rodan-_ has quit [Ping timeout: 245 seconds]
<EvanR> is it possible change the buffering mode for open files? i.e. no buffering, line buffering, block buffering
coca_rails has quit [Ping timeout: 245 seconds]
rickruby has joined #ruby
<shevy> samfisher does it work?
shredding has quit [Quit: shredding]
<shevy> because I needed something like that some days ago
<shevy> to display help option on the commandline with an optional table layout
Rollabunna has joined #ruby
<havenwood> samfisher: Alternatively, you could flip tables: https://gist.github.com/havenwood/7387731
<havenwood> :P
<samfisher> shevy: it's kinda nice but the problem is my software reiterates the rows and changes them. I am using print "\e[2J\e[f" to clear the screen so for .5s the screen is blank
<samfisher> havenwood: oh, made by you! thanks
<havenwood> samfisher: (ASCII art char flips a little table. *Probably* not what you were looking for. :P)
<havenwood> but yeah, my fine creation >.>
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
crank1988 has quit [Remote host closed the connection]
carraroj has joined #ruby
<havenwood> hmm, maybe i should finish my Ruby mooninite cartoon for os x
<havenwood> "You have deeply offended us, and our god is a god of vengeance. Our god is an indian that turns into a wolf. The wolfen will come for you with his razor."
<shevy> havenwood haha that's funny animated
<shevy> but I am not sure what this is
<shevy> a dancing worm?
<havenwood> shevy: Here's a preview frame (why githubs you no fix-space font??)
rodan- has joined #ruby
<shevy> lol
Elhu has joined #ruby
<havenwood> shevy: uses os x speach for audio
d45h has quit [Ping timeout: 245 seconds]
<havenwood> [two, "Do you have any eggs? Eggs or pot? Either one."],
timonv has quit [Ping timeout: 240 seconds]
matchaw has quit [Remote host closed the connection]
matchaw has joined #ruby
<Hanmac> havenwood: https://i.chzbgr.com/maxW500/7892553216/h9F4C53BC/ unfortunate shape of building ;P
jonathanwallace has quit [Ping timeout: 240 seconds]
Aryasam has quit [Ping timeout: 265 seconds]
devyn has quit [Ping timeout: 246 seconds]
rodan- has quit [Remote host closed the connection]
Aryasam has joined #ruby
ce_afk is now known as cescalante
thelorax123 has joined #ruby
m8 has joined #ruby
christopherdupon is now known as ^Chris^
havenwood has quit []
soulcake has quit [Read error: Connection reset by peer]
soulcake has joined #ruby
^Chris^ has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
^Chris^ has joined #ruby
nisstyre has joined #ruby
Aryasam has quit [Quit: Bye]
thelorax123 has quit [Remote host closed the connection]
nazty has joined #ruby
bruno- has joined #ruby
lyanchih has joined #ruby
thelorax123 has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
thelorax123 has quit [Remote host closed the connection]
Elhu_ has joined #ruby
CaptainJet has joined #ruby
diegoviola has joined #ruby
Elhu has quit [Ping timeout: 272 seconds]
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
awarner has quit [Remote host closed the connection]
danguita has joined #ruby
havenwood has joined #ruby
awarner has joined #ruby
workmad3 has joined #ruby
MrZYX is now known as MrZYX|off
sayan has quit [Ping timeout: 245 seconds]
maxiaojun has quit [Quit: Leaving]
h0rrorvacui has joined #ruby
shvelo has quit [Ping timeout: 272 seconds]
MrZYX|off is now known as MrZYX
threesome has quit [Ping timeout: 245 seconds]
awarner has quit [Ping timeout: 240 seconds]
Banistergalaxy has quit [Ping timeout: 248 seconds]
mbessey_ has joined #ruby
Banistergalaxy has joined #ruby
threesome has joined #ruby
colonolGron has joined #ruby
mlpinit has joined #ruby
mbessey has quit [Ping timeout: 245 seconds]
vlad_sta_ has joined #ruby
blarghmatey has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
shredding has joined #ruby
petey has joined #ruby
thepumpkin has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.1]
bruno- has quit [Quit: leaving]
CaptainJet has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
CaptainJet has joined #ruby
yfeldblum has joined #ruby
thelorax123 has joined #ruby
Elhu_ has quit [Quit: Computer has gone to sleep.]
Czupa has joined #ruby
jbpros has quit [Quit: jbpros]
nobitanobi has joined #ruby
danguita has quit [Quit: WeeChat 0.4.2]
Ripp__ has joined #ruby
mlpinit has quit [Quit: Leaving...]
workmad3 has quit [Ping timeout: 244 seconds]
wildroman2 has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
thelorax123 has quit [Remote host closed the connection]
rellin has quit [Read error: Connection reset by peer]
lethjakm1 has quit [Ping timeout: 265 seconds]
motto has joined #ruby
thelorax123 has joined #ruby
Mars__ has joined #ruby
platypine has joined #ruby
m8 has quit [Ping timeout: 252 seconds]
brennanMKE has joined #ruby
thelorax123 has quit [Remote host closed the connection]
dangerousdave has joined #ruby
coca_rails has joined #ruby
thelorax123 has joined #ruby
jamblack has joined #ruby
timonv has joined #ruby
brennanMKE has quit [Ping timeout: 240 seconds]
blarghmatey has quit [Read error: Connection reset by peer]
shredding has quit [Quit: shredding]
petey has quit [Remote host closed the connection]
thelorax123 has quit [Remote host closed the connection]
petey has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
coca_rails has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
ner0x has joined #ruby
jkline has joined #ruby
shredding has joined #ruby
CorySimmons has quit [Quit: Leaving.]
wildroman2 has quit [Remote host closed the connection]
lyanchih has quit [Quit: lyanchih]
thelorax123 has joined #ruby
thelorax123 has quit [Remote host closed the connection]
petey has quit [Ping timeout: 264 seconds]
keen__ has joined #ruby
keen_ has quit [Ping timeout: 244 seconds]
thelorax123 has joined #ruby
rodan- has joined #ruby
havenwood has quit [Remote host closed the connection]
DanKnox_away is now known as DanKnox
thelorax123 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
jamblack has quit [Quit: jamblack]
coca_rails has joined #ruby
elux has joined #ruby
elux has quit [Client Quit]
greenrose1 has joined #ruby
greenrose has quit [Ping timeout: 260 seconds]
greenrose1 is now known as greenrose
havenwood has joined #ruby
devyn has joined #ruby
havenwood has quit [Client Quit]
rodan- has quit [Ping timeout: 272 seconds]
mbessey has joined #ruby
hamakn has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
hamakn has joined #ruby
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
mbessey_ has quit [Ping timeout: 248 seconds]
Kricir has joined #ruby
Bry8Star{T2 has joined #ruby
shvelo has joined #ruby
jamesaanderson has joined #ruby
snath has joined #ruby
thelorax123 has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Elhu has joined #ruby
nobitanobi has quit [Ping timeout: 272 seconds]
Xeago has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
guitsaru has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
sepp2k1 has joined #ruby
thelorax123 has quit [Remote host closed the connection]
mweshi has joined #ruby
DanKnox is now known as DanKnox_away
banisterfiend has joined #ruby
jonathanwallace has quit [Ping timeout: 248 seconds]
freerobby has quit [Ping timeout: 252 seconds]
gyre007 has joined #ruby
sepp2k has quit [Ping timeout: 252 seconds]
atno__ has joined #ruby
IceDragon has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
rickruby has quit [Remote host closed the connection]
platzhirsch has quit [Ping timeout: 244 seconds]
platzhirsch has joined #ruby
jonathanwallace has joined #ruby
coca_rails has quit [Remote host closed the connection]
atno has quit [Ping timeout: 272 seconds]
rellin has joined #ruby
baroquebobcat has joined #ruby
awarner has joined #ruby
awarner has quit [Remote host closed the connection]
awarner has joined #ruby
thelorax123 has joined #ruby
blackmesa has joined #ruby
drumusician has joined #ruby
Kricir has quit [Remote host closed the connection]
thelorax123 has quit [Remote host closed the connection]
awarner has quit [Ping timeout: 245 seconds]
Rollabunna has quit [Remote host closed the connection]
shredding has quit [Quit: shredding]
danshultz has quit [Remote host closed the connection]
shredding has joined #ruby
danshultz has joined #ruby
thelorax123 has joined #ruby
Kricir has joined #ruby
rickruby has joined #ruby
gigetoo has joined #ruby
weszlem has joined #ruby
danshult_ has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
thelorax123 has quit [Remote host closed the connection]
timonv has joined #ruby
coderhs has quit [Ping timeout: 244 seconds]
Fight has joined #ruby
Mars__ has quit [Remote host closed the connection]
<Freijo> I know this is a Ruby channel but what the fuck's happening here? https://eval.in/61309
gigetoo has quit [Ping timeout: 265 seconds]
Freijo is now known as Fraeon
<Fight> k
Fight has left #ruby [#ruby]
thelorax123 has joined #ruby
ExCa|iBuR has joined #ruby
gigetoo has joined #ruby
thelorax123 has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
<prophile> Fraeon: I don't think it's usually considered a good idea to hammer on other languages in #ruby
<prophile> that being said
<prophile> lolphp
<Fraeon> Yeah, I know
<Fraeon> But that was just...
<Fraeon> um...
brennanMKE has joined #ruby
<Fraeon> I don't even have a word for this
<prophile> I take it it's interpreting 2e0 as 2x10^0?
<prophile> lolphp
<prophile> actually I take that back
<prophile> lolweak typing
thelorax123 has joined #ruby
TMM has joined #ruby
TMM has joined #ruby
snath has quit [Ping timeout: 245 seconds]
simoz has joined #ruby
thelorax123 has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 244 seconds]
gigetoo has joined #ruby
lkba has quit [Ping timeout: 244 seconds]
<shevy> well
<shevy> poor the souls still using php
<shevy> the others moved on
brennanMKE has quit [Ping timeout: 272 seconds]
bruno- has joined #ruby
lurraca has joined #ruby
<banisterfiend> waxjar u love this shit? http://www.youtube.com/watch?v=c-W9GCtI2nM (i do! :D)
Kricir has quit [Remote host closed the connection]
guitsaru has left #ruby ["Textual IRC Client: www.textualapp.com"]
<waxjar> lol banisterfiend
<waxjar> they're alright
Czupa has quit [Quit: Wychodzi]
<waxjar> check out the video for electrotechniek :P
jonathanwallace has quit [Ping timeout: 264 seconds]
bruno- has quit [Quit: leaving]
bruno- has joined #ruby
coderhs has joined #ruby
lurraca has quit [Quit: This computer has gone to sleep]
rickruby has joined #ruby
snath has joined #ruby
coca_rails has joined #ruby
lawnchair has joined #ruby
awarner has joined #ruby
lawnchair has left #ruby [#ruby]
rodan- has joined #ruby
awarner has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 272 seconds]
awarner has joined #ruby
awarner has quit [Read error: Connection reset by peer]
awarner has joined #ruby
phansch has joined #ruby
larissa has joined #ruby
awarner has quit [Remote host closed the connection]
IceDragon has quit [Ping timeout: 272 seconds]
awarner has joined #ruby
IceDragon has joined #ruby
rodan- has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby
jonathanwallace has joined #ruby
cescalante is now known as ce_afk
peterdecroos has joined #ruby
jonathanwallace has quit [Client Quit]
jonathanwallace has joined #ruby
petey has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michael_mbp is now known as zz_michael_mbp
Lewix has quit [Remote host closed the connection]
awarner has quit [Ping timeout: 252 seconds]
freerobby has joined #ruby
CreativeEmbassy has joined #ruby
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
wildroman2 has quit [Remote host closed the connection]
banjara has joined #ruby
flops has joined #ruby
wildroman2 has joined #ruby
drag00n has joined #ruby
Ripp__ has quit []
jbpros has joined #ruby
kevinykchan has joined #ruby
BizarreCake has quit [Quit: Leaving]
freerobby has quit [Ping timeout: 264 seconds]
shvelo has quit [Ping timeout: 272 seconds]
Xeago_ has joined #ruby
shvelo has joined #ruby
wildroman2 has quit [Ping timeout: 245 seconds]
jrhe has joined #ruby
rodan- has joined #ruby
Xeago has quit [Ping timeout: 272 seconds]
jamesaanderson has joined #ruby
coca_rails has quit [Remote host closed the connection]
jamesaanderson has quit [Client Quit]
claymore has quit [Quit: Leaving]
jonathanwallace has quit [Ping timeout: 248 seconds]
wildroman2 has joined #ruby
rodan- has quit [Ping timeout: 248 seconds]
BigBlueBacon has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
icedp is now known as mapcat
mapcat is now known as icedp
jamblack has joined #ruby
bruno- has quit [Quit: leaving]
bruno- has joined #ruby
bruno- is now known as Guest74833
ananthakumaran has quit [Quit: Leaving.]
rodan- has joined #ruby
Guest74833 has quit [Client Quit]
jamesaanderson has joined #ruby
bruno-_ has joined #ruby
DanKnox_away is now known as DanKnox
mupkoo has joined #ruby
Monsieur1pple is now known as MonsieurApple
MonsieurApple has quit [Changing host]
MonsieurApple has joined #ruby
bruno-_ has quit [Client Quit]
Elhu has quit [Quit: Computer has gone to sleep.]
flops has quit [Ping timeout: 264 seconds]
Zesty has joined #ruby
jamesaanderson has quit [Client Quit]
polaco is now known as polaco_zZz
__LX__ is now known as LX
LX has quit [Quit: Leaving]
flops has joined #ruby
varady has quit [Remote host closed the connection]
chomskiii has joined #ruby
timonv has quit [Remote host closed the connection]
dkamioka has joined #ruby
thelorax123 has joined #ruby
drumusician has quit [Read error: Connection reset by peer]
timonv has joined #ruby
earthquake has quit [Quit: earthquake]
JonahR has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
drumusician has joined #ruby
theoretick has joined #ruby
bruno-_ has joined #ruby
jamblack has quit [Quit: jamblack]
bruno-_ has quit [Client Quit]
bruno-_ has joined #ruby
havenwood has joined #ruby
thelorax123 has quit [Remote host closed the connection]
dmyers has joined #ruby
bruno-_ is now known as bruno-
timonv has quit [Ping timeout: 245 seconds]
wildroman2 has quit [Remote host closed the connection]
mr_red has quit [Quit: Bye :)]
sailias has joined #ruby
zastern has joined #ruby
atmosx has joined #ruby
thelorax123 has joined #ruby
peterdecroos has quit [Read error: Connection reset by peer]
timonv has joined #ruby
inimit has joined #ruby
apeiros has quit [Remote host closed the connection]
xk_id has quit [Quit:
vlad_starkov has quit [Remote host closed the connection]
Xiti has joined #ruby
mr_red has joined #ruby
peterdecroos has joined #ruby
apeiros has joined #ruby
decoponio has quit [Quit: Leaving...]
xcess_denied has joined #ruby
Elhu has joined #ruby
rockets has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
drumusician has quit [Read error: Connection reset by peer]
thelorax123 has quit [Remote host closed the connection]
drumusician has joined #ruby
jamblack has joined #ruby
valesk has joined #ruby
derebos has quit [Ping timeout: 245 seconds]
mupkoo has quit [Remote host closed the connection]
mbessey has quit [Ping timeout: 252 seconds]
ExCa|iBuR has quit [Quit: oogabooga]
mbessey has joined #ruby
<xcess_denied> .
thelorax123 has joined #ruby
apeiros has quit [Ping timeout: 264 seconds]
ce_afk is now known as cescalante
jamblack has quit [Ping timeout: 240 seconds]
brennanMKE has joined #ruby
Zesty has quit [Quit: Linkinus - http://linkinus.com]
xcess_denied has quit [Remote host closed the connection]
thelorax123 has quit [Remote host closed the connection]
newbiehacker has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
vpretzel has quit [Quit: Adios!]
gigetoo has quit [Ping timeout: 264 seconds]
TDKPS has joined #ruby
brennanMKE has quit [Ping timeout: 265 seconds]
mbessey_ has joined #ruby
thelorax123 has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
Mars__ has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
mbessey has quit [Ping timeout: 272 seconds]
bruno- has quit [Quit: leaving]
bruno- has joined #ruby
yfeldblu_ has joined #ruby
thelorax123 has quit [Remote host closed the connection]
Mars__ has quit [Ping timeout: 240 seconds]
havenwood has quit []
thelorax123 has joined #ruby
Kricir has joined #ruby
thelorax123 has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
axl_ has joined #ruby
colonolGron is now known as PedroZ
thesheff17 has quit [Quit: Leaving]
<shevy> oh man
<shevy> modifying someone else's code base is no fun
ycy_ has quit [Remote host closed the connection]
blackmesa has joined #ruby
thesheff17 has joined #ruby
Kricir has quit [Ping timeout: 245 seconds]
theoretick has quit [Quit: Textual IRC Client: www.textualapp.com]
PedroZ is now known as colonolGron
Guest26917 has joined #ruby
Jonah11_ has left #ruby ["Leaving"]
thelorax123 has joined #ruby
timonv has quit [Ping timeout: 265 seconds]
Guest26917 is now known as diegoviola
Banistergalaxy has quit [Ping timeout: 252 seconds]
ehaliewicz has joined #ruby
aspires has joined #ruby
Banistergalaxy has joined #ruby
allsystemsarego has quit [Quit: Leaving]
thelorax123 has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
dnyy has joined #ruby
gigetoo has joined #ruby
jonathanwallace has joined #ruby
sbos99 has quit [Ping timeout: 264 seconds]
lethjakm1 has joined #ruby
Senjai`work has joined #ruby
Senjai`work has quit [Changing host]
Senjai`work has joined #ruby
houndstooth has joined #ruby
colonolGron has quit [Quit: leaving]
claymore has joined #ruby
coldmethod has quit [Ping timeout: 245 seconds]
johnnyfuchs has joined #ruby
amacgregor has quit [Read error: No route to host]
atmosx has quit [Quit: Lost in trance]
amacgregor has joined #ruby
awarner has joined #ruby
nateberkopec has joined #ruby
banjara has quit [Quit: Leaving.]
lurraca has joined #ruby
houndstooth has quit [Remote host closed the connection]
Levin_22 has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
banjara has joined #ruby
danshult_ has quit [Remote host closed the connection]
lurraca has quit [Client Quit]
danshultz has joined #ruby
jkline has quit [Quit: jkline]
awarner has quit [Ping timeout: 272 seconds]
Jetchisel has joined #ruby
thelorax123 has joined #ruby
artm has quit [Read error: Operation timed out]
Drakx has joined #ruby
danshultz has quit [Ping timeout: 245 seconds]
aspires has joined #ruby
madb055 has joined #ruby
bline79_ has joined #ruby
mr_red has quit [Quit: Bye :)]
jonathanwallace has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
thelorax123 has quit [Remote host closed the connection]
one_tkbx has joined #ruby
<one_tkbx> How can I securely erase a string from RAM?
inimit has quit [Quit: inimit]
^Chris^ has quit [Ping timeout: 260 seconds]
<Xeago_> in ruby? you can't deterministically
thelorax123 has joined #ruby
<Xeago_> you'll have to implement that in c
Xiti has quit [Read error: Connection reset by peer]
noop has quit [Ping timeout: 245 seconds]
axl_ has quit [Quit: axl_]
thelorax123 has quit [Remote host closed the connection]
larissa has quit [Ping timeout: 244 seconds]
lurraca has joined #ruby
<one_tkbx> Xeago_, doesn't ruby have mutable strings?
FatWreckord has quit [Ping timeout: 264 seconds]
shvelo has quit [Ping timeout: 272 seconds]
inimit has joined #ruby
Mars__ has joined #ruby
maletor has joined #ruby
<waxjar> yes, Strings are mutable
thelorax123 has joined #ruby
<one_tkbx> It doesn't need to be secure_deletion secure, just overwritten
<one_tkbx> if I do:
<one_tkbx> x = "hello"
<one_tkbx> x = "world"
<havenwood> one_tkbx: GC.start will sweep un-referenced Strings. Whatcha trying to do?
<one_tkbx> is hello actually being overwritten in ram?
<waxjar> no, x is just references a different String
<waxjar> *referencing
DanKnox is now known as DanKnox_away
scottstamp is now known as zz_scottstamp
<waxjar> >> "hello".replace "world"
<eval-in_> waxjar => "world" (https://eval.in/64923)
EvanR has quit [Ping timeout: 265 seconds]
<one_tkbx> waxjar: what's technically different about mutable and immutable strings if neither overwrites the old data in ram?
thelorax123 has quit [Remote host closed the connection]
<waxjar> variables in ruby just reference objects
<waxjar> and String objects are mutable
thelorax123 has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
<one_tkbx> waxjar, then why can't I overwrite a string?
<waxjar> once an object isnt referenced anywhere in the code, the garbage collector will notice and free the memory
<one_tkbx> so say I have a string called password, is there any way to delete it that will be safe from cold boot attacks?
maletor has quit [Quit: Computer has gone to sleep.]
evilmquin has joined #ruby
thelorax123 has quit [Remote host closed the connection]
matchaw has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
jkamenik has joined #ruby
Tuxist has quit [Remote host closed the connection]
Czupa has joined #ruby
phansch has quit [Remote host closed the connection]
axl_ has joined #ruby
banjara has joined #ruby
arietis has joined #ruby
lurraca has quit [Quit: This computer has gone to sleep]
<waxjar> there's String#clear
<waxjar> I don't know how Ruby does all its magic internally tho, dunno if it's actually safe
thelorax123 has joined #ruby
matchaw has joined #ruby
evilmquin has quit [Quit: evilmquin]
thelorax123 has quit [Remote host closed the connection]
thelorax123 has joined #ruby
brennanMKE has joined #ruby
jamesaanderson has joined #ruby
axl_ has quit [Client Quit]
wildroman2 has joined #ruby
iamjarvo has joined #ruby
<Senjai`work> one_tkbx: Why are you worried about cold boot attacks? What's your use case?
<one_tkbx> I'm making a new version of this: http://lps.lucas-phillips.com/
<one_tkbx> and I want to do it in ruby
<iamjarvo> so in a test helper if you have this File.expand_path("../../", __FILE__) in results to the root of the gem but if you open up a debugger it goes up before the root of the gem. is the file considered a directory?
apeiros has joined #ruby
<one_tkbx> (fair warning, my javascript will injure your eyes)
<Senjai`work> one_tkbx: hmm? What does this do
workmad3 has joined #ruby
<one_tkbx> you enter a location (ie "reddit") in the first field, and a password in the second and third field (twice for verification)
<one_tkbx> it hashes and base64's it
<one_tkbx> you remember one password and it generates one for every site
<Senjai`work> one_tkbx: Why not use Oauth?
axl_ has joined #ruby
mixel has joined #ruby
brennanMKE has quit [Ping timeout: 245 seconds]
<one_tkbx> Senjai`work, what does 0auth do?
<Senjai`work> and base64 is an encoding, it's not meant for encryption
<one_tkbx> Senjai`work, it's like
<one_tkbx> you know those password manager programs?
<Senjai`work> one_tkbx: One login for every site..
wildroman2 has quit [Ping timeout: 272 seconds]
<one_tkbx> say my "universal" password is "123"
<Senjai`work> one_tkbx: one_tkbx http://en.wikipedia.org/wiki/OAuth
<shevy> wow
<shevy> def -- other
<shevy> that is the same as
<shevy> def --(other)
<one_tkbx> my reddit password would be NDFkMTIzM%TkRGa01US
<shevy> right?
<DouweM> shevy: right
<shevy> studying other people's code scares me... thanks DouweM
<one_tkbx> the base64 is only so that it has 72 characters instead of 16
<Senjai`work> one_tkbx: which serves what purpose?
banjara has quit [Quit: Leaving.]
<one_tkbx> all they can do by decoding the base64 is get the hash, which is useless
<Senjai`work> entropy?
<one_tkbx> basically
<one_tkbx> if they don't know I'm using this system, they won't know that they only have to check 16 characters
banjara has joined #ruby
<Senjai`work> one_tkbx: That's a very bad approach to security
thelorax123 has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
arietis has quit [Quit: Computer has gone to sleep.]
<DouweM> :| that's rediculous one_tkbx
<Senjai`work> one_tkbx: You're reinventing the wheel here.. This is a solved problem and there are standard libraries MEANT for password encryption and storage
<Senjai`work> one_tkbx: like bcrypt_ruby
<one_tkbx> Senjai`work, the obscurity just helps
<one_tkbx> in the new one I'm going to use 1000 rounds of whirlpool
<Senjai`work> one_tkbx: no, no it doesn't
<Senjai`work> one_tkbx: Obscurity really only guards against human eyes, not that of computers.
coldmethod has joined #ruby
banjara has quit [Client Quit]
<one_tkbx> Senjai`work: if I start with my "universal" password, salt it with the name of the website, and hash it, I'd assume (though I'm not a cryptographer) that it's already safe enough
<one_tkbx> the base64 is just to slightly inconvenience a hacker
havenwood has joined #ruby
havenwood has quit [Client Quit]
<one_tkbx> (it's not the full base64 string, just part of it)
mr_red has joined #ruby
<Senjai`work> one_tkbx: Or you could just: BCrypt::Password.create("mypassword")
<DouweM> one_tkbx: :O that's terrible. once someone has your universal password, they have everything
banjara has joined #ruby
<DouweM> with a password manager, they'd at least need to be in your machine
larissa has joined #ruby
bruno- has quit [Quit: leaving]
<one_tkbx> DouweM: that's why I was planning on 1000 rounds of whirlpool this time around, although I forgot about bcrypt
<DouweM> don't try to reinvent the wheel
<one_tkbx> ?
<Senjai`work> one_tkbx: You need to read this:
bruno- has joined #ruby
mary5030 has joined #ruby
Xiti has joined #ruby
<one_tkbx> Senjai`work, I'm planning on bcrypt
<DouweM> YES, great post that
thelorax123 has joined #ruby
<Senjai`work> one_tkbx: then you shouldnt be asking any more questions on how to secure a password :P
bruno- has quit [Client Quit]
axl_ has quit [Quit: axl_]
<one_tkbx> Senjai`work, that's why I need this
bruno- has joined #ruby
<Senjai`work> one_tkbx: I'm lost..
<one_tkbx> key1 = ask("K: ") {|q| q.echo = false}
thelorax123 has quit [Remote host closed the connection]
matchaw has quit [Remote host closed the connection]
bruno- has quit [Client Quit]
<one_tkbx> now once it's bcrypted, how do I securely erase that from ram?
bruno- has joined #ruby
bruno- has quit [Client Quit]
<shevy> from ruby?
<one_tkbx> yes
kobain has joined #ruby
<shevy> I dont think ruby can access ram
dkamioka has quit [Remote host closed the connection]
<Senjai`work> one_tkbx: it's not reversible so it doesnt matter
<one_tkbx> Senjai`work: no, the original password
bruno- has joined #ruby
matchaw has joined #ruby
<one_tkbx> pre-hash
dkamioka has joined #ruby
<Senjai`work> one_tkbx: GC.start right after bcrypting
<DouweM> one_tkbx: is your plan still to have one master password that you salt with a per-site salt derived from (for example) the site's name?
mary5030 has quit [Remote host closed the connection]
<DouweM> even with bcrypt?
<one_tkbx> Probably DouweM, but the 15 people that piled on me gave me the impression that that could be a bad idea
cescalante is now known as ce_afk
<one_tkbx> so maybe not
<DouweM> :D
bruno- has quit [Client Quit]
simoz has quit [Ping timeout: 264 seconds]
banjara has quit [Client Quit]
<DouweM> what's the problem with using a proper password manager that will generate random passwords for you and can be unlocked with a master password?
<DouweM> a master password that's not also part of the site passwords, mind
dkamioka has quit [Read error: Connection reset by peer]
thelorax123 has joined #ruby
<one_tkbx> this is portable
dkamioka has joined #ruby
<Senjai`work> DouweM: he/she wants to reinvent the wheel
banjara has joined #ruby
<one_tkbx> I originally did this so I can do it on any computer
mary5030 has joined #ruby
<DouweM> Senjai`work: evidently
<one_tkbx> (javascript)
bruno- has joined #ruby
Soda has joined #ruby
<DouweM> one_tkbx: but you realize that when you use MasterPassword+SiteName on every site, once someone has your master password, they have everything?
<Xeago_> waxjar: one_tkbx, String#clear is not cryptographically secure
<one_tkbx> DouweM, that's why bcrypt
<Senjai`work> Xeago_: just reassigning the variable to an empty string and GC.start should be fine
<one_tkbx> my master password is 34 characters of true randomness
<one_tkbx> good luck
aspires has quit [Quit: sudo making a sandwich]
<DouweM> wasn't the point that you were going to remember the master password?
<Senjai`work> one_tkbx: there is no such thing as true randomness with computers, just the illusion of it
<Senjai`work> one_tkbx: just use bcrypt, thats it
<one_tkbx> Senjai`work: I write A-Z, a-z, 0-9 on slips of paper and drew them from a box
<DouweM> :D
<one_tkbx> wrote*
<one_tkbx> DouweM: I already memorized it
<Senjai`work> one_tkbx: Wow, your priorities...
<Xeago_> Senjai`work: it's not - it is not overwritten in memory, just released
<Xeago_> in any case, do not invent your own scheme >.<
<DouweM> one_tkbx: wow, indeed
<Xeago_> one_tkbx: that is not truly random
<Xeago_> and the character set is very tiny
earthquake has joined #ruby
<one_tkbx> Xeago_: it's as close as humans will ever get
<Xeago_> false
<Senjai`work> one_tkbx: That is a very broad assumption lol
<one_tkbx> as close as physics will ever allow, rather
<one_tkbx> os so I believe
<Xeago_> false
<one_tkbx> ...?
mary5030 has quit [Ping timeout: 244 seconds]
<Xeago_> observe a magnetic interference in a tinfoil hat for example
<one_tkbx> lol
<Xeago_> s/a//
<Senjai`work> one_tkbx: http://en.wikipedia.org/wiki/Random_number_generation#.22True.22_random_numbers_vs._pseudo-random_numbers
<one_tkbx> anyway
<Senjai`work> to support Xeago_ 's point
jkamenik has quit [Quit: Leaving.]
<one_tkbx> Senjai`work, I fail to see how shaking and stirring slips of paper generates less entropy than /dev/random
<Senjai`work> one_tkbx: entropy != randomness
thelorax123 has quit [Remote host closed the connection]
<Senjai`work> one_tkbx: again, I'll point to that sitethatknowseverything: http://en.wikipedia.org/wiki/Entropy
<Senjai`work> please check your facts before making such statements
<Xeago_> tr -dc '[:print:]' < /dev/random | fold | head
<Xeago_> run that instead
<one_tkbx> anyway, I'm not very concerned that the NSA has a backdoor in my box that allows them to see where the pieces of paper landed at what time, so we'll assume that my password is effectively random, okay?
arietis has joined #ruby
<Xeago_> one_tkbx: you are forgetting that the amount of slips you put in are not representative of the universe of available characters
<Xeago_> everytime you draw a '1', the chance of drawing another '1' decreases
<Xeago_> and consequently the others increase
<one_tkbx> Xeago_, I replaced them
<Xeago_> replacing still increases the others
<Senjai`work> Wow, cp -r really breaks down over large datasets..
<one_tkbx> one of each character, replacing each time
<Xeago_> putting back is what you are supposed to do
<Xeago_> sounds like you are just making this up
<one_tkbx> so what's the problem?
shvelo has joined #ruby
<Senjai`work> one_tkbx: Look up permutations, and combinatorics
<one_tkbx> I'll send you a picture of my box if you'd like, all the slips are still there
<one_tkbx> (Xeago_)
<Xeago_> replace != putting back
<one_tkbx> ???????????????????
<Senjai`work> haha\
iamjarvo has quit [Quit: Leaving.]
<one_tkbx> are you joking?
<Senjai`work> one_tkbx: I get it, it's a perfectly valid statement
<one_tkbx> please tell me you're joking
<Xeago_> tell me you are joking by using non future proof hashing algorithms
johnnyfuchs has quit [Quit: Leaving.]
<DouweM> one_tkbx: I want a picture of the box please
<one_tkbx> k one sec
axl_ has joined #ruby
mr`spock has joined #ruby
<Xeago_> Can we stop feeding the troll?
<DouweM> I'm enjoying it
<one_tkbx> ...
<one_tkbx> how am I the troll?
<mr`spock> what is one_tkbx asking for?
<Senjai`work> one_tkbx: you have to be trolling right now..
<Xeago_> by refusing to use well established scheme's?
bruno- has quit [Quit: leaving]
<one_tkbx> you're trying to convince me that a) replace != "put back", and b) pulling pieces of paper isn't "random enough" for passwords
<Xeago_> mr`spock: nothing anymore, his question has been answered as far as I know
bruno- has joined #ruby
<DouweM> one_tkbx: ...
<one_tkbx> DouweM: installing cheese, one sec
<Xeago_> to continue feeding, I'd also argue that shaking a box is not seeding the box with enough entropy to draw uniformly over the set
<DouweM> haha
<one_tkbx> Xeago_: I placed the box on a floppy drive containing /dev/random
<mr`spock> Xeago_, what if there were 1024 iterations of random people shaking the box randomly
<Xeago_> mr`spock: he said he shook the box himself
<Xeago_> one_tkbx: what?
gigetoo has quit [Ping timeout: 245 seconds]
<mr`spock> then there's not a lot of entropy
<DouweM> Xeago_: the troll shows its true colors
jonathanwallace has joined #ruby
<mr`spock> at my colocation datacenter i had three people pick a random number to derive my 3-digit rack PIN
<one_tkbx> >tfw I actually took the bait
zz_scottstamp is now known as scottstamp
<DouweM> :D
<one_tkbx> oh god
Czupa has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
bruno- has quit [Quit: leaving]
scottstamp is now known as zz_scottstamp
bruno- has joined #ruby
<shevy> def add_separator; self << :separator
<shevy> never saw that one before either
<shevy> ah
<shevy> it just calls the << method
<DouweM> yes
<shevy> oh man... ruby syntax can be puzzling sometimes
<DouweM> ha
<DouweM> what code are you reading through?
zz_scottstamp is now known as scottstamp
scottstamp is now known as zz_scottstamp
dnyy has quit [Remote host closed the connection]
gigetoo has quit [Read error: Operation timed out]
julian-delphiki has quit [Quit: Leaving]
dnyy has joined #ruby
dnyy has quit [Read error: Connection reset by peer]
dnyy has joined #ruby
zz_scottstamp is now known as scottstamp
inimit has quit [Quit: inimit]
<shevy> DouweM a moment
<one_tkbx> so I believe the answer to my original question was no, strings cannot be modified?
<shevy> strings can be modifed
<one_tkbx> I mean overwritten in memory
<Senjai`work> one_tkbx: Ugh, Use C.. Or use Fiddle http://ruby-doc.org/stdlib-2.0.0/libdoc/fiddle/rdoc/Fiddle.html
<shevy> if you meant something else why didn't you say so :P
<shevy> in ruby you have no access to memory so there you go
<one_tkbx> ;_;
<shevy> one more reason for you to master C!
<one_tkbx> well thanks for the "entertainment" anyway
<DouweM> one_tkbx: thank *you*!
<shevy> lol
<Senjai`work> ^^
<shevy> DouweM the code is some scary stuff...
<Senjai`work> Technically you can screw with memory using Fiddle, but I'm not going into that
<shevy> in a module, then class, then module, I stare at:
<shevy> def table(headings = [], *rows, &block)
<shevy> Terminal::Table.new( :headings => headings.to_a, :rows => rows, &block )
<shevy> hmmm
<shevy> 4 end's
<shevy> it's like those russian dolls where there is a doll inside a doll inside another doll
<shevy> then you open the last... and it's empty!
_maes_ has joined #ruby
<shevy> Fiddle is a cool name for a project though
danshultz has joined #ruby
scottstamp is now known as zz_scottstamp
<one_tkbx> for some reason when I saw "Fiddle" followed by a link, I thought it was a jsfiddle
<Senjai`work> As tenderlove said, Fiddle, do horrible things from ruby
<one_tkbx> untill I remembered this is #ruby
zz_scottstamp is now known as scottstamp
<Senjai`work> one_tkbx: http://rubyfiddle.com/ fail
<shevy> why js
<shevy> is your brain attached to js more than ruby one_tkbx ? :(
drumusician has quit [Ping timeout: 264 seconds]
<one_tkbx> because I do a lot of web things, and see jsfiddle a lot on stack overflow, didn't know it existed for non-web
<one_tkbx> shevy, I despise javascript
<shevy> \o/
<one_tkbx> and only know python
<shevy> my brother!
<shevy> ack
<shevy> you evil snakeman you
<shevy> zzss Szszs shszshzs?
<shevy> ^^^ speaking to the savage
<one_tkbx> well I came here for ruby
<shevy> \o/
Drakx has quit [Ping timeout: 248 seconds]
<one_tkbx> someone showed me ruby the other day and it seems like it could be a lot better than python
<shevy> nah
JohnBat26 has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
<shevy> I think ruby and python are at about equal levels, give or take a little
zeade has joined #ruby
<shevy> where one has an advantage, the other has a disadvantage
<Senjai`work> one_tkbx: You only despise javascript because you rely on security through obscurity, and people can see your javascript code :P
d45h has joined #ruby
<shevy> like documentation. who got the better documentation!
<shevy> I despise javascript too
<Senjai`work> A language is the sum of its libraries :P
<shevy> ok I will remember that when anyone rants against php
aspires has joined #ruby
banjara has quit [Quit: Leaving.]
<one_tkbx> Senjai`work: would I use javascript if I'm "relying" on security through obscurity?
<one_tkbx> you know what
<shevy> we even have php-gtk!!!
zeade has quit [Client Quit]
<one_tkbx> I'm not taking questions any more, leads to my being trolled
dkamioka has quit [Remote host closed the connection]
<DouweM> :D
carraroj has quit [Quit: Konversation terminated!]
dnyy has quit [Remote host closed the connection]
<shevy> come on man
danshultz has quit [Ping timeout: 264 seconds]
<Senjai`work> shevy: I wish there was alternative client side languages other than javascript, but for now it's a necessary evil.
<shevy> it happens to everyone
<shevy> one_tkbx most trolls are on reddit
<Senjai`work> You can write nice code in javascript though... It IS possible
<DouweM> one_tkbx: the great thing is that apparently both sides were being completely serious, but are both convinced the other side was trolling
<one_tkbx> lol
dnyy has joined #ruby
dnyy has quit [Read error: Connection reset by peer]
<one_tkbx> <mr`spock> Xeago_, what if there were 1024 iterations of random people shaking the box randomly
thelorax123 has joined #ruby
dnyy has joined #ruby
<one_tkbx> <DouweM> ...both sides were being completely serious
<shevy> Senjai`work yeah, javascript is winning because of its monopoly and as a consequence I guess the language will become better and better and better
banjara has joined #ruby
<shevy> one day it will kill ruby
bruno- has quit [Quit: leaving]
brennanMKE has joined #ruby
<shevy> Xeago_ is an exception
bruno- has joined #ruby
<shevy> he was just trolling
<DouweM> one_tkbx: we were joking around at some point, my request for a pic of the box including, but none of our arguments were false
<one_tkbx> can javascript be run locally?
banjara has quit [Client Quit]
<one_tkbx> well
<DouweM> one_tkbx: locally as in?
<one_tkbx> you know what I mean
<one_tkbx> outside a browser
<shevy> one_tkbx well... not quite so... I mean, I dont know how to create a directory with it on my hdd ...
<Senjai`work> shevy: I don't think JS will ever take off as a fully interpreted language solution
<DouweM> sure, node.js
thelorax123 has quit [Remote host closed the connection]
<shevy> ack
<Senjai`work> shevy: e.g node.js etc.
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> you can create a directory with node.js ???
<shevy> my javascript knowledge stems back from the 1999-era
banjara has joined #ruby
<DouweM> node.js has a standard library much different from browser JS
colonolGron has joined #ruby
<one_tkbx> how do you guys like my javascript skills?
<Senjai`work> right.
<one_tkbx> step9 = CryptoJS.SHA256(step8);
<one_tkbx> step10 = CryptoJS.SHA256(step9);
<one_tkbx> step11 = CryptoJS.SHA256(step10);
<Senjai`work> DouweM: But the syntax is still messy, for it to get better, it would end up looking like another language that probably does it better already
<DouweM> Senjai`work: oh, I definitely agree. I was just responding to shevy's surprise over node.js actually being able to do stuff
<Senjai`work> Woot, time to dd some partitions! huzzah!
gigetoo has joined #ruby
Deele has quit [Ping timeout: 260 seconds]
* Senjai`work speaking from someone who actually destroyed a disk using it in the past :(
one_tkbx has left #ruby ["Leaving"]
one_tkbx has joined #ruby
<shevy> hey I did that too
<one_tkbx> Senjai`work, you know what dd stands for
<shevy> when I was young and innocent
<shevy> disk death
DanKnox_away is now known as DanKnox
<one_tkbx> death, destruction, whichever
<Senjai`work> disk destroyer
<shevy> hmm
<shevy> fs.mkdir
<Senjai`work> when used improperly
<Hanmac> one_tkbx: the step9 ... step11 looks like javascript is to dump for loops? oO
<Xeago_> Senjai`work: you can actually implement safe encryption in javascript
<shevy> no
<shevy> one_tkbx is too dumb for loops
<shevy> that's a big difference
<one_tkbx> ;_;
banjara has quit [Client Quit]
<Senjai`work> Xeago_: definitely
<Xeago_> Senjai`work: it just isn't cryptographically secure against other attacks
<shevy> but I would hate myself for having to write a loop in javascript anyway
<shevy> you would need for(); something right?
<DouweM> shevy: yes
<Senjai`work> shevy: I prefer C loops over javascript loops :O
<one_tkbx> this was when I didn't even know python, the x=1, ..., x++ format of loops was dumbfounding to me
<one_tkbx> that's what js uses, right?
<DouweM> one_tkbx: right
<shevy> hmm
mbessey_ has quit [Quit: Leaving...]
<shevy> see we need a way to jump back in time
<shevy> and correct past mistakes that affect us today
coderhs has quit [Read error: Operation timed out]
<Senjai`work> 6 partions deleted, 2 moved & resized, 1 created
<Senjai`work> success!
<Senjai`work> s/partions/partitions
<shevy> Senjai`work go shrink the pr0n partition
gigetoo has quit [Ping timeout: 265 seconds]
<shevy> and are you really working right now :P
<Senjai`work> shevy: Shh, nobody's supposed to know about that! it's a work computer!
<shevy> hahaha
<Senjai`work> shevy: No, but I'm at work on the weekend, and I connect through the server at work
<Senjai`work> this is just the weechat configuration for my tmux session at work
thelorax123 has joined #ruby
<Senjai`work> 3 disks down, one to go!
thelorax123 has quit [Remote host closed the connection]
* Senjai`work boots up tf2 while waiting
swingha has quit [Quit: WeeChat 0.4.2]
timonv has joined #ruby
jaybonci has quit [Ping timeout: 245 seconds]
dnyy has quit [Remote host closed the connection]
<DouweM> :)
vlad_sta_ has joined #ruby
<shevy> you geeks are confusing
dnyy has joined #ruby
dnyy has quit [Read error: Connection reset by peer]
jbpros has quit [Quit: jbpros]
thelorax123 has joined #ruby
thelorax123 has quit [Remote host closed the connection]
dnyy has joined #ruby
<matti> Looks who's saying.
<matti> ;s
<Xeago_> anyone plays dota2 in here?
tesuji has joined #ruby
<matti> Xeago_: I used to.
<Xeago_> why no longer?
<matti> Nobody to play with ;p
havenwood has quit []
<Xeago_> there's me?:P
<Senjai`work> I might
<Senjai`work> my work comps pretty beefe
<Senjai`work> beefy*
<matti> Xeago_: I'd have to download it again, which may take a bit.
<Senjai`work> Xeago_: I'll catch a game with you later if you want
<matti> Xeago_: But then, no problem.
<Xeago_> please :)
vlad_starkov has quit [Ping timeout: 245 seconds]
<AntelopeSalad> i uninstalled it after witnessing the built in turn/animation delay
<Senjai`work> Xeago_: steam name?
gigetoo has joined #ruby
<Xeago_> Senjai`work: see PM
<Xeago_> AntelopeSalad: what do you mean?
thelorax123 has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
<Xeago_> all heroes have a turn acceleration if you didn't know?
bruno- has quit [Quit: leaving]
<AntelopeSalad> there's a built in 300ms'ish delay when turning and initiating commands
bruno- has joined #ruby
<Xeago_> hmm, not aware of that, might it have been lag
<Xeago_> ?
<matti> ?
<Senjai`work> I've never had that delay
<AntelopeSalad> i think it was used because it was in dota1 (but back then it was an engine limitation) and also it supposedly levels out the playing field for cross continent play
timonv has quit [Ping timeout: 252 seconds]
<Xeago_> tournaments are run on lan for that reason...
<AntelopeSalad> right, i didn't make the rules :o
<AntelopeSalad> i think it's ridiculous, that's why i won't play it
aspires has joined #ruby
<Xeago_> I doubt that is actually still in place
thelorax123 has quit [Remote host closed the connection]
petey has quit [Remote host closed the connection]
<AntelopeSalad> it's only noticeable if you've played other mobas without it
<AntelopeSalad> but you could still feel it if you pay attention
petey has joined #ruby
<Xeago_> anything above 100ms is clearly noticeable imo
<AntelopeSalad> yeah without a doubt
<Xeago_> I'll run some tests on it tonight
dkamioka has joined #ruby
<AntelopeSalad> next time you play try it out, issue a movement command to move your char backwards or cast a skill off to the side
<AntelopeSalad> and then notice how long it takes to happen
<Xeago_> I suspect it to just be lag, and a slow turn acceleration
thelorax123 has joined #ruby
<Xeago_> AntelopeSalad: so it is just a turn delay?
<AntelopeSalad> it happens in practice mode too
<Xeago_> e.g. moving forward doesn't show it?
<AntelopeSalad> google on the subject, you'll see
<AntelopeSalad> it has something to do with the turn speed
Speed has left #ruby ["WeeChat 0.4.2"]
thelorax123 has quit [Remote host closed the connection]
<Senjai`work> New work setup http://i.imgur.com/F9EBRh0.jpg
Mars__ has quit [Remote host closed the connection]
petey has quit [Ping timeout: 264 seconds]
awarner has joined #ruby
Mars__ has joined #ruby
dkamioka has quit [Ping timeout: 248 seconds]
<AntelopeSalad> don't spill your drink!
<shevy> hmm
<shevy> >> module A;module B; class C; end; end; end; p A
<eval-in_> shevy => A ... (https://eval.in/65000)
<shevy> >> class A;module B; class C; end; end; end; p A::B::C.new
<eval-in_> shevy => #<A::B::C:0x41ec4eec> ... (https://eval.in/65001)
scottstamp is now known as zz_scottstamp
zz_scottstamp is now known as scottstamp
ewnd9_ has joined #ruby
<DouweM> your point being?
workmad3 has quit [Ping timeout: 245 seconds]
<Senjai`work> Ubuntu 13.10 is so much better than the previous releases..
Mars__ has quit [Ping timeout: 240 seconds]
Gargron has joined #ruby
<Senjai`work> Xeago_: Whats your timezone
<Gargron> hello! what does it mean if i send to the ruby script the string "ß" but what it is interpreted as in ruby is "Ã\u009F" ?
amacgregor has quit [Ping timeout: 245 seconds]
<Gargron> and if i output the encoding of the string, it says it *is* UTF-8
<Gargron> force encoding or just encoding it to UTF-8 does not change anything
shvelo has quit [Ping timeout: 272 seconds]
<shevy> hmm what do you guys say to this http://pastie.org/pastes/8468678/text
wallerdev has quit [Quit: wallerdev]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<shevy> DouweM, I tried to find out if ruby has some guideline when displaying classes or modules that reside in under classes or modules
<shevy> most of the time I only see:
<shevy> Foo::Bar
<shevy> so I wondered whether I would see:
<shevy> Foo::Bar::Bla::Ble
<shevy> too
<DouweM> you would :) the name is just recursively parent.name + "::" + self.name (not actual code, of course)
bklane has joined #ruby
<DouweM> and there are some exceptions to that, but those are beside the point
codenapper has quit [Quit: codenapper]
huttan has quit [Ping timeout: 264 seconds]
dkamioka has joined #ruby
jamesaanderson has joined #ruby
_Andres has joined #ruby
nbrosnahan has quit [Ping timeout: 245 seconds]
dkamioka has quit [Read error: Connection reset by peer]
dkamioka has joined #ruby
snorky has joined #ruby
<snorky> hmm is http://api.paypal.com down?
mrsolo has joined #ruby
mrsolo has quit [Remote host closed the connection]
dkamioka has quit [Read error: Connection reset by peer]
nbrosnahan has joined #ruby
dkamioka_ has joined #ruby
workmad3 has joined #ruby
jonathanwallace has quit [Ping timeout: 265 seconds]
gr33n7007h has joined #ruby
staafl has quit [Ping timeout: 264 seconds]
bootcoder has quit [Quit: Konversation terminated!]
bootcoder has joined #ruby
bruno- has quit [Quit: leaving]
bruno- has joined #ruby
Lewix has quit [Remote host closed the connection]
dkamioka_ has quit [Ping timeout: 265 seconds]
Kiba has quit [Ping timeout: 245 seconds]
theRoUS has quit [Ping timeout: 272 seconds]
Gargron has quit [Quit: Leaving]
bruno- has quit [Client Quit]
Elhu has quit [Quit: Computer has gone to sleep.]
bruno- has joined #ruby
<mr`spock> snorky, it's not loading for me via HTTP. is it supposed to?
<snorky> mr`spock: i don't know, but new relic is going nuts so i just wanted to see if it was just me or not
petey has joined #ruby
Thanatermesis has quit [Read error: Connection reset by peer]
^Chris^ has joined #ruby
<snorky> mr`spock: new relic is giving me a 406 o_O
Levin_22 has quit [Quit: Levin_22]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
dr_bob has quit [Quit: Tune in next week when you'll hear Dr. Bob say...]
vlad_starkov has joined #ruby
aryaching has joined #ruby
jonathanwallace has joined #ruby
vlad_sta_ has quit [Ping timeout: 265 seconds]
kirun has quit [Quit: Client exiting]
drag00n has quit [Ping timeout: 264 seconds]
panchiniak_ has joined #ruby
snorky has quit [Ping timeout: 250 seconds]
awarner has quit [Remote host closed the connection]
jrhe has left #ruby [#ruby]
awarner has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dnyy has quit []
zigomir has quit [Read error: Connection reset by peer]
zigomir has joined #ruby
waxjar has quit [Quit: ZNC - http://znc.in]
^Chris^ has quit [Read error: Connection reset by peer]
waxjar has joined #ruby
awarner has quit [Ping timeout: 272 seconds]
hashpuppy has joined #ruby
<jb41> [1, 2, 3].bsearch { |x| x > 1 }
<jb41> NoMethodError: undefined method `bsearch' for [1, 2, 3]:Array
<jb41> wtf? is't some issue with ruby version, or what?
Thanatermesis has joined #ruby
Kiba has joined #ruby
<jb41> ok, I got it...
<apeiros> jb41: what ruby version do you have?
<jb41> it's from 2.0.0, I'm using 1.9.3-something
<apeiros> yes. bsearch is a 2.0+ thing
<jb41> ok
<jb41> btw. I've such problem: (gimme a minute to describe it)
peterdecroos has quit [Read error: Connection reset by peer]
peterdecroos has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
marr has quit []
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
bruno- has quit [Quit: leaving]
spider-mario has quit [Remote host closed the connection]
bruno- has joined #ruby
<jb41> I doing DBSCAN algorithm (no matter what it does), but it have to count distances between points, many times - for my sample dataset it's about 15315274 times, for 4k different coords. It takes too much time (about 14minutes on my machine) to compute distances, and it's computing the same distances many times, so I thought that I'll make a lookup table (2d matrix) with all possible distances. Ok, so what's the most efficent way to save it and se
bugsinlights has joined #ruby
<jb41> btw. maybe hash of hashes?
tesuji has quit [Ping timeout: 272 seconds]
<jb41> but then I've no idea how to name key's of that
<apeiros> 4k coords? that's a large hash if you want all combinations of 2…
anderse has quit [Quit: anderse]
<jb41> yes
<jb41> but time is more important than memory for me
<apeiros> ah, wait, I'm confusing things. it's not as big as I thought
<apeiros> I thought of 4k!, but it's only (4k-1)^2/2 - still large but much less
Mars__ has joined #ruby
<apeiros> gah, 4k*(4k-1)/2, that was the formula
<apeiros> anyway, still 8mio entries
vlad_sta_ has joined #ruby
gasbakid has joined #ruby
<jb41> now I'm making triangular matrix with counted values
<jb41> and I was searching using bsearch
<apeiros> but yes, hash with [from_coord, to_coord] as key
<jb41> by coords I mean [latitude, longitude]
huttan has joined #ruby
<jb41> but, that's not important what are my coords
<jb41> WHOA! *_*
<jb41> you're kidding me! I just check it, and ruby allows arrays as a hash key
<apeiros> sure
bruno- has quit [Quit: leaving]
mixel has quit [Quit: mixel]
justsee has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> any object which has #hash and #eql? implemented properly can serve as a hash key
<jb41> that language will never stop suprise me
vlad_starkov has quit [Ping timeout: 264 seconds]
<jb41> that's awesome
<jb41> s/suprise/suprising
<apeiros> yupp
scottstamp is now known as zz_scottstamp
<jb41> I'm waiting when sciruby will be finished
<jb41> BLAS and LAPACK in ruby will be something perfect for me
relix has joined #ruby
osvico has quit [Ping timeout: 264 seconds]
<DouweM> beware that the hash will start behaving erratically if you change its keys from under it causing their hashes to change. so don't touch those array-keys after you've set them in the hash
huttan has quit [Ping timeout: 248 seconds]
<jb41> ok
burlyscudd has joined #ruby
<DouweM> to make sure you don't even do so on accident, you can #freeze the array you set as key
<apeiros> DouweM: insufficient if the contents of the array is mutable
vince_prignano has quit []
<apeiros> a workaround is Hash#rehash. but using that implies you did it wrong.
<DouweM> apeiros: I know, but if it's just numeric coords like now, that's not an issue
<apeiros> jb41: you can use Hash with a block to memoize distances
amacgregor has joined #ruby
claymore has quit [Quit: Leaving]
<jb41> what you mean exactly?
<DouweM> apeiros: ah, good call!
<apeiros> e.g. `distance = Hash.new { |hash,(from, to)| hash[[from, to]] = calculate_distance(from, to) }; distance[[a,b]] # => result`
<apeiros> this hash automatically populates keys you request
mrsolo has joined #ruby
<apeiros> you might consider additional logic to have from/to in strict order, so distance[[from, to]] and distance[[to, from]] don't require a recalculation (because the key is different)
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mr`spock> gosh i love you guys/
<jb41> hmm... I will do such thing but then my key will be array of 4 values
fixl has joined #ruby
<mr`spock> sometimes i wish my coworkers could have such conversations. i don't work with any real programmers :-\
<DouweM> jb41: what do you want to use for keys?
EvanR has joined #ruby
klaas has quit [Quit: ZNC - http://znc.sourceforge.net]
<apeiros> e.g. `distance = Hash.new { |hash,(from, to)| if hash.has_key?([to, from]) then hash[[to, from]] else hash[[from, to]] = calculate_distance(from, to) end }`
<jb41> yes, I will do it so to-from yields same value as from-to, don't keeping it in memory two times
<DouweM> apeiros: :)
EvanR is now known as Guest36096
Mars__ has quit [Remote host closed the connection]
<jb41> DouweM: for examples such array: [1,2]
bruno- has joined #ruby
<apeiros> it might actually pay off to keep [from, to] an array in the block and only decompose it for the calculation
Mars__ has joined #ruby
<DouweM> jb41: yup, got it now
<jb41> but I'll propably have hash of hashes
<apeiros> e.g. `distance = Hash.new { |hash,from_to| to_from = from_to.reverse; if hash.has_key?(to_from) then hash[to_from] else hash[from_to] = calculate_distance(*from_to) end }`
<jb41> one point have [x, y] coords
<jb41> and I've to keep distances between every points
<jb41> s/every/all
<DouweM> jb41: array-of-arrays as hash keys is fine too, apeiros's example works with that
<jb41> :D
<jb41> I like such magic
<jb41> ok, I'll try it out
bruno- has quit [Client Quit]
<DouweM> The magic in this case is just #hash. Array#hash combines the #hash of its elements, so [[a,b],[c,d]].hash will be the combination of [a,b].hash and [c,d].hash which will end up being the combination of a.hash, b.hash, c.hash and d.hash.
binaryplease has joined #ruby
Mars___ has joined #ruby
axl_ has left #ruby [#ruby]
<jb41> hmmm
Mars__ has quit [Ping timeout: 272 seconds]
Guest36096 has quit [Ping timeout: 240 seconds]
<jb41> as you said that, now I understand why hash is named hash - just like password hash'es. It's quite interesting idea of storing data.
<DouweM> :)
<DouweM> Hash isn't named Hash for nothing
<apeiros> Hash is somewhat misnamed. it's a HashMap or HashTable
jonathanwallace1 has joined #ruby
jonathanwallace has quit [Ping timeout: 264 seconds]
<jb41> I'm a little bit sad, that I didn't know that until now
<jb41> yes
thelorax123 has joined #ruby
<apeiros> a hash is a `hashed value` of an object (Object#hash), which Hash (HashMap) uses to calculate the bucket where it resides
<jb41> that's why searching through hashes are so quick
<apeiros> eql? is then used to ensure it's not just a collision
<apeiros> yes, Hash lookup is amortized O(1)
<DouweM> Note that all of this is the case for Set as well, seeing as it's backed by Hash
<jb41> right
dkamioka has joined #ruby
<jb41> you guys, have a lot of knowledge :)
bklane has quit [Remote host closed the connection]
<apeiros> a hash can still be slower than a e.g. a sorted array with binary search, though, if e.g. you have a bad #hash method (many collisions) or if your #hash method is very expensive (large constant factor)
thelorax123 has quit [Remote host closed the connection]
hashpuppy has quit [Quit: Computer has gone to sleep.]
* apeiros off, watching sc2 world championships - bye :)
<DouweM> apeiros: ha, have fun
justsee has quit [Ping timeout: 272 seconds]
<hiall> apeiros: GO JAEDONG
thelorax123 has joined #ruby
<DouweM> jb41: all of that stuff about hashing is taught in freshman year CS btw. I should know because that's where I was last year
<jb41> DouweM: I'm doing CS, but nobody told me that :(
d45h has quit []
<DouweM> jb41: you didn't have a course on data structures?
kofno has quit [Ping timeout: 265 seconds]
<jb41> or I wasn't at that lecture, actually...
hashpuppy has joined #ruby
<DouweM> ha
<jb41> I'm from Poland, it's quite different in here
dkamioka has quit [Ping timeout: 264 seconds]
thelorax123 has quit [Remote host closed the connection]
h0rrorvacui has quit [Quit: Leaving]
diegoviola has quit [Ping timeout: 244 seconds]
h0rrorvacui has joined #ruby
thelorax123 has joined #ruby
flops has quit [Quit: leaving]
nateberkopec has quit [Quit: Leaving...]