ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
krz has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
ahs3- has joined #ruby-lang
seanstickle has joined #ruby-lang
<postmodern> if a project is using RDoc::Task.new, should it add rdoc as a development_dependency?
kain has quit [Quit: Sto andando via]
codesturgeon has joined #ruby-lang
erpuds has joined #ruby-lang
tRAS_ has joined #ruby-lang
tRAS has quit [Ping timeout: 244 seconds]
<rue> postmodern: Comes with Ruby
<postmodern> rue, true, but RDoc::Task was added in 2.4.2
codesturgeon has quit [Remote host closed the connection]
codesturgeon has joined #ruby-lang
<rue> Ah, I don’t remember what the stdlib version is. Maybe, then?
<postmodern> rue, meant to replace Rake::RDocTask
<rue> Oh, right
<postmodern> 1.9 seems to have it vendored in
<postmodern> 1.8.7 doesn't
<postmodern> ha 1.8.7 has RDoc V1.0.1 - 20041108
<postmodern> also what's the status of test.rubygems.org ?
<postmodern> is it recommended new projects opt-in with a .gemtest file?
<postmodern> or is it going away?
<banisterfiend> ask erikh
replore has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
jd has joined #ruby-lang
Jade has quit [Disconnected by services]
jd is now known as Jade
ryanf has quit [Ping timeout: 240 seconds]
chessguy has joined #ruby-lang
ryanf has joined #ruby-lang
pcboy___ has joined #ruby-lang
M4g1c5t0rM has joined #ruby-lang
erpuds has quit [Quit: erpuds]
erpuds has joined #ruby-lang
M4g1c5t0rM has left #ruby-lang [#ruby-lang]
pcboy_ has quit [Ping timeout: 260 seconds]
M4g1c5t0rM has joined #ruby-lang
ryanf has quit [Ping timeout: 252 seconds]
brushbox has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
wmoxam has joined #ruby-lang
mrb_bk has joined #ruby-lang
seanstickle has joined #ruby-lang
stardiviner has joined #ruby-lang
chessguy has quit [Remote host closed the connection]
deobald__ has quit [Ping timeout: 260 seconds]
gregf has joined #ruby-lang
tmi_ has quit [Ping timeout: 252 seconds]
Swimming_Bird has joined #ruby-lang
ttilley has quit [Read error: Connection reset by peer]
ttilley has joined #ruby-lang
fukushima has quit [Ping timeout: 265 seconds]
fukushima has joined #ruby-lang
tmi_ has joined #ruby-lang
ConstantineXVI has quit [Remote host closed the connection]
retro|cz has quit [Ping timeout: 265 seconds]
brushbox has quit [Ping timeout: 244 seconds]
brushbox has joined #ruby-lang
kain has joined #ruby-lang
arooni-mobile has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
jondot has quit [Ping timeout: 244 seconds]
S3kx has joined #ruby-lang
S2kx has quit [Ping timeout: 245 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
codesturgeon has quit [Quit: Leaving...]
x0F_ is now known as x0F
Karmaon is now known as Karmaon|away
neoesque has joined #ruby-lang
jxie_ has joined #ruby-lang
jxie has quit [Ping timeout: 256 seconds]
savage- has joined #ruby-lang
wmoxam has quit [Ping timeout: 240 seconds]
codesturgeon has joined #ruby-lang
konr` has joined #ruby-lang
konr has quit [Ping timeout: 240 seconds]
flowerpot has joined #ruby-lang
hahuang65_ has joined #ruby-lang
ttilley has quit [Remote host closed the connection]
seanstickle has joined #ruby-lang
tRAS_ has quit [Quit: Mother, did it need to be so high?]
codesturgeon has quit [Quit: Leaving...]
ryanf has joined #ruby-lang
tRAS has joined #ruby-lang
srbartle_ has joined #ruby-lang
srbartlett has quit [Read error: Connection reset by peer]
seanstickle has quit [Quit: Nihil sub sole novum]
A124 has joined #ruby-lang
Karmaon|away is now known as Karmaon
petercooper has quit [Remote host closed the connection]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
Dreamer3 has quit [Ping timeout: 245 seconds]
lele has quit [Ping timeout: 245 seconds]
lele has joined #ruby-lang
countdig1 has quit [Ping timeout: 245 seconds]
countdigi has quit [Ping timeout: 245 seconds]
mksm has quit [Ping timeout: 245 seconds]
Gekz_ has joined #ruby-lang
Gekz_ has quit [Changing host]
Gekz_ has joined #ruby-lang
countdigi has joined #ruby-lang
countdig1 has joined #ruby-lang
Asher1 has joined #ruby-lang
Asher has quit [Ping timeout: 245 seconds]
erikh has quit [Ping timeout: 245 seconds]
Gekz has quit [Ping timeout: 245 seconds]
Asher1 has quit [Remote host closed the connection]
Asher has joined #ruby-lang
vesan has quit [Ping timeout: 248 seconds]
mksm has joined #ruby-lang
Phrogz has joined #ruby-lang
mksm is now known as Guest74504
Dreamer3 has joined #ruby-lang
erikh has joined #ruby-lang
andrewhl has joined #ruby-lang
tylergillies has joined #ruby-lang
<tylergillies> is there a function i can call that will do something like 5.self{|n| n + 1} #=> 6
vesan has joined #ruby-lang
<cirwim> instance_exec
<cirwim> hmm, well not quite
<cirwim> why?
<cirwim> 5.andand{ |n| n + 1 } does that
<cirwim> but only for truthy values
<tylergillies> cirwim: for educational purposes
<cirwim> hehe
<tylergillies> like learning, for example, that theres a method on Object called instance_exec
<cirwim> sure, education is good
<tylergillies> im actually surprised i didn't know about that one, there's not a whole lot
s0ra_h is now known as sora_h
<tylergillies> ah, 5.instance_exec{ self + 1 } works
<bnagy> 5.instance_eval 'send :+, 1' that too
jondot has joined #ruby-lang
<jorgenpt> Also 5.send(:+, 1)
<cirwim> how about "5 + 1"
<cirwim> :p
<bnagy> well yeah, but that's not the point of the exercise :)
<tylergillies> heh
<cirwim> any feature that you don't know about is a feature you don't need
<tylergillies> FSVO need
<bnagy> wow... that's... a retarded thing to say :)
slyphon is now known as slyphon_away
mistym has quit [Remote host closed the connection]
kain has quit [Quit: Sto andando via]
<tylergillies> pretty sure im going to hell for this: p "omg lisp is invading my thought process".instance_exec{ self.split.first(self.split.count.instance_exec{ self/2.to_f }.floor).instance_exec{ "#{self.join ' '} awesome" } }
sora_h is now known as s0ra_h
tRAS has quit [Quit: Mother, did it need to be so high?]
<cirwim> heh, neat trick
gokul has joined #ruby-lang
macmartine has quit [Quit: macmartine]
rippa has joined #ruby-lang
flip_digits has joined #ruby-lang
<jorgenpt> tylergillies: Isn't the 'self' there implied?
<jorgenpt> tylergillies: "omg lisp is invading my thought process".instance_exec{ split.first(split.count.instance_exec{self/2.to_f }.floor).instance_exec{ "#{join ' '} awesome" } }
<jorgenpt> \o/
<tylergillies> 5.instance_exec{ +1} #=> 1 hrmm
<cirwim> 5.instance_exec{ -1 } => -1
<bnagy> amazing - the number 1 is always the number 1 no matter what context you eval it in :)
<cirwim> bnagy: I think the confusion is lack of knowledge of the unary + operator :)
<tylergillies> those unary operators ah
<tylergillies> the exception that proves the rule
<cirwim> 1-~-~-~-1 == ?
<bnagy> cthulhu?
<cirwim> :D
tonesfrommars has quit [Quit: KVIrc 4.0.1 Insomnia http://www.kvirc.net/]
Phrogz has quit [Quit: Damnit, sleep.]
<tylergillies> lol
ryez has quit [Ping timeout: 245 seconds]
tRAS has joined #ruby-lang
flip_digits has quit [Quit: Computer has gone to sleep.]
woollyams has joined #ruby-lang
mssola has joined #ruby-lang
macmartine has joined #ruby-lang
nahhh has joined #ruby-lang
macmartine has quit [Remote host closed the connection]
macmartine has joined #ruby-lang
fayimora has joined #ruby-lang
TheHunter_1039 has quit [Quit: TheHunter_1039]
macmartine has quit [Quit: macmartine]
harukomoto has quit [Ping timeout: 248 seconds]
rmascarenhas has quit [Quit: leaving]
mistym has joined #ruby-lang
dc5ala has joined #ruby-lang
yxhuvud has joined #ruby-lang
M4g1c5t0rM has quit [Quit: Leaving.]
nahhh has left #ruby-lang [#ruby-lang]
shevy has quit [Ping timeout: 244 seconds]
andrewhl has quit [Quit: andrewhl]
slyphon_away has quit [Ping timeout: 245 seconds]
jxie has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
replore has quit [Remote host closed the connection]
jxie_ has quit [Ping timeout: 250 seconds]
jxie has quit [Ping timeout: 244 seconds]
shevy has joined #ruby-lang
s0ra_h is now known as sora_h
brushbox has quit [Quit: Leaving.]
mytrile has joined #ruby-lang
savage- has quit [Remote host closed the connection]
magicbeef has quit [Quit: magicbeef]
fukushima has quit [Quit: Leaving...]
jxie has joined #ruby-lang
gypki has joined #ruby-lang
vmoravec has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
mistym has quit [Remote host closed the connection]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
wycats has joined #ruby-lang
gouthamvel has joined #ruby-lang
fayimora has quit [Quit: Busy…..zzzzz]
gypki has quit [Ping timeout: 245 seconds]
<shevy> <bnagy> cthulhu?
<shevy> LOL
gsav has quit [Quit: Lost terminal]
gsav has joined #ruby-lang
retro|cz has joined #ruby-lang
gasbakid has joined #ruby-lang
tla has quit [Remote host closed the connection]
woollyams has quit [Ping timeout: 256 seconds]
gnufied has joined #ruby-lang
igotnolegs has quit [Quit: Computer has gone to sleep.]
yugui_zzz is now known as yugui
fukushima has joined #ruby-lang
andkerosine has joined #ruby-lang
<andkerosine> Is it possible to determine whether or not a character can be displayed without resorting to the "\uxxxx" format?
<cirwim> andkerosine: what do you mean by "can be displayed"?
<andkerosine> I'm generating a string of characters pretty much at random, but I don't want the string to contain any "\uxxxx" portions.
pbjorklund has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<andkerosine> I'm trying to filter them out but can't seem to hit upon a way to distinguish between, say "\u5BD3" and "x".
<shevy> hmm
<cirwim> andkerosine: well, it depends on the terminal I think
<cirwim> if I were you I'd just generate ASCII instead...
<andkerosine> The kicker is that I'd prefer the string to be as random as possible. : )
<andkerosine> s/random/varied
<bnagy> uh, which one?
<bnagy> those are different things :)
<shevy> "\u5BD3".size returns 5 for me, that would be a difference to "x".size no?
<bnagy> random is easy - just pick your set and use sample
<andkerosine> Thus, "switch random for varied". : )
<andkerosine> For shame, bnagy.
<ryanf> andkerosine: define "can be displayed"
<shevy> hehe
<bnagy> well, varied is different
<andkerosine> ryanf: I've done so.
solars has joined #ruby-lang
<bnagy> like with a random string you might still get 'aaaa'
<bnagy> it's just very unlikely
<andkerosine> Fair enough.
<bnagy> and I've had people asking for varied before, because they don't understand what random means
<andkerosine> Varied characters. I want the string to look as crazy as is possible. ^_^
<andkerosine> shevy: "\u05FB".size == 2, "ị".size == 3
<bnagy> (1..10).map {|e| '!@#$%^&*()'.split(//).sample}.join
<andkerosine> No.
<ryanf> well I guess you implied that you're talking about the output of inspect? but in my irb/pry \u5BD3 never appears as that sequence, it just shows up as the character
<ryanf> did you just pick that example at random and you actually mean sequences that aren't valid utf8 characters or something?
<bnagy> andkerosine: what do you plan to use the string for
<andkerosine> Yeah, sorry, picked it at random; should've used an actual example.
<andkerosine> "\u05FB" doesn't display for me.
<ryanf> ok, me neither. thanks
<ryanf> so you can check .valid_encoding?
<ryanf> no you can't
<ryanf> never mind
<ryanf> hmm
<andkerosine> Also, shevy, not #size, rather bytes.to_a.size.
<andkerosine> #size is always one for single-character strings in 1.9.3, I believe.
<andkerosine> It's pretty tricky. : / One of those rare occasions where 1.8 might be a boon.
heftig has quit [Quit: leaving]
<ryanf> andkerosine:
<ryanf> >> "\u05fb" =~ /[[:print:]]/
<ryanf> => nil
<ryanf> >> "\u5bd3" =~ /[[:print:]]/
<ryanf> => 0
<andkerosine> Bless your beautiful soul.
<ryanf> from skimming string.c, I think that's how ruby decides whether to display the \u stuff, more or less
<andkerosine> Makes perfect sense.
<andkerosine> bnagy: I've taken the plunge into the pool of parentheses and would like to implement a Brainfuck variant in Racket.
rushed has joined #ruby-lang
tomzx has quit [Ping timeout: 276 seconds]
<andkerosine> Test-driving in Ruby first, naturally.
gsav has quit [Ping timeout: 245 seconds]
rolfb has joined #ruby-lang
gouthamvel has quit [Ping timeout: 248 seconds]
<bnagy> hm, "\uB5D3" =~ /[[:print]]/ => nil
<bnagy> but it displays for me :S
<ryanf> hmm
<ryanf> weird
<bnagy> 1.9.2p290
<andkerosine> Can you identify the writing system?
<andkerosine> Or, rather, can you verify that your have Hangul support?
<bnagy> looks like simplified chinese
<andkerosine> *you
<shevy> hehe
krz has quit [Quit: krz]
<andkerosine> "U+B5D3 is not a valid unicode character."
<ryanf> bnagy: \ub5d3 matches [[:print:]] for me in 1.9.3
<ryanf> and displays
<ryanf> andkerosine: I think the U+ notation is not equivalent to the \u notation
<ryanf> although I'm unclear on the difference
<andkerosine> Hm... probably not? Mostly a stylistic thing, no?
<ryanf> I don't think the numbers mean the same thing
<andkerosine> Haha. I realize now that this all springs from me choosing a random codepoint in the beginning. : /
rolfb has quit [Quit: Linkinus - http://linkinus.com]
srbartle_ has quit [Remote host closed the connection]
<bnagy> ryanf: on jruby head I get the same (displays, doesn't match :print
<andkerosine> Yeah, never mind, just confirmed.
<bnagy> and same on 1.9.3-head
<bnagy> wacky
<andkerosine> Mm-hmm. A bit unfortunate, but either way, filtering out any of the ones that return nil is enough for my purposes, even if they would've printed.
<andkerosine> ryanf: Thank you again.
<youngin> Anyone good with Python and could beautify https://gist.github.com/2664703 for a quick $50?
WillMarshall has joined #ruby-lang
<cirwim> youngin: probably the wrong channel? you might want to look into PythonTidy
<youngin> cirwim: Cool, just asking
<andkerosine> bnagy: Also, for reference, you got nil out of "\ub5d3" because of [[:print]] (one colon), I believe.
<bnagy> andkerosine: AH thankyou
flowerpot has quit [Remote host closed the connection]
<andkerosine> Could've been quite the headache to track down...
<youngin> cirwim: Was just hoping that if any of y'all knew Python, y'all could make it far more beautiful than any of the cats in #python
<bnagy> that makes total sense
<yorickpeterse> That's some ugly ass Python right there
<shevy> python can be quite ugly
<shevy> def __foo__(self, man, what):
<youngin> yorickpeterse: hehe
<shevy> whoa... and all those ()
<shevy> uniqueList = sorted(list(set(allVals)))
<shevy> lisp 2.0!
<youngin> fancy earning a quick $50 fellas?
<yorickpeterse> No
<shevy> hmmm
<shevy> if len(paramWorkspace) == 0:
<shevy> paramWorkspace = arcpy.env.workspace
<shevy> does one really have to use the : there?
<andkerosine> Heh, "all those parentheses", he says. http://i.imgur.com/GRiwi.png
<shevy> waaaah
<shevy> ( attack!!!
<andkerosine> Indeed.
<yorickpeterse> youngin: if you pay others to fix up your messy code you won't learn anything from it
<yorickpeterse> Take those suggestions of #python seriously and start with that
<shevy> nah
<shevy> youngin switch to the dark side
<andkerosine> Honestly, those who make such offers aren't usually cut out to learn.
<shevy> youngin come to ruby
<shevy> yeah but often enough they also dont have time
<andkerosine> Having the time is part of being cut out for learning. : P
<youngin> Well, truth is I got way too many balls up in the air at the moment. Juggling with 5 other Ruby scripts, 3 other Rails projects, an InDesign business plan, 10-15 OpenOffice.org Calc spreadsheets
<youngin> Learning Python is not that high up on my agenda right now
<shevy> see? no time ;)
<shevy> wait what
<shevy> why python
<youngin> It's just that after meddling with Ruby, I've become obsessed with my code looking beautiful
<shevy> you mentioned ruby and rails ...
<youngin> As if it could be hung up in art galleries or something
<shevy> oh but it has real value
<shevy> art is subjective, but code has practical value
<youngin> Unfortunately ESRI ArcGIS (the world's premier geographical mapping software) only supports Python
<shevy> the best code is code never written
<andkerosine> Art can take on practical value, mind you.
<youngin> "the best code is never written" that's deep :-)
<shevy> the second best code is code that solves a given problem with as little means as required, ideally by being short, concise, logical and conveying the idea in a good way
<shevy> youngin well yeah, no bugs in code not written
<shevy> not too useful either though :(
<shevy> but I picture a language where one no longer has to write any code at all
<youngin> hehe
<shevy> and still things "work"
kitallis has quit [Quit: Computer has gone to sleep.]
<shevy> like a computer assisted brain interface ... but we would need clever machines for that I suppose
<andkerosine> In all seriousness, Ruby would be a shoe-in for objective best /overall/ language if it could /somehow/ manage to be whitespace-significant.
<andkerosine> Can you even imagine how beautiful Ruby code would be?
<shevy> well
<cirwim> surely C++ will win, now you can overload whitespace: http://www2.research.att.com/~bs/whitespace98.pdf
<shevy> I have to admit, having the option to omit "end" can be nice sometimes
<andkerosine> I realize it's essentially impossible.
<shevy> because for me, "end" does not really give any extra information (if my code is already properly indented that is)
<cirwim> ruby has quite a lot of features, I don't think the ideal language would have the rubbish ones
<shevy> def foo
<andkerosine> cirwim: Not to mention Lisp, in which you can literally put the building blocks in place to parse /any/ sequence of characters.
<shevy> puts 'hi'
<shevy> That's it!!!
<ryanf> cirwim: which ones are rubbish?
<cirwim> andkerosine: yeah, LilyPond is a good example of that
<cirwim> ryanf: ?a
WillMarshall has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<andkerosine> shevy: Well, I'm more thinking along the lines of "end end end end end". : (
<cirwim> for example
<ryanf> lilypond the scoring software?
<cirwim> yeah
<shevy> lol
<ryanf> is that written in lisp?
<shevy> andkerosine, that reminds me of the suggestion to use "endddd"
<cirwim> ryanf: yup
<andkerosine> shevy: cadadaddr.
<ryanf> oh, it's weird that I didn't know that
<ryanf> I read a big swath of the site a few years ago and it didn't mention it
<shevy> lilypond? isnt that one written in python?
<shevy> whoa
<shevy> qt-3.3.8.tar.bz2 has 14MB size :)
<andkerosine> Hey, don't do that. : )
<shevy> that's some URL cirwim ;-)
<cirwim> bleargh, google should make copy-link-address work :(
<shevy> what .pdf is that?
<shevy> yeah
<cirwim> a paper about lilypond
jmcphers_ has quit [Ping timeout: 272 seconds]
zmack has joined #ruby-lang
<shevy> gosh
<shevy> they released a new perl 5
<shevy> where is perl 6 :D
<ryanf> shevy: http://rakudo.org/
jmcphers has joined #ruby-lang
<andkerosine> It appears to be genuinely impossible to determine whether or not a character has been Unicode-escaped in Ruby 1.9. : /
<ryanf> what do you mean "whether it has been unicode-escaped"?
<ryanf> whether it shows up with "\uXXXX" in the inspect output doesn't imply anything about the string itself
<ryanf> it's still one character
<andkerosine> But that's precisely what I'm after.
<andkerosine> Given a string of Unicode characters, I'd like to detect the ones that have been escaped.
<ryanf> you mean the ones that would be escaped, were you to call .inspect on them, right?
<bnagy> have been escaped by what?
<ryanf> it doesn't really make sense to talk about the characters themselves as "having been escaped", unless you mean that the contents of the string are literally the bytes for '\', 'u', etc
<shevy> by the boogie man!
<andkerosine> I'm surprised at how difficult it's proved to be.
<ryanf> anyway I take it you found a case where [[:print:]] doesn't match ruby's output behavior?
cirwim has quit [Quit: Leaving.]
<andkerosine> Hm... that really seems like it ought to've worked. Maybe my test is buggy.
diegoviola has quit [Ping timeout: 244 seconds]
<andkerosine> ryanf: "\u26e4" passes when it shouldn't.
<ryanf> actually, it doesn't display escaped for me
<ryanf> but it does display with the "wtf" characte
<ryanf> r
<ryanf> the same one as trying to do "puts" on an actual nonprintable char
<andkerosine> Perhaps I've missed something, but that seems like it /should/ end up containing all printable characters.
<bnagy> it kind of displays for me
<andkerosine> "Kind of" will not do. : /
<andkerosine> ryanf: Might you be so kind as to check whether or not it does so on your machine?
<ryanf> andkerosine: it appears to me that
<ryanf> you will keep adding random bytes until you have accumulated at least one substring that matches /[[:print:]]/
<ryanf> but the earlier non-matching substring will still be there
<ryanf> am I missing something?
<bnagy> the basic approach should *barf* work
<ryanf> bnagy: how?
<andkerosine> ryanf: Not /adding/ random bytes, /checking/ them against [[:print:]] and only returning them to #map if they pass.
<bnagy> it's a map join
<andkerosine> It's a one-off.
<ryanf> right but within the outer loop
<bnagy> I don't understand your rand logic at all though
<ryanf> the inner loop will keep pushing chars onto c and checking the regex against all of c
<andkerosine> Ah.
<ryanf> whereas you want to just throw the invalid stuff away every time, right
<andkerosine> '' << foo is a workaround for foo.chr not working outside of a certain range.
<bnagy> c is only block scope, right? or it is in that paste
<andkerosine> It does just so. : )
<ryanf> oh never mind
<ryanf> I get it
<ryanf> it's really late :(
<andkerosine> No worries.
<andkerosine> It's excessively fancy.
<bnagy> if you're trying to get a printable utf-16 char why not just do rand 0x10000 ?
<bnagy> and then check your print thingy
<andkerosine> invalid codepoint 0xD97E in UTF-8
<andkerosine> UTF-16 is not ASCII compatible
<bnagy> oic yeah rescue that :>
<ryanf> oh andkerosine you didn't say you were getting errors like that
<ryanf> just check .valid_encoding? too
<andkerosine> No, I wasn't.
<ryanf> oh I get it
<andkerosine> Only just now with bnagy's suggestion. : )
<andkerosine> But, yeah, rescuing'll work.
<andkerosine> Or... not...
r0bby has joined #ruby-lang
<andkerosine> This is maddening.
gouthamvel has joined #ruby-lang
<andkerosine> c = ('' << rand(0x10000) rescue nil) until c
<andkerosine> bnagy: That returns even more non-printables?
tla has joined #ruby-lang
<ryanf> right, because non-printables can still be valid
<bnagy> andkerosine: I just did something like 1='' while s.size < 10; c='' << rand(0x10000) rescue retry; s << c if c=~/[[:print:]]/;end
<bnagy> not super pretty, but...
<andkerosine> 1=?
<bnagy> sry s=''
<bnagy> now it looks like my irb is yelling chinese at me, mostly
<andkerosine> Gives me all ASCII?
<bnagy> eh?
<andkerosine> Running that code puts a length-10 ASCII string into s.
<andkerosine> Same for 100 and 1000.
<bnagy> it's not all ascii for me :)
r0bby has quit [Ping timeout: 252 seconds]
tekin has joined #ruby-lang
<andkerosine> Ah, derp. I forgot to set the encoding, but it still comes back with a few non-printables every now and then.
<andkerosine> Also disproportionately Asiatic. : (
<bnagy> I get no failures in many 1000s
<andkerosine> Huh.
<bnagy> and dude, utf-16 is disproportianately asian :)
<bnagy> but I imagine it also depends what charsets you have configured
<bnagy> what you see on screen, anyway
ryanf has quit [Quit: leaving]
<andkerosine> Mm-hmm.
<andkerosine> ideone displays it just fine...
brushbox has joined #ruby-lang
<bnagy> whoa, one of the chars displayed with some colour on my terminal o_0
<bnagy> all colour stuff is set to always be green on black always
<bnagy> funky :)
<andkerosine> Unicode is wizardry.
mrchrisadams has left #ruby-lang [#ruby-lang]
<bnagy> if I run this in a loop it's like the poor man's Matrix
<bnagy> wheeeeeeeee
futurechimp has joined #ruby-lang
<andkerosine> s/poor/programmatically rich
diegoviola has joined #ruby-lang
gasbakid has quit [Read error: Connection reset by peer]
kyrylo has quit [Ping timeout: 246 seconds]
diegoviola has quit [Client Quit]
soahccc is now known as soahccc`
gnufied has quit [Quit: Leaving.]
cantonic has joined #ruby-lang
kitallis has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
jondot has quit [Read error: Connection reset by peer]
jondot has joined #ruby-lang
Radium_ has joined #ruby-lang
<andkerosine> Please don't judge me. : ) https://gist.github.com/2761424
jondot has quit [Read error: Connection reset by peer]
jondot has joined #ruby-lang
<rue> JUDGMENT
<andkerosine> SHAME
<shevy> PROFIT
woollyams has joined #ruby-lang
gnufied has joined #ruby-lang
workmad3 has joined #ruby-lang
Asher has quit [Remote host closed the connection]
<andkerosine> "When in doubt, play it safe and take the path of least resistance, which probably means just forgetting about it and closing your browser."
<shevy> or use MS Internet Explorer!
<andkerosine> It's from Esolang's guidelines. : )
<andkerosine> I use IE because it seems to be the only browser that supports P3P.
dc5ala has quit [Quit: Ex-Chat]
<andkerosine> Also, it's kind of exciting to see how atrocious my Internet experience will be.
Asher has joined #ruby-lang
Fullmoon has joined #ruby-lang
heftig has joined #ruby-lang
Criztian has joined #ruby-lang
<Harzilein> hmm
<Harzilein> shouldn assert_equal ignore or consider the order of keys/elements?
<Harzilein> when given a hash
<Harzilein> (or two hashes)
LarryLv has joined #ruby-lang
<andkerosine> {a: 1, b: 2} == {b: 2, a: 1} #=> true
<andkerosine> So... probably not?
chendo_ has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
<andkerosine> Harzilein: Framework?
<Harzilein> turns out that hashes are not actually compared :/
<Harzilein> the test i'm looking at compares a "rendered" json object with a string literal
<Harzilein> only that the order does not seem to be guaranteed
<Harzilein> andkerosine: Test::Unit
<andkerosine> That's what I tested with, and order is not considered.
<andkerosine> At least... not for those trivial hashes.
<andkerosine> You could eval the string?
<andkerosine> *ducks*
<Harzilein> i'm trying to run the tilt tests
<Harzilein> and tilt_yajltemplate_test.rb fails
<andkerosine> Unfamiliar, sorry. : /
<Harzilein> it renders <"{\"integer\":4,\"string\":\"hello\"}"> while it expects <"{\"string\":\"hello\",\"integer\":4}">
<Harzilein> which is certainly the same json object
<andkerosine> Not if they're compared as strings, of course.
<Harzilein> indeed
<andkerosine> Which has to be the case.
<Harzilein> well, i could just assert somecomparisonfunc(whatever,whatever)
<Harzilein> i have a feeling the failure will go away if i limit testing to 1.9.1 ;)
<shevy> or if you dont test at all!
srbartlett has joined #ruby-lang
soahccc` is now known as soahccc
Fullmoon has quit [Quit: Fullmoon]
tla has quit [Remote host closed the connection]
JohnBat26 has joined #ruby-lang
neoesque has quit [Quit: Bye!]
toretore has joined #ruby-lang
toretore has quit [Client Quit]
toretore has joined #ruby-lang
^sandbags^ has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
judofyr has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
sandbags has quit [Ping timeout: 276 seconds]
stamina has joined #ruby-lang
<workmad3> Harzilein: it is doing string comparison for certain... look at the <" and "> wrapping it all up ;)
<Harzilein> workmad3: i just disabled building it for 1.8 :/
<workmad3> :)
<Harzilein> i might ask the author to document the fact it needs 1.9.1 in the gemspec
francisfish has joined #ruby-lang
futurechimp has quit [Quit: This computer has gone to sleep]
tekin has quit [Quit: Computer has gone to sleep.]
matti has joined #ruby-lang
<workmad3> Harzilein: ah, it's probably relying on hash key ordering in 1.9
<workmad3> Harzilein: and I'd be more tempted to suggest to the author that he refactors such a fragile test ;)
ConstantineXVI has joined #ruby-lang
<Tasser> what do you guys use for fast benchmarking? the Benchmark class is a bit... clumsy imo
gouthamvel has joined #ruby-lang
<judofyr> Tasser: benchmark-ips
<Tasser> judofyr, you have op here by chance?
<judofyr> nope
francisfish has quit [Remote host closed the connection]
tla has joined #ruby-lang
singpolyma has quit [Read error: Connection reset by peer]
gouthamvel has left #ruby-lang [#ruby-lang]
futurechimp has joined #ruby-lang
ConstantineXVI has quit [Remote host closed the connection]
ramonmaruko has quit [Ping timeout: 265 seconds]
<rue> Muheehehee
<judofyr> Tasser: how so?
<Tasser> judofyr, ah, there are a bunch of bans that seem to be coming from the server - not sure how many of them are random
imperator has joined #ruby-lang
<shevy> not everyone manages to make it through that wall of ban!
futurechimp has quit [Ping timeout: 260 seconds]
gouthamvel has joined #ruby-lang
heftig has quit [Ping timeout: 245 seconds]
<imperator> hm?
<zzak> good mornbaning!
<imperator> who's been banned now?
futurechimp has joined #ruby-lang
tekin has joined #ruby-lang
d3vic3 has quit [Ping timeout: 256 seconds]
<andrewvos> heh
<andrewvos> I guess I made it through. Yay!
d3vic3 has joined #ruby-lang
yugui is now known as yugui_zzz
<imperator> only the strong survive
<imperator> the rest get eaten by zombies
gokul has quit [Quit: Leaving]
<bnagy> surely it's the most photogenic who survive zombie attacks
<andkerosine> Hm... few new heads. S'pose I'll give this another go.
<jaska> pathogenic
<andkerosine> Is there a reasonably clear-cut way to differentiate between strings that get printed as "\uxxx" and those that don't?
<andkerosine> +x
<imperator> andkerosine, are you asking.....an encoding question?
jd has joined #ruby-lang
<imperator> otherwise, i don't follow
<andkerosine> Not quite.
<andkerosine> I am trying to generate random strings with as varied a set of characters as possible.
<imperator> ok
<andkerosine> I would like to filter out characters which would display as boxes, though.
Jade has quit [Disconnected by services]
jd is now known as Jade
octavian2l has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
tbuehlmann has joined #ruby-lang
<andkerosine> imperator: Any thoughts?
tla has quit [Remote host closed the connection]
<andkerosine> Matching against [[:print:]] really seems like it ought to work, but many non-printable characters seem to get through just fine.
adambeynon has joined #ruby-lang
<imperator> maybe you want anything that's not [:cntrl:]
<imperator> seems like there are plenty of gems that might do what you want, too
nevynxxx has joined #ruby-lang
<andkerosine> [[:cntrl:]] doesn't seem to do it. : /
codesturgeon has joined #ruby-lang
<andkerosine> "㇎" =~ /[[:cntrl:]]/ # => nil
<imperator> is that a control character?
<shevy> hehe
<andkerosine> Well, no, but then [[:cntrl:]] was never the solution.
mark_locklear has joined #ruby-lang
<andkerosine> Given how tightly Ruby strings are tied to Unicode, it's probably not possible, frankly.
<andkerosine> The "\u" bit isn't /part/ of the string, it /is/ the string.
<imperator> so...reallly you just want a random string at the end of the day, right?
ryez has joined #ruby-lang
postmodern has quit [Quit: Leaving]
<andkerosine> Not so simplified.
<andkerosine> As varied a string as possible.
pbjorklund has joined #ruby-lang
<imperator> but it has to be printable...
<andkerosine> I'd like for its #inspect to be void of any "\u", if specificity helps any.
A124 has quit [Quit: Leaving.]
<imperator> i guess i don't understand the point
<imperator> is this for encryption?
<andkerosine> Esoteric language... : P
rolfb has joined #ruby-lang
<imperator> it's too early....ask shevy
<andkerosine> I completely understand if that has destroyed your interest in the solution. : )
<shevy> hehe
<shevy> somehow I am still not really awake... but I am awake since 5 hours... something is odd today
<andkerosine> coffee while 1
<judofyr> andkerosine: (1..10000).map { |x| '' << x }.select { |x| x.inspect.size == 3 }.sample
<judofyr> silly stupid solution…
<rolfb> " << ?
<judofyr> 10000.chr doesn't work
<judofyr> RangeError: 10000 out of char range
<andkerosine> "\u31ce".inspect.size # => 3
<oddmunds> is that any different than "#{x}"?
<andkerosine> Quite.
<judofyr> andkerosine: and? any character can be displayed as "\uXXXX"?
<judofyr> andkerosine: that char is fully printable here
<andkerosine> Pushing a number into a string will append the character at that codepoint.
<andkerosine> rolfb: ^
thone has quit [Ping timeout: 252 seconds]
<rolfb> oh, it was '' not "
<andkerosine> Ah, heh. Yeah...
<andkerosine> The one argument against single quotes.
<oddmunds> ah, i see. << uses bytevalue
Hakon|mbp has quit [Read error: Connection reset by peer]
ConstantineXVI has joined #ruby-lang
<shevy> the two andies are back in the house again!
<shevy> my two brothers, andkerosine and andrewvos
shevy is now known as andshevy
<andshevy> hi
carloslopes has joined #ruby-lang
<andkerosine> Brosef!
<andrewvos> Brohan Sebastian Bach
<andrewvos> Fun Fact about Lithium: It's the only element in the universe of which no more can be made ever (Also, awkward grammar, but I can't think of a better way of saying it, suggestions?)! All the Lithium in the universe was created in the big bang and since then, stars have been eating it up. So Lithium levels in the universe are the lowest they've ever been, and the highest they will ever be from now on. (Sorry, I'm a physicis
<andrewvos> Found that on interwebs ^
codesturgeon has quit [Quit: Leaving...]
francisfish has joined #ruby-lang
<imperator> quick, eat some lithium now while supplies last!
<Asher> why can't more lithium be created?
<Silex> why would that apply to lithium only?
francisfish has quit [Remote host closed the connection]
<Asher> we can turn lead into gold… it's just a matter of reorganizing the energy relaxation states
ConstantineXVI has quit [Ping timeout: 245 seconds]
<andrewvos> Asher: Something somthing fusion something
thone has joined #ruby-lang
zz_chrismcg is now known as chrismcg
gouthamvel has left #ruby-lang [#ruby-lang]
Hakon|mbp has joined #ruby-lang
mssola has quit [Quit: Konversation terminated!]
srbartlett has quit [Remote host closed the connection]
<bnagy> the source of all knowledge disagrees
<bnagy> (wikipedia)
mark_locklear has quit [Remote host closed the connection]
<andrewvos> Damnit
<andrewvos> Beaten by wikipedia again
gnufied1 has joined #ruby-lang
<imperator> hm, this the same wikipedia that told me that the arch enemy of Phillip II was Ronald McDonald?
chrismcg is now known as zz_chrismcg
<andrewvos> "A C program is like a fast dance on a newly waxed dance floor by people carrying razors."
gnufied has quit [Ping timeout: 244 seconds]
<imperator> andrewvos, should put that one on hackersays.com :)
tommyvyo has joined #ruby-lang
<andrewvos> imperator: hmmm
heftig has joined #ruby-lang
dejongge has joined #ruby-lang
<imperator> god DAMMIT people, stop setting the specification_version in your rubygems
<imperator> fucking jewler
dv310p3r has joined #ruby-lang
adambeynon has quit [Quit: adambeynon]
sockmonk has joined #ruby-lang
M4g1c5t0rM has joined #ruby-lang
apeiros_ has joined #ruby-lang
bglusman has joined #ruby-lang
<andshevy> :)
Codif has joined #ruby-lang
andshevy is now known as shevy
gsav has joined #ruby-lang
KU0N has joined #ruby-lang
Codif has quit [Remote host closed the connection]
tubbo is now known as tubbo`cloud
cjs226 has joined #ruby-lang
tubbo has joined #ruby-lang
TheHunter_1039 has joined #ruby-lang
anildigital_work has joined #ruby-lang
d3vic3 has quit [Ping timeout: 246 seconds]
d3vic3 has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 244 seconds]
andkerosine has quit [Quit: Leaving.]
tubbo has quit [Quit: Lost terminal]
valeri_ufo has quit [Ping timeout: 244 seconds]
hynkle has joined #ruby-lang
valeri_ufo has joined #ruby-lang
rippa has quit [Quit: derp herp]
TheHunter_1039 has quit [Quit: TheHunter_1039]
hynkle has quit [Read error: Connection reset by peer]
hynkle has joined #ruby-lang
adambeynon has joined #ruby-lang
fayimora has joined #ruby-lang
magicbeef has joined #ruby-lang
magicbeef has quit [Client Quit]
gouthamvel has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
dv310p3r has quit [Ping timeout: 246 seconds]
tubbo has joined #ruby-lang
slyphon_away has joined #ruby-lang
slyphon_away is now known as slyphon
crankharder has joined #ruby-lang
beiter has joined #ruby-lang
adambeynon has quit [Quit: adambeynon]
rmascarenhas has joined #ruby-lang
perryh is now known as perryh_away
lsegal has joined #ruby-lang
singpolyma has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
gix has quit [Ping timeout: 246 seconds]
adambeynon has joined #ruby-lang
vmoravec has quit [Quit: Leaving]
alexkane_ has joined #ruby-lang
vmoravec has joined #ruby-lang
rmascarenhas has quit [Quit: leaving]
dv310p3r has joined #ruby-lang
crudson has joined #ruby-lang
gix has joined #ruby-lang
rolfb has quit [Quit: Linkinus - http://linkinus.com]
Axsuul has quit [Ping timeout: 260 seconds]
krohrbaugh has joined #ruby-lang
futurechimp has quit [Ping timeout: 248 seconds]
Axsuul has joined #ruby-lang
vesan has quit [Ping timeout: 272 seconds]
jbwiv has joined #ruby-lang
futurechimp has joined #ruby-lang
vesan has joined #ruby-lang
<Harzilein> hmm
<Harzilein> do you know of any sinatra app that is distributed as a gem?
outoftime has joined #ruby-lang
<andrewvos> Harzilein: wally is
<zzak> and resque has a sinatra app
thone_ has joined #ruby-lang
<tubbo> i've seen people manage their Amazon EC2 from the command line...what was the gem they use to do that called again?
thone has quit [Ping timeout: 248 seconds]
scampbell has joined #ruby-lang
<carloslopes> tubbo: i use the official amazon command line API
locks_ has joined #ruby-lang
locks_ has quit [Client Quit]
<erikh> tubbo: you can also use tools like chef and knife to manage your ec2 nodes
<erikh> but if you don't want machine configuration management then you probably don't want to do it that way.
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
futurechimp has quit [Ping timeout: 246 seconds]
kain has joined #ruby-lang
Radium_ has quit [Ping timeout: 265 seconds]
futurechimp has joined #ruby-lang
<tubbo> erikh: i am using chef/knife right now
<tubbo> but i remember seeing one that's just for Ec2
<erikh> knife ec2 server create
<erikh> there's also the ec2 toolkit, but it's very slow
judofyr has quit [Remote host closed the connection]
mistym has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
Axsuul has quit [Ping timeout: 265 seconds]
JohnBat26 has quit [Ping timeout: 244 seconds]
mikkelb has joined #ruby-lang
<mikkelb> Hey!
<mikkelb> For scripts that require "open-uri", should I gem install open-uri?
<mikkelb> How come that doesn't work? ERROR: Could not find a valid gem 'open-uri' (>= 0) in any repository
tjadc has joined #ruby-lang
<oddmunds> mikkelb no, it's built in
<mikkelb> Oh ok
<oddmunds> maybe depending on your version
<mikkelb> ruby 1.9.3p194 (2012-04-20 revision 35410) [i386-cygwin]
<oddmunds> your good to go, then :)
andrewhl has joined #ruby-lang
<mikkelb> The thing is I'm getting this undefined method `to_url' for nil:NilClass (NoMethodError)
<oddmunds> (unless cygwin has any nasty surprises)
<mikkelb> Cygwin usually does, but it's a love-hate thing I guess. I can't do a day without it.
<workmad3> mikkelb: you're trying to call to_url on something that doesn't exist
<oddmunds> yeah, you're trying to call to_url on a nil
|Vargas| has quit [Quit: ...]
bfreeman has quit [Quit: bfreeman]
<mikkelb> I see I see
fayimora has quit [Remote host closed the connection]
fayimora has joined #ruby-lang
nofxxx has joined #ruby-lang
nofxx has quit [Ping timeout: 252 seconds]
vmoravec has quit [Quit: Leaving]
rmascarenhas has joined #ruby-lang
tommyvyo has quit [Ping timeout: 276 seconds]
rippa has joined #ruby-lang
singpolyma has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
slyphon is now known as slyphon_away
macmartine has joined #ruby-lang
macmartine has quit [Client Quit]
macmartine has joined #ruby-lang
gregf has quit [Quit: WeeChat 0.3.7]
robbyoconnor has joined #ruby-lang
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby-lang
robbyoconnor has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
kitallis has quit [Ping timeout: 244 seconds]
kitallis has joined #ruby-lang
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby-lang
tomzx has joined #ruby-lang
asahi has joined #ruby-lang
francisfish has joined #ruby-lang
deryl has joined #ruby-lang
<asahi> wondering if there's a shorthand for a.nil? a = x : a += x
<asahi> so that the 'a' doesn't have to get repeated 3 times
benanne has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
sora_h is now known as s0ra_h
<Tasser> asahi, there's a = a ? x : a + x
<Tasser> apeiros_, could you clean up the ban list a bit?
<asahi> Tasser: do you know where I can find some documentation on that one?
<Tasser> asahi, that's ruby syntax
<any-key> ternary operator
<any-key> (makes it easier to google)
<asahi> thanks
tjadc has quit [Ping timeout: 240 seconds]
codesturgeon has joined #ruby-lang
<apeiros_> Tasser: since I don't know who banned whom and why… that's pretty hard…
soahccc is now known as soahccc`
savage- has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
<andrewvos> apeiros_: Not sure anyone has
<andrewvos> apeiros_: Looking through the logs
<andrewvos> Except some racist, and dross.
robbyoconnor has quit [Ping timeout: 276 seconds]
imperator has quit [Remote host closed the connection]
tr-808 has quit [Remote host closed the connection]
sockmonk has quit [Ping timeout: 248 seconds]
tr-808 has joined #ruby-lang
M4g1c5t0rM has quit [Quit: Leaving.]
d3vic3 has quit [Ping timeout: 250 seconds]
matled has quit [Read error: Connection reset by peer]
matled has joined #ruby-lang
soahccc` is now known as soahccc
Hakon|mbp has quit [Quit: Leaving...]
<rue> Who’s banned? And are we sure it’s not just a nonregistered user?
apeiros_ has quit [Remote host closed the connection]
d3vic3 has joined #ruby-lang
DRCALKIN has joined #ruby-lang
bfreeman has joined #ruby-lang
gregf has joined #ruby-lang
hahuang65_ has quit [Quit: Computer has gone to sleep.]
fayimora has quit [Read error: Connection reset by peer]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
fayimora has joined #ruby-lang
futurechimp has quit [Ping timeout: 244 seconds]
<andrewvos> rue: That's the sound of banned people responding to you.
<deryl> hah
<rue> Or nonregistered users
futurechimp has joined #ruby-lang
nevynxxx has quit [Quit: Lost terminal]
Guest95478 has joined #ruby-lang
Guest95478 has left #ruby-lang [#ruby-lang]
LoveCat has joined #ruby-lang
LoveCat has left #ruby-lang [#ruby-lang]
<banisterfiend> im banned!
<andrewvos> banisterfiend: Ban is you middle name.
LoveCat has joined #ruby-lang
<andrewvos> banisterfiend: And also the prefix to your name.
<andrewvos> your*
<banisterfiend> hehe
<banisterfiend> yeah it guess it's fitting, really
<banisterfiend> i*
<andrewvos> put's the ban in banisterfiend
<LoveCat> Hello.
<andrewvos> Oh hi
<LoveCat> I have some questions.
<banisterfiend> that's what she said
<andrewvos> heh
<rue> Shoot, we move like cagey tigers
<andrewvos> hahah
<LoveCat> Ruby can make beautiful software ?
<LoveCat> Like a Flex or Visual Studio can do.
<rue> [It’s] so wonderfully, wonderfully, wonderfully, wonderfully pretty
<shevy> LoveCat you mean GUIs? then probably not. you can use guis with ruby but they will look differently
<LoveCat> yes.
<LoveCat> nice interface,
peppyheppy has joined #ruby-lang
<rue> It’s the grooviest thing, it’s the perfect dream
<LoveCat> i don know why i will be use ruby.
deryl has quit [Read error: Connection reset by peer]
<andrewvos> rue: OH MY GOD I JUST GET YOUR CAGEY TIGER REFERENCE NOW. You win the internet.
<shevy> LoveCat if you wanna build awesome GUIs then you will need another language
<LoveCat> i think if i want nice interface i will use with Rail,
deryl has joined #ruby-lang
<rue> andrewvos: :D
<LoveCat> Plain Ruby + Some Library is like command line program.
<LoveCat> that is i think.
<LoveCat> Some advices for me?
<LoveCat> I think ruby can make great thing more than i know about it.
<rue> LoveCat: You’re making a web app?
cirwim has joined #ruby-lang
<LoveCat> without Rails(Web App) I don't know what is ruby can do,
<LoveCat> For freelance,
<LoveCat> Or it can make Game ?
<LoveCat> same C++ ?
<zzak> banisterfiend
tRAS has joined #ruby-lang
<shevy> LoveCat what do you mean
<rue> Ah, non-rails use of Ruby? It’s not as fast as compiled languages, but you can make a game with it. You can also use GTK, or Tk, or Qt for GUIs
<shevy> LoveCat you can use C++ sure but I think you are on the wrong channel for that ;)
<banisterfiend> zzak: i thought u disappeared back into RL after u got a gf
<rue> banisterfiend: He did, we reassigned the nick
<shevy> LoveCat, if you are happy with 70% perfect GUIs, then you can use ruby + ruby-gtk
<banisterfiend> i hope this new zzak wont give in so easily to the allure of women
<LoveCat> i am not good in grammar.
<rue> banisterfiend: Nah, the new one is a woman
<LoveCat> if i made you confuse , I'm sorry
<rue> Although I suppose it might still apply
<LoveCat> i just want to know.
<LoveCat> some project with rail that can show another.
<banisterfiend> rue: careful making genderist assumptions or you'll be the subject of a new steveklabnik blog post
<andrewvos> Nobody wants to be the subject of a steveklabnik blog post :/
<rue> I suppose she might be asexual too
<LoveCat> Such as, i can made text editor with Ruby ? or Calculator
<LoveCat> Or chatting software?
<rking> LoveCat: You definitely can do that.
<workmad3> LoveCat: sure
<rking> LoveCat: And if speed is ever a concern, there's always RubyInline and friends. (enemies?)
<workmad3> LoveCat: it's not the sort of thing you find handy 'how-to' guides for on the internet though :P
<workmad3> rue: don't forget about shoes for GUIs too ;)
<LoveCat> thank you for rking
kyrylo has quit [Ping timeout: 246 seconds]
<rue> So women can be straight/gay/asexual and guys can be straight/gay/asexual…or shoes?
<LoveCat> i know how to describe my question
* zzak is still with her, 1.17 years later
<LoveCat> I dont want to show Inline to non-programmer.
<andrewvos> rue: ANYONE CAN BE SHOES
<LoveCat> If i show inline program , my friends will not know what it intresting because it just a text.
<LoveCat> SHOES = can use all of function in ruby right ?
<banisterfiend> LoveCat: i only program to impress my friends, too
<LoveCat> all library.
<workmad3> LoveCat: if you want interesting, easy to understand GUI programs, shoes is probably your best bet
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
<LoveCat> Thank you for help me everyone , and sorry for bad language skill.
<workmad3> LoveCat: and shoes is a GUI DSL for ruby... it comes in various colours now, green_shoes is probably a good start (unless you're doing windows programming) as it's a GTK-backed, gemified version (so you just need to require the library in a script)
<deryl> english isn't native language mistakes happen :)
<workmad3> https://github.com/ashbb/green_shoes for info and potentially some examples
<heftig> ai want blue suede shoes
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
cirwim has left #ruby-lang [#ruby-lang]
soahccc is now known as soahccc`
LoveCat has quit []
<rue> heftig: Blue shoes is OK, but you can’t step through it in the debugger
slyphon_away is now known as slyphon
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
hahuang65_ has joined #ruby-lang
nofxxx has quit [Ping timeout: 244 seconds]
joast has quit [Quit: Leaving.]
hahuang65_ has quit [Client Quit]
workmad3 has quit [Ping timeout: 245 seconds]
ridders24 has joined #ruby-lang
dalekurt has joined #ruby-lang
Cykey has joined #ruby-lang
cyndis has quit [Ping timeout: 250 seconds]
peppyheppy_ has joined #ruby-lang
andrewhl has quit [Quit: andrewhl]
peppyheppy has quit [Ping timeout: 245 seconds]
peppyheppy_ is now known as peppyheppy
nisstyre has quit [Ping timeout: 246 seconds]
deryl has quit [Quit: shutting down and wiping off ubuntu. crashes L & R, rendering issues etc. Back to OpenSuSe I go]
nofxxx has joined #ruby-lang
adambeynon has quit [Quit: adambeynon]
cyndis has joined #ruby-lang
Slackwise has joined #ruby-lang
sockmonk has joined #ruby-lang
Jake232 has joined #ruby-lang
mrsolo has joined #ruby-lang
RubyHead has joined #ruby-lang
RubyHead has quit [Remote host closed the connection]
futurechimp has quit [Quit: Leaving]
Hakon|mbp has joined #ruby-lang
<andrewvos> rue is really quite funny a lot of the time, but sometimes he tells a joke so bad that ruby-lang is quiet for 30 minutes.
<rue> So good
joast has joined #ruby-lang
<andrewvos> I think they're all just really quiet trying to work out the intricacies of your joke
<rue> The appreciation thereof seeps into your brain slowly, displacing all other extra cycles
harukomoto has joined #ruby-lang
krz has joined #ruby-lang
achiu has joined #ruby-lang
akira989 has joined #ruby-lang
akira989 has quit [Remote host closed the connection]
slaytanic has quit [Ping timeout: 248 seconds]
savage- has quit [Ping timeout: 244 seconds]
savage- has joined #ruby-lang
qpingu has joined #ruby-lang
solars has joined #ruby-lang
stamina has quit [Quit: Lost terminal]
<erikh> I just deadlock
virunga has joined #ruby-lang
gnunix has joined #ruby-lang
workmad3 has joined #ruby-lang
gnunix has quit [Client Quit]
<rue> Man, I sometimes wonder about Bernhardt.
workmad3 has quit [Read error: Operation timed out]
<erikh> I stopped following.
<shevy> The Berndhardtiners are nice dogs.
<matti> Cats!
<matti> :>
joast has quit [Quit: Leaving.]
ttilley has joined #ruby-lang
gouthamvel has joined #ruby-lang
Cykey has quit [Quit: Computer has gone to sleep.]
joast has joined #ruby-lang
Jake232 has quit [Ping timeout: 245 seconds]
francisfish has joined #ruby-lang
carloslopes has quit [Read error: Operation timed out]
<banisterfiend> check this out guys http://news.ycombinator.com/item?id=4003805
<banisterfiend> esp you mr rue
<rue> erikh: “UNIX filesystems are object graphs but don’t have GC” *facepalm*
joast has quit [Quit: Leaving.]
peppyheppy has quit [Quit: peppyheppy]
<banisterfiend> rue: he's one of those dudes who sits around all day thinking up pithy words of wisdom to post on twitter, doesnt' really matter if they're incoherent, so long as they're delivered solemnly and appear to be of great mystic importance
workmad3 has joined #ruby-lang
peppyheppy has joined #ruby-lang
<shevy> "The whole purpose of using & with a symbol is to generate more readable code, compare:"
<shevy> ["1", "2", "3"].map{ |string| string.to_i }
<shevy> ["1", "2", "3"].map(&:to_i)
<shevy> why does he pick such a long name?
<banisterfiend> rue: also seems like that guy has no real skill other than being pathologically sociable on twitter, and when he does write code it looks like this: https://github.com/garybernhardt/cls
<shevy> in the second example he doesn't need an explicit block variable. so why does he not use a one letter char ...
joast has joined #ruby-lang
<shevy> owners.map(&X['name'])
<shevy> I think some syntax turns people crazy
<yxhuvud> I don't get the parens around the &: variable. you don't use them for the block, why for them? why not differentiate them as much as possible from normal arguments?
savage- has quit [Read error: Connection reset by peer]
savage- has joined #ruby-lang
<banisterfiend> yxhuvud: cos it woud look weird: def hello (x, y)&block
<shevy> yeah
<banisterfiend> yxhuvud: hello(1, 2)&block
<shevy> ewww
<shevy> but ["1", "2", "3"].map &:to_i
<any-key> parens, dammit
<shevy> hmm not a real improvement...
ottoinfo has joined #ruby-lang
savage- has quit [Read error: Connection reset by peer]
savage- has joined #ruby-lang
savage- has quit [Read error: Connection reset by peer]
savage- has joined #ruby-lang
sockmonk has quit [Ping timeout: 252 seconds]
corecode has joined #ruby-lang
<corecode> hi
<any-key> HELLO
<corecode> is there a way to avoid the global interpreter lock with multithreaded programming?
<any-key> JRuby, perhaps
<shevy> yeah I think JRuby does not have a GIL
<yxhuvud> banisterfiend: you may have got a point when there are arguments, but I would disagree without them.
<yxhuvud> or rather, I'd let the normal rules for parens decide, disregarding &:
<corecode> meh.
<any-key> I like &:
<erikh> rue: he should design automatic memory management that doesn't use a gc
<rue> It’s not &:
<erikh> you know, just garbage collect with the VMM
<erikh> that'll work, right?
<rue> Sure, probably #lolruby
<erikh> hahah
snk has quit [Quit: I accidentally the whole program.]
<erikh> strangely that quit message is apropos
<erikh> "I accidentally the whole program"
<workmad3> jruby indeed does not have a GIL
<erikh> a GIL and garbage collection are two very different things.
<erikh> oh, sorry
<erikh> I need to read the scrollback.
ottoinfo has quit [Quit: ottoinfo]
soahccc` is now known as soahccc
snk has joined #ruby-lang
<erikh> anyhow, rue, it sounds like he's just right of newbie with a little too much encouragement early on in his career
burgestrand has joined #ruby-lang
bryancp has joined #ruby-lang
apeiros_ has joined #ruby-lang
mistym has quit [Remote host closed the connection]
tubbo has quit [Quit: leaving]
tubbo has joined #ruby-lang
tubbo is now known as Guest56150
andrewhl has joined #ruby-lang
Guest56150 has quit [Client Quit]
tubbo has joined #ruby-lang
mikkelb has quit [Quit: Lost terminal]
gouthamvel has left #ruby-lang [#ruby-lang]
t has joined #ruby-lang
t is now known as Guest34664
tRAS has quit [Quit: Mother, did it need to be so high?]
mistym has joined #ruby-lang
kyrylo has quit [Ping timeout: 246 seconds]
xcyclist has joined #ruby-lang
mistym has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 260 seconds]
fayimora has quit [Ping timeout: 260 seconds]
<rue> More or less
singpolyma has joined #ruby-lang
retro|cz has quit [Remote host closed the connection]
tonesfrommars has joined #ruby-lang
asahi has left #ruby-lang [#ruby-lang]
fayimora has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
Mikoangelo has quit [Ping timeout: 260 seconds]
tomb_ has joined #ruby-lang
Mikoangelo has joined #ruby-lang
havenn has joined #ruby-lang
ttilley has quit [Remote host closed the connection]
<crankharder> so, a rails form helper is somehow dropping output (markup) to STDOUT or Rails.logger, not sure which. It shows up in server logs and test output, only when the attribute has an error. How do I debug this? I'd like to get the full stack of this method to see where it goes, but that is proving difficult. I tried something like this: class << f ; def label(*args) ; super ; raise ; end ; end but that doesn't give me anything usefu
<any-key> #rubyonrails
<crankharder> not a rails question, thanks for reading
Jake232 has joined #ruby-lang
<any-key> sorry, jumped to conclusions
<crankharder> understandable
countdig1 has quit [Quit: Lost terminal]
countdigi has quit [Quit: Lost terminal]
mssola has joined #ruby-lang
<erikh> #ubuntu: worse than #ror
<shevy> haha
<shevy> yeah
<shevy> you can do something useful with rails at least
dax has quit [Quit: *poof*]
<any-key> how can I go from a string to a class?
<any-key> aka I have "Foo" and I'd like to get the Foo class
<crankharder> constantize
<any-key> crankharder: thanks!
<apeiros_> that's rails
<apeiros_> Module#const_get in ruby
<any-key> I'm using this in rails :D
<any-key> wootwoot
krz has quit [Quit: krz]
tomb_ has quit [Quit: Computer has gone to sleep.]
carloslopes has joined #ruby-lang
krz has joined #ruby-lang
rubots has joined #ruby-lang
<yxhuvud> crankharder: I've seen that happen if there is faulty markup. do you cdata your script tags properly?
dax has joined #ruby-lang
<yxhuvud> or perhaps the markup isn't strictly faulty, but not to the liking of the parser.
<crankharder> yea, but why would that get logged?
konr` has quit [Remote host closed the connection]
<crankharder> I'm not stranger to generating bad markup - and it's never done this before
<crankharder> no
<yxhuvud> well some xml parser will dump that to stderr.
<crankharder> that is the test/server doesn't interpret markup, it has no notion of faulty markup
<apeiros_> crankharder: does it show up in the server logs or in rails' logs?
<apeiros_> if server-logs, then it'd print to stderr afaik
<crankharder> haven't looked in prod, shows up in dev server logs and test output
<apeiros_> so by server logs you do mean rails logs
<crankharder> yea, hang on, let me verify directly
<yxhuvud> if you want a fuller stack than what the scrubbed one rails give you, you could always call 'caller', but it is not certain that will give anything useful.
Criztian has joined #ruby-lang
<crankharder> think that's what i wanted
Guest34664 has quit [Remote host closed the connection]
Criztian has quit [Ping timeout: 246 seconds]
Guedes is now known as Guedes_out
yxhuvud has quit [Ping timeout: 245 seconds]
deryl has joined #ruby-lang
Criztian has joined #ruby-lang
ttilley has joined #ruby-lang
Jake232 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
imperator has joined #ruby-lang
rippa has quit [Ping timeout: 244 seconds]
ttilley has quit [Remote host closed the connection]
tomb_ has joined #ruby-lang
phunk has joined #ruby-lang
s0ber_ has joined #ruby-lang
s0ber has quit [Read error: Operation timed out]
s0ber_ is now known as s0ber
^sandbags^ has quit [Remote host closed the connection]
KU0N has quit [Quit: Linkinus - http://linkinus.com]
andrewhl has quit [Quit: andrewhl]
nisstyre has joined #ruby-lang
gnufied1 has quit [Quit: Leaving.]
slaytanic has joined #ruby-lang
havenn has quit [Remote host closed the connection]
phunk has left #ruby-lang ["Leaving"]
Cykey has joined #ruby-lang
Axsuul has joined #ruby-lang
krz has quit [Quit: krz]
scampbell has quit [Quit: Ex-Chat]
mssola has quit [Quit: Konversation terminated!]
zmack has quit [Remote host closed the connection]
mistym has joined #ruby-lang
<Harzilein> hmm
tomb_ has quit [Quit: Computer has gone to sleep.]
<Harzilein> i tried FFI::MemoryPointer.new(3232236010,1)
<Harzilein> but i get
macmartine has quit [Quit: macmartine]
<Harzilein> bignum too big to convert into `long' (RangeError)
<Harzilein> but i only see a conversion to long for the _second_ parameter
<jaimef> wow this is ugly. if ! (node['roles'] & %w(db web mongo)).empty?
petercooper has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
<Mon_Ouie> Because of if not instead of unless?
lsegal has joined #ruby-lang
<jaimef> is there a cleaner way to produce the same effect?
rmascarenhas has quit [Quit: leaving]
<Mon_Ouie> I don't find it unclean
<jaimef> awesome
andrewhl has joined #ruby-lang
<jaimef> je m'en branle :P
imperator2 has joined #ruby-lang
LarryLv has quit [Remote host closed the connection]
<kyrylo> jaimef, if you were a programming language designer, what way would you choose in order to solve this problem?
ttilley has joined #ruby-lang
<jaimef> select with a block?
<Mon_Ouie> If you're going for that, your better of using any?
<jaimef> it seemed there was a more ruby-esque way of solving it without the bit wise operators
<Mon_Ouie> But that's O(n*m) instead of just O(n)
<jaimef> given I have had people ask me 'wtf is that?'
<Mon_Ouie> Just better memory-wise
<jaimef> yeah and inline asm would be fast
cjs226 has quit []
<Mon_Ouie> Write a one-line method that does just that
<Mon_Ouie> And then your intent is made clear by the name of your method
<apeiros_> proper classes for the win, again
<jaimef> excellent, glad I got it right the first time
<apeiros_> some_list_of_roles.matches_any_of?(other_list)
<apeiros_> or whatever floats your boat. but proper classes help a lot with code readability.
<Mon_Ouie> Complexity isn't micro-optimization, it makes a huge difference when you get many items — a good algorithm in Ruby can be faster than a poor one in ASM with a large data-set
dalekurt has quit [Quit: Zzz...]
<jaimef> clearl
<jaimef> y
hynkle has quit [Quit: hynkle]
fayimora has quit [Ping timeout: 246 seconds]
<Harzilein> anyone?
<imperator2> Harzilein, why are you passing a raw number? shouldn't you be using a pre-defined type?
<imperator2> :char, or :void, or something?
<imperator2> what kind of pointer are you trying to create?
havenn has joined #ruby-lang
<burgestrand> Harzilein: the first parameter is the size of the memory you want to allocate
<Harzilein> imperator2: i want to use an ip address i got from IPAddr.new("192.168.1.234").to_i with a c function that takes an in_addr_t (FFI::LibC::InAddr wraps that type)
<burgestrand> That’s a lot of memory
krz has joined #ruby-lang
<Harzilein> burgestrand: _oooh_, i thought the size gets determined in the c part
<burgestrand> Harzilein: is FFI::LibC::InAddr a struct?
<Harzilein> yes (well, a typedef, but the ruby type is FFI::Struct)
<burgestrand> You can allocate a pointer that can contain such a struct by FFI::MemoryPointer.new(FFI::LibC::InAddr) then
<burgestrand> Or possibly just FFI::LibC::InAddr.new :)
<Harzilein> burgestrand: yeah, i'll try the latter now, i thought i could initialize it right away
<Harzilein> burgestrand: i.e. FFI::LibC::InAddr.new(inaddr.to_i) did not work :(
<Harzilein> uh
<Harzilein> i mean ipaddr.to_i
<burgestrand> Ah, yeah, any_struct.new apparently does allocate memory for such a struct, I’m not sure what happens when you pass something to the constructor though. How did it not work, Harzilein?
ridders24 has left #ruby-lang [#ruby-lang]
<burgestrand> I don’t have the InAddr struct on my system so I can’t really experiment with it
<burgestrand> (no idea why I don’t, odd)
<Harzilein> Invalid Memory object (ArgumentError)
<Harzilein> burgestrand: it's in ffi-libc
<burgestrand> Ah, yes, you the parameter you pass to structs is a pointer to where the struct is
fayimora has joined #ruby-lang
<Harzilein> burgestrand: an FFI pointer, yes?
<Harzilein> burgestrand: so i cannot use ruby literals or something?
<burgestrand> So, if you already had a pointer to a location that contained such a struct, you would pass that pointer to InAddr.new(pointer_to_struct)
<burgestrand> Probably not to new, no. Can’t you set the members directly after creating the struct instead?
<Harzilein> well, the struct is just a fancy name for a 32 bit int, so i would like to pass that in ;)
<Harzilein> i will
<burgestrand> I know I did something similar. Basically overwrote MyCustomStruct.new to take a hash of member -> values instead of a pointer to the struct.
ryland has joined #ruby-lang
s0ra_h is now known as sora_h
<burgestrand> (since I had to initialize the struct and I wanted to make it less painful)
<Harzilein> i'm just taking my first few steps at wrapping a rather massive lib (it's not all that big, but it is not your 'each object has constructor, accessor, free' fare either
<lianj> FFI.typedef :uint32, :in_addr_t; class InAddr < ::FFI::Struct; layout :in_addr, :in_addr_t; end; a = InAddr.new; a[:in_addr] = 10; a[:in_addr]
<lianj> a.to_ptr.read_uint32
srbartlett has joined #ruby-lang
sora_h is now known as s0ra_h
<Harzilein> thanks
<Harzilein> lianj: now you made me curious, if i had a real structure, how would i get pointers to the members?
RickHull has joined #ruby-lang
imperator has quit [Quit: This computer has gone to sleep]
tubbo is now known as tubbo`gone
RickHull has left #ruby-lang [#ruby-lang]
woollyams has joined #ruby-lang
woollyams has quit [Client Quit]
benanne has quit [Quit: kbai]
<lianj> Harzilein: class A < FFI::Struct; layout :a, :uchar, :b, :uchar; end; a = A.new; a[:b] = 61; (a.pointer + a.offset_of(:b)).read_uchar
Jake232 has joined #ruby-lang
carloslopes has quit [Quit: Leaving]
gasbakid has joined #ruby-lang
<andrewvos> banisterfiend, rue: just scrolled through the Bernhardt stuff above. haha
<krz> is there a way to get beginning of time?
<andrewvos> rue: You take this one ^
beiter has quit [Quit: beiter]
Criztian has quit [Read error: Connection reset by peer]
Criztian has joined #ruby-lang
rubots has quit [Quit: rubots]
jd has joined #ruby-lang
dabradley has quit [Ping timeout: 240 seconds]
liklok has joined #ruby-lang
Jade has quit [Ping timeout: 265 seconds]
seanstickle has joined #ruby-lang
krohrbaugh1 has joined #ruby-lang
krohrbaugh has quit [Read error: Connection reset by peer]
solars has quit [Ping timeout: 276 seconds]
dejongge has quit [Quit: Leaving.]
asaaki has joined #ruby-lang
krohrbaugh1 has quit [Read error: Connection reset by peer]
singpolyma has quit [Quit: Lost terminal]
deryl has quit [Ping timeout: 252 seconds]
toretore has quit [Quit: Leaving]
apeiros_ has quit [Remote host closed the connection]
ttilley has quit [Remote host closed the connection]
ryanf has joined #ruby-lang
bglusman has quit [Remote host closed the connection]
achiu has quit [Quit: WeeChat 0.3.7]
asaaki is now known as asaaki|away
bglusman has joined #ruby-lang
bglusman has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby-lang
postmodern has joined #ruby-lang
mattonrails has joined #ruby-lang
singpolyma has joined #ruby-lang
<rue> krz: Yes, at the end of the universe
<rue> That’s the next time, though, not this one.
dv310p3r has quit [Ping timeout: 246 seconds]
brushbox has joined #ruby-lang
Defusal has joined #ruby-lang
tbuehlmann has quit []
Karmaon has quit [Read error: Connection reset by peer]
srbartlett has quit [Remote host closed the connection]
Jake232 has quit [Quit: Computer has gone to sleep.]
publicvoid_ has joined #ruby-lang
asaaki23569 has joined #ruby-lang
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby-lang
publicvoid__ has quit [Ping timeout: 260 seconds]
asaaki|away has quit [Ping timeout: 260 seconds]
<Harzilein> lianj: ah, thanks. i had hoped there is a nicer syntax ;)
workmad3 has quit [Ping timeout: 260 seconds]
matti has quit [Quit: 8-X]
tomb_ has joined #ruby-lang
andrewhl has quit [Quit: andrewhl]
<lianj> Harzilein: class FFI::Struct; def member_pointer(key); pointer + offset_of(key); end; end a.member_pointer(:b).read_uchar
cored has joined #ruby-lang
asaaki23569 has quit [Quit: Verlassend]
asaaki23569 has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
codesturgeon has quit [Quit: Leaving...]
codesturgeon has joined #ruby-lang
codesturgeon has quit [Client Quit]
asaaki has joined #ruby-lang
asaaki23569 has quit [Client Quit]
brianpWins has quit [Quit: brianpWins]
asaaki has quit [Client Quit]
asaaki has joined #ruby-lang
krohrbaugh has joined #ruby-lang
hahuang65_ has joined #ruby-lang
tenderlove has joined #ruby-lang
tekin has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
thone_ is now known as thone
Defusal has quit [Quit: Quit message goes here]
srbartlett has joined #ruby-lang
<slyphon> holy crap
* slyphon finally has a use for WeakRef
<slyphon> it took 6 fuckin years
cantonic has quit [Quit: cantonic]
liklok has quit [Ping timeout: 246 seconds]
Cykey has quit [Quit: Computer has gone to sleep.]
rushed has quit [Quit: rushed]
fayimora_ has joined #ruby-lang
Cykey has joined #ruby-lang
<imperator2> slyphon, that's pretty...weak
* slyphon mwuhahahahas
<slyphon> someone's been smokin hash w/ GvR again
<slyphon> i think that's Delegator
brianpWins has joined #ruby-lang
<slyphon> now looking at it more carefully
fayimora has quit [Ping timeout: 264 seconds]
fayimora_ is now known as fayimora
<imperator2> i think i thought about using weakref once
asaaki_ has joined #ruby-lang
<imperator2> but then i had to vacuum the carpets or something
<slyphon> hah
<slyphon> it's only useful if you want to store references to something in a global something something
bryancp has joined #ruby-lang
s0ra_h is now known as sora_h
Karmaon has joined #ruby-lang
asaaki_ has quit [Client Quit]
asaaki has quit [Quit: Verlassend]
outoftime has quit [Quit: Leaving]
* imperator2 has to deal with weird default_external differences in jruby vs ruby encodings
<slyphon> oh god
<slyphon> any day you have to think about character encodings is a bad day
<imperator2> with 1.9, that's every day
<slyphon> :(
* slyphon hasn't had to yet
<imperator2> well, i'm just starting conversion of the win32* stuff to ffi
Karmaon has quit [Remote host closed the connection]
tla has joined #ruby-lang
<slyphon> oh gawd
<slyphon> yes you *only* have bad days
<lianj> imperator2: but thanks ;)
<slyphon> i hope they pay you larger-than-average sized bucks for dealing w/ win32
Karmaon has joined #ruby-lang
<imperator2> slyphon, i get paid nothing atm :(
<slyphon> oh fuck
<slyphon> oh
<slyphon> you mean by "ruby"
<imperator2> tried to get a project going for it on kickstarter (that would have been part of the effort), but alas, it is not going well
<slyphon> well, no good deed goes unpunished, is what my dad always said
<slyphon> says
<slyphon> (he still says that)
<lianj> well, bad closes at -10%
<imperator2> well, at least he doesn't forward you emails about birther crap like mine does
<slyphon> oh god
* slyphon gives imperator2 a totally hetero hug
<slyphon> my buddy is from austin
<slyphon> he says he can't even look at facebook anymore
<slyphon> his redneck cousins are all in a fucking froth
<imperator2> haha, it's alright, he's a pretty good guy, former engineer, even used autolisp back in the day, but he's a good ol' boy from da south
<slyphon> yeah
<slyphon> i've found that engineers have really odd politics
<imperator2> just clicked his brain off when a black man was elected president
<slyphon> ha
hahuang65_ has quit [Quit: Computer has gone to sleep.]
<slyphon> where in the south?
<imperator2> but, he's retired, and sometimes i even respond with snopes debunks
<slyphon> hah
<slyphon> nice
<imperator2> originally born in tennessee, but he's been retired to florida for 10+ years
<slyphon> ah
<xcyclist> How do I do argument assignment to constants so I can use them in conditionals?
* slyphon blinks
<imperator2> argument assignement to constants....what
<xcyclist> I cannot seem to easily assign false to an unassigned constant, and if I leave it unassigned, the conditional bafs.
<slyphon> xcyclist: can you gist.github.com a sample/
<xcyclist> barfs.
<slyphon> ?
<slyphon> oh
<slyphon> CON = false unless defined?(CON)
<xcyclist> Thanks.
<xcyclist> Nope: reltests/scripts/reget.rb:18: uninitialized constant TraceSteps (NameError)
Cykey has quit [Quit: Computer has gone to sleep.]
<slyphon> a code sample would be useful
hahuang65_ has joined #ruby-lang
<xcyclist> irb(main):001:0> X = 1 if false; X = 0 unless defined(X); puts "Hi" if X
<xcyclist> NameError: uninitialized constant X
<slyphon> you're doing it wrong
virunga has quit [Read error: Connection reset by peer]
<slyphon> why do you need that to be a constant?
<xcyclist> Functional programming is better.
<slyphon> HA
<slyphon> obviously
<slyphon> you shoudl use a functional programming language, then
Cykey has joined #ruby-lang
<slyphon> defined?
WillMarshall has joined #ruby-lang
<xcyclist> irb(main):002:0> X = 1 if false; X = 0 unless X.defined?; puts "Hi" if X
<xcyclist> NameError: uninitialized constant X
Cykey has quit [Client Quit]
<slyphon> not 'defined'
<slyphon> no
<slyphon> defined?(X)
<xcyclist> Got it. That works. Good job slyphon. Thank you. May the gorst be with you.
<slyphon> :)
Choobie has joined #ruby-lang
flowerpot has joined #ruby-lang
mat__ has joined #ruby-lang
<erikh> defined? X should work too
bfreeman has quit [Quit: bfreeman]
mat__ is now known as Guest63829
diegoviola has joined #ruby-lang
Guest63829 has quit [Client Quit]
xcyclist has quit [Remote host closed the connection]
jtoy has joined #ruby-lang
<jtoy> why does the rib command line get mangles up sometimes and how can I stop it?