bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dounx has left #ruby [#ruby]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thebrianguy has quit [Quit: Leaving]
hahuang65 has quit [Ping timeout: 255 seconds]
facest has joined #ruby
devil_tux has quit [Ping timeout: 246 seconds]
faces has quit [Ping timeout: 246 seconds]
mangold has joined #ruby
dellavg__ has joined #ruby
claw has quit [Ping timeout: 252 seconds]
claw has joined #ruby
stan has quit [Ping timeout: 252 seconds]
stan has joined #ruby
tdy1 has quit [Ping timeout: 246 seconds]
dellavg__ has quit [Ping timeout: 272 seconds]
jud has joined #ruby
jud has quit [Changing host]
jud has joined #ruby
jud^ has quit [Ping timeout: 255 seconds]
crankharder has joined #ruby
ricekrispie2 has joined #ruby
tdy1 has joined #ruby
Swyper has quit [Remote host closed the connection]
jud has quit [Quit: Leaving]
nowhere_man has quit [Ping timeout: 252 seconds]
devil_tux has joined #ruby
devil_tux has quit [Ping timeout: 252 seconds]
TvL2386 has joined #ruby
imadper is now known as iMadper|MTG
iMadper|MTG has quit [Remote host closed the connection]
bhaak has joined #ruby
Inline has quit [Quit: Leaving]
devil_tux has joined #ruby
sauvin has joined #ruby
conta has joined #ruby
hahuang65 has joined #ruby
Ai9zO5AP has joined #ruby
hahuang65 has quit [Ping timeout: 245 seconds]
<sagax>
hi all!
<sagax>
what different between dot notation `.` and `::`
<sagax>
?
houhoulis has quit [Ping timeout: 252 seconds]
devil_tux has quit [Ping timeout: 246 seconds]
am0123 has joined #ruby
e3 has quit [Read error: Connection reset by peer]
Fusl has quit [Ping timeout: 256 seconds]
reber has joined #ruby
imadper has joined #ruby
Fusl has joined #ruby
t0x has quit [Quit: Connection closed for inactivity]
<zenspider>
rawr
<zenspider>
sagax: :: is super old notation meant for class constant access X::Y or for calling class methods, but nobody ever does the latter
crankharder has quit [Ping timeout: 246 seconds]
Devalo has joined #ruby
Devalo has quit [Ping timeout: 245 seconds]
e3 has joined #ruby
<sagax>
thanks
am0123 has quit [Ping timeout: 268 seconds]
devil_tux has joined #ruby
crankharder has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
cam27 has quit [Quit: cam27]
luminousnine has joined #ruby
luminousnine has quit [Changing host]
luminousnine has joined #ruby
cyberarm has quit [Ping timeout: 250 seconds]
devil_tux has quit [Ping timeout: 255 seconds]
mangold has joined #ruby
D9 has quit [Read error: Connection reset by peer]
schleppel has joined #ruby
Echo has joined #ruby
aufi has joined #ruby
clemens3_ has joined #ruby
gix has joined #ruby
eckhardt has joined #ruby
<sagax>
if i need all without first element - it's normal way?
<sagax>
f=[1,2,3,4,5]; f.slice(1, f.length)
eckhardt has quit [Client Quit]
clemens3_ has quit [Ping timeout: 252 seconds]
andikr has joined #ruby
<leftylink>
sagax: consider `f.drop(1)`
<leftylink>
f[1..-1] might also be appropriate as well
<sagax>
not bad
gix- has joined #ruby
gix has quit [Disconnected by services]
<sagax>
thanks
<Yxhuvud>
or f.shift if you just want to modify it.
vondruch has joined #ruby
<sagax>
no, without modified
teclator has joined #ruby
<leftylink>
hmm
<leftylink>
wrong window
gix- has quit [Ping timeout: 244 seconds]
devil_tux has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
suukim has joined #ruby
clemens3_ has joined #ruby
imadper is now known as iMadper|MIGA
am0123 has joined #ruby
tdy1 has quit [Ping timeout: 246 seconds]
_joes_ has joined #ruby
andikr has quit [Ping timeout: 246 seconds]
ansraliant has quit [Quit: My planet needs me]
crankharder has quit [Ping timeout: 246 seconds]
andikr has joined #ruby
_joes_ has quit [Ping timeout: 255 seconds]
conta1 has joined #ruby
conta has quit [Read error: Connection reset by peer]
conta1 is now known as conta
lxsameer has joined #ruby
mangold has joined #ruby
dhollin3 has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.4]
devil_tux has quit [Ping timeout: 255 seconds]
dhollinger has quit [Ping timeout: 268 seconds]
andikr has quit [Quit: No Ping reply in 180 seconds.]
andikr has joined #ruby
cyberarm has joined #ruby
al2o3-cr has joined #ruby
marcoecc has joined #ruby
<ryouba>
good morning rubyists
qual has joined #ruby
ur5us has quit [Remote host closed the connection]
qual has quit [Client Quit]
claudiuinberlin has joined #ruby
Eiam has quit [Read error: Connection reset by peer]
renich has joined #ruby
renich_ has quit [Ping timeout: 252 seconds]
renich has quit [Remote host closed the connection]
devil_tux has joined #ruby
matthewd has quit [Ping timeout: 250 seconds]
ellcs has joined #ruby
matthewd has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
qual has joined #ruby
hahuang65 has joined #ruby
crankharder has joined #ruby
apparition has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
<sagax>
hi
kapil____ has joined #ruby
am0123 has quit [Ping timeout: 272 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
TomyWork has joined #ruby
devil_tux has quit [Ping timeout: 252 seconds]
ua has quit [Excess Flood]
Brian-W-Gray has joined #ruby
ua has joined #ruby
yqt has joined #ruby
BrianWGray has quit [Ping timeout: 246 seconds]
qual has quit [Quit: qual]
xuyuheng has joined #ruby
Echo has quit [Remote host closed the connection]
Echo has joined #ruby
qual has joined #ruby
Echo has quit [Ping timeout: 255 seconds]
qual has quit [Client Quit]
GreyHame has quit [Remote host closed the connection]
am0123 has joined #ruby
dar123 has joined #ruby
iMadper|MIGA has quit [Remote host closed the connection]
iMadper|MIGA has joined #ruby
AJA4350 has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
_joes_ has joined #ruby
andikr has quit [Ping timeout: 246 seconds]
esrse has quit [Ping timeout: 246 seconds]
sphenxes has joined #ruby
dante has quit [Ping timeout: 246 seconds]
Devalo has joined #ruby
sphenxes has quit [Client Quit]
dante has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
devil_tux has joined #ruby
e3 is now known as e2
GreyHame has joined #ruby
za1b1tsu has joined #ruby
claudiuinberlin has quit [Read error: Connection reset by peer]
stimpy_ has joined #ruby
xuyuheng has quit [Quit: Quit: My MacBook Pro has gone to sleep. ZZZzzz?]
stimpy_ has quit [Quit: Leaving]
stimpy_ has joined #ruby
stimpy_ has quit [Client Quit]
stimpy_ has joined #ruby
_joes_ has quit [Ping timeout: 246 seconds]
GreyHame has quit [Ping timeout: 252 seconds]
qual has joined #ruby
devil_tux has quit [Ping timeout: 246 seconds]
devil_tux has joined #ruby
hhzza has joined #ruby
ldnunes has joined #ruby
xrexeon has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
za1b1tsu has quit [Remote host closed the connection]
ubuntuisloved has joined #ruby
TomyWork has joined #ruby
qual has quit [Quit: qual]
jim4 has joined #ruby
<jim4>
Hello
bmurt has joined #ruby
<jim4>
regarding publishing a gem, i wish to publish a library, do i need to use a class or a module ? do i need to use a namespace ? ; it is a single file .rb
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phaul>
class vs module is an orthogonal question, it's a design decision not a packaging one. Namespacing you code is a good idea.
jim4 has quit [Quit: Page closed]
ubuntuisloved has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cam27 has joined #ruby
stryek has joined #ruby
_joes_ has joined #ruby
dar123 has joined #ruby
<sagax>
what the best? [].append or [] << ?
tiogrand_ has joined #ruby
asio has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
conta has quit [Ping timeout: 245 seconds]
<phaul>
<< saves 4 bytes of source code
devil_tux has quit [Ping timeout: 246 seconds]
galaxie has quit [Quit: ircII EPIC4-2.10.6 -- Are we there yet?]
houhoulis has joined #ruby
qual has joined #ruby
_joes_ has quit [Quit: _joes_]
_joes_1 has joined #ruby
devil_tux has joined #ruby
hahuang65 has joined #ruby
cam27 has quit [Quit: cam27]
<sagax>
[] << some_value
ubuntuisloved has joined #ruby
dhollin3 is now known as dhollinger
tau has joined #ruby
<al2o3-cr>
sagax: bear in mind, append is variadic whilst << is not. so, if you appending multilple values use append/push as you see fit.
xrexeon has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
devil_tux has quit [Ping timeout: 252 seconds]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Macrobiotic has left #ruby [#ruby]
ubuntuisloved has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xrexeon has joined #ruby
ricekrispie has joined #ruby
ubuntuisloved has joined #ruby
ricekrispie2 has quit [Ping timeout: 250 seconds]
apparition has quit [Quit: Bye]
mangold has joined #ruby
Devalo has joined #ruby
Devalo has quit [Ping timeout: 245 seconds]
griffindy has joined #ruby
tiogrand__ has joined #ruby
krawchyk has joined #ruby
tiogrand_ has quit [Ping timeout: 252 seconds]
orbyt_ has joined #ruby
yqt has quit [Ping timeout: 255 seconds]
ams__ has joined #ruby
qual has quit [Quit: qual]
suukim has quit [Quit: Konversation terminated!]
lucasb has joined #ruby
vondruch has quit [Ping timeout: 250 seconds]
mangold has quit [Ping timeout: 240 seconds]
cam27 has joined #ruby
snk is now known as snk_
Swyper has joined #ruby
gnufied has joined #ruby
xco has joined #ruby
<xco>
Hi everyone! is there a method in Rails/Ruby that does this? ‘Time.now.to_i.to_s’
Inline has joined #ruby
<bhaak>
depends on what you want it to do. this is a valid chain of methods in Ruby
<xco>
yeah it’s valid but i was wondering if there could be a short cut because it looks like something people might want to do often
<bhaak>
it's pretty short already. if you use String interpolation, you don't need to to_s: "something #{Time.now.to_i} something else"
<xco>
bhaak: thanks :)
houhoulis has quit [Remote host closed the connection]
grilix has joined #ruby
krawchyk has quit [Quit: krawchyk]
krawchyk has joined #ruby
laaron has quit [Remote host closed the connection]
alem0lars has joined #ruby
Swyper has quit [Remote host closed the connection]
polishdub has joined #ruby
Swyper has joined #ruby
marcoecc has quit [Remote host closed the connection]
marcoecc has joined #ruby
Swyper has quit [Remote host closed the connection]
laaron has joined #ruby
Swyper has joined #ruby
rippa has joined #ruby
alanmaxwell has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
alanmaxwell has quit [Client Quit]
SeepingN has joined #ruby
cam27 has quit [Quit: cam27]
za1b1tsu has joined #ruby
DaRock has quit [Ping timeout: 252 seconds]
mangold has joined #ruby
jaddison has joined #ruby
mangold has quit [Client Quit]
wallace_mu has joined #ruby
xrexeon has quit [Ping timeout: 250 seconds]
lord4163 has quit [Quit: Gotta go cya!]
Swyper has quit [Remote host closed the connection]
dar123 has joined #ruby
krawchyk has quit [Quit: krawchyk]
dar123 has quit [Client Quit]
_joes_1 has quit [Ping timeout: 252 seconds]
devil_tux has joined #ruby
apparition has joined #ruby
Swyper has joined #ruby
<robotcars>
with httparty, how do I get the :id into the URL instead of the query string?
<robotcars>
I have, /courses?course_id=123&courses[event]=offer
krawchyk has joined #ruby
<robotcars>
i need, /courses/123?courses[event]=offer
<robotcars>
using class > self.class.put()
krawchyk has quit [Client Quit]
xrexeon has joined #ruby
am0123 has quit [Ping timeout: 246 seconds]
t0x has joined #ruby
mangold has joined #ruby
dar123 has joined #ruby
krawchyk has joined #ruby
xrexeon has quit [Ping timeout: 240 seconds]
renich has joined #ruby
krawchyk has quit [Client Quit]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
krawchyk has joined #ruby
krawchyk has quit [Quit: krawchyk]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has quit [Remote host closed the connection]
aufi has quit [Ping timeout: 272 seconds]
qual has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
cthulchu_ has joined #ruby
[Butch] has joined #ruby
grilix has quit [Ping timeout: 252 seconds]
grilix has joined #ruby
asdf23redf345gfd has joined #ruby
qual has quit [Quit: qual]
renich_ has joined #ruby
canurabus has joined #ruby
Swyper has joined #ruby
renich has quit [Ping timeout: 255 seconds]
tdy1 has joined #ruby
<canurabus>
Hi. I'm looking for some help in understanding a line of code. I'm lost in what is going on here: "matches = text.to_enum(:scan, MatchRegExp).map { Regexp.last_match }"
Swyper has quit [Remote host closed the connection]
<canurabus>
I don't get what 'to_enum' does to text (which is a String)
bmurt has quit [Ping timeout: 245 seconds]
tdy1 has quit [Read error: Connection reset by peer]
asdf23redf345gfd has left #ruby [#ruby]
Swyper has joined #ruby
tdy1 has joined #ruby
wallace_mu has quit [Quit: Page closed]
wallace_mu has joined #ruby
<canurabus>
Actually I think I get that to_enum(:scan, MatchRegExp) creates an enumerator that will generate an enumeration of all the matches from the RegExp? ie basically an enumeration of 'text.scan(MatchRegExp)'. But I don't get why calling map on that enumeration with Regexp.last_match works
<al2o3-cr>
canurabus: to_enum takes a method (defaults to :each) and variable amount of args. in your case you're passing :scan which is an instance method of String class with a regex argument.
<al2o3-cr>
and returns an enumerator instead of an array.
<canurabus>
Right. And calling scan on the string will generate an array of matches (of type string). But the final result is a set of matches (of type MatchData). I guess I don't get the 'trick'. Is it that because its an enumerable the map block is executed once after each match is found rather than after all matches are found?
<al2o3-cr>
Regexp.last_match with give you Matchdata objects
krawchyk has joined #ruby
<al2o3-cr>
&>> "foo $ bar £ baz".to_enum(:scan, /\p{S}/).to_a
<canurabus>
Yeah, but I get a different set of results if I do this: 'matches = text.scan(MatchRegExp); mds = matches.map { Regexp.last_match }'
hahuang65 has joined #ruby
KeyJoo has joined #ruby
<al2o3-cr>
you will do
Swyper has quit [Remote host closed the connection]
<al2o3-cr>
matches.map { Reg... } will just give you same Matchdata object to the size of matches array
orbyt_ has joined #ruby
krawchyk has quit [Quit: krawchyk]
vondruch has joined #ruby
noboruma has quit [Remote host closed the connection]
<canurabus>
I don't clearly understand why that is the case. Is it because in the latter case I am passing the 'already complete' Array to map, whereas before its an Enumerator whcih will call yield after each single regexp match?
<al2o3-cr>
canurabus: in effect, yes.
<canurabus>
Ok, thanks. Still a bit fuzzy on enumerators, will do more reading.
<al2o3-cr>
canurabus: you'll get the hang soon enough.
<al2o3-cr>
"foo 1 bar 2 baz 3".to_enum(:scan, /\d+/) # this returns a enumerator
<al2o3-cr>
&>> "foo 1 bar 2 baz 3".to_enum(:scan, /\d+/).next # next in enumerator == "1"
<bjpenn>
trying to run spec, and im getting a weird warning WARN: Unresolved specs during Gem::Specification.reset: minitest (~> 5.1)
<bjpenn>
i did a gem list and there are two versions of minitest, but when i do gem uninstall minitest --version <older version>, the output says uninstalled, but when i do a gem list again, it remains in there
<bjpenn>
when i do a bundle exec gem list, only the newer version is listed
<bjpenn>
any clues on how to resolve?
gaussblurinc1 has quit [Quit: Leaving.]
orbyt_ has joined #ruby
lord4163 has joined #ruby
cam27 has quit [Quit: cam27]
<bjpenn>
finally found something online that helped!
<bjpenn>
i did a bundle cleanup --force, followed by a bundle install, i think the idea here was to get my gem list in a clean state
<bjpenn>
i got the error message saying a bunch of gems belonging to groups are not installed
<bjpenn>
there was no such thing as ~/.bundle/config file, so i was wondering why it was not installing, so i happened to come across this command bundle config . Actually my bundle config was located in an rvm directory, so i went in there, and removed hardcoded entries which prevented gems from installing within a group
<bjpenn>
this fixed it :D
<bjpenn>
(after running bundle install again) it fixed it
ubuntuisloved has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bjpenn has quit [Ping timeout: 255 seconds]
Eiam has joined #ruby
ur5us has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
stan has quit [Quit: No Ping reply in 180 seconds.]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
tiogrand__ has quit [Ping timeout: 246 seconds]
tpanarch1st has joined #ruby
stan has joined #ruby
bjpenn has joined #ruby
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
Devalo has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
jcalla has quit [Remote host closed the connection]
crawler has joined #ruby
unreal has quit [Ping timeout: 252 seconds]
Swyper has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
unreal has joined #ruby
Fernando-Basso has joined #ruby
ldnunes has quit [Quit: Leaving]
ravenousmoose has joined #ruby
ubuntuisloved has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grilix_ has quit [Ping timeout: 245 seconds]
crawler has quit [Ping timeout: 255 seconds]
ams__ has quit [Quit: Connection closed for inactivity]
wallace_mu has quit [Quit: Page closed]
dionysus70 has quit [Ping timeout: 272 seconds]
marmotini_ has joined #ruby
sanscoeur has quit []
marmotini_ has quit [Ping timeout: 255 seconds]
Ai9zO5AP has quit [Quit: WeeChat 2.4]
Swyper has quit [Remote host closed the connection]
cthu| has joined #ruby
rbdr has joined #ruby
Swyper has joined #ruby
cthulchu_ has quit [Ping timeout: 250 seconds]
Swyper has quit [Ping timeout: 255 seconds]
Swyper has joined #ruby
Devalo has joined #ruby
marmotini_ has joined #ruby
unreal has quit [Ping timeout: 246 seconds]
eddof13 has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
bjpenn has quit [Ping timeout: 252 seconds]
oncall-pokemon has quit [Quit: Connection closed for inactivity]
<uplime>
is there any difference memory/perforance wise between double and single quotes? I remember (vaguely) hearing about this at a meetup from a while ago, and can't quite recall what was said
<c-c>
Hmm, next I'll have to write the engine-from-rules -thing. I still think the rules should be possible to write in yml
<havenwood>
uplime: there's difference in how they're parsed, but they create the same Ruby AST - so they get evaluated identically by the VM.
<c-c>
engine-genny
<havenwood>
uplime: the parsing speed difference should be negligible, if any
<havenwood>
uplime: there's no IR evaluation speed difference
<uplime>
thanks, i figured as much. i like to use a consistent quoting "scheme", but rubocop wasn't too happy about that
<c-c>
rubocop would retire if it saw my code
<uplime>
haha
<c-c>
have to clean up first
t0x has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
polishdub has quit [Quit: leaving]
cam27 has joined #ruby
cam27 has quit [Client Quit]
sanscoeur has joined #ruby
Swyper_ has joined #ruby
Swyper has quit [Remote host closed the connection]
<zenspider>
uplime: there are (were?) performance differences in PERL... not in ruby
orbyt_ has joined #ruby
<zenspider>
uplime: I wrestled with rubocop to implement "seattle style" which includes only using double quoted strings (or % forms)... eventually decided it wasn't worth it
Swyper_ has quit [Remote host closed the connection]
Fernando-Basso has quit [Remote host closed the connection]
bjpenn has joined #ruby
<baweaver>
zenspider: evil me is writing in only double-quotes for the book
<baweaver>
It feels like a bad idea to teach newbies otherwise, too much potential for confusion for very little gain.
marmotini_ has quit [Ping timeout: 250 seconds]
<zenspider>
I don't see how or why that is "evil"
<baweaver>
Fair. Trying not to add a ton of nuance to the book, and more of just "do it this way"
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]