baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
alex`` has quit [Ping timeout: 272 seconds]
eckhardt has joined #ruby
bijan_ has joined #ruby
lxsameer has joined #ruby
akaiiro has quit [Ping timeout: 268 seconds]
bijan_ has quit [Read error: Connection reset by peer]
lxsameer has quit [Ping timeout: 244 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
bijan_ has joined #ruby
akaiiro has joined #ruby
arescorpio has joined #ruby
thejs has quit [Remote host closed the connection]
cagomez has quit [Ping timeout: 244 seconds]
bijan_ has quit [Ping timeout: 252 seconds]
sonOfRa has quit [Remote host closed the connection]
faitswulff has joined #ruby
sonOfRa has joined #ruby
bijan_ has joined #ruby
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
faitswulff has quit [Ping timeout: 252 seconds]
rgiscard has joined #ruby
bijan__ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
segy has quit [Ping timeout: 268 seconds]
bijan__ has quit [Ping timeout: 252 seconds]
segy has joined #ruby
JoshS has joined #ruby
bijan_ has joined #ruby
<weaksauce> dang. all day and not a single message in 12 hours
<weaksauce> almost 13
bijan_ has quit [Ping timeout: 252 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: inabit. zz.]
<g-> weaksauce: that's because ruby is so easy to learn, people don't get stuck much
bijan_ has joined #ruby
<weaksauce> heh
<weaksauce> it used to be pretty active in here
<g-> still is
faitswulff has joined #ruby
<g-> i've been converting cucumbers to rspecs lately, how about you?
<g-> and over the past 3 weeks i got ~40 models up to 100% coverage
<g-> switched over to controllers yesterday
Liothen has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
moei has quit [Ping timeout: 268 seconds]
bijan_ has joined #ruby
faitswulff has quit [Remote host closed the connection]
bmurt has joined #ruby
bmurt has quit [Read error: Connection reset by peer]
bijan_ has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
bmurt has quit [Ping timeout: 244 seconds]
bijan_ has joined #ruby
mostlybadfly has joined #ruby
faitswulff has joined #ruby
DTZUZO has joined #ruby
Tempesta has joined #ruby
bmurt has joined #ruby
<weaksauce> i don't really program much in ruby lately
JoshS has quit [Remote host closed the connection]
bijan_ has quit [Ping timeout: 252 seconds]
JoshS has joined #ruby
bijan_ has joined #ruby
bmurt has quit [Ping timeout: 268 seconds]
bmurt has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bmurt has quit [Ping timeout: 244 seconds]
bijan_ has joined #ruby
bryanray has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan__ has joined #ruby
bmurt has joined #ruby
thejs has joined #ruby
bijan__ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
jane_booty_doe has quit [Quit: Leaving]
cagomez has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
Freshnuts has quit [Quit: Leaving]
code_zombie has quit [Quit: Leaving]
lxsameer has joined #ruby
cagomez has quit []
akaiiro has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
sylario has quit [Quit: Connection closed for inactivity]
bijan_ has quit [Ping timeout: 252 seconds]
ogres has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bijan_ has joined #ruby
AJA4350 has quit [Remote host closed the connection]
bijan_ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
apeiros has quit [Remote host closed the connection]
bijan_ has quit [Ping timeout: 252 seconds]
Tempesta has quit [Ping timeout: 244 seconds]
bijan_ has joined #ruby
samort7 has quit [Quit: Leaving]
samort7 has joined #ruby
jp has joined #ruby
samort7 has quit [Client Quit]
samort7 has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
braincrash has quit [Quit: bye bye]
bijan_ has joined #ruby
darkhanb has joined #ruby
BTRE has quit [Remote host closed the connection]
braincrash has joined #ruby
bryanray has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bijan_ has quit [Ping timeout: 252 seconds]
BTRE has joined #ruby
mrbignum has joined #ruby
bijan_ has joined #ruby
arescorpio has quit [Quit: Leaving.]
mrbignum has quit []
bijan_ has quit [Ping timeout: 252 seconds]
akaiiro has joined #ruby
_whitelogger has joined #ruby
bijan_ has joined #ruby
kapil___ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
bijan_ has joined #ruby
faitswulff has quit [Remote host closed the connection]
bijan_ has quit [Ping timeout: 252 seconds]
thejs has quit [Remote host closed the connection]
bijan_ has joined #ruby
Rootsudo has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
lxsameer has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
lxsameer has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
rgiscard has quit [Remote host closed the connection]
Xeago_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
Xeago has quit [Ping timeout: 260 seconds]
Xeago_ is now known as Xeago
ogres has quit [Quit: Connection closed for inactivity]
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
c0ncealed2 has quit [Remote host closed the connection]
bijan_ has quit [Ping timeout: 252 seconds]
c0ncealed2 has joined #ruby
code_zombie has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bijan_ has joined #ruby
<ineb> weaksauce: QQ
bijan_ has quit [Ping timeout: 252 seconds]
c0ncealed2 has quit [Read error: Connection timed out]
c0ncealed2 has joined #ruby
bijan_ has joined #ruby
lxsameer has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
akaiiro has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 268 seconds]
bijan_ has joined #ruby
dbz has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
dbz has quit [Ping timeout: 272 seconds]
bijan_ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
postmodern has quit [Quit: Leaving]
jaszhix has quit [Remote host closed the connection]
jasmith has joined #ruby
dionysus69 has joined #ruby
jane_booty_doe has joined #ruby
bryanray has joined #ruby
dbz has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Quit: dionysus69]
reber has joined #ruby
conta has joined #ruby
jane_booty_doe has quit [Quit: Leaving]
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
rippa has joined #ruby
code_zombie has quit [Quit: Leaving]
dbz has quit [Ping timeout: 268 seconds]
tty has quit [Quit: tty]
sauvin has joined #ruby
bijan_ has quit [Remote host closed the connection]
ramfjord has joined #ruby
dbz has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bryanray has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Freshnuts has joined #ruby
dellavg_ has joined #ruby
peirama has quit [Remote host closed the connection]
klaas has quit [Quit: ZNC - http://znc.sourceforge.net]
peirama has joined #ruby
klaas has joined #ruby
tpendragon has quit [Remote host closed the connection]
bijan_ has joined #ruby
apeiros has joined #ruby
postmodern has joined #ruby
bijan_ has quit [Remote host closed the connection]
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
dbz has quit [Ping timeout: 272 seconds]
Emmanuel_Chanel has joined #ruby
bijan_ has joined #ruby
shadeslayer has joined #ruby
cschneid_ has joined #ruby
bijan__ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
cschneid_ has quit [Ping timeout: 244 seconds]
Rootsudo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
bijan__ has quit [Ping timeout: 252 seconds]
Rootsudo has joined #ruby
Emmanuel_Chanel has joined #ruby
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
alex`` has joined #ruby
bijan_ has joined #ruby
samort7 has quit [Read error: Connection reset by peer]
Dbugger has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
lomex has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 268 seconds]
bijan_ has joined #ruby
DarthGandalf has quit [Ping timeout: 252 seconds]
Emmanuel_Chanel has joined #ruby
saltsa has joined #ruby
peirama has quit [Remote host closed the connection]
peirama has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
sameerynho has joined #ruby
G has quit [Ping timeout: 256 seconds]
SolarAquarion has quit [Ping timeout: 256 seconds]
saltsa has quit [Client Quit]
SolarAquarion has joined #ruby
G has joined #ruby
saltsa has joined #ruby
tristanp has joined #ruby
bijan_ has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
tristanp has quit [Ping timeout: 272 seconds]
DarthGandalf has joined #ruby
bijan_ has joined #ruby
Tempesta has joined #ruby
druonysus has quit [Ping timeout: 260 seconds]
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
LiftLeft has quit [Ping timeout: 264 seconds]
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
Zaab1t has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
postmodern has quit [Quit: Leaving]
LiftLeft has joined #ruby
bijan_ has joined #ruby
t0xik has quit [Quit: Connection closed for inactivity]
peirama has quit [Remote host closed the connection]
bijan_ has quit [Ping timeout: 252 seconds]
agent_white has quit [Quit: leaving]
GodFather has quit [Ping timeout: 252 seconds]
GodFather has joined #ruby
moei has joined #ruby
bijan_ has joined #ruby
peirama has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
peirama has quit [Remote host closed the connection]
peirama has joined #ruby
Freshnuts has quit [Quit: Leaving]
bijan_ has joined #ruby
tristanp has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
tristanp has quit [Ping timeout: 272 seconds]
bijan_ has joined #ruby
moei has quit [Read error: Connection reset by peer]
bijan_ has quit [Remote host closed the connection]
bijan_ has joined #ruby
paraxial has quit [Quit: The Lounge - https://thelounge.github.io]
paraxial has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
ellcs has joined #ruby
phaul has joined #ruby
AJA4350 has joined #ruby
ramfjord has joined #ruby
tristanp has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 268 seconds]
arahael1 has joined #ruby
arahael1 is now known as ArahaelPi
tristanp has quit [Ping timeout: 272 seconds]
bijan_ has quit [Remote host closed the connection]
bijan_ has joined #ruby
clemens3 has joined #ruby
ellcs has quit [Ping timeout: 264 seconds]
bijan_ has quit [Ping timeout: 252 seconds]
Emmanuel_Chanel has quit [Quit: Leaving]
spiette has quit [Ping timeout: 268 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
lomex has joined #ruby
spiette has joined #ruby
bijan_ has joined #ruby
sticaz has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
t0xik has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
JoshS has quit [Ping timeout: 272 seconds]
phaul has quit [Quit: WeeChat 2.2]
tristanp has joined #ruby
Zaab1t has quit [Quit: Zaab1t]
thy0 has joined #ruby
tristanp has quit [Ping timeout: 272 seconds]
bijan_ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
k0mpa has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
thy0 has quit [Quit: TTFN]
bijan_ has joined #ruby
thy0 has joined #ruby
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lomex has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
lomex has quit [Client Quit]
bijan_ has joined #ruby
moei has joined #ruby
alex`` has quit [Quit: WeeChat 2.2]
alex`` has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
sameerynho has quit [Ping timeout: 244 seconds]
siery has joined #ruby
<siery> Hey guys, can someone help me to figure out whats wrong with this simple bubble sort?
<siery> (arr.length - 1).times do |i|
<siery> if arr[i] > arr[i + 1]
bijan_ has quit [Remote host closed the connection]
<siery> arr[i], arr[i + 1] = arr[i + 1], arr[i]
<siery> p "#{i}. #{arr[i]} > #{arr[i + 1]}"
<siery> end
<siery> end
bijan_ has joined #ruby
bijan_ has quit [Client Quit]
<apeiros> siery: two things, 1) please use a paste service for >3 lines as told in the topic, 2) you could start with telling us why you think something was wrong with it
<siery> apeiros: Right, sorry, I am kinda rough today.
<siery> well, the condition is producing a wrong effect. I get things like, "0. swapped 45 > 85"
<siery> I simply don't see how cold this if statement be wrong
kevinsjoberg has joined #ruby
<siery> (I just pased the result from the first time it enters the condition, thats why this '0.' is there)
<apeiros> well, you swap, then you print
<apeiros> that'd be the reason for the seemingly wrong if
<apeiros> i.e. it's […, 85, 45, …], and you compare 85 > 45, swap, then print the positions as before the swap, so you get "45 > 85".
k0mpa has quit [Remote host closed the connection]
<apeiros> also, you iterate the array one time. so if it's [3,5,1], you'll skip the 3 > 5, but then swap 5 and 1, so your result will be [3,1,5].
<apeiros> btw., got to go in ~3min
<apeiros> which is actally now :) well, somebody else can surely help you! good luck!
k0mpa has joined #ruby
bijan_ has joined #ruby
faitswulff has joined #ruby
bryanray has joined #ruby
bryanray has quit [Client Quit]
peirama has quit [Remote host closed the connection]
jottr has joined #ruby
peirama has joined #ruby
bryanray has joined #ruby
bijan_ has quit [Remote host closed the connection]
bijan_ has joined #ruby
snickers has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bak1an has joined #ruby
segy has quit [Quit: ZNC - http://znc.in]
bijan_ has joined #ruby
aupadhye has joined #ruby
bijan__ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
aupadhye has quit [Ping timeout: 276 seconds]
bijan__ has quit [Ping timeout: 252 seconds]
herbmillerjr has joined #ruby
peirama has quit [Remote host closed the connection]
bryanray has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
t0xik has quit [Quit: Connection closed for inactivity]
aupadhye has joined #ruby
bijan_ has joined #ruby
bryanray has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
aupadhye has quit [Quit: Leaving]
bijan_ has joined #ruby
ramfjord has joined #ruby
peirama has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 272 seconds]
bijan_ has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
Emmanuel_Chanel has joined #ruby
bryanray has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
faitswulff has quit [Remote host closed the connection]
jottr has quit [Client Quit]
jottr_ has joined #ruby
faitswulff has joined #ruby
Emmanuel_Chanel has quit [Remote host closed the connection]
faitswulff has quit [Remote host closed the connection]
bryanray has joined #ruby
bryanray has quit [Client Quit]
faitswulff has joined #ruby
bryanray has joined #ruby
tty has joined #ruby
Dbugger has quit [Remote host closed the connection]
Dbugger has joined #ruby
faitswulff has quit [Remote host closed the connection]
bijan_ has quit [Ping timeout: 252 seconds]
faitswulff has joined #ruby
Emmanuel_Chanel has joined #ruby
faitswul_ has joined #ruby
bryanray has quit [Ping timeout: 252 seconds]
faitswu__ has joined #ruby
Emmanuel_Chanel has quit [Client Quit]
SuperLag has quit [Remote host closed the connection]
faitswulff has quit [Ping timeout: 264 seconds]
Emmanuel_Chanel has joined #ruby
faitswul_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
cats has quit [Ping timeout: 260 seconds]
cats has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
lomex has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
bijan_ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
tpendragon has joined #ruby
sameerynho has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lomex has joined #ruby
lomex has quit [Client Quit]
doubledup has joined #ruby
lomex has joined #ruby
Emmanuel_Chanel has joined #ruby
fmcgeough has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
conta has quit [Quit: conta]
faitswu__ has quit [Remote host closed the connection]
faitswulff has joined #ruby
dorian has joined #ruby
<dorian> 'morning
<dorian> i have a question around best practices for introducing backward-compatibility-breaking changes to behaviour in a gem
<dorian> what i've done so far is make a parameter that defaults to the old behaviour that one can set to the new behaviour, but eventually i want to set the default to the new behaviour and then eliminate the parameter altogether
c0ncealed2 has quit [Remote host closed the connection]
<dorian> so what i'm interested in is if there's a protocol i can follow for warning people of the impending change
<dorian> ie when they install the gem
c0ncealed2 has joined #ruby
conta has joined #ruby
jottr_ is now known as jottr
Inline has quit [Read error: Connection reset by peer]
Inline has joined #ruby
Zaab1t has joined #ruby
kapil___ has joined #ruby
segy has joined #ruby
jottr has quit [Quit: WeeChat 2.2]
jottr has joined #ruby
ramfjord has joined #ruby
<havenwood> dorian: I usually warn on use, rather than on install. There's no canonical deprecation path that I'm aware of in terms of a deprecation spec or api.
<dorian> hmm
<havenwood> dorian: In Rails land they have ActiveSupport::Deprecation apis.
<dorian> context is this: https://rubygems.org/gems/uuid-ncname
<dorian> after careful deliberation i'm changing the format (slightly, but in an incompatible way) and i don't want to surprise anybody
<havenwood> dorian: Some folk have extracted the ActiveSupport deprecation stuff into gems, like Deprecation: https://github.com/cbeer/deprecation
<havenwood> dorian: I've always just warned on use for a while before a MAJOR version change and then just break it.
<dorian> that's sensible
<havenwood> dorian: I guess that's how Ruby does it. Mention deprecations in changelog, warn about them for a while then eventually break it.
segy has quit [Ping timeout: 268 seconds]
<havenwood> dorian: Rich Hickey has an interesting on accreting versions that's a kinda counter argument to semantic versioning.
<dorian> i've seen it
<havenwood> ah, nice
<havenwood> interesting *talk
ramfjord has quit [Ping timeout: 252 seconds]
<dorian> i just put a `version` parameter in the calls that can be 0 or 1 to trigger the formatting version and i'm going to demand the user set it explicitly
<havenwood> dorian: A lot of folk really dislike gem installation warnings - but mostly the IF YOU HTTP PARTY, PARTY HARD! types. :-P
<dorian> ha
<dorian> (well, not *demand* but warn)
segy has joined #ruby
Freshnuts has joined #ruby
conta has quit [Quit: conta]
orbyt_ has joined #ruby
vondruch has joined #ruby
<weaksauce> siery you figure it out?
DTZUZO has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
bijan_ has quit [Remote host closed the connection]
_ari has joined #ruby
vondruch has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inline has quit [Read error: Connection reset by peer]
Inline has joined #ruby
Inline has quit [Read error: Connection reset by peer]
bijan__ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
Inline has joined #ruby
Inline has quit [Read error: Connection reset by peer]
Inline has joined #ruby
Emmanuel_Chanel has joined #ruby
bijan__ has quit [Remote host closed the connection]
sagax has quit [Ping timeout: 260 seconds]
faitswulff has quit [Remote host closed the connection]
bijan_ has joined #ruby
peirama has quit [Remote host closed the connection]
alex`` has quit [Ping timeout: 272 seconds]
peirama has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
alex`` has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
bryanray has joined #ruby
peirama has quit [Remote host closed the connection]
peirama has joined #ruby
bijan_ has joined #ruby
peirama has quit [Remote host closed the connection]
doubledup has quit [Remote host closed the connection]
bijan_ has quit [Ping timeout: 252 seconds]
doubledup has joined #ruby
reber is now known as neoreb
bak1an_ has joined #ruby
DTZUZO has joined #ruby
bak1an has quit [Ping timeout: 252 seconds]
peirama has joined #ruby
bijan_ has joined #ruby
nopolitica has joined #ruby
DTZUZO has quit [Read error: Connection reset by peer]
bijan_ has quit [Ping timeout: 252 seconds]
zapata_ has joined #ruby
zapata has quit [Ping timeout: 240 seconds]
bijan_ has joined #ruby
DTZUZO has joined #ruby
Azure has quit [Ping timeout: 260 seconds]
bijan_ has quit [Ping timeout: 252 seconds]
jottr has quit [Quit: WeeChat 2.2]
bijan_ has joined #ruby
faitswulff has joined #ruby
jottr has joined #ruby
akaiiro has joined #ruby
jottr has quit [Client Quit]
jottr has joined #ruby
jottr has quit [Client Quit]
jottr has joined #ruby
orbyt_ has joined #ruby
doubledup has quit [Quit: Leaving]
jottr has quit [Quit: WeeChat 2.2]
jottr has joined #ruby
DoubleMalt has joined #ruby
jottr has quit [Client Quit]
SuperLag has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doubledup has joined #ruby
k0mpa has quit [Quit: k0mpa]
jottr has joined #ruby
Zaab1t has quit [Quit: Zaab1t]
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akaiiro has quit [Remote host closed the connection]
Nicmavr has quit [Read error: Connection reset by peer]
bijan_ has quit [Ping timeout: 252 seconds]
Nicmavr has joined #ruby
peirama has quit [Remote host closed the connection]
peirama has joined #ruby
nopolitica has quit [Ping timeout: 252 seconds]
bryanray has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Quit: WeeChat 2.2]
herbmillerjr has quit [Excess Flood]
herbmillerjr has joined #ruby
Emmanuel_Chanel has joined #ruby
jottr has joined #ruby
jottr has quit [Client Quit]
bryanray has joined #ruby
jottr has joined #ruby
bryanray has quit [Client Quit]
t0xik has joined #ruby
Andrevan has joined #ruby
Andrevan has quit [Client Quit]
bryanray has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
Andrevan has joined #ruby
isene has joined #ruby
<isene> I'm officially going nuts. Having banged my head against this problem for a couple of hours, I yield. Can some genius here lend a hand? I am trying to execute this shell command from within a Ruby script: curl -u $USER https://api.github.com/user/repos -d "{\"name\": \"$REPO\", \"description\": \"Presentation\", \"private\": $PRIV, \"has_issues\": true, \"has_downloads\": true, \"has_wiki\": false}"
<isene> There is something about escaping or some such that whacks this off balance, but I can't figure it out (it may be related to the cat that it is 5am here in Tokyo)
<isene> s/cat/fact/
zapata_ is now known as zapata
<weaksauce> isene can you gist the ruby code?
bryanray has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 244 seconds]
mikhael_k33hl has joined #ruby
<mikhael_k33hl> Given a line: 2012/05/12 11:59:29 [18094] total size is 241.57G speedup is 1.00. How do I extract the 241.57G substring? Tried line[/^*(total size is )\d+\.\d+.\S/] can't get rid of the 'total size is '
jeffreylevesque has joined #ruby
<weaksauce> best bet is to do (?:total size...
<isene> The whole thing is here: https://dpaste.de/aghX Compared to the shell script (with less functionality) here: https://dpaste.de/iRzq The shell scripts works nicely, the Ruby script does not create a new repo on Github :-/
<isene> weaksauce: ^^
<weaksauce> isene have you tried running that line from irb?
<mikhael_k33hl> weaksauce: what's with the (?: ?
<weaksauce> it's an ignoring capture group
<weaksauce> as in it captures it and ignores it
<mikhael_k33hl> wow, did not know that
<weaksauce> at least i think that's the correct syntax for it
<mikhael_k33hl> but doesn't work though
<weaksauce> try it out in rubular.com
<mikhael_k33hl> line[/^*(?<=total size is )\d+\.\d+.\S/]
<mikhael_k33hl> ?: doesn't work but ?<= does
<isene> weaksauce: I did some iterations ago, tried again now (using pry rather than irb): https://dpaste.de/m714
<weaksauce> mikhael_k33hl http://rubular.com/r/DvBEyKfaWH
<weaksauce> isene guess your json payload is incorrect
<mikhael_k33hl> weaksauce: gee, thanks, didn't know why my previous pattern didn't work. perhaps something to do with groupings
<weaksauce> i had to add a match group to the part you cared about
<isene> Yes. But it is correct with the bash script, and I can't get my wits around why the Ruby version isn't. Some escaping of characters or something...
<mikhael_k33hl> weaksauce: tried it in irb, doesn't give the same output
<weaksauce> and also ignore the part you were matching on but you could have actually just removed the parens for the same effect i would wager
jeffreylevesque has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<weaksauce> what does the line[someregex] do?
<weaksauce> isene perhaps store the json in a separate var and then put that into the payload
AJA4350 has quit [Quit: AJA4350]
<weaksauce> mikhael_k33hl you might need to use the more powerful variant using match
<isene> weaksauce: I'll try that
<weaksauce> mikhael_k33hl line.match(/(?:2012)(\/)([0-9]*)/)
<weaksauce> => #<MatchData "2012/05" 1:"/" 2:"05">
<weaksauce> captures two groups / and 05 for instance
AJA4350 has joined #ruby
nopolitica has joined #ruby
<mikhael_k33hl> weaksauce: thanks
<weaksauce> you're welcome
thy0 has quit [Quit: TTFN]
bmurt has joined #ruby
thy0 has joined #ruby
jasmith has quit [Quit: Leaving]
<weaksauce> isene in general i'd use popen for shell commands that can fail
<weaksauce> isene i've used this in the past for basic scripts https://gist.github.com/fiveNinePlusR/317a72102a431c863784d2743ab2d87b
postmodern has joined #ruby
faitswulff has quit [Remote host closed the connection]
<weaksauce> the popen2e combines the stdout and stderr into one stream on stdout and also provides stdin if you want it
jottr has joined #ruby
DarthGandalf has quit [Quit: Bye]
jottr has quit [Ping timeout: 268 seconds]
DarthGandalf has joined #ruby
jeffreylevesque has joined #ruby
dellavg_ has quit [Ping timeout: 264 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jeffreylevesque has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
Inline has quit [Remote host closed the connection]
Inline has joined #ruby
Tempesta has quit [Quit: AdiIRC is updating to v3.2 Beta Build (2018/08/25) 64 Bit]
Tempesta has joined #ruby
AJA4350 has quit [Quit: AJA4350]
tdy has joined #ruby
JoshS has joined #ruby
faitswulff has joined #ruby
nadir has joined #ruby
nowhereman has joined #ruby
nowhere_man has quit [Read error: Connection reset by peer]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
faitswulff has quit [Ping timeout: 264 seconds]
jottr has joined #ruby
doubledup has quit [Quit: Leaving]
bmurt has joined #ruby
wild_buffalo has joined #ruby
<wild_buffalo> Hi,
<wild_buffalo> What does this mean: class ClassA > ClassB; end?
bryanray has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
<apeiros> wild_buffalo: that means syntax error
<apeiros> wild_buffalo: please make sure that you correctly reproduce the code you have questions about.
<wild_buffalo> apeiros: right, let me elaborate
<wild_buffalo> I saw some code that had a class point with '>' to another class, what does the '>' symbol mean in that context?
<apeiros> `ClassA > ClassB` is Module#> and returns true if ClassA is an ancestor of ClassB
<apeiros> I'd usually rather write that as `ClassB < ClassA` for its similarity to `class ClassB < ClassA`
<apeiros> wild_buffalo: oh, wow, those examples are just flat out broken code
<wild_buffalo> apeiros: ah, that makes more sense
<wild_buffalo> I've been looking around because that made no sense
<apeiros> the code on the page you just linked has broken code. should be < there, not >.
<wild_buffalo> Next time I should just repl it first
<wild_buffalo> apeiros: that was my initial thought, but I'm just learning Ruby so I had no idea
<wild_buffalo> apeiros: thanks
<apeiros> you should probably inform the page maintainer about that.
bmurt has quit [Read error: Connection reset by peer]
phoo1234567 has joined #ruby
bmurt has joined #ruby
<wild_buffalo> apeiros: yup, sent a message on their IRC
socomm has joined #ruby
<socomm> Hello. I'm new to ruby and just playing around with it. I wonder how I would access this variable in puts "x=['blue', ['weak' => 'strong']]" -- I tried puts "x['blue']['weak']" but I get nothing
<apeiros> socomm: those are nested arrays. arrays are accessed by index (position)
<apeiros> so: x[0] gives you "blue", x[1] gives you [{'weak' => 'strong'}], and x[1][0] gives you {'weak' => 'strong'}
<apeiros> I somewhat assume the ['weak' => 'strong'] is a mistake, though, as it makes little sense. it's a shorthand for [{'weak' => 'strong'}], and probably should be just {'weak' => 'strong'}
<socomm> Gotcha. How about I do it with a hash?
<socomm> nvm I'll look it up, sorry to bug
<weaksauce> replace the [] with {}
<weaksauce> and have blue =>
<weaksauce> instead of ,
<weaksauce> think of an array as positional and a hash as relational
<socomm> weaksauce: got it thanks for the clarification
alex`` has quit [Ping timeout: 252 seconds]
bryanray has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nicoulaj has quit [Quit: quit]
roshanavand has quit [Quit: leaving]
socomm has left #ruby ["WeeChat 2.2"]
kapil___ has quit [Quit: Connection closed for inactivity]
SCHAPiE has quit [Quit: ZNC - https://znc.in]
jasmith has joined #ruby
SCHAPiE has joined #ruby
bryanray has joined #ruby
neoreb has quit [Remote host closed the connection]
BTRE has quit [Ping timeout: 272 seconds]
Dbugger has quit [Ping timeout: 264 seconds]
jottr has joined #ruby
ahuman has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 272 seconds]
AJA4350 has joined #ruby
bmurt has quit [Read error: Connection reset by peer]
samort7 has joined #ruby
bmurt has joined #ruby
peirama has quit [Remote host closed the connection]
AndroidKitKat has quit []
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
peirama has joined #ruby
dbz has joined #ruby
j0bk has left #ruby ["Textual IRC Client: www.textualapp.com"]
peirama has quit [Ping timeout: 244 seconds]
gizmore has joined #ruby
wild_buffalo has quit [Quit: WeeChat 2.1]
bryanray has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jane_booty_doe has joined #ruby
peirama has joined #ruby
nfk has joined #ruby
<nfk> so i asked google "ruby gui" and out came http://shoesrb.com/ so i went and started reading "The Book" and... is this framework for real or is it some elaborate joke?
<gizmore> nfk: you maybe want ruby qt or kde bindings?
<apeiros> nfk: shoes is real
<nfk> gizmore, i have tried it plenty, no more suffering of that
<nfk> it's either javascript or nothing when it comes to qt/kde
<apeiros> the original author did like to include a lot of jokes, though. google for "_why the lucky stiff"
<nfk> apeiros, more like someone went off their meds..
peirama has quit [Ping timeout: 252 seconds]
<weaksauce> nfk unfortunately i haven't found a decent gui for ruby
<nfk> yes, that's exactly why i just did "ruby gui" T_T
<weaksauce> i just wanted one for visualization of things
<nfk> weaksauce, in that case i suspect it's easier to just output to png or something
<nfk> or even just compile CLI calls to gnuplot if that can do your bidding
BTRE has joined #ruby
<nfk> i know i did plenty of homework that way
<weaksauce> well not a static image
<nfk> i used ffmpeg to turn them into mp4, natch'
<weaksauce> i was looking for something that you can visualize easily and interact with
<nfk> comes with being from the scene
<weaksauce> like say you want to interactively create quad trees or whatever and visualize that ds
<nfk> weaksauce, hmm.... yeah, i'm thinking of something like that for some other stuff.. i really can't think of anything better than HTML5, though
bak1an_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<weaksauce> or quick interfaces for scripts
<nfk> apeiros, so.. is shoes any good and how does it compare to other solutions out there?
<weaksauce> it would be nice to have a good ruby gui
beefjoe has joined #ruby
<apeiros> nfk: I'm sorry, I don't use GUI toolkits with ruby, so I wouldn't know.
<nfk> i haven't so far either but at this point it's like "gotta find something decent, usable and preferably cute" or i'm doing GUI in RoR...
beefjoe has quit [Remote host closed the connection]
nadir has quit [Quit: Connection closed for inactivity]
<weaksauce> peruse the options
<weaksauce> the java one might be the easiest to get going
dbz has quit [Remote host closed the connection]
<nfk> yeah, i have seen it before, can't say I liked any of them
dbz has joined #ruby
BTRE has quit [Ping timeout: 252 seconds]
<nfk> i'm not looking forward to making a gui in rails but it should be good enough for my needs and there's going to be either mongo or sqlite db behind the app anyway
<nfk> it just feels a bit crazy to go that route, besides i'm sure there's some limitations to leaving the project folder or even app folder, and i want to interact with the entire / tree
<havenwood> nfk: Whatcha making a GUI for? Or just wondering in general?
dbz has quit [Ping timeout: 272 seconds]
<havenwood> nfk: TK was in the Ruby standard library until fairly recently.
peirama has joined #ruby
<nfk> hmm... for starters i want to to able to calculate file hashes in various folders to deal with my 10+ years of rampant "oh, this USB stick probably is 100% duplicate but I don't have time to check, mv'ed"
<nfk> then i might want to look for files that have changed slightly (metadata or something) but are actually the same
<nfk> even under different names, and finally making the mess work with my android phone would be great
<nfk> likely via webav or something as mtp is so broken that getting it working is le work
bryanray has joined #ruby
<nfk> oh, can i haz' imporant and deduped file replication to my other computers, while at it?
dbz has joined #ruby
<havenwood> nfk: Is a gui better than a command line app for it?
<havenwood> nfk: I guess the file selector is handy?
* baweaver wanders in
<havenwood> o/
<nfk> for me, probably and for a change i should actually publish it, so, yes, gui is a must
<nfk> also that
<havenwood> nfk: One of the latest Shoes (Shoes 4) is currently targeting JRuby and SWT: https://github.com/shoes/shoes4
peirama has quit [Ping timeout: 272 seconds]
<nfk> ah, so that's the java weaksauce meant?
<nfk> i wondered why i saw no java on that list
<nfk> i wonder if that runs on raspbian (armv7) and does so decently
<nfk> not a hard requirement but i try to make everything i do work on at least every linux system i own
<nfk> which is also why c++ is out - compiling on that thing is not a quick or simple task
<havenwood> nfk: JRuby or CRuby should be fine on that front.
sameerynho has quit [Ping timeout: 244 seconds]
<havenwood> nfk: Here's a little Hello World in TK: https://gist.github.com/havenwood/efc6e04343fb7abeb55d3e0ef66af881
<havenwood> nfk: As soon as you add a bit, Shoes is way less verbose. I've never made a complex GUI with Shoes though.
<havenwood> nfk: Here's a little employee time sheet app with TK using an API: https://gist.github.com/havenwood/329523c98faea3c9eb8ac9652b1b05f8
<nfk> does it still look like someone just vomited on the screen?
<havenwood> nfk: yes
<nfk> i would not want to look or use that, and neither would anyone else, so why bother
<nfk> if it's just for me, i can go cli
<havenwood> nfk: At least when done with my GUI skill level. ;-P
<havenwood> nfk: Actually, TK and SWT don't look bad if you bother.
<nfk> i literally go with cli every single time i get to choose between tk and ncurses (or even plain bash)
<havenwood> nfk: <3 CLIs
<nfk> i know about swt, i also know that thing almost made me fail my java, so... i'll pass
<havenwood> nfk: Shoes is way more straightforward to write simple things for.
<nfk> yeah, i really like the example code for shoes
<nfk> so ERPy
<havenwood> running *ALL* the samples is fun: bundle exec rake samples:all
clemens3 has quit [Ping timeout: 252 seconds]
bryanray has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arescorpio has joined #ruby
<nfk> btw, what did you mean by "Shoes is way less verbose" once the gui gets more built up?
<havenwood> nfk: I just notice that with Shoes I end up with way less code.
<havenwood> To do the same thing.