havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<al2o3-cr> >> SuperTux88 << still play that shit now
<ruboto> al2o3-cr # => /tmp/execpad-85704917d00b/source-85704917d00b:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/456616)
dorei has joined #ruby
Guest58021 has quit [Quit: Leaving]
dopie has joined #ruby
ledestin has joined #ruby
gambl0re has quit [Ping timeout: 246 seconds]
sankaber has joined #ruby
<zenspider> al2o3-cr: you might want to cut back on... whatever
<pipework> Or take more, depending on whatever it is that whatever is.
fp- has joined #ruby
fp- has quit [Remote host closed the connection]
fp- has joined #ruby
Dairenn has joined #ruby
vigintas has quit [Ping timeout: 256 seconds]
<Dairenn> Anyone have a good example of getting STDOUT and/or STDERR from IO.popen into logger?
baweaver has quit [Remote host closed the connection]
Ox0dea has quit [Read error: Connection reset by peer]
gambl0re has joined #ruby
Ox0dea has joined #ruby
<al2o3-cr> Dairenn: IO.popen('program', 'args1', 'args2'], err: [:child, :out]) # something like that
Channel6 has joined #ruby
fp- has quit [Client Quit]
Blaguvest has quit []
<Dairenn> Cool, thanks. I think that puts me on the right path.
howdoicomputer has joined #ruby
bmurt has joined #ruby
jamto11 has quit [Remote host closed the connection]
ishikawa91 has joined #ruby
gambl0re has quit [Ping timeout: 250 seconds]
gambl0re has joined #ruby
bmurt has quit [Client Quit]
cwong_on_irc has quit [Quit: Leaving.]
<al2o3-cr> Dairenn: takes a block or assign to a variable as necessary, your choice
Ox0dea has quit [Read error: Connection reset by peer]
ruby-lang001 has joined #ruby
crankhar1er has quit [Quit: leaving]
crankharder has joined #ruby
dfinninger has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 268 seconds]
ruby-lang001 has quit [Ping timeout: 246 seconds]
eminencehc has quit [Remote host closed the connection]
workmad3 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
Fredrich010 has joined #ruby
sl33k has quit [Quit: sl33k]
HoloIRCUser5 has quit [Ping timeout: 255 seconds]
n008f4g_ has quit [Ping timeout: 272 seconds]
willardg has joined #ruby
cmoneylulz has joined #ruby
willardg has quit [Client Quit]
workmad3 has quit [Ping timeout: 260 seconds]
Channel6 has quit [Quit: Leaving]
robbyonrails has joined #ruby
jonnie has joined #ruby
govg has quit [Ping timeout: 256 seconds]
skweek has joined #ruby
robbyonr1ils has joined #ruby
jonnie has quit [Ping timeout: 260 seconds]
SCHAAP137 has quit [Quit: Leaving]
Jardayn has quit [Read error: Connection reset by peer]
gregoriokusowski has quit [Quit: gregoriokusowski]
Rickmasta has joined #ruby
george2 has joined #ruby
saddad has quit [Quit: WeeChat 1.4-dev]
brt has joined #ruby
pontiki has joined #ruby
sp4rrow has joined #ruby
Guest40721 has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
marr has quit []
craysiii has joined #ruby
dotix has quit [Ping timeout: 250 seconds]
tkuchiki has quit [Remote host closed the connection]
jamto11 has joined #ruby
jamto11 has quit [Remote host closed the connection]
baweaver has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tedstriker has joined #ruby
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
RegulationD has joined #ruby
robbyonrails has quit [Quit: leaving]
cmoneylulz has quit [Remote host closed the connection]
dotix has joined #ruby
jamto11 has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical has quit [Quit: Textual IRC Client: www.textualapp.com]
brt has quit [Ping timeout: 260 seconds]
d34th4ck3r has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
Musashi007 has joined #ruby
arooni has joined #ruby
yqt has quit [Ping timeout: 240 seconds]
paracr4ck has joined #ruby
<paracr4ck> Hey everyone
<paracr4ck> I am wondering the point of this syntax, it appears in some of the ruby-doc.org examples
<paracr4ck> ::Kernel.whatever
sepp2k has quit [Read error: Connection reset by peer]
cmoneylulz has joined #ruby
atomical has joined #ruby
devoldmx has quit []
<paracr4ck> does ::Kernel.whatever just access the whatever method explicitly through the included Kernel module?
crime has quit [Quit: Connection closed for inactivity]
<Ebok> The Kernel module is included by class Object, so its methods are available in every Ruby object. <---
ekem is now known as hvac_worker
hvac_worker is now known as ekem
loc22 has joined #ruby
loc22 has quit [Remote host closed the connection]
loc22 has joined #ruby
loc22 has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
loc22 has joined #ruby
loc22 has quit [Remote host closed the connection]
loc22 has joined #ruby
loc22 has quit [Remote host closed the connection]
dorei has quit []
Yzguy has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has joined #ruby
<paracr4ck> Ebok: but if I used ::Kernel.sleep isn't that the same as sleep
Ox0dea has joined #ruby
ElFerna has joined #ruby
ElFerna has quit [Client Quit]
ElFerna has joined #ruby
mengu has quit [Ping timeout: 260 seconds]
ElFerna has quit [Client Quit]
I has joined #ruby
<I> JOIN
<I> hey
<I> I need help
<I> hello?
imperator has joined #ruby
<I> how do I fix this error
<I> Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
<I> I have no idea what to do
I is now known as Guest9632
<Guest9632> ?
<Guest9632> anyone?
<Guest9632> ...
<Guest9632> no one?
roxtrongo has joined #ruby
<Guest9632> helllo
<Guest9632> why..
<Guest9632> hello?
<imperator> Guest9632, just hopped on, what's your question?
<imperator> oh nm i see
<Ox0dea> paracr4ck: https://eval.in/456623
<imperator> what gem are you trying to install?
<imperator> and on what OS?
ElFerna has joined #ruby
bruce_lee2 has joined #ruby
<Guest9632> I'm following this tutorial
<Guest9632> and i'm at the part where it says
<Guest9632> bundle install
<Guest9632> at the bottomish of the page
<Guest9632> but it's giving me a really crappy error
<Guest9632> stackoverflow is no help
<Guest9632> windows 10
blackjid has quit [Max SendQ exceeded]
jonnie has joined #ruby
cmoneylulz has joined #ruby
blackjid has joined #ruby
robbyoconnor has quit [Ping timeout: 265 seconds]
willardg has joined #ruby
<Guest9632> d
<Guest9632> d
<Guest9632> d
<Guest9632> dd
<Guest9632> Your Gemfile lists the gem sqlite3 (>= 0) more than once. You should probably keep only one of them. While it's not a problem now, it could cause errors if you change the version of just one of them later. Fetching gem metadata from https://rubygems.org/.......... Fetching version metadata from https://rubygems.org/.. Resolving dependencies.... Using rake 10.4.2 Using i18n 0.7.0 Installing json 1.8.3 with native extensions Gem::Ex
<Ox0dea> You're everything a decent netizen shouldn't be.
diegoaguilar has joined #ruby
justicefries has joined #ruby
bruce_lee has quit [Ping timeout: 240 seconds]
<imperator> Guest9632, you're using the ruby installer for windows right?
<Ox0dea> >> [Object.include?(Kernel), BasicObject.include?(Kernel)] # paracr4ck
<ruboto> Ox0dea # => [true, false] (https://eval.in/456624)
ajb is now known as ajb-
ajb- is now known as ajb
<Ox0dea> >> Object.instance_methods.size
<ruboto> Ox0dea # => 56 (https://eval.in/456625)
robbyoconnor has joined #ruby
<Ox0dea> That's quite a lot of inherent behavior, and you don't always want it; BasicObject is a convenient barebones "template object".
jonnie has quit [Ping timeout: 252 seconds]
<paracr4ck> Ox0dea # I was thinking that it was a way to make explicit the module that owned the method(namely sleep())
<Ox0dea> paracr4ck: Sure, the prefixed :: can also be used for disambiguation.
<paracr4ck> Ox0dea: Ahhh awesome, I was seeing it in some Rails codebases as well, thanks!
<Ox0dea> It explicitly tells the constant resolution chain to begin at the top.
<paracr4ck> Ahhhh ok
<Ox0dea> >> module Foo; class String; end; String == ::String; end # paracr4ck
<ruboto> Ox0dea # => false (https://eval.in/456627)
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skcin7_ has joined #ruby
<Ox0dea> The LHS there refers to Foo::String, which isn't the same as the one provided by core.
grambo has joined #ruby
roxtrongo has quit [Remote host closed the connection]
skcin7 has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
tkuchiki has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Musashi007> does anyone here ever stream their ruby work?
Guest9632 has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
bruno- is now known as Guest29203
workmad3 has quit [Ping timeout: 260 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
bb010g has joined #ruby
<paracr4ck> Musashi007: for example on Twitch?
<Musashi007> yes
<Ox0dea> Musashi007: http://i.imgur.com/2GOpAWD.gif
niftylettuce has joined #ruby
Guest29203 has quit [Ping timeout: 260 seconds]
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
imperator has quit [Quit: Leaving]
allcentury has quit [Ping timeout: 265 seconds]
ibouvousaime has quit [Ping timeout: 255 seconds]
<paracr4ck> Musashi007: I have seen some rare streams but I probably wouldn't myself
alcipir has joined #ruby
baweaver has quit [Remote host closed the connection]
pontiki_ has joined #ruby
duncannz has quit [Ping timeout: 264 seconds]
JaTochNietDan has quit [Ping timeout: 264 seconds]
arooni has quit [Quit: Leaving]
pontiki has quit [Ping timeout: 246 seconds]
segmond has quit [Ping timeout: 246 seconds]
alcipir has quit [Ping timeout: 268 seconds]
gregf has quit [Quit: WeeChat 1.3]
cwong_on_irc has joined #ruby
segmond has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
cwong_on_irc has joined #ruby
gregf has joined #ruby
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
<al2o3-cr> IT crowd
unreal has quit [Ping timeout: 256 seconds]
<al2o3-cr> moss funny gut
<al2o3-cr> *guy
Or1on has joined #ruby
unreal has joined #ruby
ekinmur has joined #ruby
ElFerna has joined #ruby
blackjid has quit [Max SendQ exceeded]
Rickmasta has joined #ruby
blackjid has joined #ruby
jordanloky has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bonhoeffer has joined #ruby
d34th4ck3r has quit [Quit: zzz]
bryanray has joined #ruby
mgorbach has quit [Quit: ZNC - http://znc.in]
mgorbach has joined #ruby
Chaoborid has joined #ruby
brt has joined #ruby
rrichardsr3 has joined #ruby
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Chaoborid has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
malcolmva has quit [Ping timeout: 250 seconds]
jonnie has joined #ruby
rshetty has joined #ruby
Musashi007 has quit [Quit: Musashi007]
psy_ has quit [Ping timeout: 244 seconds]
cmoneylulz has quit [Remote host closed the connection]
jonnie has quit [Ping timeout: 250 seconds]
saddad has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
ghr has quit [Ping timeout: 240 seconds]
cmoneylulz has joined #ruby
ghr has joined #ruby
AccordLTN has quit []
roxtrongo has joined #ruby
AccordLTN has joined #ruby
unsymbol has quit [Ping timeout: 250 seconds]
<shevy> *but
janelleb has joined #ruby
eminencehc has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
ruby-lang424 has joined #ruby
rshetty has quit [Remote host closed the connection]
malcolmva has joined #ruby
gener1c has quit [Ping timeout: 240 seconds]
ruby-lang424 has left #ruby [#ruby]
baweaver has joined #ruby
bruno- has joined #ruby
SuzieQueue has joined #ruby
jgt has quit [Ping timeout: 260 seconds]
bruno- is now known as Guest88874
O47m341 has quit [Ping timeout: 256 seconds]
lemur has joined #ruby
rbennacer has joined #ruby
nemo_ has joined #ruby
Guest88874 has quit [Ping timeout: 255 seconds]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dotix has quit [Quit: Leaving]
BraddPitt has quit [Quit: Lost terminal]
baweaver has quit [Ping timeout: 265 seconds]
gener1c has joined #ruby
<al2o3-cr> shevy: why you try to come with a knockout blow, when the time is gone?
nemo_ has quit [Remote host closed the connection]
allcentury has joined #ruby
emptyflask has quit [Remote host closed the connection]
roxtrongo has quit [Remote host closed the connection]
Mojo_Nixon has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> Attempting to support `%D` in addition to `%d` is making parse.y my arch nemesis (again).
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tedstriker has quit [Quit: Anti-Fraping status set.]
A124 has quit [Read error: Connection reset by peer]
<Radar> Use a regex.
<Ox0dea> > parse.y
emptyflask has joined #ruby
<Radar> > facetiousness
<Ox0dea> Well, one of us has clearly misinterpreted the other.
<bigmac_> how do i include all special chars to this...
<bigmac_> [('a'..'z'),('A'..'Z'),('0'..'9')].each
<Ox0dea> bigmac_: `[33..127].map(&:chr)` will get you every non-control character.
RegulationD has joined #ruby
<Ox0dea> *(33..127)
<Ox0dea> And, well, 32 isn't a control character, but you probably don't want it.
saddad has quit [Read error: No route to host]
<Ox0dea> Radar: To clarify, I'm trying (again) to add %d[] numeric array literals to Ruby.
saddad has joined #ruby
<Radar> Ox0dea: I see.
<Ox0dea> It's easy enough to define it in terms of the existing productions, but %D[] for interpolated numeric arrays is complicating things.
A124 has joined #ruby
FrankD has quit [Ping timeout: 250 seconds]
<Radar> I don't mess about in Ruby code because I have an IQ about 50 points too low for that sort of thing.
arescorpio has joined #ruby
<Radar> Best of luck though!
<Ox0dea> I don't think anybody would ever actually use the latter, but the current naming scheme practically necessitates its addition. :/
<Radar> What is this new addition improving exactly? Do you have a "before" and "after"?
<Radar> twee
<Radar> Whoops
<Ox0dea> %d[1 3.14 2ri] > [1, 3.14, 2ri], in my opinion.
<Ox0dea> It's the same benefit gained from %i, really.
<Ox0dea> Sometimes you know you intend to bang out an array of symbols; it's nice not to have to hit the commas.
<Radar> I see
spacemud has quit [Ping timeout: 256 seconds]
rbennacer has quit [Remote host closed the connection]
duncannz has joined #ruby
sankaber has joined #ruby
RegulationD has quit [Ping timeout: 268 seconds]
rbennacer has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
Motoservo has joined #ruby
mollusk_ has joined #ruby
EllisTAA has joined #ruby
<EllisTAA> i wrote an add method that adds two numbers together. it doesn’t work for all numbers, but it’s close. can anyone think of a better way to write this? https://gist.github.com/ellismarte/bf24eb70725fa76cc18c
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<shevy> al2o3-cr I don't have timestamps, it's all neverending IRC flow for me here :)
<Radar> EllisTAA: what is that method even doing
<Radar> EllisTAA: Are you intentionally trying to write a really complicated method to do the equivalent of a + b?
<EllisTAA> Radar: yeah it’s supposed to do a + b, i figured it would be a good interview question
<Radar> EllisTAA: Done. Now can I be hired?
<EllisTAA> lol
<EllisTAA> you can’t use the addition operator
Dairenn has quit []
<Radar> how about pairing on some real code?
<EllisTAA> well i figured this could be the technical phone screen that i can’t seem to pass
<Radar> None of this pseudocode bullshit
d34th4ck3r has joined #ruby
m3_del has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
<Radar> If I got told to do this in an interview, I would get up and walk out.
<Radar> I might even flip a table before I left.
<Radar> There is no reasonable employer who will ask me to add two numbers together without using the addition operator.
<Radar> If you want to know what I'm going to be like as an employee, let's pair on an actual problem you're having _right now_
<Radar> because, in reality, that is what I'm going to be doing with you every day
m3_del has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar> and we'll very quickly (I mean, less than an hour in) be able to figure out if we like each other or not
<Radar> And without using "+", srslyT?
<Radar> -t
<Radar> Done.
<EllisTAA> Radar: the other day they asked me to wriet a method that told whether a string of parentheses is balanced e.g. “)(“ would you say that’s just as stupid
<Radar> yes
<EllisTAA> lp;
<Radar> These crap coding interviews need to stop.
<Radar> Pair with people on real problems for 30mins and see how they go
<Radar> It's getting utterly ridiculous.
Motoservo has quit [Read error: Connection reset by peer]
<EllisTAA> would u be down to pair sometime this week?
<EllisTAA> meh nvm
<Radar> "Here, let me prove how smart I am by proposing an unrealistic problem with unrealistic restrictions"
<Radar> why nvm?
<EllisTAA> i assumed u r busy
<Radar> pah
<Radar> I likely have time this Saturday
<EllisTAA> what kind of question would u ask in a pairing session?
<Radar> Saturday at ^ that time
duncannz has quit [Ping timeout: 250 seconds]
<pipework> EllisTAA: Ones related to the problem at hand. Something with inherent real value in an actual project.
<Radar> I would ask you to write some application code and then observe what you do.
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar> I'd probably use https://gist.github.com/radar/3037d4c5f8d3240afd43 as an example, since I think you're planning on doing Rails stuff
<EllisTAA> Radar: as awesome as that sounds, my gf is only in town for 1 day this weekend so i’m going to have to pass
<Radar> EllisTAA: np
<Ox0dea> EllisTAA: More supportively, you've at least demonstrated that you could implement Bignum addition if you had to.
spacemud has joined #ruby
<Radar> EllisTAA: Following weekend is the same kind of deal, so if you have time then I'd be up for that,.
<Ox0dea> EllisTAA: A more worthwhile "simple" problem like this would be to define #even? and #odd? given only #zero?.
<EllisTAA> Radar: yeah i would be excited if the interviewer asked me to pair on that
<Ox0dea> The Peano axioms essentially prove that 1 + 1 == 2; why not translate them to Ruby?
roxtrongo has joined #ruby
<EllisTAA> Radar: cool i will message you this week just once i figure out my schedule
<Radar> EllisTAA: ok :)
dopieee has joined #ruby
<Radar> Oh, and I also have a day next week. The 3rd of November for me. Let me get the everytimezone for that too.
<Radar> Oh, that's the 4th there, sorry.
<EllisTAA> cool
* pipework sells Radar a public calendar
<Radar> I've got a reminder in now to see if you've got that sorted by Friday this week.
<Radar> pipework: hah. I don't even know when I'm available most of the time :OP
<pipework> Radar: :D
dopie has quit [Ping timeout: 256 seconds]
rbennacer has quit [Remote host closed the connection]
<Radar> Next Tuesday is a public holiday here so that some horses can run around in circles.
AccordLTN is now known as AccordLT
Feyn has joined #ruby
rshetty has joined #ruby
workmad3 has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
saddad has quit [Read error: No route to host]
<shevy> you australians are so weird!
jonnie has joined #ruby
saddad has joined #ruby
<lemur> sounds like a roundabout way to get time off Radar
<Radar> lemur: nuck nuck nuck
<Radar> oops, sorry nuck!
lemur is now known as baweaver
saddad has quit [Read error: No route to host]
<baweaver> every time.
benlieb has joined #ruby
rshetty has quit [Remote host closed the connection]
saddad has joined #ruby
p1k has joined #ruby
Motoservo has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
pontiki_ is now known as pontiki
<pipework> The biggest difference between Australians and Americans seems to be that us Americans prefer to make the things that can kill you, Australia just has them naturally occurring everywhere.
jonnie has quit [Ping timeout: 250 seconds]
<pontiki> lol, so true, pipework
favadi has joined #ruby
FrankD has joined #ruby
moeabdol has joined #ruby
<shevy> koalas riding on kangaroos swinging deadly spears
<Coraline> Don't forget the drop bears.
<pipework> Coraline: And please, don't neglect the hoop snakes. They really hate that.
<Coraline> Of course
bigmac_ has quit [Ping timeout: 265 seconds]
<Coraline> But see both of those things are totally plausible given the variety of Australian animals that actually do want to eat you.
simi has quit [Ping timeout: 240 seconds]
<Ox0dea> "Hoop snakes" == nostalgia: http://i.ytimg.com/vi/DKyqSy1NcGY/hqdefault.jpg
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
roxtrongo has quit [Remote host closed the connection]
diegoaguilar has quit [Remote host closed the connection]
baweaver has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest31781
cndiv has quit [Quit: Quit]
craysiii has quit [Remote host closed the connection]
vdamewood has quit [Quit: Life beckons.]
EllisTAA has quit [Quit: EllisTAA]
zenguy_pc has quit [Read error: Connection reset by peer]
darkf has joined #ruby
bmurt has joined #ruby
Guest31781 has quit [Ping timeout: 252 seconds]
stardiviner has joined #ruby
bmurt has quit [Client Quit]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rshetty has joined #ruby
rshetty has quit [Remote host closed the connection]
<Coraline> Australia is beautiful though. I was lucky enough to be invited there last February for RubyConf.
nemo_ has joined #ruby
rshetty has joined #ruby
emptyflask has quit []
mm_ has joined #ruby
nemo_ has quit [Remote host closed the connection]
rrichardsr3 has quit [Quit: He who dares .... wins.]
gener1c_ has joined #ruby
rshetty has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
moeabdol has quit [Ping timeout: 255 seconds]
gener1c has quit [Ping timeout: 244 seconds]
<shevy> it's not over yet
alcipir has joined #ruby
<Ox0dea> > 57,034 bounties were claimed over a six-month period
braincras has quit [Quit: bye bye]
m3_del has quit [Remote host closed the connection]
jamto11 has quit [Remote host closed the connection]
Gnomethrower has joined #ruby
dopieee has quit [Quit: Leaving]
dopie has joined #ruby
pathrocle has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
alcipir has quit [Ping timeout: 240 seconds]
mm_ has quit [Read error: Connection reset by peer]
braincrash has joined #ruby
alcipir has joined #ruby
minimalism has joined #ruby
saddad has quit [Read error: No route to host]
FrankD has quit [Changing host]
FrankD has joined #ruby
PaulCape_ has joined #ruby
saddad has joined #ruby
alcipir has quit [Ping timeout: 240 seconds]
p1k has quit [Ping timeout: 265 seconds]
rshetty has quit [Remote host closed the connection]
<Ox0dea> Well, that settles that: https://github.com/ruby/ruby/commit/603b000
<Ox0dea> I agree with the end of the shortref: booo.
PaulCapestany has quit [Ping timeout: 240 seconds]
rshetty has joined #ruby
trosborn has joined #ruby
p1k has joined #ruby
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
jonnie has joined #ruby
gix has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby
gix has joined #ruby
rshetty has quit [Remote host closed the connection]
m3_del has joined #ruby
rshetty has joined #ruby
m3_del has quit [Remote host closed the connection]
m3_del has joined #ruby
chipotle has joined #ruby
jamto11 has joined #ruby
m3_del has quit [Ping timeout: 246 seconds]
HANJIN has joined #ruby
finisherr has left #ruby [#ruby]
paracr4ck has quit [Quit: Leaving]
saddad has quit [Read error: No route to host]
psy_ has joined #ruby
psy_ has quit [Max SendQ exceeded]
janelleb has quit [Ping timeout: 268 seconds]
psy_ has joined #ruby
pdoherty has quit [Ping timeout: 264 seconds]
vdamewood has joined #ruby
shinenelson has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest3843
krz has joined #ruby
saddad has joined #ruby
Guest3843 has quit [Ping timeout: 246 seconds]
speaking1ode has quit [Ping timeout: 240 seconds]
speaking1ode has joined #ruby
jamto11 has quit [Remote host closed the connection]
spuk has quit [Ping timeout: 256 seconds]
nemo_ has joined #ruby
d34th4ck3r has quit [Quit: zzz]
freerobby1 has quit [Quit: Leaving.]
Soda has joined #ruby
RegulationD has joined #ruby
Gnomethrower is now known as J5
J5 is now known as Gnomethrower
inteq has quit [Ping timeout: 256 seconds]
tubuliferous_ has quit [Ping timeout: 256 seconds]
rshetty has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 250 seconds]
inteq has joined #ruby
bruce_lee2 has quit [Changing host]
bruce_lee2 has joined #ruby
bruce_lee2 is now known as bruce_lee
gambl0re has quit [Ping timeout: 265 seconds]
sanjayu has joined #ruby
rshetty has joined #ruby
alcipir has joined #ruby
SuzieQueue has quit [Ping timeout: 246 seconds]
pontiki has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
arup_r has joined #ruby
workmad3 has joined #ruby
alcipir has quit [Ping timeout: 265 seconds]
saddad has quit [Ping timeout: 264 seconds]
arescorpio has quit [Quit: Leaving.]
krz has quit [Ping timeout: 252 seconds]
jamto11 has joined #ruby
alcipir has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unclouded has quit [Read error: No route to host]
workmad3 has quit [Ping timeout: 265 seconds]
lxsameer has joined #ruby
lxsameer has joined #ruby
greedo has quit [Ping timeout: 260 seconds]
alcipir has quit [Ping timeout: 256 seconds]
Ox0dea has quit [Read error: Connection reset by peer]
chipotle has quit [Quit: cheerio]
moeabdol has joined #ruby
jonnie has quit [Ping timeout: 264 seconds]
zarubin has joined #ruby
toy has joined #ruby
m3_del has joined #ruby
moeabdol has quit [Ping timeout: 265 seconds]
eminencehc has joined #ruby
zarubin has quit [Ping timeout: 250 seconds]
favadi has joined #ruby
jenrzzz has joined #ruby
m3_del has quit [Ping timeout: 255 seconds]
arup_r has quit [Ping timeout: 255 seconds]
nisstyre has joined #ruby
arup_r has joined #ruby
alcipir has joined #ruby
eminencehc has quit [Ping timeout: 246 seconds]
kp666 has joined #ruby
CloCkWeRX has left #ruby [#ruby]
agent_white has joined #ruby
Contigi has joined #ruby
<agent_white> Evenin' folks
tubuliferous_ has joined #ruby
ishikawa91 has quit [Quit: Connection closed for inactivity]
alcipir has quit [Ping timeout: 255 seconds]
jamto11 has quit [Remote host closed the connection]
krazyj has quit [Quit: krazyj]
Contigi777 has quit [Ping timeout: 240 seconds]
nisstyre has quit [Changing host]
nisstyre has joined #ruby
skade has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
favadi has quit [Ping timeout: 260 seconds]
psy_ has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
bruno- is now known as Guest44439
cwong_on_irc1 has joined #ruby
cwong_on_irc1 has quit [Max SendQ exceeded]
jenrzzz has joined #ruby
cwong_on_irc1 has joined #ruby
trosborn has quit [Quit: trosborn]
p1k has quit [Ping timeout: 240 seconds]
cwong_on_irc has quit [Ping timeout: 250 seconds]
Guest44439 has quit [Ping timeout: 272 seconds]
swgillespie has joined #ruby
trosborn has joined #ruby
pledgeshield has joined #ruby
timonv has joined #ruby
brt has quit [Ping timeout: 255 seconds]
krz has joined #ruby
sameerynho has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
lxsameer has quit [Ping timeout: 256 seconds]
badhatter has quit [Remote host closed the connection]
howdoi has joined #ruby
maletor has joined #ruby
greedo has joined #ruby
ruby-lang437 has joined #ruby
brt has joined #ruby
dhjondoh has joined #ruby
ta has quit [Remote host closed the connection]
chipotle has joined #ruby
ruby-lang437 has quit [Ping timeout: 246 seconds]
alcipir has joined #ruby
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #ruby
skade has quit [Read error: Connection reset by peer]
alcipir has quit [Ping timeout: 250 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
pledgeshield has quit []
Cyther has quit [Quit: Leaving]
pledgeshield has joined #ruby
mollusk_ has quit [Ping timeout: 260 seconds]
lxsameer_ has joined #ruby
krz has quit [Ping timeout: 252 seconds]
sameerynho has quit [Ping timeout: 246 seconds]
chrissonar has joined #ruby
d34th4ck3r has joined #ruby
nemo_ has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
skade has joined #ruby
jonnie has joined #ruby
arup_r has quit [Ping timeout: 260 seconds]
Meeh has joined #ruby
moeabdol has joined #ruby
djbkd has quit [Quit: Leaving...]
<djellemah> I'm trying out some ideas related to thread-safe memoisation and single assignment. There are (of course) some interesting interactions between memoisation and .freeze. Anybody know of gem(s) which override .freeze to achieve something useful? TIA.
arup_r has joined #ruby
brt has quit [Ping timeout: 265 seconds]
zarubin has joined #ruby
lxsameer_ has quit [Ping timeout: 265 seconds]
m3_del has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
moeabdol has quit [Ping timeout: 264 seconds]
Meeh has quit [Ping timeout: 260 seconds]
lxsameer_ has joined #ruby
vdamewood has quit [Quit: Life beckons.]
VeryBewitching has quit [Quit: Konversation terminated!]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arup_r has joined #ruby
zarubin has quit [Ping timeout: 272 seconds]
arup_r has quit [Max SendQ exceeded]
arup_r has joined #ruby
arup_r has quit [Remote host closed the connection]
certainty has joined #ruby
arup_r has joined #ruby
alcipir has joined #ruby
haxrbyte has joined #ruby
m3_del has quit [Ping timeout: 252 seconds]
Meeh has joined #ruby
alcipir has quit [Ping timeout: 252 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
symm- has quit [Quit: Leaving...]
benlieb has quit [Quit: benlieb]
<certainty> moin
devbug has quit [Remote host closed the connection]
alcipir has joined #ruby
p1k has joined #ruby
tagrudev has joined #ruby
polysics has quit [Ping timeout: 260 seconds]
dhjondoh has quit [Quit: dhjondoh]
Or1on has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<agent_white> \o
htmldrum has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
skcin7 has joined #ruby
codecop has joined #ruby
skcin7_ has quit [Ping timeout: 246 seconds]
trosborn has quit [Quit: trosborn]
rehat has quit [Remote host closed the connection]
dhjondoh has joined #ruby
dhjondoh has quit [Client Quit]
Ox0dea has joined #ruby
<Ox0dea> djellemah: Could you clarify?
Pupp3tm4st3r has joined #ruby
p1k has quit [Ping timeout: 260 seconds]
<Ox0dea> Are you wanting to thaw an object and modify it while presenting a "frozen" facade?
skade has quit [Quit: Computer has gone to sleep.]
Salehi has joined #ruby
dhjondoh has joined #ruby
benlieb has joined #ruby
kerunaru has joined #ruby
CloCkWeRX has quit [Ping timeout: 264 seconds]
trosborn has joined #ruby
p1k has joined #ruby
<djellemah> Ox0dea: Part of it is: def some_value; @some_value ||= calculate_the_value; end doesn't work with a frozen object - obviously. But in sense there's no reason it shouldn't work because memoisation doesn't change the state of the object, it just caches a calculated value based on the state of the object.
grambo has quit [Quit: Leaving]
<Ox0dea> djellemah: That's a reassignment, though?
<Ox0dea> I'm missing this relationship you're seeing between frozen objects and memoization.
RegulationD has joined #ruby
bluOxigen has joined #ruby
symm- has joined #ruby
workmad3 has joined #ruby
trautwein has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
dhjondoh has joined #ruby
<Ox0dea> djellemah: Sorry, I see where I derped; you want to be able to invoke #instance_variable_set on frozen objects, if I'm not mistaken.
alcipir has quit [Ping timeout: 252 seconds]
pledgeshield has quit []
<djellemah> Ox0dea: Yup, that's pretty much it. With some additional wrinkles cos, well, I'm trying out ideas ;-)
aganov has joined #ruby
RegulationD has quit [Ping timeout: 272 seconds]
riotjon__ has quit [Quit: Leaving...]
<Ox0dea> djellemah: Aye, I can appreciate that particular itch.
CloCkWeRX has joined #ruby
<Ox0dea> djellemah: https://eval.in/456705
mengu has joined #ruby
mengu has joined #ruby
lsmola_ has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
<Ox0dea> Fiddle lets you muck about in an object's raw memory, and from there it's just a matter of flipping the FL_FREEZE flag.
mengu has quit [Client Quit]
<Ox0dea> I should also clarify that `^= 8` actually toggles the flag; you'll want `&= -9` for idempotent thawing.
trosborn has quit [Quit: trosborn]
p1k has quit [Ping timeout: 260 seconds]
alcipir has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
Feyn has quit [Quit: Leaving]
<djellemah> The real-world driver is I that at one point I had to parallelize several queries in an existing codebase. I tried using .freeze to see if there was any thread-unsafety in the execution paths, but there was memoisation.
* djellemah reads about Fiddle
chipotle has quit [Quit: cheerio]
moeabdol has joined #ruby
dhjondoh1 has joined #ruby
krazyj has joined #ruby
krazyj has quit [Client Quit]
kraljev11 has joined #ruby
dhjondoh1 has quit [Client Quit]
symm-_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 260 seconds]
sl33k has joined #ruby
dhjondoh has quit [Ping timeout: 264 seconds]
Fredrich010 has quit [Ping timeout: 255 seconds]
jonnie has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
favadi has joined #ruby
krz has joined #ruby
bigkevmcd has joined #ruby
DexterLB has quit [Read error: Connection reset by peer]
karapetyan has quit [Ping timeout: 260 seconds]
relix has joined #ruby
chipotle has joined #ruby
firstdayonthejob has joined #ruby
tkuchiki has quit [Remote host closed the connection]
jerry_tao has joined #ruby
tkuchiki has joined #ruby
p1k has joined #ruby
Salehi has quit [Ping timeout: 240 seconds]
beauby has quit [Ping timeout: 260 seconds]
george2 has left #ruby [#ruby]
m3_del has joined #ruby
alcipir has quit [Ping timeout: 268 seconds]
Salehi has joined #ruby
benlieb has quit [Quit: benlieb]
m3_del has quit [Ping timeout: 272 seconds]
kies^ has quit [Ping timeout: 256 seconds]
andikr has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
keen________ has joined #ruby
jas02 has joined #ruby
p1k has quit [Read error: Connection timed out]
p1k has joined #ruby
Rollabunna has joined #ruby
keen_______ has quit [Ping timeout: 240 seconds]
sl33k has quit [Quit: sl33k]
baweaver has quit [Remote host closed the connection]
Macaveli has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
ta has joined #ruby
agent_wh1te has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_wh1te is now known as agent_white
jas02 has quit [Quit: jas02]
agent_white has quit [Changing host]
agent_white has joined #ruby
matcouto has joined #ruby
krz has quit [Ping timeout: 240 seconds]
beauby has joined #ruby
jonnie has joined #ruby
dikaio has quit [Quit: ........]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
ta has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
ta has joined #ruby
p1k has quit [Ping timeout: 264 seconds]
karapetyan has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
lubarch has joined #ruby
Ox0dea has quit [Read error: Connection reset by peer]
sdwrage has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jerry_tao has quit [Ping timeout: 250 seconds]
TomyWork has joined #ruby
gagrio has joined #ruby
skade has joined #ruby
charliesome has joined #ruby
jerry_tao has joined #ruby
alcipir has joined #ruby
krz has joined #ruby
yie has quit [Remote host closed the connection]
Gnomethrower is now known as uphoria
troulouliou_div2 has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
yardenbar has joined #ruby
CatMartyn has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
alcipir has quit [Ping timeout: 252 seconds]
astrobunny has joined #ruby
ruurd has joined #ruby
solenoids has quit [Ping timeout: 268 seconds]
futilegames has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
ledestin has quit [Read error: Connection reset by peer]
sdwrage has joined #ruby
benlovell has joined #ruby
vondruch has joined #ruby
CatMartyn has quit [Quit: Textual IRC Client: www.textualapp.com]
symm-_ is now known as symm-
Hounddog has joined #ruby
kimegede has joined #ruby
sdwrage has quit [Client Quit]
alcipir has joined #ruby
krz has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
Hounddog has quit [Ping timeout: 272 seconds]
sl33k has joined #ruby
gavit has quit [Ping timeout: 264 seconds]
alcipir has quit [Ping timeout: 256 seconds]
djbkd has quit [Remote host closed the connection]
tomaz_b has joined #ruby
kerunaru has quit [Ping timeout: 250 seconds]
Hounddog has joined #ruby
nemo_ has joined #ruby
alcipir has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
jas02 has joined #ruby
aufi has joined #ruby
solenoids has joined #ruby
gavit has joined #ruby
ausec has quit [Quit: ZNC 1.6.1 - http://znc.in]
kerunaru has joined #ruby
nfk|laptop has joined #ruby
Pumukel has joined #ruby
skcin7 has quit [Ping timeout: 268 seconds]
skcin7 has joined #ruby
jas02 has left #ruby [#ruby]
troulouliou_div2 has quit [Remote host closed the connection]
jgt has joined #ruby
dhjondoh has joined #ruby
dhjondoh has quit [Client Quit]
zotherstupidguy has quit [Quit: WeeChat 1.2]
Salehi has quit [Quit: Leaving]
futilegames has quit [Quit: futilegames]
jgt has quit [Ping timeout: 244 seconds]
dhjondoh has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
ledestin has joined #ruby
alcipir has quit [Ping timeout: 268 seconds]
Musashi007 has joined #ruby
symm-_ has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
astrobunny has quit [Remote host closed the connection]
futilegames has joined #ruby
zipace has joined #ruby
Fredrich010 has joined #ruby
sl33k has quit [Quit: sl33k]
p1k has joined #ruby
hfp_work has quit [Ping timeout: 264 seconds]
Feyn has joined #ruby
hfp_work has joined #ruby
uphoria is now known as Gnomethrower
CloCkWeRX has joined #ruby
jonnie has quit [Ping timeout: 255 seconds]
last_staff has joined #ruby
blaxter has joined #ruby
davedev__ has quit [Ping timeout: 240 seconds]
m3_del has joined #ruby
dreinull75 has joined #ruby
favadi has quit [Ping timeout: 252 seconds]
lipoqil has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
<dreinull75> yikes, how do I require a gem only on jruby or mri?
<TomyWork> is there a way to next the outer loop from a nested loop?
workmad3 has joined #ruby
davedev24 has joined #ruby
<TomyWork> the array.each kind of loop
astrobunny has joined #ruby
<ljarvis> TomyWork: set a boolean flag or use throw/catch
alcipir has joined #ruby
<ljarvis> I would probably separate the second loop into a new method and just use next
m3_del has quit [Ping timeout: 256 seconds]
krz has joined #ruby
<dreinull75> ok found it, thansk
<nemo_> which is the best book to start with algo and datastructures
workmad3 has quit [Ping timeout: 260 seconds]
astrobunny has quit [Ping timeout: 240 seconds]
<apeiros> TomyWork: there's a good chance that there's a way to write the code better so you don't have to resort to next in the first place
alcipir has quit [Ping timeout: 264 seconds]
<TomyWork> apeiros sorry, the outer loop isnt a loop, but an iterator where i need to pass false in this case
jordanloky has joined #ruby
<TomyWork> "next false" so to speak
<TomyWork> but i'll probably wrap that loop's body in a method and return false
davedev24 has quit [Ping timeout: 240 seconds]
tubuliferous_ has quit [Ping timeout: 240 seconds]
johnny56 has quit [Quit: WeeChat 1.3]
norc has joined #ruby
tedstriker has joined #ruby
johnny56 has joined #ruby
RegulationD has joined #ruby
joonty has joined #ruby
<apeiros> man, writing this git support tool proves a lot harder than I imagined.
<norc> Hey folks. Can I somehow give a capture group a name to reuse it in the same regex?
shredding has joined #ruby
sl33k has joined #ruby
Peg-leg has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
<norc> Ohh nevermind. Finally found it. \k :)
trosborn has joined #ruby
matcouto has quit [Read error: Connection reset by peer]
emilkarl has joined #ruby
DexterLB has joined #ruby
jordanloky has quit [Quit: Textual IRC Client: www.textualapp.com]
<adaedra> apeiros: make a hg support tool.
Rollabunna has quit [Remote host closed the connection]
elaptics` is now known as elaptics`away
ndrei has joined #ruby
<norc> Meh this is slightly disgusting. Is there a way to pre-define a capture group outside a regex?
stamina has joined #ruby
Fredrich010 has quit [Read error: Connection reset by peer]
Fredrich010 has joined #ruby
DefV has joined #ruby
symm- has joined #ruby
symm-_ has quit [Ping timeout: 252 seconds]
futilegames has left #ruby [#ruby]
vigintas has joined #ruby
Gues_____ has joined #ruby
jonnie has joined #ruby
vigintas has quit [Quit: vigintas]
<apeiros> adaedra: we don't use hg at work
pwnd_nfsw has quit [Remote host closed the connection]
nfk|laptop has quit [Ping timeout: 260 seconds]
blue_deref has quit [Quit: bbn]
crayfishx_ is now known as crayfishx
Rollabunna has joined #ruby
jonnie_ has joined #ruby
<adaedra> cd apeiros; hg up joke
jonnie has quit [Ping timeout: 272 seconds]
<apeiros> adaedra: make a PR to fix my joke detector
norc has left #ruby [#ruby]
norc has joined #ruby
vigintas has joined #ruby
<adaedra> :3
codecop has quit [Remote host closed the connection]
Ropeney has joined #ruby
dmolina has joined #ruby
nfk|laptop has joined #ruby
sl33k has left #ruby [#ruby]
mikecmpbll has joined #ruby
beauby has quit [Read error: Connection reset by peer]
stan has joined #ruby
lubarch has quit [Ping timeout: 265 seconds]
Gues_____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lubarch has joined #ruby
<yorickpeterse> morning
simi has joined #ruby
marr has joined #ruby
bronson has quit []
<norc> Is there a more elegant way to do this regexp? http://pastie.org/10508485
blackmesa has joined #ruby
<norc> (I want to define the pattern for each house number variant extra, so its easier to find and change if need be)
blizzy has quit [Read error: Connection timed out]
Rollabun_ has joined #ruby
Rollabunna has quit [Ping timeout: 264 seconds]
Xeago has quit [Remote host closed the connection]
<apeiros> norc: matching house number formats? aaaahahahahaha, good luck.
bruno- has joined #ruby
<apeiros> house numbers are seriously fucked up. even in my own tiny country which is otherwise heavily regulated.
bruno- is now known as Guest93503
Xeago has joined #ruby
astrobunny has joined #ruby
blizzy has joined #ruby
trautwein has quit [Read error: Connection reset by peer]
bonemind has joined #ruby
trautwein has joined #ruby
<norc> apeiros: It is actually specific to just the city we operate in. :)
blizzy has quit [Max SendQ exceeded]
<apeiros> there's plenty of cities with more people than my whole country :)
<norc> apeiros: I mean yeah, in reality there is a few more exceptions, but I was just wondering whether this way of compositing a regex is a good idea.
pwnd_nsfw has joined #ruby
<apeiros> norc: you can also compose regex. i.e. you don't have to use string parts.
beauby has joined #ruby
<apeiros> >> a = /foo/; b = /bar/; c = /#{a}|#{b}/ # works
<ruboto> apeiros # => /(?-mix:foo)|(?-mix:bar)/ (https://eval.in/456822)
<norc> Oh now that is neat. :)
<apeiros> that even preserves flags which can be different for the subregex.
<norc> Gets even better, and its not even christmas yet.
<apeiros> >> a = /foo/i; b = /bar/; c = /#{a}|#{b}/ # works
lubarch has quit [Quit: leaving]
<ruboto> apeiros # => /(?i-mx:foo)|(?-mix:bar)/ (https://eval.in/456828)
Xeago has quit [Remote host closed the connection]
sanjayu has quit [Ping timeout: 264 seconds]
<apeiros> /(?i-mx:foo) vs /(?-mix:foo) from before. the ?i-mx says "with flag i, without m and x"
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
Xeago has joined #ruby
blizzy has joined #ruby
blizzy has quit [Max SendQ exceeded]
<TomyWork> apeiros what's a git support tool?
<apeiros> TomyWork: a tool to support our git workflow
<TomyWork> ah
<TomyWork> so you're not using git-flow?
<apeiros> stuff like ensuring that each branch has an owner, no feature branch gets too old, no work is performed on pure merge branches etc.
<apeiros> no
<norc> apeiros: I am so amazed now. For such a long time I refused to use slightly larger regular expressions because of maintenance - being able to compose them like that makes them manageable it seems.
<apeiros> norc: for larger expressions, //x is also very helpful
<TomyWork> our team might soon(tm) be deciding on a workflow, so i'd be interested in yours :)
<apeiros> allows multiline regex and comments in them
<TomyWork> so far i only know git-flow and "meh, we'll just release master once in a while"
<apeiros> TomyWork: iirc we're relatively close to git-flow.
m3_del has joined #ruby
<norc> apeiros: Also a nice tip thanks. :)
<apeiros> TomyWork: we're still working on finding our workflow, but for the moment it's roughly like this:
<apeiros> TomyWork: we the following branch types: base, release, epic, sprint, feature, bug. I think base/epic/sprint might become a single type. we have a branch naming convention which is mostly PREFIX-TICKET-OWNER-DESCRIPTION.
CrazyEddy has quit [Remote host closed the connection]
<TomyWork> not PREFIX/....?
<apeiros> prefix identifies the branch type, single letter. e.g. f- for feature. ticket is the redmine ticket number. owner is the initials of the owner. e.g. SR for me. description is just a free form descriptive text. so a branch might be f-1234-SR-new-mail-texts
rodfersou has joined #ruby
m3_del has quit [Ping timeout: 265 seconds]
ndrei has quit [Ping timeout: 260 seconds]
trautwein has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> we create one or more new acceptance branch from a base branch (usually master). we merge all features which are ready to be tested and release that to our acceptance env. an accepted feature will go into the epic branch the feature belongs to and the feature branch gets deleted.
ibouvousaime has joined #ruby
<apeiros> once the deadline for an epic hits, epic goes into a release branch, gets staged, tested and then merged into master
Pumukel has quit [Ping timeout: 240 seconds]
<apeiros> I'm pretty sure I left out tons, but that's about the outline of how we organized our workflow.
Xeago has quit [Remote host closed the connection]
<apeiros> one thing I'd love to find is a way to archive tags. we only tag versions (releases), and we already have >500.
Pupp3tm4_ has joined #ruby
colegatron has joined #ruby
Feyn has quit [Quit: Leaving]
sepp2k has joined #ruby
Xeago has joined #ruby
workmad3 has joined #ruby
Pupp3tm4st3r has quit [Ping timeout: 250 seconds]
<colegatron> sorry, I am not used to ruby, only treaking vagrantfile. can someone tell me (or point me to any doc) the difference between variables 'aws' and 'override' in this piece of code: https://paste.debian.net/318131/ ?
futilegames has joined #ruby
Pumukel has joined #ruby
Xeago has quit [Remote host closed the connection]
<apeiros> colegatron: they're both local variables. they're arguments the block passed to the `provider` method takes.
jgt has joined #ruby
Xeago has joined #ruby
pwnd_nsfw has quit [Remote host closed the connection]
<colegatron> apeiros: mmm ok, I thought override was some kind of reserved word
<apeiros> no. and if it was, it could not occur there.
vdamewood has joined #ruby
trosborn has quit [Quit: trosborn]
Coldblackice has quit [Ping timeout: 240 seconds]
Rickmasta has joined #ruby
<colegatron> apeiros: ok, makes sense. I think I will need to find time for a very-quick-tutorial-and-overview of ruby. but I am not going to develop on it, only to understand what I read. any advice about a light-but-complete tutorial?
<apeiros> not really. but I think understanding ruby (and most languages actually) without having written it is quite hard
pwnd_nsfw has joined #ruby
foooobear has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
gregoriokusowski has joined #ruby
favadi has joined #ruby
alcipir has joined #ruby
spider-mario has joined #ruby
ajb is now known as ajb-
ajb- is now known as ajb
alcipir has quit [Ping timeout: 252 seconds]
al2o3-cr has joined #ruby
ajb is now known as ajb-
ajb- is now known as ajb
ajb is now known as ZucchiniZa
ZucchiniZa is now known as ajb
nfk|laptop has quit [Quit: yawn]
zipace has quit [Changing host]
zipace has joined #ruby
ldnunes has joined #ruby
Igorshp has joined #ruby
dionysus69 has joined #ruby
Xeago has quit [Remote host closed the connection]
but3k4 has joined #ruby
<nemo_> nemo
<adaedra> ah, seems we found nemo.
zapata has quit [Ping timeout: 240 seconds]
<schaary> hey - I have two strings: a = "abcdefg" and b = "1234" and I'm looking for a effective way to produce c = "abc1234" - so I want to replace the suffix of a with b. I know, that b is always shorter than a. Ideas?
jerry_tao has quit [Quit: jerry_tao]
AxonetBE has joined #ruby
<apeiros> schaary: and what's the rule for the offset in a to start with b?
<apeiros> so that the string remains at the same length?
<AxonetBE> what is the best solution to save hardware information of our users and make queries on this info?
<AxonetBE> inserting this info as a string object in a mysql column seems not a good idea for me as we can't easy query this values?
trautwein has joined #ruby
Xeago has joined #ruby
<schaary> apeiros: the end of b "starts" at the end of a - when both string have the same length, then c = b
<apeiros> ok, still not sure I understand this right, but assuming I do:
<apeiros> >> a = "abcdefg" and b = "1234"; a[-b.length..-1] = b; a
<ruboto> apeiros # => "abc1234" (https://eval.in/456858)
platzhirsch has joined #ruby
hfp_work has quit [Ping timeout: 252 seconds]
skinux has joined #ruby
alotofnoodles has joined #ruby
<skinux> I'm having trouble installing RoR on Windows
<skinux> Unable to download data from https://rubygems.org/ - SSL_connect retur
<skinux> ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
<canton7> that's an issue with gem, not RoR
<canton7> if you go googling it, there are tons of results
<schaary> apeiros: that's exactly what I am looking for - thx!
<skinux> Okay, well how do I fix it?
Xeago has quit [Ping timeout: 240 seconds]
hfp_work has joined #ruby
weihan has joined #ruby
alotofnoodles has left #ruby [#ruby]
kraljev11 has quit [Quit: kraljev11]
n008f4g_ has quit [Ping timeout: 250 seconds]
alotofno_ has joined #ruby
zapata has joined #ruby
DoubleMalt has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alcipir has joined #ruby
FernandoBasso has joined #ruby
yashinbasement has joined #ruby
jgt has quit [Read error: Connection reset by peer]
d34th4ck3r has quit [Quit: zzz]
bonhoeffer has joined #ruby
codecop has joined #ruby
jgt has joined #ruby
trautwein has quit [Quit: Textual IRC Client: www.textualapp.com]
radgeRayden has quit [Ping timeout: 244 seconds]
hays_ has joined #ruby
zotherstupidguy has joined #ruby
trautwein has joined #ruby
bonhoeffer has quit [Client Quit]
alcipir has quit [Ping timeout: 250 seconds]
TPBallbag has joined #ruby
tubuliferous_ has joined #ruby
TPBallbag is now known as Ballkenende
symm-_ has joined #ruby
symm- has quit [Ping timeout: 252 seconds]
Ballkenende is now known as TPBallbag
hays has quit [Ping timeout: 244 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yardenbar has quit [Ping timeout: 255 seconds]
unshadow has joined #ruby
<unshadow> So, I made this: https://gist.github.com/bararchy/2662376a0a0858362f61 to benchmark hash functions, it seems HMAC is much better (time wise) then md5 and sha256 with long strings (8,000 char length and up), do you guys know of a better hash function then HMAC ?
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
unclouded has joined #ruby
<adaedra> Wasn't md5 supposed to be in the bottom of the trash bin
m3_del has joined #ruby
Rollabun_ has quit [Remote host closed the connection]
<unshadow> adaedra: it seems that for short strings it does a nice job (again, time wise, not security)
<napcae> its still ok for creating hashes
gregf__ has quit [Quit: leaving]
alotofno_ has quit [Quit: Textual IRC Client: www.textualapp.com]
beauby has quit [Ping timeout: 240 seconds]
arup_r has quit [Ping timeout: 244 seconds]
TPBallbag has quit [Remote host closed the connection]
ElFerna has joined #ruby
RegulationD has joined #ruby
TPBallbag has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
d34th4ck3r has joined #ruby
m3_del has quit [Ping timeout: 256 seconds]
yardenbar has joined #ruby
<norc> >> (-> {}).is_a? Proc
<ruboto> norc # => true (https://eval.in/456886)
jonnie_ has quit [Ping timeout: 264 seconds]
<norc> Why is a lambda a proc? I mean there are some important subtle differences to it.
d34th4ck3r has quit [Client Quit]
ElFerna has quit [Quit: Textual IRC Client: www.textualapp.com]
RegulationD has quit [Ping timeout: 244 seconds]
<norc> Or I guess this is just me being so confused how and why "return" behaves so differently in a lambda than in a proc or block.
favadi has quit [Quit: Textual IRC Client: www.textualapp.com]
dhjondoh has joined #ruby
jonnie has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Soda has quit [Remote host closed the connection]
JammyHammy has quit [Read error: Connection reset by peer]
zotherstupidguy has quit [Ping timeout: 265 seconds]
arup_r has joined #ruby
joonty has quit [Quit: joonty]
dionysus69 has quit [Ping timeout: 240 seconds]
gregf_ has joined #ruby
JammyHammy has joined #ruby
<workmad3> >> (->{}).lambda?
<ruboto> workmad3 # => true (https://eval.in/456892)
joonty has joined #ruby
bweston92 has joined #ruby
<skinux> How do I fix the Gem installation error about SSL?
skinux has quit [Quit: Leaving]
millerti has joined #ruby
<norc> workmad3: Oh I know. It just gave me the impression that if a lambda is an object of Proc, that the behavior is the same.
bryanray has joined #ruby
tomaz_b has quit [Quit: Leaving]
krz has quit [Quit: WeeChat 1.2]
jas02 has joined #ruby
unsymbol has joined #ruby
gregf_ has quit [Quit: Lost terminal]
sdothum has joined #ruby
Ropeney has joined #ruby
ferr has joined #ruby
<workmad3> norc: yeah, it's not the best way to have proc/lambda differences IMO... but it does lend more to the idea that you should focus on behaviour rather than whether an object is of class X or Y in ruby, IMO :)
TPBallbag has quit [Remote host closed the connection]
<norc> workmad3: Fair enough. :)
ferr has quit [Client Quit]
chipotle has quit [Quit: cheerio]
alcipir has joined #ruby
zotherstupidguy has joined #ruby
dionysus69 has joined #ruby
alcipir has quit [Ping timeout: 250 seconds]
trautwein has quit [Quit: Textual IRC Client: www.textualapp.com]
trautwein has joined #ruby
JammyHammy has quit [Read error: Connection reset by peer]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
p0wn3d has joined #ruby
gregf_ has joined #ruby
aspiers has joined #ruby
Xeago has joined #ruby
JammyHammy has joined #ruby
subscope has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
lkba has quit [Ping timeout: 256 seconds]
TPBallbag has joined #ruby
TPBallbag has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 252 seconds]
TPBallbag has joined #ruby
Xeago has joined #ruby
Icey has joined #ruby
syath has joined #ruby
alcipir has joined #ruby
Soda has joined #ruby
moss has quit [Ping timeout: 240 seconds]
<flughafen> ahhoy
skade has joined #ruby
shredding has quit [Quit: shredding]
alcipir has quit [Ping timeout: 260 seconds]
shredding has joined #ruby
Cantaberry has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.2]
hmsimha has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
alcipir has joined #ruby
Pupp3tm4_ has quit [Remote host closed the connection]
Rinzlit has joined #ruby
_5moufl has quit [Ping timeout: 240 seconds]
m3_del has joined #ruby
_5moufl has joined #ruby
vigintas has quit [Ping timeout: 244 seconds]
Rinzlit_ has quit [Ping timeout: 246 seconds]
wprice has joined #ruby
platzhirsch has quit [Remote host closed the connection]
vdamewood has quit [Quit: Life beckons.]
Fredrich010 has quit [Read error: Connection reset by peer]
chrislotix has joined #ruby
Fredrich010 has joined #ruby
m3_del has quit [Ping timeout: 240 seconds]
adamholt has joined #ruby
moss has joined #ruby
Guest15 has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
tkuchiki has joined #ruby
rshetty has quit [Remote host closed the connection]
jgt has quit [Ping timeout: 252 seconds]
Fredrich010 has quit [Read error: No route to host]
pathrocle has joined #ruby
Fredrich010 has joined #ruby
tk__ has joined #ruby
rshetty has joined #ruby
Guest15 has quit [Max SendQ exceeded]
gagrio_ has joined #ruby
gagrio_ has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 244 seconds]
yqt has joined #ruby
TPBallbag has quit [Ping timeout: 250 seconds]
nemo_ has quit [Remote host closed the connection]
Pupp3tm4st3r has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
TPBallbag has joined #ruby
dionysus69 has joined #ruby
Cantaberry has quit [Ping timeout: 260 seconds]
shredding has quit [Ping timeout: 272 seconds]
workmad3 has quit [Quit: Lost terminal]
yfeldblum has quit [Ping timeout: 240 seconds]
Cantaberry has joined #ruby
atomical has joined #ruby
Cantaberry has quit [Client Quit]
emilkarl has quit [Quit: emilkarl]
Macaveli has joined #ruby
synthroid has joined #ruby
civil_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
ndrei has quit [Read error: Connection reset by peer]
gusTester has joined #ruby
<colegatron> apeiros: tnx. sorry for the delay ;-) I'll read a book when I've more time. tnx
colegatron has quit [Quit: Page closed]
TPBallbag has quit [Remote host closed the connection]
vigintas has joined #ruby
Fredrich010 has quit [Read error: Connection reset by peer]
Fredrich010 has joined #ruby
nfk|laptop has joined #ruby
vigintas1 has joined #ruby
terlar has joined #ruby
vigintas has quit [Ping timeout: 246 seconds]
vigintas1 is now known as vigintas
benlovell has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Remote host closed the connection]
karapetyan has joined #ruby
closer has quit [Ping timeout: 272 seconds]
closer has joined #ruby
brt has joined #ruby
<norc> I have a string and want to split it the first time a non numerical character is encountered if it starts with numerical characters, or the first time a numerical character is encountered if it starts with non-numerical characters.
timmow has quit [Quit: ZNC - http://znc.in]
<norc> Aside from simply testing against two regular expressions and then splitting, I cant find an elegant one liner for this.
twe4ked has quit [Ping timeout: 240 seconds]
arup_r is now known as suzuki
pathrocle has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
<apeiros> norc: if you always want 2 strings as a result, use .match(regex).captures
Igorshp has quit [Remote host closed the connection]
twe4ked has joined #ruby
<apeiros> though, actually, might need a .compact too if you want to keep the regex simple :)
big|bad|wolf has joined #ruby
suzuki is now known as arup_r
norc has quit [Ping timeout: 246 seconds]
rbennacer has joined #ruby
sdwrage has joined #ruby
terlar has quit [Quit: WeeChat 1.3]
terlar has joined #ruby
blackmesa has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
braincrash has quit [Quit: bye bye]
dionysus69 has joined #ruby
canton7 has quit [Quit: ZNC - http://znc.in]
benlovell has joined #ruby
sgambino has joined #ruby
jgt has joined #ruby
astrobunny has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 256 seconds]
prestorium has joined #ruby
freerobby has joined #ruby
dmitch has joined #ruby
astrobunny has joined #ruby
Xeago has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 255 seconds]
rshetty has quit [Ping timeout: 256 seconds]
s00pcan has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
andikr has quit [Remote host closed the connection]
braincrash has joined #ruby
canton7 has joined #ruby
diegoaguilar has joined #ruby
s00pcan has joined #ruby
astrobunny has quit [Ping timeout: 268 seconds]
lxsameer_ has quit [Quit: Leaving]
nfk|laptop has quit [Quit: yawn]
joonty has quit [Quit: joonty]
FernandoBasso1 has joined #ruby
gregf_ has quit [Quit: Lost terminal]
mag42c has joined #ruby
FernandoBasso has quit [Ping timeout: 255 seconds]
houhoulis has joined #ruby
abyss has quit [Ping timeout: 250 seconds]
zotherstupidguy has joined #ruby
cdg has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chrislotix has quit []
m3_del has joined #ruby
jordanm has joined #ruby
big|bad|wolf has joined #ruby
dhjondoh has joined #ruby
zotherstupidguy has quit [Client Quit]
RegulationD has joined #ruby
shinnya has joined #ruby
zotherstupidguy has joined #ruby
benlovell has joined #ruby
m3_del has quit [Ping timeout: 256 seconds]
ruurd has quit [Quit: ZZZzzz…]
SCHAAP137 has joined #ruby
niftylettuce has quit [Quit: Connection closed for inactivity]
freerobby has quit [Quit: Leaving.]
e1senhorn has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
pathrocle has joined #ruby
diegoaguilar has quit [Ping timeout: 272 seconds]
astrobunny has joined #ruby
dhjondoh has quit [Remote host closed the connection]
tkuchiki has joined #ruby
allcentury has quit [Ping timeout: 268 seconds]
timonv has joined #ruby
SOLDIERz has joined #ruby
malconis has joined #ruby
rwilcox has joined #ruby
joonty has joined #ruby
norc has joined #ruby
<norc> Ok. So ever I figured out how neat regex can be, I also start to figure out how little practice I have
Igorshp has joined #ruby
<norc> http://pastie.org/10508863 - Can someone tell me why this fails to match the second example?
dhjondoh has joined #ruby
djcp has joined #ruby
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rwilcox has quit [Client Quit]
ruurd has joined #ruby
<norc> It seems like some part consumes the end of the string before \z is reached, but I cant figure out why
trautwein has joined #ruby
sankaber has joined #ruby
yashinbasement has quit [Ping timeout: 240 seconds]
gusTester has left #ruby [#ruby]
astrobunny has quit [Remote host closed the connection]
RegulationD has joined #ruby
Igorshp has quit [Remote host closed the connection]
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<norc> Ok yeah nevermind. This is not what backreferences are. :-)
mary5030 has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
mary5030_ has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
inteq has quit [Remote host closed the connection]
sanjayu has joined #ruby
TPBallbag has joined #ruby
tkuchiki has quit [Remote host closed the connection]
astrobunny has joined #ruby
<jhass> norc: yup, backreference are not for reusage of a pattern but for expecting an already happened match to appear again. Check http://regexcrossword.com/ for some practice ;)
jonnie has quit [Ping timeout: 250 seconds]
rshetty has joined #ruby
tlarevo has joined #ruby
tlarevo has quit [Remote host closed the connection]
AxonetBE has quit [Quit: AxonetBE]
rshetty has quit [Read error: Connection reset by peer]
rshetty_ has joined #ruby
jamto11 has joined #ruby
Xeago has quit [Remote host closed the connection]
TPBallbag has quit [Ping timeout: 250 seconds]
ruurd has quit [Quit: ZZZzzz…]
Igorshp has joined #ruby
ruby-lang198 has joined #ruby
failshell has joined #ruby
rshetty_ has quit [Read error: Connection reset by peer]
<norc> jhass: Heh. It is extremely interesting that you can use the backreference inside the same regex though.
<norc> I mean I can see this being handy another way
cwong_on_irc1 has quit [Quit: Leaving.]
rbennacer has quit []
rshetty has joined #ruby
crime has joined #ruby
<norc> I shall take a look at that website tonight thanks. :)
alcipir has quit [Ping timeout: 272 seconds]
diegoaguilar has joined #ruby
pagios has joined #ruby
<crime> >> (1..Float::INFINITY).lazy.select{:even?}.first(3)
<ruboto> crime # => [1, 2, 3] (https://eval.in/456995)
<pagios> hello community, http://pastie.org/10508903 can anyone help?
alcipir has joined #ruby
tkuchiki has joined #ruby
FooTek has joined #ruby
<crime> >> (1..Float::INFINITY).lazy.select{|c| c.even?}.first(3)
<ruboto> crime # => [2, 4, 6] (https://eval.in/456998)
Guest93503 has quit [Ping timeout: 240 seconds]
<jhass> pagios: gem install sinatra-websocket ?
jamto11 has quit [Remote host closed the connection]
sankaber has quit [Remote host closed the connection]
<pagios> yep it worked thansk
<jhass> crime: the shortcut is .select(&:even?)
<crime> AH
<crime> i was literally just about to ask you
sankaber has joined #ruby
<crime> >> (1..Float::INFINITY).lazy.select(&:even?).first(3)
<ruboto> crime # => [2, 4, 6] (https://eval.in/457002)
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crime> can I use that &: syntax anywhere a block is expected?
astrobunny has quit [Remote host closed the connection]
<jhass> yes, note that the syntax part is &, :even? is just a symbol
rbennacer has joined #ruby
<crime> yeah I know, & is alt syntax for a hash?
dionysus69 has quit [Read error: Connection reset by peer]
<crime> or is it trickier than that?
<jhass> huh? no
<jhass> hashes have nothing to do with this
<crime> block
<crime> i mean block
<crime> havent had my coffee yet
<jhass> not quite no
<jhass> & passes a proc as a block
diegoaguilar has quit [Ping timeout: 240 seconds]
<crime> ah
<jhass> >> [1, 2, 3].select(&proc {|n| n.even? })
<ruboto> jhass # => [2] (https://eval.in/457003)
<jhass> it has the side effect of calling to_proc on its argument first
<jhass> Proc#to_proc just returns self
<jhass> but Symbol#to_proc returns a handy proc for us
<crime> so does it have to be a symbol or can it be a variable too? anything that has .to_proc should work then, right?
<crime> an @ for example
<jhass> yes
<jhass> >> @foo = :even?; [1, 2, 3].select(&@foo)
<crime> ruby really *does* love me
<ruboto> jhass # => [2] (https://eval.in/457008)
<crime> that is rad
dionysus69 has joined #ruby
freerobby has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
dionysus69 has quit [Remote host closed the connection]
alcipir has quit [Ping timeout: 260 seconds]
ruby-lang198 has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
shredding has joined #ruby
allcentury has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ldnunes_ has joined #ruby
toy has quit [Quit: Leaving...]
alcipir has joined #ruby
blaxter has quit [Quit: foo]
brt has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
tomaz_b has joined #ruby
ldnunes has quit [Ping timeout: 265 seconds]
dopamean_ has quit [Ping timeout: 260 seconds]
alcipir has quit [Ping timeout: 272 seconds]
sanjayu has quit [Quit: Leaving]
sanjayu has joined #ruby
Asher has joined #ruby
prateekp has joined #ruby
<prateekp> /msg NickServ identify rajnigandha18
<jhass> prateekp: new password day \o/
dionysus69 has quit [Ping timeout: 240 seconds]
failshell has quit [Remote host closed the connection]
<prateekp> does the gem total downloads the correct metric
<prateekp> because when i push a new version, the downloads increases each time
prateekp has quit [Disconnected by services]
prateekp_ has joined #ruby
<canton7> pragmatism, protip: set your irc client to authenticate using sasl, so you don't have to type the nickserv identify by hand (and risk sending everyone your password ;)
<prateekp_> hello
diegoaguilar has joined #ruby
<canton7> prateekp_, ^ rather
<prateekp_> hmm yeah
<prateekp_> sorry for that mistake
<jhass> prateekp_: you did realize you pasted your password to the channel?
<prateekp_> hmm the password was bit wrong, so its k
<prateekp_> ok*
Xeago has joined #ruby
<jhass> let me guess, swap n & j?
<prateekp_> haha
<prateekp_> not exactly
Chau has joined #ruby
prateekp has joined #ruby
prateekp was kicked from #ruby by ChanServ [Banned: Ban evasion]
<prateekp_> :)
<prateekp_> anyways
<prateekp_> it will pass out in the logs
<yorickpeterse> I'd still change your password
<jhass> seriously change it
<prateekp_> how to change it
<prateekp_> ?
<prateekp_> i got it
<Pupp3tm4st3r> hi
subscope has joined #ruby
dionysus69 has joined #ruby
<Pupp3tm4st3r> maybe someone can help me
dionysus69 has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
<Pupp3tm4st3r> for Icinga2 I downloaded the following ruby script: https://github.com/hggh/phantomjs-nagios/blob/master/check_http_load_time.rb
yorickpeterse1 has joined #ruby
yorickpeterse has quit [Read error: Connection reset by peer]
yorickpeterse1 has quit [Changing host]
yorickpeterse1 has joined #ruby
dionysus69 has joined #ruby
<Pupp3tm4st3r> /usr/local/lib/ruby/2.2.0/time.rb:596:in `xmlschema': invalid date: nil (ArgumentError)
<Pupp3tm4st3r> from /usr/lib/nagios/plugins/check_http_load_time.rb:172:in `<main>'
<Pupp3tm4st3r> when I want to use it I get the following error
<Pupp3tm4st3r> as above...
yorickpeterse1 is now known as yorickpeterse
<Pupp3tm4st3r> in the original script its 171 not 172
whippythellama has joined #ruby
subscope has quit [Client Quit]
<Pupp3tm4st3r> maybe its obvious to see for an experienced ruby "user"
<jhass> so hash['log']['pages'][0]['endedDateTime'] is nil for you
prateekp_ has quit [Quit: Page closed]
<Pupp3tm4st3r> correct
subscope has joined #ruby
prateekp has joined #ruby
<pagios> http://pastie.org/10508953 <--- what could this be related to? i am querying sinatra
timonv has quit [Ping timeout: 268 seconds]
alcipir has joined #ruby
<jhass> Pupp3tm4st3r: contact the author of the script, you have a case the author didn't expect/handle. Nothing we can do about
<Pupp3tm4st3r> jhass: I already did that - no reaction
lkba has joined #ruby
treehug88 has joined #ruby
<Pupp3tm4st3r> I had the hope someone here would say: aaah thats obviously this or that
<Pupp3tm4st3r> ;)
chopin has joined #ruby
nemo_ has joined #ruby
<jhass> well, the obvious part is that hash['log']['pages'][0]['endedDateTime'] is nil
<jhass> run it with -v3 for some debug output
Rickmasta has joined #ruby
<prateekp> jhass: govt_official helped me save my password
<prateekp> :)
<prateekp> thanks govt
<prateekp> :)
<Pupp3tm4st3r> unfortunately verbosity doesn´t give any useful hints.. (just shows the used script with parameters and then again the error)
<Pupp3tm4st3r> maybe the author will read my posted issue someday...
everbot has quit [Ping timeout: 250 seconds]
<Pupp3tm4st3r> but thanks :)
<jhass> prateekp: make sure to also change all other accounts you used the same password for
CloCkWeRX has left #ruby [#ruby]
<prateekp> ok jhass
<jhass> and yeah, get a proper client and do SASL auth so this can't happen again ;)
chopin has quit [Ping timeout: 240 seconds]
umgrosscol has joined #ruby
<prateekp> hmm right
akkad has quit [Excess Flood]
<yorickpeterse> good ol' hunter2
rshetty has quit [Remote host closed the connection]
dravine_ has joined #ruby
baroquebobcat has joined #ruby
prateekp has quit [Quit: Page closed]
dopamean_ has joined #ruby
platzhirsch has joined #ruby
dravine has quit [Ping timeout: 268 seconds]
dravine_ is now known as dravine
akkad has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
<crime> i wish the webchat would regex that sort of thing in the input area
dionysus69 has quit [Quit: dionysus69]
<yorickpeterse> well it does
<yorickpeterse> it just shows as ******* for others
<yorickpeterse> :>
mary5030_ has quit [Remote host closed the connection]
centrx has joined #ruby
sanjayu has quit [Ping timeout: 246 seconds]
rodfersou is now known as rodfersou|lunch
mary5030 has joined #ruby
stardiviner has quit [Ping timeout: 260 seconds]
chopin has joined #ruby
FernandoBasso1 has quit [Quit: Leaving]
nfk|laptop has joined #ruby
caliostro has joined #ruby
lotherk has quit [Remote host closed the connection]
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has quit [Ping timeout: 240 seconds]
chopin has quit [Ping timeout: 252 seconds]
tubuliferous_ has quit [Ping timeout: 260 seconds]
nemo_ has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
dmitch has joined #ruby
nertzy has joined #ruby
sanjayu has joined #ruby
govg has joined #ruby
Igorshp has quit [Remote host closed the connection]
dhjondoh has quit [Quit: dhjondoh]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt has quit [Ping timeout: 252 seconds]
gregf has joined #ruby
last_staff has quit [Quit: last_staff]
arup_r has quit [Quit: Leaving]
lnx has joined #ruby
Igorshp has joined #ruby
mordocai has joined #ruby
tubuliferous_ has joined #ruby
forgot has quit [Remote host closed the connection]
unshadow has quit [Quit: leaving]
dopie has quit [Ping timeout: 256 seconds]
DarkBushido has joined #ruby
benlovell has quit [Ping timeout: 250 seconds]
bangir has joined #ruby
solocshaw has joined #ruby
fschuindt has joined #ruby
<FooTek> good morning everyone ☺
<fschuindt> good morning
benlovell has joined #ruby
bruno- has joined #ruby
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
bruno- is now known as Guest86387
Motoservo has joined #ruby
<fschuindt> there's a clever way to do it?: expected_structure[expected_structure.index("BUDGET_YEARS")] = project_budget_years (I want to replace the element with value "BUDGET_YEARS" by the project_budget_years value)
AccordLT has quit []
baroquebobcat has quit [Quit: baroquebobcat]
mag42c has quit [Quit: mag42c]
ruurd has quit [Quit: ZZZzzz…]
dfinninger has joined #ruby
tomaz_b has quit [Quit: Leaving]
alcipir has quit [Ping timeout: 252 seconds]
<jhass> don't see anything beyond using another datastructure
mag42c has joined #ruby
tk__ has quit [Quit: ばいばい]
AccordLTN has joined #ruby
Motoservo has quit [Ping timeout: 268 seconds]
alexdunn1 has joined #ruby
nemo_ has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
nemo_ has quit [Remote host closed the connection]
darkf_ has joined #ruby
Jardayn has joined #ruby
Xeago has joined #ruby
alcipir has joined #ruby
kies^ has joined #ruby
darkf has quit [Ping timeout: 240 seconds]
I has joined #ruby
Channel6 has joined #ruby
I is now known as Guest49770
pdoherty has joined #ruby
jonnie has joined #ruby
tno has joined #ruby
dionysus69 has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Fredrich010 has quit [Read error: Connection reset by peer]
weemsledeux has joined #ruby
momomomomo has joined #ruby
Fredrich010 has joined #ruby
atomical has joined #ruby
segfalt has joined #ruby
atomical has quit [Client Quit]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
marens_ is now known as marens
TPBallbag has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
baroquebobcat has joined #ruby
Guest49770 has quit [Quit: This computer has gone to sleep]
psy_ has joined #ruby
psy_ has quit [Max SendQ exceeded]
jgt has joined #ruby
jayforsythe has joined #ruby
psy_ has joined #ruby
<jayforsythe> Question: Are blocks objects?
Pupeno has quit [Remote host closed the connection]
ruurd has joined #ruby
ta has quit [Remote host closed the connection]
rippa has joined #ruby
jayforsythe has quit [Client Quit]
Pupeno has joined #ruby
skweek has quit [Ping timeout: 268 seconds]
pathrocle has quit [Remote host closed the connection]
TPBallbag has quit [Ping timeout: 272 seconds]
Rickmast_ has joined #ruby
inteq has joined #ruby
<apeiros> hm, little patience…
hiyosi has joined #ruby
kerunaru has quit [Quit: Textual IRC Client: www.textualapp.com]
failshell has joined #ruby
Rickmasta has quit [Ping timeout: 250 seconds]
darkf_ is now known as darkf
houhoulis has quit [Remote host closed the connection]
malconis has quit [Read error: Connection reset by peer]
<KrzaQ> Can I force Array's zip to always take the size of the bigger array?
tagrudev has quit [Remote host closed the connection]
malconis has joined #ruby
gregf_ has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
<apeiros> KrzaQ: no
roxtrongo has joined #ruby
aganov has quit [Read error: Connection reset by peer]
<KrzaQ> hm
<KrzaQ> very well
AxonetBE has joined #ruby
<KrzaQ> Is there a better way to resize an array other than pushing nils into it in a loop?
<apeiros> ary.concat(Array.new(padding_size))
<apeiros> alternatively: ary.fill. sadly it's a bit cumbersome to use for padding.
<eam> surely ary[size]=nil is the fastest?
momomomomo has quit [Quit: momomomomo]
<KrzaQ> is it size or size-1
<caliostro> hi there!
<apeiros> eam: oh, nice. but yeah, size-1. and not to forget to check whether it's actually smaller.
kimegede has quit [Read error: Connection reset by peer]
FooTek has quit [Ping timeout: 265 seconds]
<apeiros> that's almost certainly the fastest.
slawrence00 has joined #ruby
<apeiros> so: `ary[size-1] = nil if ary.size < size`
<adaedra> a simple ||= wouldn't work?
<apeiros> gotta change my Array#pad now :D
<apeiros> oh, actually that deals with non-nil padding too
baweaver has joined #ruby
<adaedra> wait, wouldn't work if ary[size-1] would be false
<jhass> adaedra: well, you'd figure out the smaller first
Rinzlit_ has joined #ruby
ef__ has joined #ruby
<jhass> [a1, a2].min_by(&:size)[[a1.size, a2.size].max - 1] = nil unless a1.size == a2.size
AxonetBE has quit [Quit: AxonetBE]
blaxter has joined #ruby
<apeiros> eam: ary[size-1] was ~1.6x faster to pad an array from 3 to 1000 elements for me.
timonv has joined #ruby
<eam> nice
s2013 has joined #ruby
eminencehc has joined #ruby
dfinninger has quit [Remote host closed the connection]
chouhoulis has joined #ruby
Rinzlit has quit [Ping timeout: 255 seconds]
mary5030 has joined #ruby
<apeiros> and ~25.4x faster than padding_size.times { ary << nil }
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
weemsledeux has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
weemsledeux has joined #ruby
failshell has quit []
rdk has joined #ruby
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
dfinninger has joined #ruby
skade has joined #ruby
blaxter has quit [Ping timeout: 244 seconds]
pathrocle has joined #ruby
chrissonar has quit [Remote host closed the connection]
rdk has left #ruby [#ruby]
davedev24 has joined #ruby
davedev24 has quit [Client Quit]
arup_r has joined #ruby
mrgrieves has joined #ruby
workmad3 has joined #ruby
<mrgrieves> hi, could someone provide some advice on how to make max to pick 11 instead of 7 here http://pastebin.com/HUzGqfDv
<ruboto> mrgrieves, as I told you already, please use https://gist.github.com
<adaedra> ?botsnack
<ruboto> nomnomnomnom
blueOxigen has joined #ruby
FooTek has joined #ruby
weihan has quit [Ping timeout: 244 seconds]
bluOxigen has quit [Ping timeout: 260 seconds]
ruurd has joined #ruby
benlovel1 has joined #ruby
roxtrongo has quit [Remote host closed the connection]
swgillespie has joined #ruby
neohunter has joined #ruby
<jhass> mrgrieves: .max_by(&:size) ?
<apeiros> sounds more like they want natural sorting
Rickmast_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
FooTek has quit [Ping timeout: 255 seconds]
<apeiros> which - again - reminds me that I still have not released my sorting gem with natural sorting included.
yqt has quit [Ping timeout: 256 seconds]
ef__ has quit [Remote host closed the connection]
<jhass> upcoming world record attempt: listing the most items apeiros hasn't released yet
<apeiros> ah right, I remember why. I still don't know how I want to set up a generic API for transliteration.
<adaedra> jhass: :')
<apeiros> jhass: does "updated" count against "released"?
<apeiros> because I did release the sorted gem.
<mrgrieves> jhass: that won't do the trick if I have 13 and 12 where I want 13 to be max
dorei has joined #ruby
<apeiros> oh, actually "sorting"
<jhass> so natural sorting indeed
TPBallbag has joined #ruby
<jhass> mrgrieves: ^ got a term to google there
roxtrongo has joined #ruby
<apeiros> mrgrieves: I think there are gems which implement natural sorting.
pu22l3r has joined #ruby
shinenelson has quit [Quit: Connection closed for inactivity]
<mrgrieves> thanks guys let me take a look
<apeiros> ?guys mrgrieves
<ruboto> mrgrieves, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
baroquebobcat has quit [Quit: baroquebobcat]
benlovel1 has quit [Quit: leaving]
DoubleMalt has quit [Remote host closed the connection]
towski_ has joined #ruby
bronson has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
blaxter has joined #ruby
baweaver has quit [Remote host closed the connection]
Renich has joined #ruby
towski_ has quit [Remote host closed the connection]
psy_ has quit [Ping timeout: 250 seconds]
malconis has quit [Read error: Connection reset by peer]
malconis_ has joined #ruby
dravine_ has joined #ruby
dravine has quit [Ping timeout: 240 seconds]
dravine_ is now known as dravine
norc has quit [Ping timeout: 246 seconds]
blaxter has quit [Ping timeout: 240 seconds]
jas02 has quit [Quit: jas02]
synthroid has quit [Remote host closed the connection]
aufi has quit [Quit: Konversation terminated!]
cwong_on_irc has joined #ruby
rodfersou|lunch is now known as rodfersou
rehat_ has joined #ruby
aspiers has quit [Ping timeout: 250 seconds]
willardg has joined #ruby
danieli has joined #ruby
agentmee1kat has quit [Quit: Lost terminal]
stannard has joined #ruby
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kaleido has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
lubarch has joined #ruby
tubuliferous_ has quit [Ping timeout: 256 seconds]
I has joined #ruby
I is now known as Guest7725
p1k has quit [Ping timeout: 272 seconds]
diegoaguilar has quit [Ping timeout: 256 seconds]
bricker has joined #ruby
northfurr has joined #ruby
DoubleMalt has joined #ruby
dfinninger has quit [Remote host closed the connection]
FernandoBasso has joined #ruby
roxtrongo has quit [Remote host closed the connection]
Zai00 has joined #ruby
krazyj has joined #ruby
skweek has joined #ruby
Motoservo has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
varunwachaspati has joined #ruby
pdoherty has quit [Ping timeout: 268 seconds]
tkuchiki has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
northfurr has quit [Quit: northfurr]
blaxter has joined #ruby
karapetyan has joined #ruby
lkba has joined #ruby
popsikle has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
dfinninger has joined #ruby
TheNet has joined #ruby
blaxter has quit [Ping timeout: 268 seconds]
[Butch] has joined #ruby
diegoaguilar has joined #ruby
<TheNet> does anyone know if open-uri verifies ssl certs by default?
devoldmx has joined #ruby
beauby has joined #ruby
atomical has joined #ruby
spcmastertim has joined #ruby
^mg^ is now known as mg^
futilegames has quit [Quit: futilegames]
matp has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Remote host closed the connection]
T1loc has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
mrtomme has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
synthroid has joined #ruby
mrtomme has joined #ruby
swgillespie has joined #ruby
yqt has joined #ruby
Voker57 has joined #ruby
jpfuentes2 has joined #ruby
amclain has joined #ruby
rcvalle has joined #ruby
subscope has quit [Quit: Textual IRC Client: www.textualapp.com]
kirun has joined #ruby
cyle has joined #ruby
neohunter has quit [Quit: Textual IRC Client: www.textualapp.com]
cooperlebrun has joined #ruby
maletor has joined #ruby
cooperlebrun is now known as clx
skade has quit [Quit: Computer has gone to sleep.]
maletor has quit [Client Quit]
maletor has joined #ruby
skinux has joined #ruby
Alina-malina has joined #ruby
clx has quit [Client Quit]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Remote host closed the connection]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<skinux> Is JRuby language actually different from Ruby or does it just provide access to some Java stuff while using Ruby language?
platzhirsch has left #ruby [#ruby]
<centrx> skinux, What do you mean by language? It's Ruby
lubarch has quit [Quit: leaving]
<centrx> skinux, There are some differences around the edges, but it's the same syntax, keywords, base objects, etc.
<havenwood> skinux: JRuby is an implementation of the Ruby language on the JVM.
<mg^> It's a Ruby interpreter implemented on the JVM
<skinux> I'm just asking because, for example, Jython is a bit different from Python.
<mg^> damn, beat me by 2 seconds :)
Channel6 has quit [Ping timeout: 255 seconds]
<centrx> Jython doesn't even have the word Python in it, so obviously...
<skinux> So, using JRuby I could use the literal Ruby language and be able to use Swing for example?
<T1loc> hi
pandaant has joined #ruby
blackmesa has quit [Ping timeout: 268 seconds]
<T1loc> Someone know why : irb > 200*1.1 => 220.00000000000003
<T1loc> ?
eminencehc has quit [Remote host closed the connection]
<havenwood> skinux: Yup, swing away!
SOLDIERz has quit [Ping timeout: 256 seconds]
<havenwood> T1loc: Floats!
<skinux> How about using JavaFX GUI Toolkit with Ruby language instead?
<T1loc> hum ok ! thanks for the links
<skinux> Also, is JRuby any faster than Java?
<havenwood> skinux: For JRuby-specific questions there's a #jruby channel.
alcipir has quit [Ping timeout: 265 seconds]
<skinux> Oh...didn't know that.
jonnie has quit [Ping timeout: 240 seconds]
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krazyj has quit [Quit: krazyj]
jonnie has joined #ruby
<skinux> It actually sounds good, because a lot of people don't like Java and love Ruby. So if I can use Ruby and also have the benefit of using JavaFX/Swing GUI development that would be pretty cool.
momomomomo has joined #ruby
<centrx> It sure dang would!
Igorshp has quit [Remote host closed the connection]
colegatron has joined #ruby
<skinux> When I mentioned Jython vs Python, it's because Jython is Python implemented on JVM, but instead of "Object" in Jython you have to use "PyObject"
blackmesa has joined #ruby
<skinux> Therefore, it's not completely using Python on JVM because in Python you wouldn't put "Py" before "Object"
<havenwood> skinux: Rails for example runs quite well on JRuby. It's real Ruby.
<skinux> Okay, so no syntax and type name changes because it's using JVM...?
djbkd has joined #ruby
<colegatron> Hi people. Maybe you can help me. I am not used to ruby, but it is a pure ruby problem: I have this code : https://paste.debian.net/318179/ and I want to know if passing the 'override' variable to each config.vm.define block I can set up a different override.ssh.username inside every vm.define block and expect each block use the right username value
Igorshp has joined #ruby
<colegatron> wow. one long line. sorry.
<colegatron> Hope I explained it well
towski_ has joined #ruby
TheNet has quit [Remote host closed the connection]
<apeiros> why is it that pastie.debian.net wants a client cert? o0
<jhass> apeiros: doesn't here
<jhass> apeiros: sounds like your NSA proxy was messed up :P
shinenelson has joined #ruby
<havenwood> The website "paste.debian.net" requires a client certificate.
<colegatron> uh? really?
<jhass> not here
<apeiros> oh, right, paste, not pastie.
<adaedra> works for me without cert
<apeiros> havenwood: you shouldn't use the messed up nsa proxy either then!
<adaedra> (Firefox)
<jhass> colegatron: I only see one override variable, so I don't quite follow your question
<apeiros> yeah, it works without cert, but it asks for one
simi has quit [Ping timeout: 240 seconds]
<caliostro> what do u think about byebug?
<jhass> caliostro: it integrates well into pry-byebug
<colegatron> jhass: tnx for the answer. Let me explain: I see the config.provider gets the aws and override variables as arguments
<caliostro> jhass, ok
moeabdol has quit [Ping timeout: 256 seconds]
TPBallbag has quit [Read error: Connection reset by peer]
<colegatron> and seems the override variable does not changes during all the vagrant.configure("2") block.
alcipir has joined #ruby
TPBallbag has joined #ruby
<colegatron> I need, on every config.vm.define set a different username to each server
ruurd has quit [Quit: ZZZzzz…]
<jhass> colegatron: you might be better up in #vagrant
cyle has quit [Ping timeout: 246 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<colegatron> jhass, they did not answer. this is a ruby language question, not about vagrant :)
<atmosx> hello
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cyle has joined #ruby
Guest5455 has joined #ruby
<colegatron> my question is: if I rewrite line 52 into : config.vm.define :tribasedev, autostart: false do |tribasedev, override| I understand I am going to pass the override variable to that block
<colegatron> is my assumption right?
Guest5455 has left #ruby [#ruby]
Guest5455 has joined #ruby
Guest5455 has left #ruby [#ruby]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest5455 has joined #ruby
Guest5455 has left #ruby [#ruby]
Guest5455 has joined #ruby
<Guest5455> greet
<colegatron> jhass: is my assumption right?
<skinux> Umm...does JRuby Windows installer install JRuby as 'ruby' or 'jruby' by default? Because I just installed JRuby and I already had Ruby installed.
atomical has joined #ruby
<jhass> colegatron: that's specific to what vagrant does, so not a ruby question
<jhass> colegatron: vagrant decides what arguments are available there
<jhass> you only decide to give them a name or not
phutchins has joined #ruby
<colegatron> jhass: but override is there (it is used on config.provider block), so I can pass it to the config.vm.define or not, right?
ldnunes_ has quit [Quit: Leaving]
<jhass> colegatron: no, that's not a valid assumption
ldnunes_ has joined #ruby
<jhass> colegatron: .define and .provider are different methods, they can and not unlikely behave differently
<colegatron> oh, sorry, I see, you are right.
alcipir has quit [Ping timeout: 240 seconds]
<colegatron> jhass: yup, it is not a ruby question, my fault :-) thank you anyway
<jhass> no worries, yw
joonty has quit [Quit: joonty]
rshetty has joined #ruby
jgt has quit [Ping timeout: 246 seconds]
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
<Guest5455> is there any site that has a complation of ambiguity in ruby lyntax?
Macaveli has quit [Max SendQ exceeded]
joonty has joined #ruby
<Guest5455> i would be very thankul is sb knows one
Macaveli has joined #ruby
blackoperat has joined #ruby
ruurd has joined #ruby
<shevy> don't think there is any single resource for that
eminencehc has joined #ruby
blackoperat has quit [Max SendQ exceeded]
Zai00 has quit [Ping timeout: 260 seconds]
<Guest5455> thanks , i won't mind if they are dispernd on the net
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
hxegon has joined #ruby
blackoperat has joined #ruby
pietr0 has joined #ruby
blackoperat has quit [Max SendQ exceeded]
eminencehc has quit [Remote host closed the connection]
AxonetBE has joined #ruby
phutchins has quit [Ping timeout: 246 seconds]
<Guest5455> any one?
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
konrath has joined #ruby
<centrx> Huh?
crime has quit [Quit: Connection closed for inactivity]
blackoperat has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
<shevy> he just hopes for too much
Voker57 has quit [Read error: No route to host]
<Guest5455> :\
<Guest5455> shevy , you naild it sir :\
<shevy> Guest5455 there are also new changes lately such as foo.?lala.?lele, it's hard to keep up with stuff: https://github.com/ruby/ruby/blob/trunk/ChangeLog#L31
alcipir has joined #ruby
Voker57 has joined #ruby
rshetty has quit [Remote host closed the connection]
Ox0dea has joined #ruby
<shevy> Guest5455 ambiguity will result whenever there is more than one way to do something. so we have {} for blocks and hashes, we have do/end and {} for blocks ... we need to distinguish between ? used as ternary, method name and now also that strange .?bla thing
<shevy> there was once a cool twitter message about the ruby parser
dionysus69 has quit [Ping timeout: 250 seconds]
<shevy> I can't find it right now
synthroid has quit [Remote host closed the connection]
eminencehc has joined #ruby
<shevy> perhaps eam remembers
<Guest5455> shevy , i was actually on it before gettin on the channel; what i have been lookng for is (ideall) a site that tells what are the ambiguity of ruby , and how the parer overcmes them
<Guest5455> :)
<Ox0dea> Guest5455: Why?
<Ox0dea> >> p {}.class
<ruboto> Ox0dea # => NilClass (https://eval.in/457240)
skweek has joined #ruby
Peg-leg has quit [Quit: Leaving.]
TomyWork has quit [Ping timeout: 260 seconds]
SenpaiSilver has joined #ruby
hxegon has quit [Read error: Connection reset by peer]
<Ox0dea> A pretty common source of "strangeness" results from parentheses being optional for method invocation.
<Ox0dea> That particular ambiguity led this poor fellow down quite the rabbit hole: https://bugs.ruby-lang.org/issues/11621
benlovell has quit [Ping timeout: 244 seconds]
<shevy> Guest5455 yeah, it's a parser straight out from hell :) one tangible goal was for flexibility, another one for user's happiness
<eam> perl distinguishes between {} the hash constructor and {} the code block by prepending a +
<shevy> oh yeah, parens can also be weird
Igorshp has quit [Remote host closed the connection]
<Ox0dea> eam: We get to use unary + for better (read: probably worse) things in Ruby.
<shevy> I have had surprises when I had (made up now) things such as: if ! foo.include? 'bla' and ble.select {|e| e < 5 } && false or yodeldodel > 1 # this is also totally made up
<Ox0dea> >> class Hash; alias +@ invert; end; +{a: 1, b: 2}
<ruboto> Ox0dea # => {1=>:a, 2=>:b} (https://eval.in/457252)
baweaver has joined #ruby
cpruitt has joined #ruby
alcipir has quit [Ping timeout: 256 seconds]
lfox has joined #ruby
lfox has quit [Client Quit]
<shevy> Guest5455 you need to keep in mind that 80% of Ox0dea's code solely aims to play around with the existing ruby syntax
codecop has joined #ruby
<Guest5455> Ox0dea, i have heard there are many ambiguity in ruby, and it has reall frgihtend me because i want to use it in a rather hueg proj
lfox has joined #ruby
northfurr has joined #ruby
<shevy> keep things simple. define what should be used. -> result: less problems
<agent_white> shevy: That's wierd syntax. What do you propose?
<Ox0dea> Guest5455: Cool. Ruby does not go out of its way to pull the rug out from under your syntactic feet.
ruurd has joined #ruby
Puck7744 has joined #ruby
<Guest5455> shevy , sir, is LR schem the best way to go ?
<shevy> what I propose? I say don't add this syntax. but it's not my language
moty66 has joined #ruby
<apeiros> ambiguity can create hard to spot problems, but IME rarely does so.
workmad3_ has joined #ruby
tercenya_ has joined #ruby
<agent_white> shevy: I thought it was wierd... but if Person.feet exists, then Person must exist... if Person.feet.shoes exist...
<Guest5455> >> print /l/
<ruboto> Guest5455 # => (?-mix:l)nil (https://eval.in/457256)
<agent_white> shevy: It is... wierd.
pathrocle has quit [Remote host closed the connection]
crdpink2 has quit [Excess Flood]
<agent_white> shevy: I agree :) So, don't try to "fix" anything?
<Guest5455> print /l/ - 5
momomomomo_ has joined #ruby
<shevy> yeah ... cat.?fur.?legs.?tail
<Ox0dea> Guest5455: You're just being goofy?
crdpink2 has joined #ruby
troulouliou_div2 has joined #ruby
Igorshp has joined #ruby
<Guest5455> no sir
ruurd has quit [Client Quit]
momomomomo has quit [Ping timeout: 240 seconds]
momomomomo_ is now known as momomomomo
<Ox0dea> Do you need to do subtraction on regular expressions in this huge project of yours?
raldu has joined #ruby
<agent_white> shevy: Yeah... that is confusing.
<agent_white> shevy: :P Maybe there's no fix. But fun that you brought it up.
<moty66> how can I translate strings inside a model? I want to translate CONDITION_TYPES in this case
<agent_white> Cool to see Ruby questioning that regardless!
tercenya has quit [Ping timeout: 240 seconds]
<shevy> agent_white not if fixing results in trade offs or side effects that are orthogonal. it's funny because matz complained about C++ complexity and explained the ruby philosophy in 2003, and many changes that happened in the last ~13 years are really really strange ... like the -> operator ... http://www.artima.com/intv/ruby.html
workmad3 has quit [Ping timeout: 240 seconds]
Puck6633 has quit [Ping timeout: 240 seconds]
<Guest5455> Ox0dea, no sir i wantd to nive an exampe of a less-nspected case
<Ox0dea> Guest5455: But there's no ambiguity in your example.
<Guest5455> Ox0dea, thanks sir, but how?
joonty has quit [Quit: joonty]
northfurr has quit [Ping timeout: 252 seconds]
brt has joined #ruby
<shevy> moty66 what does "translate" mean
<shevy> do you want to translate this into spanish
<moty66> I18n
blackoperat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blaxter has joined #ruby
Igorshp has quit [Remote host closed the connection]
<shevy> unicode!
<Guest5455> Ox0dea, what abou L.getInt /e/ -5
<moty66> i tried to use I18n.t but I don't know how to add these strings in the en.yml file
jgt has joined #ruby
<shevy> Guest5455 what should this be, that's invalid
<jhass> moty66: I18n.t("a.b.c"); -> en:\n a:\n b:\n c: "foo"
<moty66> do I have to add them under the model section or I have to create a new section, something like
<moty66> myform:
Zai00 has joined #ruby
<moty66> then underthan i add the types
skade has joined #ruby
mbrownes has joined #ruby
<Guest5455> shevy , sir, why ?
ekinmur has joined #ruby
<jhass> moty66: sounds like something that should be mapped in a view helper btw, but #RubyOnRails territory anyway
dionysus69 has joined #ruby
<Guest5455> i guess it is actually correc, syntaciclly
<apeiros> Guest5455: you can omit all the "sir" in your messages. it's not necessary here.
<moty66> jhass: thanks, I'll ask them
<apeiros> (even might offend some mams)
<Guest5455> apeiros, sorry
pdoherty has joined #ruby
blackoperat has joined #ruby
<apeiros> no need to apologize. I assume you just wanted to be polite, and that's appreciated.
platzhirsch has joined #ruby
dfinninger has quit [Remote host closed the connection]
<Guest5455> i actually used it as a gendr-agnostic honorific; sorry again
<shevy> Guest5455 yeah it can not be valid
<Guest5455> why?
<shevy> what should it be?
<Guest5455> won't it be L.getInt(/l/) - 5
<Guest5455> ?
<shevy> the ruby parser is clever but that would be mystery guessing
<Guest5455> i mean, is it run-tme err or a comple-tme err?
<shevy> I assume it will be a syntax error
<apeiros> there's no compile-time
<Guest5455> thanks
ruurd has joined #ruby
<shevy> sir apeiros holds a lot of knowledge
<Guest5455> :)
<apeiros> and `L.getInt /e/ - 5` is valid syntax
brt has quit [Ping timeout: 250 seconds]
<apeiros> it's interpreted as `L.getInt(/e/ - 5)`
karapetyan has quit [Remote host closed the connection]
<apeiros> which then will raise a NoMethodError because there's no Regexp#-
<Ox0dea> But there is a compile time...
karapetyan has joined #ruby
<apeiros> o0
psy_ has joined #ruby
shredding has quit [Ping timeout: 240 seconds]
<Ox0dea> YARV is a bytecode interpreter.
<agent_white> shevy: Thanks for the article :)
psy_ has quit [Max SendQ exceeded]
<shevy> cool ... so you can get it to work Guest5455, just define Regexp#-
rshetty has joined #ruby
<Guest5455> :)
<Guest5455> i'm actually rather frihtgend by the fact
<apeiros> Ox0dea: true, but that's transparently implemented. to the user it's an interpreter.
ruurd has quit [Client Quit]
krazyj has joined #ruby
<Ox0dea> apeiros: Sure, but "compilation error" is still a thing: http://git.io/vW6UQ
krazyj has quit [Client Quit]
Eiam has joined #ruby
<apeiros> Ox0dea: outside of directly invoking yarv?
<Ox0dea> Hm?
<apeiros> manually compiling sequences et al
<Ox0dea> I would if I could. :P
<apeiros> via RubyVM
<Guest5455> because it was not how _i_ thohugt it would work: ( L.getInt / e ) / -5
<apeiros> I mean, can a compile error happen from ordinary code which does not use RubyVM? because afaik it can't. but maybe I'm missing something?
<Ox0dea> apeiros: I'm sure you'd have to go *well* out of your way to even approach running into that macro, but the point stands that it's there.
bonemind has quit [Ping timeout: 246 seconds]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
* apeiros ponders to just call that "leaked abstraction and it's still an interpreter" :D
senayar has quit []
<apeiros> but yeah, I guess it proves your point
<Ox0dea> And that'd be fair.
lfox has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> I fully appreciate the pedantry of my opposition.
<apeiros> could also make the argument that MRI is but one implementation
<apeiros> and compiled/interpreted isn't a language attribute
<Guest5455> how could the / be made not to wokr as a rgexp begin ?
User458764 has joined #ruby
hahuang65 has joined #ruby
<apeiros> (and stuff like bytecode vm's blur the line anyway)
<apeiros> Guest5455: spacing. L.getInt/5 - 5
<apeiros> Guest5455: spacing. L.getInt/e - 5
<Guest5455> thanks a lot
Rollabunna has joined #ruby
<Guest5455> apeiros, they will be rgex otherwse?
RegulationD has joined #ruby
Alina-malina has quit [Ping timeout: 252 seconds]
ruurd has joined #ruby
<apeiros> Guest5455: spacing. L.getInt / e / -5
<apeiros> whoops? where did my rewrite go?
<Guest5455> thanks a lot
rnelson0 has joined #ruby
<apeiros> alternatively use the named method for /: L.getInt.div(e).div(-5)
AckZ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
snockerton has joined #ruby
<Guest5455> apeiros, i'm actually doig a tortue test on the syntac :)
RegulationD has quit [Remote host closed the connection]
sanjayu has quit [Ping timeout: 250 seconds]
RegulationD has joined #ruby
ruurd has quit [Client Quit]
nemo_ has joined #ruby
snockerton has quit [Client Quit]
<Ox0dea> >> ->_{}::[] rescue $!
<ruboto> Ox0dea # => #<ArgumentError: wrong number of arguments (0 for 1)> (https://eval.in/457278)
mrgrieves has quit [Quit: Lost terminal]
<Ox0dea> Pop quiz: where does the argument go?
snockerton has joined #ruby
timonv has quit [Ping timeout: 250 seconds]
<Guest5455> i'm a human bein, do i'm not sure i can get what the abov means :)
<Guest5455> *so
PaulCape_ has quit [Quit: .]
* apeiros has no idea what a tortue is
<shevy> a Torte!
* Guest5455 corrects it as torture
<shevy> your spelling is a torture!
<apeiros> ok, in that case, I don't know what a torture test is.
<Ox0dea> "Make it hurt."
solocshaw has quit [Ping timeout: 246 seconds]
TPBallbag has quit [Remote host closed the connection]
* agent_white doesn't want to know
<shevy> lol
* apeiros doubts syntax has feelings
<shevy> you write code. it pains you to write the code. torture.
<Guest5455> apeiros, i meant the syntax-analyzr
<agent_white> But "7 8 9" apeiros! 9 has no more feeling at all!
<apeiros> reading is usually more where the pain is for me with code
PaulCapestany has joined #ruby
<Guest5455> the one that makes an AST
<apeiros> 7 should not eat 9.
<apeiros> that's mean.
<Guest5455> the one that makes an AbSyT
<Ox0dea> Guest5455: From which language(s) do you come to Ruby, if you don't mind my asking?
<Ox0dea> > AbSyT
AxonetBE has quit [Quit: AxonetBE]
<Guest5455> :)
<adaedra> Not using AbsSynTre
solocshaw has joined #ruby
<Guest5455> i have not used anything other than C for 12 yrs or so
<Guest5455> probably much longer
<shevy> yeah
Guest5455 is now known as pard
<shevy> becoming a fossil programmer is not a good thing
<shevy> but these types do keep perl alive!!!
Igorshp has joined #ruby
<pard> actually i have never done a byte of perl, let alone a while file
gregf has quit [Quit: WeeChat 1.3]
ahegyi has joined #ruby
momomomomo has quit [Quit: momomomomo]
<rnelson0> Hi all. I'm trying to write a ruby gem, probably very poorly, but even before worrying about implementation details, I'm struggling with a class name that doesn't appear to be recognized in all files. Gist at https://gist.github.com/rnelson0/8570f2706d48fa8bed04
<pard> i have been doing it as a mere sourc of inocme
shock_one has joined #ruby
Citocrate has joined #ruby
<shevy> Ox0dea does not believe you pard :(
alcipir has joined #ruby
<rnelson0> er, uninitialized
David27 has joined #ruby
<pard> shevy , why not?
TheNet has joined #ruby
northfurr has joined #ruby
blackoperat has quit [Quit: Textual IRC Client: www.textualapp.com]
bonemind has joined #ruby
last_staff has joined #ruby
Igorshp has quit [Remote host closed the connection]
big|bad|wolf has joined #ruby
<Ox0dea> pard: You've been writing C in a professional capacity for "probably much longer" than 12 years or so?
<shevy> pard because people are very sceptic on the www
dmolina has quit [Quit: Leaving.]
<agent_white> Same in Roman times though
* agent_white reads from his book of Guess
dravine_ has joined #ruby
diegoaguilar has quit [Ping timeout: 260 seconds]
pwnd_nfsw has joined #ruby
<pard> Ox0dea, actually not in a pro manner; i've been doing SysC which i guess is not even C
<pard> i'm EE
<pard> i mean
<pard> i come from EE
mikecmpbll has quit [Ping timeout: 240 seconds]
<zotherstupidguy> is there a way to figure out if a certain date belongs to the current week? using Date or Chronic?
pwnd_nsfw has quit [Ping timeout: 240 seconds]
darthdeus has left #ruby ["Linkinus - http://linkinus.com"]
gregf has joined #ruby
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<apeiros> zotherstupidguy: with a little math and wday, that should be trivial
dravine has quit [Ping timeout: 264 seconds]
dravine_ is now known as dravine
<zotherstupidguy> apeiros thanks of the hint ;)
<apeiros> depending on what you define start/end of a week, the math may be more or less involved.
<drbrain> zotherstupidguy: get the week number from today and the target week
<drbrain> I think it is #cweek
<zotherstupidguy> dbrain example?
simi has joined #ruby
alexdunn1 has quit [Ping timeout: 252 seconds]
<pard> i believe being scptic is the way to go ; the reason i joind this hannel is i've recenly been very scepitc about whether ruby might treat some cod e in an other way than i do
<drbrain> >> require 'date'; d = Date.today - 8; Date.today.cweek == d.cweek
<ruboto> drbrain # => false (https://eval.in/457294)
<apeiros> drbrain: need to check the year too, though
nemo__ has joined #ruby
<drbrain> ah, yeah ↑
<apeiros> but yes, that's probably easier than using wday
<apeiros> is cweek iso8601? in that case, .year won't cut it
<apeiros> ah well, .strftime("%G%V") both and compare that.
<apeiros> hm, docs don't tell which week standard cweek uses.
dravine_ has joined #ruby
Chau has quit [Quit: Leaving]
Zai00 has quit [Ping timeout: 260 seconds]
<Ox0dea> pard: You pay sufficiently distant attention to detail as to have it be the likelier cause of any syntactic troubles you might run into. :P
nemo_ has quit [Ping timeout: 250 seconds]
<Ox0dea> > For all its power, the computer is a harsh taskmaster. Its programs must be correct, and what we wish to say must be said accurately in every detail.
Pumukel has quit [Ping timeout: 246 seconds]
<Ox0dea> If you write code like you've been writing here, you're gonna have a bad time.
dfinninger has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pard> Ox0dea, you're right, looks like my typo's have a higher prob to get on me than any other thnig :)
Igorshp has joined #ruby
dravine has quit [Ping timeout: 256 seconds]
dravine_ is now known as dravine
tedstriker has quit [Quit: Anti-Fraping status set.]
v4n has joined #ruby
<pard> sorry for all the typo's, i was on a touch dev and it was causing all the crap i wrote
alexdunne has joined #ruby
skinux_ has joined #ruby
<pard> thanks :)
<pard> thanks all
pard has quit [Quit: Leaving]
Zai00 has joined #ruby
Blaguvest has joined #ruby
radgeRayden has joined #ruby
synthroid has joined #ruby
<zotherstupidguy> funny thing, in arab countries start of the week is sunday not monday :)
bonemind has quit [Remote host closed the connection]
<adaedra> Isn't it also the case of some english-speaking countries?
barhum2013 has joined #ruby
ruurd has joined #ruby
<zotherstupidguy> adaedra, name one?
skinux has quit [Ping timeout: 265 seconds]
<apeiros> usa
nemo_ has joined #ruby
alexdunne has quit [Ping timeout: 268 seconds]
lkba has quit [Remote host closed the connection]
<zotherstupidguy> really!! i didnt know tht
<apeiros> not sure, but I think so
<zotherstupidguy> i think not
diegoaguilar has joined #ruby
<adaedra> That's what I was reading.
ruurd has quit [Client Quit]
skweek has quit [Ping timeout: 246 seconds]
nemo__ has quit [Ping timeout: 252 seconds]
<adaedra> I found a map once, can't find it
<zotherstupidguy> sure!
<adaedra> "Although this is the international standard, countries such as the United States still have their calendars refer to Sunday as the start of the seven-day week." - http://www.timeanddate.com/calendar/days/
ruurd has joined #ruby
troyready has joined #ruby
Fredrich010 has quit [Remote host closed the connection]
<apeiros> oh wow, saturday as start of the week…
Wompy has joined #ruby
rnelson0 has left #ruby ["Leaving"]
DrCode has joined #ruby
agentmeerkat has joined #ruby
<adaedra> >> Time.now.monday?
<ruboto> adaedra # => true (https://eval.in/457296)
<adaedra> >> Time.now.wday
<ruboto> adaedra # => 1 (https://eval.in/457297)
Eiam_ has joined #ruby
<zotherstupidguy> apeiros someone had fun programming international bank transactions :)
beauby has quit [Ping timeout: 255 seconds]
sp4rrow has joined #ruby
<apeiros> that's trivial
<adaedra> Time is an horror to deal with.
<apeiros> it's not like machines bothered about workdays
varunwachaspati has quit [Quit: Connection closed for inactivity]
<zotherstupidguy> so i guess ruby is following japan's week numbering!?
<apeiros> adaedra: but IMO almost only the IO with humans part
<adaedra> >> t = (Time.now - 24 * 60 * 60); [t.sunday?, t.wday]
<ruboto> adaedra # => [true, 0] (https://eval.in/457298)
<adaedra> see, sunday as first day.
<apeiros> zotherstupidguy: or usa's
<adaedra> apeiros: for the horror to manage? Leap years, leap seconds, to start with.
<apeiros> as shown by the map, usa indeed has sunday as start of week.
jgpawletko has joined #ruby
<Wompy> /msg nickserv register josjs wompy
ruurd has quit [Quit: ZZZzzz…]
<apeiros> leap years are trivial. leap seconds are a matter of definition. i.e. whether you have an "idealized" time or using actual time (which can be confusing because the diff between two dates with time 00:00:00 can have a single second offset due to leap seconds)
<adaedra> Wompy: Try again
Wompy has quit [Quit: Leaving...]
Igorshp has quit [Remote host closed the connection]
hxegon has joined #ruby
<adaedra> \o
<eam> and you can never tell time more than 6 mo in advance with 1s precision if you're using leap second adjusted time
<apeiros> right
<apeiros> dst falls into the same category of annoyance as leap seconds - not predictable.
jonnie has quit [Ping timeout: 246 seconds]
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> also means that some datetimes are ambiguous (before or after dst change?)
Igorshp has joined #ruby
<apeiros> and that's an actual problem. we had inserts fail with the error "ambiguous time"
northfurr has quit [Quit: northfurr]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Igorshp has quit [Remote host closed the connection]
davedev24 has joined #ruby
<eam> yup, subject to the whim of law
v4n has quit [Ping timeout: 240 seconds]
Igorshp has joined #ruby
<eam> was it 2007 when the US passed a law changing when DST occured?
<eam> that was a fun year
<apeiros> there's countries where dst start is defined by the president each year.
<apeiros> fun too.
<apeiros> means you have to keep your tzinfo file up to date :)
djbkd has quit [Remote host closed the connection]
jgt has quit [Ping timeout: 260 seconds]
<eam> that's terrible
Igorshp has quit [Remote host closed the connection]
<Ox0dea> ~ $ pacman -Si tzdata | grep Date
<Ox0dea> Build Date : Sun 04 Oct 2015 06:05:57 AM EDT
<Ox0dea> It's gonna be okay.
Zai00 has quit [Quit: Zai00]
<Ox0dea> (Probably.)
<apeiros> anyway, most issues when dealing with time is a matter of definition. like "adding 1 hour" - does that mean that the hour indicator of the clock changes by 1 no matter the duration? or the time 3600s later, accounting for dst, leap seconds etc.?
karapetyan has quit [Remote host closed the connection]
<eam> until the next bit of legislation, presuming you don't need to tell adjusted time further out than whenever the next law is passed )
<eam> :)
<apeiros> and the silly thought some people harbor that "months" is a duration unit. it's not. it's an interval.
karapetyan has joined #ruby
<Ox0dea> >> -> x {}::[] rescue $!
<eam> but time itself has scaling issues, what with its dependence on the velocity of the earth
<ruboto> Ox0dea # => #<ArgumentError: wrong number of arguments (0 for 1)> (https://eval.in/457299)
blackmesa has quit [Ping timeout: 255 seconds]
rshetty has quit [Remote host closed the connection]
<Ox0dea> eam: Do you know where to put the missing argument there?
jxs_ has joined #ruby
Xiti has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
<Ox0dea> It looks like it's permitting two separate calls to #call.
mag42c has quit [Ping timeout: 272 seconds]
_blizzy_ has joined #ruby
<Ox0dea> That is, two separate calls in the same "sequence point", for lack of a better term.
<eam> no clue
<Ox0dea> Be that way.
`based_pdev` has joined #ruby
howdoicomputer has joined #ruby
<eam> >> z = -> x {}; z::[] rescue $!
jxs_ has quit [Client Quit]
<ruboto> eam # => #<ArgumentError: wrong number of arguments (0 for 1)> (https://eval.in/457300)
<eam> what exactly is ::[]
cyle has quit [Ping timeout: 265 seconds]
<drbrain> .call
<Ox0dea> Oh, I only pestered you because I recalled you being intimately familiar with Ruby's wonkiness in this area. :< My bad.
<drbrain> Ox0dea: you put it after []
jimms has joined #ruby
<Ox0dea> drbrain: Not inside?
mag42c has joined #ruby
`based_pdev` has quit [Read error: Connection reset by peer]
<drbrain> apparently?
<drbrain> I get a SyntaxError if I put it inside []
<drbrain> but I'm still not sure if I'm reading this correctly
<apeiros> Ox0dea: you defined the proc to take an arg
<apeiros> and since it's a lambda, it wants that arg
<Ox0dea> >> ->x{x}::[]42 # Holy shit.
<ruboto> Ox0dea # => 42 (https://eval.in/457301)
<eam> amazing
<apeiros> `-> x {}` # <- x is the arg
based_pdev_ has quit [Ping timeout: 252 seconds]
bojanuana has joined #ruby
moeabdol has joined #ruby
<apeiros> and :: is the same as .
<Ox0dea> Okay, yes, I see it now.
Hounddog has quit [Remote host closed the connection]
<apeiros> i.e., foo[a,b] -> foo.[](a,b) -> foo::[](a,b)
<Ox0dea> I was conflating `.()` with `[]` for some reason..
<drbrain> apeiros: the weird part is that ::[42] gives SyntaxError
<apeiros> drbrain: because you call the method by name, not in the sugared form
northfurr has joined #ruby
<drbrain> ah
<drbrain> right
<apeiros> >> ary = [1,2,3]; ary.[](0,1)
<ruboto> apeiros # => [1] (https://eval.in/457302)
<eam> >> ->_{_}::[]->_{_}::[]->_{_}::[]->_{_}::[]->_{_}::[]42
<Ox0dea> Yep, all squared.
<ruboto> eam # => 42 (https://eval.in/457303)
bruno- has joined #ruby
baweaver has quit [Remote host closed the connection]
<Ox0dea> This language, honestly.
<drbrain> because of the :: (.)
<drbrain> syntax so complex it looks simple
<apeiros> heh, yeah
bruno- is now known as Guest52453
<apeiros> whitequark had a story to tell in that regard
<apeiros> so sad he left ruby :(
roxtrongo has joined #ruby
Citocrate has quit [Quit: Leaving]
willardg has joined #ruby
bb010g has joined #ruby
northfurr has quit [Client Quit]
mollusk_ has joined #ruby
sepp2k has quit [Quit: Leaving.]
Guest86387 has quit [Read error: Connection reset by peer]
skcin7 has joined #ruby
<Ox0dea> drbrain: Sure, I knew about :: being an alternate method invocation operator.
<Ox0dea> That `proc.(foo)` is another way to say `proc.call(foo)` is what cluttered my thinking.
<banister> apeiros what language is whitequark using now?
<apeiros> banister: no idea. that guy moves so fast :D
<banister> apeiros how do you know he left? curious
<apeiros> Ox0dea: ah well, .() != .[] :)
v4n has joined #ruby
<Ox0dea> Indeed not.
Xiti has joined #ruby
<drbrain> Ox0dea: me too
<apeiros> banister: he's not in #ruby anymore. iirc he said something in that direction. I don't think he completely left it. but it's only a small side thing for him as far as I understood.
<apeiros> but in case of proc, .() == .[]()
dnomyar has joined #ruby
Oatmeal has joined #ruby
Oatmeal has quit [Max SendQ exceeded]
<apeiros> hm, actually [*args] and .[](*args) are not equivalent. former can't take a block. latter can.
skade has joined #ruby
darthdeus has joined #ruby
Oatmeal has joined #ruby
Oatmeal has quit [Max SendQ exceeded]
saddad has joined #ruby
Soda has quit [Remote host closed the connection]
* Ox0dea has been nerd-sniped.
<Ox0dea> There probably aren't any good reasons to pass a block to Fixnum#+, though.
dfinning_ has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
gizmore has joined #ruby
djbkd has quit [Remote host closed the connection]
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cwong_on_irc has quit [Read error: Connection reset by peer]
cwong_on_irc has joined #ruby
northfurr has joined #ruby
ta has joined #ruby
caliostro has quit [Remote host closed the connection]
Sceko has joined #ruby
Rollabunna has quit [Quit: Leaving...]
stan has quit [Ping timeout: 250 seconds]
<apeiros> Ox0dea: nerd-sniped?
brt has joined #ruby
nertzy has joined #ruby
<Ox0dea> !xkcd 356
djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
<shevy> Ox0dea is no longer communicating with us earthly people
djbkd has joined #ruby
<shevy> he is talking in code and instructions!
<shevy> here is the xkcd link: https://xkcd.com/356/
mikecmpbll has joined #ruby
<Ox0dea> It's all instructions at the bottom.
mollusk_ has quit [Ping timeout: 252 seconds]
jgt has joined #ruby
<shevy> physicists are geeks
skade has quit [Quit: Computer has gone to sleep.]
_blizzy_ has quit [Read error: Connection reset by peer]
northfurr has quit [Quit: northfurr]
sl33k has joined #ruby
danneu has joined #ruby
User458764 has quit [Read error: Connection reset by peer]
darkf has quit [Quit: Leaving]
User458764 has joined #ruby
jackjackdripper has joined #ruby
hectortrope has joined #ruby
malconis_ has quit [Read error: Connection reset by peer]
p0wn3d has quit [Ping timeout: 260 seconds]
troulouliou_div2 has quit [Read error: Connection reset by peer]
big|bad|wolf has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
Coldblackice has joined #ruby
<Eiam_> hmm, I have an array of true & false values. I want to check if any value in the array is true. I could do [true,false,false].include?(true) . I could also do a set like [true,false] & [true]. However, since I want to drop that into an if, the second could return [] which would be true, which isn't what I'd like. It feels like I should be able to have .any? do this for me, but it requires a write a block which seems silly to say [true,false,false].any?{
<Eiam_> |x| x}
<Eiam_> am I missing some more obvious way to do this ?
northfurr has joined #ruby
<workmad3_> Eiam_: ary.any?
<workmad3_> >> [false, true, true].any?
<ruboto> workmad3_ # => true (https://eval.in/457308)
<Eiam_> wat
<workmad3_> >> [false, false, false].any?
<Eiam_> how didi miss it can do that
<ruboto> workmad3_ # => false (https://eval.in/457309)
<Eiam_> (im staring at the documentation too)
<Eiam_> lawl
<Eiam_> Ruby adds an implicit block of {|obj| obj} (that is any? will return true if at least one of the collection members is not false or nil.
* Eiam_ facepalsm
sepp2k has joined #ruby
<ja> :D
momomomomo has joined #ruby
<Eiam_> okay well at least I feel better that its just implicitly doing what I already thought it
sl33k has quit [Read error: Connection reset by peer]
craysiii has joined #ruby
<Ox0dea> Eiam_: You indicated that you're looking for an explicit `true`, though.
sl33k has joined #ruby
<Eiam_> Ox0dea: it should still evaluate in the if though
dionysus69 has quit [Quit: dionysus69]
<Ox0dea> Eiam_: I'm not sure I follow.
<Eiam_> >> [false,false,true].any? ? true : false
<ruboto> Eiam_ # => true (https://eval.in/457310)
northfurr has quit [Client Quit]
<Ox0dea> >> [1,2,3].any? # Eiam_
<ruboto> Ox0dea # => true (https://eval.in/457311)
<Eiam_> oh, thats right. yeah that would be bad
TheNet has quit [Remote host closed the connection]
northfurr has joined #ruby
<Eiam_> Ox0dea: probably just saved me from an annoying bug in the future =)
dionysus69 has joined #ruby
<Ox0dea> Might well have done. :P
HANJIN has quit [Quit: HANJIN]
cdg has quit [Ping timeout: 250 seconds]
sl33k has quit [Read error: Connection reset by peer]
sl33k has joined #ruby
malconis has joined #ruby
<Eiam_> hrm
yqt has quit [Ping timeout: 268 seconds]
ruby-lang993 has joined #ruby
<Ox0dea> Eiam_: If you're sure you need explicit `true` and `false` values, then your original intuition was correct.
Wompy has joined #ruby
hxegon has quit [Ping timeout: 240 seconds]
hxegon has joined #ruby
Wompy has left #ruby [#ruby]
<ruby-lang993> Hi all, I have a simple query: What is the best way to check if an Input == String/Integer class?
Guest52453 has quit [Ping timeout: 252 seconds]
<centrx> ruby-lang993, my_input.is_a?(String)
<ruby-lang993> for ex: If input != String, puts "Not a string!"
<ruby-lang993> centrx, thanks!
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
<Ox0dea> ruby-lang993: Be advised that #is_a? observes inheritance.
dionysus69 has joined #ruby
<Ox0dea> >> class Foo < String; end; Foo.new.is_a?(String)
<ruboto> Ox0dea # => true (https://eval.in/457314)
sl33k has quit [Read error: Connection reset by peer]
<havenwood> >> class Foo < String; end; Foo.new.instance_of?(String)
<ruboto> havenwood # => false (https://eval.in/457315)
<apeiros> Ox0dea: lol @ nerd snipe xkcd
podman has joined #ruby
slackbotgz has joined #ruby
<Ox0dea> apeiros: It's one of the better ones. I never did figure out how many points for linguists, though.
karapetyan has quit [Remote host closed the connection]
<apeiros> Ox0dea: I think randall is quite approachable. ask him :D
karapetyan has joined #ruby
CooloutAC has joined #ruby
dionysus69 has quit [Remote host closed the connection]
pwnd_nfsw has quit [Ping timeout: 240 seconds]
linocisco has joined #ruby
pu22l3r_ has joined #ruby
<CooloutAC> hello all, how do I put spaces in a symbol?
dionysus69 has joined #ruby
<Ox0dea> >> :'like this' # CooloutAC
<ruboto> Ox0dea # => :"like this" (https://eval.in/457316)
<CooloutAC> tks
<Ox0dea> yrwk
<Ox0dea> Or whatever.
dionysus69 has quit [Remote host closed the connection]
<CooloutAC> hmm i'm trying to do 'The harder they come': 5 telling me syntax error
<CooloutAC> oh
pu22l3r_ has quit [Remote host closed the connection]
<CooloutAC> i put colon in front telling me same thing
atomical has joined #ruby
<havenwood> >> {'a space': true}
<ruboto> havenwood # => {:"a space"=>true} (https://eval.in/457317)
zotherstupidguy has quit [Read error: Connection reset by peer]
<Ox0dea> >> RUBY_VERSION # CooloutAC
<ruboto> Ox0dea # => "2.2.0" (https://eval.in/457318)
pu22l3r_ has joined #ruby
pu22l3r has quit [Read error: Connection reset by peer]
skinux_ has quit [Ping timeout: 265 seconds]
zotherstupidguy has joined #ruby
karapetyan has quit [Ping timeout: 255 seconds]
Renich has quit [Quit: leaving]
EllisTAA has joined #ruby
Renich has joined #ruby
<havenwood> 21>> {:"a space" => true}
<ruboto> havenwood # => {:"a space"=>true} (https://eval.in/457319)
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FernandoBasso has quit [Quit: Leaving]
dionysus69 has joined #ruby
<havenwood> In Ruby 2.1 you can do it thusly ^.
Dairenn has joined #ruby
<havenwood> CooloutAC: You're going to give those Symbols a stomach ache putting spaces in them.
Puck7744 is now known as Puck6633
pandaant has quit [Remote host closed the connection]
<linocisco> hi all
ajaiswal has quit [Ping timeout: 256 seconds]
<CooloutAC> ok ya i had to add the rocket
<havenwood> linocisco: hi
User458764 has quit [Read error: Connection reset by peer]
hxegon has quit [Quit: leaving]
eminencehc has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
<linocisco> i am not going to request for debate. I would honestly like to know what is pros and cons of Ruby compared to other languages as newbie
User458764 has joined #ruby
User458764 has quit [Client Quit]
ruurd has joined #ruby
skade has joined #ruby
dionysus69 has quit [Remote host closed the connection]
nertzy has quit [Quit: This computer has gone to sleep]
dionysus69 has joined #ruby
<Ox0dea> linocisco: You had the same question almost a year ago. :<
<shevy> damn you have a good memory Ox0dea
bootstep has joined #ruby
<Ox0dea> The Internet's is even better.
<havenwood> linocisco: have any particular languages in mind to compare it to?
<linocisco> Ox0dea, 128 SSD RAM ?
oddjob has joined #ruby
<linocisco> havenwood, php, python , perl and java
dionysus69 has quit [Client Quit]
based_pdev_ has joined #ruby
dfinninger has joined #ruby
<shevy> ruby is very terse
<shevy> ruby is slower than java
<havenwood> linocisco: etc
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam> ruby has a warmer mouthfeel, perl has fruity overtones and php pairs well with dog turds
dfinninger has quit [Remote host closed the connection]
<shevy> lol
<oddjob> hey all. question. How can I check if a return has two strings, but only check if both strings exist? Example. foobar.include? "apple" && "orange" - My issue is sometimes apple or orange wont exist, so it will return true
<linocisco> shevy, if slower, why should we use? sorry for idiot question
<shevy> linocisco if speed matters, use C not java
ruby-lang186 has joined #ruby
<jhass> oddjob: "a return"?
<shevy> if it does not, why bother with details that are irrelevant to solve any given problem
dmolina has joined #ruby
dionysus69 has joined #ruby
dmolina has quit [Client Quit]
yfeldblum has joined #ruby
<bootstep> Hi, is there a way in ruby to parse a date time string without a timezone into a datetime with a specified timezone, autodetecting DST?
dfinninger has joined #ruby
<oddjob> jhass: sorry. the "return" is from a command that is executed and processed. I was still speaking in my own terms, not ruby ;(
<Dairenn> eam: Hah
dionysus69 has quit [Client Quit]
<jhass> oddjob: so what's the ruby term?
pwnd_nfsw has joined #ruby
djbkd has quit [Remote host closed the connection]
<ruby-lang186> can you modify a class @hash value in a class method? for some reason im having trouble...
<jhass> ?code ruby-lang186
<ruboto> ruby-lang186, We can't help you without your code, please post it to https://gist.github.com
<oddjob> jhass: its just a function that is returning a long string
<jhass> oddjob: foo.include?("apple") && foo.include?("orange")
djbkd has joined #ruby
bojanuana has quit [Ping timeout: 252 seconds]
<oddjob> jhass: oh, thats it? I just have to use the include on both sides?
<jhass> sure
momomomomo has quit [Quit: momomomomo]
<oddjob> jhass: .include? "foo" && "bar" that would only work if I knew they would always both exist?
<bootstep> ie. I want something like DateTime.parse "2015-08-1 10:00", "Europe/Rome" to result into "2015-08-1 10:00 CEST" and DateTime.parse "2015-12-25 10:00", "Europe/Rome" to result into "2015-12-25 10:00 CET"
<bootstep> Is this possible?
<oddjob> jhass: otherwise .include? "foo" && .include? "bar" ?
dfinning_ has quit [Ping timeout: 260 seconds]
<jhass> oddjob: that's the same as .include?("foo" && "bar"). ("foo" && "bar") will always evaluate to "bar", thus it's the same as .include?("bar")
<ruby-lang186> not sure why its so spaced out
<oddjob> jhass: thank you very much
<jhass> ruby-lang186: because you use tabs instead of spaces for indentation
<Ox0dea> ruby-lang186: Because you're using hard tabs and should stop.
TheNet has joined #ruby
<jhass> ruby-lang186: @items[key] = 1
ajaiswal has joined #ruby
<jhass> ruby-lang186: or just @items[item] = 1 in fact
<ruby-lang186> oh
<ruby-lang186> thanks
blaxter has quit [Ping timeout: 268 seconds]
jfk has joined #ruby
<jfk> Can somone explain how tests are automatically run by sublassing Test::Unit::TestCase?
<linocisco> havenwood, shevy what is ruby specifically used for ?
<havenwood> linocisco: programming
<havenwood> linocisco: making programmers happy while programming
<jhass> jfk: it probably keeps track via the inherited hook
arthurix has joined #ruby
<ruby-lang186> can you work with booleans within a hash?
Renich has quit [Ping timeout: 244 seconds]
<jfk> jhass: So it uses reflection?
jwaldrip has joined #ruby
<jhass> kinda, that term is somewhat uncommon in the Ruby community. Most would call it metaprogramming I guess
<jhass> ruby-lang186: sure
bricker has quit [Ping timeout: 268 seconds]
<jhass> ruby-lang186: a hash can have any ruby object as keys and values, including other hashes
<ruby-lang186> jhass, is the syntax diff?
arthurix_ has joined #ruby
<ruby-lang186> o really?
<jhass> nope
<jhass> really
<ruby-lang186> so i can call a method as a value?
<jhass> a method on its own is not a ruby object, but there's a ruby object representing one and you could use that
<jhass> though you're better off with a proc or a lambda
Renich has joined #ruby
<ruby-lang186> ok thx
based_pdev_ has quit [Read error: Connection reset by peer]
willardg has joined #ruby
momomomomo has joined #ruby
arthurix has quit [Ping timeout: 252 seconds]
jorb has joined #ruby
Zai00 has joined #ruby
Zai00 has quit [Client Quit]
<jorb> anyone an help me figure out why github-markup gem isn't working?
barhum2013 has quit [Quit: barhum2013]
<jhass> ?ask
<ruboto> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
opensource_ninja has joined #ruby
hectortrope has quit [Quit: bye]
barhum2013 has joined #ruby
Wompy has joined #ruby
n008f4g_ has joined #ruby
Derasi is now known as asi_
Wompy has left #ruby [#ruby]
baweaver has joined #ruby
tubuliferous_ has joined #ruby
`tim` has joined #ruby
v4n has quit [Ping timeout: 265 seconds]
binaryplease has joined #ruby
dnomyar has quit [Ping timeout: 260 seconds]
kadoppe has quit [Ping timeout: 255 seconds]
karapetyan has joined #ruby
based_pdev has joined #ruby
<Ox0dea> >> {BasicObject.new => 42} # jhass
<ruboto> Ox0dea # => undefined method `hash' for #<BasicObject:0x40ee81b8> (NoMethodError) ...check link for more (https://eval.in/457327)
oddjob has quit [Ping timeout: 246 seconds]
baweaver has quit [Ping timeout: 265 seconds]
mengu has joined #ruby
mengu has joined #ruby
<jfk> jhass: It can't use the inherited hook because the inherited hook is run before the instance methods get defined. I just realized this.
kadoppe has joined #ruby
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arthurix has joined #ruby
<jorb> my github-markup always fails like so.. http://pastebin.com/raw?i=Y4J0LfPH
<ruboto> jorb, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<jorb> ok robot.. that was what raw dows
nertzy has joined #ruby
<jorb> does
<jorb> yes i'm talking to a bot
<jhass> jfk: it can remember the class and get the instance methods only just before it's time to run
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
_aeris_ has quit [Ping timeout: 255 seconds]
arthurix_ has quit [Ping timeout: 246 seconds]
slackbotgz has quit [Remote host closed the connection]
barhum2013 has quit [Quit: barhum2013]
Renich has quit [Ping timeout: 272 seconds]
mbrownes has quit [Quit: Leaving]
Renich has joined #ruby
absolutejam has quit [Ping timeout: 244 seconds]
Wompy has joined #ruby
ruurd has quit [Ping timeout: 250 seconds]
<apeiros> jorb: you need to install an actual markup parsing gem. like redcarpet, maruku, rdiscount or whatver github-markup accepts.
<apeiros> probably documented
<jhass> apeiros: see my link
<apeiros> jhass: oh, for some reason I thought you were still responding to jfk
ekinmur has joined #ruby
baweaver has joined #ruby
dfockler has joined #ruby
moeabdol has quit [Ping timeout: 264 seconds]
pdoherty has quit [Ping timeout: 272 seconds]
simi has quit [Ping timeout: 264 seconds]
dnomyar has joined #ruby
atomical has joined #ruby
_aeris_ has joined #ruby
prestorium has quit [Quit: Leaving]
eminencehc has joined #ruby
leafybasil has joined #ruby
<jorb> def though i installed that but apparently not
Cyther has joined #ruby
solars has quit [Ping timeout: 268 seconds]
ruurd has joined #ruby
linocisco has quit [Ping timeout: 260 seconds]
urgt has joined #ruby
urgt is now known as Ulfalizer
prestorium has joined #ruby
arthurix_ has joined #ruby
momomomomo_ has joined #ruby
<jfk> Ox0dea: What does at_exit do?
momomomomo has quit [Ping timeout: 240 seconds]
momomomomo_ is now known as momomomomo
<Ox0dea> jfk: It registers a block to run before the program terminates.
<jfk> Ox0dea: Does it have to be inside the class?
<Ox0dea> jfk: No, #at_exit is a Kernel method.
<jfk> Ox0dea: Oh...okay...
<Ox0dea> jfk: By which I mean it's available from virtually anywhere.
skinux_ has joined #ruby
jwaldrip has quit [Quit: Be back later ...]
<jfk> Ox0dea: yeah.
absolutejam has joined #ruby
<Ox0dea> But why not take advantage of the fact that you've got the class variable in scope?
e1senhorn has left #ruby ["Textual IRC Client: www.textualapp.com"]
jimms has quit [Remote host closed the connection]
<Ox0dea> There's #class_variable_get if you want to put it elsewhere, but I can't think of a particularly good reason to do so.
Jackneill has joined #ruby
lxsameer has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
jwaldrip has joined #ruby
northfurr has joined #ruby
arthurix has quit [Ping timeout: 260 seconds]
<jorb> apeiros:thx
Channel6 has joined #ruby
<jorb> also needed to install ruby-dev
platzhirsch has quit [Remote host closed the connection]
<jorb> must have been in a hurry last time i needed this ....
VeryBewitching has joined #ruby
jwaldrip has quit [Ping timeout: 240 seconds]
willardg has quit [Quit: Textual IRC Client: www.textualapp.com]
<jfk> Ox0dea: This could be one way to run the methods: https://eval.in/457330
willardg has joined #ruby
willardg has quit [Client Quit]
northfurr has quit [Client Quit]
willardg has joined #ruby
pagios has quit [Ping timeout: 240 seconds]
pdoherty has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
<Ox0dea> jfk: That works, but are you sure it's what you're wanting to do?
bootstep has quit [Quit: Page closed]
p0wn3d has joined #ruby
<Ox0dea> `@@klass` will only be the most recent subclass when the exit handler runs.
devoldmx has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
<jfk> Ox0dea: Yeah. I'm not sure. I just wanted to see how methods could potentially be run automatically. This seems to be one way...
subscope has joined #ruby
<Ox0dea> jfk: It's how virtually all of the unit testing libraries do their thing, at any rate.
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheNet has quit [Quit: Leaving...]
IChoseSomethingE has joined #ruby
prestorium_ has joined #ruby
bricker has joined #ruby
jfk has left #ruby [#ruby]
Musashi007 has joined #ruby
prestorium has quit [Ping timeout: 256 seconds]
spuk has joined #ruby
<dnomyar> retry
blue_deref has joined #ruby
cdg has joined #ruby
eminencehc has quit [Remote host closed the connection]
<Ox0dea> __goto__
whippythellama has quit [Ping timeout: 240 seconds]
beauby has joined #ruby
<agent_white> Any list of a few ruby gems that I should checkout for learning 'proper' layout of a gem? I've just seen many do things different ways... /lib/gemname.rb files only having "'requires'" inside, other doing something different... blahblahblah. Just looking for a few gems to mimick for good gem structure :)
<apeiros> agent_white: none. use guides.rubygems.org
karapetyan has joined #ruby
momomomomo has quit [Quit: momomomomo]
lxsameer has quit [Ping timeout: 250 seconds]
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> as for good gem structure - care about the result. my paradigm is that any individual require will require all its dependencies on its own. i.e. require 'foo/bar' will always mean you can use all of Foo::Bar without an additional require.
<agent_white> apeiros: Thank you :) I've followed that but it doesn't go as 'into it' as I'm aiming.
<agent_white> apeiros: Ahhh okey doke!
<apeiros> s/gem structure/require structure/
agent_white has quit [Quit: Lost terminal]
stamina has quit [Ping timeout: 250 seconds]
pathrocle has joined #ruby
agent_white has joined #ruby
mag42c has quit [Quit: mag42c]
<apeiros> since autoloading is now threadsafe and no longer on the deprecation list, I also started experimenting with top levels autoloading sublevels. but mostly for things where it'd actually be costly to pre-require.
momomomomo has joined #ruby
<agent_white> apeiros: Crap. Restarted my window manager and lost the chat. WOuld you mind re-pasting what you just said?
<apeiros> autoloading limits exploration quite a bit. stuff only appears once it's used.
<apeiros> irclog ;-p
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agent_white> apeiros: Ahhh I hope I got it going with irssi... shame on me if not. :P
blackmesa has joined #ruby
mag42c has joined #ruby
p0wn3d has quit [Ping timeout: 250 seconds]
eminencehc has joined #ruby
moei has quit [Quit: Leaving...]
EllisTAA has quit [Quit: EllisTAA]
<agent_white> apeiros: Yeah I'm just noticing that my code for this IRC bot... is not good. I'm passing instances to modules and it's ugly looking. Thinking my whole structure needs to be fixed (starting with not 'requiring' mixins and figuring where to 'include' instead?) -- Probably makes no sense, I'm terrible at explaining things. https://github.com/jakenotjacob/vapebot -- Here's my code if you care to peek.
trabulmonkee has joined #ruby
<agent_white> I just know that the fact I have to pass the 'primary' class instance to each module shows I'm doing things VERY wrong.
ruurd has quit [Quit: ZZZzzz…]
<jhass> ?logs
<ruboto> You can find a log of this channel at http://irclog.whitequark.org/ruby/
<apeiros> agent_white: in vapebot.rb, I'd define the module Vapebot and use it as the home of the docs of that module.
benlovell has joined #ruby
jwaldrip has joined #ruby
<apeiros> agent_white: `#!/usr/bin/env ruby` only belongs into executables. not in any file in your lib.
<agent_white> apeiros: Ah ok! So I'd only need to require the 'main class' in that file? And okey doke! I was wondering about that...
<agent_white> require "vapebot/bot"; module Vapebot; def self.run; Vapebot::Bot.run; end; end;
<apeiros> agent_white: as an example of how I do it: https://github.com/jakenotjacob/vapebot/blob/master/lib/vapebot/connection.rb uses IRC::Server and IRC::Channel, so it should require those.
trabulmonkee has quit [Client Quit]
whippythellama has joined #ruby
ruby-lang186 has quit [Ping timeout: 246 seconds]
<apeiros> agent_white: with my old style I'd have all the requires you currently have in vapebot.rb too. with my new style I'd use autoloading. I'm not sure yet whether I like that.
<agent_white> apeiros: Ah alrighty :) Yeah I have no preference at all... just was trying to figure out the best way to do it, dove into a buncha github projects and found a few that did it this way so I followed.
binaryplease has quit [Quit: WeeChat 1.3]
vigintas has quit [Ping timeout: 244 seconds]
dmitch has joined #ruby
<agent_white> apeiros: Awesome! Just what I was loooking for. I appreciate the help :))
devoldmx has joined #ruby
QORRiE has joined #ruby
kaleido has quit [Quit: Textual IRC Client: www.textualapp.com]
mag42c has quit [Ping timeout: 250 seconds]
mary5030 has quit [Remote host closed the connection]
Motoservo has joined #ruby
g105b has joined #ruby
<agent_white> Also, on that note... this project is basically to make a factoid bot for a channel. Have some authorized users who can add factoids, and mask factoids usable for authorized users(prolly one group, 'admin' or whatnot)/everyone else. Would SQlite even be overkill since there's not too many relations involved?
niemcu has joined #ruby
vF3hNGxc47h8 has joined #ruby
<agent_white> I was aiming towards just using `sdbm` since it's built-into ruby, and a simple key-value lookup seems like it's suffice...
ldnunes_ has quit [Quit: Leaving]
baweaver has quit [Ping timeout: 250 seconds]
<g105b> Can someone help a newbie Ruby dev build a project (trix)? I'm running Ubuntu 15.10, and following the commands (https://github.com/basecamp/trix#building-from-source) I get an issue with the `bundle install` command: https://gist.github.com/g105b/054e917e791b8b64bed3
yfeldblum has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
northfurr has joined #ruby
<apeiros> agent_white: sqlite is barely ever overkill
nemo_ has quit [Remote host closed the connection]
davedev24 has quit []
<agent_white> apeiros: That's what I was balancing... I know, as it's namesake says, it's VERY lightweight. But just was unsure if relations were even needed... hell I could store it in a text file I spose ;P Just wasn't sure the 'best fit'
<apeiros> best fit is what takes the least effort.
jgpawletko has joined #ruby
<apeiros> it's not bad if it's not actually a good choice. it helps encountering issues with least-effort solutions. helps you with your choices in the future.
baweaver has joined #ruby
diegoaguilar has joined #ruby
crdpink has joined #ruby
cyle has joined #ruby
ahegyi has quit [Ping timeout: 240 seconds]
ibouvousaime has quit [Ping timeout: 265 seconds]
crdpink2 has quit [Ping timeout: 246 seconds]
<agent_white> Good deal :) I'll tinker a bit more with the sqlite gem. Just was turned off by having to use SQL queries directly.
syath has quit [Quit: WeeChat 1.2]
K1MOS has joined #ruby
moei has joined #ruby
K1MOS is now known as moos3
<apeiros> oh with sqlite, I'd use at least sequel (not necessarily the orm)
yqt has joined #ruby
maletor has quit [Ping timeout: 264 seconds]
ibouvousaime has joined #ruby
XxionxX has joined #ruby
baroquebobcat has joined #ruby
Limix has joined #ruby
northfurr has quit [Quit: northfurr]
northfurr has joined #ruby
<agent_white> So far I've just used sql directly... not fun :P That's why I was looking into using sdbm instead.
agent_white is now known as farpend
yashinbasement has joined #ruby
farpend is now known as darfk
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
<ytti> darfk, use sequel, it's greeeeat
g105b has quit [Quit: Page closed]
uber has quit [Ping timeout: 240 seconds]
darfk is now known as agent_white
<agent_white> ytti: /me sips coffee
New_to_Ruby has joined #ruby
axl_ has joined #ruby
<New_to_Ruby> Hello
axl_ has quit [Client Quit]
<jhass> hi
crime has joined #ruby
<New_to_Ruby> How are you <jhass>?
<jhass> no need for smalltalk ;)
Ulfalizer has quit [Quit: zZ]
alexdunne has joined #ruby
<crime> shoot, I hear smalltalk made quite the influence on ruby
<adaedra> No need for <> either.
centrx has quit [Remote host closed the connection]
<adaedra> crime: nice.
arup_r has quit [Quit: Leaving]
<crime> ;)
ibouvousaime has quit [Ping timeout: 256 seconds]
stamina has joined #ruby
<apeiros> crime: #ruby-offtopic is the smalltalk channel. though I guess there's #smalltalk too. but no idea whether you can have smalltalk there…
<crime> i was just trying to be punny for a moment
roxtrongo has quit [Remote host closed the connection]
<New_to_Ruby> Sorry. I'm starting my 2nd week of teaching myself Ruby and have a question. Is it possible to add variables if I used $stdin.gets.chomp.to_i to get the input? The code I have treats them like strings.
neohunter has joined #ruby
ivanskie has joined #ruby
cyle has quit [Ping timeout: 250 seconds]
arthurix has joined #ruby
<crime> New_to_Ruby: you could do like: while line = @stdin.gets.chomp.to_i puts line end
<crime> but .to_i should convert those strings into integers already
prestorium_ is now known as prestorium
cyle has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<New_to_Ruby> That's what I thought, crime. When I puts " You gave me #{x} and #{y}. Together they equal #{x + y}." it isn't adding the user inputs.
alexdunne has quit [Ping timeout: 240 seconds]
arthurix_ has quit [Ping timeout: 265 seconds]
<New_to_Ruby> So "Give me a number"
<New_to_Ruby> number = $stdin.gets.chomp.to_i
<jhass> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
willardg has joined #ruby
<crime> could you paste your code on pastebin or something and show me?
baweaver has joined #ruby
<New_to_Ruby> Ha
<New_to_Ruby> yeah
<New_to_Ruby> sorry
<crime> or github or wherever
<New_to_Ruby> un momento
<crime> yeah np, itd just be easier to see it
<agent_white> apeiros: Oh woops, misread your response. So you would recommend sqlite at least?
mag42c has joined #ruby
<apeiros> agent_white: I would recommend using sequel if you use sqlite.
baroquebobcat has quit [Quit: baroquebobcat]
<apeiros> sequel is a database adapter
<ruby-lang993> New_to_Ruby, you can also use rubyfiddle.com for small-scale code, I use it a lot
northfurr has quit [Quit: northfurr]
baroquebobcat has joined #ruby
jpfuentes2 has joined #ruby
<agent_white> apeiros: Oh!!! Thought you were sounding it out haha. I'll look into it, thank you! Prior to that though, was it a 'decent' idea to checkout a key-val store like sdbm? Or was I aiming for trouble?
<crime> repl.it is really cool, similar functionality
QORRiE has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
<shevy> takes quite a while for me to load up repl.it compared to e. g. gist or pastie
<apeiros> agent_white: as said, go for least effort.
<apeiros> if you think sdbm will be less effort than sqlite, then go for it. try it.
<apeiros> you can always "go bigger"
pocketprotector- has joined #ruby
momomomomo has quit [Quit: momomomomo]
<agent_white> apeiros: Alrighty :) No rush for this project anyways. Just for learning purposes. Maybe I'll try each just to see.
last_staff has quit [Quit: last_staff]
<Ox0dea> New_to_Ruby: https://eval.in/457377
<apeiros> agent_white: there's also pstore in stdlib which might be simple.
<Ox0dea> New_to_Ruby: Your code is correct; you just need to be practicing in a better environment.
retornam has quit [Ping timeout: 240 seconds]
skullcrasher has quit [Ping timeout: 240 seconds]
<agent_white> apeiros: I did glance into that... but forgot to go back. Thanks for the reminder :) That might be better than sdbm.
<New_to_Ruby> I see. I am using Notepad++ and cmd. Which environment do you suggest?
<Ox0dea> New_to_Ruby: Anything that doesn't tell you your code is wrong when it isn't?
<apeiros> agent_white: I have no idea which is better :)
<crime> New_to_Ruby: what do you get when you run that code wherever you are?
eminencehc has quit [Remote host closed the connection]
<crime> and when you are putting in the input you are just typing the number and not the number in quotes, right?
<Ox0dea> agent_white: Hash + Marshal = the simplest thing that could possibly work.
pdoherty has quit [Ping timeout: 256 seconds]
<crime> redis + msgpack isnt terrible either, but thats just me
`tim` has joined #ruby
skullcrasher has joined #ruby
<New_to_Ruby> Before if I inputted 1 and 2, it would say the total is 12. But now it is giving me the correct answer. I have no idea what changed.
<crime> thats string then
<crime> "1" + "2" is "12"
<New_to_Ruby> Because I was getting 12, that lead me to believe I hadn't correctly converted to integer. And no, I was not using "", crime.
<crime> huh
<Ox0dea> New_to_Ruby: You don't know which method you used to convert your input strings to numbers?
skade has quit [Ping timeout: 260 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
retornam has joined #ruby
uber has joined #ruby
<shevy> he writes magic code!
felixr has joined #ruby
felixr is now known as felixrsmith
<Ox0dea> New_to_Ruby: Do you have something with which to hit yourself
<Ox0dea> +?
<shevy> haha
<shevy> take a cat
<New_to_Ruby> There are a few empty beer bottles to my left.
<Ox0dea> New_to_Ruby: Grab one.
blackoperat has joined #ruby
<New_to_Ruby> Done
eminencehc has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> here is the problem - no beer
<Ox0dea> New_to_Ruby: You have committed the cardinal sin of posting an image of text. Do you know what you must do?
otherj has joined #ruby
<crime> block out the haters?
<New_to_Ruby> Did I mention I started a week ago?
<apeiros> repent and repost
opensource_ninja has quit [Quit: opensource_ninja]
<apeiros> (as text, oc)
<Ox0dea> New_to_Ruby: In all seriousness, you weren't converting your strings when you got "12", and you were when you got 3; what changed?
eminencehc has quit [Remote host closed the connection]
<ruby-lang993> New_to_ruby, post your code from your text editor to Rubyfiddle so we can see you changed in your code
<ruby-lang993> posting the outputs from powershell doesnt show what you changed in your code
<shevy> oh dear
synthroid has quit []
jgpawletko has quit [Quit: jgpawletko]
<New_to_Ruby> You see, here's the thing. I kind of updated and saved in the editor before pasting it in fiddler. I couldn't tell you what changed. So, new guy mistake. Lesson learned.
djbkd has quit [Remote host closed the connection]
<Ox0dea> New_to_Ruby: I'm asking you to retroactively solve the mystery.
<ruby-lang993> Crtl + Z?
<New_to_Ruby> Okay
djbkd has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<New_to_Ruby> Holy canoli. I didn't think the editor would go back that far.
<crime> the power of ropes
<New_to_Ruby> I definitely did not convert the strings to integers
<crime> aha!
<Ox0dea> New_to_Ruby: But then you did, right?
<crime> we've all done it before
lfox has joined #ruby
<New_to_Ruby> I did, 0x0dea.
<ruby-lang993> Tune in next week to see how Sherlock solves his next mystery of string interpolation
<Ox0dea> New_to_Ruby: How did you do it?
howdoicomputer has quit [Ping timeout: 246 seconds]
<crime> Ox0dea has got that socratic method down so tight
<New_to_Ruby> But then I tried defining a method called input because typing $stdin.gets.chomp.to_i for each variable was a pain. That didn't work. http://rubyfiddle.com/riddles/f26ac/2
DoubleMalt has quit [Remote host closed the connection]
<Ox0dea> New_to_Ruby: Once again, your code is fine: https://eval.in/457379
<New_to_Ruby> brb switching environments
<Ox0dea> Right?
davedev24 has joined #ruby
DoubleMalt has joined #ruby
pdoherty has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
<New_to_Ruby> Imagine how much quicker I could progress if the editor wasn't giving me crap. I've probably spent a 1/3 of my time on issues that weren't issues.
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
djbkd has joined #ruby
<crime> i use nano and rubocop and irb and thats it. it CAN be done
momomomomo has joined #ruby
umgrosscol has quit [Remote host closed the connection]
<New_to_Ruby> I started with vim, which I loved. Is Komodo reliable?
subscope has joined #ruby
symm- has joined #ruby
codecop has quit [Quit: Išeinu]
symm-_ has quit [Ping timeout: 260 seconds]
<ruby-lang993> https://c9.io, I use this to practice, Cloud IDE
spcmastertim has quit [Quit: Leaving]
<ruby-lang993> since i can't install an IDE at my work computer
ibouvousaime has joined #ruby
davedev2_ has joined #ruby
<New_to_Ruby> That cloud ide looks cool. I'll give that a try.
jimms has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
<New_to_Ruby> Thus far I've tried Sublime, vim, and notepad++.
colegatron has quit [Ping timeout: 246 seconds]
<crime> if you like vim and can use it easily, that's a good choice
<crime> lots of plugins and advanced functionality
northfurr has joined #ruby
<crime> but ultimately its about comfort
opensource_ninja has joined #ruby
sp4rrow has joined #ruby
Miron has quit [Ping timeout: 246 seconds]
<agent_white> I got pink dsa/pbt keycaps last week for my keyboard :) Very comfy.
davedev24 has quit [Ping timeout: 246 seconds]
phutchins has joined #ruby
_blizzy_ has joined #ruby
northfurr has quit [Client Quit]
Miron has joined #ruby
<New_to_Ruby> Maybe you can clear something up for me. What's a better way of doing this? https://eval.in/457382
<shevy> New_to_Ruby you are asking for user input 3 times
howdoicomputer has joined #ruby
<shevy> you don't use any methods
<karapetyan> simples way convert integer to array? each digit to separate element of array?
Musashi007 has quit [Quit: Musashi007]
<karapetyan> arr.to_s.split(//)?
<crime> >> 456.to_s.split('')
<ruboto> crime # => ["4", "5", "6"] (https://eval.in/457383)
davedev2_ has quit [Ping timeout: 240 seconds]
<karapetyan> oh sorrt 5251.to_s.split(//)
<karapetyan> ok
<karapetyan> thanks
<karapetyan> thanks
<crime> and then if you need each number as a number, just do .to_i on each one
<crime> yeah np
davedev24 has joined #ruby
<crime> oh, you could also do 456.to_s.chars
<momomomomo> or just divide by 10, that's the leftover, then mod the original by 10 and that's the last number
<crime> >> 456.to_s.chars
<ruboto> crime # => ["4", "5", "6"] (https://eval.in/457384)
<momomomomo> >> i = 456 / 10; j = 456 %10; puts "i: #{i}; j: #{j}"
<ruboto> momomomomo # => i: 45; j: 6 ...check link for more (https://eval.in/457386)
<crime> oo yeah, thats cool too
<momomomomo> do this recursively, and your'e done
<crime> where'd ya learn that?
Musashi007 has joined #ruby
<momomomomo> a programming abstractions class or something
<crime> thats cool, that seems like something one of those old school programmers would come up with'
<Ox0dea> > #gets looks to argv for variables.
zotherstupidguy has quit [Ping timeout: 240 seconds]
riceandbeans has joined #ruby
<Ox0dea> New_to_Ruby: I am genuinely interested in how you came to believe something like that.
<momomomomo> crime: but yeah, to_s and to i is much easier just to get it done :P
benlovell has quit [Ping timeout: 268 seconds]
<New_to_Ruby> Believe something like what? 0x0dea
benlovell has joined #ruby
<riceandbeans> I have an array that I want to turn into a comma delimited string, but I don't want quotes inside, how would I do that?
<crime> i suppose
<Ox0dea> New_to_Ruby: That #gets has anything to do with ARGV.
SamGerber has joined #ruby
<Ox0dea> >> %w[foo bar baz].join(',') # riceandbeans
<ruboto> Ox0dea # => "foo,bar,baz" (https://eval.in/457387)
hiyosi has joined #ruby
<Ox0dea> New_to_Ruby: I suspect you are being taught Ruby by somebody who hates Ruby. :P
<New_to_Ruby> Oh. When I originally tried to run the code I didn't have the argv.clear and was recieving a message stating 'gets' was an undefined method. I Googled the message and found someone on stackoverflow who said gets looked at argv before user input.
<riceandbeans> I have like ['foo', 'bar', 'baz'].map(&:inspect).join(',')
<Ox0dea> riceandbeans: Why?
<apeiros> New_to_Ruby: gets is actually ARGF.gets. you probably want to explicitly use $stdin.gets
<riceandbeans> but it's coming out as 'foo','bar','baz'
<riceandbeans> I want 'foo,bar,baz'
<New_to_Ruby> I originally went through Code Academy, then read Why's_, and am now going through Learn Ruby the hard way. 0x0dea.
n008f4g_ has quit [Ping timeout: 252 seconds]
<Ox0dea> New_to_Ruby: I'm going to cry.
<momomomomo> >> ['"hello"', '"there"', "123"].reduce([]) { |ary, elem| ary << elem.gsub(/[\"\']/, ''); ary }
<ruboto> momomomomo # => ["hello", "there", "123"] (https://eval.in/457388)
<riceandbeans> Ox0dea: I saw it on stackoverflow
<New_to_Ruby> lol
SamGerber has quit [Client Quit]
yfeldblum has joined #ruby
<ruby-lang993> Dont do LRTHW, its essentially a line by line translation of Learn Python the Hard Way
zotherstupidguy has joined #ruby
<momomomomo> >> ['"hello"', '"there"', "123"].reduce("") { |str, elem| str += elem.gsub(/[\"\']/, ''); ary }
<ruboto> momomomomo # => undefined local variable or method `ary' for main:Object (NameError) ...check link for more (https://eval.in/457389)
<riceandbeans> if I have no clue, that's my first place to search
davedev24 has quit [Ping timeout: 246 seconds]
<Ox0dea> Ruby really is the new PHP.
<momomomomo> >> ['"hello"', '"there"', "123"].reduce("") { |str, elem| str += "," + elem.gsub(/[\"\']/, ''); str }
zotherstupidguy has quit [Client Quit]
<ruboto> momomomomo # => ",hello,there,123" (https://eval.in/457390)
<Ox0dea> momomomomo: Stop?
<momomomomo> ah shieze, leading ","
<New_to_Ruby> Outside of googling error messages, you are the first people I've come to with questions.
<danneu> riceandbeans: consider just using a csv serializer
<Ox0dea> The problem is that riceandbeans is invoking #inspect for no apparently good reason.
<danneu> classic mistake: 'csv is easy, i'll just write my own serializer'
<danneu> ^ look for the meta joke
arthurix_ has joined #ruby
uber has quit [Ping timeout: 260 seconds]
<apeiros> Ox0dea: if ruby is the new php, and the new ruby will be as much more polished as ruby is more polished than php, then I won't complain about that :D
shock_one has quit []
<adaedra> I've got a very good serializer: File.open('/dev/null', 'w')
<apeiros> adaedra: isn't that a lossy compressor?
<riceandbeans> I don't understand what inspect is
<apeiros> the compression rate is awesome, though
lfox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<riceandbeans> so I don't understand why I'm using it incorrectly
<adaedra> apeiros: who cares, it's webscale!
<agent_white> riceandbeans: A wat... ["foo", "bar"].join(",")
<agent_white> Is that what you want?
<Ox0dea> >> ['foo'.length, 'foo'.inspect.length] # riceandbeans: Why the difference?
<ruboto> Ox0dea # => [3, 5] (https://eval.in/457391)
<New_to_Ruby> So, 0x0dea. What would you suggest I use to learn Ruby?
<Ox0dea> agent_white: Yes.
<Ox0dea> New_to_Ruby: Get a proper environment and do the Koans.
<danneu> riceandbeans: inspect was actually a good strategy. i recommend your original solution so that you can assume each csv column is wrapped in '"'
<danneu> inspect escapes inner quotes for you
<adaedra> I was confused for a second: "But, CSVs are with ;", then I remembered.
<agent_white> riceandbeans: Think smaller. You have an array of strings, you wanna join them together with a comma. Thus, the above.
<Ox0dea> danneu: riceandbeans specifically mentioned their desire not to have quoted strings in the result.
arthurix has quit [Ping timeout: 240 seconds]
<danneu> fun times with CSV
<New_to_Ruby> I will do that. Seriously, thanks people. It's been a humbling, terrifying experience coming here.
<New_to_Ruby> I'm going to go and spend some time with KOANS.
<Ox0dea> danneu: The customer is always right, especially when they don't know how wrong they are.
<Ox0dea> New_to_Ruby: Honest question: why all caps there?
freerobby has joined #ruby
<crime> New_to_Ruby: we are always willing to help someone willing to learn
<riceandbeans> so I should take out the inspect and just do .join?
<Ox0dea> ?try riceandbeans
<ruboto> riceandbeans, Why don't you try it and see for yourself?
<danneu> riceandbeans: what is the end goal here?
<Ox0dea> danneu: Chaos.
<agent_white> riceandbeans: I answered you already above, too.
<danneu> i recommend array.join(',') if you're not the one that ever has to parse it
GnuYawk has quit [Ping timeout: 240 seconds]
<Ox0dea> >> [1, 2, 3] * ?+
<ruboto> Ox0dea # => "1+2+3" (https://eval.in/457392)
mloy has left #ruby ["Leaving"]
<Ox0dea> That's my recommendation.
<crime> did Zed write LRTHW before or after the Rails-ghetto debacle?
<agent_white> Ox0dea: Ooo! That's fancy :) I like it.
<riceandbeans> >> ['foo', 'bar', 'baz'].join(',')
<ruboto> riceandbeans # => "foo,bar,baz" (https://eval.in/457393)
<apeiros> riceandbeans: I'm somewhat amazed at "I came up with foo.map(&:inspect)" combined with "I don't know what inspect is" - how did you think of using inspect in the first place then, not knowing what it is? o0
<New_to_Ruby> 0x0dea I visited the Koans site and before typing that message the last thing I saw was "WITH THE NEO RUBY KOANS".
benlovell has quit [Ping timeout: 255 seconds]
<ruby-lang993> New_to_ruby, also visit codewars
<Ox0dea> New_to_Ruby: But it's not in all caps...
<New_to_Ruby> Thanks, crime. I may be back after spending a few days with Koans.
<ruby-lang993> its like game version of giving programming challenges you can practice
<riceandbeans> apeiros: I said, I had no idea, thus I googled 'stackoverflow ruby convert array to comma delimited string'
eminencehc has joined #ruby
<New_to_Ruby> 0x0dea It was in all caps in one place on their site, which is what I saw. So that's how I typed it.
<apeiros> oh, copypasta. I see.
<crime> New_to_Ruby: I'm sure I speak for the whole channel when I saw you are welcome anytime, the koans are a lot of fun too if you keep your head up
skcin7 has joined #ruby
<Ox0dea> /part #php
<riceandbeans> apeiros: when has copypasta ever failed before? :P
* agent_white puts channel on slow-mo
<apeiros> riceandbeans: every time?
Chaoborid has joined #ruby
<riceandbeans> when I have no idea, I always check stackoverflow first
<ruby-lang993> you can practice Ruby and gain "honor points" for prestige
rbennacer has quit [Remote host closed the connection]
<ruby-lang993> imo, its actually pretty addicting
<apeiros> riceandbeans: that's a good idea. but mindlessly copying a solution from there not so much.
<crime> I'm gonna start on codewars I think, looks fun
<ruby-lang993> very fun, crime
<riceandbeans> apeiros: well I didn't completely mindlessly do it
<Ox0dea> >> ['foo'.length, 'foo'.inspect.length] # riceandbeans: Why the difference?
<ruboto> Ox0dea # => [3, 5] (https://eval.in/457394)
SamGerber has joined #ruby
<danneu> >> ['foo', 'bar,baz', 'qux'].join(',')
<ruboto> danneu # => "foo,bar,baz,qux" (https://eval.in/457395)
<riceandbeans> apeiros: I actually read the core lib for the inspect function and map funciton
<riceandbeans> I still didn't understand though
<danneu> >> ['foo', 'bar,baz', 'qux'].map(&:inspect).join(',')
<ruboto> danneu # => "\"foo\",\"bar,baz\",\"qux\"" (https://eval.in/457396)
New_to_Ruby has quit [Quit: Page closed]
<ruby-lang993> You can choose to view the solutions to a problem anytime, but the site shames you and makes you forfeit honor, so you feel extra motivated to solve the problem of your own accord
<danneu> riceandbeans: look at the two examples to see why .inspect was used
<banister> >> a = []; a.push(a); a.flatten.count
<ruboto> banister # => tried to flatten recursive array (ArgumentError) ...check link for more (https://eval.in/457397)
treehug88 has quit [Remote host closed the connection]
skcin7 has quit [Client Quit]
<Ox0dea> >> (a = []) << a; a[0][0][0] == a
<ruboto> Ox0dea # => true (https://eval.in/457398)
<crime> Enlist as a Sign Up button is genius
rbennacer has joined #ruby
<ruby-lang993> crime
<Ox0dea> punishment
otherj has quit [Quit: .]
<crime> yo
<adaedra> ga
<ruby-lang993> www.codewars.com/r/jXq9dQ, can you sign up with this link?
<ruby-lang993> This is my referral link, so I get honor for inviting people, serious business
<danneu> anyone buying anything from amazon soon? got some special links for you, too
jimms has quit []
<crime> oh
<crime> uh
<crime> i already signed up
snockerton has quit [Ping timeout: 265 seconds]
<Ox0dea> Shucks.
<crime> sorry i didnt know
<crime> i would have if I had known that, honest
dfockler has quit [Ping timeout: 250 seconds]
rbowlby has joined #ruby
<crime> danneu: you dont jet.com yet?
luckyruby has joined #ruby
<danneu> livin abroad
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> “Looks like you're outside of the US” – Racism.
snockerton has joined #ruby
Musashi007 has quit [Quit: Musashi007]
subscope has joined #ruby
<crime> man itd really be nice to have an irb session docked into the window on codewars
cornerma1 has joined #ruby
yardenbar has quit [Ping timeout: 240 seconds]
firstdayonthejob has joined #ruby
colin_ has joined #ruby
sepp2k1 has joined #ruby
everbot has joined #ruby
Musashi007 has joined #ruby
<danneu> reminds me of that website that got recently hacked because they acidentally pushed that debugger-repl-on-error-page business to production
sepp2k has quit [Ping timeout: 265 seconds]
<shevy> noobs
kobain has joined #ruby
cornerman has quit [Ping timeout: 264 seconds]
decoponio has quit [Quit: Leaving...]
cornerma1 is now known as cornerman
<danneu> riceandbeans: consider sidestepping csv nonsense altogether and use json, if possible
<Ox0dea> danneu: Did you mean YAML?
<apeiros> did you mean xml?
<danneu> i meant EDN
<apeiros> BER?
<Ox0dea> EDN is quite nice.
* apeiros googles edn
<havenwood> apeiros: Clojure
<danneu> it's Rich Hickey's serialization
colstrom_ has joined #ruby
<danneu> he just happened to write an eval fn for it they call clojure
<shevy> cool one more format
eminencehc has quit [Remote host closed the connection]
jobewan has joined #ruby
<havenwood> apeiros: that's the one
eminencehc has joined #ruby
<apeiros> \uNNNN - so no 4byte unicode
<crime> s expressions is really the only way though
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bb010g has quit [Quit: Connection closed for inactivity]
<shevy> good(old(lisp
<miah> why not EBNF?
<Ox0dea> crime: You're not wrong, but we needn't use () as the only delimiters.
<crime> ))
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crime> shevy dont
ruby-lang996 has joined #ruby
<crime> that unevenness will stick with you forever
vigintas has joined #ruby
<Ox0dea> shevy didn't even wrap it.
<ruby-lang996> can someone help me figure out why this isnt working properly?
<crime> I have a file that contains lines upon lines of )))))s to balance me out
<crime> i look at it now and then when i feel bad
<danneu> ruby-lang996: line43?
luckyruby has quit [Remote host closed the connection]
<momomomomo> ruby-lang993: !ask
<jhass> ?ask ruby-lang993
<ruboto> ruby-lang993, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
djbkd has quit [Read error: Connection reset by peer]
<danneu> yall got the wrong ruby-lang
<jhass> er, 96
pdoherty has quit [Ping timeout: 272 seconds]
<jhass> ruby-lang, get a proper /nick!
luckyruby has joined #ruby
djbkd has joined #ruby
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
<danneu> i think it's a nonce that's inc'd every Q they ask
<momomomomo> oh this is #ruby
<ruby-lang996> danneu: just a typo in the gist file. thats not the issue
pdoherty has joined #ruby
<momomomomo> what's the 'to get good answers' command jhass
Musashi007 has quit [Quit: Musashi007]
<slash_nick> /nick?
<jhass> momomomomo: ?answers
<momomomomo> ruby-lang996: ?answers
<Ox0dea> >> 1 == "1" # ruby-lang996
<ruboto> Ox0dea # => false (https://eval.in/457400)
<momomomomo> fix your bot
<momomomomo> ?answers
<ruboto> How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
<momomomomo> see that ruby-lang996 .mn .mn
<jhass> momomomomo: recognize patterns?
al2o3-cr has quit [Read error: Connection reset by peer]
<ruby-lang996> ?answers
<ruboto> How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
<momomomomo> read that
davedev24 has joined #ruby
subscope has joined #ruby
<crime> so I'm doing codewars now and stuck on my first puzzle, that last word is somehow not getting changed: https://eval.in/457401
<crime> no clue why
axl_ has joined #ruby
<ruby-lang996> whats ?answers?
BraddPit1 is now known as BraddPitt
gregoriokusowski has quit [Quit: gregoriokusowski]
<adaedra> ruby-lang996: read what ruboto said.
<crime> its an article about asking questions
<crime> ruboto has commands for links that get posted alot
<crime> ?experiment
<ruboto> Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
axl_ has quit [Client Quit]
saddad has quit [Ping timeout: 265 seconds]
colin_ has quit [Remote host closed the connection]
<adaedra> ?botsnack
<ruboto> nomnomnomnom
Igorshp has joined #ruby
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
<crime> ?skynet
<ruboto> I don't know anything about skynet
<crime> good
ruby-lang993 has quit [Ping timeout: 246 seconds]
<apeiros> it's pretending.
uber has joined #ruby
<danneu> ruby-lang996: try gets.chomp.to_i
<crime> ?prime_directive
<ruboto> I don't know anything about prime_directive
<apeiros> don't trust it
<crime> concerning
<crime> ?three_laws
<ruboto> I don't know anything about three_laws
<miah> do you think bots involved with skynet would just tell you that kind of information?
lkba has joined #ruby
<`derpy> No evil bot plotting in this channel. Nuh-huh.
<ruby-lang996> danneu: that was it. thanks
<momomomomo> >> puts ENV['HOME']
<ruboto> momomomomo # => /tmp/execpad-222aec541742 ...check link for more (https://eval.in/457402)
<danneu> ruby-lang996: credit to Ox0dea
<apeiros> I actually enjoyed how asimov dissected the three laws in his later books.
tvw has joined #ruby
<Ox0dea> >> 'Tomorrow is going to be raining'.gsub(/[aeiou]/i) { $~.begin(0) + 1 } # crime
<ruboto> Ox0dea # => "T2m4rr7w 10s g1415ng t20 b23 r2627n29ng" (https://eval.in/457403)
<Ox0dea> But please ignore me.
<apeiros> particularly funny was the one where the robots evaluated what constituted to be human, and concluded that by all going definitions, they were human.
<crime> ugh
<crime> i like the perliness
<Ox0dea> Me too. <3
<crime> but i dont like that I didnt think of that
<Ox0dea> Me neither. :(
<jhass> crime: you insert more than single letters, so the indexes of your target shift
<Ox0dea> jhass: Mutable strings are bad, you say?
momomomomo has quit [Quit: momomomomo]
<crime> oh
<apeiros> mutable strings are love, mutable strings are life.
<jhass> Ox0dea: maybe, didn't fully make up my mind yet
<adaedra> yay for mutability?
<Ox0dea> It's a hard problem.
<crime> so should I work from the back then?
<jhass> immutable strings are slow
axl_ has joined #ruby
elaptics`away is now known as elaptics`
<jhass> crime: or build a target array to join
_blizzy_ has quit [Read error: Connection reset by peer]
<crime> i feel stupid doing these problems
<crime> but i guess thats the point
IChoseSomethingE has quit [Quit: IChoseSomethingE]
<jhass> >> 'Tomorrow is going to be raining'.each_char.map.with_index {|c, i| "aeiou".include?(c.downcase) ? i+1 : c }.join
<ruboto> jhass # => "T2m4rr7w 10s g1415ng t20 b23 r2627n29ng" (https://eval.in/457404)
<jhass> and yes, that's terribly inefficient
blackoperat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
petricore has joined #ruby
petricore has quit [Client Quit]
<ericwood_> but it's beautiful :')
<danneu> crime: in my experience people have a harder time writing easy to understand code than they do golfing code into one-liners
<jhass> could be an interesting code golf variant actually, write programs that hit a defined runtime as close as possible without using sleep or anything like that
towski_ has quit [Ping timeout: 264 seconds]
<crime> my solution https://eval.in/457405
Voker57 has quit [Remote host closed the connection]
<jhass> "List the first 20 prime numbers, every 5 seconds one"
<crime> >> 5.responds_to?(:seconds)
<ruboto> crime # => undefined method `responds_to?' for 5:Fixnum (NoMethodError) ...check link for more (https://eval.in/457407)
<crime> hm
<jhass> you just wrote Crystal :P
<crime> i was just checking
<crime> to see if that was a thing
<jhass> in Ruby it's an ActiveSupport thing
<jhass> .seconds that is
<jhass> .responds_to? is still Crystal, Ruby is respond_to?
<crime> OH
<crime> i see what you mean
<crime> *whoosh*
<crime> I can definitely solve that though
<jhass> without sleep!
<crime> oh
<crime> ok then
bruno- has joined #ruby
northfurr has joined #ruby
<adaedra> But sleep :<
GnuYawk has joined #ruby
bruno- is now known as Guest95784
luckyruby has quit [Quit: Leaving...]
<crime> I can still do it
shpoont has joined #ruby
<crime> there's really no prime? thats slightly obnoxious
<Ox0dea> >> require 'prime'; 17.prime?
<ruboto> Ox0dea # => true (https://eval.in/457408)
<crime> jhass, is that allowed?
Jackneill has quit [Ping timeout: 250 seconds]
<jhass> yeah
<crime> k
skade has joined #ruby
Igorshp has quit [Read error: Connection reset by peer]
snockerton has quit [Read error: Connection reset by peer]
Igorshp_ has joined #ruby
<jhass> but you're only allowed a busy loop or Time.now, not both
snockerton has joined #ruby
skinux_ has quit [Ping timeout: 265 seconds]
<crime> i gotcha
<crime> dont worry
<crime> oh wait
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crime> whatever lemme write it first
<crime> i'll fix it after
lfox has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
subscope has joined #ruby
eminencehc has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
skade has quit [Read error: No route to host]
devoldmx has quit [Remote host closed the connection]
baweaver has joined #ruby
subscope has quit [Client Quit]
poguez_ has joined #ruby
zarubin has joined #ruby
skade has joined #ruby
<yxhuvud> jhass: hmm. speaking of crystal, just got my earley parser to correctly recognize input. (yeah, it is not very useful until the recognized items can be made into a syntax tree, but still)
zarubin has quit [Client Quit]
devoldmx has joined #ruby
<crime> mm
subscope has joined #ruby
eminencehc has joined #ruby
<crime> jhass I'm stuck
<crime> I have my list of the first 20 primes and all that
roxtrongo has joined #ruby
<jhass> I never said I'm sure it's solvable :P
<crime> but it dumps them all in the first second
<crime> well it is
<crime> obviously
<crime> if you can say it you can do it
<Ox0dea> Wat.
terminalrecluse has joined #ruby
<crime> thats turing, baby
<jhass> the idea was more to make the computation of each prime so expensive that it takes as close to 5 seconds as possible
<crime> oh
<Ox0dea> crime: The Halting Problem would like a word with you.
<crime> I was trying to attach an enumerator to Time.now.sec
<crime> which does not work icymi
baweaver has quit [Ping timeout: 260 seconds]
subscope has quit [Client Quit]
allcentury has quit [Ping timeout: 260 seconds]
sdwrage has joined #ruby
eminencehc has quit [Remote host closed the connection]
<crime> without sleep this is pretty hard
skinux_ has joined #ruby
<Ox0dea> crime: Use base-1.
eminencehc has joined #ruby
SamGerber has quit [Quit: Leaving]
<Ox0dea> And this: /^1?$|^(11+?)\1+$/
kies^ has quit [Ping timeout: 272 seconds]
<waxjar> crime, when you're done, can you square a circle for me? >:)
northfurr has quit [Quit: northfurr]
<crime> I speak perl and *that* befuddles me
<jhass> I guess I'd try to construct something that iterates through 1..n where n is chosen so that it the iteration takes 5 seconds - the time it takes to check each for prime
<apeiros> Ox0dea: prime number detecting regex? that one's fun
<workmad3_> waxjar: be specific - it's squaring a circle with straight-edge & protractor that's provably impossible :P
snockerton has quit [Quit: Leaving.]
<Ox0dea> apeiros: That's the one.
<jhass> then track an index and a counter for the prime
workmad3_ is now known as workmad3
<jhass> repeat 20 times
<Ox0dea> crime: Use that regex and something *way* more complicated than "1" as your tally mark.
<apeiros> Ox0dea: took me a bit until I figured how it worked :)
<crime> gonna paste my 3 lines:
<crime> require 'prime'
<crime> primes = (1..Float::INFINITY).lazy.select(&:prime?).first(20)
<crime> while primes.length > 0 do puts primes.pop; sleep 1 end
snockerton has joined #ruby
<jhass> >> require "prime"; Prime.first(20)
<ruboto> jhass # => [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71] (https://eval.in/457415)
<crime> arent you fancy
vF3hNGxc47h8 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
<Ox0dea> >> require 'prime'; Prime.each.take_while { |p| p < 9001 }.reduce(:+)
<ruboto> Ox0dea # => 4673790 (https://eval.in/457416)
<apeiros> jhass: at lease use a better generator than the default…
<jhass> apeiros: too verbose
dfinninger has quit [Remote host closed the connection]
stacybir1 is now known as stacybird
ef has joined #ruby
<Ox0dea> >> require 'prime'; Prime.include? Enumerable
<ruboto> Ox0dea # => (https://eval.in/457418)
phutchins has quit [Quit: WeeChat 1.1.1]
<Ox0dea> What happened there?
pu22l3r_ has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
<crime> wait can Time include Enumerable?
Fire-Dragon-DoL has joined #ruby
<crime> that may be progress
<Fire-Dragon-DoL> hi folks
Musashi007 has joined #ruby
<adaedra> Oh no, a fire dragon.
<Fire-Dragon-DoL> adaedra: I'm just a plush of a dragon! :P
<adaedra> I feel safer already.
<Fire-Dragon-DoL> lol
<jhass> crime: what would Time#each do?
<crime> so I can do class Time; include Enumerable; end; but what then?
<crime> nothing, its fixnum
<crime> i mean Time.now.sec
<crime> I havent tried it as a class method
<jhass> crime: Enumerable needs #each defined
<crime> oh
moos3 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has quit [Client Quit]
<Ox0dea> `Prime.include? Enumerable` doesn't terminate.
<Ox0dea> >> require 'prime'; Prime.ancestors
<ruboto> Ox0dea # => [Prime, Enumerable, Object, Kernel, BasicObject] (https://eval.in/457419)
mag42c has quit [Quit: mag42c]
dnomyar has quit [Ping timeout: 268 seconds]
<ruboto> crime, we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/3e62fd8e7020f7ea57e3
<ruboto> irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
trosborn has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crime> you ARE skynet
<Ox0dea> crime: #each should yield successive elements.
<crime> it sort of does
<havenwood> >> require 'prime'; Prime.include? 2
<ruboto> havenwood # => true (https://eval.in/457420)
<crime> depending on when you call it
<workmad3> jhass: what's the challenge? to insert a 5s delay between printing the first 20 primes without using Time.now or a sleep?
<crime> maybe if I sleep in that call
<crime> workmad3 you can use sleep
<crime> cant
<crime> i mean
<workmad3> jhass: require 'prime';ps=Prime.take(20);ps.each{|pr|p pr;(10*10**7).times{}} <-- on my machine, that achieves it
<Ox0dea> havenwood: Oh, that's interesting.
roxtrongo has quit [Remote host closed the connection]
<ruby-lang996> is it ok for a method to call itself within itself assuming you dont achieve your desired results?
<adaedra> ruby-lang996: a method calling itself? It's called recursion.
_blizzy_ has joined #ruby
<ruby-lang996> ok. is recursion something to be avoided?
banister has quit [Read error: No route to host]
<adaedra> no, it's a common pattern.
<workmad3> ruby-lang996: recursion is fine, just make sure it terminates
<crime> some type of progress with jhass challenge: https://gist.github.com/anonymous/39246930572a7873a01d
<ruby-lang996> well im having trouble an input method that checks for a valid user entry working the first entry but not accepting it after i call back on itself after...
<Ox0dea> crime: https://eval.in/457425
ledestin has joined #ruby
<pipework> ruby-lang996: You can use it, but I caution you to know what you're doing when you use it.
htmldrum has joined #ruby
<jhass> workmad3: ^^
<jhass> crime: no sleep!
<pipework> ruby-lang996: code please.
<crime> i dont need your rules
<jhass> workmad3: though the actual challenge (well, its spirit) is to make the computation of the nth prime take as close to 5 seconds as possible
<crime> Ox0dea: it fires the block continuously though, not once per second
<crime> my idea was to execute the block only once per second, and automatically once Time.now.sec updates
<Ox0dea> crime: I was showing you how to properly implement #each on Time, for some definition.
skweek has joined #ruby
<crime> but jhass that problem does not produce portable solutions
<Ox0dea> Solving jhass's challenge with direct time manipulation is dumb.
AustinMatherne has quit [Remote host closed the connection]
<crime> jhass' challenge is dumb
<crime> i said it
<jhass> of course it is
<Ox0dea> Not using three consecutive Ss when the opportunity presents itself is dumb.
<jhass> that doesn't make it uninteresting :P
AustinMatherne has joined #ruby
<Ox0dea> !define goddessship
alcipir has quit [Ping timeout: 244 seconds]
nfk|laptop has quit [Quit: yawn]
<ruby-lang996> get_input is the problem i believe
flyinprogrammer has quit [Remote host closed the connection]
<jhass> Ox0dea: you'll like German. Schifffahrt
Wompy has quit [Remote host closed the connection]
atomical has quit [Max SendQ exceeded]
<Ox0dea> jhass: Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch has four consecutive Ls, but it's otherwise unremarkable.
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crime> 'otherwise unremarkable' might not be an accurate description
ef has quit [Ping timeout: 272 seconds]
ekinmur has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
<Ox0dea> I don't follow.
skade has quit [Read error: No route to host]
atomical has joined #ruby
skade has joined #ruby
<workmad3> crime: what else would you remark about it?
<workmad3> I mean, it's not as long as 'Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu'
<crime> it's quite a remarkable word
<adaedra> Looks like a basic case of "coding by banging head on keyboard"
<crime> very big
<adaedra> (Also known as "writing in german")
Igorshp_ has quit [Remote host closed the connection]
<workmad3> crime: I've already given you bigger :P
<crime> yeah
s2013 has joined #ruby
<adaedra> It's not the size that matters.
Chaoborid has left #ruby ["WeeChat 1.3"]
<crime> whats an easy to fold < into an array? I want [1,2,3,4] to give back true, and [4,3,2,1] to return false
<workmad3> adaedra: the common saying of something that lacks size...
<adaedra> workmad3: I've been taught to write short names, yes.
trosborn has quit [Quit: trosborn]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3> crime: you could check `ary == ary.sort`
<workmad3> but that's a bit inelegant :)
<crime> its for codewars so I want it to be more clever than that
<crime> yeah
<drbrain> crime: look at #each_cons
bollullera has joined #ruby
<crime> hm, there's an idea
<workmad3> crime: if you want smarter solutions, think them up ;)
<crime> I thought [1 < 2 < 3 < 4] was pretty clever for what im doing
dfockler has joined #ruby
dfinninger has joined #ruby
bollullera has left #ruby [#ruby]
jessemcgilallen has joined #ruby
<Ox0dea> crime: You should implement chained comparisons!
<Ox0dea> Python has them; why not Ruby?
<zenspider> argh. drbrain how do I gem install racc on 10.11 w/o disabling asr ?
<zenspider> it's blowing up installing in /usr/bin
<zenspider> is there a flag where I can say stfu and finish and not worry about the cmdline?
<crime> -q?
sdwrage has quit [Quit: This computer has gone to sleep]
bollullera has joined #ruby
<zenspider> was that to me?
<Ox0dea> crime: For inspiration: https://eval.in/457433
<zenspider> drbrain: ooh. -n ~/Bin ?
atomical has quit [Max SendQ exceeded]
charliesome has joined #ruby
EllisTAA has joined #ruby
<drbrain> zenspider: I guess, I'd not encountered that until you mentioned it
<zenspider> only will affect ppl using stock ruby (only me?). :)
<zenspider> -n works
mengu has quit []
hakunin has joined #ruby
<drbrain> probably
dopamean_ has quit [Ping timeout: 240 seconds]
hakunin has left #ruby [#ruby]
<zenspider> it was blocking my release process for ruby_parser
<zenspider> seems fine now
Guest7725 has quit [Quit: This computer has gone to sleep]
karapetyan has quit [Remote host closed the connection]
<Fire-Dragon-DoL> syntax question! I noticed there are some classes that allow you to do: YourClass(foo) (call the class like a method), how to recreate that behavior?
<pipework> Fire-Dragon-DoL: They're just methods.
<zenspider> def Float(n); ... end
<Fire-Dragon-DoL> pipework: mh but they also allow you to do YourClass.new(somestuff) or YourClass.someclassmethod
hakunin has joined #ruby
<pipework> Fire-Dragon-DoL: two separate objects.
baweaver has joined #ruby
h99h9h88 has joined #ruby
hakunin has left #ruby [#ruby]
<workmad3> Fire-Dragon-DoL: you can have a method with the same name as a constant, ruby can figure out the difference
<Fire-Dragon-DoL> workmad3: oh thanks, wasn't aware of that
<workmad3> (constant takes precedence though)
<Fire-Dragon-DoL> I thought they would conflict
h99h9h88_ has joined #ruby
sdwrage has joined #ruby
<workmad3> Fire-Dragon-DoL: it's fairly common to call a method with a name like Foobar a 'constant method', but they're no different from any other method
<Fire-Dragon-DoL> ok, I thought there was a secret syntax like operator overloading inside the class itself
<workmad3> Ox0dea: chained comparisons were fun :)
<ruby-lang996> program ideas for a beginner to test my skills?
atomical has joined #ruby
<shevy> go write what you need to solve ruby-lang996
<zenspider> fairly common? I've _never_ heard that term
<zenspider> ruby-lang996: exercism.io
<pipework> Me neither.
baroquebobcat has joined #ruby
bb010g has joined #ruby
h99h9h88 has quit [Ping timeout: 265 seconds]
<Fire-Dragon-DoL> ruby-lang996: web scraper: get every information of a website of your choice, organize it into files (like json files) and output some stats in another json
h99h9h88_ has quit [Ping timeout: 250 seconds]
<workmad3> zenspider: hmm, fair enough... not as common as I thought then (I've encountered it in a few places though, trying to remember where)
<zenspider> and it isn't precedence either. the method MUST be invoked with parens. it's just syntax
<zenspider> (syntax that bugs me, for the record)
<ruby-lang996> exercism.io ya?
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby-lang996> Fire-Dragon-DoL - sounds fun. no idea how to go about doing that but ill dive in :p
<workmad3> zenspider: heh :) ok, I take the hint... it's too late in the day for me to be on IRC and I should shut up :)
popsikle has quit [Remote host closed the connection]
<zenspider> not hinting that at all... just being pedantic because of ruby_parser
<Fire-Dragon-DoL> ruby-lang996: few suggestions for Gemfile: HTTParty, nokogiri, optionally ActiveSupport
prestorium has quit [Quit: Leaving]
Rickmasta has joined #ruby
dfinninger has quit [Remote host closed the connection]
<Fire-Dragon-DoL> ruby-lang996: if you feel into database stuff you can always try ActiveRecord, but it's not really in the scope of the excercise, and saving JSON file (JSON.pretty_generate) allows you to deal more with Ruby
dfinninger has joined #ruby
devoldmx has quit [Remote host closed the connection]
inteq has quit [Remote host closed the connection]
weemsledeux has joined #ruby
fschuindt has quit [Ping timeout: 240 seconds]
stannard has quit [Remote host closed the connection]
tkuchiki has joined #ruby
atomical has quit [Max SendQ exceeded]
whippythellama has quit [Quit: WeeChat 1.3]
dfinninger has quit [Ping timeout: 250 seconds]
brt has quit [Quit: peace]
zipace has quit [Ping timeout: 244 seconds]
atomical has joined #ruby
maletor has joined #ruby
alexdunne has joined #ruby
uber has quit [Ping timeout: 260 seconds]
towski_ has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
baroquebobcat has quit [Quit: baroquebobcat]
Kruppe has quit [Ping timeout: 240 seconds]
jobewan has quit [Remote host closed the connection]
Kruppe has joined #ruby
p0wn3d has joined #ruby
rbennacer has quit [Remote host closed the connection]
hakunin has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
mordocai has quit [Remote host closed the connection]
alexdunne has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
alcipir has joined #ruby
jgpawletko has joined #ruby
GnuYawk has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
freerobby has quit [Quit: Leaving.]
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruby-lang996 has quit [Ping timeout: 246 seconds]
diegoaguilar has quit [Remote host closed the connection]
arthurix has joined #ruby
eminencehc has quit [Remote host closed the connection]
alcipir has quit [Ping timeout: 272 seconds]
atlascoder has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cyle has quit [Ping timeout: 272 seconds]
arthurix_ has quit [Ping timeout: 260 seconds]
trosborn has joined #ruby
danneu has quit [Ping timeout: 264 seconds]
torpig has quit [Ping timeout: 264 seconds]
GGMethos has quit [Ping timeout: 264 seconds]
Guest81 has joined #ruby
atlascoder has quit [Client Quit]
uber has joined #ruby
danneu has joined #ruby
<Guest81> Hi - can I get a hand with writing Rake "rule" tasks ? does someone have a few minutes spare?
weemsledeux has joined #ruby
skade has quit [Read error: No route to host]
pu22l3r has quit [Ping timeout: 240 seconds]
torpig has joined #ruby
GGMethos has joined #ruby
M-Technic has quit [Quit: Reconnecting]
M-Technic has joined #ruby
rbowlby has quit [Remote host closed the connection]
tno has quit [Remote host closed the connection]
gregoriokusowski has joined #ruby
Y_Ichiro has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
<crime> if I want [1,2] == [2,1] to be true? how can I tell if an array is the same set as another array
stamina has quit [Ping timeout: 252 seconds]
gregoriokusows-1 has joined #ruby
<darix> crime: order matters for array
<crime> i know, but I want set equivalence
<crime> I know that that expression is false
<darix> crime maybe use Set class
snockerton has quit [Quit: Leaving.]
<crime> !
Guest81 has quit [Quit: Textual IRC Client: www.textualapp.com]
<crime> i didnt know that was a thing
gregoriokusowski has quit [Ping timeout: 250 seconds]
<darix> >> a = Set.new ; b = Set.new ; a << 1 ; a << 2 ; b << 2 ; b << 1 ; a == b
<ruboto> darix # => uninitialized constant Set (NameError) ...check link for more (https://eval.in/457438)
<darix> >> require 'set'; a = Set.new ; b = Set.new ; a << 1 ; a << 2 ; b << 2 ; b << 1 ; a == b
<crime> gotta require 'set'
<ruboto> darix # => true (https://eval.in/457439)
trosborn has quit [Quit: trosborn]
<crime> yeah i got it
ochkoffein has quit [Quit: -----------------------------------------------]
<crime> thank you
ivanskie has joined #ruby
<crime> i never saw Set class before, must have missed it
rehat_ has quit [Remote host closed the connection]
gambl0re has joined #ruby
lipoqil has quit [Quit: Connection closed for inactivity]
northfurr has joined #ruby
Ropeney has joined #ruby
Guest7725 has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
torpig has quit [Ping timeout: 268 seconds]
<shevy> ruby is huge
sankaber has joined #ruby
<shevy> you are excused for not knowing everything crime
tkuchiki has quit [Remote host closed the connection]
doddok has joined #ruby
<crime> yeah its a departure from other languages I've used
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pepperbreath1 has quit [Read error: Connection reset by peer]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoaguilar has joined #ruby
alexblom has quit [Ping timeout: 264 seconds]
bigmac__ has joined #ruby
cdg has quit [Ping timeout: 272 seconds]
pepperbreath has joined #ruby
<crime> its not critical cuz its codewars, but if someone wanted to look at https://gist.github.com/anonymous/868600af5bc470f06a2b because they love me and tell me what I'm doing wrong, that'd be awesome
kitallis has quit [Ping timeout: 268 seconds]
Guest95784 has quit [Ping timeout: 240 seconds]
\13k has quit [Ping timeout: 268 seconds]
cwong_on_irc has quit [Quit: Leaving.]
apeiros has quit [Ping timeout: 268 seconds]
uber has quit [Excess Flood]
<crime> ignore line 15, that is an artifact from a previous revision, does nothing now
<crime> just noticed that
jtperreault has quit [Ping timeout: 268 seconds]
twistedpixels has quit [Ping timeout: 268 seconds]
apeiros has joined #ruby
\13k has joined #ruby
uber has joined #ruby
alexblom has joined #ruby
jtperreault has joined #ruby
kitallis has joined #ruby
twistedpixels has joined #ruby
<Ox0dea> > the method MUST be invoked with parens
<Ox0dea> >> Integer '42'
<ruboto> Ox0dea # => 42 (https://eval.in/457440)
hakunin has left #ruby [#ruby]
<crime> are you talking to me or...
<Ox0dea> Did I quote you?
<crime> no... sorry
<crime> i misunderstood you
Alina-malina has joined #ruby
ICantCook has joined #ruby
_blizzy_ has joined #ruby
K1MOS has joined #ruby
<Ox0dea> crime: The most blatant faux pas in your code is a fixation with explicitly mentioning `true` and `false`.
step1step2 has joined #ruby
<Ox0dea> `condition ? true : false` can just be `condition` most of the time.
<crime> lua-isms, i suppose
<crime> im trying hard not to write lua in ruby but sometimes it just happens
<Ox0dea> crime: There's a very efficient arithmetic approach to that problem.
basiles has joined #ruby
<baweaver> Also using set for compare there is kinda anti-intuitive.
rcvalle has quit [Quit: rcvalle]
h99h9h88 has joined #ruby
<baweaver> and brings another object into memory for no good reason.
K1MOS has quit [Client Quit]
zenguy_pc has quit [Ping timeout: 260 seconds]
basiles has quit [Client Quit]
axl_ has quit [Quit: axl_]
<baweaver> >> Set.new([1,2,3,3,3,4]) == Set.new([1,2,3,4])
<ruboto> baweaver # => uninitialized constant Set (NameError) ...check link for more (https://eval.in/457441)
* baweaver sighs
<Ox0dea> If `n` is a "descending number", then there is no solution; otherwise, find the point at which the number first "ascends" and swap the culprits.
<crime> yeah
basiles has joined #ruby
<baweaver> >> require 'set'; Set.new([1,2,3,3,3,4]) == Set.new([1,2,3,4])
<ruboto> baweaver # => true (https://eval.in/457442)
<crime> oh
<crime> i see what you mean
<Ox0dea> >> require 'set'; Set[1,2,3]
<ruboto> Ox0dea # => #<Set: {1, 2, 3}> (https://eval.in/457443)
<Ox0dea> Sexy syntax is best syntax.
civil_ has quit [Ping timeout: 268 seconds]
<bigmac__> are there any cuda gpu modules for ruby that are working
<baweaver> I was just going off of their code there
<crime> Ox0dea: thanks, didnt know you could do that
swgillespie has joined #ruby
<Ox0dea> crime: Virtually any object can have its own #[] method; it's just another operator, really.
RegulationD has quit [Remote host closed the connection]
<shevy> \o/
rehat has joined #ruby
<shevy> here is how you can define it crime: class Foo; def [](arguments_go_in_here)
alcipir has joined #ruby
<crime> so []= then too
chipotle has joined #ruby
<Ox0dea> Indeed.
<crime> and =, ==?
<Ox0dea> No, not assignment.
<baweaver> honestly though it'd likely be cheaper to make a list of all possibilities
<baweaver> instead of going through every number
<Ox0dea> But #== and #===, absolutely.
yqt has quit [Ping timeout: 264 seconds]
<Ox0dea> Or, y'know, do it right?
_blizzy_ has quit [Ping timeout: 240 seconds]
<crime> baweaver: I thought about that, but it's going against other solutions on codewars, and I havent looked at them yet but I want mine to appear clever
h99h9h88 has quit [Ping timeout: 244 seconds]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
dpulliam has joined #ruby
<baweaver> crime: bad idea
pu22l3r has joined #ruby
<baweaver> clever is evil
<crime> think so?
pu22l3r has quit [Remote host closed the connection]
<crime> ah, perl has survived on clever for almost 30 years though
<Ox0dea> The optimal solution involves proving you know how to divide and multiply by ten.
<baweaver> it causes you to make obscure and impossible to reason about code for the sake of being clever
pu22l3r has joined #ruby
<crime> that DOES sound like perl
<baweaver> so pretty much perl
<crime> yeah
GnuYawk has joined #ruby
<crime> lol
<baweaver> clever people get fired a lot faster
<Ox0dea> Whether a sufficient understanding of orders of magnitude is "too clever" is, I suppose, a matter for some debate.
<baweaver> Ox0dea: was referring to their comment of wanting to appear clever
<Ox0dea> I think they weren't necessarily using the term as we understand it.
ICantCook has quit [Quit: bye]
<Ox0dea> I suspect they actually wanted "smart".
terminalrecluse has joined #ruby
ICantCook has joined #ruby
<crime> >> a = [1,2]; b = [3,4]; a[0],a[1],b[0],b[1] = b[0],b[1],a[0],b[1]
<ruboto> crime # => [3, 4, 1, 4] (https://eval.in/457444)
alcipir has quit [Ping timeout: 250 seconds]
ivanskie has quit [Read error: Connection reset by peer]
<crime> is there a way to do multiple assignment in ruby?
<Ox0dea> Duh.
<crime> like to swap two items in an array
<crime> well i mean i assumed there was
devoldmx has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
<Ox0dea> crime: Ruby even supports arbitrarily deep destructuring of arrays:
Rickmasta has joined #ruby
<Ox0dea> >> _,(_,_,((_,(foo,_)),_)) = [1, [2, [3, 4], [[5, [:target], 6], [7], 8, [9], 10]]]; foo
<ruboto> Ox0dea # => :target (https://eval.in/457447)
<Ox0dea> But forget you saw that.
kirun has quit [Quit: Client exiting]
ICantCook has quit [Client Quit]
ICantCook has joined #ruby
hiyosi has joined #ruby