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
gsav has quit [Read error: Connection reset by peer]
bryno has quit [Quit: leaving]
<postmodern> xcyclist, dunno, maybe use rspec or mini-test instead?
shyouhei has joined #ruby-lang
<xcyclist> No, there has got to be a way to do this. It would be idiocy not to have a way to do this.
Boohbah has quit [Remote host closed the connection]
Boohbah has joined #ruby-lang
toretore has quit [Quit: Leaving...]
<apeiros_> postmodern: re multi-markdown - I pondered whether you could use proc { Some::Const }.call instead of eval("Some::Const")
<postmodern> apeiros_, ah now there's an idea
<apeiros_> postmodern: also wrt the interface, I think list_known, list_available and available?(lib) would make sense
<postmodern> apeiros_, yeah idk about API yet, i tried to copy multi_json
<apeiros_> aaand, you're missing maruku :)
<postmodern> fuu that's right
<apeiros_> generally a good idea
gsav has joined #ruby-lang
bryno has joined #ruby-lang
s0ra_h is now known as sora_h
kaspernj__ has quit [Ping timeout: 246 seconds]
crankharder has quit [Read error: Connection reset by peer]
mistym has joined #ruby-lang
savage- has quit [Remote host closed the connection]
<postmodern> apeiros_, and released 0.2.0
<postmodern> apeiros_, also added bluecloth support
kaspernj__ has joined #ruby-lang
<postmodern> apeiros_, the eval() thing has worked so far
<postmodern> er
<postmodern> apeiros_, also used the same setup to load XML libraries for dm-serializes, before multi_xml was a thing
krohrbaugh1 has left #ruby-lang [#ruby-lang]
<lsegal> honestly, i wish we had a better way than eval()
<lsegal> im not a fan
gasbakid has joined #ruby-lang
<postmodern> aye
<postmodern> also defined?(Constant::Foo) seems awkward
<postmodern> and other libraries re-invent a recursive constant lookup method
IPGlider has quit []
<apeiros_> postmodern: not sure I understand - you prefer eval over proc, or does the proc one not work?
<postmodern> apeiros_, they both work, is there a benefit to either/or?
seanstickle has joined #ruby-lang
<apeiros_> I generally dislike eval. but this is a sane case. so besides a somewhat awkwardness - none I was aware of.
<apeiros_> at least I doubt that any performance difference would be of relevance.
<lsegal> if you're eval()ing hardcoded data the only diff is perf. stylistically eval() looks better btw, and if you wanted block form, you could always instance_eval { Foo }
<lsegal> and yes, perf is probably not an issue in this context.
ConstantineXVI has joined #ruby-lang
sora_h is now known as s0ra_h
deryldoucette has quit [Quit: deryldoucette]
s0ra_h is now known as sora_h
kitallis has joined #ruby-lang
krohrbaugh has joined #ruby-lang
jbsan has quit [Ping timeout: 248 seconds]
sora_h is now known as s0ra_h
jbsan has joined #ruby-lang
m3nd3s has joined #ruby-lang
kaspernj_ has joined #ruby-lang
enebo has quit [Quit: enebo]
moxiemk1 has joined #ruby-lang
moxiemk1 has quit [Remote host closed the connection]
kaspernj__ has quit [Ping timeout: 245 seconds]
xcyclist has quit [Remote host closed the connection]
kyrylo has joined #ruby-lang
neoesque has joined #ruby-lang
ryez has joined #ruby-lang
srbartlett has joined #ruby-lang
s0ra_h is now known as sora_h
Banistergalaxy has joined #ruby-lang
RegEchse has quit [Quit: <3 WeeChat (v0.3.8-dev)]
Banistergalaxy has quit [Ping timeout: 250 seconds]
flowerpot has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
diegoviola has quit [Quit: Reconnecting]
diegoviola has joined #ruby-lang
corsican has joined #ruby-lang
sora_h is now known as s0ra_h
brianpWins has joined #ruby-lang
perryh is now known as perryh_away
codelurker has joined #ruby-lang
deobald__ has joined #ruby-lang
VGoff is now known as VGoff_afk
arooni-mobile has joined #ruby-lang
ConstantineXVI has quit [Remote host closed the connection]
ConstantineXVI has joined #ruby-lang
s0ra_h is now known as sora_h
codelurker has quit [Quit: WeeChat 0.3.7]
ConstantineXVI has quit [Read error: No route to host]
Constant_ has joined #ruby-lang
Constant_ has quit [Remote host closed the connection]
ConstantineXVI has joined #ruby-lang
flowerpot has quit [Quit: Ex-Chat]
VGoff_afk is now known as VGoff
m3nd3s has quit [Remote host closed the connection]
flowerpot has joined #ruby-lang
flowerpot has quit [Client Quit]
ConstantineXVI has quit [Remote host closed the connection]
ConstantineXVI has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
DEac- has quit [Read error: No route to host]
DEac- has joined #ruby-lang
wallerdev has joined #ruby-lang
flowerpot has joined #ruby-lang
sora_h is now known as s0ra_h
ConstantineXVI has quit [Ping timeout: 245 seconds]
flowerpot has quit [Client Quit]
postmodern has quit [Quit: Leaving]
flowerpot has joined #ruby-lang
ilyam_ has joined #ruby-lang
fragrant has joined #ruby-lang
fragrant has left #ruby-lang [#ruby-lang]
ilyam has quit [Ping timeout: 245 seconds]
ilyam_ is now known as ilyam
srbartlett has quit [Remote host closed the connection]
ConstantineXVI has joined #ruby-lang
s0ra_h is now known as sora_h
ConstantineXVI has quit [Remote host closed the connection]
qpingu has quit [Quit: Leaving.]
ilyam has quit [Quit: ilyam]
rmascarenhas has joined #ruby-lang
savage- has joined #ruby-lang
bruno_coelho has joined #ruby-lang
deryl has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
flowerpot has quit [Quit: Ex-Chat]
xcyclist has joined #ruby-lang
sora_h is now known as s0ra_h
<xcyclist> Anybody out there feel like explaining to me what this is? def hooks
<xcyclist> end
<xcyclist> @hooks ||= Hash.new{|h,k| h[k] = []}
neoesque has quit [Quit: Bye!]
<seanstickle> What do you think it does?
<xcyclist> Sorry for not keeping to one line: def hooks @hooks ||= Hash.new{|h,k| h[k] = []} end
<xcyclist> The only other place in the class I see an assignement to @hooks it gets = nil, so I am stumped.
<xcyclist> It must be some kind of lambda function, right?
<seanstickle> No.
<seanstickle> If you have a = {}, and then go puts a["foo"], what do you get?
<xcyclist> Thing is, there is no way to get values into the method, as no arguments are specified. The caller treats the hooks method as a Hash, so it is like it's allowing the method to be a hash by looking at the pointer returned.
<xcyclist> From your example you would have a single element in the hash of a["foo"] == nil
<seanstickle> And if you do a = Hash.new{|h,k| h[k] = []} and then do a["foo"], what do you get?
<xcyclist> Perhaps you get a["foo"] == an empty array?
deryl has quit [Quit: Leaving]
deryldoucette has joined #ruby-lang
deryldoucette is now known as deryl
neoesque has joined #ruby-lang
<seanstickle> Perhaps?
<seanstickle> You don't have access to a Ruby interpreter?
deobald__ has quit [Ping timeout: 260 seconds]
whatasunnyday has quit [Quit: Leaving]
<seanstickle> Running Ruby code in your head is less awesome than running it on a computer, I've found
bfreeman has quit [Quit: bfreeman]
kaspernj_ has quit [Ping timeout: 246 seconds]
ryanf has quit [Quit: leaving]
<xcyclist> Got it. Thanks seanstickle.
flowerpot has joined #ruby-lang
xcyclist has quit [Quit: Leaving]
igotnolegs has joined #ruby-lang
wmoxam has joined #ruby-lang
Hakon|mbp has quit [Quit: Leaving...]
kaspernj_ has joined #ruby-lang
dalekurt has joined #ruby-lang
rippa has joined #ruby-lang
flowerpot has quit [Quit: Ex-Chat]
wallerdev has quit [Quit: wallerdev]
flowerpot has joined #ruby-lang
s0ra_h is now known as sora_h
Banistergalaxy has quit [Ping timeout: 250 seconds]
wmoxam has quit [Ping timeout: 256 seconds]
arooni-mobile has quit [Ping timeout: 246 seconds]
Banistergalaxy has joined #ruby-lang
fragrant has joined #ruby-lang
fragrant has left #ruby-lang [#ruby-lang]
flowerpot has quit [Quit: Ex-Chat]
postmodern has joined #ruby-lang
dasibre has quit [Remote host closed the connection]
kaspernj_ has quit [Ping timeout: 246 seconds]
neoesque has quit [Quit: Bye!]
ryanf has joined #ruby-lang
gregf has joined #ruby-lang
chendo_ has joined #ruby-lang
rippa has quit [Ping timeout: 252 seconds]
kaspernj_ has joined #ruby-lang
arooni-mobile has joined #ruby-lang
macmartine has quit [Quit: macmartine]
perryh_away is now known as perryh
bfreeman has joined #ruby-lang
srbaker has joined #ruby-lang
macmartine has joined #ruby-lang
jxie has quit [Quit: leaving]
rmascarenhas has quit [Quit: leaving]
srbartlett has joined #ruby-lang
AndChat| has joined #ruby-lang
Radium has joined #ruby-lang
kaspernj_ has quit [Ping timeout: 244 seconds]
cdt has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 250 seconds]
cdt has quit [Ping timeout: 246 seconds]
bruno_coelho has quit [Remote host closed the connection]
sora_h is now known as s0ra_h
macmartine has quit [Quit: macmartine]
kaspernj has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
su has joined #ruby-lang
su has left #ruby-lang [#ruby-lang]
AndChat| has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 246 seconds]
andrewhl has joined #ruby-lang
TheHunter_1039 has quit [Quit: TheHunter_1039]
dalekurt has quit [Quit: Zzz...]
neoesque has joined #ruby-lang
savage- has quit [Remote host closed the connection]
TDJACR has quit [Read error: Operation timed out]
lupine_85 has quit [Read error: Operation timed out]
cyndis has quit [Read error: Operation timed out]
cyndis has joined #ruby-lang
shevy has quit [Ping timeout: 252 seconds]
mistym has quit [Remote host closed the connection]
TDJACR has joined #ruby-lang
yxhuvud has joined #ruby-lang
lupine_85 has joined #ruby-lang
shevy has joined #ruby-lang
DRCALKIN has joined #ruby-lang
andrewhl has quit [Quit: andrewhl]
DRCALKIN has quit [Ping timeout: 250 seconds]
neoesque has quit [Quit: Bye!]
neoesque has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
srbartlett has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
<shevy> hmm I have a string like string = "short-mime-1.0.0-rc1" and a regex like REGEX = /(.*)-([\d\.\w]+)/
<shevy> ruby gives me a warning
<shevy> warning: character class has duplicated range: /(.*)-([\d\.\w]+)/
<shevy> now I am trying to find out what that means
flori has left #ruby-lang ["Client exiting"]
naz has quit [Quit: Leaving]
cmacos has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
srbartlett has quit [Remote host closed the connection]
<ryanf> \d is a subset of \w
srbartlett has joined #ruby-lang
sei has joined #ruby-lang
krz has quit [Ping timeout: 248 seconds]
srbartlett has quit [Remote host closed the connection]
naz has joined #ruby-lang
jxie has joined #ruby-lang
indeterminate has quit [Ping timeout: 245 seconds]
krz has joined #ruby-lang
naz has quit [Read error: Connection reset by peer]
naz has joined #ruby-lang
ryez has quit [Ping timeout: 245 seconds]
srbartlett has joined #ruby-lang
<shevy> aha
<shevy> that makes sense
naz has quit [Read error: Connection reset by peer]
naz has joined #ruby-lang
<shaman42> :/
srbartlett has quit [Remote host closed the connection]
solars has joined #ruby-lang
gsav has joined #ruby-lang
francisfish has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
tomb_ has quit [Quit: Computer has gone to sleep.]
kaspernj has quit [Ping timeout: 246 seconds]
ridders24 has joined #ruby-lang
kaspernj has joined #ruby-lang
mssola has joined #ruby-lang
ryanf has quit [Quit: leaving]
gasbakid__ has joined #ruby-lang
francisfish has quit [Ping timeout: 244 seconds]
gasbakid has quit [Ping timeout: 276 seconds]
igotnolegs has quit [Quit: Computer has gone to sleep.]
krz has quit [Quit: krz]
Solnse has joined #ruby-lang
tomzx has quit [Ping timeout: 244 seconds]
bored-in-Oz has joined #ruby-lang
DRMacIver has quit [Remote host closed the connection]
bored-in-Oz has left #ruby-lang [#ruby-lang]
gsav has joined #ruby-lang
batmanian has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
batmanian has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
DRCALKIN has joined #ruby-lang
DRCALKIN has quit [Client Quit]
pridian has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
toretore has joined #ruby-lang
adambeynon has joined #ruby-lang
pridian has left #ruby-lang ["Leaving"]
indeterminate has joined #ruby-lang
sei has quit [Ping timeout: 246 seconds]
burgestrand1 has joined #ruby-lang
cantonic has joined #ruby-lang
burgestrand has quit [Ping timeout: 250 seconds]
sei has joined #ruby-lang
indeterminate has quit [Ping timeout: 256 seconds]
neoesque has quit [Quit: Bye!]
DMKE has joined #ruby-lang
fromhet has joined #ruby-lang
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
A1241 has joined #ruby-lang
A124 has quit [Ping timeout: 244 seconds]
adambeynon has quit [Read error: Connection reset by peer]
adambeynon_ has joined #ruby-lang
Z33K|Lux has quit []
gasbakid__ has quit [Quit: Quitte]
gasbakid has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
vesan has joined #ruby-lang
deobald__ has joined #ruby-lang
benanne has joined #ruby-lang
yugui_zzz is now known as yugui
IPGlider has joined #ruby-lang
yugui is now known as yugui_zzz
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
Solnse has quit []
<fromhet> Hi! I'm learning ruby and am now trying to get my head around how case statements work (they are quite different than the switch I am used to). As an exercise, I'm writing a simple CLI calculator. The user shall write "calc.rb 4 + 3" and a switch statement determines if it would add, subtract or multiply 4 and 3. But I can't seem to get the case statement to work, and docs+google doesn't help. Can you give it a look? The code is he
lupine_85 has quit [Changing host]
lupine_85 has joined #ruby-lang
<shevy> case (ARGV[1])
<shevy> use
<shevy> case ARGV[1]
<shevy> also I would indent at the same level
<shevy> case foo
<shevy> when
yugui_zzz is now known as yugui
<shevy> rather than
<shevy> case foo
<shevy> when
<shevy> next thing
<shevy> when ARGV[1] === "+":
<shevy> are you sure that you need that?
<shevy> usually you use it like:
<shevy> case foo
<shevy> when '+'
<shevy> when '-'
<shevy> end
<shevy> or in your example
<shevy> case ARGV[1]
<shevy> when '+'
<shevy> when '-'
<shevy> end
<shevy> and no :
<shevy> they are not needed here
<apeiros_> fromhet: the case statement works like this: case expression; when condition --> ruby tests `condition === expression`
<shevy> fromhet, also no empty "when"
sol has joined #ruby-lang
<shevy> line 17 has an empty when
<apeiros_> it'll only take the first when, no subsequent one will be executed
sol is now known as Guest30045
<apeiros_> btw., if you're on 1.9, the : point after the condition is invalid syntax
<apeiros_> `when cond`, not `when cond:`
<shevy> fromhet, this should work better http://pastie.org/3934875
<shevy> but you can most likely simplify this even further
<shevy> you could even do:
<shevy> FAIL_MESSAGE = 'Sorry, it seems like you didnt write num +/-/* num.'
<shevy> and then
<shevy> puts FAIL_MESSAGE
<shevy> :)
<fromhet> Thanks! cut off the things you said shevy and got this: http://pastie.org/3934880 and it worked perfectly. Don't know how line 17 got in there. Thanks a lot, both shevy and apeiros
Guest30045 has quit [Ping timeout: 252 seconds]
Radium has quit [Ping timeout: 246 seconds]
Radium_ has joined #ruby-lang
fromhet has quit [Quit: fromhet]
momix has joined #ruby-lang
fromhet has joined #ruby-lang
momix_ has joined #ruby-lang
<shevy> i still would indent to the left
postmodern has quit [Quit: Leaving]
momix_ has quit [Client Quit]
tomb_ has joined #ruby-lang
imperator has joined #ruby-lang
momix has quit [Ping timeout: 260 seconds]
krohrbaugh has quit [Ping timeout: 246 seconds]
Hakon|mbp has joined #ruby-lang
jxie has quit [Ping timeout: 250 seconds]
deobald__ has quit [Ping timeout: 260 seconds]
<_br_> Has anyone a recommendation how to handle input from different encodings across 1.8, 1.9? There is currently a bug here https://issues.apache.org/jira/browse/THRIFT-1023?focusedCommentId=13279386#comment-13279386 and I'm not particularly sure how to handle this encoding issue. KCode? Iconv?
jobicoppola has joined #ruby-lang
RegEchse has joined #ruby-lang
diegoviola has quit [Ping timeout: 265 seconds]
imperator2 has joined #ruby-lang
<shevy> good old encoding, making everyone happy since 1.9.x
s0ra_h is now known as sora_h
sandbags has joined #ruby-lang
^sandbags^ has quit [Ping timeout: 240 seconds]
Radium_ has quit [Ping timeout: 256 seconds]
TheHunter_1039 has joined #ruby-lang
imperator has quit [Quit: This computer has gone to sleep]
benteaa has quit [Ping timeout: 248 seconds]
dataer has joined #ruby-lang
sora_h is now known as s0ra_h
yugui is now known as yugui_zzz
Radium has joined #ruby-lang
krohrbaugh has joined #ruby-lang
s0ra_h is now known as sora_h
<rue> _br_: You can use Iconv in 1.9 still, but it will get deprecated at some point
* apeiros_ wonders why nobody backported encodings to 1.8…
<apeiros_> it's not that hard. just a lot of work…
dasibre has joined #ruby-lang
<shevy> 1.8 is kinda like the ghostship. everyone knows it will sink now
<shevy> hmm
<shevy> now/soon
<countdigi> just switched over to 1.9 couple weeks ago
<shevy> :)
<countdigi> anyone know how clean is jruby running on 1.9? these days
krohrbaugh has quit [Quit: Leaving.]
m3nd3s has joined #ruby-lang
heftig has joined #ruby-lang
krohrbaugh has joined #ruby-lang
jobicoppola has quit [Quit: Computer has gone to sleep.]
sora_h is now known as s0ra_h
heftig_ has joined #ruby-lang
heftig has quit [Ping timeout: 265 seconds]
bruno_coelho has joined #ruby-lang
wmoxam has joined #ruby-lang
<rue> countdigi: It *should* run clean
* rue waits for headius’ bat signal to go off
s0ra_h is now known as sora_h
TheDracle has quit [Remote host closed the connection]
Defusal has quit [Read error: Connection reset by peer]
perryh is now known as perryh_away
<imperator2> encodings are a mixed blessing
seanstickle has joined #ruby-lang
<imperator2> str1 + str2 # boom! encodings weren't the same!
adambeynon_ has quit [Quit: adambeynon_]
<imperator2> i can't even do str.tr("\\", "/") if the encoding isn't ascii
bruno_coelho has quit [Read error: Connection reset by peer]
bruno_coelho has joined #ruby-lang
sora_h is now known as s0ra_h
<Mon_Ouie> "foo\\bar".force_encoding("iso-8859-10").tr("\\", "/") # doesn't error
<apeiros_> imperator2: would you prefer it if ruby didn't do anything and simply malfunctioned when you're using incompatible encodings?
enebo has joined #ruby-lang
<imperator2> "foo\\bar".encode("UTF-16LE").tr("\\", "/")
<imperator2> Mon_Ouie, ok, certain encodings, like, the one i need on winders :)
<Mon_Ouie> Because then your encodings aren't compatible
<rue> apeiros_: False dilemma
<apeiros_> rue: how so?
<rue> It’s not either-or
<imperator2> that's it, when i'm dictator, i will conquer the world and force 1 encoding on everyone!
<apeiros_> again, how so?
<rue> imperator2: Dictator, not imperator?
<rue> apeiros_: Judicious use of Iconv, for example
<imperator2> i mean, uh, yeah imperator
<apeiros_> rue: errr, that doesn't change anything
<apeiros_> you still have to figure what encoding your things are and bring it into a common encoding…
<apeiros_> you're just using a different tool…
s0ra_h is now known as sora_h
<Mon_Ouie> apeiros_: I think the reason not to backport encoding in 1.8 is it would break compatibility — which is the main reason to still use 1.8
<apeiros_> iconv ain't automagical either…
<imperator2> silly accent marks and digraphs shall be purged from the earth!
<apeiros_> imperator2: agreed
<apeiros_> or: I'd be all for a single script/encoding based on phonems.
<apeiros_> also lets get rid of silly upper- and lowercase
<rue> Phonetic writing is the best
sepp2k has joined #ruby-lang
wmoxam has quit [Ping timeout: 248 seconds]
jwbuurlage has joined #ruby-lang
Radium has quit [Ping timeout: 246 seconds]
rmascarenhas has joined #ruby-lang
jwbuurlage has left #ruby-lang [#ruby-lang]
gix has quit [Ping timeout: 245 seconds]
krohrbaugh has quit [Quit: Leaving.]
gix has joined #ruby-lang
krohrbaugh has joined #ruby-lang
yugui_zzz is now known as yugui
mistym has joined #ruby-lang
stardiviner has joined #ruby-lang
jwbuurlage has joined #ruby-lang
jwbuurlage has quit [Client Quit]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
sora_h is now known as s0ra_h
thone_ has joined #ruby-lang
fromhet has quit [Read error: Connection reset by peer]
voker57 has quit [Remote host closed the connection]
fromhet has joined #ruby-lang
thone has quit [Ping timeout: 245 seconds]
gsav has joined #ruby-lang
s0ra_h is now known as sora_h
fromhet has quit [Quit: fromhet]
heftig_ is now known as heftig
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
dalekurt has joined #ruby-lang
yugui is now known as yugui_zzz
jwbuurlage has joined #ruby-lang
macmartine has joined #ruby-lang
PhilCK has joined #ruby-lang
indeterminate has joined #ruby-lang
andrewhl has joined #ruby-lang
sei has quit [Ping timeout: 260 seconds]
jwbuurlage has left #ruby-lang [#ruby-lang]
sei has joined #ruby-lang
wmoxam has joined #ruby-lang
indeterminate has quit [Ping timeout: 244 seconds]
kyrylo has quit [Ping timeout: 246 seconds]
chendo_ has quit [Quit: Computer has gone to sleep.]
gsav has quit [Read error: Connection reset by peer]
gsav has joined #ruby-lang
virunga has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
sora_h is now known as s0ra_h
r0bby has joined #ruby-lang
s0ra_h is now known as sora_h
jwbuurlage has joined #ruby-lang
kyrylo has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 272 seconds]
Mon_Ouie has quit [Read error: Connection reset by peer]
krohrbaugh has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
<_br_> rue: ok, thanks I'll go with Iconv then I guess to fix that bug
dasibre has quit [Remote host closed the connection]
ConstantineXVI has joined #ruby-lang
burgestrand1 has quit [Quit: Leaving.]
segy has quit [Read error: Operation timed out]
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
m3nd3s has quit [Remote host closed the connection]
segy has joined #ruby-lang
Radium has joined #ruby-lang
benteaa has joined #ruby-lang
jwbuurlage has quit [Quit: jwbuurlage]
savage- has joined #ruby-lang
nisstyre has quit [Ping timeout: 272 seconds]
subr00t has joined #ruby-lang
<yorickpeterse> Maybe I'm missing something but does somebody in here know how to achieve the following with Bundler?: My app is in A and will be installed as a gem, this app uses Bundler (as an experiment for now). Users can create their own apps that use A and call it, for example, B. B does not have to use Bundler
<yorickpeterse> Right now if I were to run B Bundler will bitch out telling me it can't find the Gemfile
<yorickpeterse> You could see A as the framework and B as an individual app using said framework, if that clarifies my use case a bit.
<seanstickle> I am completely lost with your use case.
<seanstickle> A is a gem?
imperator2 has quit [Ping timeout: 276 seconds]
<yorickpeterse> Yes
<seanstickle> So what's that got to do with Bundler? Presumably you just install the A gem, right?
<yorickpeterse> The problem is that if you run app B, regardless of where that is located, Bundler spits out an error telling me that it can't find the Gemfile
<yorickpeterse> Which doesn't happen when I run my code of A itself
<yorickpeterse> (e.g. `ruby lib/mygem.rb` works fine)
nisstyre has joined #ruby-lang
sora_h is now known as s0ra_h
<yorickpeterse> Maybe the easiest way to ask this is the following: how do I explicitly tell Bundler which Gemfile to load
<yorickpeterse> Because if I can tell it "Look in A" then that would fix the issue
<seanstickle> A isn't published on some gem server, or on a local file directory?
<yorickpeterse> A will be published
<yorickpeterse> It seems that Bundler is being a bit dumb and insists on a directory containing a Gemfile, even if the code in that directory itself does not use Bundler directly
<yorickpeterse> An example would be Sinatra and a Sinatra app
<yorickpeterse> Sinatra might use Bundler, but an app might not
dataer has quit [Quit: dataer]
<yorickpeterse> So if you were to run Sinatra itself in this case it would work, if you were to run the app it will spit out an error
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
wmoxam has quit [Ping timeout: 248 seconds]
brianpWins has joined #ruby-lang
adambeynon has joined #ruby-lang
burgestrand has joined #ruby-lang
andrewhl has quit [Quit: andrewhl]
<yorickpeterse> Ugh fuck this, I'll just not use Bundler. Enforcing it on end users is not an option
batmanian has joined #ruby-lang
m3nd3s has joined #ruby-lang
segy has quit [Ping timeout: 244 seconds]
<rue> You can just use bundler from the gemspec, can’t you?
<rue> Er, have bundler get the files from the gemspec
<yorickpeterse> That doesn't solve the "Can't find Gemfile fuck you" error
<yorickpeterse> I'll see if I can just work around my problem using require() and gem()
segy has joined #ruby-lang
dax has joined #ruby-lang
ConstantineXVI has quit [Remote host closed the connection]
<rue> I mean let the user use bundler if they like
r0bby is now known as robbyoconnor
<rue> If bundler can’t do that, then fuck it
<yorickpeterse> Well yeah, hence I'm not going to use it :)
<andrewvos> Anyone want to play Diablo 3?
batmanian has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<burgestrand> Bundler is not something to require in your gems; it’s awfully annoying when gem authors do that
<burgestrand> Not sure if that’s what happening here, just saying to make sure
<yorickpeterse> burgestrand: partially true. However, installing a Gem does not guarantee that the versions of dependencies for that Gem are actually used
<yorickpeterse> For example, assume you have Gem A which depends on B v0.1
<yorickpeterse> If the user has B v0.2 installed and you simple do `require 'B'` it will load v0.2, even if that might not work with A
bruno_coelho has quit []
<yorickpeterse> which you can somewhat work around using gem()
<yorickpeterse> But that in turn means I have multiple (so far I'm counting 6) locations to manage Gem versions
<burgestrand> Yeah. Bundler helps with that, but only for the actual end user (i.e. somebody choosing to use bundler to manage their dependency on your gem). And I do agree it’s kind of annoying to accidentally use an old version you’ve explicitly defined your gem not to be compatible with.
<burgestrand> Oh, not old, I mean new version.
krohrbaugh has quit [Quit: Leaving.]
rippa has joined #ruby-lang
<burgestrand> For gem authoring, bundler’s pretty much only useful for ease of installing dependencies for development of the gem, and partly for it’s rake task. That’s pretty much it.
segy has quit [Ping timeout: 244 seconds]
<burgestrand> You can override some gems in your gemspec with local versions as well, which can be useful. But as long as nobody forces bundler on users of their gems I’m happy. :)
segy has joined #ruby-lang
<shevy> hehe
kain has quit [Ping timeout: 246 seconds]
wmoxam has joined #ruby-lang
Guest30045 has joined #ruby-lang
dejongge has joined #ruby-lang
krohrbaugh has joined #ruby-lang
kain has joined #ruby-lang
jxie has joined #ruby-lang
<shevy> hmm ok so I wrote a mini irc "library"
<shevy> ERROR :Closing Link: (Ping timeout: 245 seconds)
<shevy> and it gets disconnected after a while. how is it possible to ... hmm say "dont disconnect me!"
<yorickpeterse> By responding to pings :)
<shevy> hmm ok
<shevy> yorickpeterse that actually helped me googling :)
<shevy> "In order to keep an IRC connection alive we need to do at least two things: registering on the server, and responding to the ping event"
<yorickpeterse> :)
segy has quit [Ping timeout: 245 seconds]
<yorickpeterse> Oh wtf, now Bundler stopped bitching about the Gemfile
<yorickpeterse> I wonder what I changed to fix that
<yorickpeterse> Aha! `Bundler.setup` doesn't work while `require 'bundler/setup'` does. Derp
segy has joined #ruby-lang
<yorickpeterse> Which I find somewhat weird because
<yorickpeterse> Ugh, fail enter
<yorickpeterse> because "bundler/setup.rb" does not contain a mention to a Gemfile
Guest30045 has quit [Ping timeout: 245 seconds]
<yorickpeterse> Ah! It loads the shared helpers which sprinkles some fairy dust on your code to make it work
tomzx has joined #ruby-lang
Defusal has joined #ruby-lang
Guest30045 has joined #ruby-lang
arooni-mobile has joined #ruby-lang
r0bby has joined #ruby-lang
flopper has joined #ruby-lang
cldwalker has quit [Read error: Operation timed out]
robbyoconnor has quit [Ping timeout: 246 seconds]
mrb_bk has quit [Read error: Operation timed out]
abuiles has quit [Ping timeout: 245 seconds]
IPGlider has quit []
pkondzior has quit [Ping timeout: 246 seconds]
beawesomeinstead has quit [Ping timeout: 244 seconds]
nashby_ has quit [Ping timeout: 260 seconds]
anildigital_work has quit [Max SendQ exceeded]
L0rdShrek has quit [Max SendQ exceeded]
denysonique has quit [Ping timeout: 256 seconds]
dkannan has quit [Ping timeout: 272 seconds]
cldwalker has joined #ruby-lang
akamike has quit [Ping timeout: 265 seconds]
tubbo has quit [Max SendQ exceeded]
<subr00t> I spent many hours looking for a good tutorial on how to build a cloud server analytics system for aws (or any approach),can some one please mention a link?
akamike has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
mrchrisadams has quit [Max SendQ exceeded]
mrchrisadams has joined #ruby-lang
abuiles has joined #ruby-lang
unsymbol has quit [Ping timeout: 245 seconds]
unsymbol has joined #ruby-lang
DMKE has quit [Ping timeout: 265 seconds]
slyphon has joined #ruby-lang
imperator2 has joined #ruby-lang
nashby_ has joined #ruby-lang
tubbo has joined #ruby-lang
diegoviola has joined #ruby-lang
wmoxam has quit [Ping timeout: 248 seconds]
denysonique has joined #ruby-lang
mrb_bk has joined #ruby-lang
denysonique has quit [Read error: Operation timed out]
Guest30045 has quit [Ping timeout: 276 seconds]
mrb_bk has quit [Ping timeout: 248 seconds]
abuiles has quit [Ping timeout: 248 seconds]
cesario has quit [Ping timeout: 248 seconds]
nashby_ has quit [Ping timeout: 240 seconds]
agib has quit [Ping timeout: 272 seconds]
cldwalker has quit [Ping timeout: 244 seconds]
krohrbaugh has quit [Quit: Leaving.]
beawesomeinstead has quit [Ping timeout: 245 seconds]
Defusal has quit [Quit: today]
toretore has quit [Read error: Connection reset by peer]
toertore has joined #ruby-lang
subr00t has quit [Quit: Leaving]
asahi has left #ruby-lang [#ruby-lang]
mccraig has quit [Ping timeout: 252 seconds]
akamike has quit [Ping timeout: 246 seconds]
mrchrisadams has quit [Ping timeout: 276 seconds]
akahn has quit [Ping timeout: 265 seconds]
pvh has quit [Max SendQ exceeded]
toertore has quit [Read error: Connection reset by peer]
toretore has joined #ruby-lang
tubbo has quit [Max SendQ exceeded]
krohrbaugh has joined #ruby-lang
tubbo has joined #ruby-lang
toertore has joined #ruby-lang
toretore has quit [Read error: Connection reset by peer]
toretore has joined #ruby-lang
toertore has quit [Read error: Connection reset by peer]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
agib has joined #ruby-lang
abuiles has joined #ruby-lang
Z33K|Lux has joined #ruby-lang
adambeynon has quit [Quit: adambeynon]
<epitron> that really depends on what you're analyzing
gregf has quit [Quit: WeeChat 0.3.7]
ttilley has joined #ruby-lang
wmoxam has joined #ruby-lang
cesario has joined #ruby-lang
nashby_ has joined #ruby-lang
cldwalker has joined #ruby-lang
mrchrisadams has joined #ruby-lang
mccraig has joined #ruby-lang
pvh has joined #ruby-lang
countdig1 has joined #ruby-lang
r0bby has quit [Ping timeout: 246 seconds]
pkondzior has joined #ruby-lang
denysonique has joined #ruby-lang
ConstantineXVI has joined #ruby-lang
deobald__ has joined #ruby-lang
novodinia has joined #ruby-lang
<novodinia> why does output 5 instead of a time? https://gist.github.com/2731822
ConstantineXVI has quit [Remote host closed the connection]
imperator2 has quit [Ping timeout: 244 seconds]
<novodinia> Benchmark.measure do someFun(3) outputs => 0.000000 0.000000 0.000000 ( 0.000841)
<novodinia> i'd like to use Benchmark to measure a function ran through so many iterations
<manveru> use bmbm
<heftig> Benchmark.bmbm { |x| x.report("foo") { ... } }
<novodinia> heftig: how would you put a function in what you just typed?
<novodinia> Benchmark.bmbm { |3| 3.someFun(3) {???}}
<shevy> well, .report is kinda a function... more a method though
<novodinia> I tried...
<manveru> novodinia: x.report("foo"){ 3.times{ someFun(3) }}
<heftig> No.
<heftig> Benchmark.bmbm { |x| x.report("foo") { 5.times { someFun(5) } } }
<novodinia> That works
<novodinia> sorry for the basic questions, i want to have this written in the next few mins since i will be busy for the rest of the day and won't have time to work on it...
savage- has quit [Remote host closed the connection]
pgeek has joined #ruby-lang
ConstantineXVI has joined #ruby-lang
lsegal has joined #ruby-lang
novodinia has quit [Ping timeout: 276 seconds]
havenn has joined #ruby-lang
pgeek has quit [Ping timeout: 276 seconds]
Jade has quit [Ping timeout: 244 seconds]
vesan has quit [Remote host closed the connection]
vesan has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
mssola has quit [Read error: Connection reset by peer]
mssola has joined #ruby-lang
diegoviola has quit [Ping timeout: 244 seconds]
mistym has quit [Remote host closed the connection]
krohrbaugh has joined #ruby-lang
wmoxam has quit [Ping timeout: 248 seconds]
ConstantineXVI has quit [Remote host closed the connection]
jwbuurlage has joined #ruby-lang
dejongge has quit [Ping timeout: 240 seconds]
nofxxx has joined #ruby-lang
nofxx has quit [Read error: Operation timed out]
slyphon has quit [Ping timeout: 245 seconds]
jwbuurlage has quit [Quit: jwbuurlage]
dejongge has joined #ruby-lang
dataer has joined #ruby-lang
dalekurt has quit [Quit: Zzz...]
dasibre has joined #ruby-lang
havenn has quit [Remote host closed the connection]
carloslopes has joined #ruby-lang
carloslopes has quit [Client Quit]
havenn has joined #ruby-lang
PhilCK has quit [Quit: PhilCK]
carloslopes has joined #ruby-lang
fukushima has quit [Ping timeout: 248 seconds]
krohrbaugh has quit [Quit: Leaving.]
fukushima has joined #ruby-lang
fukushima has quit [Client Quit]
deobald__ has quit [Ping timeout: 260 seconds]
krohrbaugh has joined #ruby-lang
dontbecold_ has quit [Quit: leaving]
wmoxam has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
Pupeno_W has quit [Quit: It's not who I am underneath but what i do that defines me]
carloslopes has quit [Quit: Leaving]
wmoxam has quit [Ping timeout: 244 seconds]
s0ra_h is now known as sora_h
sora_h is now known as s0ra_h
deryldoucette has joined #ruby-lang
deryldoucette has quit [Client Quit]
deryldoucette has joined #ruby-lang
dalekurt has joined #ruby-lang
rippa has quit [Ping timeout: 245 seconds]
diegoviola has joined #ruby-lang
sepp2k has quit [Ping timeout: 246 seconds]
igotnolegs has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 245 seconds]
s0ra_h is now known as sora_h
sora_h is now known as s0ra_h
macmartine has quit [Quit: macmartine]
s0ra_h is now known as sora_h
sepp2k has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
ridders24 has quit [Quit: Leaving]
cdt has joined #ruby-lang
cdt has quit [Read error: Connection reset by peer]
yxhuvud has quit [Ping timeout: 250 seconds]
havenn has quit [Remote host closed the connection]
konr has joined #ruby-lang
<konr> How can I take a float, say 1e27, and get its internal representation as a string, in this case "00000000000000000000000000000001"?
<konr> *127
enebo has quit [Quit: enebo]
arooni-mobile has joined #ruby-lang
sora_h is now known as s0ra_h
retro|cz has quit [Ping timeout: 265 seconds]
whatasunnyday has joined #ruby-lang
<whitequark> konr: define "internal representation"
<konr> whitequark: well, a float has 32 bits. The first for the signal, 8 for the exponent and the rest for the fraction. I'd like to get these bits in a pretty string
s0ra_h is now known as sora_h
<whitequark> [16] pry(main)> [1e27].pack("f").unpack("B*")
<whitequark> => ["10001111110010110100111001101100"]
<konr> thanks!
<whitequark> just curious, what do you need this for?
seanstickle has quit [Quit: Nihil sub sole novum]
gregf has joined #ruby-lang
<konr> I'm writing a float multiplier device for a school project, but I'm using ruby's REPL to convert the values and debug
<whitequark> nice
<whitequark> are you doing that in vhdl/verilog?
<konr> ArchC! VHDL was last semester :)
<whitequark> oh, very interesting. is it open-source? can I take a look if it is?
<whitequark> that's an awesome school project indeed
<whitequark> naw, not archC, but your multiplier :)
<konr> sure! It's not that complex, however
<whitequark> well, an FP multiplier is not something immediately obvious to me
<whitequark> even integer one isn't, through I think I'd manage to make up something if I needed to
sora_h is now known as s0ra_h
<konr> I'm in the sum part right now. As I said, not very complicated :) https://www.dropbox.com/s/ucmbgdrgxphya7e/somador.h
<konr> the .cpp has only a constructor
<whitequark> ahh, so you aren't implementing that in logic but rather as a macroblock for the emulator, right?
codelurker has joined #ruby-lang
<konr> yup
<whitequark> I hoped for the logic one :) well, still was an interesting peek into ArchC architecture
s0ra_h is now known as sora_h
macmartine has joined #ruby-lang
srbartlett has joined #ruby-lang
sora_h is now known as s0ra_h
imperator2 has joined #ruby-lang
Jade has joined #ruby-lang
Jade has quit [Excess Flood]
Jade has joined #ruby-lang
andrewhl has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
publicvoid_ has joined #ruby-lang
publicvoid has quit [Ping timeout: 245 seconds]
codelurker has quit [Quit: WeeChat 0.3.7]
frem has quit [Quit: Farewell!]
QaDeS has joined #ruby-lang
<Xzyx987X> kind of an obscure question, but is there a "right" was in ruby to get the name of a time zone based on it's UTC offset, or should a just write the code myself?
s0ra_h is now known as sora_h
krohrbaugh has joined #ruby-lang
ConstantineXVI has joined #ruby-lang
jd has joined #ruby-lang
cmacos has quit [Quit: Leaving.]
Jade has quit [Ping timeout: 252 seconds]
toretore has quit [Quit: Leaving...]
sepp2k has quit [Remote host closed the connection]
Hakon|mbp has quit [Quit: Leaving...]
sora_h is now known as s0ra_h
seanstickle has joined #ruby-lang
krz has joined #ruby-lang
virunga has quit [Quit: Sto andando via]
cmacos has joined #ruby-lang
ryanf has joined #ruby-lang
kaspernj has quit [Ping timeout: 246 seconds]
hexreel has left #ruby-lang [#ruby-lang]
dejongge has quit [Ping timeout: 244 seconds]
jd is now known as Jade
cmacos has left #ruby-lang [#ruby-lang]
cmacos has joined #ruby-lang
savage- has joined #ruby-lang
mistym has joined #ruby-lang
whatasunnyday has quit [Remote host closed the connection]
m3nd3s has quit [Remote host closed the connection]
mssola has quit [Quit: Konversation terminated!]
sei has quit [Ping timeout: 265 seconds]
dataer has quit [Quit: dataer]
yugui_zzz is now known as yugui