havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8; 2.0.0-p648: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<Ox0dea> Since 2.3!
underplank has quit [Quit: underplank]
tildes has joined #ruby
TomPeed has joined #ruby
<Ox0dea> #chunk_while's new as well.
finisherr has quit [Ping timeout: 260 seconds]
Ankhers has quit [Ping timeout: 260 seconds]
CloCkWeRX has joined #ruby
CloCkWeRX has left #ruby [#ruby]
joonty has quit [Ping timeout: 240 seconds]
Ankhers has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
robbyoconnor has joined #ruby
s2013 has joined #ruby
Brklyn has quit [Ping timeout: 245 seconds]
pawnbox has joined #ruby
devgiant has quit [Quit: Leaving]
solocshaw has quit [Ping timeout: 240 seconds]
<Darmani> Ox0dea - Bro, so the next part of my learning involves web scraping and http get/post blah blah blah..
<Ox0dea> Darmani: Excellent!
<Darmani> Is there like... An easy way to understand it? Or like... a tutorial you would recommend?
<Ox0dea> Darmani: Get your toes dirty.
<Ox0dea> Dip your hands in.
<Darmani> Should I be using a specific gem for this stuff??
robbyoconnor has quit [Remote host closed the connection]
<Darmani> TALK TO ME
<Ox0dea> Go over to your browser and press F12.
<Darmani> I don't trust you.
tildes has quit [Ping timeout: 245 seconds]
<Darmani> What will that do? Lol
<Ox0dea> Explosions.
tildes has joined #ruby
<Darmani> Oh the web inspector?
<Ox0dea> Yeah!
<Ox0dea> That sure sounds like it might come in handy for inspecting the Web, eh?
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<Darmani> I guess... I want to understand the code though
<Ox0dea> Er... what code?
<Darmani> Ox0dea - Do you ever do web scraping? What gems do you use?
hogetaro has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 245 seconds]
<Ox0dea> Darmani: I scrape now and again, and the data's uniform enough that a sharp enough regex and judicious use of Ruby's massive standard library tends to suffice.
<Radar> Darmani: Mechanize is good for that.
<Darmani> Right... Because you're Ox0dea and you can do that. Lol
<Ox0dea> Darmani: I wasn't born Ox0dea.
<Ox0dea> No, wait.
<Darmani> Radar - Thanks breh
cdg has quit [Remote host closed the connection]
<Radar> no worries breh
<Ox0dea> Mechanize is Dreamweaver.
firstdayonthejob has quit [Ping timeout: 256 seconds]
<Darmani> I'll be back. I need to write out some shitt
h99h9h88 has joined #ruby
<Darmani> I'll show it to you later
<Darmani> if you care to see it xP
<Ox0dea> Spare us! We don't deserve this.
<Ox0dea> <3
<Darmani> wat
grayjedi has joined #ruby
rikkipitt has quit [Quit: Leaving...]
RegulationD has quit [Remote host closed the connection]
RegulationD has joined #ruby
mjuszczak has joined #ruby
robbyoconnor has joined #ruby
visudo has quit [Quit: visudo]
dseitz has joined #ruby
h99h9h88 has quit [Ping timeout: 245 seconds]
cicloid has joined #ruby
RegulationD has quit [Ping timeout: 245 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomPeed has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Darmani> Ox0dea - noob question...
idefine has quit [Remote host closed the connection]
<Darmani> ehhhh
<Darmani> never mind.
TomPeed has quit [Client Quit]
TomPeed has joined #ruby
kirillzh has joined #ruby
nettoweb has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
visudo has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
ElFerna has joined #ruby
visudo has quit [Client Quit]
diegoviola has joined #ruby
workmad3 has joined #ruby
ecksit_ has joined #ruby
ecksit_ has quit [Max SendQ exceeded]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ecksit_ has joined #ruby
northfurr has joined #ruby
pdoherty has joined #ruby
griffindy has joined #ruby
drocsid has quit [Quit: leaving]
ecksit has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
northfurr has quit [Client Quit]
visudo has joined #ruby
workmad3_ has joined #ruby
Musashi007 has joined #ruby
visudo has quit [Client Quit]
pawnbox has quit [Ping timeout: 264 seconds]
nerium has quit [Quit: nerium]
workmad3 has quit [Ping timeout: 272 seconds]
grayjedi has quit [Quit: WeeChat 1.4]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomPeed has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
symm- has joined #ruby
RegulationD has joined #ruby
TomPeed has quit [Ping timeout: 260 seconds]
kent\n has joined #ruby
triangles has quit [Read error: Connection reset by peer]
<kent\n> Are there any good type constraint systems for ruby? I really can't seem to find anything.
<drbrain> kent\n: no
s2013 has joined #ruby
<drbrain> there are some projects that add it via DSL, but nothing I would consider "good"
<kent\n> I don't need something as fancy as a DSL, I would be perfectly complacent with having to do Type::PositiveInt.assert( value ) or something as a stop-gap until some nicer syntax came around
<drbrain> ruby 3 is supposed to have optional types
<drbrain> yeah, there have been a few projects like that, but I'm not sure if any of those are maintained these days
<kent\n> I found a handful referenced on Google, but they all 404'd when I followed the links :(
<drbrain> yeah
<drbrain> it's pretty easy to roll your own, though
AustinMatherne has quit [Remote host closed the connection]
<drbrain> raise TypeError unless Integer === value
moeabdol1 has quit [Quit: WeeChat 1.4]
AustinMatherne has joined #ruby
SCHAAP137 has quit [Ping timeout: 264 seconds]
flughafen has quit [Ping timeout: 264 seconds]
<drbrain> could wrap that up in a method
<kent\n> doodle has place in its code where /passing/ a type constraint could be useful, but its currently implemented in such a way you're forced to write a "do" block for every constraint.
workmad3 has joined #ruby
moeabdol has joined #ruby
<drbrain> You can also make an object that implements #=== to have custom types
h99h9h88 has joined #ruby
<kent\n> `must "length >= 3" do |x| x.length >= 3 end` gets tiresome quickly =)
jottr has joined #ruby
<kent\n> https://seanohalpin.lighthouseapp.com/projects/26673-doodle/tickets/12-permit-inline-must # This may actually help explain what I'm fooling around with
<kent\n> I'm really rusty, what does #=== do?
<Ox0dea> "Case equality".
workmad3_ has quit [Ping timeout: 272 seconds]
TheDracle has joined #ruby
<drbrain> it's used for matching
craysiii has joined #ruby
elifoster has quit [Quit: class]
craysiii has quit [Max SendQ exceeded]
DLSteve has joined #ruby
<kent\n> ah. so you'd have switch(value) { case(MyType) { } } somewhere.
<Ox0dea> `case value; when MyType`, but yeah.
<drbrain> it's what a case statement calls but you can call it directly
craysiii has joined #ruby
craysiii has quit [Max SendQ exceeded]
<drbrain> For classes and modules it is "instance of"
<drbrain> for regular expressions it is "matches"
<drbrain> for most other things it is the same as ==
<Ox0dea> You missed Proc and Range. :)
<drbrain> For range it is "includes"
vF3hNGxc47h8 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
<Ox0dea> kent\n: Did you happen upon https://egonschiele.github.io/contracts.ruby/ in your searching?
craysiii has joined #ruby
<kent\n> Ox0dea: I did not. Reading now =)
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> kent\n: It's the best Ruby has in this space, I'm pretty sure.
<Ox0dea> And it's really quite good if you're hell-bent on shoehorning type safety into your Ruby code.
jgpawletko has joined #ruby
mjuszczak has quit []
snockerton has quit [Quit: Leaving.]
<kent\n> For things like constructors and accessors, I've found that does really help a lot. I wouldn't use it literally everywhere, but knowing things are broken before the side effect of being broken occurs is *great*
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
h99h9h88 has quit [Remote host closed the connection]
<kent\n> x.set(y) <lots of stuff happens> x.foo() internally reads y => Bang, stack trace not of any kind of help.
Mutter has joined #ruby
<kent\n> though mutable state does open that bag of problems on its own. >:)
<Ox0dea> You sound like you're being forced to learn Ruby. :<
symm- has quit [Quit: Leaving...]
Sucks has joined #ruby
oivoodoo has joined #ruby
<kent\n> More I have an unusual way of learning things. I've done ruby before and my knowledge largely rusted to the point I forgot how to write classes.
flughafen has joined #ruby
yoongkang has joined #ruby
<kent\n> I /kinda/ am being forced to learn ruby, but I'm forcing me ;)
pawnbox has joined #ruby
B1n4r10 has quit [Ping timeout: 272 seconds]
mfb2 has quit [Remote host closed the connection]
maneco has joined #ruby
<kent\n> but years of using Moose in Perl has lead me to see the value of this strategy in the right places, and I'm trying to port my "mental set of things that works for me" to the new context.
Snowy has quit []
Liquid-- has quit [Quit: Computer has gone to sleep.]
karapetyan has joined #ruby
maneco has quit [Client Quit]
mrsolo_ has joined #ruby
<kent\n> but the last time I did anything serious in ruby, 2.0 was still a pipe dream that might never arrive, and _why was still active.
<kent\n> catchup sucks :(
oivoodoo has quit [Ping timeout: 256 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TheDracle has quit [Quit: This computer has gone to sleep]
<Ox0dea> Welcome back. ^_^
spider-mario has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 240 seconds]
yoongkang has quit [Ping timeout: 265 seconds]
stannard has quit []
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
underplank has joined #ruby
karapetyan has quit [Ping timeout: 245 seconds]
victortyau has quit [Quit: Textual IRC Client: www.textualapp.com]
Mutter has quit [Remote host closed the connection]
<kent\n> Ox0dea: you don't happen to know why the "On github" links on that page all 404? :/
<Ox0dea> kent\n: GitHub is down.
skcin7 has quit [Ping timeout: 250 seconds]
<kent\n> OH. I guess this is a bad time to not be paying a lot of attention to the error messages. XD
<kent\n> bad programmer, no cookie.
<Ox0dea> ?cookie kent\n
<ruby[bot]> kent\n: here's your cookie:
<Ox0dea> For to motivations.
<kent\n> Ox0dea++ :)
mfb2 has joined #ruby
Ox0dea is now known as Ox0deb
skcin7 has joined #ruby
stannard has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
themsay2 has joined #ruby
themsay2 has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
marr has quit [Ping timeout: 250 seconds]
volty has quit [Quit: Konversation terminated!]
x77686d has quit [Quit: x77686d]
themsay has quit [Ping timeout: 272 seconds]
cschneid_ has joined #ruby
wilbert_ has quit [Ping timeout: 272 seconds]
PlasmaStar has joined #ruby
ellistaa has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
<ellistaa> what approach would you use to find the most common prefix in a long string?
Emmanuel_Chanel has quit [Ping timeout: 250 seconds]
mfb2 has quit [Remote host closed the connection]
ModusPwnens has joined #ruby
h99h9h88 has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
BrunoSaboia has quit [Ping timeout: 250 seconds]
<Ox0deb> ellistaa: You might need to provide your understanding of the term.
<ModusPwnens> If I have BigDecimal.new('100.5'), how do I convert that to a string where I require two digits after the decimal point? Is there a cleaner solution than this? http://stackoverflow.com/a/32845911
<ellistaa> im working on a problem that says find longest prefix in an array of strings.
mfb2 has joined #ruby
<ModusPwnens> I've read the BigDecimal docs but I can't find a way to do this without doing something wonky like the linked answer, or something equally wonky.
h99h9h88 has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
atomical has joined #ruby
blackmesa has joined #ruby
jottr has joined #ruby
sakix has joined #ruby
h99h9h88 has quit [Ping timeout: 245 seconds]
atomical_ has joined #ruby
maneco has joined #ruby
Sucks has quit [Read error: Connection reset by peer]
Sucks has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
gbgdev has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
atomical has quit [Ping timeout: 245 seconds]
Sucks has quit [Remote host closed the connection]
Sucks has joined #ruby
Ebok has joined #ruby
<bnagy> ellistaa: google 'longest common subsequence'
kent\n has quit [Remote host closed the connection]
pawnbox has joined #ruby
baweaver has joined #ruby
<bnagy> there are a bunch of approaches of varying complexity, but it's a Hard problem
charliesome has joined #ruby
<bnagy> although making it a prefix makes it a lot easier
charliesome has quit [Read error: Connection reset by peer]
<Ox0deb> ModusPwnens: Looks like there's nothin' doin'. :<
<Ox0deb> I think it makes sense for BigDecimal's formatting to be more focused on digit clusters, frankly.
<ModusPwnens> I'm not familiar with that expression..
<drbrain> ModusPwnens: it seems the accepted answer plus the comments underneath it are the best way
<Ox0deb> It'd be wonky to support both digit clustering and precision in BigDecimal#to_s, and it seems they favored the more appropriate use case.
pawnbox has quit [Ping timeout: 250 seconds]
kirillzh has joined #ruby
ElFerna has quit [Ping timeout: 264 seconds]
ziyadb has quit [Quit: Connection closed for inactivity]
<ModusPwnens> That's unsatisfying. I really wish there was a better way. It makes me nervous to do something like this for a financial application.
charliesome has joined #ruby
<Ox0deb> Store currency in the lowest denomination; no units is best units.
ElFerna has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yqt has quit [Ping timeout: 260 seconds]
snguyen has joined #ruby
ellistaa has quit [Quit: ellistaa]
<eam> ModusPwnens: it seems like exactly what you want -- to avoid math in base 2
Musashi007 has quit [Quit: Musashi007]
<eam> fwiw this issue is not unique to ruby
dfockler has joined #ruby
ellistaa has joined #ruby
Ebok has joined #ruby
<Ox0deb> ModusPwnens: Kudos to you for having reservations here, but then why not take that all the way and prefer 10050 over BigDecimal.new('100.5')?
<mg^> The Klass.inherited(Subclass) hook appears to be called before everything in class << self...end is evaluated in Subclass. Am I correct?
B1n4r10 has joined #ruby
<ModusPwnens> Ox0deb: Can't you also represent currency correctly using decimals? I know you're gonna have a bad time if you try to use floats to store currency, but can't you use both decimals and integers to handle currency properly?
<ellistaa> bnagy: yeah my solution is like n^2
dstarh has joined #ruby
<Ox0deb> ModusPwnens: Certainly, but I trust the simplicity of the powers of 10 slightly more than all the fanciness going on under the hood to support arbitrary precision.
devbug has quit [Ping timeout: 260 seconds]
<Ox0deb> mg^: Put `TracePoint.new { |tp| p tp }.enable` at the top of your script. :)
<bnagy> I think it's worth clearly separating two problems -> "make the string "4.2" into "4.20"" and "handle currency correctly"
<bnagy> because 4.20 as a number is nonsense
<mg^> I'll write that down and do it tomorrow
IronD has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hxegon has quit [Ping timeout: 250 seconds]
solocshaw has joined #ruby
IronDicideth has quit [Ping timeout: 265 seconds]
Ebok has joined #ruby
<ModusPwnens> bnagy: Why is that nonsense?
mrdomino has left #ruby [#ruby]
<bnagy> because the number is 4.2
<ModusPwnens> Ox0deb: And yes. But to answer your question, the reason that I'm not representing it as an integer is because this is a client and our services represent them using BigDecimals.
<bnagy> right padding with zeros is to make columns line up, it has nothing to do with arithmetic
Guest86744 is now known as saneax
<ModusPwnens> bnagy: Agreed that it has nothing to do with arithmetic, but why does that make it nonsense?
joonty has joined #ruby
<bnagy> as a number it is nonsense. It is like calling 000 a number
<ModusPwnens> bnagy: I suppose that's true, but I want '4.20' which is a string, so as a string it's not nonsense. :/
<bnagy> and conflating presentation with values leads to pain
<eam> well, the real problem here is that 4.2 is presentation as well
<Ox0deb> >> c = 10050; '%d.%02d' % c.divmod(100) # Just throwing this out there.
<ruby[bot]> Ox0deb: # => "100.50" (https://eval.in/509149)
<eam> the actual values involved aren't base 10 in any of the cases
<eam> that's why there's an issue in the first place
devbug has joined #ruby
Pande has joined #ruby
ecksit_ has quit []
<ModusPwnens> Ox0deb: Yeah, couldn't you also do BigDecimal.new('100.5').to_s('F') + '0' if BigDecimal.new('100.5').modulo(0.1).zero?
<bnagy> ModusPwnens: so if you want a string that's right padded with zeros them manipulate strings
<bnagy> *then
<bnagy> because at least it's clear what you're doing
<Ox0deb> ModusPwnens: S'pose you could; does that not violate your aversion to wonkiness?
<ModusPwnens> Ox0deb: It totally does, which is why i'm here asking lol.
<bnagy> the units as dollars or cents is entirely a red herring
<eam> ModusPwnens: at the root of your issue is this: https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
<bnagy> because there will always be fractional units in anything but the most trivial system
pipework has joined #ruby
<Ox0deb> bnagy: How do you divide a US penny?
<bnagy> don't be dim
<eam> if you use a base-2 fractional value there will be some base 10 non-repeating values which cannot be represented (because they form repeating values in the other base)
joonty has quit [Ping timeout: 272 seconds]
<eam> for example the base 10 value 0.1 cannot be accurately represented in base 2
<Ox0deb> >> 0.1 + 0.2 # He's right!
<ruby[bot]> Ox0deb: # => 0.30000000000000004 (https://eval.in/509150)
<ModusPwnens> eam: Yeah, I'm familiar with the problems of floats. I just wish BigDecimal would preserve precision when calling to_s.
<eam> ModusPwnens: what you need is a string formatter that operates on BigDecimal natively
<Ox0deb> Which BigDecimal#to_s does.
<Ox0deb> It just does digit grouping instead of precision.
<bnagy> there's no difference in precision between 4.2 and 4.20 only in string length
Sucks has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
visudo has joined #ruby
ModusPwnens_ has joined #ruby
<ModusPwnens_> lame. I got kicked.
<ModusPwnens_> or something.
<craysiii> rvm vs rbenv
<bnagy> chruby
<eam> Ox0deb: but to_s "F" converts to Float
<eam> (or, is that true? does it?)
<ModusPwnens_> eam: what? to_s("f") converts to float?
usershell has joined #ruby
<eam> nevermind, to_s "F" should be fine
Sucks has joined #ruby
<Ox0deb> bnagy: You're right that "precision" isn't quite the right term, but it's become the standard as pertains formatting numbers. That can't be helped.
ellistaa has quit [Quit: ellistaa]
ModusPwnens has quit [Ping timeout: 252 seconds]
<eam> well, there is a difference in precision between 4.2 and 4.20 in some math contexts
rkazak has joined #ruby
RobertBirnie has joined #ruby
RobertBirnie has quit [Remote host closed the connection]
saneax is now known as saneax_AFK
<eam> speaking of inaccurate fractions, github's been claiming 91.3495% uptime for the last half hour or so
<bnagy> I don't agree, but I have zero motivation for pedantic bikeshedding that's irrelevant to the problem
<Ox0deb> It's unclear with what you disagree, but all right.
<eam> even though a half hour of downtime represents around 2% of today's total uptime
<bnagy> significant figures vs precision re 4.2 and 4.20
rkazak has quit [Excess Flood]
<eam> not to be even more pedantic, but bikeshedding is an argument over how best to do something. Not a quibble over a techincal definition
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
petricore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bnagy> s/not//
<eam> ;)
aryaching has quit [Read error: Connection reset by peer]
jam_ has joined #ruby
FooMunki has quit [Quit: FooMunki]
stannard has quit [Remote host closed the connection]
zambini has quit [Quit: Leaving.]
charliesome has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
saneax_AFK is now known as saneax
govg has quit [Ping timeout: 265 seconds]
<pipework> drbrain: troll
<pipework> olololol
<drbrain> it was too perfect
<drbrain> it even fit exactly 140 characters
hxegon has joined #ruby
<Ox0deb> Transposition error and all.
crdpink has joined #ruby
mfb2 has quit [Remote host closed the connection]
crdpink2 has quit [Ping timeout: 240 seconds]
kies^ has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
hololeap has joined #ruby
User458764 has joined #ruby
<hololeap> i've got a string that is a bunch of 2-digit hex representations of chars like "0a3f2d44". i'm using `hex.scan(/.{2}/).map {|s| s.to_i(16).chr }.join` to convert it to raw data. does anyone know how to accomplish this with String#unpack ?
JDiPierro has joined #ruby
<Ox0deb> hololeap: Sure do. And you can too! :)
yoongkang has joined #ruby
<Ox0deb> Nah, I gotchu; that interface is weird.
<Ox0deb> >> ['616263'].pack 'H*'
<ruby[bot]> Ox0deb: # => "abc" (https://eval.in/509151)
lemur has joined #ruby
<hololeap> oh its Array#pack that i want
colegatron_origi has quit [Ping timeout: 240 seconds]
<Ox0deb> Surprising, right? :/
<nofxx> Isn't H2 or 2H ? long time no pack/unpack
<Ox0deb> H*
IronD has quit [Ping timeout: 264 seconds]
<drbrain> H8 if it's always 8 hexadecimal characters
<drbrain> size follows format
<drbrain> >> ["0a3f2d44"].pack "H8"
<ruby[bot]> drbrain: # => "\n?-D" (https://eval.in/509152)
<hololeap> no its an arbitrary amount. H* is perfect
<drbrain> >> "0a3f2d44".scan(/.{2}/).map {|s| s.to_i(16).chr }.join
<ruby[bot]> drbrain: # => "\n?-D" (https://eval.in/509153)
Spleeze has quit [Ping timeout: 264 seconds]
jottr_ has joined #ruby
<hololeap> but now i'm confused as to the meaning of "pack" and "unpack"
govg has joined #ruby
<hololeap> how do you remember what each is used for?
dexter-tzu has quit [Ping timeout: 276 seconds]
Azure has quit [Quit: Oops.]
lemur has quit [Ping timeout: 240 seconds]
mfb2 has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hololeap> it doesn't even work with more than one string in an array
<hololeap> >> ['313233', '343536'].pack 'H*'
<ruby[bot]> hololeap: # => "123" (https://eval.in/509154)
<hololeap> weird design choices
<drbrain> hololeap: it's for working with C structs
yoongkang has quit [Ping timeout: 276 seconds]
jottr has quit [Ping timeout: 250 seconds]
<bnagy> >> ['313233', '343536'].pack 'H*H*'
<ruby[bot]> bnagy: # => "123456" (https://eval.in/509155)
<drbrain> I think of [] as the "struct" with a bunch of data fields
<hololeap> oh, funky
tildes has quit [Ping timeout: 264 seconds]
<drbrain> the format specifies what type each field is
<persistence> >> puts "test"
<hololeap> ok, that helps
<persistence> :(
shinnya has quit [Ping timeout: 240 seconds]
<drbrain> so .pack "packs" the array into "memory" and .unpack "unpacks" the data into a structure
<hololeap> cool
blackmesa has quit [Ping timeout: 240 seconds]
<Ox0deb> hololeap: What's your data, if you don't mind my prying?
<hololeap> raw packet data going to a Sonos speaker. i want to see if i can play it ;)
<drbrain> >> "123456".unpack 'H3H3'
<ruby[bot]> drbrain: # => ["313", "333"] (https://eval.in/509156)
<Ox0deb> Close enough.
<hololeap> but tshark wants to output it as ASCII hex instead of raw data
duderonomy has joined #ruby
<drbrain> hololeap: ah, yeah, this is exactly what pack/unpack is for
pawnbox has joined #ruby
maletor has joined #ruby
<Ox0deb> hololeap: Ah, well, there's https://github.com/dmendel/bindata if you're willing to pay the cost of declaring your interface to let the library work its magic.
Jardayn has quit [Quit: Leaving]
ModusPwnens_ has quit [Ping timeout: 252 seconds]
dexter-tzu has joined #ruby
<Ox0deb> Never mind. Missed that you basically only need H*.
maletor has quit [Read error: Connection reset by peer]
<hololeap> i doubt i will get it to work since i don't know the encoding format and there aren't any mp3/wav/etc headers
Spleeze has joined #ruby
<hololeap> but its worth a shot
UtkarshRay has quit [Remote host closed the connection]
<Ox0deb> $ dd if=/dev/urandom of=/dev/dsp
<Ox0deb> Great songs on that station.
Azure has joined #ruby
casadei has joined #ruby
<hololeap> lol
<toretore> that's how dubstep is made
pawnbox has quit [Ping timeout: 264 seconds]
<hololeap> its pretty sick. just needs lowpass + reverb
UtkarshRay has joined #ruby
mrsolo_ has quit [Quit: This computer has gone to sleep]
maletor has joined #ruby
colegatron_origi has joined #ruby
s00pcan has quit [Read error: No route to host]
s00pcan_ has joined #ruby
x77686d has joined #ruby
<Darmani> Ox0dea - Bro, you said the Ruby standard library has all the stuff you need to make a web scraper right? What are those libraries that I should study?
gbgdev has joined #ruby
s00pcan_ has quit [Remote host closed the connection]
asccigcc has quit [Quit: asccigcc]
<hololeap> Darmani: mechanize, selenium-webdriver, activerecord (for DB), celluloid (if you're brave)
s00pcan has joined #ruby
<Darmani> hololeap - Those are in the standard library?
<hololeap> Darmani: no those are all gems, most of them have docs/wiki on github
jam_ has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<Darmani> hololeap - Ah, okay. Thanks man ^^
<hololeap> Darmani: the ruby standard library has all the pieces you need, but frankly you'd be re-inventing the wheel a bit
<Darmani> hololeap - Oh yeah I know. But I'm pretty new to web scraping and I wanted to practice my Ruby skills so I felt it would be a good exercise.
Regulati_ has joined #ruby
symbol_ has joined #ruby
rsc___ has quit [Remote host closed the connection]
ESpiney has joined #ruby
hxegon has quit [Ping timeout: 245 seconds]
_djbkd has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hololeap> Darmani: it depends on how you want to do it, but you will likely need timers/events to throttle your scraper, and the best library i have found for that is celluloid. however, it basically forces you to understand and implement the Actor model which requires studying and outside-the-box thinking
<Darmani> hololeap - Oh this is my first web scraper... I'm sure I can eventually add more functionality to it. But for now I just want it to work you know? Haha
Bloomer has joined #ruby
<Darmani> Just like a simple one that finds some data and returns a boolean? Or like a number depending on what I'm searching for lol
<Ox0deb> So you're just scraping to be scraping...?
<hololeap> Darmani: mechanize uses nokogiri to parse the html, so that's a good place to start
jackjackdripper1 has quit [Quit: Leaving.]
<Darmani> Ox0dea - To practice and eventually get better... jerk ._.
<hololeap> Darmani: you can use xpaths/css paths to navigate and parse the html
<Darmani> hololeap - :o cool
rsc___ has joined #ruby
rsc___ has quit [Client Quit]
ElFerna has quit [Ping timeout: 250 seconds]
rsc___ has joined #ruby
mrsolo_ has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
cpup has quit [Ping timeout: 264 seconds]
JDiPierro has quit [Remote host closed the connection]
TheDracle has joined #ruby
pawnbox has joined #ruby
cpup has joined #ruby
TheDracle has quit [Client Quit]
emilford has quit [Ping timeout: 240 seconds]
B1n4r10 has quit [Ping timeout: 265 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
emilford has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
Musashi007 has quit [Client Quit]
Pande has quit [Ping timeout: 272 seconds]
Synthead has quit [Ping timeout: 265 seconds]
BlkDynmt has joined #ruby
iateadonut has joined #ruby
emilford has quit [Ping timeout: 265 seconds]
B1n4r10 has joined #ruby
visudo has quit [Quit: visudo]
paradisaeidae has joined #ruby
lektrik has joined #ruby
Brklyn has joined #ruby
Sucks has quit [Quit: No Ping reply in 180 seconds.]
Musashi007 has joined #ruby
<Darmani> Ox0deb - Just noticed you changed your name??
colegatron_origi has quit [Ping timeout: 250 seconds]
<Ox0deb> Darmani: Some fellow named kent appreciated the cookie I gave him and said `Ox0dea++`.
Sucks has joined #ruby
emilford has joined #ruby
<Ox0deb> Mind changing me back?
<Darmani> Ox0dea - What does that have to do with changing your name? o.o
<Ox0deb> Or not.
<Darmani> goddamnit see I still use your old name xD
Ebok has joined #ruby
<Darmani> How do I change you back? o.o
<Darmani> Ox0deb - Do I have to write a script for that?
terminalrecluse has joined #ruby
<Ox0deb> No, Ruby doesn't have in-place decrementation. :/
mrsolo_ has quit [Quit: This computer has gone to sleep]
B1n4r10 has quit [Ping timeout: 250 seconds]
<Darmani> :[
<Darmani> if "Ox0deb".exists? Ox0deb.replace("Ox0dea")
<Darmani> end
emilford has quit [Ping timeout: 240 seconds]
<Darmani> Lol
<Ox0deb> >> 'Ox0%x' % 0x0deb.pred
<ruby[bot]> Ox0deb: # => "Ox0dea" (https://eval.in/509163)
<Ox0deb> Or some such.
<Darmani> Ox0deb[5].replace("a")
<Ox0deb> >> 0x0deb[5] # wtf
<ruby[bot]> Ox0deb: # => 1 (https://eval.in/509164)
<Darmani> that should be the index of the last letter of your name Q.Q
mfb2 has quit [Remote host closed the connection]
<Darmani> oh wait.
Synthead has joined #ruby
<Darmani> Ox0den[-1].replace("a")
mfb2 has joined #ruby
<Darmani> something like that
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cihan has joined #ruby
<Ox0deb> >> String == Fixnum
<ruby[bot]> Ox0deb: # => false (https://eval.in/509165)
CihanKaygusuz has joined #ruby
B1n4r10 has joined #ruby
<Darmani> I give upp
<Darmani> its too hard.
<Nilium> The weight of the universe?
<Ox0deb> Leave OP's mom out of this.
<Darmani> is about two pounds.
emilford has joined #ruby
pawnbox has joined #ruby
<Darmani> C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- restclient (LoadError)
<Darmani> Ox0deb - Why bro. Why.
<Darmani> All I want to do is use the stupid restclient. Why does god hate me.
replay has quit []
<Ox0deb> Darmani: I don't love you/hate me enough to help you with Windows.
<Darmani> Lmaooo
<Ox0deb> Other than to gently prod you to upgrade.
freerobby has joined #ruby
<Darmani> To what??
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<Nilium> Dragonfly BSD.
<Ox0deb> Slackware.
Synthead has quit [Max SendQ exceeded]
<Nilium> I will agree with that.
<Darmani> what the fuck are those...?
Synthead has joined #ruby
<Darmani> Lol
<Nilium> Anyway, don't want to actually get into the haha-you-use-windows-man-you-should-switch thing
idefine has joined #ruby
<Ox0deb> We wouldn't have to if people didn't.
<Nilium> I'm in the "you can suffer on your own" camp
skade has joined #ruby
<Nilium> I don't need to tell them what to do
colegatron_origi has joined #ruby
DarkElement has joined #ruby
<Darmani> Ox0deb - This is a version of Linux... I think?
<Ox0deb> Darmani: Slackware? Yeah, but don't actually do that.
<Ox0deb> Gentoo and Slackware are distros for masochists.
emilford has quit [Ping timeout: 245 seconds]
<DarkElement> I have a ruby program that spawns child processes to do all it's stuff. How can I detect when they are all completed, i.e. no more ruby processes running on my machine?
<Nilium> Gentoo and Slackware are for people like me
<Nilium> Don't be people like me
<Darmani> Ox0deb - So what am I supposed to do then.....
<Darmani> Im so confused...
chouhoulis has quit [Remote host closed the connection]
<Ox0deb> Darmani: Are you married to Windows in any meaningful way?
<Ox0deb> Office being a hard requirement for something or something?
<Darmani> No?
f00dMonsta has joined #ruby
<Darmani> No...
<Nilium> I'm going to wager the problem is not Windows in this case but you being new to Ruby?
<Ox0deb> he doesn't have the development tools necessary to install a gem.
<Ox0deb> He needs Cygwin or the like.
<Nilium> Ah.
JDiPierro has joined #ruby
<Nilium> So it's got a shared library in there.
<Ox0deb> Oui.
<Ox0deb> Or, well, it wants to build one.
<Darmani> ...
Synthead has quit [Read error: Connection reset by peer]
<Nilium> Yeah. That's sort of a Windows problem, actually.
Synthead has joined #ruby
<Nilium> Like, you can get around it, Darmani, but it's a world of pain.
jbrhbr has quit [Quit: Leaving.]
<Nilium> Considered using an HTTP client that doesn't want a shared library?
Synthead has quit [Max SendQ exceeded]
<Darmani> wat
Synthead has joined #ruby
emilford has joined #ruby
ElFerna has joined #ruby
<Nilium> Is the gem you're trying to use required or just one you picked out because of the name?
<DarkElement> How can I get all ruby processes in terminal
<Nilium> How do you mean?
<Darmani> Nilium - It's not required. I'm going through a tutorial on web scraping and it was the one being used in the tutorial and I was trying to follow along...
<Darmani> And then I ran into the problem I'm faced with now
* Darmani sighs
<Nilium> K, you probably need to find a different one.
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
underplank has quit [Quit: underplank]
<Nilium> The one you're trying to use needs to be able to build a shared library (DLL), and very few people writing gems with C extensions assume you're on Windows
skade has quit [Ping timeout: 264 seconds]
<Nilium> The alternative is that you can just go ahead and grab VirtualBox, run Linux in it, and follow the tutorial there.
<Darmani> Nilium - Okay... I guess I need to find another gem that does the same thing. But I don't even know what the restclient is for so I need to find out what that does first...
<Nilium> It's an HTTP client.
<Nilium> Maybe with some weird special feature
<Darmani> Nilium - Lol I need to read up on what an http client is.
<Darmani> Forgive my noobishness T.T
<Nilium> Look at a URL in your browser
<Nilium> It probably starts with https:// or http://. HTTP is a protocol.
JDiPierro has quit [Ping timeout: 276 seconds]
ElFerna has quit [Ping timeout: 240 seconds]
skade has joined #ruby
<Darmani> a protocol...
<Nilium> Your browser is an HTTP client, it just does things with what it downloads.
<Darmani> :O
<Darmani> Really? That's what an HTTP client is?
<Nilium> An HTTP client is a thing that can send HTTP requests and maybe read HTTP responses
emilford has quit [Ping timeout: 265 seconds]
<Darmani> That's so cool. I had no idea.
<Nilium> The browser just does things with the response.
<Nilium> Which is simplifying a very, very complicated thing.
<Darmani> So the "restclient" is just like a parser for a code-based http client?
<Nilium> https://en.wikipedia.org/wiki/Representational_state_transfer ← REST clients are just things that behave like that.
<Ox0deb> DarkElement: `pgrep ruby`
<Nilium> And usually using HTTP.
<Nilium> Anyway, you're probably in over your head, so you're just going to have to learn a lot of stuff as you go.
<Darmani> Nilium - No doubt. Thanks for the info though that was really helpful.
emilford has joined #ruby
ccowart has quit [Ping timeout: 245 seconds]
<Ox0deb> It all starts with the realization that the Internet is, in fact, a series of tubes.
<Nilium> And the disappointing realization that sharks do not appear to actually try to bite the tubes.
<Ox0deb> Can't eat lie unless you're a plant.
<Ox0deb> *light
<Nilium> At least not commonly.
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
wheresmyjetpack has joined #ruby
<Darmani> Ox0deb - The internet is a series of tubes o.o
<Ox0deb> Darmani: Aye, this message brought to you by optical fiber.
<Darmani> I will meditate on that. Lol
<Ox0deb> It's deep shit.
<Ox0deb> (Because undersea cables.)
<Darmani> kek
skade has quit [Ping timeout: 276 seconds]
Napear has joined #ruby
mostlybadfly has joined #ruby
<Ox0deb> Fun fact: the state of the art in cryptographic hashing is called Keccak.
<Darmani> cryptowhatnow.
<Darmani> That doesn't sound like fun lol
* Nilium wanders off to get some leftover mac 'n' cheese.
Napear has quit [Client Quit]
visudo has joined #ruby
ur5us_ has quit [Remote host closed the connection]
<Darmani> Nilium - Thank you kind sir. You are a gentleman and a scholar<3
emilford has quit [Ping timeout: 265 seconds]
<Nilium> Neither of those are true but I'll take it.
<Darmani> Lol
agent_white has quit [Quit: backinabite]
Napear has joined #ruby
skade has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Darmani> Ox0deb - I'm kind of scared to use gems D:
emilford has joined #ruby
graphettion has joined #ruby
<Ox0deb> Darmani: Have you installed... any?
<Darmani> Ox0deb - No ._.
<Ox0deb> Wat.
snguyen has quit [Read error: Connection reset by peer]
<Nilium> I'd suggest installing mine but they're all mostly written in C.
<Nilium> And useless to sane people.
<Nilium> And most insane people too.
<Darmani> Nilium - lmao
<Darmani> Ox0deb - There's so many... I mean and I haven't made anything complex anyway. I wouldn't know what to downlaod.
<Nilium> Thankfully I haven't done anything quite that odd.
<Ox0deb> Darmani: Try installing unicode_snowman.
<Nilium> Did write OpenGL bindings though
<Ox0deb> Just to get a feel for the thing.
<Darmani> unicode_snowman o.o
<Nilium> I should see if the GL bindings still work..
<Ox0deb> Which ABI did you write them against?
joonty has joined #ruby
<Darmani> adaedra wrote that????
<Ox0deb> That he did.
<Darmani> It seems simple... Do you really want me to download it? What does it do?
<Ox0deb> I'm trying to cure you of your fear of using gems.
<Darmani> ah.
<Darmani> I guess that's a good place to start as any.
emilford has quit [Ping timeout: 264 seconds]
<Darmani> 1 gem installed.
<Darmani> yay.
<Darmani> I did it.
frem has quit [Quit: Connection closed for inactivity]
gbgdev has quit [Remote host closed the connection]
<Ox0deb> Did you get a binary?
<Ox0deb> *executable
<Darmani> I don't know what that means.
<Ox0deb> Are you at a command prompt?
<Darmani> I was... I ran gem installed unicode_snowman
<Darmani> install*
<Ox0deb> And now try running unicode_snowman.
joonty has quit [Ping timeout: 276 seconds]
<Darmani> in a script?
<Ox0deb> Nope. Right there at the command prompt.
emilford has joined #ruby
<Darmani> howtodothat.jpg
braincrash has quit [Quit: bye bye]
<Ox0deb> justrunit.bpg
<Radar> ^
<Radar> type unicode_snowman
<Radar> hit enter
<Radar> there is no stpe 3
<Darmani> oh.
<Darmani> nothing happens... a tiny little square appears.
<Darmani> I'm guessing thats the snowman.
<Nilium> Just runit? http://smarden.org/runit/
<Ox0deb> Those two statements conflict.
<Ox0deb> Nilium: You use runit, don't you?
<Darmani> a tiny square appears -__-
<Radar> Ox0deb: Darmani's on windows so he probably doesn't have unicode yet.
<Nilium> I do, but only to do some unpleasant things inside Docker containers
<Radar> Darmani: Congratulations it works. Now go install more gems.
<DarkElement> How can I replace one line of a file with ruby
<Darmani> Does everyone hate Windows?? What's so bad about it???
<Ox0deb> Can you hear me?
sakix has quit [Ping timeout: 276 seconds]
<Radar> Darmani: You're experiencing what is bad about it.
<Ox0deb> ^
<Radar> Darmani: Ruby is hard on Windows.
<Radar> DarkElement: Which line?
* Darmani sighs
<DarkElement> Radar, the second.
<Ox0deb> "I can't install this." "I can't see the expected output."
yfeldblum has quit [Remote host closed the connection]
<Darmani> Ox0deb - okay point taken...
<Darmani> But that shit happens to everyone.
<Darmani> not just me.
<Radar> Darmani: Yes, everyone on Windows.
<Nilium> Darmani: It's fine to use if you're not doing dev work or using Microsoft's dev environments, but it's hard to work with otherwise.
<Ox0deb> Darmani: This is you: http://i.imgur.com/kJscbmh.png
treaki__ has joined #ruby
<Darmani> I've seen that lol
<Radar> DarkElement: lines = File.readlines("file.txt"); lines[1] = "something else"; File.open("file.txt", "w+") { |f| f.write(lines.join("\n") }
<Ox0deb> Darmani: That dog used to use Windows.
zast has joined #ruby
<Nilium> I had that on a projector during a deployment one night.
<Darmani> Ox0deb - So what should I be using then? For real??
<DarkElement> Radar, ah, alright
sakix has joined #ruby
<Radar> Darmani: Ubuntu would be a good alternative.
<Ox0deb> Darmani: Some hand-holdy Linux distribution.
<Darmani> you're hand holdy
devbug_ has joined #ruby
* Nilium uses OS X but not everyone likes to talk about this.
<Darmani> Radar - That looks really nice... Is it easy to setup?
freerobby has quit [Quit: Leaving.]
emilford has quit [Ping timeout: 240 seconds]
treaki_ has quit [Ping timeout: 240 seconds]
<Ox0deb> Dem popularity numbers doe.
devbug has quit [Ping timeout: 256 seconds]
arup_r has joined #ruby
<Darmani> Ox0deb - I'll use whatever you guys suggest
lessless has joined #ruby
<Radar> Darmani: Yes it is really easy to setup.
yfeldblum has joined #ruby
* Nilium won't suggest anything because he's a mean trickster god.
<Nilium> Ask Nil for advice, boom: you're running plan 9
<Ox0deb> Where *everything* is a file.
<Nilium> Which is not a thing I'm opposed to
<Ox0deb> Plan 9 : files :: Ruby : objects
<Nilium> But Plan 9 is also very much not happening anymore so I'll just wait for someone else to do it.
<Darmani> Radar - Well it's downloading... I guess I need an disc-mounter and it should install on it's own?
<Ox0deb> Darmani: You're gonna have to boot into it.
<Radar> ^
<Ox0deb> This is the hardest part.
<Nilium> Darmani: Do you have any other computers?
braincrash has joined #ruby
braincrash is now known as braincras
<Darmani> like 7 or 8...
dseitz has joined #ruby
<Ox0deb> Darmani: Do you own an Android phone?
<Darmani> yeah.
s2013 has joined #ruby
<Nilium> Probably install it on a different computer than you main one at first.
<Ox0deb> Darmani: Use DriveDroid.
<Nilium> Just so you can run through it, 'cause you're probably going to end up wiping your hard drive in the process.
<Ox0deb> Stop listening to these people.
sakix has quit [Ping timeout: 245 seconds]
<Darmani> ??????????????/
s2013 has quit [Max SendQ exceeded]
<Darmani> Too many people
<Ox0deb> You can boot Ubuntu from your phone.
<Darmani> talking.
Napear has quit [Changing host]
Napear has joined #ruby
<Darmani> So... boot it from my phone? Ox0deb?
<Ox0deb> No.
<Radar> ?popcorn
<ruby[bot]> It's popcorn time!
<lessless> hello folks! looking for most elegant solution for the following problem: there is a hash {"description"=>"Amazing stuff", "grand_prize"=>"Pinguin's King Crown", "location"=>"North Pole"}, which keys are supposed to be a RoR model attributes (Other class methods). And the task is to gather current values of those attributes which is pretty simple with Hash[*new_values.keys.flat_map { |attr| [attr, draft.public_send(attr)] }] except some keys are not str
<lessless> ictly mapped to the method names
skade has quit [Ping timeout: 240 seconds]
<Radar> lessless: input + expected output please.
<lessless> for example grand_prize should be prize_details
<Nilium> Also, strike "elegant" and just pick pragmatic.
<lessless> Nilium, makes sense
<Ox0deb> Oh, never mind.
<Nilium> Map of keys to method names and just define all of them?
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Darmani> Maybe I'll just ask my dad when he gets home. He works for Oracle he should know...
Napear has quit [Quit: leaving]
<Nilium> You are a terrifying person.
Napear has joined #ruby
<lessless> Haha, that was good :)
maneco has quit [Quit: maneco]
workmad3 has quit [Ping timeout: 240 seconds]
<Radar> Darmani comes in tomorrow "Why can't I run Ruby on this Sun system that my dad setup?"
usershel_ has joined #ruby
<hololeap> jruby
<drbrain> I don't think there is a solaris maintainer, but maybe for a 1.8 release?
<Ox0deb> Ha.
<drbrain> AIX, on the other hand, does have an active maintainer
<Ox0deb> I've noticed that.
<Darmani> Radar - Sun system? No I was gonna ask him to help me boot into that Ubuntu download o.o
<drbrain> so they may just need a better dad
usershell has quit [Ping timeout: 276 seconds]
<drbrain> I have gathered there's a Japanese company that runs ruby on AIX for doing something rather important
<arup_r> lessless: Why that big expression, something like model.attributes.slice(attr_names) wouldn't work for you.
<arup_r> ?
zast has left #ruby [#ruby]
<Ox0deb> Darmani: You just download the ISO, put it on your phone, tell DriveDroid to host it, plug your phone into your computer, reboot, press whatever key to get into your BIOS, tell it to boot from your phone, and you're golden.
<Nilium> I want a SPARC machine.
<Nilium> Is that wrong?
<Darmani> Alrightt. I'm done for today. I'm tired. I'm
<Nilium> I think it's wrong.
<Darmani> whoops.
workmad3 has joined #ruby
<Darmani> Ox0deb - Okay sirr. I will do that tomorrow.
<Darmani> Goodnight you beautiful people.
<Ox0deb> Roger, dodger.
<Ox0deb> <3
<Darmani> <33
Darmani has quit [Quit: Page closed]
<Nilium> Ox0deb: So was that just you talking to yourself?
<Ox0deb> When was that?
<Nilium> Nothing.
* Nilium ponders how he could get a SPARC system.
B1n4r10 has quit [Ping timeout: 264 seconds]
jbrhbr has joined #ruby
usershel_ has quit [Remote host closed the connection]
<lessless> arup_r, some of them are hidden via store_accessors
<lessless> but thank you for the tip
<lessless> *hidden behind
rsc___ has quit [Quit: rsc___]
jam_ has joined #ruby
kp666 has joined #ruby
DLSteve has joined #ruby
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
<Ox0deb> drbrain: `hash[*keys] = *values` is pretty much a non-starter, yeah?
baweaver has joined #ruby
<Ox0deb> It'd be really nice, but Ruby's "lack" of Perl's contexts does seem to make it impossible to get right in the general case.
<drbrain> yeah, because Hash#[] only takes two arguments
Musashi007 has quit [Quit: Musashi007]
<drbrain> err, []=
arup_r has quit []
<Ox0deb> Sure, I was talking about fixing that. :)
jbrhbr has quit [Ping timeout: 260 seconds]
jbrhbr1 has joined #ruby
douglass_ has quit [Ping timeout: 265 seconds]
dcunit3d has joined #ruby
Brklyn has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
<droptone> Question: Is there any technology available for porting my Centos-based Ruby 2.2.x code to run on Windows 10?
<droptone> The web is undecided on a stock solution.
chouhoulis has joined #ruby
tildes has joined #ruby
symbol_ has quit [Ping timeout: 245 seconds]
dcunit3d has quit [Quit: WeeChat 1.3]
<Ox0deb> There's also OCRA if you're only targeting Windows: http://ocra.rubyforge.org/
dcunit3d has joined #ruby
dexter_ has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.3]
chouhoulis has quit [Ping timeout: 276 seconds]
dexter-tzu has quit [Read error: Connection reset by peer]
janoti has joined #ruby
B1n4r10 has joined #ruby
Sucks has quit [Read error: Connection reset by peer]
wilbert_ has joined #ruby
govg has quit [Ping timeout: 250 seconds]
casadei has quit [Remote host closed the connection]
renderfu_ has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 276 seconds]
petricore has joined #ruby
jbrhbr1 has quit [Quit: Leaving.]
wheresmyjetpack is now known as youch
skcin7 has joined #ruby
DLSteve has quit [Quit: Textual IRC Client: www.textualapp.com]
toretore has quit [Ping timeout: 260 seconds]
gix has joined #ruby
B1n4r10 has quit [Read error: Connection reset by peer]
Brklyn has joined #ruby
psy has quit [Ping timeout: 256 seconds]
jcdesimp has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
Regulati_ has quit [Read error: Connection reset by peer]
RegulationD has joined #ruby
asccigcc has joined #ruby
dc1 has joined #ruby
pawnbox has quit [Remote host closed the connection]
Brklyn has quit [Ping timeout: 240 seconds]
dc1 has quit [Client Quit]
moei has quit [Quit: Leaving...]
harly_ has quit [Quit: Leaving]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Abrin2 has joined #ruby
harly has joined #ruby
toretore has joined #ruby
dc1 has joined #ruby
* harly wipes sweat.
<harly> chapter 12 of r4ia
<harly> bit of a marathon!
<harly> hey this isn't rails
Abrin has quit [Ping timeout: 240 seconds]
dcunit3d has quit [Quit: WeeChat 1.3]
dc1 has quit [Client Quit]
dcunit3d has joined #ruby
pdoherty has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
dfockler has quit [Ping timeout: 240 seconds]
Cihan has quit []
dcunit3d has quit [Client Quit]
CihanKaygusuz has quit []
dcunit3d has joined #ruby
astrobun_ has joined #ruby
<pantato> so I broke my selenium-webdriver gem somehow =|
<harly> how so?
<pantato> keep getting ERROR: Failed to build gem native extension.
emilford has joined #ruby
skade has joined #ruby
B1n4r10 has quit [Quit: Lost terminal]
<ruby[bot]> pantato: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/7f2a2be7aa89a909c4a4
<ruby[bot]> pantato: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<pantato> woops.
kennyfrc has joined #ruby
CihanKaygusuz has joined #ruby
Cihan has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
<hololeap> pantato: bundle exec rspec tests/create.rb ?
<Ox0deb> pantato: Wrong gist?
ruby-lang980 has joined #ruby
sakix has joined #ruby
<pantato> hololeap: that yields "Could not locate Gemfile or .bundle/ directory"
<hololeap> pantato: just a guess
emilford has quit [Ping timeout: 276 seconds]
youch has quit [Ping timeout: 272 seconds]
<cscheib_> so... I've got a new environment I need to test my ssh login(s) for, and don't know which login goes with which client... I wanna do a big loop and use net-ssh, try each user/password combo, and return the results as CSV. I'm trying specifically to figure out how to fail a session immediately if the password fails (i.e. only try once) - it keeps popping up a password dialogue instead... anyone know how to ensure auth is only attempted once and then fails
<pantato> Ox0deb: right gist. i get this if i try installing it
ruby-lang980 has quit [Client Quit]
<cscheib_> if there's a better tool that already exists for this, I'm all ears
<cscheib_> (just trying to get sh*t done in this instance, versus trying to learn anything - time constraints and all)
govg has joined #ruby
<Ox0deb> pantato: The gem_make.out file should tell you what extconf.rb failed to link.
govg is now known as Guest50255
<Ox0deb> The problem was the ffi gem, so it might be some kind of ABI mismatch.
skade has quit [Read error: Connection reset by peer]
sakix has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
emilford has joined #ruby
<hololeap> cscheib_: not sure, but maybe net-ssh-multi would work better for you
<harly> pantato: what OS are you running?
<cscheib_> hololeap: I'll take a look
arup_r has joined #ruby
<pantato> ubuntu 14.04
sigurding has joined #ruby
cajone_afk is now known as cajone
rsc___ has joined #ruby
<harly> pantato, what does dpkg -s libqtwebkit-dev say?
emilford has quit [Ping timeout: 250 seconds]
<pantato> not installed
<pantato> shall i install it?
<harly> pantato, i'd suggest: sudo apt-get install libqt4-dev libqtwebkit-dev
<harly> then try the gem install again.
<pantato> god i love having an ssd
<pantato> i don't know how people live without these things
<harly> they're awesome eh?
<pantato> same error
<pantato> :\
<harly> how about dpkg -s build-essentials
<harly> how about dpkg -s build-essential
<harly> no s.
sakix has joined #ruby
<pantato> i should probably note i installed ruby with rvm
<harly> yeah, these are supporting requirements though
<harly> for those gems that compile their own stuff
emilford has joined #ruby
cschneid_ has quit [Remote host closed the connection]
renderfu_ has joined #ruby
<cscheib_> hololeap: think I may have a solution, but I'll have to track it down a bit further. Looks like openssh has a "batchmode" parameter that I should hopefully be able to pass it
<hololeap> cscheib_: you could also use a brute-forcing tool like medusa
<harly> pantato, https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit lists suggested packages for meeting capybara-webkit compiling requirements.
usershell has joined #ruby
<harly> sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
<harly> i do find it odd that you said you broke it, suggesting it was working fine earlier?
emilford has quit [Ping timeout: 260 seconds]
<pantato> it was like working in one of my terminals last night (not for all)
consti has joined #ruby
<pantato> then i booted up my comp today and like a noob tried to replicate my steps in getting it to work last night
<pantato> and i just made it all bad
<pantato> it's a bad time
<harly> well. install those packages and try again :)
<pantato> i did
<pantato> didn't work
astrobun_ has quit [Remote host closed the connection]
<harly> are you using the same rbenv?
<pantato> i think i may ahve upgraded from 1.9 to 2.2
<pantato> how do i just completely start over ?
<pantato> lol
<pantato> remove rvm, gem, all ruby packages
<pantato> or rather, should I
<havenwood> pantato: rvm implode
<harly> in rbenv? dunno. i use chruby :) hit up google. but you'll probably get the same problem.
<pantato> lol
<harly> ^
<havenwood> pantato: that's the actual command >.>
moeabdol has quit [Ping timeout: 240 seconds]
<harly> whe you had it working in one terminal do you remember setting PATH or installing anything in your user space?
<havenwood> pantato: What's not working?
emilford has joined #ruby
<pantato> ok, next question, should i install rvm as sudo/root or as my main user?
<harly> gem install selenium-webdriver: The compiler failed to generate an executable file. (RuntimeError)
<harly> You have to install development tools first.
<havenwood> pantato: Without sudo as a non-root user.
<pantato> harly: i did that too
<pantato> =\
<pantato> alright
<pantato> starting over from square one
<pantato> most definitely have that
avenj has quit [Ping timeout: 250 seconds]
colegatron_origi has quit [Ping timeout: 264 seconds]
<harly> you can look in mkmf.log too...
wilbert_ has quit [Quit: quit]
<harly> might have better info that "you have to install development tools first"
emilford has quit [Ping timeout: 240 seconds]
skade has joined #ruby
<havenwood> pantato: What OS/distro? Have dev tools installed?
<havenwood> ah, i see x86_64-linux
<pantato> so i can't get gems without 2.2.3 ? I just installed 2.2.4
<pantato> it says i need 2.2.3
petricore has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> pantato: rvm --default 2.2.4
<havenwood> pantato: rvm list
<havenwood> pantato: rvm help requirements
<pantato> oh oh oh i see when i do rvm install ruby-2.2-dev it doesn't include the main ruby package
<havenwood> +1 chruby
<harly> +2 chruby
<Radar> pantato: rvm implode --force
<Radar> pantato: what OS?
<harly> (or ruby-install, in this case)
<pantato> ubuntu 14.04
emilford has joined #ruby
astrobun_ has joined #ruby
<Radar> pantato: Run that command I showed you, then follow this guide; http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you//
tildes has quit [Ping timeout: 272 seconds]
mfb2 has quit [Remote host closed the connection]
ur5us has joined #ruby
h99h9h88 has joined #ruby
oivoodoo has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
<pantato> compiling
<pantato> brings me back to all that time i wasted on gentoo
<pantato> :P
<pantato> thanks for your help guys
dexter_ has quit [Ping timeout: 250 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cohedrin has joined #ruby
colegatron_origi has joined #ruby
<Radar> pantato: is ok
dexter_ has joined #ruby
oivoodoo has quit [Remote host closed the connection]
emilford has joined #ruby
h99h9h88 has quit [Quit: Leaving...]
aryaching has joined #ruby
asccigcc has quit [Quit: asccigcc]
<pantato> Radar: I followed that guide, but when i tried to run gem install , it still wanted me to apt-get install ruby
oivoodoo has joined #ruby
<Radar> pantato: "which ruby" shows what?
<pantato> i should like, not do that right?
lxsameer has joined #ruby
<pantato> Radar: nada
<Radar> Yeah, please don't apt-get.
<Radar> Big heading at the top of the post about why not.
<Radar> pantato: contents of ~/.bashrc?
emilford has quit [Ping timeout: 240 seconds]
<lessless> Guys, another one: give an AR model Location with attributes `region` and `country`, what is the most pragmatic way to return either "#{main_location.region}/#{main_location.country}" if both of them are present or just the one that is isn't nil in other case?
<Radar> pantato: Did you load a new terminal?
<pantato> no!!!
<lessless> Right now I have https://gist.github.com/lessless/6ee4b161b88881534a7a but it feels tedious
<pantato> Radar: same issue
joonty has joined #ruby
<Radar> pantato: no errors?
<Radar> pantato: do you have a file called ~/.ruby-version?
<pantato> negative
ss_much has joined #ruby
<Radar> pantato: There we goooo. That's the step you misse.d
<Radar> pantato: Create one and put this content in it: ruby-2.2.3
<Radar> then restart your terminal again and I think it might work
<pantato> what do you mean "put this content in it" ?
workmad3 has quit [Ping timeout: 250 seconds]
<pantato> like touch .ruby-version/ruby-2.2.3 ?
emilford has joined #ruby
<pantato> erm
<pantato> nvm
<harly> echo 'ruby-2.2.3' > .ruby-version
<pantato> right.
<pantato> brain fart
<pantato> ofmg it's installing it
<pantato> it's gonna work
<pantato> sadnasdjklnhj
<Radar> pantato: Did it work?
<pantato> yeah but rspec isn't installed yet :P
<pantato> it did <3 <3 <3
maletor has quit [Quit: Computer has gone to sleep.]
<harly> progress!
<Radar> great :)
Puffball has quit [Remote host closed the connection]
<pantato> IT'S ALIVE!!!
joonty has quit [Ping timeout: 245 seconds]
<Radar> Another convert to the church of chruby.
<harly> all praise postmodern
<Radar> may he live forever (to maintain the project into eternity)
Puffball has joined #ruby
karapetyan has joined #ruby
emilford has quit [Ping timeout: 264 seconds]
<Radar> Updated that post for 2.3.0 now.
<Radar> 2.2.3 will work just fine.
<havenwood> Radar: an update to ruby-install 0.6.0 would give it some longevity with versions with: ruby-install --latest ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<Radar> havenwood: oooh
sdothum has joined #ruby
<Radar> TBH I am totally not offended that these have not become the official guides on how to install on Ubuntu + Mac.
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilford has joined #ruby
<Radar> it is done
yoongkang has joined #ruby
anisha_ has joined #ruby
emilford has quit [Ping timeout: 260 seconds]
yoongkang has quit [Ping timeout: 256 seconds]
<hololeap> i keep telling this kid that he should learn ruby as his first language, but he insists on learning php because there's "more jobs"
karapetyan has quit [Remote host closed the connection]
<baweaver> Sometimes you let them fall off their cliff, wait for the splat, and yell after them:
<baweaver> I tooooooooold you soooooooo
emilford has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<hololeap> or they learn bad programming and never recover
<baweaver> no language will precent that
<baweaver> prevent*
Napear has quit [Quit: leaving]
sigurding has quit [Quit: sigurding]
emilford has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Remote host closed the connection]
dasboot has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 44.0/20160123151951]]
<hololeap> ruby as a first language can teach some bad habits, but not as many as php
wldcordeiro has quit [Ping timeout: 276 seconds]
emilford has joined #ruby
<baweaver> The only surefire way to teach them right is to have someone with more experience guide them
<baweaver> past that, they're going to learn bad habits, and that's ok
<hololeap> yeah
<baweaver> look back at code you wrote last year
<baweaver> you'll probably cringe
<hololeap> i wonder how i would of fared if i had learned haskell as my first language...
<baweaver> heck, for me it takes maybe a week.
<baweaver> I was bored once, so I tried an experiment
<baweaver> I taught various people different starting languages
<baweaver> Haskell, Java, C#, Ruby, Python, and Scala
<baweaver> The Java person quit within a day, the C# not long after
<baweaver> Ruby and Python were decent programmers by the end of it
<baweaver> Haskell though, that one took off like you wouldn't believe
ur5us has quit [Remote host closed the connection]
<baweaver> then again he was already a genius so any language I picked would have done the same
<baweaver> Though I find Java and C# tend to scare people off
<baweaver> C++ and C as well
<hololeap> i think that functional programming matches real-life better than imperative programming, but if you start out with imperative it takes some effort to switch your way of thinking
<baweaver> anyways, long story short it didn't matter the language they started on. If they were good they were good.
emilford has quit [Ping timeout: 240 seconds]
usershell has quit [Remote host closed the connection]
karapetyan has joined #ruby
<baweaver> Ruby happens to be in the middle so I tend towards it a lot for intros
<hololeap> java and c# suck as starter languages because it's hard to make something simple without running into cryptic compiler errors
<hololeap> it kind of scares you off from the get-go
lurch_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
maletor has joined #ruby
<hololeap> that's cool though, how did the scala one fare?
<baweaver> I think he's a data scientist now
<hololeap> nice
* baweaver checks
<baweaver> yep, looks like it
emilford has joined #ruby
lektrik has quit [Ping timeout: 256 seconds]
duper has quit [Ping timeout: 265 seconds]
ElSif has quit [Read error: Connection reset by peer]
<hololeap> sometimes i feel like ruby's metaprogramming hurts more than it helps
<hololeap> since its hard to document dynamically-created methods and the like
<hololeap> looking at the rails code base hurts my brain most of the time
skcin7 has quit [Max SendQ exceeded]
oivoodoo has quit [Remote host closed the connection]
<baweaver> I tend to tell newbies to avoid it
emilford has quit [Ping timeout: 276 seconds]
amclain has quit [Quit: Leaving]
<baweaver> you can't think of something in a meta-sense until you understand it in a normal one first
skcin7 has joined #ruby
arup_r has quit []
treaki has joined #ruby
oivoodoo has joined #ruby
solars has joined #ruby
yfeldblum has joined #ruby
weemsledeux has joined #ruby
sakix has quit [Ping timeout: 265 seconds]
<hololeap> i have yet to find a difinitive guide on metaprogramming best-practices
<hololeap> but i guess there could be quite a few different schools of thought on that topic
emilford has joined #ruby
akem has joined #ruby
blackgoat has quit [Quit: WeeChat 1.3]
<baweaver> my definitive guide so far: don't
GinoManWorks_ has joined #ruby
<baweaver> there's almost always a cleaner, simpler, and easier to understand way of doing it.
<hololeap> that's pretty much what i learned
janoti has quit [Ping timeout: 240 seconds]
wldcordeiro has joined #ruby
GinoManWorks has quit [Ping timeout: 265 seconds]
emilford has quit [Ping timeout: 250 seconds]
dcunit3d has quit [Quit: WeeChat 1.3]
amoeba has quit [Quit: Leaving]
blackgoat has joined #ruby
<hololeap> any word on when ruby 3.0 will come out?
kalopsian has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
<hololeap> i like that they are making strings immutable by default
scepticulous has joined #ruby
emilford has joined #ruby
BSaboia has joined #ruby
solocshaw has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby
<baweaver> Not a clue
<baweaver> Lot of talk, little followup
idefine has quit [Remote host closed the connection]
<havenwood> hololeap: 2020
rsc___ has quit [Quit: rsc___]
oivoodoo has quit [Remote host closed the connection]
_ht has joined #ruby
usershell has joined #ruby
<baweaver> they want to have a clear vision of ruby first
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 240 seconds]
olspookishmagus has quit [Quit: All for nothing]
UtkarshRay has joined #ruby
scepticulous has quit [Remote host closed the connection]
graphettion has quit [Ping timeout: 256 seconds]
emilford has joined #ruby
scepticulous has joined #ruby
stevemackinnon has quit [Remote host closed the connection]
devbug has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
SOLDIERz has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
emilford has quit [Ping timeout: 245 seconds]
chipotle has joined #ruby
akem has quit [Remote host closed the connection]
persistence has quit [Ping timeout: 240 seconds]
jgpawletko has quit [Ping timeout: 256 seconds]
scepticulous has quit [Read error: Connection reset by peer]
scepticulous has joined #ruby
akem has joined #ruby
yoongkang has joined #ruby
akem has quit [Remote host closed the connection]
devbug has quit [Ping timeout: 250 seconds]
emilford has joined #ruby
visudo has quit [Quit: visudo]
skade has quit [Ping timeout: 276 seconds]
mytrile has joined #ruby
mytrile has left #ruby [#ruby]
ramfjord has joined #ruby
akem has joined #ruby
yoongkang has quit [Ping timeout: 265 seconds]
tvw has joined #ruby
skade has joined #ruby
joonty has joined #ruby
elifoster has joined #ruby
emilford has quit [Ping timeout: 272 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
skade has quit [Client Quit]
PedramT has joined #ruby
kennyfrc has quit [Ping timeout: 250 seconds]
kerunaru has joined #ruby
Waheedi has quit [Quit: Waheedi]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DarkElement has quit [Remote host closed the connection]
montagne_goat has joined #ruby
Cohedrin has joined #ruby
haraoka has joined #ruby
emilford has joined #ruby
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Abrin2 has quit [Ping timeout: 250 seconds]
Abrin has joined #ruby
duncannz has joined #ruby
arup_r has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
piotrj has joined #ruby
emilford has quit [Ping timeout: 240 seconds]
darkf has joined #ruby
workmad3 has joined #ruby
pawnbox has quit [Remote host closed the connection]
Abrin has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
scepticulous has quit [Ping timeout: 240 seconds]
Guest50255 has quit [Ping timeout: 265 seconds]
emilford has joined #ruby
avenj has joined #ruby
avenj has quit [Changing host]
avenj has joined #ruby
aganov has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duncannz has quit [Remote host closed the connection]
rsc___ has joined #ruby
bahar has quit [Ping timeout: 272 seconds]
duncannz has joined #ruby
sandstrom has joined #ruby
piotrj_ has joined #ruby
emilford has quit [Ping timeout: 276 seconds]
piotrj has quit [Read error: Connection reset by peer]
piotrj_ has quit [Read error: Connection reset by peer]
piotrj has joined #ruby
Burgestrand has joined #ruby
<solars> quick question, I've got a problem with html I'm fetching with nokogiri, if I output it with .to_html, UTF8 is not properly encoced, I only get these ?? suddenly. doc.to_html(encoding: 'UTF-8').force_encoding("UTF-8") also does not work.. does anyone know what causes this?
ohaibbq has joined #ruby
mdw has joined #ruby
emilford has joined #ruby
firstdayonthejob has joined #ruby
sakix has joined #ruby
rsc___ has quit [Quit: rsc___]
Abrin has joined #ruby
devbug has joined #ruby
andikr has joined #ruby
rsc___ has joined #ruby
emilford has quit [Ping timeout: 240 seconds]
BSaboia has quit [Quit: Leaving]
mfb2 has joined #ruby
dexter_ has quit [Ping timeout: 245 seconds]
sakix has quit [Ping timeout: 272 seconds]
govg has joined #ruby
solars has quit [Ping timeout: 250 seconds]
codecop has joined #ruby
RegulationD has quit [Ping timeout: 272 seconds]
PedramT has quit [Remote host closed the connection]
emilford has joined #ruby
PedramT has joined #ruby
pawnbox has quit [Remote host closed the connection]
PedramT has quit [Remote host closed the connection]
pawnbox has joined #ruby
PedramT has joined #ruby
mfb2 has quit [Ping timeout: 276 seconds]
dexter_ has joined #ruby
jbrhbr has joined #ruby
howdoi has joined #ruby
Brklyn has joined #ruby
dionysus69 has joined #ruby
xsdg_ is now known as xsdg
emilford has quit [Ping timeout: 250 seconds]
montagne_goat has quit [Quit: Leaving...]
juddey has quit [Ping timeout: 260 seconds]
postmodern has joined #ruby
joonty has quit [Ping timeout: 272 seconds]
john has joined #ruby
<john> i need some help regarding ruby threading.
Brklyn has quit [Ping timeout: 250 seconds]
emilford has joined #ruby
john is now known as Guest77742
_djbkd has quit [Quit: My people need me...]
vondruch has joined #ruby
gbgdev has joined #ruby
<Guest77742> I have a shared variable which is written in one thread, while read in the other thread. Do I still need to have Mutex when this variable is accessed?
G is now known as Nigel
gagrio_ has joined #ruby
LoganG has quit [Ping timeout: 250 seconds]
govg has quit [Ping timeout: 256 seconds]
mdw has quit [Ping timeout: 245 seconds]
x77686d has quit [Quit: x77686d]
elifoster has quit [Ping timeout: 250 seconds]
emilford has quit [Ping timeout: 245 seconds]
solars has joined #ruby
gbgdev has quit [Ping timeout: 264 seconds]
mdw has joined #ruby
emilford has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
jam_ has quit [Remote host closed the connection]
aufi has joined #ruby
<hololeap> Guest77742: yes, that is the primary use for mutexes
vondruch has quit [Remote host closed the connection]
TomyWork has joined #ruby
mdw has quit [Client Quit]
baweaver has quit [Remote host closed the connection]
<hololeap> unless there is no chance that it is being read while the other thread is writing it (e.g. it is written before the other thread exists)
Ebok has joined #ruby
Xeago has joined #ruby
<Guest77742> hololeap: i thought it would be needed only when writes are happening from two threads. I am coming from c++ background
harly_ has joined #ruby
carella_ has joined #ruby
<hololeap> you might be able to get away with it
ta has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
aryaching has quit [Ping timeout: 250 seconds]
workmad3_ has joined #ruby
<hololeap> if there's no chance of a race condition then i guess you don't need it
sandstrom has quit [Quit: My computer has gone to sleep.]
Dimik has quit [Ping timeout: 264 seconds]
<Guest77742> hololeap: Can race condition happen when 1 read and 1 write are happening?. I understand that there will be race condition if there are mulitple writes
PedramT has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
ICantCook has quit [Ping timeout: 240 seconds]
carella has quit [Ping timeout: 240 seconds]
harly has quit [Ping timeout: 240 seconds]
ta_ has quit [Ping timeout: 240 seconds]
camilasan has quit [Ping timeout: 240 seconds]
PedramT has joined #ruby
gagrio_ has quit [Ping timeout: 240 seconds]
pengus has quit [Ping timeout: 240 seconds]
<hololeap> i doubt it but i'm not 100% sure
ICantCook has joined #ruby
emilford has joined #ruby
<hololeap> probably best to wait for someone else to chime in
gagrio_ has joined #ruby
jgpawletko has joined #ruby
devbug_ has quit [Read error: Connection reset by peer]
syk has joined #ruby
camilasan has joined #ruby
scepticulous has joined #ruby
tonini has joined #ruby
emilford has quit [Ping timeout: 240 seconds]
<Cork> i want to localize a variable for a small part of a function so it doesn't exist later
toretore has quit [Ping timeout: 245 seconds]
<Cork> is there a good way to do that except creating a lambda?
<hololeap> Cork: can you give an example?
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
fbandov has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Cork> hololeap: https://pastebin.mozilla.org/8857844 a bit of a half psudo code though
<Cork> the point is i don't want s to be laying around for the rest of the function
karapetyan has quit [Remote host closed the connection]
govg has joined #ruby
emilford has joined #ruby
arup_r has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
<Cork> so i would have liked to have it "local" for the first two rows
arup_r has joined #ruby
arup_r has quit [Client Quit]
scepticulous has quit [Ping timeout: 260 seconds]
ziyadb has joined #ruby
scepticulous has joined #ruby
yoongkang has joined #ruby
nettoweb has joined #ruby
einarj has joined #ruby
<hololeap> Cork: there's no harm in it existing for the rest of the function. the GC will clean it up regardless... but if the prepare method took a block you could do something like @db.prepare("SQL") {|s| s.execute(user[:address], user[:email]) }
<hololeap> then it would only exist inside that block
<Cork> hololeap: ya, i'm looking for a way in the language to isolate variables
dcunit3d has joined #ruby
dionysus69 has quit [Ping timeout: 245 seconds]
<Cork> i know -() {}.call and lambda{}.call is an option
<Cork> but i was wondering if there was a "better" solution
<Cork> *->()
<hololeap> using your example, did you write the prepare method or is that from a library?
Guest77742 has quit [Ping timeout: 252 seconds]
vondruch has joined #ruby
emilford has quit [Ping timeout: 240 seconds]
<hololeap> because you could re-write it so that it doesn't return s, but yields s instead
<hololeap> or use block_given? to allow both
yoongkang has quit [Ping timeout: 272 seconds]
<hololeap> using blocks to narrow down the scope is pretty common and helps keep the code clean
emilford has joined #ruby
EasyCo has joined #ruby
firstdayonthejob has quit [Ping timeout: 245 seconds]
<hololeap> Cork: but if the method is from a library and doesn't take a block, there's no point in arbitrarily wrapping the whole thing in a lambda
tjbiddle has joined #ruby
nofxx has quit [Ping timeout: 264 seconds]
<Cork> hololeap: well except you don't risk using the variable content later
syk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Cork> that is why i want the variable to go away
SCHAAP137 has joined #ruby
Xeago has quit [Ping timeout: 250 seconds]
<EasyCo> Hey guys, I'm trying to use Refinements but the redefined setter method "number" never gets called in the refinement. Am I missing something? https://gist.github.com/trev/b5529ef5fc716c3f89f9
<Cork> this code is quite sensitive
sandstrom has joined #ruby
dionysus69 has joined #ruby
emilford has quit [Ping timeout: 245 seconds]
<hololeap> that's another matter. if you're passing a mutable object to a method, it's best to call .dup on it first so the method gets a copy and doesn't do anything destructive to the original
sesquipedalian has quit [Ping timeout: 240 seconds]
<EasyCo> Nevermind my question. It's a scoping issue.
blur3d has joined #ruby
<hololeap> Cork: could you explain what scenario you are trying to avoid?
syk has joined #ruby
<Cork> hololeap: the content of the variables defined in this section have to not ever by mistake be used later
janoti has joined #ruby
<Cork> cause the consequences would be bad
piotrj has quit [Read error: Connection reset by peer]
<hololeap> Cork: if the object is being created inside the method and never leaves it (i.e. isn't returned) then it will get trashed when the method ends
sakix has joined #ruby
<manveru> unless you assign it to an instance variable like you do :)
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
piotrj_ has joined #ruby
Burgestrand has joined #ruby
dexter_ has quit [Ping timeout: 265 seconds]
emilford has joined #ruby
<hololeap> it doesn't matter if it's assigned to an instance variable
<hololeap> the variable name gets trashed too
<manveru> it does matter if the object lives on
<hololeap> it won't unless it somehow leaves the scope of the methodd
Abrin has quit [Ping timeout: 240 seconds]
<hololeap> that's what the garbage collector is for
SCHAAP137 has quit [Remote host closed the connection]
<manveru> instance variables are assigned on the instance, local variables are assigned to the scope, if the method ends, the instance variable lives as long as the instance it's stored in, while the local variable is lost
yfeldblum has joined #ruby
<hololeap> oh, derp sorry i was getting instance and local mixed up
<hololeap> its late
<manveru> np :)
<manveru> i know the difference man, i've been doing ruby for over 10 years
Burgestrand has quit [Client Quit]
tvw has quit [Remote host closed the connection]
<manveru> even with locals there is no guarantee that the number is GC'd immediately, it might still show up in ObjectSpace after
sakix has quit [Ping timeout: 264 seconds]
<hololeap> anyway, he's talking about the local variable s from his example, which isn't returned
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hololeap> but it's nothing to worry about
<manveru> what you can do is: def do_sensitive_shit(number); do_stuff(number); number.replace(''); end
emilford has quit [Ping timeout: 250 seconds]
<manveru> at that point you might somehow be able to find it in gdb, but otherwise it should be gone
<hololeap> manveru: its usually not a good idea to call destructive methods on a object passed as a parameter
stan has joined #ruby
<manveru> how is this bad in this example?
ohaibbq has quit [Remote host closed the connection]
<manveru> he wants to never be able to use the string again, if you replace it, even if you somehow by a cosmic ray end up reusing it, it's not containing sensitive data anymore
Burgestrand has joined #ruby
<manveru> i assume that also means he wants it to be unusable from the parent scope
mark2 has joined #ruby
bahar has joined #ruby
emilford has joined #ruby
<ljarvis> good morning awkward activerecord race condition
PedramT has quit [Remote host closed the connection]
Xeago has joined #ruby
<manveru> is it this time of day again?
<hololeap> that's not what i gathered from his example
<ljarvis> apparently so
<manveru> "i want to localize a variable for a small part of a function so it doesn't exist later"
Xeago has quit [Remote host closed the connection]
<hololeap> <Cork> hololeap: https://pastebin.mozilla.org/8857844 a bit of a half psudo code though
<hololeap> <Cork> the point is i don't want s to be laying around for the rest of the function
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
burbus has quit [Ping timeout: 256 seconds]
mondok has quit [Ping timeout: 260 seconds]
<manveru> well, i was looking at the wrong example ^^;
chussenot has joined #ruby
<hololeap> Cork: do you need the data to be immediately destroyed for some security reason, or are you worried about it hanging around and wasting memory?
<Cork> to be clear i want to do this https://pastebin.mozilla.org/8857847 but preferably without the lambda
mikecmpbll has joined #ruby
Xeago has joined #ruby
<manveru> Cork: you want the sql connection to be scoped?
<manveru> there's nothing else in the lambda
PedramT has joined #ruby
<manveru> the user variable is outside of it already
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilford has quit [Ping timeout: 276 seconds]
Burgestrand has joined #ruby
<manveru> i'm confused now
<hololeap> Cork you don't need the lambda, the GC will get rid of local variabe s and the object it references at some point soon after the method ends
tomphp has joined #ruby
mdw has joined #ruby
e4xit has quit [Quit: e4xit]
sandstrom has quit [Quit: OS X IRC Client (www.textualapp.com)]
PedramT_ has joined #ruby
emilford has joined #ruby
sandstrom has joined #ruby
<hololeap> the only difference is if it gets garbage collected before or after the `Mailer.deliver_welcome(user[:email])`, and i don't see how that would matter unless you're working with crazy memory constraints
chthon has joined #ruby
elaptics`away is now known as elaptics
sandstrom has quit [Client Quit]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sftrabbit has joined #ruby
BlkDynmt has left #ruby [#ruby]
PedramT has quit [Ping timeout: 245 seconds]
blackgoat has quit [Quit: WeeChat 1.3]
mfb2 has joined #ruby
<hololeap> if you gave us more details we might be able to help more
sftrabbit has quit [Client Quit]
sftrabbit has joined #ruby
dcunit3d has quit [Quit: WeeChat 1.3]
emilford has quit [Ping timeout: 240 seconds]
dcunit3d has joined #ruby
mondok has joined #ruby
drptbl has joined #ruby
mfb2 has quit [Ping timeout: 240 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
burbus has joined #ruby
sandstrom has joined #ruby
baweaver has joined #ruby
emilford has joined #ruby
mdw has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
baweaver has quit [Ping timeout: 240 seconds]
emilford has quit [Ping timeout: 250 seconds]
jespada has joined #ruby
emilford has joined #ruby
Burgestrand has joined #ruby
<shevy> if it is a legit problem :)
blaxter has joined #ruby
yoongkang has joined #ruby
aeontech has quit [Quit: aeontech]
hayden_ has joined #ruby
workmad3_ has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby
aeontech has joined #ruby
aeontech has quit [Client Quit]
emilford has quit [Ping timeout: 264 seconds]
graphettion has joined #ruby
graphettion has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
last_staff has joined #ruby
platzhirsch has joined #ruby
zerg_lurker has joined #ruby
emilford has joined #ruby
<zerg_lurker> Ello, I'm working on the pragmatic programmers book for rails, and i'm starting to wonder if its bad practice that i'm using ruby 1.9.3 and rails 3.2.0. Is this book too outdated?
workmad3 has quit [Ping timeout: 264 seconds]
karapetyan has quit [Ping timeout: 245 seconds]
gagrio_ has quit [Quit: Leaving...]
chussenot has quit [Quit: chussenot]
dexter_ has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
<apeiros> zerg_lurker: most probably still applies. but there's probably little to no reason to use ruby 2.3.0 and at least the newest version of rails 3.2.
<apeiros> you can try to use ruby 4.2 and see how much will work, and if it doesn't, you can check what changed.
<apeiros> *rails 4.2
<zerg_lurker> Thanks! I've had a hell of a hard time getting rails to run, so i'll try to upgrade it and pray to the programming gods that nothing breaks.
<apeiros> zerg_lurker: btw., rails is:
<apeiros> ?rails zerg_lurker
<ruby[bot]> zerg_lurker: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
chussenot has joined #ruby
<zerg_lurker> So noted
emilford has joined #ruby
gbgdev has joined #ruby
<apeiros> oh dear, just noticed I wrote the opposite of what I wanted to say :D
User458764 has joined #ruby
<apeiros> zerg_lurker: there's probably little to no reason NOT to use ruby 2.3.0 and at least the newest version of rails 3.2. i.e. -> use ruby 2.3 and newest rails 3.2 ;-)
<apeiros> sorry for the mishap
chussenot has quit [Client Quit]
the_drow has joined #ruby
PedramT_ has quit [Remote host closed the connection]
gbgdev has quit [Remote host closed the connection]
<the_drow> Sanity check, ruby releases the GIL when writing to stdout right?
<the_drow> So if I write to stdout in one thread code should be executed in the other
emilford has quit [Ping timeout: 250 seconds]
skcin7 has joined #ruby
<apeiros> yes, IO generally allows other threads to run
sakix has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skcin7 has quit [Client Quit]
tulak has joined #ruby
lessless has quit [Quit: Leaving]
Snowy has joined #ruby
postmodern has quit [Quit: Leaving]
SCHAAP137 has joined #ruby
platzhirsch has left #ruby [#ruby]
emilford has joined #ruby
jimeh has quit [Quit: ZNC - http://znc.in]
sakix has quit [Ping timeout: 276 seconds]
pawnbox has quit [Remote host closed the connection]
jimeh has joined #ruby
fbandov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bogdanteleaga has joined #ruby
pawnbox has joined #ruby
rsc___ has quit [Quit: rsc___]
rodfersou has joined #ruby
emilford has quit [Ping timeout: 240 seconds]
the_drow has quit [Ping timeout: 252 seconds]
rsc___ has joined #ruby
pec has joined #ruby
haraoka has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
marr has joined #ruby
PedramT has joined #ruby
workmad3 has joined #ruby
krz has joined #ruby
the_drow has joined #ruby
<the_drow> apeiros: thanks!
chussenot has joined #ruby
akem has quit [Remote host closed the connection]
piotrj_ has quit [Read error: Connection reset by peer]
fbandov has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
piotrj has joined #ruby
PedramT_ has joined #ruby
rsc___ has quit [Quit: rsc___]
joonty has joined #ruby
PedramT has quit [Ping timeout: 260 seconds]
emilford has joined #ruby
blackmesa has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
whiteline has quit [Ping timeout: 276 seconds]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
rsc___ has joined #ruby
blackmes1 has joined #ruby
jam_ has joined #ruby
emilford has quit [Ping timeout: 264 seconds]
janoti has quit [Ping timeout: 265 seconds]
blackmesa has quit [Ping timeout: 245 seconds]
PedramT_ has quit [Remote host closed the connection]
drptbl has joined #ruby
PedramT has joined #ruby
jam_ has quit [Ping timeout: 276 seconds]
emilford has joined #ruby
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 250 seconds]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
mdw has joined #ruby
the_drow has quit [Ping timeout: 252 seconds]
emilford has quit [Ping timeout: 245 seconds]
dlitvak has joined #ruby
bruce_lee has quit [Remote host closed the connection]
skcin7 has joined #ruby
duncannz has quit [Remote host closed the connection]
hmsimha_ has joined #ruby
hmsimha_ has quit [Read error: Connection reset by peer]
nodejunkie has joined #ruby
dlitvak has quit [Remote host closed the connection]
emilford has joined #ruby
ldnunes has joined #ruby
chussenot has quit [Quit: chussenot]
chipotle has quit [Quit: cheerio]
UtkarshRay has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 272 seconds]
emilford has quit [Ping timeout: 245 seconds]
colli5ion has joined #ruby
chussenot has joined #ruby
charliesome has joined #ruby
karapetyan has joined #ruby
skade has joined #ruby
conta has joined #ruby
wottam has joined #ruby
James1 has joined #ruby
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
emilford has joined #ruby
karapetyan has quit [Ping timeout: 245 seconds]
arup_r has joined #ruby
dwfait has joined #ruby
gbgdev has joined #ruby
gbgdev has quit [Read error: Connection reset by peer]
gbgdev has joined #ruby
emilford has quit [Ping timeout: 272 seconds]
mondok has quit [Read error: Connection reset by peer]
last_staff has quit [Quit: last_staff]
evidex has joined #ruby
govg has quit [Ping timeout: 264 seconds]
devbug has quit [Ping timeout: 245 seconds]
tomphp has quit [Ping timeout: 240 seconds]
tomphp_ has joined #ruby
phlegx has joined #ruby
emilford has joined #ruby
CloCkWeRX has joined #ruby
skade has quit [Read error: Connection reset by peer]
fahrradflucht has joined #ruby
oivoodoo has joined #ruby
rsc___ has quit [Quit: rsc___]
<phlegx> Hi! I want to transform a BigDecimal number to scientific notation. I have a problem with the rounding using sprintf.
sandstrom has quit [Quit: My computer has gone to sleep.]
<phlegx> e.g. n = BigDecimal.new("1.2345678901234568")
rsc___ has joined #ruby
<phlegx> with n.to_s('e') I get 0.12345678901234568E1
emilford has quit [Ping timeout: 264 seconds]
<phlegx> But if I use '%.16e' %n.to_s i get 1.2345678901234567e+00
<phlegx> he result is round down! Why?
skade has joined #ruby
lee-jon has joined #ruby
emilford has joined #ruby
govg has joined #ruby
oivoodoo has quit [Remote host closed the connection]
Bloomer has quit [Remote host closed the connection]
skade has quit [Ping timeout: 256 seconds]
Marsupermammal has joined #ruby
piotrj has quit [Remote host closed the connection]
piotrj has joined #ruby
Diabolik has quit [Excess Flood]
emilford has quit [Ping timeout: 240 seconds]
Diabolik has joined #ruby
EasyCo has quit [Quit: Connection closed for inactivity]
baweaver has joined #ruby
rsc___ has quit [Quit: rsc___]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dc1 has joined #ruby
MartyG_ has joined #ruby
hololeap has quit [Ping timeout: 264 seconds]
tjbiddle has quit [Quit: tjbiddle]
emilford has joined #ruby
sadman99 has joined #ruby
baweaver has quit [Ping timeout: 245 seconds]
<sadman99> hi
<sadman99> hey thete any one can help
<Ox0deb> phlegx: BigDecimal only patches String to add the #to_d method. It doesn't modify #sprintf to properly handle BigDecimal arguments.
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilford has quit [Ping timeout: 250 seconds]
FooMunki has joined #ruby
<phlegx> Ox0deb, thx. But why "1.2345678901234568".to_f is 1.2345678901234567
sadman99 has quit []
<Ox0deb> phlegx: Because the former simply cannot be accurately represented in IEEE 754.
swarm_lurker has joined #ruby
Outlastsheep has quit [Ping timeout: 240 seconds]
<Ox0deb> Er, no. This is just a case of rounding, I guess.
mfb2 has joined #ruby
<Ox0deb> Regular-old floating-point numbers (like the ones you get from String#f) don't have arbitrary precision.
lee-jon has quit [Quit: lee-jon]
<Ox0deb> *String#to_f
<phlegx> And how can I "transform" my float string in float without rounding?
zerg_lurker has quit [Ping timeout: 250 seconds]
emilford has joined #ruby
blaxter has quit [Quit: foo]
avril14th has quit [Remote host closed the connection]
mfb2 has quit [Ping timeout: 250 seconds]
<Ox0deb> phlegx: I'm pretty sure you want `n.to_s('F')`.
lee-jon has joined #ruby
<canton7> phlegx, are you aware that floats have limited precision?
dlitvak has joined #ruby
slackbotgz has joined #ruby
<phlegx> canton7, yes
<phlegx> 16 right?
usershell has quit [Remote host closed the connection]
<canton7> ok, so you're aware that "And how can I "transform" my float string in float without rounding?" doesn't make sense? "How do I transform my arbitrary-precision string into a limited-precision float while still keeping arbitrary precision?"
<canton7> ... you can't, because floats have limited precision, as you just told me
c355e3b has joined #ruby
emilford has quit [Ping timeout: 265 seconds]
<phlegx> canton7, thx your right
Burgestrand has joined #ruby
hololeap has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skcin7 has quit [Ping timeout: 276 seconds]
skcin7_ has joined #ruby
<phlegx> ok, so what I want to do is show a BigDecimal in scientific notation, but when i do n.to_s('E') I get this format 0.1234567890123456E1, but i want format like with sprintf 1.234567890123456e+01
tvw has joined #ruby
Ebok has joined #ruby
FooMunki has quit [Quit: FooMunki]
emilford has joined #ruby
<Ox0deb> phlegx: BigDecimal uses "engineering notation" and there's no telling it otherwise.
whiteline has joined #ruby
<Ox0deb> >> s = '0.1234567890123456E1'; s['E'] = 'e+0'; s # Maybe this is okay?
<ruby[bot]> Ox0deb: # => "0.1234567890123456e+01" (https://eval.in/509267)
PedramT has quit [Remote host closed the connection]
blackgoat has joined #ruby
bogdanteleaga has quit [Changing host]
bogdanteleaga has joined #ruby
emilford has quit [Ping timeout: 264 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
colegatron_origi has quit [Ping timeout: 250 seconds]
CloCkWeRX has quit [Ping timeout: 250 seconds]
lucasb has joined #ruby
benoror has quit [Quit: Connection closed for inactivity]
emilford has joined #ruby
zarubin has joined #ruby
moei has joined #ruby
Marsupermammal has quit [Quit: Textual IRC Client: www.textualapp.com]
PedramT has joined #ruby
emilford has quit [Ping timeout: 264 seconds]
Ishido has joined #ruby
workmad3 has joined #ruby
Azure has quit [Quit: Oops.]
Azure has joined #ruby
emilford has joined #ruby
colegatron_origi has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX has joined #ruby
huyderman has joined #ruby
krz has quit [Ping timeout: 240 seconds]
emilford has quit [Ping timeout: 264 seconds]
<hightower3> Hey, what Ruby lib (except 'curb') can I use to make HTTP requests, but one which allows specifying outgoing interface or source IP?
sakix has joined #ruby
emilford has joined #ruby
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
slackbotgz has quit [Remote host closed the connection]
jaiks has quit [Ping timeout: 265 seconds]
wottam has quit [Quit: Textual IRC Client: www.textualapp.com]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sakix has quit [Ping timeout: 264 seconds]
piotrj has quit [Remote host closed the connection]
Shaboum has joined #ruby
piotrj has joined #ruby
emilford has quit [Ping timeout: 265 seconds]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
Snowy has quit [Remote host closed the connection]
skcin7_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilford has joined #ruby
Snowy has joined #ruby
ElFerna has joined #ruby
pawnbox has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
nodejunkie has quit [Ping timeout: 265 seconds]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shadoi has joined #ruby
UtkarshRay has joined #ruby
PedramT has quit [Ping timeout: 256 seconds]
emilford has quit [Ping timeout: 250 seconds]
PedramT has joined #ruby
swarm_lurker has quit [Ping timeout: 240 seconds]
oivoodoo has joined #ruby
emilford has joined #ruby
lindistock has joined #ruby
drptbl has joined #ruby
oivoodoo has quit [Remote host closed the connection]
oivoodoo has joined #ruby
jottr_ has quit [Ping timeout: 250 seconds]
govg has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
<atmosx> hightower3: that sounds evil (there too many really)
sandstrom has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
ropeney has joined #ruby
astrobun_ has quit [Remote host closed the connection]
dlitvak_ has joined #ruby
jam_ has joined #ruby
ropeney has quit [Client Quit]
<Ox0deb> hightower3: Do you solemnly swear that you're up to no good?
<atmosx> the dinosaur thing
<atmosx> err
ItSANgo has quit [Quit: Leaving...]
dlitvak has quit [Ping timeout: 272 seconds]
Burgestrand has joined #ruby
xpt has quit [Ping timeout: 250 seconds]
usershell has joined #ruby
jam_ has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
karapetyan has joined #ruby
usershell has quit [Ping timeout: 264 seconds]
mdw has quit [Ping timeout: 260 seconds]
sftrabbit has quit [Quit: sftrabbit]
<apeiros> atmosx: that sounds more like a box with multiple interfaces and a connection where the source matters :)
arlek has quit [Ping timeout: 250 seconds]
ItSANgo has joined #ruby
karapetyan has quit [Ping timeout: 245 seconds]
<atmosx> apeiros: interesting use case, I wouldn't have thought that. Isn't that usually done at packet-filter level?
<apeiros> I have no idea what the usual solution is
<apeiros> we solved it by having a proxy for all connections where source matters
<atmosx> a proxy per interface?
mdw has joined #ruby
<atmosx> that's even cleaner/easier
PedramT has quit [Remote host closed the connection]
tvw has quit []
tvw has joined #ruby
Brklyn has joined #ruby
mdw has quit [Client Quit]
anisha_ has quit [Quit: Leaving]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xpt has joined #ruby
<apeiros> no, not a proxy per interface. a proxy which acts as the "registered source" (e.g. for vpn connections), and our services just need to know the proxy and the other side too only needs to register one proxy instead of N machines..
dpollen has joined #ruby
workmad3_ has joined #ruby
sftrabbit has joined #ruby
aupadhye has joined #ruby
dpollen has quit [Client Quit]
Ebok has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
skade has joined #ruby
bahar has quit [Changing host]
bahar has joined #ruby
Brklyn has quit [Ping timeout: 272 seconds]
govg has joined #ruby
tvw has quit [Ping timeout: 272 seconds]
kp666 has quit [Ping timeout: 250 seconds]
skade has quit [Quit: Computer has gone to sleep.]
dwfait has quit [Remote host closed the connection]
workmad3_ has quit [Ping timeout: 265 seconds]
Xeago has joined #ruby
ta has quit [Remote host closed the connection]
jaiks has joined #ruby
conta has quit [Quit: Leaving]
duckpuppy has joined #ruby
kerunaru has quit [Ping timeout: 250 seconds]
dwfait has joined #ruby
shadoi has quit [Quit: Leaving.]
emilford has quit [Read error: Connection reset by peer]
kerunaru has joined #ruby
emilford has joined #ruby
<atmosx> I see
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
duckpuppy has quit [Ping timeout: 245 seconds]
davedev24 has quit []
kp666 has joined #ruby
tvw has joined #ruby
kp666 has quit [Max SendQ exceeded]
srenatus has joined #ruby
kp666 has joined #ruby
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
sakix has joined #ruby
drptbl has joined #ruby
<silverdust> Is there a way to map an array such that I assign keys to its values to become a Hash
ramfjord has joined #ruby
<silverdust> so ['a','b'] becomes {awesome: 'a', terrible: 'b'}
newbie22 has joined #ruby
sakix has quit [Ping timeout: 272 seconds]
kerunaru has quit [Ping timeout: 256 seconds]
<manveru> silverdust: where do the keys come from?
joonty has quit [Ping timeout: 240 seconds]
<manveru> >> [:awesome, :terrible].zip(['a','b']).to_h
<silverdust> in a different array ['awesome', 'terrible']
<ruby[bot]> manveru: # => {:awesome=>"a", :terrible=>"b"} (https://eval.in/509335)
<manveru> like this?
<silverdust> yes
<silverdust> wow thanks
ramfjord has quit [Ping timeout: 240 seconds]
lurch_ has left #ruby [#ruby]
casadei has joined #ruby
dlitvak has joined #ruby
kerunaru has joined #ruby
arup_r has quit [Remote host closed the connection]
baweaver has joined #ruby
vondruch has quit [Ping timeout: 250 seconds]
sftrabbit has quit [Quit: sftrabbit]
dlitvak_ has quit [Ping timeout: 250 seconds]
davedev24 has joined #ruby
tvw has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 240 seconds]
PedramT has joined #ruby
Rickmasta has joined #ruby
duckpuppy has joined #ruby
robbyoconnor has quit [Ping timeout: 265 seconds]
tvw has joined #ruby
dc1 has quit [Ping timeout: 264 seconds]
synthroid has joined #ruby
joonty has joined #ruby
<flughafen> does capybara click_link find any attribute that has matching text, or is it limited to href, text, and some other thing
jaiks has quit [Ping timeout: 265 seconds]
Pumukel has joined #ruby
PedramT has quit [Remote host closed the connection]
arup_r has joined #ruby
PedramT has joined #ruby
Jardayn has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
duoi has quit [Ping timeout: 260 seconds]
CloCkWeRX has quit [Quit: Leaving.]
arup_r has quit [Ping timeout: 264 seconds]
sftrabbit has joined #ruby
PedramT_ has joined #ruby
<jhass> iirc the docs say the latter
PedramT has quit [Ping timeout: 256 seconds]
mdw has joined #ruby
wldcordeiro has quit [Ping timeout: 264 seconds]
gnudon has joined #ruby
<jhass> "Finds a button or link by id, text or value and clicks it. Also looks at image alt text inside the link."
whiteline has quit [Ping timeout: 265 seconds]
PedramT_ has quit [Remote host closed the connection]
duoi has joined #ruby
sdothum has joined #ruby
pdoherty has joined #ruby
duoi has quit [Read error: Connection reset by peer]
TheHodge has joined #ruby
Shaboum has quit [Quit: WeeChat 1.4]
LoganG has joined #ruby
emilford has joined #ruby
milan has joined #ruby
Shaboum has joined #ruby
tjbiddle has joined #ruby
<flughafen> right, ok.
yfeldblum has quit [Ping timeout: 260 seconds]
oivoodoo has quit [Remote host closed the connection]
kerunaru has quit [Excess Flood]
User458764 has joined #ruby
oivoodoo has joined #ruby
xpt has quit [Quit: WeeChat 0.3.8]
fbandov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
melter has quit [Quit: Client exiting]
arup_r has joined #ruby
TomPeed has joined #ruby
zz_denym_ has quit [Ping timeout: 250 seconds]
sky_grill has joined #ruby
emilford has quit [Ping timeout: 240 seconds]
<sky_grill> hey. is it possible to read a string formatted as a set of hash key => value pairs directly into a new Hash structure?
atomical has joined #ruby
kalopsian has joined #ruby
gbgdev has quit [Remote host closed the connection]
jaiks has joined #ruby
treaki__ has quit [Ping timeout: 272 seconds]
chussenot has quit [Ping timeout: 264 seconds]
sftrabbit has quit [Quit: sftrabbit]
sftrabbit has joined #ruby
usershell has joined #ruby
gigetoo has quit [Ping timeout: 250 seconds]
gigetoo has joined #ruby
whiteline has joined #ruby
BTRE has quit [Ping timeout: 272 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
troubadour has joined #ruby
troubadour is now known as NotFullOfTrouble
<lucasb> I think you have to 'eval' it
lee-jon has quit [Quit: lee-jon]
JDiPierro has joined #ruby
piotrj has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
chussenot has joined #ruby
piotrj has joined #ruby
<Ox0deb> >> 'a => 1, b => 2'.scan(/(\w+) => (\w+)/).to_h # Or this.
<ruby[bot]> Ox0deb: # => {"a"=>"1", "b"=>"2"} (https://eval.in/509346)
<Ox0deb> But don't do that.
usershell has quit [Ping timeout: 250 seconds]
<jhass> ?xy sky_grill
<ruby[bot]> sky_grill: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> for example describe why you have a string "formatted" that way in the first place
<sky_grill> i'm not. thanks for your concern though
gbgdev has joined #ruby
freerobby has joined #ruby
blackmes1 has quit [Ping timeout: 272 seconds]
Brklyn has joined #ruby
Rickmasta has joined #ruby
<jhass> so why that serialization instead of a proper one?
phlegx has quit [Quit: Leaving]
scepticulous has quit [Ping timeout: 264 seconds]
zz_denym_ has joined #ruby
BTRE has joined #ruby
aswen has joined #ruby
kerunaru has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0deb> Because unspeakably good reasons, apparently.
Brklyn has quit [Ping timeout: 240 seconds]
<jhass> yup, thought so
scepticulous has joined #ruby
<NotFullOfTrouble> I have a question about the internals of Ruby. Ruby's garbage collector is mostly a set of linked lists. A value is removed from the heap list and placed on a free list. I am trying to figureout how this could be thread safe (I am not arguing that it isn't, rather trying to understand what mechanics are in play here that I don't see).
<NotFullOfTrouble> What I mean is that there is no locking anywhere in the garbage collector, and there doesn't appear to be any locking in the set/get variable methods either (including for global variables). So if a value is being set (in one thread), while the garbage collector is running in another, you have two threads trying to modify the same linked list with
<NotFullOfTrouble> no locks. Obviously it works, but I am at a loss to explain why. Anyone have intimate knowledge of this?
gbgdev has quit [Ping timeout: 276 seconds]
sergey_makagon has joined #ruby
<NotFullOfTrouble> Dont know why there is so many lines between my two paragraphs there...
<NotFullOfTrouble> What I mean is that there is no locking anywhere in the garbage collector, and there doesn't appear to be any locking in the set/get variable methods either (including for global variables). So if a value is being set (in one thread), while the garbage collector is running in another, you have two threads trying to modify the same linked list with
<NotFullOfTrouble> no locks. Obviously it works, but I am at a loss to explain why. Anyone have intimate knowledge of this?
puria has quit [Ping timeout: 250 seconds]
emilford has joined #ruby
milan has quit [Ping timeout: 252 seconds]
treaki__ has joined #ruby
<jhass> isn't MRI's GC still world-stop?
<NotFullOfTrouble> How would it stop the world without mutual exclusion?
<jhass> I'd imagine at the entry point, I didn't look at the code at all there
<jhass> maybe it pauses other threads instead of a lock or something?
ramortegui has joined #ruby
<NotFullOfTrouble> The entry point for GC is when a new value is created and there is no more free list, no locks there. You can't just pause a thread, it would be nice if you could. There is no such functionality called during a gc_collect()
sakix has joined #ruby
duckpuppy has quit [Ping timeout: 272 seconds]
<NotFullOfTrouble> The only way to pause a thread that I am aware of (native thread speaking, not green threads, so 1.9 and higher) is to have each thread constantly poll to see if it should pause. I am not the authority on this though and would LOVE to be surprised and find some magic trick, thats what I am looking for
scepticulous has quit [Ping timeout: 240 seconds]
scepticulous has joined #ruby
lee-jon has joined #ruby
pdoherty has quit [Ping timeout: 240 seconds]
<Ox0deb> NotFullOfTrouble: GET_THREAD() is called all over the place before performing various actions.
<Ox0deb> That's the GIL, essentially.
dstarh has joined #ruby
<Ox0deb> Where it matters, the VM grabs hold of the current thread and uses that as a reference point before proceeding.
sakix has quit [Ping timeout: 240 seconds]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0deb> Locks around the garbage collector aren't strictly necessary by dint of the fact that MRI doesn't support real concurrency. :/
<NotFullOfTrouble> So its not thread safe in the traditional manner, but the GIL prevents multiple threads from accessing the set/gc at the same time?
<Ox0deb> In a nutshell.
<Ox0deb> That's not to say that it's not within your power to write very bad threaded code. :P
Ebok has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<NotFullOfTrouble> Of course, I was just surprised when I peeked at the code and could not trace it back to any locking mechanism. I know its "thread safe" in that the gc isnt going to clobber a variable setting, I have used it enough to be sure of that, but I just couldnt see it.
chthon has quit [Ping timeout: 245 seconds]
AlexJakeGreen has joined #ruby
duckpuppy has joined #ruby
<Ox0deb> trunk $ ag GET_THREAD | wc -l
<Ox0deb> 248
<Ox0deb> Found it!
sdothum has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
newbie22 has quit [Quit: Leaving]
<NotFullOfTrouble> Thanks for your help, I will follow that thread, no pun intended.
newbie22 has joined #ruby
stannard has joined #ruby
<Ox0deb> Hue hue hue.
<Ox0deb> Sure thing.
<sky_grill> uh. why would File.readlines not read all lines in a file?
workmad3 has joined #ruby
cdg has joined #ruby
gbgdev has joined #ruby
newbie22 has quit [Client Quit]
freerobby has quit [Quit: Leaving.]
newbie22 has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical_ has joined #ruby
robbyoconnor has joined #ruby
blur3d has quit [Quit: blur3d]
lektrik has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atomical has quit [Ping timeout: 240 seconds]
william3 has joined #ruby
gbgdev has quit [Ping timeout: 264 seconds]
<sky_grill> i have this 30 line file and only two lines are being read
charliesome has joined #ruby
kerunaru has quit [Ping timeout: 272 seconds]
hlegius has joined #ruby
blackgoat has quit [Quit: WeeChat 1.3]
mfb2 has joined #ruby
govg has quit [Quit: leaving]
Hammy_Work has joined #ruby
govg has joined #ruby
krobzaur has joined #ruby
chthon has joined #ruby
jam_ has joined #ruby
griffindy has joined #ruby
scepticulous has quit [Quit: Konversation terminated!]
gbgdev has joined #ruby
<Ox0deb> sky_grill: Post code.
synthroid has quit [Remote host closed the connection]
mfb2 has quit [Ping timeout: 250 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
NotFullOfTrouble has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
<sky_grill> Ox0deb
sdothum has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
gbgdev has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
jam_ has quit [Ping timeout: 260 seconds]
<sky_grill> Ox0deb you can use this as input http://hastebin.com/yawemeqalo.hs
<TomPeed> is the program throwing an exception?
<Ox0deb> sky_grill: https://eval.in/509375
<Ox0deb> Looks fine to me.
<sky_grill> Ox0deb it's printing this for me line 2, nol
<Ox0deb> Wat.
<sky_grill> also, for lines.length, it prints 1
_joes_ has quit [Quit: Connection closed for inactivity]
<sky_grill> yes
<sky_grill> wat is correct
<Ox0deb> The problem is obviously not the code.
<Ox0deb> Either your input file and/or your environment are to blame.
<sky_grill> wonderful
<sky_grill> this is on a mac
<Ox0deb> That seems immaterial.
tvw has quit [Ping timeout: 240 seconds]
malconis has joined #ruby
<sky_grill> ok
malconis has quit [Remote host closed the connection]
<sky_grill> the file was screwed
LoganG has quit [Ping timeout: 245 seconds]
mahk has quit [Ping timeout: 260 seconds]
<Ox0deb> Stupid carriage returns.
<Ox0deb> > mfw anything but \n as the line terminator made sense to anybody
<Ox0deb> Twice.
krz has joined #ruby
malconis has joined #ruby
<sky_grill> oddly enough, when i searched for \n in vim, there was one at the end of each line
<Ox0deb> Sure, but a \r as well.
<sky_grill> good lord
<Ox0deb> That just returns the cursor to the start of the current line in environments that use \n as the line terminator.
<Ox0deb> Thus explaining your "line 2, nol" weirdness.
persistence has joined #ruby
<sky_grill> this is so weird
<sky_grill> vim isn't finding the \r
william3 has quit [Remote host closed the connection]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<sky_grill> wtf
<gregf_> sky_grill: can you not just run dos2unix on that file?
kies^ has quit [Ping timeout: 276 seconds]
dlitvak_ has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fbandov has joined #ruby
gregf_ has quit [Quit: leaving]
<sky_grill> gregf it doesn't work
dlitvak has quit [Ping timeout: 250 seconds]
tvw has joined #ruby
tulak has quit [Ping timeout: 272 seconds]
gbgdev has joined #ruby
VeryBewitching has joined #ruby
blackmes1 has joined #ruby
<VeryBewitching> Morning #ruby
Pande has joined #ruby
<AlexJakeGreen> ruby -pe 'gsub(/\r/, "\n")' input_file.txt > converted_file.txt
User458764 has joined #ruby
puria has joined #ruby
hlegius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gregf_ has joined #ruby
newdan has joined #ruby
mahk has joined #ruby
synthroid has joined #ruby
weemsledeux has joined #ruby
hlegius has joined #ruby
oddjob has joined #ruby
<AlexJakeGreen> Or specify separator File.readlines 'file1', "\r"
aupadhye has quit [Ping timeout: 250 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmes1 has quit [Ping timeout: 256 seconds]
<flughafen> grrrrrrr
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<oddjob> morning. question: how come when i run IO.copy_stream(open('some_site_some_file'), 'some_destination') I get back a LoadError - cannot load such file. But the file still downloads
TomPeed has joined #ruby
volty has joined #ruby
chthon has quit [Ping timeout: 245 seconds]
ta has joined #ruby
colegatron_origi has quit [Ping timeout: 264 seconds]
colegatron_origi has joined #ruby
decoponio has joined #ruby
Xeago has quit [Remote host closed the connection]
sakix has joined #ruby
sgambino has joined #ruby
usershell has joined #ruby
dtordable has quit [Quit: leaving]
<shevy> that is not the error
<oddjob> shevy: what do you mean?
<shevy> here is how LoadError looks
<shevy> LoadError: cannot load such file -- foo
<oddjob> Exception `LoadError' at C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.0.0/rubygems.rb:1096 - cannot load such file -- rubygems/defaults/ruby
<shevy> ok
Mon_Ouie has joined #ruby
<oddjob> sorries
aupadhye has joined #ruby
aupadhye has quit [Client Quit]
aupadhye has joined #ruby
hiyosi has joined #ruby
platzhirsch has joined #ruby
<shevy> hmm rubygems.rb pulls in defaults.rb
<shevy> I am not sure what tries to pull in rubygems/defaults/ruby.rb
<shevy> is that a custom addon?
<oddjob> well. its puppet bundle, so likely
tuxillo has joined #ruby
<tuxillo> hello
<tuxillo> what's the best way to communicate two different ruby processes?
<tuxillo> (one is a sinatra app, the other one a daemonized ruby program)
atomical has joined #ruby
<shevy> oddjob weird, I do not have any defaults/ directory at all... I think this must be a custom addon
<tuxillo> IPC?
<oddjob> shevy: ok. well. its a single line, and it works, so Ill just ignore the error
sakix has quit [Ping timeout: 272 seconds]
<jhass> tuxillo: IPC is just a generic term for communicating between two processes
<jhass> ?best
<ruby[bot]> "better" and "best" depend entirely on your context. Try to describe what quality would make one thing better than the other.
<jhass> describe what kind of communication you want and why
atomical_ has quit [Ping timeout: 245 seconds]
<oddjob> shevy: this is the only file in the defaults directory - operating_system.rb - if youre interested - https://gist.githubusercontent.com/anonymous/c2ce1031eef2c115eaf4/raw/3e3f8fd3147317e452642ba2438b9e24a5770a6d/asd.rb
JDiPierro has quit [Remote host closed the connection]
<tuxillo> jhass: the sinatra app will send a command, the ruby program obeys. just one way
chipotle has joined #ruby
<jhass> tuxillo: still vague
<oddjob> anyhow. thanks. im not too concerned on fixing it
<shevy> oddjob aha... so I assume that the main purpose of that file is to do: require 'devkit'
<volty> tuxillo: drb
aganov has quit [Remote host closed the connection]
<oddjob> shevy: looks like it ya
<pantato> quit
<tuxillo> jhass: sure it is vague, I don't know what I'm going to do just yet
atomical_ has joined #ruby
<tuxillo> volty: oh interesting, thx
<jhass> tuxillo: so you're looking for a solution to a problem you don't actually have yet? that's hard to believe tbh
<volty> tuxillo: start with it. It will clear your ideas too.
<tuxillo> jhass: is it not the case for most starts?
<tuxillo> volty: k
<jhass> uh no, at least I learn technologies to investigate whether they solve my problem
<AlexJakeGreen> tuxillo, you can keep queue in db. sinatra puts a task into queue, daemon reads from db and sets status
<tuxillo> is that easier?
Shaboum has quit [Quit: WeeChat 1.4]
baweaver has joined #ruby
<jhass> depends on your context
<AlexJakeGreen> it depends
chthon has joined #ruby
<jhass> there's a shitload of ready made solutions for queue systems
<volty> jhass: try to be more abstract :), ppl know that can communicate but, not having tried yet, have pretty abstract ideas about
<jhass> whether a queue system is what you need, who knows
atomical has quit [Ping timeout: 240 seconds]
<tuxillo> well, the high level problem is. one sinatra app receives a GET or POST and it has to inform a daemon of the parameters (json file)
<volty> better with drb, you can queue on the fly
<jhass> tuxillo: _why_?
<jhass> what's to be done?
<tuxillo> update some files at OS level
nettoweb has joined #ruby
<jhass> why can't it happen inside the request cycle? permission issues? taking too long?
Toledo|gone has joined #ruby
oivoodoo_ has joined #ruby
<jhass> what's "OS level"?
<tuxillo> I don't want to run the sinatra app as root
<tuxillo> and it's gotta be root to change those files
troulouliou_div2 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<tuxillo> but isn't all this out of the scope of "communicate two processes" ?
Brklyn has joined #ruby
<jhass> "communicate two processes" is still the solution you think you need, I'm trying to get through to you actual problem
<jhass> *your
gnudon has quit [Remote host closed the connection]
<tuxillo> ok, there you have it then
emilford has quit [Ping timeout: 240 seconds]
<jhass> why can't the files be made writable by the sinatra app?
baweaver has quit [Ping timeout: 272 seconds]
<tuxillo> change files in the filesystem where only root can write via http methods
<AlexJakeGreen> if filenames are known, you can just give permission to modify them by sinatra's user. for example, sudo
<tuxillo> I better don't do that
<jhass> because?
<apeiros> hi jhass
<volty> my problem is: 1) I want to send whatever I want to a daemon 2) I want to do whatever I want in the daemon
<jhass> apeiros: hey ;)
Toledo|gone is now known as croberts
<jhass> did I missed anything?
<volty> nice to clear else's ideas, bad to interrogate like a police officer
<tuxillo> they are /etc files, I just don't want to change permissions
<jhass> volty: my recommendation would then be: do it however you want
oivoodoo has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
Sucks has joined #ruby
<volty> jhass: nm, do not take me too serious :)
dtordable has joined #ruby
<jhass> tuxillo: making a couple of files writable doesn't make the entire directory writable. Heck you don't even need the execute bit on the parent directories if you know the paths
frem has joined #ruby
<jhass> aside from that, you probably also can let whatever reads those files read them from elsewhere
<volty> jhass: I'm happy if you (or we) find another, simpler, solution to tuxillo's problems. Imho it's better he starts to serve a command dispatcher (or queue) with drb — could be he himself finds another solution; for sure he will learn something useful
emilford has joined #ruby
<tuxillo> writeable by who? are we talking about ACLs?
rippa has joined #ruby
<jhass> the sinatra app
diegoviola has joined #ruby
<tuxillo> the sinatra app will run as an unprivileged user. what would be my options here? I add this user to a group and set only write permissions to that group in that particular file(s) ?
BlkDynmt has joined #ruby
dhollinger has joined #ruby
<jhass> why I'm still going: I would consider having another ruby process run as root that gets arbitrary user input forwarded only marginally better than having the sinatra app be able to write the files directly (without running as root itself), most likely not worth the extra effort and resources
<jhass> tuxillo: for example, yes
<volty> tuxillo: can't you simply run, for that purpose, suid script?
<volty> a suid script ?
<AlexJakeGreen> or edit /etc/sudoers and run sudo
Xeago has joined #ruby
emilford has quit [Ping timeout: 245 seconds]
<tuxillo> sudo and changing permissions require work from the unix team and I don't want to count on that. with regards to "arbitrary user input" you are assuming it's going to be an user and not another application the one feeding the sinatra app this input
lindistock has quit [Remote host closed the connection]
oivoodoo_ has quit [Remote host closed the connection]
Pande has quit [Ping timeout: 264 seconds]
<volty> Whichever way it could be done, to me tuxillo's idea seems nice. A solution that you can learn from.
<tuxillo> absolutely.
<apeiros> tuxillo: any input on an application is user-input, even if it's not a human ;-)
griffindy has joined #ruby
<jhass> stuff that comes in via the network is better considered user input
<apeiros> and user-input is never to be trusted
<tuxillo> I understand the problems of having a daemon running as root in the background
<apeiros> that simple rule makes a ton of a difference in application stability and security.
<tuxillo> ok, then user-input but via a template from another app
<volty> it's filtered user input.
<tuxillo> another option would be a helper suid program only and not a daemon. it would just get some file and copy it over, leaving a backup of the previous one
<volty> or better: mapped
JDiPierro has joined #ruby
huyderman has quit [Read error: Connection reset by peer]
<tuxillo> so you just use it when doing whatever you're doing
hlegius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tuxillo> (in this copy updating a config file in /etc)
<tuxillo> *in this case
emilford has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skullcrasher_ is now known as skullcrasher
oddjob has quit [Ping timeout: 252 seconds]
<volty> I like daemons. They let you centralize
bodi has joined #ruby
<tuxillo> me too :)
<volty> And less mess respect to on-fly scripts
skade has joined #ruby
JDiPierro has quit [Remote host closed the connection]
bigkevmcd has quit [Quit: Outta here...]
<tuxillo> with regards to communicating the app that sends the data to the other sinatra app I was thinking in something like oauth
<tuxillo> client-id and client secret
asccigcc has joined #ruby
<tuxillo> so it only accepts that
JDiPierr_ has joined #ruby
<tuxillo> not sure how that's done tho
sandstrom has joined #ruby
krz has quit [Ping timeout: 260 seconds]
emilford has quit [Ping timeout: 265 seconds]
rodfersou is now known as rodfersou|lunch
<volty> Think it out yourself, just start tweaking with drb. You'll find it useful & amusing to inject authorization code into the object Drb is going to serve. imho
asccigcc has quit [Ping timeout: 260 seconds]
Bloomer has joined #ruby
oivoodoo has joined #ruby
blackmes1 has joined #ruby
emilford has joined #ruby
JDiPierr_ has quit [Remote host closed the connection]
<volty> On the desktop I have a growsing ruby (qt) app that funcs as a daemon. Till now it receives & sends through dbus. But probably going to extend it with drb.
oivoodoo has quit [Remote host closed the connection]
JDiPierro has joined #ruby
oivoodoo has joined #ruby
hiyosi has quit [Quit: Textual IRC Client: www.textualapp.com]
dlitvak has joined #ruby
<volty> going to feed it, bye *
volty has quit [Quit: Konversation terminated!]
oivoodoo_ has joined #ruby
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
dml337ira has joined #ruby
BlkDynmt has quit [Quit: BlkDynmt]
dml337ira has quit [Max SendQ exceeded]
JDiPierro has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 260 seconds]
dlitvak_ has quit [Ping timeout: 245 seconds]
uri_ has joined #ruby
dionysus69 has joined #ruby
oivoodoo has quit [Ping timeout: 260 seconds]
blackmes1 has quit [Ping timeout: 276 seconds]
sankaber has joined #ruby
Liquid-- has joined #ruby
bigkevmcd has joined #ruby
bigkevmcd has quit [Excess Flood]
emilford has joined #ruby
bigkevmcd has joined #ruby
ElFerna has quit [Ping timeout: 250 seconds]
bigkevmcd has quit [Excess Flood]
idefine has joined #ruby
bigkevmcd has joined #ruby
kies^ has joined #ruby
sankaber has quit [Remote host closed the connection]
sankaber has joined #ruby
<alem0lars> I want to make the rake task 'test' to depend upon another task, however 'test' isn't defined manually but with 'Rake::TestTask' instead. How can I add a dependency to 'task'?
<tuxillo> ok thanks guys
<alem0lars> This is because when I run 'rake test' I need to always run 'rake build' before, so I need to make 'test' depend upon 'build'
emilford has quit [Ping timeout: 240 seconds]
sftrabbit has quit [Quit: sftrabbit]
<jhass> alem0lars: let's take a look at Rake::TestTask's docs then!
<manveru> alem0lars: basically, `task test: :build`
casadei has quit [Remote host closed the connection]
idefine has quit [Read error: Connection reset by peer]
<manveru> if that doesn't work, i'll have to actually check :P
jbrhbr has quit [Quit: Leaving.]
centrx has joined #ruby
<jhass> interesting, indeed no option there, so ^
<jhass> reopen the task and add the dependency
skade has quit [Quit: Computer has gone to sleep.]
emilford has joined #ruby
sasasekaric has joined #ruby
Rickmasta has joined #ruby
RegulationD has joined #ruby
uri_ has quit [Read error: Connection reset by peer]
idefine has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
devbug has joined #ruby
tulak has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yoongkang has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 264 seconds]
sasasekaric has quit [Quit: sasasekaric]
sakix has joined #ruby
James1 has quit [Quit: WeeChat 1.4]
tulak has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
devbug has quit [Ping timeout: 260 seconds]
emilford has joined #ruby
Abrin has joined #ruby
Xeago has joined #ruby
idefine has quit [Remote host closed the connection]
kies^ has quit [Ping timeout: 265 seconds]
Ishido has quit [Remote host closed the connection]
casadei has joined #ruby
sakix has quit [Ping timeout: 276 seconds]
aufi has quit [Quit: Konversation terminated!]
tjbiddle has quit [Quit: tjbiddle]
idefine has joined #ruby
Ishido has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
lxsameer has quit [Quit: Leaving]
RegulationD has quit [Remote host closed the connection]
RegulationD has joined #ruby
<c355e3b> anyone ever turn a gem into a osx install package?
<c355e3b> i know that omnibus can do it, but i rather not go that route
JDiPierro has joined #ruby
mfb2 has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
babblebre has joined #ruby
sky_grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
RegulationD has quit [Ping timeout: 245 seconds]
Burgestrand has joined #ruby
dexter_ has quit [Ping timeout: 250 seconds]
sftrabbit has joined #ruby
JDiPierro has quit [Ping timeout: 240 seconds]
sergey_makagon has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 276 seconds]
ljames has joined #ruby
sftrabbit has quit [Client Quit]
piotrj has quit [Remote host closed the connection]
sftrabbit has joined #ruby
idefine has quit [Remote host closed the connection]
sftrabbit has quit [Client Quit]
sftrabbit has joined #ruby
x77686d has joined #ruby
oivoodoo_ has quit [Remote host closed the connection]
<cscheib_> c355e3b: maybe fpm?
tomchapin has joined #ruby
oivoodoo has joined #ruby
jam_ has joined #ruby
idefine has joined #ruby
zast has joined #ruby
<c355e3b> cscheib_: ill check it out
treehug88 has joined #ruby
Limix has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
moeabdol has joined #ruby
jam_ has quit [Ping timeout: 256 seconds]
visudo has joined #ruby
dwfait has quit [Remote host closed the connection]
emilford has joined #ruby
<tuxillo> laters
tuxillo has left #ruby [#ruby]
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
chussenot has quit [Quit: chussenot]
benoror has joined #ruby
dwfait has joined #ruby
pdoherty has joined #ruby
treehug88 has quit [Read error: Connection reset by peer]
kies^ has joined #ruby
toretore has joined #ruby
mfb2 has quit [Remote host closed the connection]
asccigcc has joined #ruby
moeabdol has quit [Client Quit]
skade has joined #ruby
chouhoulis has joined #ruby
<carella_> TIL 1..(1/0.0)
carella_ is now known as carella
Meow-J has joined #ruby
tulak has joined #ruby
<lucasb> someone opened issue #12029 that is related to the Enumerable block arguments I talked about yesterday. But it is already closed, so I guess I'll get no further explanation on that. :(
TheHodge has quit [Quit: Connection closed for inactivity]
rodfersou|lunch is now known as rodfersou
mdw has joined #ruby
synthroid has quit [Remote host closed the connection]
sftrabbit has quit [Quit: sftrabbit]
<havenwood> carella: 1.step
tvw has joined #ruby
<havenwood> >> 1.step.size
<ruby[bot]> havenwood: # => Infinity (https://eval.in/509445)
sepp2k has joined #ruby
<shevy> Infinity was reached
vishwa has joined #ruby
<carella> havenwood: thanks, that's better(
psy has joined #ruby
<vishwa> I have an array of arrays. I want to operate on each element. How do I do that? Just bigarray.each do |small| ?
psy has quit [Max SendQ exceeded]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lucasb> exactly that
sgambino has joined #ruby
<vishwa> thanks lucasb
dudedudeman has joined #ruby
psy has joined #ruby
Scriptonaut has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
Xeago has quit [Remote host closed the connection]
tulak has quit [Remote host closed the connection]
sgambino has quit [Client Quit]
mfb2 has joined #ruby
sgambino has joined #ruby
sgambino has quit [Client Quit]
sgambino has joined #ruby
arup_r has quit [Remote host closed the connection]
BlkDynmt has joined #ruby
hobodave has joined #ruby
ElFerna has joined #ruby
<carella> havenwood: 1.step works since 2.1, right?
emilford has quit [Ping timeout: 256 seconds]
emilford has joined #ruby
gambl0re has quit []
dopamean_ has quit [Ping timeout: 276 seconds]
sergey_makagon has joined #ruby
kfpratt has joined #ruby
oivoodoo has quit [Remote host closed the connection]
aswen has quit [Ping timeout: 250 seconds]
oivoodoo has joined #ruby
<dudedudeman> i have a small bit that i’m trying to run httparty with, but i think i’m having issues finishing it out
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ElFerna has quit [Ping timeout: 240 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> no party for the dudedudeman!
<dudedudeman> hey now! haha. gist incoming
skade has quit [Ping timeout: 240 seconds]
sgambino has joined #ruby
<dudedudeman> here’s where i’m at: https://gist.github.com/anonymous/36ca8987b54acdb8422d
jespada has quit [Quit: WeeChat 1.5-dev]
<dudedudeman> i basically am trying to parse the link i throw and have it return a specific link to a file to download
arthropododo has joined #ruby
oivoodoo has quit [Ping timeout: 260 seconds]
skade has joined #ruby
<lucasb> @response vs. response
arup_r has joined #ruby
<lucasb> I don't even know if just plain 'response' without @ worked for you
oivoodoo has joined #ruby
vishwa is now known as PaperSoldier
<dudedudeman> i’ll try
oivoodoo has quit [Remote host closed the connection]
oivoodoo has joined #ruby
<dudedudeman> when i run it, whether with @response or not, i get a undefined method “BODY” error, on line 17
nanoz has joined #ruby
pwnd_nsfw` has joined #ruby
Liquid-- has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> dudedudeman: class Foo; @this_foo = :is_totatlly_different_from; def bar; @this_foo; end; end;
tildes has joined #ruby
<AlexJakeGreen> initialize your variables in constructor
<dudedudeman> ^ bah! lemme do that
sftrabbit has joined #ruby
arup_r has quit [Ping timeout: 272 seconds]
pwnd_nsfw has quit [Ping timeout: 240 seconds]
<dudedudeman> jhass: can you elaborate?
yoongkang has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Jackneill has joined #ruby
karapetyan has quit [Remote host closed the connection]
william3 has joined #ruby
sakix has joined #ruby
underplank has joined #ruby
<jhass> well, saying more than that the @foo inside and outside a method definition are belonging to entirely different instances would go into explaining that classes are objects which too have singleton classes and stuff
<jhass> not sure you want that at this point
dopamean_ has joined #ruby
<dudedudeman> i’m not sure i know what i want
rzs has joined #ruby
idefine has quit [Read error: Connection reset by peer]
sgambino has joined #ruby
karapetyan has joined #ruby
kirun has joined #ruby
agentmeerkat has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
zambini has joined #ruby
idefine has joined #ruby
<dudedudeman> i honestly think i’m over complicating this for myself
solars has quit [Ping timeout: 250 seconds]
<dudedudeman> i just want to parse that url, and then have it return the output of one of the json bits
sakix has quit [Ping timeout: 264 seconds]
yoongkang has quit [Ping timeout: 260 seconds]
huQeQwdpu47q has quit [Ping timeout: 256 seconds]
<rzs> Im using the celluloid/zmq gem to use ZeroMQ in my ruby application. I came across a weird issue and to demonstrate that i have created a sample server and two clients that connect to the server using push-pull
hxegon has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DoubleMalt has quit [Remote host closed the connection]
hxegon has quit [Client Quit]
<rzs> I notice that when client1 goes to sleep immediately the message by client2 is processed by the server
hxegon has joined #ruby
huyderman has joined #ruby
<rzs> But if i write the server like https://gist.github.com/razasayed/0c90e60f95de5d87cc03, then when client1 goes to sleep for a min the server waits for 1 min before processing the message by client2
dudedudeman has quit [Quit: dudedudeman]
<rzs> can anyone please explain why this happens ?
arup_r has joined #ruby
[Butch] has joined #ruby
baweaver has joined #ruby
<rzs> not sure if this is the right channel to post this, but if someone has experience with this please help, thanks
baweaver has quit [Remote host closed the connection]
bodi has quit [Remote host closed the connection]
cschneid_ has joined #ruby
baweaver has joined #ruby
<jhass> rzs: just a side note, a gist can have more than one file
<gregf_> docker exec -it 29beaa3f5c41 bash
<gregf_> oops :/
<gregf_> sorry
<rzs> jhass: thats right, i just created separate ones :). Ill create one with all of them in it
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
dudedudeman has joined #ruby
synthroid has joined #ruby
amclain has joined #ruby
dwfait has quit [Remote host closed the connection]
robbyoconnor has quit [Quit: Konversation terminated!]
robbyoconnor has joined #ruby
dudedudeman has quit [Client Quit]
AlexJakeGreen has quit [Quit: Leaving]
<rzs> i notice that when i call a method in my cellulid actor from a separate class, then that method is executed synchronously. is that the way it is supposed to work ?
PaperSoldier has left #ruby [#ruby]
grill has joined #ruby
<adam12> Any HN diehards remember seeing a gem released by a visible company (Pinterest, Etsy, etc) a few months ago that would clone production database data and anonymize it, allowing you to safely use it in staging / dev environments? I can't seem to find it :\
pec has quit [Remote host closed the connection]
dlitvak has quit [Remote host closed the connection]
rakm has joined #ruby
<shevy> lol
idefine has quit [Read error: Connection reset by peer]
wldcordeiro has joined #ruby
Guest38 has joined #ruby
binaryplease has joined #ruby
huQeQwdpu47q has joined #ruby
c0ncealed has quit [Remote host closed the connection]
sneakerhax has joined #ruby
andikr has quit [Read error: Connection reset by peer]
idefine has joined #ruby
c0ncealed has joined #ruby
baweaver has quit [Remote host closed the connection]
ElFerna has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
oddjob has joined #ruby
fbandov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<oddjob> is there a way to use a require later on in a script? say the first part of the script actually downloads and installs the gem, and THEN I need to require it once its there
<zambini> Does a Gemfile not solve your problem? Or do you _have_ to download it at runtime?
idefine has quit [Read error: Connection reset by peer]
<oddjob> unfortunately i am handcuffed at downloading it at run_time - due to how the other system its going in to allows ruby to run
usershell has quit [Remote host closed the connection]
<oddjob> and because it evaluates the require first, it never runs because the directory doesnt exist yet
elifoster has joined #ruby
oivoodoo_ has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
oivoodoo_ has quit [Remote host closed the connection]
RegulationD has joined #ruby
newbie22 has quit [Quit: Leaving]
william3 has quit [Ping timeout: 250 seconds]
oivoodoo_ has joined #ruby
idefine has joined #ruby
dudedudeman has joined #ruby
shinnya has joined #ruby
saneax is now known as saneax_AFK
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
oivoodoo has quit [Ping timeout: 250 seconds]
<jhass> oddjob: should work, require is just a method call. Worst case you have to burst a few caches inside rubygems
cyclonis has joined #ruby
lee-jon has left #ruby [#ruby]
<cyclonis> python is awesomeeeeeeeeeeeeeeeeeeeee
karmatr0n has joined #ruby
symm- has joined #ruby
mjuszczak has joined #ruby
ccaffeini has quit [Remote host closed the connection]
dudedudeman has quit [Quit: dudedudeman]
william3 has joined #ruby
chthon has quit [Quit: Ex-Chat]
nettoweb has joined #ruby
<oddjob> jhass: k. thanks. I figured that was the next step
<oddjob> I think the server that calls the rb file actually attempts to check all requires first. since if any gems it requires are missing, it stops before it even runs
Waheedi has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
saneax_AFK is now known as saneax
einarj has quit [Remote host closed the connection]
<jhass> seems unlikely but if you say so
dwfait has joined #ruby
<toretore> doesn't bundler do that?
dfockler has joined #ruby
jaiks has quit [Ping timeout: 240 seconds]
Bloomer has quit [Remote host closed the connection]
creat has joined #ruby
ccaffeini has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
rzs has quit [Quit: Page closed]
codecop has quit [Remote host closed the connection]
krobzaur_ has joined #ruby
sgambino has joined #ruby
tomchapin has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> no
<jhass> that is bundler doesn't scan require's
x77686d has quit [Quit: x77686d]
chipotle has quit [Quit: cheerio]
Alayde has joined #ruby
krobzaur has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
elaptics is now known as elaptics`away
Alayde has left #ruby [#ruby]
Waheedi has quit [Quit: Waheedi]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ss_much has joined #ruby
Burgestrand has joined #ruby
n00bdev has joined #ruby
sgambino has joined #ruby
arlek has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
aswen has joined #ruby
_djbkd has joined #ruby
TomyWork has quit [Ping timeout: 248 seconds]
juddey has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
oivoodoo has joined #ruby
SCHAAP137 has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
Trynemjoel has joined #ruby
joonty has quit [Ping timeout: 272 seconds]
saneax is now known as saneax_AFK
arlek has quit [Ping timeout: 240 seconds]
oivoodoo_ has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
UtkarshRay has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
Dimik has joined #ruby
dudedudeman has joined #ruby
evidex has quit [Ping timeout: 272 seconds]
idefine has quit [Remote host closed the connection]
william3 has quit [Remote host closed the connection]
fantazo has joined #ruby
oivoodoo has quit [Ping timeout: 256 seconds]
Azulinho has quit [Ping timeout: 240 seconds]
Guest38 has quit [Read error: Connection reset by peer]
jbrhbr has joined #ruby
firstdayonthejob has joined #ruby
william3 has joined #ruby
colli5ion has quit []
pandaant has joined #ruby
elifoster has quit [Ping timeout: 260 seconds]
musicnode has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
uri_ has joined #ruby
Shaboum has joined #ruby
william3 has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 240 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
mark2 has quit [Remote host closed the connection]
Ishido has quit [Ping timeout: 250 seconds]
camillo has joined #ruby
Ishido has joined #ruby
jam_ has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
sol_ has quit [Ping timeout: 240 seconds]
TomyLobo has joined #ruby
dwfait has quit [Remote host closed the connection]
RegulationD has quit []
camillo is now known as sol_
uri_ has quit [Quit: --]
JDiPierro has joined #ruby
usershell has joined #ruby
baweaver has joined #ruby
usershell has quit [Remote host closed the connection]
_djbkd has quit [Quit: My people need me...]
jam_ has quit [Ping timeout: 264 seconds]
musicnode has quit [Quit: musicnode]
sigurding has joined #ruby
emilford has quit [Ping timeout: 260 seconds]
uri_ has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
_djbkd has joined #ruby
binaryplease has quit [Ping timeout: 245 seconds]
gambl0re has joined #ruby
cpup has quit [Ping timeout: 272 seconds]
doodleha_ has joined #ruby
emilford has joined #ruby
cpup has joined #ruby
krobzaur_ has quit [Read error: Connection reset by peer]
krobzaur_ has joined #ruby
Snowy has quit [Remote host closed the connection]
sneakerhax has quit [Ping timeout: 272 seconds]
tildes has quit [Remote host closed the connection]
poguez_ has joined #ruby
uri_ has quit [Quit: --]
arup_r has quit []
dtordable has quit [Remote host closed the connection]
uri_ has joined #ruby
troulouliou_div2 has quit [Ping timeout: 250 seconds]
dwfait has joined #ruby
sheperson has joined #ruby
arlek has joined #ruby
dtordable has joined #ruby
nofxx has joined #ruby
x77686d has joined #ruby
devbug has joined #ruby
mjuszczak has quit []
dwfait has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
dopie has quit [Quit: Lost terminal]
hobodave has joined #ruby
dopie has joined #ruby
uri_ has quit [Quit: --]
devbug has quit [Ping timeout: 264 seconds]
stamina has joined #ruby
newbie22 has joined #ruby
musicnode has joined #ruby
uri_ has joined #ruby
jaiks has joined #ruby
Mikasd has joined #ruby
casadei has quit [Remote host closed the connection]
ElFerna has joined #ruby
n00bdev has quit []
pawnbox has quit [Ping timeout: 265 seconds]
BTRE has quit [Ping timeout: 250 seconds]
fantazo has quit [Ping timeout: 256 seconds]
BTRE has joined #ruby
musicnode has quit [Quit: musicnode]
sftrabbit has quit [Quit: sftrabbit]
ElFerna has quit [Ping timeout: 245 seconds]
gambl0re has quit [Read error: Connection reset by peer]
tjohnson has joined #ruby
gambl0re has joined #ruby
gambl0re has joined #ruby
joonty has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexherbo2 has joined #ruby
Jackneill has quit [Ping timeout: 265 seconds]
Mikasd has quit [Remote host closed the connection]
rontec76 has joined #ruby
stamina has quit [Ping timeout: 276 seconds]
visudo has quit [Quit: visudo]
sakix has joined #ruby
joonty has quit [Ping timeout: 276 seconds]
cactuzzz has joined #ruby
musicnode has joined #ruby
newbie22 has quit [Quit: Leaving]
musicnode has quit [Client Quit]
mdw has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
uri_ has quit [Quit: --]
zast has quit [Remote host closed the connection]
baweaver has joined #ruby
kirillzh has joined #ruby
sakix has quit [Ping timeout: 250 seconds]
kirun_ has joined #ruby
uri_ has joined #ruby
baweaver has quit [Remote host closed the connection]
casadei has joined #ruby
iateadonut has quit [Quit: Leaving.]
govg has quit [Ping timeout: 265 seconds]
kirun has quit [Ping timeout: 264 seconds]
visudo has joined #ruby
dexter_ has joined #ruby
piotrj has joined #ruby
ElFerna has joined #ruby
workmad3 has joined #ruby
dexter_ has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BTRE has quit [Ping timeout: 245 seconds]
musicnode has joined #ruby
kirillzh has joined #ruby
nettoweb has joined #ruby
codecop has joined #ruby
platzhirsch has left #ruby [#ruby]
postmodern has joined #ruby
dlitvak has joined #ruby
asccigcc has quit [Ping timeout: 240 seconds]
asccigcc has joined #ruby
<jimeh> oddjob: how about using a Gemfile and just calling `system("bundle install")` at the very beginning of the boot up process of your code?
nanoz has quit [Ping timeout: 260 seconds]
musicnode has quit [Quit: musicnode]
uri_ has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
underplank has quit [Quit: underplank]
sftrabbit has joined #ruby
Azulinho has joined #ruby
musicnode has joined #ruby
BTRE has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
asccigcc has quit [Ping timeout: 240 seconds]
zerowaitstate has joined #ruby
cdg has quit [Remote host closed the connection]
asccigcc has joined #ruby
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti> Hi
<GeorgesLeYeti> I have a stupid question
<GeorgesLeYeti> why when i make 2.47+0.2 it returns me 2.6700000000000004
[Butch]_ has joined #ruby
[Butch] has quit [Read error: Connection reset by peer]
[Butch]_ is now known as [Butch]
mdw has quit [Quit: Sleeping Zzzzz]
musicnode has quit [Quit: musicnode]
Insti has quit [Ping timeout: 265 seconds]
<lucasb> because that's the nature of floating point numbers
Insti has joined #ruby
<GeorgesLeYeti> hmm ok but still weird
musicnode has joined #ruby
<eam> GeorgesLeYeti: it's because computers use base 2
mjuszczak has joined #ruby
<eam> base 2 decimals and base 10 decimals have different values which they cannot represent with precision
<lucasb> (Rational('2.47') + Rational('0.2')).to_f #=> 2.67
asccigcc has quit [Quit: asccigcc]
<eam> with base 10 you can see that with the fraction 1/3, which is a repeating 0.33333333
dseitz has joined #ruby
<Ox0deb> GeorgesLeYeti: http://floating-point-gui.de/
idefine has joined #ruby
<eam> with base 2, the fraction 1/10 (or 0.1) is similarly repeating
<Canar> ^ i parsed that url at first as "floating point gui (from germany)"
<Ox0deb> >> (2.47r + 0.2r).to_f # lucasb
<ruby[bot]> Ox0deb: # => 2.67 (https://eval.in/509512)
<lucasb> Canar: lol, I mentally parsed the same way
<lucasb> Ox0deb: thank you. must easier on the fingers :)
<Ox0deb> Oui.
mjuszczak has quit [Client Quit]
musicnode has quit [Client Quit]
<GeorgesLeYeti> Ok i think I get it. Ty
TomPeed has joined #ruby
<Canar> GeorgesLeYeti: I spent a month on it in one class in my CS undergrad.
<Canar> The hard math of it is really fascinating
<Ox0deb> Mantissa is a pretty girl's name.
<Ox0deb> (Not really.)
mjuszczak has joined #ruby
<Canar> You'll often hear people speak of "epsilon". That's the smallest value that a float can differentiate.
<Ox0deb> >> Float::EPSILON
<ruby[bot]> Ox0deb: # => 2.220446049250313e-16 (https://eval.in/509513)
<Canar> Derives from those equations.
<Canar> ^
<lucasb> Mantissa is Abscissa's sister
<eam> only e-16?
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0deb> Yes?
aswen has quit [Ping timeout: 250 seconds]
kirillzh has joined #ruby
<Ox0deb> IEEE 754 is the same everywhere.
idefine has quit [Remote host closed the connection]
oddjob has quit [Ping timeout: 252 seconds]
<eam> it should be e-53 if it's a double no?
arup_r has joined #ruby
dopie has quit [Quit: Lost terminal]
dopie has joined #ruby
sheperson has quit [Quit: sheperson]
<eam> Ox0deb: I know it's the same everywhere but isn't that the wrong value for IEEE 754?
huQeQwdpu47q has quit [Quit: Leaving]
<eam> even a single precision float is e-24
mjuszczak has quit [Client Quit]
<eam> (but I thought floats were doubles in ruby)
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
dwfait has joined #ruby
mjuszczak has joined #ruby
atomical has joined #ruby
<eam> they are doubles - this looks wrong
<Ox0deb> >> Float::MIN # eam
<ruby[bot]> Ox0deb: # => 2.2250738585072014e-308 (https://eval.in/509514)
workmad3 has quit [Ping timeout: 264 seconds]
idefine has joined #ruby
<Canar> he difference between 1 and the smallest double-precision floating point number greater than 1.
<Canar> ^ How it's defined in Ruby.
moeabdol has joined #ruby
<eam> oh, I see
<eam> nevermind
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
asccigcc has joined #ruby
newbie22 has joined #ruby
<eam> I was reading the base 2 exponent
musicnode has joined #ruby
idefine has quit [Remote host closed the connection]
atomical_ has quit [Ping timeout: 240 seconds]
<eam> >> 2**-53
<ruby[bot]> eam: # => (1/9007199254740992) (https://eval.in/509515)
moeabdol has quit [Client Quit]
<eam> >> (2**-53).to_f
<ruby[bot]> eam: # => 1.1102230246251565e-16 (https://eval.in/509516)
sasasekaric has joined #ruby
<eam> ish
hayden_ has quit [Quit: Connection closed for inactivity]
dwfait has quit [Remote host closed the connection]
<Ox0deb> >> 1 - 2.220446049250313e-17 == 1 # eam
<ruby[bot]> Ox0deb: # => true (https://eval.in/509517)
<Ox0deb> Float::EPSILON gives you the smallest number you can put in there and not break math.
asccigcc_ has joined #ruby
newbie22 has quit [Read error: Connection reset by peer]
<eam> yeah, I was thinking it should be on the order of a power of -53 -- but that's base two
asccigcc has quit [Ping timeout: 256 seconds]
<eam> power of -16 base 10
karapetyan has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
GeorgesLeYeti has quit [Quit: Quitte]
Xeago has joined #ruby
zeroDivisible has joined #ruby
<Ox0deb> >> 16 * Math.log2(10) # Well, there it is.
<ruby[bot]> Ox0deb: # => 53.150849518197795 (https://eval.in/509518)
Burgestrand has joined #ruby
[Butch]_ has joined #ruby
synthroid has quit [Remote host closed the connection]
Burgestrand has quit [Client Quit]
yqt has joined #ruby
<Ox0deb> Shame about not being able to use ε as the name of a constant.
<Ox0deb> Well, #const_set, but then you can't get at it with ::.
[Butch] has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
musicnode has quit [Quit: musicnode]
atomical_ has joined #ruby
karapetyan has joined #ruby
Sucks has quit [Read error: Connection reset by peer]
synthroid has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
PedramT has joined #ruby
govg has joined #ruby
musicnode has joined #ruby
dopie has quit [Quit: Lost terminal]
tvw has quit []
tvw has joined #ruby
dopie has joined #ruby
rakm has joined #ruby
[Butch]_ has quit [Ping timeout: 265 seconds]
atomical has quit [Ping timeout: 260 seconds]
yoongkang has joined #ruby
sasasekaric has quit [Quit: sasasekaric]
fantazo has joined #ruby
PedramT has quit [Ping timeout: 250 seconds]
[Butch]_ has joined #ruby
jbrhbr1 has joined #ruby
tvw has quit [Ping timeout: 250 seconds]
tvw has joined #ruby
yfeldblum has joined #ruby
jbrhbr has quit [Ping timeout: 240 seconds]
moeabdol has joined #ruby
musicnode has quit [Quit: musicnode]
robbyoconnor has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
yoongkang has quit [Ping timeout: 265 seconds]
idefine has joined #ruby
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
v0n has quit [Quit: WeeChat 1.0.1]
v0n has joined #ruby
vF3hNGxc47h8 has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
musicnode has joined #ruby
[Butch]_ has quit [Read error: Connection reset by peer]
[Butch] has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
devbug has joined #ruby
brainslug has quit [Ping timeout: 265 seconds]
darkf has quit [Quit: Leaving]
sneakerhax has joined #ruby
hlegius has joined #ruby
mdw has joined #ruby
AlexJakeGreen has joined #ruby
brainslug has joined #ruby
ElFerna_ has joined #ruby
idefine has quit [Remote host closed the connection]
terminalrecluse has joined #ruby
ElFerna has quit [Ping timeout: 265 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
huyderman has quit [Read error: Connection reset by peer]
ldnunes has quit [Quit: Leaving]
idefine has joined #ruby
atomical has joined #ruby
jam_ has joined #ruby
[Butch]_ has joined #ruby
maasha has joined #ruby
rontec76 has quit []
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
Snowy has joined #ruby
[Butch] has quit [Ping timeout: 245 seconds]
[Butch]_ is now known as [Butch]
stannard has quit [Remote host closed the connection]
<maasha> I need help to produce an idiot-proof app to run on Windows
hxegon has quit [Read error: Connection reset by peer]
<maasha> hence my question here ... ;o)
sigurding has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Snowy has quit [Remote host closed the connection]
<maasha> What are the options to create an app that can be run on Windows without having to install Ruby and all sorts of dependencies?
atomical_ has quit [Ping timeout: 240 seconds]
<jhass> traveling ruby I guess
ElFerna_ has quit [Ping timeout: 250 seconds]
FernandoBasso has joined #ruby
<Mon_Ouie> I've heard of people using ocra to generate their binaries
<maasha> jhass: yup, looks interesting. Anything else?
<jhass> not really, I don't use windows
jam_ has quit [Ping timeout: 276 seconds]
<maasha> jhass: ok
Snowy has joined #ruby
<maasha> Ox0deb: right
<maasha> What about shoes?
<Ox0deb> OCRA packaged up a GTK app just fine those many moons ago, for what that's worth.
<maasha> Ox0deb: I will have to investigate :o)
<Ox0deb> maasha: It's clearly not moved with the times, but nor really do Windows' core APIs, so it should still work just fine. :P
<maasha> What shoes clone is the main stream one?
hxegon has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
<Ox0deb> maasha: This doesn't bode well: https://twitter.com/steveklabnik/status/647167779469062144
<Ox0deb> Steve's the fellow who tried to revive the project.
[Butch]_ has joined #ruby
blackmes1 has joined #ruby
<maasha> Ox0deb: shoes died several times IIRC
rodfersou is now known as rodfersou|dinner
ElFerna_ has joined #ruby
vF3hNGxc47h8 has quit [Ping timeout: 240 seconds]
<Ox0deb> maasha: Fair enough. I guess Shoes 4 is still kicking, however limply: https://github.com/shoes/shoes4
[Butch] has quit [Ping timeout: 256 seconds]
[Butch]_ is now known as [Butch]
<maasha> jruby dependency
<maasha> nasty
x77686d has quit [Quit: x77686d]
idefine has quit [Remote host closed the connection]
<headius> maasha: why's that
<maasha> headius: I prefere MRI
hlegius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<headius> but why is JRuby nasty?
<Ox0deb> headius: Hazard a guess. :P
<Ox0deb> (At their reasoning, to clarify.)
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
workmad3 has quit [Ping timeout: 240 seconds]
rodfersou|dinner has quit [Quit: leaving]
<maasha> headius: Its build on Java and Oracle destroyed Java?
workmad3 has joined #ruby
* maasha ducks
RegulationD has joined #ruby
petricore has joined #ruby
petricore has quit [Max SendQ exceeded]
dtordable has quit [Quit: leaving]
skade has joined #ruby
<headius> a bit of an exaggeration
<newdan> maasha: How did Oracle destroy Java? By adding lambdas and streams?
dtordable has joined #ruby
p0wn3d has joined #ruby
idefine has joined #ruby
<headius> perhaps by getting it back on a regular release schedule and funding new features and optimizations
<Ox0deb> maasha: Might wanna run.
* maasha runs
<newdan> headius: Those bastards
* havenwood grabs a pitchfork for the maasha hunt
<headius> yeehaw!
sgambino has quit [Read error: Connection reset by peer]
<maasha> .oO(Java rednecks)
Azulinho has quit [Quit: Azulinho]
stannard has joined #ruby
_djbkd has quit [Remote host closed the connection]
bxfgc has joined #ruby
_djbkd has joined #ruby
william3 has joined #ruby
tomchapin has joined #ruby
Pumukel has joined #ruby
bxfgc has quit [Client Quit]
sandstrom has joined #ruby
aswen has joined #ruby
william3 has quit [Ping timeout: 240 seconds]
_djbkd has quit [Ping timeout: 265 seconds]
sgambino has joined #ruby
atomical_ has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
william3 has joined #ruby
ur5us has joined #ruby
Xeago has joined #ruby
dcunit3d has quit [Ping timeout: 265 seconds]
fantazo has quit [Quit: Verlassend]
AlexJakeGreen has quit [Quit: This computer has gone to sleep]
atomical has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
x77686d has joined #ruby
mfb2 has quit [Remote host closed the connection]
snguyen has joined #ruby
tomchapin has quit [Quit: Textual IRC Client: www.textualapp.com]
AlexJakeGreen has joined #ruby
tomchapin has joined #ruby
joonty has joined #ruby
idefine has quit [Remote host closed the connection]
Cohedrin has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
casadei has quit [Remote host closed the connection]
Waheedi has joined #ruby
baweaver has joined #ruby
sh1rt has joined #ruby
<sh1rt> Hello, I am not so familiar with Ruby, I am trying to run 'bundle install' within the directory of the project I pulled from git. Should I make a user to do this, as it says do not run as root
tvw has quit [Ping timeout: 265 seconds]
<newdan> Sh1rt: are you currently logged in as root?
<sh1rt> newdan: yes
sakix has joined #ruby
srenatus has quit [Quit: Connection closed for inactivity]
sgambino_ has joined #ruby
<newdan> Sh1rt: Then yeah
sgambino has quit [Ping timeout: 265 seconds]
yoongkang has joined #ruby
<newdan> Sh1rt: You're sure you're just not in an "administrator" account? The "whoami" says root?
joonty has quit [Ping timeout: 240 seconds]
<newdan> *whoami command
maasha has quit [Quit: Page closed]
_djbkd has joined #ruby
skcin7 has joined #ruby
<pantato> can someone explain to me like i'm 5 the difference between running a .rb script with the ruby command vs rspec?
felixal has joined #ruby
spider-mario has joined #ruby
sgambino_ has quit [Read error: Connection reset by peer]
sgambino has joined #ruby
<sh1rt> newdan no, I always su to root do to work, as my user account doesn't have sudo privledge on this box
idefine has joined #ruby
sakix has quit [Ping timeout: 245 seconds]
devbug has joined #ruby
<pantato> nvm
arup_r has quit []
<tjohnson> anyone know a good way to handle cases where an Enumerator throws an error on `next`? My first approach breaks pretty miserably: https://gist.github.com/no-reply/4b38f26b3fe32ad266a7
<sh1rt> newdan: would it be okay to do something like this su -c "bundle install" -s /bin/sh apache
phantummm has joined #ruby
<slash_nick> tjohnson: what do you mean? that's the expected behavior... you rescue StopIteration and move on...
<lucasb> did you meant to raise StandardError or StopIteration?
<tjohnson> slash_nick: i `break` on StopIteration
<tjohnson> lucasb: i mean StandardError
<slash_nick> yeah... you break out of your loop, i see that... tjohnson i don't understand your question
hobodave_ has joined #ruby
<slash_nick> (no idea what you want to do)
yfeldblum has quit [Ping timeout: 240 seconds]
<tjohnson> slash_nick: given some Enumerable that is doing something like `items.lazy.map { |blah| some_logic(blah) }`, what should I do if sometimes `#some_logic` throws an error
[Butch]_ has joined #ruby
<newdan> Sh1rt: At this point you'd know better than me. I only work as a non-root user and use sudo
<newdan> Sh1rt: Not sure about how the su command works, etc.
<tjohnson> slash_nick: ideally I'd like to handle the error and move to the next item
<Ox0deb> tjohnson: So you want the result to be [1,2,4,5]?
<Ox0deb> Repeating, of course.
codecop has quit [Remote host closed the connection]
<tjohnson> Ox0deb: yes; with the `break` line, not repeating
<Ox0deb> tjohnson: Then why the confusing `take(100)`?
<sh1rt> ah, i gave my user sudo priv, but when run 'sudo bundle install' I get bundle: command not found..
[Butch] has quit [Ping timeout: 245 seconds]
[Butch]_ is now known as [Butch]
<tjohnson> Ox0deb: the `take(100)` is just to demonstrate what actually happens
hobodave has quit [Ping timeout: 264 seconds]
<tjohnson> i.e. it seems odd to me that catching the exception and calling `my_enum#next` rewinds and starts fressh
<tjohnson> worst case, I'd expect `#next` after the catch to be an error
pdoherty has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
yalue has quit [Quit: return 0;]
astrofog has joined #ruby
sh1rt has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
rdark has quit [Ping timeout: 256 seconds]
<tjohnson> anyway, I'm guessing this is a dead end and Enumerators that don't handle their own errors aren't usable. :/
Shaboum has quit [Quit: WeeChat 1.4]
<tjohnson> I probably can work around it, was just hoping I was missing something obvious
saneax_AFK is now known as saneax
<slash_nick> tjohnson: yeah i'm toying with it... will you report back if you work around it?
piotrj has quit [Remote host closed the connection]
<tjohnson> slash_nick: +1
atomical has joined #ruby
podman has joined #ruby
workmad3 has joined #ruby
sigurding has quit [Quit: sigurding]
<lucasb> yeah, I'm curious too why the enumerator is getting rewind on errors. there must be some explanation
atomical_ has quit [Ping timeout: 260 seconds]
dcunit3d has joined #ruby
<slash_nick> lucasb: i don't see it talked about anywhere...
cdg has joined #ruby
_ht has quit [Quit: Konversation terminated!]
atomical_ has joined #ruby
sh1rt has joined #ruby
sh1rt has quit [Changing host]
sh1rt has joined #ruby
Domaldel is now known as Domaldel
Rickmasta has joined #ruby
<TomyLobo> Why do people commit Gemfile.lock to version control?
mdw has quit [Quit: Sleeping Zzzzz]
<tubbo> TomyLobo: in a rails app it makes it easer to know what gem versions are being shipped with the app
<TomyLobo> i see
<TomyLobo> but isnt the Gemfile supposed to do that?
<TomyLobo> or is it just committed for informational purposes?
<tubbo> TomyLobo: the "right" way to use bundler is to define open-ended version constraints in Gemfile, and use Gemfile.lock to store the actual full gem versions. that way, when you `bundle` after i've already created Gemfile.lock, you get the same versions of all the gems that I installed...even if newer versions have been released. that's why you have to `bundle update` when a gem is updated, instead of just
<tubbo> re-running `bundle`.
atomical has quit [Ping timeout: 240 seconds]
<tubbo> Gemfile.lock can be thought of as a human-readable database of gem dependencies, and it's actually what is read by Bundler when you are installing gems.
<newdan> TomyLobo: it tells you exactly what versions are in use. So there's no question what dependencies are where
bithon has joined #ruby
<tubbo> `bundle install` is a max 3-step process: 1.) figure out what gems to install, 2.) write all gems to Gemfile.lock, 3.) install all of the gems written in Gemfile.lock
<TomyLobo> down to the deepest leaf, even... i see
<tubbo> if you already have a Gemfile.lock, `bundle install` skips to step 3.
blackgoat has joined #ruby
gbgdev has quit [Remote host closed the connection]
<newdan> TomyLobo: My job when I first came here didn't commit Gemfile.lock and they used deploys from source-control. So it was anyone's guess what server had what version of what at any given time
ElFerna_ has quit [Ping timeout: 240 seconds]
dcunit3d has quit [Ping timeout: 250 seconds]
<tubbo> hah
yoongkang has quit [Remote host closed the connection]
<tubbo> TomyLobo: one caveat to this, committing Gemfile.lock is useless when developing a gem (or Rails plugin)
<tubbo> because it's actually using `gemspec`.
<tubbo> and your gem should be able to handle the version constraints it has defined in gemspec, if it can't it's time to update the version constraint or fix your gem.
gbgdev has joined #ruby
<TomyLobo> i havent looked into developing gems yet
<Ox0deb> tjohnson, slash_nick, lucasb: https://eval.in/509563
<Ox0deb> I feel like that's gotta be relevant.
<TomyLobo> just a couple of small scripts
<Ox0deb> Enumerators are implemented in terms of Fibers ("lightweight threads"), and the error in the enumeration is killing the underlying Fiber.
sh1rt has quit [Ping timeout: 240 seconds]
<Ox0deb> There's no Fiber#next, only #resume, so the enumeration can only rewind and try again.
Derailed has quit [Quit: ZNC - http://znc.in]
<tjohnson> Ox0deb++
Ox0deb is now known as Ox0dec
<tjohnson> that looks like an explanation
ElFerna_ has joined #ruby
<Ox0dec> I'm still gonna poke at it, though. :)
idefine has joined #ruby
Derailed has joined #ruby
<baweaver> Is that how dea came about?
<Ox0dec> Getting [1,2,4,5] outta thought would be interesting, and I'm sure norc and his infatuation with call/cc could get us there easily enough.
hectorcorrea1 has joined #ruby
<Ox0dec> baweaver: No, those are my initials.
mfb2 has joined #ruby
<baweaver> ah
<baweaver> that's right
agent_white has joined #ruby
<Ox0dec> Still, having one's nick reflect the number of times they've gotten kudos would be interesting.
<eam> Ox0dec << 1
binns has quit []
<Ox0dec> Stahp!
gbgdev has quit [Ping timeout: 260 seconds]
<Ox0dec> (I'm a Ruby Fixnum.)
<lucasb> Ox0dec: interesting. didn't know enumerators had anything to do with fibers.
<Ox0dec> Er, no, a C int.
<Ox0dec> ++ is in-place.
<lucasb> after all, enumerators can be lazy, but they are not async or concurrenty, right?
<Ox0dec> Right, but you've still gotta be able to resume them.
<Ox0dec> lucasb: Infinite loops are fine in Enumerators, after all. That can't work without being able to suspend them.
hobodave_ has quit [Quit: Computer has gone to sleep.]
<lucasb> yes, makes sense
mfb2 has quit [Ping timeout: 264 seconds]
<Ox0dec> Huh. Why on earth is Fiber#alive? not available without explicitly requiring the standard library?
freerobby has quit [Quit: Leaving.]
<Ox0dec> Even then, Enumerators don't expose their Fibers, and ObjectSpace is an awful way to go about finding them.
LoganG has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
<Ox0dec> They're stored in hidden instance variables, likelier than not.
aupadhye has quit [Ping timeout: 264 seconds]
mfb2 has joined #ruby
<lucasb> slash_nick: I'll read that article. Thanks for the link!
workmad3 has joined #ruby
tape88 has quit [Quit: Textual IRC Client: www.textualapp.com]
pandaant has quit [Remote host closed the connection]
pawnbox has joined #ruby
<lucasb> Ox0dec: hey, you can write an extension to expose enumerator's fiber as an attribute :)
Meow-J has quit [Quit: Connection closed for inactivity]
<lucasb> enum.get_my_damn_fiber
freerobby has joined #ruby
jud has quit [Quit: Leaving]
tape88 has joined #ruby
<tjohnson> it was pointed out to me that the behavior is identical to rewind, adding the `raise`
tape88 has quit [Client Quit]
ramfjord has quit [Ping timeout: 240 seconds]
ASTP001 has joined #ruby
<ASTP001> hi
sh1rt has joined #ruby
<ASTP001> i need help with haml, I'm not sure how to use conditionals to display a block
p0wn3d has quit [Ping timeout: 245 seconds]
tape88 has joined #ruby
synthroid has quit []
<ruby[bot]> ASTP001: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/9aa8ec8d9f58a522c39a
<ruby[bot]> ASTP001: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<ASTP001> this still shows up
AlexJakeGreen has quit [Quit: This computer has gone to sleep]
tape88 has quit [Max SendQ exceeded]
<newdan> ASTP001: What is that syntax? Why not just "- if false"
pawnbox has quit [Ping timeout: 245 seconds]
tape88 has joined #ruby
william3 has quit [Remote host closed the connection]
ramfjord has joined #ruby
graffix222 has joined #ruby
<ASTP001> hmm let me try it without the parens and the ?
sgambino has quit [Read error: Connection reset by peer]
dlitvak has quit [Remote host closed the connection]
lianj has quit [Read error: Connection reset by peer]
hayden_ has joined #ruby
graffix222 has quit [Remote host closed the connection]
hectorcorrea1 has left #ruby [#ruby]
<ASTP001> it says unexpected token false if i do that
[Butch] has quit [Ping timeout: 245 seconds]
graffix222 has joined #ruby
[Butch] has joined #ruby
<newdan> ASTP001: Can you give a bigger snippet? Something is wrong outside of this part of your code
<newdan> ASTP001: That error doesn't make any sense
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ta has quit [Ping timeout: 245 seconds]
<ASTP001> it's just more nested markup
musicnode has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
<newdan> ASTP001: I'm pretty sure something else is wrong. I don't even understand how "-if (false)?" works, tbh
joonty has joined #ruby
krobzaur_ has quit [Ping timeout: 256 seconds]
<ASTP001> hmm
<newdan> ASTP001: If I use that, I get a syntax error
<ASTP001> yeah i did too
<newdan> Also I can take out the else branch and that works as well
<ASTP001> is the tab nessecary?
<newdan> ASTP001: Yes, indentation is significant in haml
<ASTP001> hmm ok
<ASTP001> thanks for your help!
<ASTP001> i have to get going
saneax is now known as saneax_AFK
elifoster has joined #ruby
puria_ has joined #ruby
<adaedra> Ox0dec: that was a creative use of unicode_snowman.
ESpiney has quit [Ping timeout: 240 seconds]
ElFerna_ has quit [Ping timeout: 250 seconds]
<Ox0dec> adaedra: It was the first thing that came to mind. :)
jaiks has quit [Quit: Leaving]
<Ox0dec> Really good smoke test.
joonty has quit [Ping timeout: 264 seconds]
idlederp has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
idlederp is now known as lianj
lianj has quit [Changing host]
lianj has joined #ruby
soLucien has joined #ruby
kalopsian has quit [Ping timeout: 250 seconds]
aswen has quit [Quit: WeeChat 1.4]
Pumukel has quit [Ping timeout: 256 seconds]
<soLucien> hello guys! Does any of you have a "cheatsheet" for Ruby synthax that i could use to get up to speed with all the language features and synthax ? it's a bit odd
puria has quit [Ping timeout: 245 seconds]
ElFerna_ has joined #ruby
<Ox0dec> ?quickref
Waheedi has quit [Quit: Waheedi]
<soLucien> i'm a c#/java/python/powershell programmer, and i want to write a vagrant povider for hyper-v
<soLucien> at least for my use cases
MartyG_ has quit [Quit: leaving]
<soLucien> thanks
<soLucien> the synthax is a bit odd, but it's still objct oriented programming
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jxs_ has quit [Remote host closed the connection]
sh1rt has quit [Ping timeout: 245 seconds]
BlkDynmt has quit [Quit: BlkDynmt]
<soLucien> 1 <=> 10 #=> -1 ??
<soLucien> how does that make sense ? :D
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<newdan> soLucien: It's like a cmp() function or Comparator in Java
<newdan> soLucien: In Python, cmp(1, 10) is also -1
<Ox0dec> Comparators in C use a similar semantics.
<Ox0dec> It's really not weird at all.
dexter_ has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<soLucien> ok i get it y
zenlot1 is now known as zenlot
<soLucien> "which of the sides is the greater"
<soLucien> i don't use it too often
mary5030 has quit [Remote host closed the connection]
bruce_lee has joined #ruby
mary5030 has joined #ruby
kirillzh has joined #ruby
f00dMonsta_ has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
kirillzh has quit [Client Quit]
dexter_ has quit [Ping timeout: 256 seconds]
kirillzh has joined #ruby
f00dMonsta has quit [Ping timeout: 240 seconds]
mary5030 has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
PaulCapestany has quit [Quit: .]
ElFerna_ has quit [Ping timeout: 240 seconds]
PaulCapestany has joined #ruby
Snowy has quit [Remote host closed the connection]
segy has quit [Ping timeout: 240 seconds]
Limix has quit [Ping timeout: 256 seconds]
sh1rt has joined #ruby
sh1rt has quit [Changing host]
sh1rt has joined #ruby
aef has quit [Remote host closed the connection]
jgpawletko has joined #ruby
Aviio has joined #ruby
aef has joined #ruby
jam_ has joined #ruby
<Aviio> Hi all
<Aviio> .net developer coming to ruby here, is there any gem that allows me to map some XML straight into an object?
yfeldblum has joined #ruby
agit0 has joined #ruby
Limix has joined #ruby
arlek has quit [Ping timeout: 260 seconds]
bithon has quit [Quit: WeeChat 1.4]
<Ox0dec> What a monstrous notion.
segy has joined #ruby
<Aviio> should I just use nokogiri and xpath, then?
<Ox0dec> That would be saner, certainly.
jgpawletko has quit [Client Quit]
Scriptonaut has left #ruby [#ruby]
<Ox0dec> Consider giving https://github.com/YorickPeterse/oga a look.
symm- has quit [Ping timeout: 245 seconds]
<newdan> "saner"
f00dMonsta__ has joined #ruby
<mg^> Well... shadydb...
jam_ has quit [Ping timeout: 256 seconds]
JDiPierro has quit [Remote host closed the connection]
chussenot has joined #ruby
f00dMonsta_ has quit [Ping timeout: 250 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
<Aviio> thanks for the oga recommendation, looks pretty good
abyss has quit [Ping timeout: 256 seconds]
dopamean_ has quit [Ping timeout: 250 seconds]
abyss has joined #ruby
x77686d has quit [Quit: x77686d]
ramortegui has quit [Quit: Ex-Chat]
<Aviio> really wasnt a fan of nokogiri's dependency on libxml, this seems to fix that!
idefine has quit [Remote host closed the connection]
sh1rt has quit [Ping timeout: 250 seconds]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
decoponio has quit [Quit: Leaving...]
Aviio_ has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
Aviio has quit [Quit: Page closed]
lektrik has quit [Quit: Leaving]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
f00dMonsta_ has joined #ruby
tomchapin has joined #ruby
spider-mario has quit [Quit: spider-mario]
yoongkang has joined #ruby
<Aviio_> Anybody working on any interesting projects?
spider-mario has joined #ruby
snguyen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
snguyen has joined #ruby
snguyen has quit [Client Quit]
f00dMonsta__ has quit [Ping timeout: 250 seconds]
CloCkWeRX has joined #ruby
charliesome has joined #ruby
yoongkang has quit [Ping timeout: 240 seconds]
newdan has quit [Remote host closed the connection]
f00dMonsta__ has joined #ruby
Ebok has joined #ruby
blur3d has joined #ruby
duckpuppy has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
ekinmur has joined #ruby
<mg^> I'm embedding MRuby into an HexChat (an XChat fork). Other than that, nothing I can talk about.
<soLucien> wait. So in Ruby class methods are defined with self instead of instance methods (as all other programming languages that i know) ?
<mg^> soLucien: read up on eigenclasses
<mg^> self in the context of a class definition refers to the class
<soLucien> in python it's self , java and c# use this
dlitvak has joined #ruby
sh1rt has joined #ruby
sh1rt has quit [Changing host]
sh1rt has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<soLucien> in Ruby , self denotes the "static/class" methods , so it's opposite to the other 3 i've listed
ekinmur has quit [Remote host closed the connection]
<soLucien> that's fine, it was just a pellicularity
f00dMonsta_ has quit [Ping timeout: 272 seconds]
duckpuppy has joined #ruby
CloCkWeRX has quit [Ping timeout: 245 seconds]
<mg^> it depends on the context
<mg^> within an instance method, self refers to the instance
<toretore> soLucien, that's not technically correct, but you may think of it that way
<soLucien> i hope i won't need that too often in writing a Vagrant plugin
<soLucien> context-sensitive "self" keyword seems like i tcould confise me
<soLucien> it could confuse me *
zenlot has quit [Ping timeout: 256 seconds]
<toretore> that's the point of self
<mg^> self in the context of a class refers to the class, self in the context of an instance refers to the instance
<toretore> if it wasn't context sensitive it would be of no use
<Aviio_> ruby confuses me in so many ways..
<mg^> Conversation is amusing to me, I find ruby to be refreshingly sensible with the way my mind thinks about these sorts of things
zenlot has joined #ruby
dlitvak has quit [Ping timeout: 245 seconds]
<mg^> But clearly other people don't see it that way, so now I wonder how much of that is nature vs. nurture
pawnbox has joined #ruby
<soLucien> so wait .. self.class.self called on an instance gets you to the static methods ?
<Aviio_> wait what
<Radar> soLucien: why are you thinking of them as static methods
<Radar> soLucien: and there is no "self" method on classes
<mg^> yeah "static" isn't usually a word that comes up much here
<soLucien> because that's how methods are classified in the oop i know .. static(class methods) and instance methods
<toretore> soLucien, you are applying definitions from other environments to ruby, that doesn't work
nfk|laptop has joined #ruby
bklane has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Radar> soLucien: sorry we will work on changing Ruby to be more familiar for Java programmers in Ruby 3
<Radar> soLucien: def self.foo is defining a method on the "self", which is the class.
<soLucien> that's fine , i don't mind .. it's aleays nice to explore new viewpoints
x77686d has joined #ruby
<soLucien> always *
zcreative has joined #ruby
duoi has joined #ruby
RobertBirnie has joined #ruby
<soLucien> all i want is to map ruby's concepts to something i understand and use
<soLucien> this https://learnxinyminutes.com/docs/ruby/ was extremely helpful
pawnbox has quit [Ping timeout: 240 seconds]
piotrj has joined #ruby
ellistaa has joined #ruby
syk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
snockerton has joined #ruby
syk has joined #ruby
<ellistaa> is modulo slow? after submitting this one liner it said my one liner only beat 27% of the other ruby solutions https://gist.github.com/ellismarte/7b91deff6811aebabe22
ta has joined #ruby
hobodave has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
<Aviio_> soLucien: thanks for that link, reading through it now
RobertBi_ has joined #ruby
<soLucien> thanks to 0x0dec
joonty has joined #ruby
robbyoconnor has joined #ruby
_djbkd has quit [Remote host closed the connection]
RobertBirnie has quit [Ping timeout: 240 seconds]
kalopsian has joined #ruby
sakix has joined #ruby
CloCkWeRX has joined #ruby
arlek has joined #ruby
LoganG has quit [Ping timeout: 264 seconds]
Azure has quit [Quit: Oops.]
jgpawletko has joined #ruby
Azure has joined #ruby
joonty has quit [Ping timeout: 260 seconds]
blur3d has quit [Quit: blur3d]
duckpuppy has quit [Ping timeout: 245 seconds]
baweaver has quit [Remote host closed the connection]
<soLucien> ok so attr_accessor :name
<soLucien> this sets getter and setter for a class ?
<soLucien> for the name of the instance
<soLucien> in the class
agit0 has quit [Quit: zzzZZZ….]
<soLucien> while attr_accessor :name is the getter and
<soLucien> attr_writer :name is setter
emilford has quit [Ping timeout: 245 seconds]
<soLucien> it's a shorthand for definining a custom get/set for a attribute
<lucasb> no, attr_accessor creates both a writer and a reader
<soLucien> yes
kalopsian has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
piotrj has quit [Remote host closed the connection]
<soLucien> both getter and setter to defaults .. if i want encapsulation, i use only getter or only setter
_djbkd has joined #ruby
<soLucien> or if i want a custom setter/getter
<soLucien> just wanted to make this clear
emilford has joined #ruby
dudedudeman has quit [Quit: dudedudeman]
coyo has quit [Ping timeout: 264 seconds]
<ellistaa> attr_reader is getter
<ellistaa> attr_writer is setter
emilford has quit [Ping timeout: 250 seconds]
<ellistaa> attr_accessor is both
Snowy has joined #ruby
LoganG has joined #ruby
karapetyan has quit [Remote host closed the connection]
<soLucien> gotcha
karapetyan has joined #ruby
nerium has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
BlkDynmt has joined #ruby
cajone is now known as cajone_afk
zerowaitstate has quit [Ping timeout: 240 seconds]
dudedudeman has joined #ruby
<Aviio_> so is it better practice to just get values from some xml as opposed to creating an object and passing that throughout the application?
dome22xl has joined #ruby
ramfjord has joined #ruby
emilford has joined #ruby
agit0 has joined #ruby
akaiiro has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
karapetyan has quit [Ping timeout: 245 seconds]
Xeago has joined #ruby
musicnode has joined #ruby
altair118 has joined #ruby
yfeldblum has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
robbyoconnor has joined #ruby
Waheedi has joined #ruby
dudedudeman has quit [Quit: dudedudeman]
kies^ has quit [Ping timeout: 276 seconds]
ss_much has joined #ruby
astrofog has quit [Quit: Quite]
gambl0re has quit []
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
LoganG has quit [Ping timeout: 240 seconds]
kirillzh has joined #ruby
LoganG has joined #ruby
kirillzh has quit [Max SendQ exceeded]
emilford has joined #ruby
n_blownapart has joined #ruby
duckpuppy has quit [Ping timeout: 276 seconds]
william3 has joined #ruby
mary5030 has quit [Ping timeout: 250 seconds]
emilford has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
karmatr0n has quit [Ping timeout: 240 seconds]
william3 has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
emilford has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
hololeap has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tau has joined #ruby
<tau> hi.
sepp2k has quit [Read error: Connection reset by peer]
karmatr0n has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
<tau> does it make sense to have a function named search_range_down?
<tau> when it searches text down from a given position?
karmatr0n has quit [Remote host closed the connection]
gbgdev has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
Aviio_ has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matt_d has joined #ruby
<ellistaa> tau: is it returning boolean or the index?
<tau> it is returning a 2-tuple of index's.
baweaver has joined #ruby
tau has left #ruby [#ruby]
tau has joined #ruby
<tau> would it sound better range_down? downward_range?
Waheedi has quit [Quit: Waheedi]
emilford has joined #ruby
car54 has joined #ruby
TomyLobo has quit [Ping timeout: 250 seconds]
mostlybadfly has joined #ruby
lucasb has quit [Quit: leaving]
<ellistaa> tau: im not sure
<tau> i see.
<tau> i sometimes get stuck in picking good function names.
mjuszczak has quit []
<tau> i feel as it happens to everyone who loves programming.
<tau> heh.
<ellistaa> i usually use long names
<tau> i like short but meaningful names.
<tau> these are hard to find.
<soLucien> name "somename" inside a class - what does this mean ?
<shevy> anyone of you using some ascii-table layout mapper that they can recommend? so that we can display tables on the commandline
<soLucien> it's not variable assignment, is it?
Aviio has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
<Aviio> range possibly isnt the best description
coyo has joined #ruby
<tau> i see.
<tau> well. i'll use range_up as it is in the context of 'search in the range up from the cursor position'.
<tau> and range_down.
<soLucien> what is name?
<soLucien> is it a symbol?
<nofxx> Is there some method for Range to get the difference? 3..6.something => 3
<soLucien> i know you can chain them , i've seen it used in the vagrant files .. name "somename" , value "somevalue", type "sometype"
charliesome has joined #ruby
<shevy> hmm interesting
<soLucien> is this variable initialization?
gbgdev has quit [Remote host closed the connection]
car54 has left #ruby [#ruby]
car54 has joined #ruby
Aviio has quit [Remote host closed the connection]
emilford has joined #ruby
<akahn> in what version of ruby did autoload become threadsafe? I see this patch but I'm still getting errors from autoloading in a multithreaded scenario https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/33078
<soLucien> or is it calling a method
<nofxx> Range#size !
karapetyan has quit [Remote host closed the connection]
tau has left #ruby [#ruby]
car54 has left #ruby [#ruby]
<soLucien> is name "somename" the same as name("somename") in the case i have posted
<soLucien> ?
devbug has quit [Ping timeout: 260 seconds]
car54 has joined #ruby
chussenot has quit [Quit: chussenot]
<Ox0dec> soLucien: Yes, parentheses are optional for method invocation.
<soLucien> cool , makes sense now .. And it this case, name is called on the Class right ?
<Ox0dec> Insufficient data for meaningful answer.
<Ox0dec> Oh, you posted code.
<soLucien> i posted a screen clipping from a book
skade has quit [Quit: Computer has gone to sleep.]
<soLucien> that's all there is to it
<Ox0dec> Yes, it's being called on the class, since you're not inside a method definition.
<Mon_Ouie> Ox0dec: Why did you increment?
<Ox0dec> Mon_Ouie: I didn't do it!
<Mon_Ouie> Oh, I see, someone else did
<Ox0dec> Twice, even.
<Ox0dec> Different people, though.
car54 has left #ruby [#ruby]
<shevy> lol
devbug has joined #ruby
<shevy> I just realized that the nick was different
<Mon_Ouie> I would find it inconvenient if variables actually changed their names after I tried to increment their values
emilford has quit [Ping timeout: 272 seconds]
<Ox0dec> For me, the name is the value.
<Ox0dec> Because that's how numbers work.
Aviio has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
missingn0 has joined #ruby
missingn0 has left #ruby [#ruby]
SCHAAP137 has quit [Ping timeout: 260 seconds]
joonty has joined #ruby
<Ox0dec> tjohnson was one of my incrementers; in addition to modifying my identity in-place, he's nerd-sniped me into figuring out how to make an Enumerator's Fiber's death not cause the Enumerator to #rewind.
emilford has joined #ruby
pawnbox has joined #ruby
cschneid_ has quit [Remote host closed the connection]
joonty has quit [Ping timeout: 240 seconds]
solocshaw has joined #ruby