baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.10: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ https://irclog.whitequark.org/ruby/
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 258 seconds]
KnownSyntax has quit [Ping timeout: 250 seconds]
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
JeanCarl1Machado has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
ec0 has quit [Ping timeout: 250 seconds]
blackgoat has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Ping timeout: 264 seconds]
tectonic has joined #ruby
nando293921 has quit [Remote host closed the connection]
Robtop__ has joined #ruby
jeanlinux has joined #ruby
heelpmeplz has quit [Read error: Connection reset by peer]
heelpmeplz has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
apofis has joined #ruby
Madplatypus has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
jeanlinux has quit [Ping timeout: 260 seconds]
Robtop__ has quit [Read error: Connection reset by peer]
apofis has quit [Max SendQ exceeded]
Robtop__ has joined #ruby
crystal77 has joined #ruby
Baffoon has joined #ruby
Baffoon has quit [Client Quit]
phrozen77 has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
apofis has joined #ruby
nando293921 has joined #ruby
Baffoon has joined #ruby
moonythedwarf_ has joined #ruby
moon_ has quit [Ping timeout: 265 seconds]
Baffoon has quit [Client Quit]
nankyokusei has quit [Ping timeout: 240 seconds]
Limix has quit [Quit: Limix]
CloCkWeRX has joined #ruby
Derperperd has quit [Quit: Derperperd]
jackjackdripper has joined #ruby
Derperperd has joined #ruby
phrozen77 has joined #ruby
marr has quit [Ping timeout: 260 seconds]
jgt3 has quit [Ping timeout: 265 seconds]
Limix has joined #ruby
Pumukel has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has quit [Ping timeout: 264 seconds]
RedNifre_ has joined #ruby
etehtsea has joined #ruby
lightheaded has joined #ruby
RedNifre has quit [Ping timeout: 250 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dminuoso has joined #ruby
lightheaded has quit [Ping timeout: 258 seconds]
arescorpio has joined #ruby
Pumukel has joined #ruby
bauruine has quit [Ping timeout: 260 seconds]
Limix has quit [Ping timeout: 244 seconds]
blackmesa has joined #ruby
BTRE has quit [Quit: Leaving]
dminuoso has quit [Ping timeout: 258 seconds]
apofis has quit [Ping timeout: 264 seconds]
duper has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
BTRE has joined #ruby
Pumukel has joined #ruby
chestnutpie has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
flashpoint9 has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
Pumukel has quit [Ping timeout: 260 seconds]
jazzonmym111nd has quit [Ping timeout: 244 seconds]
jazzonmym111nd has joined #ruby
nando293921 has quit [Ping timeout: 252 seconds]
Limix has joined #ruby
Cohedrin has joined #ruby
PalaHO has quit [Ping timeout: 265 seconds]
Cohedrin has quit [Read error: Connection reset by peer]
Cohedrin has joined #ruby
shinnya has quit [Ping timeout: 265 seconds]
A_Drone has joined #ruby
pontiki has joined #ruby
astrobun_ has joined #ruby
tectonic has quit []
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
crystal77 has joined #ruby
leea has joined #ruby
jgt3 has joined #ruby
Derperperd has quit [Quit: Derperperd]
etehtsea has quit [Quit: Computer has gone to sleep.]
ta_ has joined #ruby
etehtsea has joined #ruby
Rodya_ has quit [Remote host closed the connection]
jgt3 has quit [Ping timeout: 244 seconds]
skweek has quit [Ping timeout: 276 seconds]
moonythedwarf_ has quit [Ping timeout: 265 seconds]
Dreamer3 has joined #ruby
ta_ has quit [Ping timeout: 244 seconds]
Sammichmaker has joined #ruby
ta_ has joined #ruby
diprotic has joined #ruby
Limix has quit [Quit: Limix]
pwnd_nsfw has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
Robtop__ has quit [Ping timeout: 250 seconds]
etehtsea has quit [Ping timeout: 250 seconds]
monoprotic has quit [Ping timeout: 276 seconds]
Tusskan has quit [Quit: Leaving]
JeanCarl1Machado has quit [Ping timeout: 265 seconds]
astrobun_ has quit [Read error: Connection reset by peer]
etehtsea has joined #ruby
astrobun_ has joined #ruby
soLucien has joined #ruby
b3atr has joined #ruby
<soLucien> hello guys ! Is there any feature in Ruby that closes off certain execution paths ?
dminuoso has joined #ruby
<b3atr> any prject to join in?
<b3atr> s/prject/project/
<soLucien> yeah you can help me with my Vagrant HyperV plugin :D
<b3atr> soLucien: what's prerequisites?
A_Drone has quit [Read error: Connection reset by peer]
<soLucien> what prerequisites ?
<b3atr> soLucien: so that i can help you.
nando293921 has joined #ruby
<b3atr> i mean, understanding of related concepts.
<soLucien> oh .. Vagrant, PowerShell, Hyper-V
<soLucien> Ubuntu
<b3atr> soLucien: Windows?
<soLucien> yep
<b3atr> soLucien: nevermind :D
<soLucien> it was a joke
<soLucien> i don't expect any help
<b3atr> anyhow, i'm looking for a project to improve my skills.
<soLucien> ah .. i suck at Ruby
<soLucien> and don't particullarly like it
blackmesa has joined #ruby
<soLucien> when i get to refactoring ruby code (even mine), i feel like shooting myself
dminuoso has quit [Ping timeout: 276 seconds]
<b3atr> soLucien: why?
<soLucien> no type safety , only ctrl-F renames
<soLucien> and i always miss out certain stuff , drives me insane
<soLucien> ruby refactoring is like fully rewriting it
<soLucien> i have to constantly re-read, understand the code again
<baweaver> That's more of your own fault than the languages.
<soLucien> put my mind into the method .. there's no easy way out
<baweaver> RubyMine has most of those features
<soLucien> of course
<soLucien> i don't use RubyMine ..
<baweaver> and there are most certainly static type checking libraries you can use for Ruby
<soLucien> i use rubocop
<soLucien> but
<baweaver> Only a poor musician blames their instrument.
<soLucien> i mean take a look at this
blackmesa has quit [Ping timeout: 258 seconds]
<pontiki> baweaver: he wasn't: [20160821|2059.34] soLucien> ah .. i suck at Ruby
<pontiki> sorry, he/she/they
l4v2 has joined #ruby
eljimmy has joined #ruby
<b3atr> soLucien: alright, if you do things in ruby everything looks good.
<b3atr> err, in ruby way
<baweaver> more of a general annoyance with "x language sucks" erreta.
<soLucien> take a look at this shit
A_Drone has joined #ruby
<soLucien> i wrote it 2 weeks ago
<soLucien> i have to refactor it , but i feel like scrapiong it and starting anew
<soLucien> i've done other programming languages for 5 years now
<soLucien> it's never been this bad/
Xeago has quit [Ping timeout: 260 seconds]
<b3atr> soLucien: you did breaked all principles of software development ;)
<b3atr> s/did breaked/breaked/g
Xeago has joined #ruby
<soLucien> i blame it on no types and Vagrant
eljimador has quit [Ping timeout: 264 seconds]
<matthewd> soLucien: I'd probably want to rewrite that too
Limix has joined #ruby
<soLucien> as i've said, i've done multithreaded Java, CSHarp, Python ,
<matthewd> It does seem like there's a "Vagrant API" effect going on there, though
GodFather has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 244 seconds]
<soLucien> wrote thousands and thousands of lines of code, clean separation of concerns
<matthewd> Syntactic details aside, I'm not sure how this would be a measurably different shape in Python, say
<soLucien> however, this is what i ended up with
<soLucien> when i did a (pretty easy thing) in Ruby ..
<matthewd> "Manipulate a big mess of hashes" is rarely pretty, in any language, IME
<soLucien> that is what Vagrant is about
<soLucien> env is a huge hash
<soLucien> then you move around it and change shit in different states
<matthewd> I think it would be fair to say that Vagrant is... not representative of ruby in general
<matthewd> (see also: Puppet)
<soLucien> i use Puppet as well
<soLucien> these are actually the only 2 things i use from Ruby
<baweaver> see also: Chef Mash
<soLucien> and i hate them.
<soLucien> Well i hate Vagrant a LOT more than i do for Puppet
<soLucien> at least Puppet has docs, and you get to understand where it's coming from after some frustrations
<matthewd> soLucien: The general theme is that they were developed by people who are not primarily ruby developers
<soLucien> but Vagrant .. pure pain
mim1k has joined #ruby
<matthewd> Either new-to-ruby, or more sysadminy focus on the maintainability of the system over the piece of software, or both
<matthewd> (is my personal impression)
<soLucien> idk, evrything i did seems totally unmaintainable
<matthewd> .. which is not necessarily Bad, but influences which things are priorities
b3atr has left #ruby ["WeeChat 1.5"]
jeanlinux has joined #ruby
Elvin has joined #ruby
<soLucien> "write tests to make it maintainable " .. Great advice but totally useless
<soLucien> with Vagrant and Puppet
<soLucien> the whole point of the thing i'm writing is bridging 2-3-4-5 different technologies. All tests i would have to write would be integration tests
<soLucien> and at that point my tests are the code i'm writing
<baweaver> >> a = nil; a ||= 5; a # soLucien, noticed you did a lot of `a = val if a.nil?`
<ruby[bot]> baweaver: # => 5 (https://eval.in/626673)
RegulationD has joined #ruby
<baweaver> anyways, quick cleanup on the gist.
jeanlinux has quit [Ping timeout: 265 seconds]
<baweaver> mainly make sure to use line breaks, they help a lot.
<baweaver> Also it'd be good to break that method apart a lot. I only really did superficial things to it.
elifoster has joined #ruby
<soLucien> yeah i want to as well, but i can't figure out proper naming to what the break up is doing
<soLucien> reformat_hv_interfaces_hash
<baweaver> >> [1,2,3,4,5].map{|i| [i,i**2] }.to_h # Also `to_h` comes in handy
<ruby[bot]> baweaver: # => {1=>1, 2=>4, 3=>9, 4=>16, 5=>25} (https://eval.in/626677)
<soLucien> still unmaintainable,
nankyokusei has joined #ruby
<soLucien> also i have this huge complaint about ruby .. no difference between functions and variables
<jazzonmym111nd> linebreaks don't make code any better or worse, small methods that don't require linebreaks is better code imo
<baweaver> incremental steps
RegulationD has quit [Ping timeout: 265 seconds]
hays_ has joined #ruby
<baweaver> in general though, yes
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper has quit [Quit: Leaving.]
<soLucien> i have to constantly ctrl-f fore words to see what they are in the context
<soLucien> are they vars? functions ? i can never know unless i go to the implementation
<soLucien> at which point i've read the same code for the 5th time
<soLucien> and i get tired
youch has joined #ruby
<soLucien> it's so useful to have the do_something (with_parameter)
hays has quit [Ping timeout: 244 seconds]
<soLucien> instead of do_something with_parameter, and_somethingelse , etc
<soLucien> makes stuff extremely tiresome for me
<baweaver> A lot of your issue in this code is that you've coupled everything together in such a way that it's hard to break it apart.
nankyokusei has quit [Ping timeout: 244 seconds]
<baweaver> Almost all the collections rely on manipulations happening in order.
<jgnagy> so as much as I enjoy criticism on things I like, what kind of help are you actually asking for?
Limix has quit [Ping timeout: 252 seconds]
<soLucien> no help, it's 4 am and i'm ranting.
<soLucien> any help is appreciated
<soLucien> as to what i am doing wrong
<soLucien> but other than that, i was just highlighting how bad i am with Ruby in comparison to other stuff i do
<jgnagy> it seems obvious we aren't going to convince you to like ruby (and that's ok), but ranting on the ruby channel about ruby is not the friendliest way to ask for things ;-)
<jgnagy> yeah, everything has a learning curve
jgt3 has joined #ruby
<jgnagy> I've found that ruby is great for teaching OOP
<jgnagy> but yes, most of what's been said here is spot on... Vagrant and what you're doing probably wouldn't be fun in most any language
hays_ has quit [Remote host closed the connection]
<baweaver> soLucien ^
<soLucien> sweet !!!
<baweaver> Not sure if it'll work, but close enough to debug later.
jgt3 has quit [Ping timeout: 260 seconds]
<jgnagy> exactly the direction I was going to suggest, baweaver
<baweaver> I would suggest heavily that you read through books on OO like Practical Object Oriented Development in Ruby by Metz
<baweaver> Most of your issue is not the language, but knowing the responsibilities a single object or method should have.
<jgnagy> you say there isn't a difference between functions and methods in ruby, but I'm not sure how that stops you from using smaller methods to break apart those huge ones
<baweaver> most of it is finding out what to name them honestly.
<jgnagy> +1
<baweaver> then not getting _too_ crazy on it
heelpmeplz has quit [Ping timeout: 250 seconds]
<soLucien> yes that is what i was saying earlier
<soLucien> i didn;t know how to name them
<soLucien> :D
heelpmeplz has joined #ruby
ponga has joined #ruby
pokalyis has quit [Read error: Connection reset by peer]
<baweaver> I've been inclined to slap people before that have compulsive urges to have everything in small methods without first thinking if it's the right abstraction
<baweaver> makes it way harder to deal with later
<baweaver> probably one of those premature optimization issues.
pokalyis has joined #ruby
<soLucien> well this is really cool , thanks a lot for the effort, bamweaver
<jgnagy> true, but that clearly screamed out for it
Limix has joined #ruby
<baweaver> anyways, white nerd needs food badly, out I go.
<soLucien> enjoy
<baweaver> yeah, but there are some that take those to extremes jgnagy :P
<soLucien> saved me 3 hours of beating my head against the wall
<baweaver> AbstractProxySingletonFactoryMapperBean
<soLucien> i couldn't have done it better
<jgnagy> yes, Java, ewww
<baweaver> that nonsense
<baweaver> soLucien: just make sure to test that, as I'm coding blind there.
<soLucien> it's a matter of preference .. if i look up Java code i didi 3 years ago, i'm able to easily get back into it
<soLucien> sure, i will test it , but it is a great suggestion
<baweaver> If I look at Java code I did 3 years ago I have an urge to build a time machine to slap myself
<soLucien> as to what the structure/shape should be
<soLucien> of course
<soLucien> but i can refactor it in notime
<baweaver> noted that I tend to do some things that some rubyists don't like
<soLucien> but it takes me 3 hours to refactor this .. that was my point ..
<baweaver> like: collection.find { |x| x.conditions } or raise 'error'
<baweaver> I'll sometimes use english operators for flow control.
<jgnagy> it does make the code easier to read
<jgnagy> aloud even
<jgnagy> :)
KINGSABRI___ has quit [Ping timeout: 276 seconds]
<Nilium> Didn't the 'and' / 'or' keywords have different precedence from && and ||?
<Nilium> Maybe thinking of a different language
KINGSABRI_ has joined #ruby
hays has joined #ruby
<matthewd> Nilium: Yes, they do
<jgnagy> they do, but those so rarely bite you in practice that the occasional "and" instead of "&&" won't matter
<matthewd> (because they're for flow control)
c355e3b has quit [Quit: Connection closed for inactivity]
<Nilium> I figure if all you've got is the operator between two exprs then it doesn't really matter and it's obvious what's going on. Just couldn't remember if it was Ruby or something else.
hays_ has joined #ruby
kspencer has quit [Quit: WeeChat 1.6-dev]
jackjackdripper has joined #ruby
hays has quit [Ping timeout: 250 seconds]
* Nilium is 100% in favor of violating that style guide.
lightheaded has joined #ruby
cd-rum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeyraof has joined #ruby
solocshaw has joined #ruby
Coldblackice has quit []
dminuoso has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
solocshaw has quit [Remote host closed the connection]
lightheaded has quit [Ping timeout: 258 seconds]
nando293921 has quit [Ping timeout: 264 seconds]
<pontiki> i stopped because it was always a major argument
blackmesa has joined #ruby
dminuoso has quit [Ping timeout: 250 seconds]
ec0 has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has joined #ruby
A_Drone has joined #ruby
solocshaw has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
crystal77 has joined #ruby
cibs has quit [Ping timeout: 240 seconds]
braincrash has quit [Quit: bye bye]
aryaching has joined #ruby
solocshaw has quit [Remote host closed the connection]
cibs has joined #ruby
Pumukel has quit [Ping timeout: 244 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
cd-rum has joined #ruby
solocshaw has joined #ruby
flashpoint9 has joined #ruby
jeyraof has quit [Quit: This computer has gone to sleep]
flashpoint9 has quit [Remote host closed the connection]
blackgoat has quit [Ping timeout: 240 seconds]
nando293921 has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dviola has quit [Quit: WeeChat 1.5]
Elvin has quit [Quit: Textual IRC Client: www.textualapp.com]
ta_ has joined #ruby
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
hahuang61 has joined #ruby
braincrash has joined #ruby
ta_ has quit [Ping timeout: 276 seconds]
Davedev28 has quit [Remote host closed the connection]
harfangk has joined #ruby
spudowiar has quit [Quit: Leaving.]
igniting has joined #ruby
jgt3 has joined #ruby
nando293921 has quit [Ping timeout: 244 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
astrobun_ has quit [Remote host closed the connection]
nando293921 has joined #ruby
jgt3 has quit [Ping timeout: 276 seconds]
gix has quit [Ping timeout: 250 seconds]
LoneHerm_ has quit [Read error: Connection reset by peer]
kp666 has joined #ruby
LoneHermit has joined #ruby
astrobun_ has joined #ruby
gix has joined #ruby
nando293921 has quit [Ping timeout: 265 seconds]
nando293921 has joined #ruby
jhack has quit []
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
youch has quit [Ping timeout: 250 seconds]
beilabs has joined #ruby
nando293921 has quit [Ping timeout: 265 seconds]
djbkd has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
jeyraof has joined #ruby
dminuoso has joined #ruby
chestnutpie has quit [Quit: Leaving]
chestnutpie has joined #ruby
qguv has quit [Quit: bye]
qguv has joined #ruby
dminuoso has quit [Ping timeout: 240 seconds]
dhinojosa has joined #ruby
blackmesa has joined #ruby
jeyraof has quit [Quit: Leaving]
crystal77 has joined #ruby
chestnutpie has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
A_Drone has quit [Remote host closed the connection]
craigp has quit [Ping timeout: 240 seconds]
leea has joined #ruby
symm- has quit [Ping timeout: 276 seconds]
Pumukel has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
cd-rum_ has joined #ruby
cd-rum has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
LoneHermit has quit [Remote host closed the connection]
pwnd_nsfw` has joined #ruby
jeanlinux has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
Pumukel has joined #ruby
icey|vacation has quit [Ping timeout: 276 seconds]
ninjaaron has joined #ruby
<ninjaaron> probably a stupid question, because the answer should obviously be "yes", but does ruby compile regex literals before runtime?
astrobun_ has quit [Remote host closed the connection]
jeanlinux has quit [Ping timeout: 265 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
kira has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
nando293921 has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobun_ has joined #ruby
hahuang65 has joined #ruby
hahuang61 has quit [Ping timeout: 264 seconds]
elifoster has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
the_rhizo3 has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
hk238 has joined #ruby
conah has joined #ruby
jgt3 has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
jgt3 has quit [Ping timeout: 250 seconds]
moneylotion has quit [Quit: ZNC 1.6.3 - http://znc.in]
moneylotion has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
pwnd_nsfw has joined #ruby
ta_ has joined #ruby
harfangk_ has joined #ruby
harfangk has quit [Ping timeout: 244 seconds]
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
Xiti has quit [Quit: Xiti]
ta_ has quit [Ping timeout: 276 seconds]
Immune has quit [Ping timeout: 244 seconds]
Xiti has joined #ruby
lightheaded has joined #ruby
djbkd has quit [Remote host closed the connection]
karmatr0n has joined #ruby
djbkd has joined #ruby
LoneHerm_ has joined #ruby
matp has joined #ruby
nando293921 has quit [Ping timeout: 264 seconds]
dminuoso has joined #ruby
chestnutpie has joined #ruby
alfiemax has joined #ruby
moneylotion has quit [Quit: ZNC 1.6.3 - http://znc.in]
moneylotion has joined #ruby
moneylotion has quit [Excess Flood]
kira has joined #ruby
moneylotion has joined #ruby
raeoks has joined #ruby
dminuoso has quit [Ping timeout: 264 seconds]
moneylotion has quit [Client Quit]
blackmesa has joined #ruby
A_Drone has joined #ruby
dminuoso has joined #ruby
ta_ has joined #ruby
craigp has joined #ruby
johnmilton has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
Derperperd has joined #ruby
conah has quit [Ping timeout: 250 seconds]
Coldblackice has joined #ruby
dikaio has joined #ruby
agarie has joined #ruby
raeoks has quit [Ping timeout: 260 seconds]
karmatr0n has quit [Ping timeout: 252 seconds]
A_Drone has quit [Ping timeout: 244 seconds]
dminuoso has quit [Ping timeout: 252 seconds]
arescorpio has quit [Excess Flood]
ta_ has quit [Ping timeout: 250 seconds]
astrobun_ has quit [Remote host closed the connection]
nando293921 has joined #ruby
moneylotion has joined #ruby
moneylotion has quit [Excess Flood]
astrobun_ has joined #ruby
kira has quit [Ping timeout: 250 seconds]
agarie has quit []
Coldblackice has quit []
blackwind_123 has quit [Ping timeout: 240 seconds]
dhinojosa has quit [Ping timeout: 258 seconds]
ec0 has quit [Ping timeout: 258 seconds]
Coldblackice has joined #ruby
conah has joined #ruby
moneylotion has joined #ruby
A_Drone has joined #ruby
mooe has joined #ruby
Limix has quit [Quit: Limix]
soLucien has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
soLucien has joined #ruby
Azure has quit [Remote host closed the connection]
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
moneylotion has quit [Quit: ZNC 1.6.3 - http://znc.in]
Pumukel has joined #ruby
moneylotion has joined #ruby
kira has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
pnes has quit []
bad_ip has quit [Ping timeout: 240 seconds]
pnes has joined #ruby
hahuang65 has joined #ruby
jgt3 has joined #ruby
pnes has left #ruby [#ruby]
jgnagy has quit []
Pumukel has quit [Ping timeout: 258 seconds]
etehtsea has quit [Quit: Computer has gone to sleep.]
iBleizo has joined #ruby
ruskie has left #ruby ["..."]
ec0 has joined #ruby
cibs has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 258 seconds]
sameerynho has joined #ruby
jgt3 has quit [Ping timeout: 250 seconds]
lightheaded has quit [Remote host closed the connection]
Derperperd has quit [Read error: Connection reset by peer]
cibs has joined #ruby
Derperperd has joined #ruby
agent_white has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
<agent_white> Evenin'
kira has quit [Ping timeout: 250 seconds]
Rodya_ has joined #ruby
ec0 has quit [Ping timeout: 258 seconds]
hutch34 has joined #ruby
A_Drone has quit [Ping timeout: 244 seconds]
A_Drone has joined #ruby
howdoi has joined #ruby
ICantCook has joined #ruby
Rodya_ has quit [Remote host closed the connection]
lxsameer_ has joined #ruby
last_staff has joined #ruby
m_abdelfattah has joined #ruby
<ninjaaron> agent_white: It's quite. too quite.
m_abdelfattah has quit [Client Quit]
sameerynho has quit [Ping timeout: 265 seconds]
Pumukel has joined #ruby
<iBleizo> It's 2AM in the east coast
dminuoso has joined #ruby
pokalyis has quit [Read error: Connection reset by peer]
Niham has joined #ruby
saneax-_-|AFK is now known as saneax
A_Drone has quit [Ping timeout: 244 seconds]
A_Drone has joined #ruby
Niham has quit [Client Quit]
lightheaded has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
pokalyis has joined #ruby
blackmesa has joined #ruby
ec0 has joined #ruby
tristanp has joined #ruby
A_Drone has quit [Ping timeout: 244 seconds]
wugy has joined #ruby
wugy has quit [Excess Flood]
astrobun_ has quit [Remote host closed the connection]
wugy has joined #ruby
wugy has quit [Excess Flood]
iBleizo has left #ruby [#ruby]
wugy has joined #ruby
astrobun_ has joined #ruby
cupersunt has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
zacts has joined #ruby
igniting_ has joined #ruby
Burgestrand has joined #ruby
meowmeowmeow has joined #ruby
Pumukel has joined #ruby
A_Drone has joined #ruby
chestnutpie has quit [Quit: Leaving]
Xiti has quit [Read error: Connection reset by peer]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
igniting has quit [Ping timeout: 264 seconds]
helpa-bot has joined #ruby
beilabs_ has joined #ruby
pabs has quit [Ping timeout: 240 seconds]
Xiti` has joined #ruby
Xiti` has quit [Changing host]
Xiti` has joined #ruby
helpa has quit [Remote host closed the connection]
Madplatypus has joined #ruby
Madplatypus has quit [Changing host]
Madplatypus has joined #ruby
helpa-bot has quit [Remote host closed the connection]
helpa has joined #ruby
dikaio has joined #ruby
jeanlinux has joined #ruby
pabs has joined #ruby
RegulationD has joined #ruby
beilabs has quit [Ping timeout: 252 seconds]
kira has joined #ruby
conta has joined #ruby
jeanlinux has quit [Ping timeout: 265 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
dminuoso has quit [Ping timeout: 264 seconds]
nankyokusei has joined #ruby
A_Drone has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 264 seconds]
Xiti` has quit [Quit: Xiti`]
firstdayonthejob has joined #ruby
hutch34 has quit [Ping timeout: 244 seconds]
agit0 has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
wugy has quit []
A_Drone has joined #ruby
wugy has joined #ruby
conah has quit [Ping timeout: 250 seconds]
Burgestrand has quit [Ping timeout: 244 seconds]
firstdayonthejob has quit [Ping timeout: 244 seconds]
Hyuk has joined #ruby
jgt3 has joined #ruby
conta has quit [Read error: Connection reset by peer]
Burgestrand has joined #ruby
conta has joined #ruby
claw has joined #ruby
phredus has quit [Ping timeout: 240 seconds]
jgt3 has quit [Ping timeout: 265 seconds]
Xiti has joined #ruby
d0nn1e has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
ych has joined #ruby
Silthias has joined #ruby
pawnbox has joined #ruby
ych has quit [Client Quit]
conta has quit [Quit: conta]
d0nn1e has joined #ruby
astrobun_ has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
blaxter has joined #ruby
pawnbox has joined #ruby
ych has joined #ruby
astrobun_ has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lxsameer__ has joined #ruby
Burgestrand has quit [Ping timeout: 250 seconds]
l4v2 has quit [Quit: l4v2]
yeticry has quit [Ping timeout: 240 seconds]
astrobun_ has quit [Remote host closed the connection]
yeticry has joined #ruby
ddffg has joined #ruby
lxsameer_ has quit [Ping timeout: 250 seconds]
ta_ has joined #ruby
teclator has joined #ruby
nando293921 has quit [Ping timeout: 244 seconds]
conta has joined #ruby
A_Drone has quit [Ping timeout: 244 seconds]
astrobun_ has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
symm- has joined #ruby
submitnine has joined #ruby
Burgestrand has joined #ruby
b3atr has joined #ruby
meowmeowmeow has quit [Remote host closed the connection]
<b3atr> stdlib-2.3.1 has been changed. i see a lot of modules is it correct?
blackmesa has joined #ruby
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<b3atr> or just the new interface displays too much :D
anisha has joined #ruby
soLucien has quit [Quit: Leaving]
haraigo has joined #ruby
harai54 has quit [Ping timeout: 252 seconds]
A_Drone has joined #ruby
mark_66 has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
ych has joined #ruby
lxsameer has joined #ruby
dminuoso has joined #ruby
TomyWork has joined #ruby
ych has quit [Client Quit]
rsampaio_ has quit [Ping timeout: 258 seconds]
aganov has joined #ruby
dikaio has quit [Quit: Textual IRC Client: www.textualapp.com]
bad_ip has joined #ruby
bad_ip has quit [Changing host]
bad_ip has joined #ruby
lxsameer__ has quit [Ping timeout: 276 seconds]
bayed has joined #ruby
cd-rum_ has quit [Quit: Textual IRC Client: www.textualapp.com]
sameerynho has joined #ruby
lxsameer has quit [Ping timeout: 250 seconds]
zacts has quit [Ping timeout: 265 seconds]
claudiuinberlin has joined #ruby
Immune has joined #ruby
qabwop has joined #ruby
edwinvdgraaf has joined #ruby
ta_ has joined #ruby
ledestin has joined #ruby
f4cl3y has joined #ruby
duncannz has joined #ruby
djbkd has quit [Quit: My people need me...]
Burgestrand has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
frozengeek has joined #ruby
TheHodge has joined #ruby
A_Drone has quit [Remote host closed the connection]
igniting_ has quit [Quit: Ex-Chat]
jgt3 has joined #ruby
LoneHerm_ has quit [Read error: Connection reset by peer]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 265 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
LoneHerm_ has joined #ruby
b3atr has left #ruby ["WeeChat 1.5"]
karmatr0n has joined #ruby
jgt3 has quit [Ping timeout: 265 seconds]
Bish has quit [Ping timeout: 265 seconds]
weckl has joined #ruby
Bish has joined #ruby
ukk has joined #ruby
antgel has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
bauruine_ has quit [Quit: ZNC - http://znc.in]
karmatr0n has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
ctp has joined #ruby
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bauruine has joined #ruby
Burgestrand has joined #ruby
_ko1 has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
Pumukel has joined #ruby
Burgestrand has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
Nahra has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
Nahra has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Immune has quit [Ping timeout: 244 seconds]
pawnbox_ has joined #ruby
Burgestrand has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
marr has joined #ruby
tmtwd has quit [Ping timeout: 260 seconds]
ctp has quit [Quit: Textual IRC Client: www.textualapp.com]
tsia has joined #ruby
ruby-lang438 has joined #ruby
ruby-lang438 has quit [Client Quit]
blackmesa has joined #ruby
TheWhip has joined #ruby
ta_ has quit [Remote host closed the connection]
A_Drone has joined #ruby
mikecmpbll has joined #ruby
Pumukel has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
bigkevmcd has joined #ruby
ta_ has joined #ruby
A_Drone has quit [Ping timeout: 244 seconds]
agent_white has quit [Quit: gnight]
pawnbox_ has quit [Ping timeout: 276 seconds]
ruby-lang974 has joined #ruby
pawnbox has joined #ruby
Pumukel has quit [Ping timeout: 276 seconds]
<ruby-lang974> Is it good implementation of Random Search Algorithm? https://www.rubyprogramming.pl/t/wyszukiwanie-losowe/88
Pumukel has joined #ruby
<ruby-lang974> I'm beginner programmist and I tried to write that. It's working but I thinking about better write better program.
Burgestrand has quit [Ping timeout: 250 seconds]
jeanlinux has joined #ruby
etehtsea has joined #ruby
A_Drone has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
ruby-lang974 has quit [Quit: Page closed]
blackmesa has joined #ruby
valkyrka has quit [Read error: Connection reset by peer]
<tobiasvl> he left? or did he change nicks and I have ignored that?
<tobiasvl> ruby-lang974 that is
<tobiasvl> maybe I ignore too many events...
Dimik has quit [Ping timeout: 244 seconds]
Pupeno has quit [Remote host closed the connection]
<ninjaaron> It's hard to be patient with IRC when you're just a beginning programmist.
jeanlinux has quit [Ping timeout: 265 seconds]
cranq has quit [Ping timeout: 244 seconds]
nankyokusei has joined #ruby
cranq has joined #ruby
Pumukel has joined #ruby
Pumukel has quit [Read error: Connection reset by peer]
leea has joined #ruby
Burgestrand has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
xxninjabunnyxx has quit [Ping timeout: 250 seconds]
teclator has quit [Remote host closed the connection]
senayar has joined #ruby
Pumukel has joined #ruby
Burgestrand has quit [Ping timeout: 265 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
A_Drone has quit [Remote host closed the connection]
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
sepp2k has joined #ruby
jgt3 has joined #ruby
Burgestrand has joined #ruby
A_Drone has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
astrobun_ has quit [Remote host closed the connection]
pawnbox_ has joined #ruby
tmtwd has joined #ruby
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
johnDoe111 has joined #ruby
johnDoe111 has quit [Remote host closed the connection]
pawnbox_ has quit [Read error: Connection reset by peer]
pawnbox_ has joined #ruby
jgt3 has quit [Ping timeout: 252 seconds]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
ec0 has quit [Ping timeout: 250 seconds]
pawnbox has quit [Ping timeout: 265 seconds]
ta__ has joined #ruby
Baffoon has joined #ruby
Baffoon has quit [Excess Flood]
Baffoon has joined #ruby
Baffoon has quit [Excess Flood]
jinie has joined #ruby
Baffoon has joined #ruby
Baffoon has quit [Excess Flood]
ta__ has quit [Ping timeout: 244 seconds]
jgt3 has joined #ruby
Baffoon has joined #ruby
Baffoon has quit [Excess Flood]
Baffoon has joined #ruby
A_Drone has quit [Ping timeout: 244 seconds]
Hyuk has joined #ruby
Hyuk has quit [Client Quit]
Baffoon has quit [Client Quit]
npepinpe has joined #ruby
A_Drone has joined #ruby
Baffoon has joined #ruby
npepinpe has quit [Client Quit]
kira has quit [Remote host closed the connection]
A_Drone has quit [Ping timeout: 244 seconds]
ych has joined #ruby
auzty has joined #ruby
A_Drone has joined #ruby
ec0 has joined #ruby
A_Drone has quit [Remote host closed the connection]
mooe has quit [Quit: Connection closed for inactivity]
d0lph1n98 has joined #ruby
seventy has joined #ruby
pandaant has joined #ruby
A_Drone has joined #ruby
anahtar has quit [Ping timeout: 244 seconds]
araujo has quit [Read error: Connection reset by peer]
d0lph1n98 has quit [Quit: leaving]
araujo has joined #ruby
dstack has joined #ruby
<dstack> When ever I put a ; at the end of any line of code I get a compile error
teclator has joined #ruby
<ljarvis> lies
Chair has joined #ruby
<manveru> dstack: compile errors in your brain are the worst, yeah :|
ICantCook has quit [Ping timeout: 276 seconds]
anisha_ has joined #ruby
anisha has quit [Read error: Connection reset by peer]
<dminuoso> dstack: If you get a compile error, then you probably have discovered a Ruby bug.
giz|work has joined #ruby
Burgestrand has quit [Read error: Connection reset by peer]
jgt3 has quit [Ping timeout: 258 seconds]
jeanlinux has joined #ruby
Snowy has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
A_Drone has quit [Remote host closed the connection]
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
ledestin has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
gigetoo has quit [Read error: No route to host]
gigetoo has joined #ruby
Ropeney has quit [Remote host closed the connection]
ferr has joined #ruby
Pumukel has joined #ruby
mikecmpbll has joined #ruby
etehtsea has quit [Quit: Computer has gone to sleep.]
toretore has joined #ruby
da3mon has joined #ruby
qabwop has quit [Read error: Connection reset by peer]
Chair is now known as Couch
Pumukel has quit [Ping timeout: 264 seconds]
Pumukel has joined #ruby
<dstack> is rubymine the best IDE for Ruby atm?
<ljarvis> it's a very personal choice
hahuang65 has joined #ruby
bathtub_shark has quit [Remote host closed the connection]
PalaHO has joined #ruby
bathtub_shark has joined #ruby
senayar has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
<dminuoso> dstack: Editors (note this includes IDEs) are like religion: Pick one you like, and never talk about it.
<ljarvis> unless it's vim, then always talk about it and flaunt your superiority
hahuang65 has quit [Ping timeout: 264 seconds]
flying has joined #ruby
senayar has joined #ruby
Coldblackice has quit [Ping timeout: 250 seconds]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
hk238 has joined #ruby
pawnbox_ has quit [Ping timeout: 250 seconds]
coffeejunk has quit [Ping timeout: 276 seconds]
raddazong has quit [Ping timeout: 276 seconds]
karmatr0n has joined #ruby
SteppenII has joined #ruby
madhatter has joined #ruby
tekneek has joined #ruby
Pupeno has joined #ruby
tekneek has quit [Client Quit]
astrobun_ has joined #ruby
karmatr0n has quit [Ping timeout: 240 seconds]
etehtsea has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
hk238 has joined #ruby
Pumukel has joined #ruby
giz|work has quit [Ping timeout: 250 seconds]
A_Drone has joined #ruby
giz|work has joined #ruby
coffeejunk has joined #ruby
Pumukel has quit [Ping timeout: 250 seconds]
BubonicPestilenc has joined #ruby
<BubonicPestilenc> is there a way, to give HTTParty resp.body (string) as run it throught HP's parsers?
gigetoo has quit [Read error: No route to host]
<BubonicPestilenc> (like if i cached it resp.body, and just read it from cache)
Pumukel has joined #ruby
gigetoo has joined #ruby
xxninjabunnyxx has joined #ruby
nhhc has joined #ruby
tmtwd has quit [Ping timeout: 252 seconds]
Burgestrand has joined #ruby
aryaching has quit [Ping timeout: 265 seconds]
A_Drone has quit [Remote host closed the connection]
Derperperd has quit [Read error: Connection reset by peer]
Pumukel has quit [Ping timeout: 264 seconds]
duncannz has quit [Remote host closed the connection]
Derperperd has joined #ruby
MrBusiness2 has quit [Ping timeout: 250 seconds]
Burgestrand has quit [Ping timeout: 276 seconds]
astrobun_ has quit [Remote host closed the connection]
rodfersou has joined #ruby
Pupeno has quit [Quit: Leaving...]
pawnbox has joined #ruby
blackgoat has joined #ruby
gigetoo has quit [Read error: No route to host]
A_Drone has joined #ruby
gigetoo has joined #ruby
Pumukel has joined #ruby
toretore has quit [Ping timeout: 250 seconds]
tvw has joined #ruby
aryaching has joined #ruby
astrobun_ has joined #ruby
jkhl has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
axsuul has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 265 seconds]
Pumukel has joined #ruby
chihhsin has quit [Read error: Connection reset by peer]
lxsameer_ has joined #ruby
astrobun_ has quit [Ping timeout: 244 seconds]
<dstack> does ruby support the Goto statement?
craigp has quit [Ping timeout: 260 seconds]
sameerynho has quit [Ping timeout: 264 seconds]
dstack has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Pumukel has quit [Ping timeout: 264 seconds]
jeanlinux has quit [Remote host closed the connection]
RegulationD has joined #ruby
Silthias1 has joined #ruby
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Silthias has quit [Ping timeout: 244 seconds]
<heftig> dstack: only if you compile it in; it's part of SUPPORT_JOKE
dreamyspell_ has joined #ruby
etehtsea has quit [Read error: Connection reset by peer]
jaruga___ has joined #ruby
nankyokusei has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
dreamyspell has quit [Ping timeout: 244 seconds]
ych has joined #ruby
pawnbox has quit [Read error: No route to host]
postmodern has quit [Quit: Leaving]
pawnbox has joined #ruby
chihhsin has joined #ruby
c0mrad3 has joined #ruby
ec0 has quit [Ping timeout: 258 seconds]
alfiemax has quit [Ping timeout: 258 seconds]
<BubonicPestilenc> lol
BubonicPestilenc has quit [Quit: BubonicPestilenc]
alfiemax has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
ta__ has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
stamina has joined #ruby
craigp has joined #ruby
ta__ has quit [Ping timeout: 250 seconds]
Burgestrand has joined #ruby
rodfersou has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 252 seconds]
agit0 has quit [Read error: No route to host]
Pumukel has joined #ruby
Hyuk has joined #ruby
alfiemax has joined #ruby
Burgestrand has quit [Ping timeout: 250 seconds]
Azure has joined #ruby
Derperperd has quit [Read error: Connection reset by peer]
Pumukel has quit [Ping timeout: 260 seconds]
LoneHerm_ has joined #ruby
Derperperd has joined #ruby
rodfersou has joined #ruby
yeticry has quit [Ping timeout: 250 seconds]
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHerm_ has quit [Ping timeout: 244 seconds]
yeticry has joined #ruby
Pumukel has joined #ruby
bad_ip has quit [Ping timeout: 244 seconds]
bad_ip has joined #ruby
polysics_ has joined #ruby
workmad3 has joined #ruby
Derperperd has quit [Read error: Connection reset by peer]
rileyy has joined #ruby
blackmesa has joined #ruby
Pumukel has quit [Ping timeout: 258 seconds]
Burgestrand has joined #ruby
polysics has quit [Ping timeout: 264 seconds]
Derperperd has joined #ruby
Pumukel has joined #ruby
Burgestrand has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
ziyadb has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
jaiks has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 276 seconds]
ruby-lang872 has joined #ruby
ruby-lang872 has quit [Client Quit]
Fernando-Basso has joined #ruby
ych has joined #ruby
Pumukel has joined #ruby
c355e3b has joined #ruby
Burgestrand has joined #ruby
blackmesa has joined #ruby
polysics_ has quit []
polysics has joined #ruby
domgetter has joined #ruby
ICantCook has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
plantfood has joined #ruby
Pumukel has joined #ruby
johnDoe111 has joined #ruby
jaiks has joined #ruby
da3mon has quit [Ping timeout: 252 seconds]
Axy has quit [Read error: Connection reset by peer]
AnoHito has quit [Read error: Connection reset by peer]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
AnoHito has joined #ruby
hanmac has quit [Ping timeout: 258 seconds]
<plantfood> .
ruurd has quit [Ping timeout: 240 seconds]
nadir has quit [Ping timeout: 264 seconds]
drbrain has quit [Ping timeout: 264 seconds]
brainfreeze has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
drbrain has joined #ruby
drbrain has quit [Changing host]
drbrain has joined #ruby
nadir has joined #ruby
brain_freeze has joined #ruby
Vingador has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
OTORelic3 has quit [Read error: Connection reset by peer]
OTORelic3 has joined #ruby
danielius has joined #ruby
ldnunes has joined #ruby
johnDoe111 has quit [Remote host closed the connection]
hanmac has joined #ruby
Pumukel has joined #ruby
blackgoat has quit [Ping timeout: 276 seconds]
JeanCarloMachado has joined #ruby
karmatr0n has joined #ruby
PlasmaStar has quit [Ping timeout: 250 seconds]
blackgoat has joined #ruby
danielius has quit [Quit: Leaving]
danielius has joined #ruby
PlasmaStar has joined #ruby
tomchapi_ has quit [Ping timeout: 258 seconds]
phredus has joined #ruby
tomchapin has joined #ruby
danielius has quit [Client Quit]
danielius has joined #ruby
hahuang65 has joined #ruby
Pumukel has quit [Ping timeout: 244 seconds]
yeticry has quit [Quit: leaving]
danielius has quit [Client Quit]
ruurd has joined #ruby
karmatr0n has quit [Ping timeout: 240 seconds]
danielius has joined #ruby
ruurd is now known as Guest89054
danielius has quit [Remote host closed the connection]
danielius has joined #ruby
Pumukel has joined #ruby
danielius has quit [Client Quit]
async_prince has joined #ruby
danielius has joined #ruby
danielius has quit [Client Quit]
danielius has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
danielius has quit [Client Quit]
ferr has quit [K-Lined]
Pumukel has quit [Ping timeout: 264 seconds]
polysics_ has joined #ruby
<Zarthus> Is there a difference between Regexp#match and String#match?
<Zarthus> String has both #match and #scan, so it seems better to use that one, right?
ta_ has quit [Remote host closed the connection]
alfiemax has joined #ruby
ta_ has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
polysics has quit [Ping timeout: 250 seconds]
ta__ has joined #ruby
<apeiros> there is no difference, no. I'd be surprised if it wasn't even so that one simply calls the other.
blackmesa has quit [Ping timeout: 276 seconds]
<apeiros> fascinating. seems like I'm surprised :D
<apeiros> (they invoke different C functions…)
<Zarthus> :D
<apeiros> ah, different expectations on the arguments
<Zarthus> yeah, that's about the only difference
<Zarthus> i can see
lxsameer__ has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
<Zarthus> In a similar trend: Can anyone think of a situation where Regexp.new or %r{} works better than /regex/flags?
<apeiros> but after that, String#match will invoke match on the argument, passing itself.
<Mon_Ouie> Regexps that need to contain '/'
workmad3 has quit [Ping timeout: 244 seconds]
<apeiros> %r{} is nice to avoid escapes
jkhl has quit [Ping timeout: 264 seconds]
fmcgeough has joined #ruby
<Zarthus> The current code I have calls Regexp.new(/my regex/gm)
<Zarthus> which seems redundant
<apeiros> the only case I used Regexp.new was when I dynamically created a regex with the flags also being dynamic.
Madplatypus has quit [Quit: Connection closed for inactivity]
<apeiros> i.e.: almost never.
<apeiros> it is redundant.
<Zarthus> yeah, currently we have dynamic-ish flags
<apeiros> yeah, but the above won't allow you dynamic flags.
<Zarthus> right, so just /my regex/gm is fine
<apeiros> there's no g flag
<Zarthus> Yep, sorry! This website in particular converts 'g' into the appropriate method
<apeiros> :)
lxsameer_ has quit [Ping timeout: 244 seconds]
tectonic has joined #ruby
jaruga___ has quit [Ping timeout: 244 seconds]
Coldblackice has joined #ruby
alfiemax has quit [Ping timeout: 250 seconds]
<Zarthus> the currently generated output will look like this: https://gist.github.com/Zarthus/c96400ccf4d46de8abbef62fdcab0537 -- if anyone feels there's optimizations possible here feel free to mention it
<Zarthus> this will be automatically generated code, so the ideal scenario covers possible edge cases and backwards compatibility issues
<Zarthus> it's just an example shown to the user on how they *could* use their inserted text
flashpoint9 has joined #ruby
Pumukel has joined #ruby
<ninjaaron> probably a stupid question, but does ruby compile regex literals before runtime?
<apeiros> given that there's an //o flag, I'd assume so. never checked, though.
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has quit [Ping timeout: 260 seconds]
TheWhip has quit [Remote host closed the connection]
<ninjaaron> apeiros: and, like, why wouldn't it?
<apeiros> Don't know. Additional work required?
<ninjaaron> This is one of the things in python that always makes me look at other scripting languages: no builtin regex type means you have to compile every regex you want to use in a loop (or, alternatively, have a slow program).
<ninjaaron> *manually compile
<apeiros> IME regex are relatively fast in ruby.
<apeiros> but that may just be due to ruby itself being relatively slow in general ;-)
<ninjaaron> I think most dynamic languages are all using the same pcre libray under the covers.
<minimalism> Has anyone here run a ruby app using hiredis gem on a FreeBSD machine? It has that error building mentioning extconf.rb and was wondering if anyone had a recommended workaround.
<apeiros> ninjaaron: you're mistaken :)
<ninjaaron> :(
claudiuinberlin has quit [Remote host closed the connection]
<apeiros> old ruby used a patched/souped up version of emacs regex lib iirc, as of 1.9, it used oniguruma, and I think as of 2.0 it uses a fork of oniguruma (forgot the name of the fork, something like onigo)
<apeiros> given that onigiruma was specifically developed for ruby, I doubt that too many other languages use it
jaruga___ has joined #ruby
frozengeek has quit [Quit: frozengeek]
<heftig> python regex aren't pcre, either
sdothum has joined #ruby
sdothum has quit [Client Quit]
TheWhip has joined #ruby
tyang has joined #ruby
johnmilton has joined #ruby
jaruga___ has quit [Remote host closed the connection]
jaruga___ has joined #ruby
lxsameer__ has quit [Quit: WeeChat 1.5]
IanMalcolm has joined #ruby
sdothum has joined #ruby
tyang has quit [Client Quit]
rileyy has quit [Ping timeout: 244 seconds]
PalaHO has quit [Ping timeout: 258 seconds]
Pumukel has joined #ruby
Rodya_ has joined #ruby
ta_ has joined #ruby
johnmilton has quit [Ping timeout: 250 seconds]
johnmilton has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
<manveru> the only other thing that uses oniguruma that i know of is textmate
Tusskan has joined #ruby
ta_ has quit [Ping timeout: 258 seconds]
vdamewood has joined #ruby
jobat has joined #ruby
stamina has quit [Quit: WeeChat 1.5]
Rodya_ has quit [Ping timeout: 250 seconds]
jeanlinux has joined #ruby
nankyokusei has joined #ruby
the_rhizo3 has joined #ruby
tectonic has quit []
Pumukel has joined #ruby
LoneHermit has joined #ruby
beilabs_ has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 265 seconds]
statelesscode_ has joined #ruby
<plantfood> is ruby more popular in japan, than python ?
statelesscode has quit [Ping timeout: 276 seconds]
statelesscode_ is now known as statelesscode
atom3 has quit [Read error: Connection reset by peer]
etehtsea has joined #ruby
atom3 has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
domgetter has quit []
<Bish> :( still having my problem with threads being unbelieveable slow on only 1 server
Pumukel has joined #ruby
<Bish> when using ruby threads, it's like theyre not threads, it's happening sequential
<Bish> don't know what to do
tsia has quit [Quit: tsia]
<dminuoso> Bish: That's because of the RVL.
<plantfood> ah yes forgot about trends
tsia has joined #ruby
<dminuoso> Err, GVL.
<Bish> the what?
<Bish> do you mean GIL?
<dminuoso> Bish: The Global VM Lock.
<Bish> so you're talking about GIL
<dminuoso> The GVL.
<dminuoso> Ruby no longer has an interpreter since 2.0 ;-)
<dminuoso> But yeah.
<Bish> well, a vm is an interpreter too, so how does it matter
LoneHermit has quit [Ping timeout: 244 seconds]
<Bish> thing is the same code works well on 5 other servers.
<dminuoso> Bish: At any rate, it's been renamed internally to GVL since Ruby 2.0
phredus has quit [Remote host closed the connection]
<Bish> im using ruby1.9 so it's GIL
<Bish> GOTCHA
Takumo is now known as Jagmilleurs
<Bish> no.. i am using 2.3.. but the same code works well on other servers, what can i do..
Jagmilleurs is now known as Takumo
<heftig> dminuoso: https://www.google.com/trends/explore?q=ruby,python&date=all#GEO_MAP
<heftig> that coloring is somehow amuses me
<dminuoso> Heh.
phredus has joined #ruby
phredus has quit [Read error: Connection reset by peer]
<dminuoso> Bish: Is your code IO bound or CPU bound?
<dminuoso> If it's CPU bound you are basically out of luck unless you can move it into a native extension.
<apeiros> Bish: you can use jruby, it has parallel concurrency
<dminuoso> Or that.
dhinojosa has joined #ruby
<dminuoso> It also has a brilliant VM warmup, that makes you choke for 2 seconds every time you start your application.
<dminuoso> :|
<apeiros> aren't there ways around that?
Pumukel has quit [Ping timeout: 264 seconds]
phredus has joined #ruby
<apeiros> at least I thought there were tools providing warm VMs on standby
badeball_ is now known as badeball
pokalyis has joined #ruby
<dminuoso> apeiros: Not that I know of. The best you can do is write your software to lazy load classes.
blackmesa has joined #ruby
PalaHO has joined #ruby
tyang has joined #ruby
<dminuoso> apeiros: Though it's not as bad as the JIT warmup when running jruby/truffle
doublemalt_ has quit [Remote host closed the connection]
gnufied has joined #ruby
TheWhip has quit [Remote host closed the connection]
jkhl has joined #ruby
Pumukel has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
Snowy has joined #ruby
claudiuinberlin has joined #ruby
ninjaaron has quit [Quit: WeeChat 1.5]
Rodya_ has joined #ruby
<Bish> dminuoso: IO bound, otherwise i wouldn't ask, and code wouldn't act differently on 2 servers
<Bish> apeiros: yeah i am using too many c extensions in that code :(
last_staff has quit [Quit: last_staff]
Pumukel has quit [Ping timeout: 264 seconds]
<dminuoso> Bish: Those C extensions could be problematic.
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Bish> hows that?
beilabs has joined #ruby
<dminuoso> Bish: In general IO should not lock the GVL.
Burgestrand has quit [Ping timeout: 244 seconds]
Burgestrand has joined #ruby
jeanlinux has quit [Read error: Connection timed out]
<Bish> i know about that, but as i said, it works on other instances
<Bish> but on this servers threads act ridiculous
<dminuoso> Bish: Ruby versions of all servers (down to minor), which Kernels on all servers?
<dminuoso> And also, are you using Bundler?
jeanlinux has joined #ruby
AzureStigma has joined #ruby
<dminuoso> (If so, do you have a shared Gemfile.lock?)
workmad3 has joined #ruby
ramortegui has joined #ruby
<Bish> i am running 2.3.1 on all of them, they're all current ubuntus(blergh), the problematic server is a debian
pokalyis has joined #ruby
fmcgeough_ has joined #ruby
<dminuoso> Bish: Are you sure that Debian is also running 2.3.1, and not some old 1.8 with green threads?
<Bish> yes
fmcgeough has quit [Ping timeout: 240 seconds]
fmcgeough_ is now known as fmcgeough
<Bish> i hacked them in there
crystal77 has joined #ruby
<dminuoso> Bish: Do you still have the config log from building Ruby? If so, gist it please.
<apeiros> !unban ghostlight
<dminuoso> (Im curious about a few things, for example which thread model it was built with)
<Bish> dminuoso: i did what ruby-install did
tyang has quit [Ping timeout: 276 seconds]
ghostlight has joined #ruby
spiette has quit [Quit: :qa!]
<dminuoso> Bish: Without any information it's hard to debug really. Could be some native extension that misbehaves (and not properly unlocks the GVL in the right spots)
<Bish> well, the extensions i talked about, are not in the problematic daemon
<Bish> so i doubt that :(
Asher has quit [Quit: Leaving.]
synthroid has joined #ruby
<apeiros> they're not in the daemon but they're the reason you can't use jruby? :D
Tusskan has quit [Quit: Leaving]
cdg has joined #ruby
tyang has joined #ruby
thejoecarroll has quit [Ping timeout: 240 seconds]
<Bish> well, you want me to use 2 different ruby versions/vm kinds
<Bish> for the same project, using the same models?
<apeiros> I don't want anything
<Bish> yeah, but i answered your question i think
<apeiros> not really :)
Asher has joined #ruby
<apeiros> but not really my problem either, so - no need to.
<Bish> well, you don't need to respond either
<Bish> yet you do it
<apeiros> what? are you annoyed that I pointed out that what you said was contradictory?
<dminuoso> Would this be a great moment to talk about the four-sides model by Friedemann Schulz von Thun?
<dminuoso> :o
meth has joined #ruby
<Bish> no, but your answer to my rhetorical question, which explained that you didn't point it out, was "i don't care" in context
Fly77 has joined #ruby
OTORelic3 has quit [Ping timeout: 258 seconds]
Pumukel has joined #ruby
tsia has quit [Quit: tsia]
<Bish> ruby threading itself seems to be fine...
<Bish> i can do (0..50000).map { Thread.new{1}.value}
<Bish> and it finishes quite fast.. but as soon i use sockets on it.. it gets really slow
<dminuoso> ?testcase
<ruby[bot]> dminuoso: I don't know anything about testcase
workmad3 has quit [Ping timeout: 240 seconds]
<dminuoso> ruby[bot]: screw you.
<mikecmpbll> haha
DoubleMalt has joined #ruby
<Bish> while the same code, on my pc(which is much slower than the debian server) is way faster.
<Bish> same ruby version, just a sane distribution
<Bish> really weird, the performance of that server sucks in general, too, while CPU/RAM/HDD are fine
Coldblackice has quit [Ping timeout: 240 seconds]
Pumukel has quit [Ping timeout: 244 seconds]
<dminuoso> Bish: Are you sure it's a concurrency problem?
<Bish> well, it's a mailer daemon
<Bish> mail.deliver always takes long on ruby, so i threaded it, which works fine on the other servers
<Bish> since the delivering of the mail is what takes long ( IO )
Pumukel has joined #ruby
<Bish> it's working, everywhere
<Bish> but on this server, at first i thought it's the local smtp server.. until i tried extern ones, which had the same problem
<Bish> while if i connect from my offices connection.. it works fine
eljimbo has joined #ruby
<Bish> so it has to do something with IO/RUBY/threading
blackgoat has quit [Quit: WeeChat 1.5]
<dminuoso> Bish: Or perhaps you are using blocking IO?
<Bish> i even wrote a crazy connection SMTP pool, which made sending mails 100x times faster
<Bish> but no effect on the shitty server
claw has quit [Remote host closed the connection]
<Bish> dminuoso: how would i use blocking IO without knowing it?
<Bish> serious question.. since it acts like blocking IO
Pumukel has quit [Ping timeout: 264 seconds]
<dminuoso> Bish: I dont know how to tell you how to know what you are doing without knowing what you are doing, other than to figure out what you are doing.
claw has joined #ruby
<dminuoso> That question is a bit pointless. :p
<Bish> as i said, it's simple as
<Bish> 100.times { Thread.new { mail.deliver} } while mail is the Mail gem.
Didac has quit [Max SendQ exceeded]
auzty has quit [Quit: Leaving]
pwnd_nsfw has quit [Read error: Connection reset by peer]
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pwnd_nsfw has joined #ruby
ta__ has quit [Remote host closed the connection]
etehtsea has quit [Ping timeout: 240 seconds]
<dminuoso> Bish: Are you using the same exact Mail gem?
<Bish> yes
AzureStigma has quit [Quit: Textual IRC Client: www.textualapp.com]
crystal77 has joined #ruby
Didac has joined #ruby
blackmesa has joined #ruby
tdy has quit [Ping timeout: 264 seconds]
<dminuoso> Bish: I have an idea.
<Bish> dminuoso: uh uh uh *hype*
<dminuoso> Bish: Are you by any chance using SMTP over SSL?
Pumukel has joined #ruby
<Bish> well i had that idea too, but actually i am not sure
<Bish> no, i am sure, i just saw it in strace
<Bish> no i am not using ssl
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
vdamewood has quit [Quit: Life beckons.]
Vingador has quit [Remote host closed the connection]
<dminuoso> Bish: Can you actually tcpdump to be sure? Because then we could look at a culprit.
pwnd_nsfw` has joined #ruby
<dminuoso> Or did you see the plain mail in strace?
<dminuoso> Bish: If that doesn't help, gist your loaded features.
PalaHO has quit [Ping timeout: 258 seconds]
hahuang65 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
pwnd_nsfw has quit [Ping timeout: 250 seconds]
CloCkWeRX has quit [Quit: Leaving.]
Pumukel has quit [Ping timeout: 264 seconds]
monoprotic has joined #ruby
<Bish> dminuoso: i saw the plain mail, yes
<Bish> my loaded features?
Hyuk has joined #ruby
matp has quit [Remote host closed the connection]
blankpaper has joined #ruby
<blankpaper> Is an insert into a Hash O(1)?
Hyuk has quit [Max SendQ exceeded]
Fly77 has quit [Ping timeout: 260 seconds]
diprotic has quit [Ping timeout: 250 seconds]
GodFather has quit [Ping timeout: 258 seconds]
hahuang65 has quit [Ping timeout: 260 seconds]
anisha_ has quit [Quit: This computer has gone to sleep]
dhinojosa has quit [Ping timeout: 276 seconds]
<Mon_Ouie> Assuming you have a good hashing function, it is amortized O(1)
lightheaded has quit [Remote host closed the connection]
Pumukel has joined #ruby
lightheaded has joined #ruby
<blankpaper> Mon_Ouie: Good hashing function? As in something like my_hash[new_key] = 1?
<Mon_Ouie> The implementation of new_key.hash needs to have a good distribution. That should be a reasonable assumption for most built-in types and data set.
karmatr0n has joined #ruby
ukk has quit [Quit: WeeChat 1.5]
youch has joined #ruby
<blankpaper> Cool - was confused by what http://bigocheatsheet.com/ has for hash tables...but I assume that's for rolling your own.
karmatr0_ has joined #ruby
lightheaded has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
yeticry has joined #ruby
* Bish never tried to use builtin ruby of debian let's see.
<Mon_Ouie> No, the worst case is also O(n) in Ruby. O(1) is the typical case though.
karmatr0n has quit [Ping timeout: 240 seconds]
qguv has quit [Quit: bye]
KaliLinuxGR has quit [Remote host closed the connection]
sharkman has joined #ruby
<sharkman> im using mechanize on a site. i can log in to the site. and navigate to certain pages. but when i try to click a certain checkbox an continue, it logs me out, and says my cookies arent valid. any thoughts?
pabloh has joined #ruby
Pumukel has joined #ruby
eljimbo has quit [Quit: This computer has gone to sleep]
ule has quit [Ping timeout: 250 seconds]
ule has joined #ruby
KaliLinuxGR has joined #ruby
am55 has joined #ruby
<blankpaper> Oh, yeah it is O(n)...I'm just tired.
etehtsea has joined #ruby
ule has quit [Changing host]
ule has joined #ruby
TheWhip has joined #ruby
<Bish> bleh RubyVM does not exist in 2.1?
c0mrad3 has quit [Quit: Connection closed for inactivity]
blankpaper has quit [Quit: Page closed]
<dminuoso> Bish: yes, your loaded features
<Bish> dminuoso: what does that mean?
Pumukel has quit [Ping timeout: 250 seconds]
coolboy has joined #ruby
f4cl3y has quit [Ping timeout: 276 seconds]
<dminuoso> Bish: Personally I would just SIGSEGV the process and then look at all the loaded features. Im sure Mon_Ouie has a more elegant solution.
<dminuoso> As usual.
<Bish> would you tell me, what a "loaded feature" is?
Pumukel has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
<Mon_Ouie> 21>> RubyVM
<ruby[bot]> Mon_Ouie: # => RubyVM (https://eval.in/626992)
<Bish> 21>> RubyVM::InstructionSequence.load_from_binary
LoneHerm_ has joined #ruby
<Bish> :(
yeticry has joined #ruby
<Bish> any ways to do this in 2.1?
<dminuoso> Bish: Technically yes.
<dminuoso> Bish: The code has been there since 2.1, it's just commented out for "security reasons"
beilabs_ has joined #ruby
heelpmeplz has quit [Read error: Connection reset by peer]
<dminuoso> So you could recompile if you really wanted to.
<Bish> bleh.
<matthewd> Bish: Why do you want to? :/
<Bish> matthewd: don't ask :D
tdy has joined #ruby
heelpmeplz has joined #ruby
GodFather has joined #ruby
<Bish> matthewd: care to see my code form yesterday in good ( with connection_pool )? since you helped me with it :3
<Bish> but actually, in the end it didn't help me
<matthewd> Sure
plantfood has quit [Quit: Leaving]
thadtheman has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
<thadtheman> records is an array of arrays of strings
<thadtheman> This generates a 1: puts records[0][0] <=> records [1][0]
vuoto has joined #ruby
<thadtheman> This generates an error: records2=records.sort{ |a,b| a[0] <=> b[0] }
<thadtheman> Why?
beilabs has quit [Ping timeout: 252 seconds]
plantfood has joined #ruby
<hanmac> thadtheman: why not records.sort_by {|a| a[0] } ? and what kind of error does it do?
coolboy has quit [Remote host closed the connection]
yeticry has quit [Ping timeout: 250 seconds]
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
<thadtheman> hanmac, the error: in `sort': comparison of Array with Array failed (ArgumentError)
<thadtheman> I didn't use sort_by because I did not know if it.
<matthewd> Bish: But it didn't help?
yeticry has joined #ruby
<hanmac> thadtheman: try it with sort_by and tell us if the error does still appear ... if it does show us some sample data in a gist
craigp has quit [Ping timeout: 260 seconds]
<Bish> matthewd: yeah im having poor ruby threading performance on only 1 server
<Bish> can't figure out why
ta_ has quit [Ping timeout: 244 seconds]
coolboy has joined #ruby
<Bish> this was an attempt to fix it
<dminuoso> >> [["abc"], ["abc"]].sort{ |a,b| a[0] <=> b[0] } # thadtheman
<ruby[bot]> dminuoso: # => [["abc"], ["abc"]] (https://eval.in/627001)
<Bish> this sends emails 283472347234x faster, but not with the shitty server
<dminuoso> Works for me.
<Bish> on all other servers, it works like a charm
<dminuoso> Bish: compare loaded features.
plantfood has quit [Client Quit]
matp has joined #ruby
bkxd has joined #ruby
<Bish> while sending an email with this on other servers takes <0.01 secs, it needs >1sec on the shitty server
<Bish> dminuoso: i don't know what that is
<Bish> still.
<matthewd> dminuoso is talking about $", aka $LOADED_FEATURES
plantfood has joined #ruby
Pumukel has joined #ruby
<dminuoso> matthewd: That one. :)
<Bish> woohoo
<Bish> >> $LOADED_FEATURES
<Bish> >> $LOADED_FEATURES
<dminuoso> matthewd: Thanks, now I dont have to Process.kill(:SIGBUS, $$) anymore!
<ruby[bot]> Bish: # => ["enumerator.so", "thread.rb", "rational.so", "complex.so", "/execpad/interpreters/ruby-2.3.0/lib/ru ...check link for more (https://eval.in/627007)
<dminuoso> :o)
plantfood has quit [Client Quit]
<Bish> what should be in there?
f4cl3y has joined #ruby
<dminuoso> Stuff.
Weavel has joined #ruby
plantfood has joined #ruby
tsia has joined #ruby
eljimbo has joined #ruby
tyang has quit [Ping timeout: 260 seconds]
<Bish> yeah i mean, i cannot see something missing
plantfood has quit [Client Quit]
tsia has quit [Client Quit]
l4v2 has joined #ruby
tyang has joined #ruby
plantfood has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JeanCarl1Machado has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
<Bish> bleh this fucks me up
Pumukel has joined #ruby
plantfood has quit [Client Quit]
<matthewd> Have you determined whether something is blocking, or it's just being slow?
<Bish> it feels like blocking, by why would it / how would i check?
plantfood has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
<apeiros> >> [[nil],["foo"]].sort { |a,b| a[0] <=> b[0] } # thadtheman
<ruby[bot]> apeiros: # => comparison of Array with Array failed (ArgumentError) ...check link for more (https://eval.in/627014)
<apeiros> thadtheman: this means you're comparing an array which contains values which can't be compared.
<matthewd> I'd start with the lazy option, of sprinkling putses around your pooling
<apeiros> such as in my example nil & "foo"
RegulationD has joined #ruby
ych has joined #ruby
<thadtheman> apeiros: actually it turns out there is an empty array in there. I'm trying to figure out why and see if that fixes things.
plantfood has quit [Client Quit]
plantfood has joined #ruby
<apeiros> yeah, sure. empty array means a[0] is nil, and `nil <=> anything` usually fails.
plantfood has quit [Read error: Connection reset by peer]
machinewar has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
tsia has joined #ruby
<machinewar> anyone used stackprof for ruby profiling? I keep seeing that the most frequently executing function at prorilfe time is Module.caller_bindings. Anyone know what this is?
dminuoso_ has joined #ruby
johnmilton has quit [Quit: Namaste]
RegulationD has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
<apeiros> probably one of the implementations of "binding of caller"
Azure has quit [Ping timeout: 250 seconds]
<apeiros> which allows you to access the binding of the calling method
<apeiros> it's nothing native to ruby
<machinewar> apeiros: makes sense thanks
<matthewd> machinewar: Are you raising a lot of exceptions?
<machinewar> yes tons lol
dminuoso has quit [Ping timeout: 265 seconds]
<machinewar> does that get called when an exception is called?
<matthewd> If you have that gem loaded, yes
<matthewd> But exceptions and fast don't generally go together anyway, so maybe don't do that if you can avoid it
blaxter has quit [Quit: foo]
<machinewar> matthewd: dude you're a legend lol that's exactly what's happening
<apeiros> exceptions should be exceptional
<apeiros> hence the name (surprise)
qguv has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
Pumukel has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
<apeiros> so sad, I already thought RubyVM::DebugInspector was core/stdlib :(
dminuoso_ has quit [Ping timeout: 276 seconds]
bkxd has joined #ruby
vuoto has quit [Remote host closed the connection]
pandaant has quit [Remote host closed the connection]
agent_white has joined #ruby
vuoto has joined #ruby
vuoto has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 265 seconds]
vuoto has joined #ruby
dminuoso has joined #ruby
OTORelic3 has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
hutch34 has joined #ruby
aries_liuxueyang has quit [Ping timeout: 250 seconds]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
haraigo has quit [Ping timeout: 260 seconds]
submitnine has quit [Read error: Connection reset by peer]
TvL2386 has joined #ruby
giz|work has quit [Ping timeout: 276 seconds]
lightheaded has joined #ruby
agit0 has joined #ruby
rodfersou is now known as rodfersou|lunch
ramortegui has quit [Quit: Ex-Chat]
mtkd has quit [Ping timeout: 252 seconds]
Pumukel has joined #ruby
<Bish> the problem seems much less severe with the debian default-ruby
<Bish> but still present
heelpmeplz has quit [Ping timeout: 250 seconds]
mtkd has joined #ruby
sharkman has quit [Ping timeout: 240 seconds]
heelpmeplz has joined #ruby
sharkman has joined #ruby
blackwell has quit [Max SendQ exceeded]
<matthewd> Bish: Have you confirmed multiple threads are making it into the inner sendmail call at the same time?
aries_liuxueyang has joined #ruby
<matthewd> Obviously not the sort of thing you'd expect to differ environmentally, but it's easy to check, so I'd just make sure
rippa has joined #ruby
blackwell has joined #ruby
<Bish> matthewd: well i implemented the SMTPpool after the problem occured, it was supposed to be a fix
tyang has joined #ruby
<Bish> so even if that was the case.. it wouldn't be the cause of the problem, i guess
<matthewd> Ah okay, this server is where the original symptom started?
<Bish> yes
<Bish> being slow with Thread.new { Mail.deliver }
<Bish> it takes seconds to do that, if a few threads get spawned
ChiefAlexander has joined #ruby
tdy has quit [Quit: tdy]
Pumukel has quit [Ping timeout: 264 seconds]
<matthewd> It has the same behaviour talking to any SMTP server?
<Bish> that was my first guess, but it happens with extern smtp servers too
<Bish> and bonus: i created a ssh tunnel to an extern smtp server
tkbsnn has joined #ruby
<Bish> and had the very same code on my office computer, having send emails THROUGH the tunnel
Pumukel has joined #ruby
<Bish> 348248234 times faster
aries_liuxueyang has quit [Ping timeout: 240 seconds]
<Bish> it has to be ruby multithreading shit, or the server sucks, or debian sucks
johnmilton has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 250 seconds]
kobain has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
polishdub has joined #ruby
<dminuoso> Bish: Dodge the Mail gem, and do some manual socketry.
pabloh has quit [Remote host closed the connection]
<dminuoso> Bish: See if the problem still applies.
thejoecarroll has joined #ruby
<Bish> i measured time mail gem needs to create a mail, which is fine, but i will try to send the resulting email as a string
<Bish> wish me luck
SteenJobs has joined #ruby
heelpmeplz has quit [Read error: Connection reset by peer]
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
heelpmeplz has joined #ruby
dminuoso has quit [Remote host closed the connection]
jeanlinux has quit []
RegulationD has joined #ruby
conta has quit [Ping timeout: 264 seconds]
Pumukel has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
tdy has joined #ruby
stamina has joined #ruby
eljimbo has quit [Quit: This computer has gone to sleep]
TvL2386 has quit [Remote host closed the connection]
flashpoint9 has quit [Remote host closed the connection]
Limix has joined #ruby
eljimbo has joined #ruby
flashpoint9 has joined #ruby
machinewar has quit [Remote host closed the connection]
Pumukel has quit [Ping timeout: 264 seconds]
skweek has joined #ruby
sp__ has joined #ruby
jooni has joined #ruby
flashpoint9 has quit [Ping timeout: 250 seconds]
synthroid has quit [Remote host closed the connection]
aries_liuxueyang has joined #ruby
<Bish> but after point where only a string gets sent, it's still pretty slow
ta_ has joined #ruby
PalaHO has joined #ruby
spiette has joined #ruby
Pumukel has joined #ruby
programmerq has joined #ruby
rubie has joined #ruby
tyang has quit [Ping timeout: 258 seconds]
saneax is now known as saneax-_-|AFK
flashpoint9 has joined #ruby
arthurl has joined #ruby
hahuang65 has joined #ruby
<arthurl> hi guys- i'm trying to install a gem (using rbenv) on a centos 6.7 box- seeing a 'failed to build gem native extension' error- not sure what my options are here:
sp__ has quit [Ping timeout: 244 seconds]
<arthurl> having read some theads online people make mention of ruby-devel package- i tried to run a yum install ruby-devel.x86_64 command- but it comes back with 'Package ruby-devel-1.8.7.374-4.el6_6.x86_64 already installed and latest version'
Pumukel has quit [Ping timeout: 250 seconds]
blaxter has joined #ruby
rubie has quit [Ping timeout: 252 seconds]
hutch34 has quit [Ping timeout: 276 seconds]
Derperperd has quit [Quit: Derperperd]
IanMalcolm has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
andrewvos has joined #ruby
banisterfiend has joined #ruby
Derperperd has joined #ruby
Derperperd has quit [Client Quit]
hahuang65 has quit [Ping timeout: 250 seconds]
tyang has joined #ruby
<matthewd> Bish: If you have it down to that, you should be able to manually telnet from the server to the SMTP server, paste things in, and watch it be slow there too
Pumukel has joined #ruby
tdw has joined #ruby
jhack has joined #ruby
ChiefAlexander has joined #ruby
araujo has quit [Ping timeout: 244 seconds]
Couch has quit [Ping timeout: 252 seconds]
araujo has joined #ruby
Hobogrammer has quit [Quit: WeeChat 0.4.2]
antgel has quit [Ping timeout: 252 seconds]
flashpoint9 has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
flashpoint9 has joined #ruby
Lucky_ABA has joined #ruby
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ruby
flashpoint9 has quit [Ping timeout: 250 seconds]
Apocalypse has quit [Ping timeout: 250 seconds]
vuoto has quit [Quit: Lost terminal]
Pumukel has joined #ruby
vuoto has joined #ruby
<atom_> arthurl: you might need the development tools (general tools) installed as well
Apocalypse has joined #ruby
<atom_> try this: sudo yum -y groupinstall "Development Tools"
dkphenom has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
<arthurl> atom_ thanks- installed development tools- unfortunately still seeing the same error when attempting to install that passenger gem
bluOxigen has joined #ruby
Pumukel has quit [Ping timeout: 244 seconds]
elementaru has joined #ruby
TheWhip has quit [Remote host closed the connection]
Pumukel has joined #ruby
Guest38_ has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
<matthewd> arthurl: fastthread is... old.
<arthurl> matthewd yeah trying to support an internal legacy app here... :)
<arthurl> :(
<matthewd> Might be easier to go with a correspondingly legacy ruby version
Pumukel has quit [Ping timeout: 264 seconds]
stamina has quit [Ping timeout: 250 seconds]
axsuul has joined #ruby
ta_ has quit [Remote host closed the connection]
synthroid has joined #ruby
Snowy has quit [Remote host closed the connection]
rodferso1|lunch has joined #ruby
j416 has quit [Ping timeout: 276 seconds]
flashpoint9 has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
Cohedrin has joined #ruby
LoneHerm_ has joined #ruby
rodfersou|lunch has quit [Ping timeout: 265 seconds]
amclain has joined #ruby
marxarelli has joined #ruby
jgnagy has joined #ruby
giz|work has joined #ruby
edwinvdgraaf has quit [Ping timeout: 260 seconds]
xMopxShell has quit [Ping timeout: 240 seconds]
giz|work has quit [Remote host closed the connection]
hirvi has quit [Ping timeout: 240 seconds]
aries_liuxueyang has quit [Read error: Connection reset by peer]
hirvi has joined #ruby
airdisa has joined #ruby
LoneHerm_ has quit [Ping timeout: 264 seconds]
ghr has quit [Ping timeout: 240 seconds]
isomorphismes has quit [Ping timeout: 240 seconds]
tabakhase has quit [Ping timeout: 240 seconds]
shtirlic has quit [Ping timeout: 240 seconds]
parus has quit [Ping timeout: 240 seconds]
nitric has joined #ruby
tyang has quit [Ping timeout: 258 seconds]
CustosLimen has quit [Ping timeout: 240 seconds]
aries_liuxueyang has joined #ruby
thorgi_ has quit [Ping timeout: 240 seconds]
go|dfish has quit [Ping timeout: 240 seconds]
joevandyk has quit [Ping timeout: 240 seconds]
kloeri has quit [Remote host closed the connection]
ghostlight has quit [Ping timeout: 240 seconds]
Platini has quit [Ping timeout: 240 seconds]
[spoiler] has quit [Ping timeout: 240 seconds]
fold4 has quit [Ping timeout: 240 seconds]
tabakhase has joined #ruby
n8o has quit [Excess Flood]
parus has joined #ruby
joevandyk has joined #ruby
kloeri has joined #ruby
M-Technic has quit [Ping timeout: 240 seconds]
shtirlic has joined #ruby
xMopxShell has joined #ruby
n8o has joined #ruby
isomorphismes has joined #ruby
[spoiler] has joined #ruby
thorgi has joined #ruby
zzxc has quit [Ping timeout: 240 seconds]
M-Technic has joined #ruby
cpruitt has joined #ruby
headius_ is now known as headius
CustosLimen has joined #ruby
zzxc has joined #ruby
TheWhip has joined #ruby
pwnd_nsfw` has quit [Read error: Network is unreachable]
Miron has quit [Quit: bye]
tyang has joined #ruby
tabakhase has quit [Ping timeout: 240 seconds]
Lucky_ABA has quit [Ping timeout: 240 seconds]
Platini has joined #ruby
ghostlight has joined #ruby
ghostlight has quit [Max SendQ exceeded]
pwnd_nsfw` has joined #ruby
ghostlight has joined #ruby
ghostlight has quit [Max SendQ exceeded]
hogetaro has quit [Ping timeout: 240 seconds]
ghostlight has joined #ruby
ghostlight has quit [Max SendQ exceeded]
Miron has joined #ruby
ghr has joined #ruby
go|dfish has joined #ruby
ghostlight has joined #ruby
ghostlight has quit [Max SendQ exceeded]
umdstu has joined #ruby
ghostlight has joined #ruby
ghostlight has quit [Max SendQ exceeded]
hogetaro has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tvon has joined #ruby
tabakhase has joined #ruby
ghostlight has joined #ruby
ghostlight has quit [Max SendQ exceeded]
spudowiar has joined #ruby
<umdstu> is there a way to force ruby to not attempt to convert asci-8bit looking text into utf8? i have a value, ‘\x45’ for example that I want to be read as just that, but i always get invalid byte sequence errors
ghostlight has joined #ruby
ghostlight has quit [Max SendQ exceeded]
ghostlight has joined #ruby
ghostlight has quit [Max SendQ exceeded]
byteflame has joined #ruby
vuoto has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 240 seconds]
ghostlight has joined #ruby
ghostlight has quit [Max SendQ exceeded]
<havenwood> >> "\x45"
<ruby[bot]> havenwood: # => "E" (https://eval.in/627084)
<havenwood> >> "\x45".encoding
<ruby[bot]> havenwood: # => #<Encoding:UTF-8> (https://eval.in/627085)
aryaching_ has joined #ruby
aryaching has quit [Ping timeout: 244 seconds]
ghostlight has joined #ruby
ghostlight has quit [Max SendQ exceeded]
ghostlight has joined #ruby
skweek has quit [Ping timeout: 250 seconds]
ghostlight has quit [Max SendQ exceeded]
al2o3-cr has joined #ruby
byteflame has quit [Remote host closed the connection]
ghostlight has joined #ruby
agarie has joined #ruby
claudiuinberlin has quit []
agarie has quit [Client Quit]
<umdstu> havenwood: i dont want it to be interpreted
agit0 has joined #ruby
<Papierkorb> >> '\x45'
<ruby[bot]> Papierkorb: # => "\\x45" (https://eval.in/627086)
mark_66 has quit [Remote host closed the connection]
arthurl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<umdstu> interesting different, single quote vs double quote
SeepingN has joined #ruby
PalaHO has quit [Ping timeout: 244 seconds]
<lizard2010> interprete or not, it is diff
sharkman has quit [Ping timeout: 276 seconds]
giz|work has joined #ruby
arashb has joined #ruby
sepp2k has quit [Quit: Leaving.]
tkbsnn has quit [Remote host closed the connection]
conta has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Eiam_ has joined #ruby
arthurl has joined #ruby
nankyokusei has joined #ruby
<arthurl> matthewd you would think- unfortunately this is what happens when i try to install 1.8.7 : https://gist.github.com/alyssenko/a16999fe8db7715a2b22ee4427ce4fa3
senayar has quit []
ChiefAlexander has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 250 seconds]
cpruitt has quit [Read error: Connection reset by peer]
flashpoint9 has quit [Remote host closed the connection]
cpruitt has joined #ruby
flashpoint9 has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
Derperperd has joined #ruby
teclator has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 244 seconds]
flashpoint9 has quit [Ping timeout: 258 seconds]
rsampaio_ has joined #ruby
Coldblackice has joined #ruby
tsia has quit [Ping timeout: 250 seconds]
TheFarmingBunny has joined #ruby
<TheFarmingBunny> I have a question about defined?
<TheFarmingBunny> for an undefined variable defined? returns nil like it should
<TheFarmingBunny> but for an undefined environment variable it returns "method"
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<andrewvos> how are you using it TheFarmingBunny?
<TheFarmingBunny> defined? ENV["UNDEFINED_ENV_VARIABLE"]
<drbrain> TheFarmingBunny: ENV[] is a method
<Mon_Ouie> You should probably use ENV.has_key? instead
<drbrain> ↑
<drbrain> defined? is syntax, so its behavior is unusual
blackmesa has joined #ruby
<TheFarmingBunny> oh wow
<TheFarmingBunny> didn't find env.has_key?
<TheFarmingBunny> thanks, thats just what i need
rodferso1|lunch is now known as rodfersou
<drbrain> if possible use methods, const_defined? method_defined? instance_variable_defined?
hutch34 has joined #ruby
<TheFarmingBunny> Thanks, I'm pretty new to ruby and this is my first gem
jhack has quit [Quit: jhack]
mistym has quit [Ping timeout: 276 seconds]
giz|work has quit [Ping timeout: 250 seconds]
hutch34 has quit [Quit: WeeChat 1.5]
mtkd has quit [Ping timeout: 250 seconds]
Pumukel has joined #ruby
jobat has quit [Quit: Page closed]
hutch34 has joined #ruby
claudiuinberlin has joined #ruby
xrlabs has quit [Quit: Connection closed for inactivity]
mistym has joined #ruby
mistym has quit [Changing host]
mistym has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
mtkd has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
Pumukel has quit [Ping timeout: 264 seconds]
Zelest has joined #ruby
<jgnagy> I usually just use ENV.key?('UNDEFINED_ENV_VARIABLE')
<Zelest> i'm trying to install the dnssd gem and it fails.. it complains about not finding dns_sd.h even though I have it on my system.. how can i tell gem where to look for it? (ruby 2.3 and dnssd-3.0.1)
dreamyspell_ is now known as dreamyspell
ponga has quit [Quit: Connection closed for inactivity]
<havenwood> Zelest: See the examples in the gem's readme: https://github.com/tenderlove/dnssd#readme
<Zelest> oh
<Zelest> thanks!
<havenwood> you're welcome!
TomyWork has quit [Ping timeout: 276 seconds]
tdw has quit [Read error: Connection reset by peer]
tvon has quit [Quit: Peace out, y'all!]
<matthewd> .. or just `if ENV['FOO']`
blackwell has quit [Quit: ZNC 1.6.3 - http://znc.in]
Cohedrin has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
IanMalcolm has joined #ruby
polysics_ has quit []
blackwell has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
blaxter has quit [Quit: foo]
shinnya has joined #ruby
crystal77 has joined #ruby
<Zelest> havenwood, for some reason that refused to work.. :S oh well, some symlinking seemed to do the trick :D
ChiefAlexander has joined #ruby
Dimik has joined #ruby
Silthias1 has left #ruby [#ruby]
flying has quit []
claudiuinberlin has joined #ruby
ta_ has joined #ruby
meth has quit [Quit: Bye!]
firstdayonthejob has joined #ruby
redpants has joined #ruby
SteenJobs has joined #ruby
whathappens has joined #ruby
ta_ has quit [Ping timeout: 244 seconds]
flashpoint9 has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
Immune has joined #ruby
<jgnagy> I've had too many instances where the value of a hash key is false, so using `if hash[:key]` doesn't quite do what I wanted
hutch34 has quit [Ping timeout: 244 seconds]
<bougyman> hash.key? :key
<bougyman> ah, I see you said that already
<jgnagy> but for ENV it is difficult to make a value actually be a False class instance, so for that it is pretty safe
ziyadb has joined #ruby
JeanCarl1Machado has quit [Ping timeout: 264 seconds]
hutch34 has joined #ruby
<matthewd> It's impossible, in fact
<bougyman> it can be nil, though
hahuang65 has joined #ruby
<bougyman> oh, I guess not.
mikecmpbll has joined #ruby
dviola has joined #ruby
<havenwood> Only if the key is missing. Though #key? or #has_key? save a bit of effort by not returning the value.
giz|work has joined #ruby
<havenwood> ::key? and ::has_key? i mean
etehtsea has quit [Quit: Computer has gone to sleep.]
jooni has quit [Ping timeout: 244 seconds]
SteenJobs has quit [Quit: SteenJobs]
hahuang65 has quit [Ping timeout: 250 seconds]
f4cl3y has quit [Ping timeout: 276 seconds]
karmatr0_ has quit [Read error: Connection reset by peer]
karmatr0n has joined #ruby
last_staff has joined #ruby
jhooker has quit [Ping timeout: 240 seconds]
karmatr0_ has joined #ruby
karmatr0n has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
rsampaio_ has quit [Quit: WeeChat 1.5]
conah has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
dkphenom has joined #ruby
rsampaio_ has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
postmodern has joined #ruby
Guest89054 has left #ruby ["bye folks"]
[Butch] has joined #ruby
ruurd has joined #ruby
jkhl has quit [Ping timeout: 260 seconds]
Limix has quit [Quit: Limix]
Limix has joined #ruby
l4v2 has quit [Quit: l4v2]
crystal77 has quit [Quit: Textual IRC Client: www.textualapp.com]
Limix has quit [Client Quit]
SteenJobs has joined #ruby
umdstu has quit [Quit: umdstu]
Limix has joined #ruby
LoneHermit has joined #ruby
hahuang65 has joined #ruby
Limix has quit [Client Quit]
nitric_ has joined #ruby
blackmesa has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
moneylotion has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
nitric has quit [Ping timeout: 276 seconds]
arashb has quit [Ping timeout: 265 seconds]
LoneHermit has quit [Ping timeout: 276 seconds]
coolboy has quit [Ping timeout: 240 seconds]
meth has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
davedev24 has quit []
RegulationD has quit [Remote host closed the connection]
blackwell has quit [Max SendQ exceeded]
blackwell has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
Limix has joined #ruby
replay has joined #ruby
slappy16 has joined #ruby
miqlas-H has joined #ruby
JeanCarloMachado has joined #ruby
ych has joined #ruby
async_prince has quit [Ping timeout: 240 seconds]
blackwell has quit [Max SendQ exceeded]
zacts has joined #ruby
blackwell has joined #ruby
justinweiss has quit [Quit: Connection closed for inactivity]
David27 has joined #ruby
IanMalcolm has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fold4 has joined #ruby
joelwallis has joined #ruby
Derperperd has quit [Read error: Connection reset by peer]
l4v2 has joined #ruby
alfiemax has joined #ruby
reisei has joined #ruby
zacts has quit [Quit: WeeChat 1.5]
redpants has quit [Ping timeout: 250 seconds]
Vingador has joined #ruby
JeanCarloMachado has quit [Ping timeout: 265 seconds]
ec0 has joined #ruby
ta_ has joined #ruby
TPug has joined #ruby
tyang has joined #ruby
aazsdk has quit [Quit: aazsdk]
Derperperd has joined #ruby
Ishido has joined #ruby
jhack has joined #ruby
GodFather has quit [Ping timeout: 258 seconds]
nitric has joined #ruby
wugy has quit []
jhack has quit [Client Quit]
nitric_ has quit [Ping timeout: 264 seconds]
bocaneri has quit [Remote host closed the connection]
elifoster has joined #ruby
jhack has joined #ruby
ramfjord has joined #ruby
coolboy has joined #ruby
spudowiar has quit [Quit: Leaving.]
RegulationD has joined #ruby
JeanCarloMachado has joined #ruby
mrgrieve1 has joined #ruby
joelwallis has quit [Quit: Leaving]
IanMalcolm has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
IanMalcolm has quit [Client Quit]
jhack has quit [Quit: jhack]
jhack has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
<reisei> hello! I have question: how can I find tabultion symbol in file? I tried line[/\t */].size but it return "undefined method `size' for nil:NilClass (NoMethodError)"
nankyokusei has joined #ruby
<jgnagy> you want to know how many tabs are in the entire file? or just if any exist?
Lucky_ABA has joined #ruby
JeanCarl1Machado has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
<reisei> jgnagy: I try to count tabs in the beginning of the line.
<jgnagy> I assume your `line` object there is within a block on some File read operation, correct?
ramfjord has quit [Ping timeout: 244 seconds]
<reisei> jgnagy: yes, that's right.
atmosx has joined #ruby
Baffoon has quit [Ping timeout: 264 seconds]
aazsdk has joined #ruby
crystal77 has joined #ruby
jaequery has joined #ruby
<jgnagy> I would make a variable called "tab_count", set it to 0
<jgnagy> then add the number of tabs that match to that variable
vuoto has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
<jgnagy> let me make a gist for you
zacts has joined #ruby
sharkman has joined #ruby
<reisei> jgnagy: but I cannot find any tabs with regex.
<atmosx> Hello, I'm playing with project Euler exercises. That's my take on the second one, but my MBA is swapping, I wonder if there are more efficient ways of finding the magic number. I'll run the same code on my iMac (maxed-out i7) later but out of curiosity... https://gist.github.com/atmosx/8cb1a8d3d8ac05ed5a90bdb255e93eb9 the code.
binaryplease1 has joined #ruby
cdg has quit [Remote host closed the connection]
<atmosx> reisei: what? /\t/ <-- tab
<reisei> atmosx: yes, i found that, but it didn't work.
haraigo has joined #ruby
<atmosx> reisei: do you have a sample text upon which the tab regex didn't work?
* atmosx can fry eggs on his MBA right now.
Pumukel has joined #ruby
binaryplease has quit [Ping timeout: 250 seconds]
<jgnagy> not the prettiest way to go
Immune has quit [Ping timeout: 244 seconds]
<jgnagy> but it gets the job done
<reisei> atmosx: it's just a word with the tab in the beginning.
<reisei> jgnagy: thanks!
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
iamdevnul has quit [Ping timeout: 250 seconds]
vuoto has quit [Read error: Connection reset by peer]
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aazsdk has quit [Ping timeout: 240 seconds]
haraigoshi has joined #ruby
iamdevnul has joined #ruby
loechel has joined #ruby
aazsdk has joined #ruby
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
polysics has joined #ruby
<jgnagy> updated the gist with some comments to explain what it does
Es0teric has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
jhack has left #ruby [#ruby]
jhack has joined #ruby
<reisei> thank you very much
haraigo has quit [Ping timeout: 260 seconds]
<jgnagy> tab_count will contain the number of tabs added together, which is probably not what you want, but should give you a starting point
binaryplease1 is now known as binaryplease
braincrash has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
<jgnagy> atmosx: you're looking for a better way to get a value based on its sequence index in the fibonacci sequence?
aryaching_ has quit []
<atmosx> Not exactly. I'm looking for a more efficient way to get the sum of all the even numbers that appear in a 4 million fibonacci sequence
aryaching has joined #ruby
<jgnagy> ah, I see
<jgnagy> doing the fibonacci sequence purely recursively is not going to do it for you
jhack has quit [Quit: jhack]
<atmosx> My first approach was keeping an index, it was kind of easier (more natural) for me to keep an index and current + fibonacci_array[-2], but that almost crashed my macbook air heh. I was actually keeping two indices, and I'm guessing they quickly started eating RAM.
jhack has joined #ruby
KCmetro has joined #ruby
<jgnagy> I've tried a cached approach before, but that breaks after a while too
<atmosx> Yes, I know that too. I'll write a C implementation of this too, just to benchmark the diff.
<atmosx> how would a cached approach work?
<matthewd> atmosx: You might want to re-read the question
<jgnagy> memoization
<atmosx> matthewd: > By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. ... what I'm not getting?
<matthewd> atmosx: Now in your own words, describe your loop / stop condition
futilegames has joined #ruby
arashb has joined #ruby
davedev24 has joined #ruby
SteenJobs has joined #ruby
<matthewd> atmosx: Well actually, you already did: > I'm looking for a more efficient way to get the sum of all the even numbers that appear in a 4 million fibonacci sequence
ramfjord has joined #ruby
<matthewd> atmosx: One of these things is not like the other
RegulationD has joined #ruby
dsf has joined #ruby
pulgolino has joined #ruby
braincrash has joined #ruby
<atmosx> matthewd: I'm not following, do I have a semantic error in the code snippet?
<matthewd> atmosx: I think you have a semantic error in your understanding of the search space (which is then also present in your code)
<matthewd> atmosx: The problem says "the terms in the Fibonacci sequence whose values do not exceed four million"; you are searching "a 4 million fibonacci sequence"
coolboy has quit [Ping timeout: 244 seconds]
<atmosx> aaah
<atmosx> omg
<matthewd> atmosx: Given there are 34 terms in the Fibonacci sequence with a value less than 4 million, this is a.. substantial difference in problem magnitude ;)
claudiuinberlin has quit [Remote host closed the connection]
coolboy has joined #ruby
<atmosx> okay, I knew that something was wrong hehe. Thanks matthewd
claudiuinberlin has joined #ruby
ta__ has joined #ruby
beilabs_ has quit [Remote host closed the connection]
beilabs has joined #ruby
<jgnagy> very true
<jgnagy> I think the fastest way is to use arithmetic rather than any kind of recursion too
chee is now known as snes
<jgnagy> >> def fib(n); ((((1+Math.sqrt(5))/2)**n)/Math.sqrt(5)+0.5).floor; end
dsf has quit [Ping timeout: 265 seconds]
JeanCarl1Machado has quit [Ping timeout: 276 seconds]
JeanCarl1Machado has joined #ruby
ta__ has quit [Ping timeout: 258 seconds]
snes is now known as chee
beilabs has quit [Ping timeout: 264 seconds]
MrBusiness2 has joined #ruby
craigp has joined #ruby
moneylotion has joined #ruby
weckl has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Limix has quit [Quit: Limix]
<havenwood> jgnagy: require 'matrix'; def fib n; matrix = Matrix[[0, 1], [1, 1]] ** n.pred; matrix[1, 1].to_i end
xxninjabunnyxx has quit [Quit: Leaving]
Limix has joined #ruby
elifoster has quit [Quit: caffeine]
vulc4n has joined #ruby
braincrash has quit [Ping timeout: 264 seconds]
ta_ has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 244 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
Limix has quit [Client Quit]
<vulc4n> afternoon guys -- I'm currently using the workflow gem (https://github.com/geekq/workflow), but I'm not sure how to require that any transitions occur via an event.
<vulc4n> In other words, I want to protect the workflow_state property in my AR model so that ti can't be changed without calling a transition event from Workflow.
d5sx43 has joined #ruby
mwlang has joined #ruby
<TheFarmingBunny> This is probably a stupid question but how do I install my gems executables with bundle
moneylotion has quit [Quit: ZNC 1.6.3 - http://znc.in]
<jgnagy> vulc4n: not familiar with that gem but it looks interesting
whathappens has quit [Remote host closed the connection]
futilegames has quit [Ping timeout: 244 seconds]
<jgnagy> TheFarmingBunny: I'm not sure what you mean... when you install a gem that has executables, they should be placed in your PATH if your gems bin/ is in your PATH
whathappens has joined #ruby
moneylotion has joined #ruby
<jgnagy> shouldn't matter if you install a gem via bundler or not
futilegames has joined #ruby
whathappens has quit [Remote host closed the connection]
the_rhizo3 has quit [Ping timeout: 240 seconds]
braincrash has joined #ruby
<TheFarmingBunny> I'm making a gem using bundle to install it during development and when i try to install its giving me this message:
whathappens has joined #ruby
<TheFarmingBunny> Using accolades 0.0.2 (was 0.0.1) from source at `.`
tyang has joined #ruby
TheFarmingBunny has left #ruby ["Leaving"]
TheFarmingBunny has joined #ruby
TheFarmingBunny has left #ruby ["Leaving"]
zenguy_pc has quit [Ping timeout: 276 seconds]
zenguy_pc has joined #ruby
whathappens has quit [Ping timeout: 240 seconds]
d5sx43 has quit [Quit: Leaving...]
beilabs has joined #ruby
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackjackdripper has joined #ruby
sp__ has joined #ruby
Limix has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
capitainIsh has joined #ruby
sp__ has quit [Client Quit]
s2013 has joined #ruby
beilabs has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
futilegames has left #ruby [#ruby]
karmatr0_ has quit [Ping timeout: 276 seconds]
capitainIsh has quit [Max SendQ exceeded]
galeido has quit [Quit: leaving]
qba73 has joined #ruby
fierycatnet has joined #ruby
vulc4n has quit [Ping timeout: 264 seconds]
zacts has quit [Ping timeout: 250 seconds]
Haui has joined #ruby
claudiuinberlin has quit [Ping timeout: 265 seconds]
elastix has joined #ruby
LoneHermit has joined #ruby
TheWhip has quit [Remote host closed the connection]
hutch34 has joined #ruby
<elastix> hi guys how can I write a small Ruby based script/app that will get HTTP response times over 5 minutes from your location to mysite.com?
blackmes1 has joined #ruby
GinoManWorks has joined #ruby
TheWhip has joined #ruby
karmatr0n has joined #ruby
russt has quit [Quit: That's all, folks!]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
Lucky_ABA has joined #ruby
CSWookie has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
jgt3 has joined #ruby
<CSWookie> Hey folks, is there a library that rubistae use to parse command-line arguments? In Python, I use argparse, but I'm not familiar with the Ruby standard libraries.
LoneHermit has quit [Ping timeout: 250 seconds]
<elastix> what is the ruby interactive shell in linux?
<havenwood> CSWookie: There are a couple option parsing options in the Ruby stdlib. OptionParser is the most popular: http://docs.ruby-lang.org/en/2.3.0/OptionParser.html
<bougyman> irb or pry
<bougyman> irb officially, pry if you don't want it to suck.
<havenwood> elastix: irb ships with Ruby
<havenwood> ?pry
<ruby[bot]> Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
<elastix> thanks
<havenwood> elastix: and yes, you can!
TheWhip has quit [Ping timeout: 258 seconds]
<elastix> I can what?
<havenwood> elastix: write a small Ruby-based thing to compare response times
blackwind_123 has joined #ruby
<havenwood> CSWookie: There are also gems like Slop that have a bit nicer interface.
Baffoon has joined #ruby
Baffoon has quit [Excess Flood]
<xpt> havenwood: there was *how* before "can I write"
fierycatnet has quit [Read error: Connection reset by peer]
<havenwood> xpt: aha!
zacts has joined #ruby
Baffoon has joined #ruby
Macaveli has joined #ruby
d5sx43 has joined #ruby
Baffoon has quit [Client Quit]
<elastix> I'm very newbie :) what does it mean : that will get HTTP response times over 5 minutes?
the_rhizo3 has joined #ruby
<CSWookie> This says it's a shell. I'm not sure that's what I'm wanting. I'm just wanting to be able to say "myprog --somearg=foo --otherarg=bar" and have the library spit my out a hash like {"somearg": "foo", "otherarg": "bar}
<elastix> the script has to give as output the response time?
<CSWookie> It -> pry
Madplatypus has joined #ruby
<havenwood> CSWookie: Pry was a response to elastix
aryaching has quit [Remote host closed the connection]
<CSWookie> havenwood: Ah! that explains why the answer was confusing me :)
<elastix> someone can explain me what is required in that? please
joelwallis has joined #ruby
claudiuinberlin has joined #ruby
connor_goodwolf has quit [Remote host closed the connection]
russt has joined #ruby
karmatr0n has quit [Ping timeout: 264 seconds]
connor_goodwolf has joined #ruby
<elastix> it has to give me the output only when the response time is more than 5 mins?
harfangk_ has quit [Quit: Textual IRC Client: www.textualapp.com]
JeanCarl1Machado has quit [Ping timeout: 250 seconds]
JeanCarloMachado has quit [Ping timeout: 244 seconds]
d5sx43 has quit [Quit: Leaving...]
karmatr0n has joined #ruby
<arthurl> hi guys- i'm trying to launch into a console (1.8.7 legacy ruby app)- seeing a strange load_missing_constant error- not sure how to go about debugging- https://gist.github.com/alyssenko/40de96447ae8faeecac25b2d3c09c26f
<arthurl> and we definitely have an application_controller.rb w/ an ApplicationController class defined in Sip/app/controllers/
PalaHO has joined #ruby
<arthurl> i guess it's also important to note that i had to install 1.8.7 on this centos 6.7 box via RUBY_CONFIGURE_OPTS="--without-openssl" rbenv install 1.8.7-p374 (would error out without the RUBY_CONFIGURE_OPTS bit)
Es0teric has quit [Quit: Computer has gone to sleep.]
elifoster has joined #ruby
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<marahin> Has anyone had a problem where gem install works fine, but then in IRB or PRY loading it causes an loaderror (not found)? I built a hello-world gem (just fine), installed it just fine, but when I try to require it - it fails.
<marahin> I'm using rbenv, but rbenv-doctor says everything is fine.
<marahin> Is this possibly a common issue?
reisei has quit [Quit: leaving]
<havenwood> arthurl: With such an old Ruby you might want to use CentOS 5 and just live in the past package-wise.
<havenwood> marahin: Have you tried the rbenv stuff like rehashing the shims?: rbenv rehash
<havenwood> ?rbenv
<ruby[bot]> Missing command under rbenv? Did you try `rbenv rehash`?
<havenwood> marahin: Or switch to chruby if it starts to bother you. :-)
mrgrieve1 has quit [Ping timeout: 244 seconds]
<marahin> havenwood, honestly I used rvmio for a year, lately I switched to rbenv and it works marvelously
<marahin> it's first time I'm trying to create my own gem
jaruga___ has quit [Quit: jaruga___]
<marahin> rehashing brings no help; however lurking through stack overflow, I stepped upon an answer that suggests checking gem environment and looking for installation directory
<marahin> there, I found:
<marahin> - INSTALLATION DIRECTORY: /home/marahin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0
<marahin> - USER INSTALLATION DIRECTORY: /home/marahin/.gem/ruby/2.3.0
<marahin> i believe USER INSTALLATION DIRECTORY should aswell point to the one above, shouldnt it?
<havenwood> marahin: Create a gist with your gemspec file and the commands you're running to build and require the gem?
<marahin> (however, I actually can't find .gem/ruby/2.3.0 directory there; .gem/ruby/ is empty)
<marahin> havenwood, sure, I'll create a repo for the actual gem
<marahin> give me couple of mnutes
Rodya_ has quit [Remote host closed the connection]
peteykun has joined #ruby
Derperperd has quit [Quit: Derperperd]
karim_ has joined #ruby
<karim_> hey ! i'm a begginer learning ruby
<marahin> havenwood, https://git.3lab.re/marahin/wowapi - keep in mind that's just hello world that shouldn't see daylight :)
Vingador has quit [Ping timeout: 244 seconds]
<marahin> havenwood, oops, some untested changes broke, one moment again.
Fernando-Basso has quit [Quit: Leaving]
galeido has joined #ruby
hahuang65 has joined #ruby
blackgoat has joined #ruby
KCmetro has quit [Remote host closed the connection]
<arthurl> havenwood thanks- i'm starting to think that's really my only option...
jenrzzz has quit [Ping timeout: 264 seconds]
KCmetro has joined #ruby
KCmetro has quit [Client Quit]
KCmetro has joined #ruby
<marahin> havenwood, haha. You're magical! Somehow it works now. I believe that something was wrong with the path; in the meantime I restarted the PC, so that could have been it.
<marahin> havenwood, sorry for bothering you for nothing! And thank you for your time and advices.
<havenwood> marahin: you're welcome, happy coding!
<Bish> matthewd, people who followed my threading problem: i have a "better" distribution now
<Bish> performance is better, but not by much
<Bish> guess the server is pretty slow after all
workmad3 has joined #ruby
<karim_> can anyone tell me which of both "print" and "puts" is cleaner ?
Coldblackice has quit []
<Bish> none, they do the same except for new line at the end
<matthewd> karim_: In general, use puts, because it avoids needing an explicit newline
elementaru has quit [Remote host closed the connection]
atmosx has quit [Quit: Textual IRC Client: www.textualapp.com]
Coldblackice has joined #ruby
conta has quit [Ping timeout: 252 seconds]
bluOxigen has quit [Ping timeout: 250 seconds]
ziyadb has quit [Quit: Connection closed for inactivity]
the_rhizo3 has quit [Ping timeout: 244 seconds]
futilegames has joined #ruby
wrkrcoop has joined #ruby
futilegames has quit [Client Quit]
the_rhizo3 has joined #ruby
arashb has quit [Ping timeout: 250 seconds]
<wrkrcoop> Im trying to hit this endpoint, and they expect my post request to have a field called inputJson … and its value is a string which is actually a hash …
<wrkrcoop> they expect the value to use double quotes and all the internal keys to use double quotes, but when i call .to_json on the data it adds many lines …
coolboy has quit [Ping timeout: 250 seconds]
doublemalt_ has joined #ruby
the_rhizo3 has quit [Ping timeout: 240 seconds]
<wrkrcoop> is there a way to get the hash to be a json string without having extra backslashes
<Bish> the backslashes appear while printing
<Bish> they're not really there.
<wrkrcoop> oh
<Bish> >> "\""
<ruby[bot]> Bish: # => "\"" (https://eval.in/627184)
qba73 has quit [Remote host closed the connection]
<Bish> >> "\""[0]
<ruby[bot]> Bish: # => "\"" (https://eval.in/627185)
moneylotion has quit [Quit: ZNC 1.6.3 - http://znc.in]
<Bish> grml, how do i show this
<Bish> >> "" << '"'
<ruby[bot]> Bish: # => "\"" (https://eval.in/627186)
<Bish> TADAAA
<Bish> >> '"'
DoubleMalt has quit [Ping timeout: 250 seconds]
hutch34 has quit [Quit: WeeChat 1.5]
<Bish> wrkrcoop: ruby does that, so you can put the string into "" again, if you leave it without \, ruby doesn't know where your string ends
<wrkrcoop> Bish: so all these slashes wont’ be there when i send it over? https://gist.github.com/ellismarte/16d487a1988bce0dc1c199e2f6acc557#file-tojson-json-L1
<Bish> yes.
JeanCarloMachado has joined #ruby
pwnd_nsfw has joined #ruby
<wrkrcoop> ok
<havenwood> >> "\"".bytes
<ruby[bot]> havenwood: # => [34] (https://eval.in/627187)
moneylotion has joined #ruby
<havenwood> >> 34.chr # wrkrcoop
<ruby[bot]> havenwood: # => "\"" (https://eval.in/627188)
<wrkrcoop> havenwood: i dont get what you just did
<peteykun> lol
<Bish> >> require 'json'; x = {"x":"x"}; [x.to_json,x.to_json.length]
<ruby[bot]> Bish: # => ["{\"x\":\"x\"}", 9] (https://eval.in/627189)
Vingador has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
tvw has joined #ruby
j416 has joined #ruby
<Bish> there are 13 chars, but length of the string is 9
<wrkrcoop> oh i see
Vingador has quit [Remote host closed the connection]
<Bish> because the backslashes are only there, to show that " does not mean end of the string
Torrieri has joined #ruby
Torrieri has quit [Changing host]
Torrieri has joined #ruby
<Bish> that's called escaping
<Bish> so ruby knows "this sentences does not end here\" but here"
blackgoat has quit [Ping timeout: 244 seconds]
<peteykun> Do a puts instead of an inspect and the backslashes will be gone
tyang has quit [Ping timeout: 258 seconds]
<Bish> (with inspect peteykun means p)
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
stamina has joined #ruby
joelwallis has quit [Quit: Leaving]
stien has joined #ruby
pwnd_nsfw` has joined #ruby
JeanCarl1Machado has joined #ruby
<wrkrcoop> hm ok thanks
ramortegui has joined #ruby
qba73 has joined #ruby
ramortegui has quit [Client Quit]
<wrkrcoop> when i puts it i still see the backslash
pwnd_nsfw has quit [Ping timeout: 250 seconds]
<Bish> are you talking irb?
<wrkrcoop> yes
<Bish> >> puts {'x'=>'x'}.to_json
<ruby[bot]> Bish: # => /tmp/execpad-28a8988324ab/source-28a8988324ab:2: syntax error, unexpected =>, expecting '}' ...check link for more (https://eval.in/627190)
<Bish> >> puts {"x"=>"x"}.to_json
<ruby[bot]> Bish: # => /tmp/execpad-6328c7e3178d/source-6328c7e3178d:2: syntax error, unexpected =>, expecting '}' ...check link for more (https://eval.in/627191)
<Bish> eh.
<matthewd> >> puts({"x"=>"x"}.to_json)
<ruby[bot]> matthewd: # => undefined method `to_json' for {"x"=>"x"}:Hash ...check link for more (https://eval.in/627192)
<Bish> puts {x:'x'}.to_json
<Bish> >> puts {x:'x'}.to_json
<ruby[bot]> Bish: # => ...check link for more (https://eval.in/627193)
Zelest has left #ruby [#ruby]
<Bish> hyuk hyuk
<Bish> >> require 'json';puts {x:'x'}.to_json
* Bish tries jruby & is scared of java
stamina has quit [Quit: WeeChat 1.5]
whathappens has joined #ruby
<matthewd> wrkrcoop: Those were in your original value on line 1
<wrkrcoop> matthewd: ah thats right …
blackgoat has joined #ruby
<wrkrcoop> matthewd: well because i needed to escape the double quotes
d0nn1e has quit [Ping timeout: 258 seconds]
skweek has joined #ruby
<Bish> ah lol, you yourself added the quites
<Bish> whats habbeding!
allcentury has joined #ruby
<matthewd> wrkrcoop: You have a hash that contains a JSON string, and then you're JSON-encoding that result
<matthewd> wrkrcoop: Is that really what you want/need to do?
d0nn1e has joined #ruby
Limix has quit [Quit: Limix]
<wrkrcoop> matthewd: yeah this endpoint is so stupid
JeanCarloMachado has quit [Ping timeout: 252 seconds]
<matthewd> If that's really what it wants, then it seems you would be giving it the right thing. Backslashes and all.
zacts has quit [Ping timeout: 252 seconds]
JeanCarl1Machado has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby
JeanCarloMachado has joined #ruby
<Bish> god i hate java, why does jruby have to be so fast :/
JeanCarl1Machado has joined #ruby
blackmes1 has quit [Ping timeout: 265 seconds]
stien has quit [Quit: Textual IRC Client: www.textualapp.com]
ta__ has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
testo has joined #ruby
kent\n has quit [Quit: No Ping reply in 180 seconds.]
<xpt> Bish: it's not java
<xpt> it's jvm
kent\n has joined #ruby
kent\n has quit [Changing host]
kent\n has joined #ruby
<xpt> (if you think this way it helps)
<Bish> well, what i meant was, everything connected to java
hahuang61 has joined #ruby
karmatr0n has quit [Ping timeout: 276 seconds]
workmad3 has joined #ruby
ta__ has quit [Ping timeout: 265 seconds]
<jgnagy> jruby is great, especially if you are careful and have a good use case for concurrency
<jgnagy> and jruby *can* be Java if you want, since you can use Java classes
PalaHO has quit [Ping timeout: 250 seconds]
<jgnagy> I've written many a wrapper around nasty Java classes in jruby, so using them feels more ruby-like / makes my eyes bleed less
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dreamyspell has quit [Quit: Leaving]
last_staff has quit [Quit: ZZZzzzz]
Macaveli has joined #ruby
<Bish> how do i use sequel with mysql with jruby?
hahuang61 has quit [Ping timeout: 250 seconds]
synthroid has quit []
peteykun has quit [Quit: Leaving]
johnmilton has quit [Remote host closed the connection]
gbailey has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<Bish> mail gem doesn't work with jruby either , duh
Macaveli has quit [Ping timeout: 265 seconds]
Es0teric has joined #ruby
Rodya_ has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
SteenJobs has quit [Quit: SteenJobs]
sdothum has joined #ruby
claudiuinberlin has quit []
<karim_> lel
<karim_> Life's too hard for me
<karim_> going to kill myself
<karim_> goodbye all
KCmetro has quit [Quit: Leaving...]
<karim_> see ya in a next life
neanderslob has joined #ruby
<karim_> :'-(
karim_ has quit [Quit: Lost terminal]
futilegames has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karmatr0n has joined #ruby
GinoManWorks has quit [Quit: Leaving]
<headius> Bish: id doesn't?
<Bish> well atleast not as simple as gem install for me
<headius> Bish: sequel should work fine on JRuby with the JDBC driver
<Bish> mime-types-data requires Ruby version >= 2.0.
<headius> JRuby supports Ruby 2.3
<headius> you must be on an old version
<Bish> ;; geez
Rodya_ has quit [Ping timeout: 250 seconds]
anisha has joined #ruby
futilegames has quit [Client Quit]
blackmes1 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
qba73 has quit []
nhhc has quit [Quit: Leaving]
brendan- has joined #ruby
Azure has joined #ruby
gnufied has quit [Read error: Connection reset by peer]
brack9 has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
pawnbox has joined #ruby
flashpoint9 has joined #ruby
PaulCapestany has quit [Read error: Connection reset by peer]
mordocai has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
workmad3 has quit [Ping timeout: 250 seconds]
PaulCapestany has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
flashpoint9 has quit [Ping timeout: 265 seconds]
cdg has joined #ruby
trinaldi has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
ElFerna has joined #ruby
sharkman has quit [Ping timeout: 240 seconds]
Immune has joined #ruby
ldnunes has quit [Quit: Leaving]
Robtop__ has joined #ruby
blackmesa has joined #ruby
async_prince has joined #ruby
johnmilton has joined #ruby
johnmilton has quit [Read error: Connection reset by peer]
johnmilton has joined #ruby
Rodya_ has joined #ruby
<wrkrcoop> When i try to parse this it says ‘unexpected token’
<wrkrcoop> "{\"inputJSON\": \"{\"followUpReq\":\"false\"}\"}"
<wrkrcoop> anyone see whats wrong with it?
blackmes1 has quit [Ping timeout: 250 seconds]
pwnd_nsfw` has quit [Ping timeout: 258 seconds]
flashpoint9 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
VladGh has quit [Remote host closed the connection]
<jgnagy> wrkrcoop: I think it has to do with your nesting "{"followUpReq":"false"}"
<jgnagy> you probably need to escape those double quotes
VladGh has joined #ruby
<jgnagy> or, if it is meant to be a hash, remove the outer quotes
anisha has quit [Quit: This computer has gone to sleep]
<jgnagy> >> JSON.parse("{\"inputJSON\": \"{\"followUpReq\":\"false\"}\"}")
<jgnagy> won't work
<jgnagy> but
<jgnagy> >> JSON.parse("{\"inputJSON\": {\"followUpReq\":\"false\"}}")
<jgnagy> does
<wrkrcoop> jgnagy: they have to be double quotes
GodFather has joined #ruby
<jgnagy> >> JSON.parse("{\"inputJSON\": \"{\\\"followUpReq\\\":\\\"false\\\"}\"}")
<wrkrcoop> hmm ok ill try that
CuriousMind has joined #ruby
artung has joined #ruby
moonythedwarf_ has joined #ruby
<artung> hi bitches
<artung> go all fuck yourself
<apeiros> !rude artung
artung has left #ruby [#ruby]
artung has joined #ruby
griffindy has joined #ruby
KaliLinuxGR has quit [Ping timeout: 276 seconds]
<apeiros> !troll artung
artung was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
<apeiros> !unmute artung
FernandoBasso has joined #ruby
<jgnagy> well that was pleasant
moonythedwarf_ has quit [Ping timeout: 258 seconds]
<apeiros> yeah, sometimes I wonder what's wrong with such people.
<CuriousMind> When importing classes in ruby using `require <filename>`, How do I import the instances of that class?
pawnbox has quit [Read error: Connection reset by peer]
<jgnagy> CuriousMind: what do you mean by "the instances of that class"?
moonythedwarf_ has joined #ruby
<CuriousMind> I made objects from the class in the file I want to `require` jgnagy
<jgnagy> any classes defined in that file (or anything it includes) will be available to you
<apeiros> CuriousMind: you don't really import classes with require
<apeiros> all require does is execute a piece of code in a file identified by require
<CuriousMind> Ohhh ok apeiros
<apeiros> and you can do the same things you can do in the file where you require
<apeiros> but what you probably stumble over is that local variables are, well, *local* :)
aazsdk has quit [Ping timeout: 250 seconds]
<CuriousMind> I want like the instance objects created from the class to be available in the file I am trying to import it to apeiros
<apeiros> i.e. a local variable from toplevel of b.rb will not appear in a.rb when you require it
arashb has joined #ruby
<apeiros> so all you have to do is: assign those instances to a variable which is visible in the requiring file. e.g. a constant.
<CuriousMind> apeiros: Trying to understand this
<SeepingN> $global = "value"
* apeiros hits SeepingN with a broomstick for mentioning globals :-p
<apeiros> srsly
<jgnagy> don't use globals
wrkrcoop has quit [Quit: wrkrcoop]
<havenwood> don't set globals
<CuriousMind> Ok so make the objects variable names to CONSTANT in the file I want to import? apeiros
<jgnagy> if you need something to truly be global, use a constant
<CuriousMind> I am confused, continue please
<apeiros> CuriousMind: yes. try it.
<jgnagy> if you need to modify a constant, use a singleton instead
<apeiros> e.g. in foo.rb: `class Foo; …definitions…; InstanceA = new(…); end`, and then in app.rb: `require 'foo'; Foo::InstanceA`
<jgnagy> those are for SeepingN, btw
<CuriousMind> apeiros: So there's no way to import instances of a class to my file UNLESS setting those object variable names to global variables? apeiros jgnagy
<CuriousMind> I don't know all this singleton is, please explain jgnagy
<apeiros> CuriousMind: not just globals. any visible variable.
<jgnagy> those weren't for you, CuriousMind, don't worry
<apeiros> CuriousMind: and the preferred places are either constants or a constant with accessors.
<apeiros> CuriousMind: see above example.
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jgnagy> CuriousMind: what you're trying to do sounds unusual, can you give us your use case / why you're doing this? that might help us help you
<apeiros> IMO not that unusual
<CuriousMind> Trying to comprehend all this, give me a minute please
<apeiros> though most often it's something which is clearly associated so storing it in the class itself is often self-evident.
<jgnagy> well, you might be right apeiros, but I can't say until I know what CuriousMind is trying to accomplish
<apeiros> e.g. things like MimeType.all_types # => [#<MimeType>, …]
elastix has quit [Quit: elastix]
<CuriousMind> I want to import objects from my other file to the current file im working with
<CuriousMind> afk 5 m one sec
<jgnagy> to clarify, for someone struggling to understand how requiring files works, it is probably unusual
<apeiros> true
<jgnagy> but that's ok, we'll get them sorted out
<SeepingN> 5 min, 1 sec
denny has quit [Quit: So long, and thanks for all the trout.]
<SeepingN> this is how poorly we humans understand time
<apeiros> CuriousMind: when you're back, I suggest you put your current code on gist.github.com
OTORelic3 has quit [Ping timeout: 260 seconds]
<jgnagy> yes, that ^
ta_ has quit [Ping timeout: 250 seconds]
madgen has joined #ruby
KaliLinuxGR has joined #ruby
<jgnagy> SeepingN: maybe there was need for the precision of 5 minutes and 1 sec
KaliLinuxGR has quit [Read error: Connection reset by peer]
KaliLinuxGR has joined #ruby
<madgen> Heyya, I created a Tempfile and am trying to pass its path as an argument to an external program to read/write but the outside program complains that it doesn't exist. Can anyone think of why?
<SeepingN> heh
<SeepingN> madgen: is there a space anywhere in the path?
<jgnagy> madgen: did you create the Tempfile and use a block with it?
<apeiros> madgen: tempfiles are deleted immediately
<SeepingN> or a missing / at the beginning or end
<jgnagy> tempfiles are, well... temporary after all
<apeiros> at least that's how they usually are implemented on *nix systems
<madgen> I am within the block as a blocking call is made to outside so the file should not be deleted at that point
<apeiros> and your app can still read/write because it maintains a hardlink
<SeepingN> what is the call to the 3rd party app?
ixti has joined #ruby
<madgen> SeepingN: no there is no space I retrieve it by the block file object's path method
<CuriousMind> apeiros: Will do will do
<SeepingN> remember that exac kills your script
lxsameer has quit [Quit: Leaving]
* apeiros shrugs
christinaent has joined #ruby
christinaent has quit [Client Quit]
<madgen> SeepingN: I first write some C source I generate to it and then pass it to CLANG as an argument but that is not the problem because even if I call UNIX file command on it (while still in the block) it complains
christinaent has joined #ruby
<SeepingN> right. are you using exec?
<madgen> backtick backtick
<SeepingN> or system, or `backticks`
<SeepingN> hmm
<apeiros> madgen: you got an explanation. but hey, you don't have to believe me.
<jgnagy> are you using Tempfile.open ?
<SeepingN> so much for that then.
<jgnagy> how are you creating the tempfile?
<CuriousMind> There you go, the question is in the gist description
<madgen> apeiros: sorry, maybe I missed it but how can tempfiles be deleted immediately as I am in a Tempfile.open block?
moeabdol1 has quit [Ping timeout: 258 seconds]
Immune has quit [Ping timeout: 244 seconds]
<apeiros> hm, though, it seems Tempfile actually doesn't do that by itself. it only ensures that the file is deleted, but they recommend you do it immediately.
<madgen> I am using Tempfile.open
aazsdk has joined #ruby
<apeiros> madgen: see http://ruby-doc.org/stdlib-2.3.1/libdoc/tempfile/rdoc/Tempfile.html - "Unlink after creation"
KnownSyntax has quit [Quit: No Ping reply in 180 seconds.]
ElFerna has joined #ruby
<madgen> AHA
<jgnagy> CuriousMind: try moving the tenant declarations to a third file that starts with `require_relative 'apartment'; require_relative 'tenant'`
<madgen> thanks a lot
rodfersou has quit [Quit: leaving]
<CuriousMind> A third file? jgnagy ay ya ya
<madgen> thank you all!
<apeiros> CuriousMind: IMO the Tenant creations do not belong into that file, but just for educational purposes:
sylario has quit [Quit: Connection closed for inactivity]
<apeiros> Tenants = []; Tenants << Tenant.new "Eric", "Rowing", "April 21st, 1972", "male"
<apeiros> and then in your other file: Tenants[0]
<apeiros> and: use arrays instead of variables with numbers at the end.
<jgnagy> that's what I'm getting at, so yes, that would work
<SeepingN> wait how does that help madgen if they are NOT already calling file.unlink?
<jgnagy> but more idiomatic ruby / OOP would be to define your classes, then use them, rather than both at the same time, at least for this purpose
KnownSyntax has joined #ruby
<CuriousMind> jgnagy: class in one file, class in another file, third file is uhh requiring data from both?
<apeiros> SeepingN: it was the explanation to "how can it work when you delete". if they don't actually do that, this isn't the explanation for the behavior they see.
<CuriousMind> apeiros: I'm reading your input
* apeiros thinks jgnagy got this @ CuriousMind, I'm off :) have fun
<SeepingN> ohh ok gotcha now
<CuriousMind> Wait apeiros
<jgnagy> CuriousMind: third is creating instances of the classes defined in the first two
<CuriousMind> No please I want your advice as well I'm looking at all angles please apeiros
<apeiros> CuriousMind: don't worry, jgnagy is fully capable of giving you the advice you need ;-)
<jgnagy> thank you for the vote of confidence there :)
<CuriousMind> apeiros: aw ok thank you
<jgnagy> CuriousMind: let me throw together a gist for you
<CuriousMind> someone had did Foo:Apartment idk, ok sure jgnagy
<CuriousMind> Thank you
neanderslob has quit [Ping timeout: 244 seconds]
splargle has joined #ruby
splargle has quit [Read error: Connection reset by peer]
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<madgen> apeiros: yeap and I am back. Tempfile.open does not unlink the file immediately, sooooo the behaviour is still weird
<madgen> anyone has a guess?
ddffg has quit [Quit: Leaving]
<SeepingN> paste the line of code that attempts to open that file in the other program
<madgen> `#{ENV['CC']} #{tmp.path} -o #{executable.path}`
jenrzzz_ has joined #ruby
<jgnagy> that is for CuriousMind ^
<madgen> where both tmp and executable are Tempfile instances
ElFerna has joined #ruby
<CuriousMind> jgnagy: Thank you!!!
<madgen> (in a nested block)
<CuriousMind> jgnagy: LOL OK so I cannot import objects
<CuriousMind> which I create from other files
<CuriousMind> Great, I have to make them again using the class I import
<SeepingN> debugging 101: change that to: puts "#{ENV['CC']} #{tmp.path} -o #{executable.path}"
<CuriousMind> Fair enough fair enough
<jgnagy> d'oh forget the require lines
<CuriousMind> jgnagy: Didn't notice, but I'll check this one out. Thank you so much
<jgnagy> no problem
<jgnagy> CuriousMind: now, like apeiros was saying, there are ways to do what you were asking, but it will lead the next person to read your code to wonder where those Tenants are defined
blackwind_123 has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
blackwind_123 has joined #ruby
<jgnagy> madgen: what OS are you running and what version of ruby?
<CuriousMind> jgnagy: the tenants objects are defined after I write the class s
<madgen> SeepingN: no need for condescension, of course I have done that and as I said I tried a single Tempfile with read utility which states the path is empty
<madgen> jgnagy: OS X 10.11.6/ ruby 2.3.1p112
<Eiam> Whats the >> bot based on?
<Eiam> ruby[bot]: who is your master
<Eiam> =(
neanderslob has joined #ruby
<CuriousMind> ruby[bot]: do you love me
<jgnagy> that is unusual, madgen
<CuriousMind> >> 1 + 1
<ruby[bot]> CuriousMind: # => 2 (https://eval.in/627210)
christinaent has quit [Quit: christinaent]
<CuriousMind> >> Do you love me
<ruby[bot]> CuriousMind: # => undefined local variable or method `me' for main:Object (NameError) ...check link for more (https://eval.in/627211)
<CuriousMind> LOL
<jgnagy> I'm on the same thing... do you have a gist?
<jgnagy> I just tried a quick Tempfile.open in irb and was able to puts to the tempfile then read that output from another terminal window
<jgnagy> did you flush the file before handing off to the external process?
<SeepingN> ^ ahh good idea
youch has quit [Ping timeout: 250 seconds]
<madgen> Yes, I think it is flush
<madgen> I thought file creation would propagate regardless
<madgen> let me fiddle with it for a bit
<jgnagy> try `file.flush` before making your external call
spudowiar has joined #ruby
<jgnagy> and no, unless you set an IO object to sync or fsync, ruby will buffer before writing
<madgen> yup, that worked file exists and GCC sees it. Somehow it has a different compilation problem but that's fine. Thank you!
jobewan has joined #ruby
lightheaded has quit [Read error: Connection reset by peer]
<SeepingN> congrats
lightheaded has joined #ruby
<jgnagy> no problem
Torrieri has quit [Quit: Be back later ...]
allcentury has quit [Ping timeout: 250 seconds]
tomchapi_ has joined #ruby
lightheaded has quit [Read error: Connection reset by peer]
<CuriousMind> Bacj
<CuriousMind> Back*
neanderslob has quit [Ping timeout: 244 seconds]
<madgen> Thanks again SeepingN & jgnagy & apeiros: thanks to you now I have a Ruby script that generates a C program that outputs Haskell source code
lightheaded has joined #ruby
<CuriousMind> Dumb question but, when do I use `relative_require`, `require` and `load` to import shit
<jgnagy> holy languages, madgen
<jgnagy> CuriousMind: require_relative is to require files based on their path relative to the current file
<CuriousMind> Hmmmm jgnagy
<madgen> They make a great team <3
<jgnagy> require is what you'd typically want, especially when working with gems
<CuriousMind> What about file path for `require`? jgnagy
<jgnagy> require_relative is usually if your writing your own quick scripts all in a directory
<CuriousMind> Two files share the same folder, got it
<CuriousMind> Can you elaborate on `requie`? Still don't understand
<CuriousMind> A little bit, you mention gems
wrkrcoop has joined #ruby
<CuriousMind> require*
Axy has quit [Read error: Connection reset by peer]
polishdub has quit [Quit: Leaving]
hutch34 has joined #ruby
SteppenII has quit [Remote host closed the connection]
moonythedwarf_ has quit [Ping timeout: 244 seconds]
moonythedwarf_ has joined #ruby
ukk has joined #ruby
ukk has quit [Client Quit]
bayed has quit [Quit: Connection closed for inactivity]
erlend has quit [Ping timeout: 250 seconds]
ramblinpeck has joined #ruby
nankyokusei has joined #ruby
beilabs has joined #ruby
<jgnagy> brb
erlend has joined #ruby
tomchapi_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ta_ has joined #ruby
andrewvos has quit [Quit: WeeChat 0.4.2]
beilabs has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
coolboy has joined #ruby
arashb has quit [Ping timeout: 240 seconds]
davedev24 has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 265 seconds]
cibs has quit [Ping timeout: 240 seconds]
dandaman has joined #ruby
<dandaman> so are blocks essentially the equivalent of callback functions from javascript?
cdg has quit [Remote host closed the connection]
<chrisseaton> dandaman: Yes - but they close over self, which JavaScript callback functions don't
cibs has joined #ruby
karmatr0n has quit [Read error: Connection reset by peer]
<dandaman> chrisseaton: what do you mean they close over self?
bad_ip has quit [Ping timeout: 240 seconds]
<chrisseaton> dandaman: 'self' will be the same in the block as outside it, where in JavaScript 'this' will be different. We call this 'closing over' a variable.
<dandaman> ohh you mean the scope
<chrisseaton> Yeah
<dandaman> got it!
<dandaman> thanks
<dandaman> yay learning
unreal has quit [Read error: Connection reset by peer]
firstdayonthejob has quit [Ping timeout: 258 seconds]
colegatron has joined #ruby
unreal has joined #ruby
<CuriousMind> Going to d/c, thank you everyone for the help! I'll be on another time!!
<CuriousMind> apeiros: THANK YOU
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
<wrkrcoop> i need the value of inputJSON to be in a string … can someone help me put quotes around the value properly … i keep messing it up https://gist.github.com/ellismarte/f8e402298eab3983563ec5b5cdd616bf
tvon has joined #ruby
CuriousMind has quit [Ping timeout: 264 seconds]
arashb has joined #ruby
trinaldi has quit [Quit: WeeChat 1.6-dev]
minimalism has quit [Quit: minimalism]
whathappens has quit [Quit: Leaving...]
jenrzzz_ has quit [Ping timeout: 258 seconds]
hahuang61 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
polysics has quit [Remote host closed the connection]
dandaman has quit [Quit: Leaving.]
<SeepingN> built a hash and convert?
jgt3 has quit [Ping timeout: 258 seconds]
[Butch] has quit [Quit: I'm out . . .]
<wrkrcoop> SeepingN: no this is a special case
<wrkrcoop> where the value of inputJson has to be surrounded by double quotes and can’t ahve more than \ escape character
<wrkrcoop> they built a terrible endpoint and i have to kinda hack it
minimalism has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
craysiii has joined #ruby
brack9 has quit [Ping timeout: 264 seconds]
loechel has quit [Remote host closed the connection]
<baweaver> ...looks like normal JSON
bad_ip has joined #ruby
bad_ip has joined #ruby
bad_ip has quit [Changing host]
wrkrcoop_ has joined #ruby
wrkrcoop has quit [Ping timeout: 250 seconds]
wrkrcoop_ is now known as wrkrcoop
coolboy has quit [Ping timeout: 265 seconds]
Pumukel has joined #ruby
boadie has joined #ruby
boadie has quit [Remote host closed the connection]
<jgnagy> I see what wrkrcoop is asking from the previous comments
<jgnagy> in a double-quoted sting, you escape a double-quote with a backslash
gix has quit [Ping timeout: 258 seconds]
<jgnagy> "\"" is the same as '"'
<jgnagy> to escape the backslash, you use two most backslashes
<wrkrcoop> jgnagy: yeah so when i to_json it creats like 3 backslashes so when i parse it it becomes \ backslash and thats causing problems
ChiefAlexander has quit [Remote host closed the connection]
<havenwood> wrkrcoop: The value corresponding with that key is a Hash not a String. Do you know how to convert the Hash that's returned to the String you want? Why do you want a String? What are you using it for? What would the String look like?
<jgnagy> >> puts "\\\""
<wrkrcoop> havenwood: the stupid endpoint actually is expecting a string
<wrkrcoop> which is diriving me insane
<wrkrcoop> so im trying to just manually create the string … but i can’t parse this: "{\"inputJSON\": \"{\"followUpReq\":\"false\",\"fName\":\"Harry\",\"lName\":\"Potter\",\"systemName\":\"PREVIOUS_VERSIONS\",\"email\":\"harry.potter1@ssttest.net\",\"subscriptionNumber\":\"343-25578259\",\"productName\":\"Building Design Suite Premium\",\"serialNumber\":\"380-26229219\",\"release\":\"2014\",\"caseLanguage\":\"English\",\"subject\":\"Autodesk Home
<wrkrcoop> Use\",\"description\":\"Home Use Request\"}\"}"
<jgnagy> correct
<jgnagy> everywhere within the value of "inputJSON", you need to escape the escapes
<jgnagy> this "{\"inputJSON\": \"{\"followUpReq\"
<jgnagy> becomes "{\"inputJSON\": \"{\\\"followUpReq\\\"
Pumukel has quit [Ping timeout: 260 seconds]
<jgnagy> or if you're just manually creating the string, use single quotes for the outer string
<wrkrcoop> hmm ok
jobewan has quit [Ping timeout: 260 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<wrkrcoop> if i use single quotes inside do i not need to escape characters?
<havenwood> wrkrcoop: How might you convert the Hash that's returned to the String you want? What needs to happen to the Hash for it to become that String?
<jgnagy> '{"inputJSON": "{\"followUpReq\":' and so on
banisterfiend has joined #ruby
<wrkrcoop> ok ill try that
<jgnagy> well, you'll need to leave the escapes for things you want JSON to escape, not ruby
<jgnagy> or, construct the hash yourself
dandaman has joined #ruby
<jgnagy> data = { inputJSON: '{"followUpReq": "false"}' }
<jgnagy> data.to_json
<jgnagy> should give you the string you're looking for
wrkrcoop has quit [Quit: wrkrcoop]
tvw has quit [Ping timeout: 260 seconds]
madgen has quit [Quit: Lost terminal]
tvw has joined #ruby
karmatr0n has joined #ruby
<havenwood> JSON.parse(data).each_with_object({}) { |(k, v), h| h[k] = v.to_json }.to_json
wrkrcoop has joined #ruby
mlehrer has quit [Ping timeout: 244 seconds]
sleepee has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sharkman has joined #ruby
spudowiar has quit [Quit: Leaving.]
<wrkrcoop> jgnagy: thank you :}
arthurl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
shellie_ has joined #ruby
gix has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
arashb has quit [Ping timeout: 264 seconds]
beilabs has joined #ruby
mlehrer has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
moei has quit [Quit: Leaving...]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jhack has quit [Quit: jhack]
wrkrcoop has joined #ruby
jaequery has joined #ruby
dandaman has quit [Quit: Leaving.]
kab has joined #ruby
jaequery has quit [Client Quit]
LoneHerm_ has joined #ruby
nitric_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
beilabs has quit [Ping timeout: 276 seconds]
jaequery has joined #ruby
airdisa has quit []
Pumukel has joined #ruby
jaequery has quit [Client Quit]
Spami has joined #ruby
nitric has quit [Ping timeout: 265 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
moei has joined #ruby
Guest38_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Weavel has quit [Ping timeout: 250 seconds]
Spami has quit [Quit: This computer has gone to sleep]
blackmesa has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
craigp has quit [Ping timeout: 240 seconds]
async_prince has quit [Ping timeout: 264 seconds]
doublemalt_ has quit [Remote host closed the connection]
<ElderFain> If I think I found a bug in http://ruby-doc.org/stdlib-2.0.0/libdoc/csv/rdoc/CSV.html
<ElderFain> how would I go about.. fixing it?
saneax-_-|AFK is now known as saneax
<ElderFain> I guess fixing it in Ruby would mean fixing it in C huh?
async_prince has joined #ruby
<SeepingN> don't use ' if you need things to be evaluated. wrap with %q() type quotes
<Radar> ElderFain: First of all: what's the bug?
ta_ has joined #ruby
<Radar> ElderFain: Secondly, the CSV library is written in Ruby afaik so you
<Radar> you'd be fixing the bug in the Ruby code for that lib.
<ElderFain> Radar: when you you the header_converters => :symbols and one of you header symbols is "# Blah", it converts to :_Blah, but "# Blah".to_sym converts to :"# Blah"
Pumukel has quit [Ping timeout: 244 seconds]
<ElderFain> I would expect the # to be preserved
<ElderFain> wow I butchered that sentence. when you USE.. and one of YOUR ... sheesh.
solocshaw has joined #ruby
<SeepingN> I woudln't expect # to be valid or a desired character to use
<Radar> ElderFain: Here's the code for that: https://github.com/ruby/ruby/blob/trunk/lib/csv.rb#L1002-L1005
Pumukel has joined #ruby
<ElderFain> SeepingN: for CSV input? "# of days left" "# of units"
<ElderFain> seems like it would actually be really common
<SeepingN> hmm ok sure. but # does not sound like a valid way to start a symbol
<Radar> ElderFain: So it looks like the code is substituting spaces with underscores and removing all non-word-characters.
<Radar> >> "# number of units".to_sym
<ruby[bot]> Radar: # => :"# number of units" (https://eval.in/627216)
<Radar> sleepee: You were saying?
<Radar> Whoops, SeepingN ^
<ElderFain> Radar: I would expect non word characters would just force the symbol to be enclosed in ""
<SeepingN> that's a goddamn ridiculous thing to do
<Radar> ElderFain: Yes, I agree too.
ta_ has quit [Ping timeout: 260 seconds]
<SeepingN> :"my symbol" ?? do people really do that just to use spaces?
<ElderFain> meh. but then if you did that, you get :blah_blah for some input and :"blah # blah"
<Radar> SeepingN: Welcome to Ruby where the syntax is made up and the points don't matter.
<SeepingN> hehehe
<SeepingN> better than PHP
koooge has joined #ruby
<ElderFain> for other input. thats not great because sometimes your spaces are _ and sometimes they are actually spaces
<SeepingN> keep taht in mind
<ElderFain> SeepingN: I don't always control my inputs. I was just surprised in ruby when my inputs had information missing
<SeepingN> you'r elucky you have headers. my data usually doesn't..!
<ElderFain> Radar: thats a compatibility breaking change if its fixed
<Radar> ElderFain: yup, that's right.
<Radar> ElderFain: So alternatively, you can add your own converter.
hahuang61 has joined #ruby
<SeepingN> the question is, why it .to_sym not using the same code that 'header_converters => :symbols' is?
<ElderFain> SeepingN: thats easy, csv.rb is a stand alone implementation
<ElderFain> and .to_sym fails on some inputs
Pumukel has quit [Ping timeout: 264 seconds]
<ElderFain> sorry scratch that last one, I think
<ElderFain> SeepingN: I'd argue that header_converters SHOULD be just calling ".to_sym"
polysics has joined #ruby
<ElderFain> but I think h.encode might be doing some more work
<Radar> "Should" and how it was implemented 11 years ago are two different things
<SeepingN> right
<SeepingN> even if it's "broken" or "weird", at least they should be consistent
<ElderFain> Radar: right, I mean its trivial for me to fix *locally*
asdffff has joined #ruby
<ElderFain> Radar: does ruby have link on or after type checks ? If you were on Ruby 2.1 give you the old legacy behavior, new code goes to a new behavior (call .to_sym)
<Radar> "link on or after type checks" ?
<Radar> What.
<ElderFain> worlds crossing =)
<ElderFain> sorry I'm thinking in compiled langauges
<ElderFain> that have SDKs and so on
RegulationD has quit [Remote host closed the connection]
<ElderFain> (where its "linked" during compilation)
<Radar> We don't have that in Ruby-land.
hahuang61 has quit [Ping timeout: 250 seconds]
<ElderFain> yeah was just trying to think of how to keep compatibility.
<ElderFain> Radar: Okay so, pretending like I'm silly enough to open a ... ticket/pull request, is there a way to move forward ?
FernandoBasso has quit [Quit: Leaving]
<Radar> Better off just writing your own converter.
moonythedwarf_ has quit [Ping timeout: 265 seconds]
<ElderFain> shorthand for: "It'll be rejected"
polysics has quit [Ping timeout: 250 seconds]
<Radar> Go through this ancient ritual.
<SeepingN> might be. they might add a "compatible with to_sym" option
<ElderFain> SeepingN: thats another code path to qualify during release
Pumukel has joined #ruby
<ElderFain> adds to the overall burden, its better off to make the call and pay the one time price
<ElderFain> than it is to burden the language forever henceforth
<SeepingN> true
nitric_ has quit [Ping timeout: 244 seconds]
<SeepingN> this is how The Disaster begins
<ElderFain> Radar: alright, well thank you for your time and the info
<ElderFain> SeepingN: thank you as well
<Radar> npo