00:01
bkxd has joined #ruby
00:02
jeanlinux has joined #ruby
00:02
_djbkd has joined #ruby
00:02
johnmccabe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
00:04
tmtwd has joined #ruby
00:05
jphase has quit [Remote host closed the connection]
00:05
jphase has joined #ruby
00:05
teclator has quit [Ping timeout: 265 seconds]
00:06
jeanlinux has quit [Ping timeout: 244 seconds]
00:07
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:07
threh has quit [Ping timeout: 250 seconds]
00:08
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
00:10
jphase has quit [Ping timeout: 255 seconds]
00:10
last_staff has quit [Quit: last_staff]
00:13
postmodern has quit [Ping timeout: 272 seconds]
00:13
johnmilton has joined #ruby
00:13
ur5us has quit [Remote host closed the connection]
00:14
historypeats has quit [Quit: Connection closed for inactivity]
00:14
minimalism has quit [Quit: minimalism]
00:14
arescorpio has joined #ruby
00:15
weemsledeux has joined #ruby
00:15
g1nc has quit [Read error: Connection reset by peer]
00:16
wrkrcoop has left #ruby [#ruby]
00:16
jphase has joined #ruby
00:16
minimalism has joined #ruby
00:17
duderonomy has quit [Ping timeout: 272 seconds]
00:19
nitric has quit [Quit: sleep]
00:22
jphase has quit [Ping timeout: 272 seconds]
00:22
RedNifre has joined #ruby
00:24
postmodern has joined #ruby
00:25
RedNifre_ has quit [Ping timeout: 244 seconds]
00:26
Regulati_ has quit [Remote host closed the connection]
00:26
gfvcastro has joined #ruby
00:28
RegulationD has joined #ruby
00:31
JeanCarloMachado has joined #ruby
00:32
bkxd has quit [Ping timeout: 255 seconds]
00:33
jphase has joined #ruby
00:33
Rickmasta has joined #ruby
00:33
blackmes1 has quit [Ping timeout: 248 seconds]
00:37
_djbkd has quit [Quit: My people need me...]
00:40
SeepingN has quit [Quit: The system is going down for reboot NOW!]
00:41
Sashimi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:41
eljimmy has quit [Quit: This computer has gone to sleep]
00:43
jackjackdripper1 has quit [Quit: Leaving.]
00:44
mistermocha has joined #ruby
00:49
mistermocha has quit [Ping timeout: 248 seconds]
00:51
nankyokusei has joined #ruby
00:52
pavshn has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
00:54
fullofca_ has quit [Remote host closed the connection]
00:54
LoneHermit has joined #ruby
00:56
nankyokusei has quit [Ping timeout: 244 seconds]
00:56
jphase has quit [Remote host closed the connection]
00:57
jphase has joined #ruby
00:57
a7d7p has quit [Quit: a7d7p]
00:58
ngscheur1 has joined #ruby
00:58
fullofca_ has joined #ruby
00:58
Pumukel has joined #ruby
00:58
LoneHermit has quit [Ping timeout: 244 seconds]
00:58
akira616` has quit [Ping timeout: 255 seconds]
01:00
jonyijoe has joined #ruby
01:01
ur5us has joined #ruby
01:01
jphase has quit [Ping timeout: 250 seconds]
01:01
GodFather has quit [Ping timeout: 244 seconds]
01:02
a7d7p has joined #ruby
01:02
fullofca_ has quit [Ping timeout: 244 seconds]
01:05
jonyijoe has quit [Ping timeout: 255 seconds]
01:05
ur5us has quit [Ping timeout: 240 seconds]
01:06
rafadc has joined #ruby
01:07
duderonomy has joined #ruby
01:13
P1ro is now known as P1ro__
01:13
P1ro__ is now known as P1ro
01:14
maletor has quit [Ping timeout: 265 seconds]
01:16
zeroDi has quit [Quit: WeeChat 1.5]
01:17
Technodrome has quit [Remote host closed the connection]
01:18
Jardayn_two has joined #ruby
01:18
Coldblackice has joined #ruby
01:21
Joufflu has joined #ruby
01:22
Jardayn has quit [Ping timeout: 244 seconds]
01:22
BackEndCoder has quit [Excess Flood]
01:24
BackEndCoder has joined #ruby
01:28
tekacs has quit [Quit: Disappearing... *poof*]
01:28
gfvcastro has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
01:30
blackmes1 has joined #ruby
01:30
patteh_ has quit [Read error: Connection reset by peer]
01:30
patteh has joined #ruby
01:31
kies has joined #ruby
01:32
biox has left #ruby ["WeeChat 1.4"]
01:33
nando293921 has joined #ruby
01:34
tekacs has joined #ruby
01:34
mikecmpbll has quit [Quit: inabit. zz.]
01:35
fullofcaffeine has joined #ruby
01:36
blackmes1 has quit [Ping timeout: 240 seconds]
01:38
jphase has joined #ruby
01:38
vdamewood has joined #ruby
01:39
tekacs has quit [Quit: Disappearing... *poof*]
01:40
rafadc has quit [Ping timeout: 240 seconds]
01:40
blackwind_123 has quit [Ping timeout: 248 seconds]
01:40
minimalism has quit [Quit: minimalism]
01:40
gfvcastro has joined #ruby
01:41
tekacs has joined #ruby
01:41
minimalism has joined #ruby
01:41
wombawomba has quit [Ping timeout: 248 seconds]
01:44
gfvcastro has quit [Client Quit]
01:44
gfvcastro has joined #ruby
01:45
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
01:45
mistermocha has joined #ruby
01:45
a7d7p has quit [Quit: a7d7p]
01:46
harfangk has joined #ruby
01:49
vdamewood has quit [Ping timeout: 265 seconds]
01:50
mistermocha has quit [Ping timeout: 248 seconds]
01:50
axsuul has joined #ruby
01:50
axsuul has quit [Client Quit]
01:51
thetrav has quit [Remote host closed the connection]
01:52
newbie1 has quit [Ping timeout: 265 seconds]
01:53
axsuul has joined #ruby
01:54
pawnbox has quit [Remote host closed the connection]
01:54
akira616` has joined #ruby
01:55
LoneHerm_ has joined #ruby
01:55
JeanCarloMachado has quit [Ping timeout: 248 seconds]
01:57
gfvcastro has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
01:59
LoneHerm_ has quit [Ping timeout: 265 seconds]
02:01
jphase has quit [Remote host closed the connection]
02:02
rprimus has quit [Remote host closed the connection]
02:02
jphase has joined #ruby
02:04
aryaching has quit [Read error: Connection reset by peer]
02:04
pawnbox has joined #ruby
02:05
<
Majost >
Is there something like mechanize which also has a javascript parser?
02:05
<
bougyman >
I thought mechanize supported that?
02:05
<
bougyman >
or, and extension does
02:06
<
bougyman >
though I tried it with little success before.
02:06
<
bougyman >
oh no not that one.
02:06
jphase has quit [Ping timeout: 248 seconds]
02:06
<
Majost >
yeah, this looks fairly out of date too
02:06
<
bougyman >
when I need to scrape or automate hairy websites, I use watir
02:07
<
bougyman >
phantomjs, that's the one I tried before.
02:07
<
Majost >
Doesn't watir need a real browser though?
02:07
<
bougyman >
yes and no.
02:08
<
bougyman >
but the kicker is, I want that, when i'm doing a site so complex that just makes it easy-peasy
02:08
<
bougyman >
and I throw a headless vnc up running a browser instance for automating it.
02:08
<
bougyman >
basically kick off the watir script with a supervisor in a vnc.
02:08
pawnbox has quit [Ping timeout: 244 seconds]
02:08
<
bougyman >
and since it's a vnc, you control the exact size of everything.
02:09
<
bougyman >
it's the only way I was able to script a good, say: Mafia Wars bot.
02:09
<
Majost >
Hopefully I wont need that much.
02:09
<
bougyman >
cause I used x-tools to use the mouse on some of the flash shit they threw in the mix to fuck up automated bots.
02:09
<
bougyman >
the xtest lib shit is fucking great.
02:09
<
bougyman >
that's what would drive the mouse and keyboard when necessary
02:09
<
Majost >
yeah, I am just trying to get a oauth token from amazon (not aws) and they recently added some javascript bot detection crap which broke me.
02:10
<
Majost >
I haven't really dug into it, but I think its just a javascript set cookie.
02:11
maletor has joined #ruby
02:11
<
Majost >
I will take a look at phantomjs first. =)
02:16
maletor has quit [Ping timeout: 244 seconds]
02:22
monoprotic has quit [Ping timeout: 265 seconds]
02:29
roflmyeggo has joined #ruby
02:30
oz has quit [Ping timeout: 248 seconds]
02:32
oz has joined #ruby
02:32
blackmes1 has joined #ruby
02:33
spectrum has quit [Read error: Connection reset by peer]
02:33
P1ro_ has quit [Remote host closed the connection]
02:34
roflmyeggo has quit [Ping timeout: 250 seconds]
02:37
blackmes1 has quit [Ping timeout: 265 seconds]
02:40
gfvcastro has joined #ruby
02:41
[k- has quit [Remote host closed the connection]
02:42
wombawomba has joined #ruby
02:42
gfvcastro has quit [Client Quit]
02:44
Jardayn_two has quit [Read error: Connection reset by peer]
02:44
perry has left #ruby ["undefined"]
02:45
braincrash has quit [Ping timeout: 276 seconds]
02:46
wombawomba has quit [Ping timeout: 248 seconds]
02:47
akira616` has quit [Ping timeout: 255 seconds]
02:49
dviola has quit [Quit: WeeChat 1.5]
02:49
braincrash has joined #ruby
02:52
nankyokusei has joined #ruby
02:52
ruby-lang931 has joined #ruby
02:53
<
ruby-lang931 >
hi, could someone please help..? I am trying to run time_ago_in_words in a vanilla ruby script
02:53
<
ruby-lang931 >
but no matter what gem I install or what I require can't seem to get the function to be in scope
02:54
ramfjord_ has quit [Ping timeout: 248 seconds]
02:57
nankyokusei has quit [Ping timeout: 255 seconds]
03:00
peterc has joined #ruby
03:03
NetSage has joined #ruby
03:04
rubirc has quit [Ping timeout: 276 seconds]
03:05
peterc has quit [Read error: Connection reset by peer]
03:05
rubirc has joined #ruby
03:06
tdy has joined #ruby
03:06
eizua has joined #ruby
03:07
mozzarella has quit [Ping timeout: 265 seconds]
03:09
braincrash has quit [Quit: bye bye]
03:09
spectrum has joined #ruby
03:13
maletor has joined #ruby
03:14
<
ruby-lang931 >
nvm, got it
03:14
mozzarella has joined #ruby
03:14
eljimmy has joined #ruby
03:15
eljimmy has quit [Client Quit]
03:17
tekacs has quit [Quit: Disappearing... *poof*]
03:17
maletor has quit [Ping timeout: 244 seconds]
03:18
rubirc has quit [Ping timeout: 265 seconds]
03:18
johnmilton has quit [Ping timeout: 244 seconds]
03:18
tekacs has joined #ruby
03:18
ruby-lang931 has quit [Ping timeout: 240 seconds]
03:20
k3rn31 has joined #ruby
03:23
braincrash has joined #ruby
03:23
wombawomba has joined #ruby
03:26
eljimmy has joined #ruby
03:27
wombawomba has quit [Ping timeout: 244 seconds]
03:28
eljimmy has quit [Client Quit]
03:29
ngscheur1 has quit [Ping timeout: 255 seconds]
03:29
jenrzzz has joined #ruby
03:30
fullofcaffeine has quit [Remote host closed the connection]
03:30
k3rn31 has quit [Quit: Computer has gone to sleep.]
03:30
monoprotic has joined #ruby
03:30
monoprotic has joined #ruby
03:30
monoprotic has quit [Changing host]
03:32
eljimmy has joined #ruby
03:32
eljimmy has quit [Client Quit]
03:33
fullofca_ has joined #ruby
03:33
blackmes1 has joined #ruby
03:34
Pumukel has quit [Ping timeout: 248 seconds]
03:34
[k- has joined #ruby
03:37
rafadc has joined #ruby
03:39
blackmes1 has quit [Ping timeout: 260 seconds]
03:39
eljimmy has joined #ruby
03:41
hk238 has joined #ruby
03:42
sonikspin has joined #ruby
03:42
d0nn1e has quit [Ping timeout: 240 seconds]
03:42
rafadc has quit [Ping timeout: 264 seconds]
03:42
weemsledeux has joined #ruby
03:43
P1ro has quit [Remote host closed the connection]
03:43
gnufied has quit [Ping timeout: 250 seconds]
03:44
wombawomba has joined #ruby
03:44
d0nn1e has joined #ruby
03:45
ngscheur1 has joined #ruby
03:49
wombawomba has quit [Ping timeout: 264 seconds]
03:49
redpants has joined #ruby
03:50
jenrzzz has quit [Ping timeout: 265 seconds]
03:50
eljimmy has quit [Quit: This computer has gone to sleep]
03:51
jenrzzz has joined #ruby
03:51
jenrzzz has quit [Changing host]
03:51
jenrzzz has joined #ruby
03:52
P1ro has joined #ruby
03:53
vqrs has quit [Ping timeout: 276 seconds]
03:54
ngscheur1 has quit [Ping timeout: 255 seconds]
03:54
vqrs has joined #ruby
03:55
gix has quit [Ping timeout: 260 seconds]
03:56
LoneHerm_ has joined #ruby
03:58
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:58
gix has joined #ruby
03:59
skweek has quit [Ping timeout: 255 seconds]
04:01
LoneHerm_ has quit [Ping timeout: 276 seconds]
04:02
ec\ has quit [Quit: Lost terminal]
04:04
wombawomba has joined #ruby
04:05
symm- has quit [Ping timeout: 255 seconds]
04:06
Cohedrin has joined #ruby
04:07
Hyuk has joined #ruby
04:09
wombawomba has quit [Ping timeout: 255 seconds]
04:11
poikon has quit [Ping timeout: 250 seconds]
04:12
pawnbox has joined #ruby
04:12
poikon has joined #ruby
04:12
nadir_ has joined #ruby
04:12
beawesomeinstead has quit [Ping timeout: 265 seconds]
04:12
beawesomeinstead has joined #ruby
04:13
arescorpio has quit [Quit: Leaving.]
04:13
nadir has quit [Ping timeout: 272 seconds]
04:13
maletor has joined #ruby
04:14
nadir_ is now known as nadir
04:16
shakes has quit [Quit: Leaving]
04:16
ReK2 has quit [Quit: Konversation terminated!]
04:17
pawnbox has quit [Ping timeout: 240 seconds]
04:17
shinnya has quit [Ping timeout: 250 seconds]
04:17
maletor has quit [Ping timeout: 240 seconds]
04:18
Immune_ is now known as immune
04:20
ec\ has joined #ruby
04:20
thejamespinto has quit [Remote host closed the connection]
04:20
NetSage has quit [Read error: Connection reset by peer]
04:24
kanobt61 has quit [Read error: Connection reset by peer]
04:24
\13k_ has joined #ruby
04:24
kanobt61 has joined #ruby
04:25
redpants has quit [Ping timeout: 248 seconds]
04:25
roflmyeggo has joined #ruby
04:25
pwnd_nsfw` has joined #ruby
04:26
gizmore has joined #ruby
04:26
devbug has joined #ruby
04:26
devbug has quit [Remote host closed the connection]
04:28
pwnd_nsfw has quit [Ping timeout: 250 seconds]
04:28
\13k_ has quit [Changing host]
04:28
\13k_ has joined #ruby
04:33
agent_white has quit [Quit: agent_white]
04:34
blackmes1 has joined #ruby
04:35
zapata has quit [Quit: WeeChat 1.5]
04:39
blackmes1 has quit [Ping timeout: 244 seconds]
04:41
bkxd has joined #ruby
04:48
Sammichmaker has joined #ruby
04:51
pawnbox has joined #ruby
04:53
nankyokusei has joined #ruby
04:53
vuoto has quit [Ping timeout: 244 seconds]
04:54
charliesome has joined #ruby
04:55
agent_white has joined #ruby
04:56
pawnbox has quit [Ping timeout: 272 seconds]
04:57
gener1c has joined #ruby
04:57
nankyokusei has quit [Ping timeout: 265 seconds]
04:58
wombawomba has joined #ruby
04:59
bkxd has quit [Ping timeout: 248 seconds]
04:59
thejamespinto has joined #ruby
05:01
jonyijoe has joined #ruby
05:03
wombawomba has quit [Ping timeout: 250 seconds]
05:07
jonyijoe has quit [Ping timeout: 276 seconds]
05:08
segy has joined #ruby
05:10
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
05:13
rubirc has joined #ruby
05:13
Vile` has quit [Ping timeout: 250 seconds]
05:14
maletor has joined #ruby
05:15
segy has quit [Ping timeout: 265 seconds]
05:15
Mekkis has joined #ruby
05:18
k3rn31 has joined #ruby
05:19
maletor has quit [Ping timeout: 272 seconds]
05:19
fullofcaffeine has joined #ruby
05:20
blackgoat has quit [Ping timeout: 276 seconds]
05:21
lightheaded has joined #ruby
05:21
sonikspin has quit [Ping timeout: 244 seconds]
05:22
fullofca_ has quit [Ping timeout: 255 seconds]
05:23
segy has joined #ruby
05:25
hotpancakes has quit [Remote host closed the connection]
05:26
hotpancakes has joined #ruby
05:26
hotpancakes has quit [Remote host closed the connection]
05:28
dionysus69 has joined #ruby
05:30
roflmyeggo has quit [Ping timeout: 265 seconds]
05:32
pwnd_nsfw` has quit [Ping timeout: 276 seconds]
05:32
dionysus69 has quit [Read error: Connection reset by peer]
05:33
pwnd_nsfw has joined #ruby
05:33
passbe has quit [Read error: Connection reset by peer]
05:34
passbe has joined #ruby
05:34
wombawomba has joined #ruby
05:35
blackmes1 has joined #ruby
05:36
eizua has quit [Quit: Leaving]
05:37
lightheaded has quit [Remote host closed the connection]
05:37
lightheaded has joined #ruby
05:38
rafadc has joined #ruby
05:39
LoneHermit has joined #ruby
05:39
wombawomba has quit [Ping timeout: 272 seconds]
05:39
ARCADIVS has joined #ruby
05:41
blackmes1 has quit [Ping timeout: 265 seconds]
05:42
lightheaded has quit [Ping timeout: 248 seconds]
05:44
craigp has joined #ruby
05:45
jenrzzz has quit [Ping timeout: 260 seconds]
05:45
rafadc has quit [Ping timeout: 265 seconds]
05:45
pawnbox has joined #ruby
05:46
fullofcaffeine has quit [Remote host closed the connection]
05:46
fullofcaffeine has joined #ruby
05:47
jenrzzz has joined #ruby
05:49
pawnbox has quit [Ping timeout: 260 seconds]
05:50
craigp has quit [Ping timeout: 255 seconds]
05:50
fullofcaffeine has quit [Ping timeout: 248 seconds]
05:53
fullofcaffeine has joined #ruby
05:56
Vile` has joined #ruby
05:57
amclain has quit [Quit: Leaving]
05:58
fullofcaffeine has quit [Ping timeout: 255 seconds]
06:01
lxsameer has joined #ruby
06:02
cyphase has quit [Ping timeout: 250 seconds]
06:04
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:08
cyphase has joined #ruby
06:09
Joufflu has quit [Quit: Leaving]
06:10
wombawomba has joined #ruby
06:10
spider-mario has joined #ruby
06:11
Vile` has quit [Read error: Connection reset by peer]
06:11
agit0 has quit [Quit: zzzZZZ….]
06:14
wombawomba has quit [Ping timeout: 265 seconds]
06:15
maletor has joined #ruby
06:19
maletor has quit [Ping timeout: 250 seconds]
06:19
elastix has joined #ruby
06:24
pawnbox has joined #ruby
06:26
Wolland has joined #ruby
06:26
hotpancakes has joined #ruby
06:27
tmtwd has quit [Ping timeout: 248 seconds]
06:28
minimalism has quit [Quit: minimalism]
06:28
pawnbox has quit [Ping timeout: 244 seconds]
06:30
NetSage has joined #ruby
06:32
thetrav has joined #ruby
06:32
Sashimi has joined #ruby
06:34
<
ruby[bot] >
thetrav: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
06:34
<
thetrav >
sorry for pastebin
06:34
<
thetrav >
thanks ruby bot
06:34
<
thetrav >
so my problem though
06:34
<
thetrav >
that function returns me an enumeration of timestamps
06:35
NetSage has quit [Remote host closed the connection]
06:35
<
thetrav >
I would have expected it to return me an enumeration doubly chunked
06:35
<
thetrav >
years and months
06:35
bkxd has joined #ruby
06:36
jenrzzz has quit [Ping timeout: 244 seconds]
06:36
xlegoman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
06:37
gener1c has quit [Read error: Connection reset by peer]
06:37
blackmes1 has joined #ruby
06:38
NetSage has joined #ruby
06:38
<
apeiros >
thetrav: I think line 2 should be "return enum_for(:chunked) …" not :each
06:38
<
thetrav >
enum_for(:each) shoudl read enum_for(:chunked)
06:38
<
thetrav >
yes thanks
06:38
elastix has quit [Quit: elastix]
06:38
<
thetrav >
I just noticed it
06:38
<
thetrav >
while I'm here
06:38
<
thetrav >
is that syntax still a thing?
06:38
<
apeiros >
and line 5 should have another .each (timestamps.each)
06:38
<
thetrav >
like, if I didn't have that line, would it still return an enum?
06:39
<
apeiros >
no it would not. it'd raise the moment `yield` is invoked
06:40
<
thetrav >
ok, so why the each on timestamps?
06:40
<
thetrav >
isn't it already an enum of timestamps at that point?
06:40
<
thetrav >
that I want to further chunk down to months?
06:41
<
apeiros >
timestamps isn't an enum, it's an array
06:42
<
thetrav >
ok, so calling chunk on it will be executed eagerly, wheras if I call .each.chunk it'll happen lazily?
06:42
k3rn31 has quit [Quit: Computer has gone to sleep.]
06:42
<
apeiros >
no. none of this is lazily
06:42
<
thetrav >
hang about? why is it an array? I thought enumerable.chunk returned a pair of value + enumeration
06:42
gener1c has joined #ruby
06:42
blackmes1 has quit [Ping timeout: 265 seconds]
06:42
<
apeiros >
you're confusing
*return* and *yield*. those two things are different.
06:42
<
thetrav >
arg, getting my enum long words wrong there
06:43
<
thetrav >
I made the first few fixes you suggested
06:43
<
thetrav >
it all looks like it works to me
06:43
<
thetrav >
chunked.first == [1999, #<Enumerator: #<Enumerator::Generator:0x0055cc3f889530>:each>]
06:43
<
thetrav >
so now I'm wondering what I'm not understanding
06:44
Vivekananda has quit [Ping timeout: 264 seconds]
06:44
<
apeiros >
if that's what you wanted, then it's fine. it's just not what you said you wanted.
06:45
<
apeiros >
and given that you're using return and yield interchangeably, I guess you just didn't express correctly what you wanted.
06:45
agit0 has joined #ruby
06:45
<
thetrav >
as you say I probably don't understand it properly. I'd really like to correct that
06:45
<
apeiros >
ary.each do |yielded_value| … end
06:45
wombawomba has joined #ruby
06:45
<
apeiros >
returned_value = ary.each do … end
06:47
<
thetrav >
I think I get that. I am probably confused about what happens when it gets nested a few times
06:47
<
apeiros >
and the return value of your method is `each.chunk(&:year)`
06:48
<
apeiros >
which btw. can be shortened to just `chunk(&:year)`
06:48
<
thetrav >
hmm, so what implies the "each" ?
06:49
<
apeiros >
it's kind of a pleonasm there.
06:49
<
apeiros >
chunk already will use .each internally.
06:49
<
thetrav >
ok I think I'm lost... so we're saying I start with an enum of timestamps named each
06:50
<
apeiros >
then I'd say no wonder you're confused if you use such names
06:50
<
thetrav >
so I don't have an enum of timestamps named each?
06:50
<
apeiros >
"an enum" - do you mean an array?
06:50
wombawomba has quit [Ping timeout: 264 seconds]
06:50
bkxd has quit [Ping timeout: 264 seconds]
06:51
<
apeiros >
or rather: on which class is that `def chunked` defined?
06:51
qakar has joined #ruby
06:53
<
thetrav >
def chunked is defined on my own class Days, which also defines each
06:53
<
thetrav >
which yields a timestamp for each midnight within a date range
06:54
nankyokusei has joined #ruby
06:54
<
thetrav >
sorry I'm trying to post the thing to gist but github website keeps giving me errors
06:54
nando293921 has quit [Ping timeout: 240 seconds]
06:55
<
thetrav >
it has been freaking out about my browser cookies for ages
06:55
<
apeiros >
use a different browser?
06:55
<
apeiros >
or are you in china or another firewalled country?
06:55
<
thetrav >
there we go
06:56
anisha has joined #ruby
06:56
qakar has quit [Ping timeout: 255 seconds]
06:56
<
thetrav >
nah it's definitely a problem with chrome
06:56
<
thetrav >
FFox worked
06:56
<
thetrav >
(a problem with my chrome instance's state I mean)
06:56
<
apeiros >
ok. if you define `each`, then you absolutely should `include Enumerable`
06:56
<
thetrav >
I read an article that told me not to
06:56
<
thetrav >
although that was maybe not the point
06:57
hotpancakes has quit [Ping timeout: 250 seconds]
06:57
<
apeiros >
`current_timestamp = @first_timestamp - 30 * 60` looks suspicious
06:57
<
thetrav >
yes, it is
06:57
<
thetrav >
it's not the problem though, please disregard it for the moment
06:57
<
thetrav >
it's a red herring
06:58
<
thetrav >
what I'm trying to understand, is how the enumerable concept works
06:58
<
thetrav >
what I thought
06:58
<
thetrav >
is that the each function, results in an enumerator
06:58
<
apeiros >
Enumerator != Enumerable
06:58
nankyokusei has quit [Ping timeout: 244 seconds]
06:58
<
apeiros >
but Enumerator instances are Enumerable
06:59
\13k has quit [Disconnected by services]
06:59
\13k has joined #ruby
06:59
<
thetrav >
I'm making an enumerator that can enumerate over days right?
06:59
<
apeiros >
what the article says is correct with regards to that it works if you just properly define .each and then call all your Enumerable "needs" on the returned enumerator instead of directly on the instance.
07:00
<
thetrav >
so if I want to transform that enumerator
07:00
<
thetrav >
into something that enumerates over a pair of year -> days
07:00
<
thetrav >
then enumerator.chunk(&:year)
07:00
<
thetrav >
each is what I called my enumerator
07:00
<
apeiros >
now it depends on what precisely you mean by "transform". do you want a new Enumerator as return value?
07:01
<
thetrav >
so that bit is right? or wrong?
07:01
<
apeiros >
or do you just want something which is Enumerable as return value?
07:01
<
apeiros >
or do you want a method which yields values?
07:01
<
thetrav >
so I'll need to more deeply understand the difference between the two
07:01
<
apeiros >
where the last one can be combined with the first or second.
07:02
<
thetrav >
I think that an Enumerator satisfies my needs
07:02
<
thetrav >
is it the smallest thing in that list of options you proposed
07:02
<
thetrav >
I specifically want to end up with something that I can later continue to transform
07:02
<
apeiros >
not necessarily.
07:02
<
apeiros >
common pattern is to start with something which yields.
07:03
<
apeiros >
and then add that `return enum_for(__method__) unless block_given?` line to create an Enumerator in case no block is given.
07:03
<
thetrav >
ok, so that's what I've got for each
07:03
<
thetrav >
and I was hoping to continue that with chunked
07:03
ropeney has quit [Quit: Leaving]
07:03
<
thetrav >
(horrible names by the way, my apologies, naming is hard)
07:04
<
apeiros >
it is indeed.
07:04
<
thetrav >
but back onto the each.chunk(&:years)
07:04
pragmaticus has joined #ruby
07:04
<
apeiros >
(naming is indeed hard, I mean, not the names are indeed horrible)
07:04
<
apeiros >
if you've not included Enumerable, then that's correct.
07:04
<
thetrav >
that gets me an enumeration that can enumerate over the year, and an enumeration of days within that year
07:05
<
apeiros >
partially correct.
07:05
<
thetrav >
trick there, is that I want that inner enumeration to also be chunked
07:05
<
thetrav >
ooh partially
07:05
<
thetrav >
what am I missing
07:05
<
apeiros >
it gets you an enumerator which lets you iterate over year + array of dates tuples
07:05
<
apeiros >
the array of dates is not an enumerator
07:06
<
apeiros >
I got that wrong. .chunk(&:years) does not return an Enumerator at all.
07:06
<
apeiros >
let me get a coffee :D
07:07
<
apeiros >
ok, first statement was correct. I misremembered.
07:07
<
apeiros >
"it gets you an enumerator which lets you iterate over year + array of dates tuples"
07:07
<
apeiros >
this one was correct. and I guess I should get me some breakfast to avoid confusing myself :D
07:07
<
apeiros >
>> [Date.today].chunk(&:year).class
07:08
<
apeiros >
>> [Time.today].chunk(&:year).class
07:08
<
apeiros >
>> [Time.now].chunk(&:year).class
07:08
<
thetrav >
yeah so the type signature confused me
07:08
<
apeiros >
>> [[Time.now].chunk(&:year).first.class, [Time.now].chunk(&:year).first[0].class, [Time.now].chunk(&:year).first[1].class]
07:08
<
thetrav >
I executed [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5].chunk { |n| n.even? }.first in the irb just now
07:08
<
thetrav >
you are right
07:09
<
thetrav >
I get an enum of pairs of elem and array
07:09
<
thetrav >
array happens to be enumerable
07:09
<
thetrav >
the problem for me though
07:09
<
thetrav >
is that I've got a large list here
07:09
<
thetrav >
if I chunk it by year, then chunk it by month
07:10
<
thetrav >
that's going to iterate more than it should need to
07:10
<
apeiros >
don't use chunk then.
07:10
<
thetrav >
seems like it
07:10
<
apeiros >
it's reasonably easy to implement what you want without chunk. it might even be easier than with.
07:10
<
thetrav >
i was hoping I could make use of ruby magic
07:10
cyphase has quit [Ping timeout: 248 seconds]
07:10
<
thetrav >
a friend told me chunk was the answer
07:11
<
apeiros >
it's probably what I'd have said too. but sometimes looking closer at a problem reveals that the initial answer isn't the best.
07:11
tristanp has quit [Remote host closed the connection]
07:11
rafadc has joined #ruby
07:11
<
apeiros >
I reeeeally should get coffee.
07:12
<
apeiros >
chunk works. but don't nest it. think about how you chunk.
07:12
<
apeiros >
you said it yourself, you want to chunk by year
*and* month. you can do that in one go.
07:13
dn` has quit [Quit: dn`]
07:13
<
pragmaticus >
whats the best gui for ruby, with cross operationsystem support?
07:14
<
pragmaticus >
not an option.
07:14
<
apeiros >
pragmaticus: not using either myself, but I'd look at qt, tk and shoes
07:15
<
pragmaticus >
apeiro, never heard about shoes, gonna take a look
07:15
grh has joined #ruby
07:16
maletor has joined #ruby
07:16
blackgoat has joined #ruby
07:16
ta_ has quit [Remote host closed the connection]
07:17
<
pragmaticus >
does tk support 'native' themes?
07:17
cyphase has joined #ruby
07:17
sarkis has quit [Ping timeout: 264 seconds]
07:17
kitikonti has joined #ruby
07:18
rafadc has quit [Ping timeout: 265 seconds]
07:18
vuoto has joined #ruby
07:18
NetSage has quit [Remote host closed the connection]
07:20
firstdayonthejob has joined #ruby
07:20
maletor has quit [Ping timeout: 244 seconds]
07:20
blackgoat has quit [Ping timeout: 244 seconds]
07:21
<
pragmaticus >
well, i love ruby for simple task, but client wants a gui.
07:21
vuoto_ has joined #ruby
07:21
vuoto has quit [Read error: Connection reset by peer]
07:21
<
pragmaticus >
maybe, ruby is the wrong choice?
07:21
wombawomba has joined #ruby
07:23
NetSage has joined #ruby
07:23
<
apeiros >
possible. alternatively: maybe cross-platform is the wrong requirement?
07:24
<
pragmaticus >
i would agree, but i cant tell them :)
07:26
wombawomba has quit [Ping timeout: 248 seconds]
07:26
<
pragmaticus >
apeiros, i appreciate your input, have to leave now, bye.
07:26
<
apeiros >
oh, one variant which might work well: jruby + one of the java UI libs
07:26
<
pragmaticus >
java? evil, brrrrrrr. :)
07:26
<
apeiros >
at least I'd assume that java has some of the most mature libs wrt cross platform
07:27
<
pragmaticus >
i get sick, just thinking about java, sry.
07:27
<
apeiros >
though my general experience with cross platform UIs is that they're horrible on all platforms.
07:27
thejamespinto has quit []
07:27
sameerynho has joined #ruby
07:28
pragmaticus has quit [Remote host closed the connection]
07:30
lxsameer has quit [Ping timeout: 244 seconds]
07:30
Jackneill has joined #ruby
07:31
Pumukel has joined #ruby
07:31
dionysus69 has joined #ruby
07:32
claudiuinberlin has joined #ruby
07:33
sarkis has joined #ruby
07:35
conta has joined #ruby
07:36
Pumukel has quit [Ping timeout: 248 seconds]
07:36
dionysus69 has quit [Ping timeout: 265 seconds]
07:36
cyphase has quit [Ping timeout: 250 seconds]
07:36
<
bhaak >
I had a quite good experience with wxwidgets when it was still called wxwindows (so waaay back).
07:38
sarkis has quit [Ping timeout: 255 seconds]
07:38
blackmes1 has joined #ruby
07:39
dreamyspell has joined #ruby
07:40
charliesome has joined #ruby
07:41
agit0 has quit [Ping timeout: 272 seconds]
07:41
dreamyspell has quit [Client Quit]
07:41
cyphase has joined #ruby
07:42
dreamyspell has joined #ruby
07:43
blackmes1 has quit [Ping timeout: 255 seconds]
07:44
jtzero has quit [Ping timeout: 240 seconds]
07:45
chkm8 has joined #ruby
07:49
weemsledeux has joined #ruby
07:50
[k- has quit [Ping timeout: 248 seconds]
07:51
[k- has joined #ruby
07:52
hotpancakes has joined #ruby
07:55
ropeney has joined #ruby
07:56
anisha has quit [Quit: This computer has gone to sleep]
07:57
wombawomba has joined #ruby
07:57
Sashimi_ has joined #ruby
07:57
Sashimi has quit [Read error: Connection reset by peer]
08:00
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
08:01
cyphase has quit [Ping timeout: 272 seconds]
08:01
wombawomba has quit [Ping timeout: 244 seconds]
08:03
firstdayonthejob has quit [Ping timeout: 240 seconds]
08:04
Pupeno has joined #ruby
08:07
cyphase has joined #ruby
08:10
marr has joined #ruby
08:10
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:11
bkxd has joined #ruby
08:16
blackwind_123 has joined #ruby
08:16
dreamyspell has quit [Quit: Leaving]
08:16
maletor has joined #ruby
08:17
ta_ has joined #ruby
08:18
bsrd has joined #ruby
08:18
vuoto_ has quit [Quit: Lost terminal]
08:19
bsrd has quit [Client Quit]
08:19
vuoto has joined #ruby
08:19
pwnd_nsfw` has joined #ruby
08:20
pwnd_nsfw has quit [Ping timeout: 272 seconds]
08:21
blackmes1 has joined #ruby
08:21
maletor has quit [Ping timeout: 240 seconds]
08:21
ta__ has joined #ruby
08:22
insanedreamer has joined #ruby
08:22
ta_ has quit [Ping timeout: 272 seconds]
08:24
olistik has joined #ruby
08:25
Dimik has quit [Ping timeout: 248 seconds]
08:27
hotpancakes has quit [Ping timeout: 244 seconds]
08:28
Darmani has quit [Ping timeout: 240 seconds]
08:29
bkxd has quit [Ping timeout: 255 seconds]
08:29
ctp has joined #ruby
08:29
rafadc has joined #ruby
08:31
gingray has joined #ruby
08:31
jonadab has quit [Ping timeout: 250 seconds]
08:31
jonadab has joined #ruby
08:32
Guest93791 has quit [Ping timeout: 250 seconds]
08:32
Ariadeno has joined #ruby
08:32
Ariadeno is now known as Guest68096
08:33
wombawomba has joined #ruby
08:35
pavshn has joined #ruby
08:35
insanedreamer has quit [Ping timeout: 248 seconds]
08:37
vuoto has quit [Remote host closed the connection]
08:37
vuoto has joined #ruby
08:37
tomphp has joined #ruby
08:37
nankyokusei has joined #ruby
08:38
wombawomba has quit [Ping timeout: 265 seconds]
08:38
lightheaded has joined #ruby
08:38
olistik has quit [Remote host closed the connection]
08:38
lightheaded has quit [Read error: Connection reset by peer]
08:40
cibs has quit [Ping timeout: 268 seconds]
08:40
craigp has joined #ruby
08:40
jazzonmym11nd has quit [Ping timeout: 255 seconds]
08:41
nankyokusei has quit [Client Quit]
08:41
cibs has joined #ruby
08:41
anisha has joined #ruby
08:42
lightheaded has joined #ruby
08:42
lightheaded has quit [Remote host closed the connection]
08:47
cibs has quit [Ping timeout: 268 seconds]
08:48
cibs has joined #ruby
08:49
ta__ has quit [Ping timeout: 255 seconds]
08:50
Pumukel has joined #ruby
08:50
mistermocha has joined #ruby
08:53
sonikspin has joined #ruby
08:54
nankyokusei has joined #ruby
08:55
mistermocha has quit [Ping timeout: 248 seconds]
08:56
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
08:56
Cohedrin has joined #ruby
08:57
Cohedrin has quit [Client Quit]
08:58
bkxd has joined #ruby
08:59
mikecmpbll has joined #ruby
08:59
nankyokusei has quit [Ping timeout: 276 seconds]
09:00
pfl_ has quit [Quit: leaving]
09:01
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
09:01
last_staff has joined #ruby
09:02
pandaant has joined #ruby
09:02
pragmaticus has joined #ruby
09:03
Robtop__ has joined #ruby
09:03
gingray has quit [Ping timeout: 265 seconds]
09:03
jonyijoe has joined #ruby
09:03
craigp has quit [Ping timeout: 244 seconds]
09:04
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:05
sonikspin has quit [Ping timeout: 260 seconds]
09:06
pwnd_nsfw` has quit [Ping timeout: 272 seconds]
09:07
bsrd has joined #ruby
09:08
sonikspin has joined #ruby
09:08
jonyijoe has quit [Ping timeout: 248 seconds]
09:08
qakar has joined #ruby
09:09
wombawomba has joined #ruby
09:10
bkxd has quit [Quit: leaving]
09:10
pandaant has quit [Ping timeout: 272 seconds]
09:12
pandaant has joined #ruby
09:12
elenatanasoiu has joined #ruby
09:13
wombawomba has quit [Ping timeout: 265 seconds]
09:16
blackmes1 has quit [Ping timeout: 244 seconds]
09:17
maletor has joined #ruby
09:18
tomphp has joined #ruby
09:20
elastix has joined #ruby
09:22
anisha has quit [Quit: This computer has gone to sleep]
09:22
maletor has quit [Ping timeout: 276 seconds]
09:26
Pupeno has quit [Remote host closed the connection]
09:27
pawnbox has joined #ruby
09:27
hotpancakes has joined #ruby
09:29
Pupeno has joined #ruby
09:29
Pupeno has quit [Changing host]
09:29
Pupeno has joined #ruby
09:31
zeroDi has joined #ruby
09:31
pawnbox has quit [Ping timeout: 248 seconds]
09:33
eizua has joined #ruby
09:34
Pupeno has quit [Remote host closed the connection]
09:37
sonikspin has quit [Read error: No route to host]
09:39
olistik has joined #ruby
09:41
pwnd_nsfw has joined #ruby
09:43
Eiam has quit [Ping timeout: 244 seconds]
09:43
pavshn has joined #ruby
09:43
Robtop__ has quit [Ping timeout: 250 seconds]
09:43
thetrav has quit [Remote host closed the connection]
09:44
wombawomba has joined #ruby
09:45
elastix has quit [Quit: elastix]
09:45
olistik has quit [Ping timeout: 244 seconds]
09:48
pawnbox has joined #ruby
09:48
elenatanasoiu has quit [Ping timeout: 272 seconds]
09:49
wombawomba has quit [Ping timeout: 265 seconds]
09:51
mistermocha has joined #ruby
09:53
pwnd_nsfw has quit [Read error: Connection reset by peer]
09:53
code_ has quit [Quit: BNC - Hosted by EpicKitty]
09:53
pwnd_nsfw has joined #ruby
09:55
\13k_ has quit [Ping timeout: 265 seconds]
09:56
mistermocha has quit [Ping timeout: 248 seconds]
09:58
hotpancakes has quit [Ping timeout: 255 seconds]
09:59
rafadc has quit [Ping timeout: 250 seconds]
10:01
Vingador has joined #ruby
10:01
Vingador has quit [Remote host closed the connection]
10:09
stamina has joined #ruby
10:11
code_ has joined #ruby
10:11
mikecmpbll has quit [Quit: inabit. zz.]
10:12
dionysus69 has joined #ruby
10:15
mikecmpbll has joined #ruby
10:17
Ishido has joined #ruby
10:18
maletor has joined #ruby
10:19
grh has quit [Ping timeout: 264 seconds]
10:20
wombawomba has joined #ruby
10:23
maletor has quit [Ping timeout: 264 seconds]
10:25
wombawomba has quit [Ping timeout: 255 seconds]
10:26
Pupeno has joined #ruby
10:26
Pupeno has joined #ruby
10:26
Pupeno has quit [Changing host]
10:26
Coldblackice has quit [Ping timeout: 244 seconds]
10:30
claudiuinberlin has quit [Remote host closed the connection]
10:36
bsrd has quit [Quit: WeeChat 1.5]
10:42
pavshn has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
10:43
CloCkWeRX has joined #ruby
10:43
JeanCarloMachado has joined #ruby
10:46
ta_ has joined #ruby
10:46
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:49
pavshn has joined #ruby
10:50
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
10:51
c0mrad3 has joined #ruby
10:51
ta_ has quit [Ping timeout: 265 seconds]
10:51
tomphp has joined #ruby
10:53
jazzonmym11nd has joined #ruby
10:54
hotpancakes has joined #ruby
10:54
gnufied has joined #ruby
10:55
nankyokusei has joined #ruby
10:56
wombawomba has joined #ruby
10:57
qakar has quit [Remote host closed the connection]
11:00
nankyokusei has quit [Ping timeout: 240 seconds]
11:01
wombawomba has quit [Ping timeout: 244 seconds]
11:07
hanmac has quit [Ping timeout: 248 seconds]
11:09
stamina has quit [Quit: WeeChat 1.5]
11:10
anisha has joined #ruby
11:13
vuoto has quit [Remote host closed the connection]
11:13
vuoto has joined #ruby
11:13
turgu1 has joined #ruby
11:14
turgu1 has quit [Client Quit]
11:14
stamina has joined #ruby
11:19
maletor has joined #ruby
11:19
Wolland has quit [Remote host closed the connection]
11:20
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:21
hanmac has joined #ruby
11:21
Wolland has joined #ruby
11:21
duncannz has quit [Remote host closed the connection]
11:22
hotpancakes has quit [Ping timeout: 248 seconds]
11:23
kitikonti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:23
maletor has quit [Ping timeout: 264 seconds]
11:25
rafadc has joined #ruby
11:28
chkm8 has quit [Ping timeout: 240 seconds]
11:29
harfangk has joined #ruby
11:30
rafadc has quit [Ping timeout: 244 seconds]
11:31
JakFrist has joined #ruby
11:31
shinnya has joined #ruby
11:31
olistik has joined #ruby
11:32
gfvcastro has joined #ruby
11:32
wombawomba has joined #ruby
11:32
last_staff has quit [Quit: last_staff]
11:34
rippa has joined #ruby
11:37
wombawomba has quit [Ping timeout: 265 seconds]
11:38
pavshn has quit [Ping timeout: 272 seconds]
11:39
pavshn has joined #ruby
11:41
jazzonmym11nd has quit [Ping timeout: 248 seconds]
11:43
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:44
olistik has quit [Remote host closed the connection]
11:44
JeanCarloMachado has quit [Quit: Lost terminal]
11:45
claudiuinberlin has joined #ruby
11:47
ta_ has joined #ruby
11:47
sdothum has joined #ruby
11:48
aidalgol has quit [Quit: zZzZzZZzz]
11:48
sevenfourk has quit [Quit: Connection closed for inactivity]
11:51
ta_ has quit [Ping timeout: 272 seconds]
11:53
vuoto has quit [Remote host closed the connection]
11:53
vuoto has joined #ruby
12:04
vuoto has quit [Remote host closed the connection]
12:04
vuoto has joined #ruby
12:07
rprimus has joined #ruby
12:08
wombawomba has joined #ruby
12:08
symm- has joined #ruby
12:10
jonyijoe has joined #ruby
12:13
wombawomba has quit [Ping timeout: 265 seconds]
12:14
Xiti has quit [Quit: Xiti]
12:15
vuoto has quit [Remote host closed the connection]
12:16
vuoto has joined #ruby
12:17
stamina has quit [Ping timeout: 248 seconds]
12:19
hotpancakes has joined #ruby
12:19
maletor has joined #ruby
12:21
gnufied has quit [Ping timeout: 255 seconds]
12:22
nankyokusei has joined #ruby
12:22
gilfoyle has joined #ruby
12:23
<
gilfoyle >
what's the best rspec tutorial?
12:23
<
gilfoyle >
(Thumbs up if it doesn't require rails knowledge)
12:24
Jackneill has quit [Ping timeout: 250 seconds]
12:24
maletor has quit [Ping timeout: 265 seconds]
12:26
nankyokusei has quit [Client Quit]
12:28
qakar has joined #ruby
12:31
ta_ has joined #ruby
12:32
qakar has quit [Ping timeout: 250 seconds]
12:40
banisterfiend has joined #ruby
12:43
gilfoyle has quit [Ping timeout: 264 seconds]
12:43
wombawomba has joined #ruby
12:43
pokalyis has joined #ruby
12:45
olistik has joined #ruby
12:47
Jackneill has joined #ruby
12:47
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
12:48
charliesome has joined #ruby
12:48
wombawomba has quit [Ping timeout: 265 seconds]
12:50
banisterfiend has joined #ruby
12:50
olistik has quit [Ping timeout: 248 seconds]
12:51
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
12:52
hotpancakes has quit [Ping timeout: 255 seconds]
12:53
mistermocha has joined #ruby
12:53
redpants has joined #ruby
12:54
anisha has quit [Quit: This computer has gone to sleep]
12:56
uxp has quit [Read error: Connection reset by peer]
12:56
uxp has joined #ruby
12:56
despai has joined #ruby
12:56
jazzonmym11nd has joined #ruby
12:56
nankyokusei has joined #ruby
12:58
mistermocha has quit [Ping timeout: 248 seconds]
12:58
despai has quit [Remote host closed the connection]
12:58
vuoto has quit [Remote host closed the connection]
12:59
vuoto has joined #ruby
12:59
craigp has joined #ruby
12:59
pandaant has quit [Remote host closed the connection]
12:59
habitullence has quit [Ping timeout: 260 seconds]
12:59
conta has quit [Ping timeout: 240 seconds]
13:00
habitullence has joined #ruby
13:01
nankyokusei has quit [Ping timeout: 248 seconds]
13:04
craigp has quit [Ping timeout: 244 seconds]
13:04
hutch34 has joined #ruby
13:06
jazzonmym11nd has quit [Ping timeout: 255 seconds]
13:10
lkk has joined #ruby
13:11
dviola has joined #ruby
13:11
charliesome has quit [Read error: Connection reset by peer]
13:13
marr has quit [Remote host closed the connection]
13:14
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
13:14
kitikonti has joined #ruby
13:14
Xiti has joined #ruby
13:16
blackwind_123 has quit [Ping timeout: 248 seconds]
13:18
lkk has left #ruby ["WeeChat 0.4.2"]
13:18
craigp has joined #ruby
13:18
vqrs has quit [Ping timeout: 264 seconds]
13:18
cyclonis has joined #ruby
13:19
wombawomba has joined #ruby
13:20
maletor has joined #ruby
13:20
vqrs has joined #ruby
13:21
AzureStigma has joined #ruby
13:21
ebraga has joined #ruby
13:25
wombawomba has quit [Ping timeout: 276 seconds]
13:25
maletor has quit [Ping timeout: 265 seconds]
13:27
redpants has quit [Ping timeout: 250 seconds]
13:28
JeanCarloMachado has joined #ruby
13:30
A124 has quit [Quit: '']
13:32
A124 has joined #ruby
13:35
redpants has joined #ruby
13:36
GodFather has joined #ruby
13:37
davic has joined #ruby
13:37
rafadc has joined #ruby
13:39
<
lupine >
yeah, 'tis pretty good
13:42
rafadc has quit [Ping timeout: 260 seconds]
13:43
jose_leeto has joined #ruby
13:43
charliesome has joined #ruby
13:45
jonyijoe has quit []
13:46
CloCkWeRX has quit [Quit: Leaving.]
13:46
siaw23 has joined #ruby
13:47
nankyokusei has joined #ruby
13:48
hotpancakes has joined #ruby
13:50
<
count >
I'm having some problem using bundler install --deployment .. I'm getting the gems in vendor/cache, but not unpacked in vendor/bundler, as I would like to deploy them ... what do I do?
13:50
<
count >
bundle install --path $RPM_BUILD_DIR/%{name}/vendor/bundle/ --deployment --binstubs $RPM_BUILD_DIR/%{name}/vendor/bin/ --without test
13:50
<
count >
env -u BUNDLE_BIN_PATH -u RUBYOPT -u GEM_HOME -u GEM_PATH -u RPM_BUILD_DIR BUNDLE_GEMFILE=Gemfile.centos6
13:50
<
apeiros >
count: didn't you ask that yesterday and got a solution? o0
13:50
<
count >
apeiros: nope, didn't get a solution
13:51
nankyokusei has quit [Client Quit]
13:51
<
count >
apeiros: docs didn't help, and I'm tossing all of the vendor/ folder before calling already
13:51
bsrd has joined #ruby
13:51
<
hays_ >
anyone know of a good writeup on doing multiple inheritance in ruby? google brings up some stuff, but none seems particularly authoritative
13:51
hays_ is now known as hays
13:51
<
apeiros >
siaw23: seems you did that already, so what's your question?
13:51
<
apeiros >
hays: ruby doesn't have multiple inheritance.
13:52
<
hays >
apeiros: right, it uses modules somehow
13:52
<
siaw23 >
apeiros: the message is not showing when i delibrately try to remove something from the list that doesn’t exist
13:52
<
apeiros >
hays: ruby's inheritance is linear. you can have something approximating multiple inheritance through modules.
13:52
bsrd has quit [Client Quit]
13:52
<
apeiros >
siaw23: try adding parens for puts. puts("…")
13:52
hotpancakes has quit [Remote host closed the connection]
13:52
hotpancakes has joined #ruby
13:52
<
hays >
apeiros: yeah, i've been reading about modules a bit, but not sure i understand fully the scoping rules
13:52
<
apeiros >
siaw23: note that IMO you should put IO elsewhere, not into the remove method.
13:53
<
siaw23 >
apeiros: why that?
13:53
<
apeiros >
hays: if you have specific questions, just ask.
13:53
jose_leeto has quit [Quit: Leaving.]
13:53
<
siaw23 >
apeiros: works btw. but why do i put IO elsewhere?
13:53
<
count >
apeiros: sooo, I'm still headscratching about bundler
*shrug*
13:53
<
apeiros >
siaw23: separation of concerns.
13:53
<
hays >
apeiros: i have a very specific question actually.. almost too specific
13:53
<
siaw23 >
apeiros: right
13:53
VladGh has quit [Remote host closed the connection]
13:54
<
apeiros >
count: sorry, I've little to do with the deployment, I only know bundlers basics myself :-/
13:54
ebraga has quit [Ping timeout: 265 seconds]
13:54
mistermocha has joined #ruby
13:55
JeanCarloMachado has quit [Ping timeout: 264 seconds]
13:55
VladGh has joined #ruby
13:55
hotpanca_ has joined #ruby
13:56
<
count >
apeiros: ah, worth asking either way :)
13:56
<
hays >
apeiros: check out this ine in github. I am trying to figure out a way to extend this to essentially hook into the holding_registers array by replacing it with another object that performs actions when it is accessed
13:56
<
count >
apeiros: I'll probably end up reading the sourcecode
13:57
<
hays >
apeiros: the structure of the code is very much using modules--i'm just having trouble understanding what @holding_registers is and how to override/replace it
13:57
trampi has joined #ruby
13:57
ropeney has quit [Remote host closed the connection]
13:57
sonikspin has joined #ruby
13:57
<
hays >
ideally i want to do this in a way that I don't have to change the underlying code, because its a gem
13:58
<
count >
hays: it's an instance variable and there's an attr_accessor for it :)
13:58
<
apeiros >
hays: that code makes partially no sense.
13:58
<
count >
hays: what's the problem you are trying to solve?
13:58
Bellthoven has joined #ruby
13:58
ARCADIVS has quit [Quit: ARCADIVS]
13:58
<
hays >
count: right now this server lets you write/read values to this array, and I want to implement a read-only functionality
13:58
<
apeiros >
line 22-25 - those ivars are never used (they belong to ModBus::Server, the module instance, and only to that object)
13:59
<
count >
hays: .. you could replace the default attr_accessor with functions that implement it, with a hook
13:59
mistermocha has quit [Ping timeout: 248 seconds]
13:59
<
hays >
on a per register (array element) basis
13:59
<
apeiros >
line 21, those attr_accessors do
*not* provide access to those ivars in line 22-25.
13:59
<
hays >
apeiros: so I think this is mixed in with other stuff.. the code is confusing to me also
14:00
hotpancakes has quit [Ping timeout: 255 seconds]
14:00
<
count >
hays: your holding_registers= would just need to be custom
14:00
<
apeiros >
hays: I'd have to see how it's used. but my guess is that parts of that code are superfluous.
14:00
<
hays >
count: so how would I "replace" it by extending this code without actually modifying this source file
14:01
<
hays >
apeiros: hmm.
14:01
hotpanca_ has quit [Ping timeout: 248 seconds]
14:02
<
count >
hays: you own module should include said module and just provide its own holding_registers= method itself
14:02
<
count >
apeiros: right?
14:02
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
14:02
<
count >
apeiros: I'm ignoring all of the annoying fuzz in the code hays posted ;) it's .. bogus
14:03
ropeney has joined #ruby
14:04
<
hays >
the "fuzz" is confusing me a bit--a quick walkthrough would really help
14:05
<
apeiros >
count: no. attr_accessor will work for that.
14:05
<
apeiros >
count: but the including party has to ensure the @vars are initialized
14:05
<
count >
apeiros: well he basically wants attr_reader only, with a custom writer
14:05
<
apeiros >
hays: and re ^, I don't see where ModBus::TCPServer initializes the ivars
14:06
trampi has quit [Remote host closed the connection]
14:06
<
hays >
apeiros: is :coils (for example) connected to @coils ?
14:07
<
apeiros >
attr_accessor :coils is connected to @coils
14:07
<
apeiros >
:coils on its own is not.
14:07
<
hays >
ok i think what you do is you initialize it in use
14:07
<
apeiros >
count: ah, ok. may have overread a thing or two.
14:08
<
apeiros >
hm, is GServer the stdlib GServer?
14:08
<
count >
apeiros: he wants full read access for @holding_registers and selective write access for elements of it, if I understood him correctly.
14:08
<
hays >
apeiros: yep
14:08
<
hays >
count: yep...
14:08
<
count >
apeiros: i've literally overread everything else ;)
14:09
<
apeiros >
hays: oh dear, yes, I see it in the comments.
14:09
<
apeiros >
that looks horribly brittle :D
14:10
<
hays >
yeah its not the best from a design perspective, and the documentation set is minimal
14:10
<
hays >
however it actually works really well so there's that
14:10
<
hays >
ah good point
14:11
<
hays >
so how do I actually mix that in? where I replace attr_accessor :holding_registers with my own
14:11
<
hays >
e.g. I know I can just edit the code, but I want to leave the code intact
14:12
<
hays >
is there a way to derive from TCPServer in such a way that I replace these accessor functions?
14:12
<
apeiros >
hays: inherit from ModBus::TCPServer and define your custom setter there.
14:12
<
apeiros >
alternatively instantiate it and redefine the method on that single instance.
14:13
<
apeiros >
>> x = Array.new; def x.push(value); super(value); super(value); end; x.push(1); x
14:14
marr has joined #ruby
14:15
AzureStigma has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:18
elenatanasoiu has joined #ruby
14:18
Morrolan has quit [Quit: Goodbye]
14:18
sameerynho has quit [Quit: WeeChat 1.5]
14:18
Morrolan has joined #ruby
14:21
maletor has joined #ruby
14:22
elenatanasoiu has quit [Ping timeout: 248 seconds]
14:22
ta_ has quit [Ping timeout: 265 seconds]
14:22
<
apeiros >
you don't own the ModBus namespace, so I wouldn't use that namespace. but other than that, yes.
14:22
ta_ has joined #ruby
14:24
siaw23 has quit [Quit: siaw23]
14:24
<
hays >
test_override.rb:5:in `<class:MyTCPServer>': undefined method `attr_accessible' for Bananas::MyTCPServer:Class (NoMethodError)
14:25
GodFather has quit [Ping timeout: 244 seconds]
14:25
<
apeiros >
oh, didn't notice line 6 in your code. why's it in there?
14:25
anisha has joined #ruby
14:26
<
apeiros >
if you meant to write attr_accessor - that's already done by ModBus::Server.
14:26
cjbischof_ has joined #ruby
14:26
maletor has quit [Ping timeout: 264 seconds]
14:26
antgel has joined #ruby
14:26
<
apeiros >
hays: that's specifically for AR models
14:27
<
apeiros >
given that you used that, I guess your write_attribute is also wrong.
14:27
<
apeiros >
I assumed that matched other parts of the ModBus lib. in the SO article, it's also an AR model method.
14:28
blackmes1 has joined #ruby
14:29
<
hays >
ok. yes alright
14:30
negatifze has joined #ruby
14:30
<
apeiros >
as already said, no need for attr_*, ModBus::Server does that already.
14:31
<
apeiros >
and also as just said: write_attribute most certainly is not what you want.
14:32
<
hays >
is it the return value from holding_registers= that gets set into @holding_registers?
14:33
<
apeiros >
you have to write code to set @holding_registers.
14:35
jazzonmym11nd has joined #ruby
14:35
redpants has quit [Ping timeout: 265 seconds]
14:36
<
hays >
last question is there a way to be generic about that? e.g. I want to write this code once and then apply it to many variables, not just @holding_registers
14:36
redpants has joined #ruby
14:36
<
apeiros >
"last question" - no promises you can't keep ;-p
14:37
<
apeiros >
sure. that's metaprogramming for you.
14:37
<
hays >
haha :) perhaps. I guess the ideal scenario would be to have my own version of :attr_writer
14:37
<
apeiros >
&ri Module#define_method, Module#class_eval hays
14:38
<
apeiros >
sure. attr_writer is just: def attr_writer(*names); names.each do |name| class_eval %{def #{name}=(value); @#{name} = value; end} end end
14:38
<
apeiros >
might be missing an "end" or have other mistakes. but should suffice to give you the general idea.
14:39
ovidiuBOSS has joined #ruby
14:40
ovidiuBOSS has quit [Client Quit]
14:41
jazzonmym11nd has quit [Ping timeout: 244 seconds]
14:41
j0bk has joined #ruby
14:42
cybertron has joined #ruby
14:43
Bellthoven has quit []
14:43
<
hays >
apeiros: ok that's some serious magic. what does the % do?
14:43
<
apeiros >
>> %{I'm a string}
14:44
centrx has joined #ruby
14:45
<
centrx >
> -1 * 0.0
14:45
gingray has joined #ruby
14:45
<
centrx >
>> -1 * 0.0
14:45
<
apeiros >
>> -0.0 # works too
14:45
<
centrx >
Seems like a bug?
14:46
<
apeiros >
>> [1/0.0, 1/-0.0]
14:46
Vivekananda has joined #ruby
14:47
redpants has quit [Ping timeout: 272 seconds]
14:48
olistik has joined #ruby
14:49
Burgestrand has joined #ruby
14:49
Pumukel has quit [Remote host closed the connection]
14:50
bsrd has joined #ruby
14:50
<
apeiros >
that's correct. because it's defined as an instance method of Bananas. and the class MyTCPServer is not an instance of Bananas.
14:50
gilfoyle has joined #ruby
14:50
<
hays >
even though its in the module Bananas?
14:51
<
hays >
i think this is a scoping rule i'm not clear on
14:51
gilfoyle is now known as Guest38188
14:51
<
apeiros >
being nested in Bananas doesn't make it an instance of Bananas.
14:51
elenatanasoiu has joined #ruby
14:51
solocshaw has joined #ruby
14:52
<
hays >
does include Bananas create an instance of Bananas?
14:52
<
hays >
i usually think if instances as created with .new
14:52
<
apeiros >
including a module into a class makes
*instances* of that class instances of said module. but not the class itself.
14:52
olistik has quit [Ping timeout: 265 seconds]
14:53
<
apeiros >
that's why including a module into a class makes all instance methods of the module available to instances of the class.
14:53
<
apeiros >
why don't you define gate_keeper as a class method on your server class?
14:54
<
hays >
well i was thinking i might evenually use it for the TCPClient also
14:54
NetSage has quit [Quit: Leaving]
14:54
<
hays >
my hunch was not to tie it too closely to the class itself
14:54
<
apeiros >
then put it into its own module and use extend instead of include.
14:54
solocshaw has quit [Remote host closed the connection]
14:55
Guest38188 has quit [Ping timeout: 260 seconds]
14:55
solocshaw has joined #ruby
14:56
ropeney has quit [Remote host closed the connection]
14:56
zac has joined #ruby
14:56
hotpancakes has joined #ruby
14:57
axsuul has joined #ruby
14:57
the_drow has joined #ruby
14:57
nankyokusei has joined #ruby
14:57
<
hays >
i'll need to cogitate on what you've helped me do here for a while
14:58
solocshaw has quit [Remote host closed the connection]
14:58
<
hays >
questions like: why would this be a class method and not an instance method
14:58
<
apeiros >
start with the class method
14:58
<
apeiros >
get that to work
14:58
<
hays >
i must think about
15:00
Axl__ has left #ruby [#ruby]
15:00
<
apeiros >
IMO should be Bananas::GateKeeper
15:00
<
apeiros >
keep stuff in one namespace.
15:01
hotpancakes has quit [Ping timeout: 250 seconds]
15:01
grh has joined #ruby
15:02
AzureStigma has joined #ruby
15:02
cjbischof_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:03
nankyokusei has quit [Ping timeout: 272 seconds]
15:03
<
apeiros >
within module Bananas, you can just `extend GateKeeper`
15:05
<
hays >
thanks. there are too many computer languages floating around in my head
15:05
the_drow has quit [Quit: This computer has gone to sleep]
15:05
<
hays >
this is great--i can build from this
15:07
GodFather has joined #ruby
15:08
hotpancakes has joined #ruby
15:09
the_drow has joined #ruby
15:10
blackmes1 has quit [Ping timeout: 265 seconds]
15:10
ahri_ has joined #ruby
15:10
ahri_ is now known as ahri^
15:11
shinnya has quit [Ping timeout: 248 seconds]
15:11
johnmilton has joined #ruby
15:12
solocshaw has joined #ruby
15:12
ebraga has joined #ruby
15:12
<
ahri^ >
hi, i'm executing a process and outputing the stdout, however there seems to be a control character emitted that clears the screen (i see this when executing the process from bash) - the result for me is that stdout is mostly empty at the end of execution
15:12
csk has joined #ruby
15:12
tectonic has joined #ruby
15:13
jhack_ has joined #ruby
15:13
<
ahri^ >
i'm using popen3, and wonder if there's a way to properly handly this situation
15:13
<
apeiros >
what would "properly" entail for you?
15:13
jhack_ has quit [Client Quit]
15:13
bsrd has quit [Quit: WeeChat 1.5]
15:14
hutch34 has quit [Ping timeout: 240 seconds]
15:14
hotpancakes has quit [Remote host closed the connection]
15:14
<
ahri^ >
probably stripping the \f (this is my working theory) before it arrives in my string
15:15
hotpancakes has joined #ruby
15:15
jazzonmym11nd has joined #ruby
15:15
<
apeiros >
the sequence to clear the screen is probably not \f. look for \e. ansii escape sequences start with that. iirc there's more than 1 to clear the screen.
15:16
<
apeiros >
what stops you from stripping the sequence from the output?
15:16
mitt3ns has joined #ruby
15:16
agent_white has quit [Disconnected by services]
15:16
mitt3ns is now known as agent_white
15:17
<
ahri^ >
i just tested with "| tr -d '\f'" appended to the command, and that successfully stops the screen clearing
15:18
<
ahri^ >
so that's probably the way to go
15:18
hotpancakes has quit [Read error: Connection reset by peer]
15:18
maloik has quit [Remote host closed the connection]
15:18
maloik has joined #ruby
15:20
<
ahri^ >
unfortunately, simply adding that pipe is not having the desired effect in ruby :\
15:20
<
hays >
is there a way to decorate a function simply, similar to python?
15:20
platzhirsch has joined #ruby
15:20
<
apeiros >
ahri^: what stops you from doing the equivalent in ruby code?
15:21
<
apeiros >
hays: `def foo; …; end` returns :foo
15:21
ebraga has quit [Ping timeout: 255 seconds]
15:21
hotpancakes has joined #ruby
15:21
Wolland has quit []
15:22
<
ahri^ >
apeiros: as i was typing i figured it out; i'd have to do more to allow piping in ruby via popen3, i just tested with Rake's 'sh' and it works nicely just sticking the pipe into the command
15:22
tmtwd has joined #ruby
15:22
maletor has joined #ruby
15:23
stamina has joined #ruby
15:24
antgel has quit [Ping timeout: 255 seconds]
15:24
pavshn has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
15:25
<
hays >
apeiros: hmm actually for waht we were just talking about, I can use "super value" instead of @#{name}=value
15:25
<
hays >
that way I make sure im not accidentally overriding anything in the underlying implementation
15:25
<
hays >
i think that works...
15:25
Oclair_ has joined #ruby
15:25
<
apeiros >
yes, it's the better choice.
15:25
jazzonmym11nd has quit [Ping timeout: 248 seconds]
15:26
<
hays >
plus i get to have a line in my code that is "super value"
15:26
weemsledeux has joined #ruby
15:26
maletor has quit [Ping timeout: 248 seconds]
15:27
Oclair has quit [Ping timeout: 248 seconds]
15:28
the_drow has quit [Quit: This computer has gone to sleep]
15:29
diprotic has joined #ruby
15:29
diprotic has joined #ruby
15:29
diprotic has quit [Changing host]
15:31
mikecmpb_ has joined #ruby
15:32
monoprotic has quit [Ping timeout: 240 seconds]
15:33
mikecmpbll has quit [Ping timeout: 255 seconds]
15:34
elenatanasoiu has quit [Ping timeout: 248 seconds]
15:35
Axl_ has joined #ruby
15:35
miqlas-H has joined #ruby
15:35
symm- has quit [Ping timeout: 248 seconds]
15:35
mtkd has quit [Ping timeout: 250 seconds]
15:35
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:36
<
hays >
oh damnit. haha. this isnt going to work
15:36
trampi has joined #ruby
15:36
<
hays >
i can bypass the whole thing because the underlying array i can just directly access
15:37
mtkd has joined #ruby
15:37
minimalism has joined #ruby
15:37
<
hays >
i need to be returning something that itself also has a gatekeeper per se
15:37
Axl_ has left #ruby [#ruby]
15:39
rafadc has joined #ruby
15:39
<
hays >
i'll need to extend array
15:41
roflmyeggo has joined #ruby
15:41
Axl__ has joined #ruby
15:42
banisterfiend has joined #ruby
15:42
sdothum has joined #ruby
15:44
rafadc has quit [Ping timeout: 265 seconds]
15:45
Krebsgewehr has quit [Quit: Leaving]
15:45
init7 has joined #ruby
15:45
<
hays >
any advice on what functions i'd want to focus on if I wanted to tap into Array's [] and [a:b] functionality
15:45
<
apeiros >
s/functions/methods/
15:46
fullofcaffeine has joined #ruby
15:46
<
apeiros >
what should [a:b] mean?
15:46
sarkis has joined #ruby
15:46
<
apeiros >
some_array[x] uses Array#[]
15:46
<
hays >
foo[3:4] = [5,6]
15:46
<
apeiros >
that's nice, but not ruby :)
15:46
qakar has joined #ruby
15:46
swills has quit [Read error: Connection reset by peer]
15:46
<
hays >
doh. foo[3..4]=[5,6]
15:46
weemsledeux has joined #ruby
15:47
<
apeiros >
there's foo[3,4] and foo[3..4], both invoke Array#[]
15:47
<
apeiros >
oh, and foo[3,4] = … invokes Array#[]=
15:47
swills has joined #ruby
15:47
nando293921 has joined #ruby
15:48
<
hays >
so : class SpecialArray < Array ; def #[] { stuff } ; def #[]= { stuff }; ?
15:49
fullofca_ has joined #ruby
15:49
claudiuinberlin has quit [Remote host closed the connection]
15:49
<
hays >
i mean generally maybe a bad idea to derive from built in classes like that, but even in composition are these the methods?or ar they actually called Array#[]=
15:49
<
apeiros >
mostly. no {} for method bodies in ruby. and you should read up on why rather use has-a than is-a (composition instead of inheritance) for core classes (or generally classes you don't own)
15:50
claudiuinberlin has joined #ruby
15:50
roflmyeggo has quit [Ping timeout: 264 seconds]
15:50
fullofc__ has joined #ruby
15:50
elenatanasoiu has joined #ruby
15:50
sarkis has quit [Ping timeout: 265 seconds]
15:50
fullofcaffeine has quit [Ping timeout: 265 seconds]
15:51
qakar has quit [Ping timeout: 272 seconds]
15:51
roflmyeggo has joined #ruby
15:51
antgel has joined #ruby
15:52
Channel6 has joined #ruby
15:53
fullofca_ has quit [Ping timeout: 240 seconds]
15:53
diprotic has quit [Ping timeout: 250 seconds]
15:54
hotpanca_ has joined #ruby
15:54
hotpancakes has quit [Ping timeout: 248 seconds]
15:54
vqrs has quit [Ping timeout: 248 seconds]
15:55
ahri^ has quit [Quit: Page closed]
15:55
monoprotic has joined #ruby
15:55
monoprotic has joined #ruby
15:55
monoprotic has quit [Changing host]
15:55
elenatanasoiu has quit [Ping timeout: 260 seconds]
15:56
pontiki has joined #ruby
15:56
vqrs has joined #ruby
15:57
roflmyeggo has quit [Ping timeout: 248 seconds]
15:58
nando293921 has quit [Ping timeout: 244 seconds]
15:58
xlegoman has joined #ruby
15:59
roflmyeggo has joined #ruby
16:01
<
lupine >
tl;dr the runtime is naughty for speed reasons
16:01
<
lupine >
but yeah, composition is god
16:02
Axl__ has quit [Quit: axl__]
16:03
agent_white has quit [Quit: agent_white]
16:04
stamina has quit [Ping timeout: 265 seconds]
16:06
blackmes1 has joined #ruby
16:06
bovis has joined #ruby
16:07
<
bovis >
Can I ask a question here about book recommendations? Or would that be best for another channel?
16:08
a7d7p has joined #ruby
16:09
sdothum has joined #ruby
16:09
<
bovis >
I want to learn ruby, html/css, javascript, and a database language like mysql. What books would you recommend for ruby (or any of the others) that fit that goal and can provide me with exercises/projects along the way.
16:09
<
bovis >
Materials that work well together would be great. Or is it the best course to finish one, move to the next...? Still, complimentary books are a nice find.
16:10
<
pontiki >
not that link!!
16:10
anisha has quit [Quit: Leaving]
16:11
<
pontiki >
forgot to update my aliases...
16:11
elenatanasoiu has joined #ruby
16:12
anisha has joined #ruby
16:12
ropeney has joined #ruby
16:12
blackmes1 has quit [Ping timeout: 250 seconds]
16:12
sdothum has joined #ruby
16:13
<
bovis >
pontiki: thanks
16:15
skweek has joined #ruby
16:15
habitullence_ has joined #ruby
16:16
elenatanasoiu has quit [Ping timeout: 265 seconds]
16:16
habitullence has quit [Ping timeout: 260 seconds]
16:16
habitullence_ is now known as habitullence
16:20
<
bovis >
pontiki: I've seen the Odin project before, and that site makes it seem like I could gain everything I need to know in online tutorials. In hindsight, would you take that avenue or stick to books if you were beginning?
16:21
<
bovis >
pontiki: I haven't fared well with my understanding of concepts after leaving HTML and Ruby courses in Codecademy... I leave feeling like I missed something. Perhaps they pass by topics too quickly.
16:22
blackwind_123 has joined #ruby
16:22
maletor has joined #ruby
16:23
Channel6 has quit [Quit: Leaving]
16:23
dionysus70 has joined #ruby
16:24
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
16:24
dionysus69 has quit [Ping timeout: 265 seconds]
16:24
dionysus70 is now known as dionysus69
16:25
bsrd has joined #ruby
16:26
miqlas-H has joined #ruby
16:27
eljimmy has joined #ruby
16:27
fullofc__ has quit [Remote host closed the connection]
16:27
johnmilton has quit [Ping timeout: 264 seconds]
16:27
maletor has quit [Ping timeout: 265 seconds]
16:27
johnmilton has joined #ruby
16:28
fullofcaffeine has joined #ruby
16:29
tristanp has joined #ruby
16:29
<
pontiki >
i dislike codeacademy and their ilk; however, i'm totally at the opposite end of the learning scale on this so it wouldn't be fair for me to say what works well for others
16:31
<
Zarthus >
they are good if you want the very basics for free
16:31
<
Zarthus >
Most people need more than just the very basics.
16:31
<
pontiki >
it's their style of instruction i don't like
16:32
elenatanasoiu has joined #ruby
16:32
<
Zarthus >
isn't it similar to the try ruby course on ruby's site?
16:32
<
bovis >
Zarthus: yes, the instruction doesn't take you far; even in introducing how to make your own classes, for instance, it doesn't go deep into why you should be doing that
16:33
monoprotic has quit [Ping timeout: 240 seconds]
16:33
yeticry has quit [Ping timeout: 240 seconds]
16:33
<
Zarthus >
I think the basic approach is more a "get your feet wet to see if you like it" more than anything else
16:33
<
pontiki >
none of those sites teach you the whys
16:33
<
bovis >
I worry about the books being out of date, even if they were printed just 3 or 4 years ago. Is that a valid concern?
16:33
<
pontiki >
most of the books don't either
16:33
<
pontiki >
not necessarily, but it can be
16:33
<
bovis >
I'd like to know the why's
16:33
<
pontiki >
there are books i still point to that were published last in the 70s
16:33
<
Zarthus >
books may be outdated, but even if outdated most professors/teachers are behind the times even more
16:34
<
pontiki >
mainly because they're conceptual, and are teaching things about how to program, not how to write a specific lanuage
16:35
<
bovis >
pontiki: your site seems to delineate between those two camps, the how to program vs. the specific languages
16:35
yeticry has joined #ruby
16:35
<
pontiki >
these are two different domains of knowledge, though linked
16:36
elenatanasoiu has quit [Ping timeout: 248 seconds]
16:36
<
bovis >
I saw a talk from Metz the other day (video); it was excellent and makes me think that her book would be a good fit
16:36
<
pontiki >
i'm also a huge fan of learning many languages and frameworks, learning from many different approaches
16:36
<
bovis >
again, I guess my worry is that her book is older than some of the others
16:37
<
pontiki >
in that case, that is not a worry
16:37
<
bovis >
if I'm getting into ruby, html, js, mysql all at once, I'll be see a lot of different approaches
16:37
brendan- has quit [Remote host closed the connection]
16:37
<
pontiki >
she's not teaching specific language syntax, she's teaching an approach to organizing code
16:37
tectonic has quit []
16:38
<
pontiki >
you could replace all her ruby code with java, or php, or c++ and her points would be the same
16:39
tectonic has joined #ruby
16:40
<
bovis >
would you say that the Olsen, Grimm, or Black books are better for a beginner then? I only know basic syntax; not enough to dive into something that assumes I have a whole language worth of previous knowledge
16:40
<
pontiki >
also, there's a point at which saying "it's old, i'm afraid it won't be applicable" is just something else to keep from jumping in and learning
16:40
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:40
<
pontiki >
i think that question "which is better" is avoiding just learning
16:41
<
pontiki >
get the (free) first chapter to justin weiss's book, practicing rails -- it's not about rails, it's about
*learning*
16:41
roflmyeggo has quit [Remote host closed the connection]
16:41
<
pontiki >
read it, internalize it
16:42
elenatanasoiu has joined #ruby
16:42
vuoto has quit [Remote host closed the connection]
16:42
roflmyeggo has joined #ruby
16:42
<
pontiki >
this is programming, it's a skill, it's a collection of knowledge, it is not about reading books and doing tutorials
16:42
<
pontiki >
best way to learn, imo, is to practice
16:42
gingray has quit [Ping timeout: 248 seconds]
16:43
<
pontiki >
and like tennis, you'll never get good at it unless you play with others
16:45
weemsledeux has joined #ruby
16:46
tectonic has quit []
16:46
elenatanasoiu has quit [Ping timeout: 250 seconds]
16:47
vuoto has joined #ruby
16:48
roflmyeggo has quit [Ping timeout: 244 seconds]
16:49
<
apeiros >
pontiki: wait, what? you mean I should stop reading "tennis for dummies"?
16:51
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
16:53
hutch34 has joined #ruby
16:55
AzureStigma has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:55
zac has quit [Remote host closed the connection]
16:56
solocshaw has quit [Ping timeout: 265 seconds]
16:56
<
pontiki >
not you, apeiros, you just keep on reading
16:57
csk has quit [Quit: ZZZzzz…]
16:57
trampi has quit [Remote host closed the connection]
16:57
elenatanasoiu has joined #ruby
16:58
hutch34 has quit [Ping timeout: 240 seconds]
16:58
nankyokusei has joined #ruby
16:58
eljimmy has quit [Quit: This computer has gone to sleep]
17:00
bsrd has quit [Quit: WeeChat 1.5]
17:01
firstdayonthejob has joined #ruby
17:01
nando293921 has joined #ruby
17:02
elenatanasoiu has quit [Ping timeout: 244 seconds]
17:03
nankyokusei has quit [Ping timeout: 276 seconds]
17:03
tmtwd has quit [Ping timeout: 276 seconds]
17:04
eizua has quit [Quit: Leaving]
17:06
statelesscode has joined #ruby
17:06
d0nn1e has quit [Ping timeout: 276 seconds]
17:07
d0nn1e has joined #ruby
17:09
blackmes1 has joined #ruby
17:09
redpants has joined #ruby
17:09
gfvcastro has quit [Ping timeout: 244 seconds]
17:10
claudiuinberlin has quit [Remote host closed the connection]
17:12
monoprotic has joined #ruby
17:12
monoprotic has quit [Changing host]
17:12
monoprotic has joined #ruby
17:13
elenatanasoiu has joined #ruby
17:14
blackmes1 has quit [Ping timeout: 264 seconds]
17:15
pawnbox has quit [Ping timeout: 240 seconds]
17:16
pawnbox has joined #ruby
17:17
lxsameer has joined #ruby
17:17
elenatanasoiu has quit [Ping timeout: 265 seconds]
17:18
solocshaw has joined #ruby
17:19
LoneHermit has quit [Remote host closed the connection]
17:21
statelesscode has quit [Quit: statelesscode]
17:23
maletor1 has joined #ruby
17:23
skweek has quit [Ping timeout: 255 seconds]
17:24
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
17:24
elenatanasoiu has joined #ruby
17:25
AzureStigma has joined #ruby
17:26
statelesscode has joined #ruby
17:27
AzureStigma has quit [Client Quit]
17:27
friday has joined #ruby
17:27
Delesy has joined #ruby
17:28
maletor1 has quit [Ping timeout: 240 seconds]
17:28
mozzarella has quit [Ping timeout: 276 seconds]
17:28
<
Delesy >
Hey guys, hows it going
17:29
gilfoyle has joined #ruby
17:29
gilfoyle is now known as Guest35258
17:30
tectonic has joined #ruby
17:30
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:31
<
Delesy >
puts "Anybody here?"
17:31
<
friday >
;_; it's no longer friday that's what's going
17:31
lxsameer has quit [Quit: WeeChat 1.5]
17:31
<
Delesy >
saturday is even better
17:31
<
friday >
friday is the promise of saturday to come
17:32
<
Delesy >
oh, nice username../joke
17:34
zapata has joined #ruby
17:34
Channel6 has joined #ruby
17:34
claudiuinberlin has joined #ruby
17:35
qakar has joined #ruby
17:35
SteenJobs has joined #ruby
17:36
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
17:36
weemsledeux has joined #ruby
17:38
claudiuinberlin has quit [Remote host closed the connection]
17:38
LoneHerm_ has joined #ruby
17:38
platzhir1 has joined #ruby
17:39
qakar has quit [Ping timeout: 260 seconds]
17:40
last_staff has joined #ruby
17:41
weemsledeux has quit [Ping timeout: 240 seconds]
17:41
rafadc has joined #ruby
17:41
nettoweb has joined #ruby
17:41
nettoweb has quit [Remote host closed the connection]
17:42
platzhirsch has quit [Ping timeout: 248 seconds]
17:44
last_staff has quit [Ping timeout: 244 seconds]
17:44
roflmyeggo has joined #ruby
17:46
last_staff has joined #ruby
17:46
siaw23 has joined #ruby
17:46
rafadc has quit [Ping timeout: 276 seconds]
17:46
pavshn has joined #ruby
17:47
JeanCarloMachado has joined #ruby
17:48
skweek has joined #ruby
17:49
rafadc has joined #ruby
17:50
pawnbox has quit [Remote host closed the connection]
17:50
qakar has joined #ruby
17:51
olistik has joined #ruby
17:53
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:55
olistik has quit [Ping timeout: 244 seconds]
17:57
Pupeno has quit [Remote host closed the connection]
18:00
pawnbox has joined #ruby
18:00
statelesscode has quit [Quit: statelesscode]
18:01
fullofca_ has joined #ruby
18:02
blackmes1 has joined #ruby
18:02
ropeney has quit [Remote host closed the connection]
18:03
AlexRussia_ has quit [Ping timeout: 265 seconds]
18:03
statelesscode has joined #ruby
18:03
Ishido has quit [Remote host closed the connection]
18:03
fullofcaffeine has quit [Ping timeout: 265 seconds]
18:05
pawnbox has quit [Ping timeout: 276 seconds]
18:06
Ishido has joined #ruby
18:07
skweek has quit [Ping timeout: 248 seconds]
18:07
rippa has quit [Ping timeout: 255 seconds]
18:08
pavshn has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
18:09
sarkis has joined #ruby
18:10
pokalyis has joined #ruby
18:10
shinnya has joined #ruby
18:10
antgel has quit [Ping timeout: 260 seconds]
18:11
JeanCarloMachado has quit [Quit: Lost terminal]
18:12
threh has joined #ruby
18:13
pawnbox has joined #ruby
18:14
csk has joined #ruby
18:14
solocshaw has quit [Ping timeout: 248 seconds]
18:14
solocshaw has joined #ruby
18:14
skweek has joined #ruby
18:15
fullofcaffeine has joined #ruby
18:15
fullofca_ has quit [Read error: Connection reset by peer]
18:17
sdothum has quit [Read error: Connection reset by peer]
18:17
roflmyeggo has quit [Ping timeout: 260 seconds]
18:17
sdothum has joined #ruby
18:18
rafadc has quit [Ping timeout: 240 seconds]
18:20
fullofcaffeine has quit [Remote host closed the connection]
18:21
fullofcaffeine has joined #ruby
18:21
platzhir1 has quit [Ping timeout: 265 seconds]
18:23
gizless has joined #ruby
18:23
gizmore has quit [Ping timeout: 265 seconds]
18:23
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
18:24
ta_ has quit [Remote host closed the connection]
18:25
ta_ has joined #ruby
18:26
fullofcaffeine has quit [Remote host closed the connection]
18:26
fullofca_ has joined #ruby
18:26
Cohedrin has joined #ruby
18:30
elenatanasoiu has quit [Ping timeout: 244 seconds]
18:33
marxarelli has joined #ruby
18:33
marxarelli has quit [Client Quit]
18:33
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
18:34
Blackpajamas has joined #ruby
18:35
GodFather has quit [Ping timeout: 244 seconds]
18:35
rippa has joined #ruby
18:37
elenatanasoiu has joined #ruby
18:37
claudiuinberlin has joined #ruby
18:37
dotio is now known as i-
18:37
Blackpajamas has quit [Client Quit]
18:38
siaw23 has quit [Quit: siaw23]
18:39
elenatanasoiu has quit [Client Quit]
18:40
mozzarella has joined #ruby
18:40
Cohedrin has joined #ruby
18:40
SteenJobs has quit [Quit: SteenJobs]
18:42
SteenJobs has joined #ruby
18:46
symm- has joined #ruby
18:46
Bellthoven has joined #ruby
18:48
fullofca_ has quit [Remote host closed the connection]
18:49
anisha has quit [Quit: This computer has gone to sleep]
18:52
threh has quit [Ping timeout: 265 seconds]
18:52
SteenJobs has quit [Ping timeout: 250 seconds]
18:52
Rodya_ has joined #ruby
18:54
jazzonmym11nd has joined #ruby
18:55
SteenJobs has joined #ruby
18:55
hutch34 has joined #ruby
18:56
a7d7p has quit [Quit: a7d7p]
18:56
firstdayonthejob has quit [Quit: WeeChat 1.5]
18:58
sarkis has quit [Ping timeout: 240 seconds]
18:58
fullofcaffeine has joined #ruby
18:58
Mon_Ouie has quit [Read error: Connection reset by peer]
18:58
Mon_Ouie has joined #ruby
18:59
newbie1 has joined #ruby
18:59
a7d7p has joined #ruby
18:59
nankyokusei has joined #ruby
18:59
firstdayonthejob has joined #ruby
18:59
siaw23 has joined #ruby
18:59
hutch34 has quit [Ping timeout: 250 seconds]
19:00
siaw23 has quit [Client Quit]
19:01
ayonkhan has joined #ruby
19:01
ayonkhan has quit [Client Quit]
19:01
elastix has joined #ruby
19:01
SteenJobs has quit [Quit: SteenJobs]
19:02
sarkis has joined #ruby
19:03
jtzero has joined #ruby
19:03
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:04
nankyokusei has quit [Ping timeout: 265 seconds]
19:04
montyboy has joined #ruby
19:04
SteenJobs has joined #ruby
19:05
diprotic has joined #ruby
19:05
symm- has quit [Ping timeout: 255 seconds]
19:06
pragmaticus has quit [Read error: Connection reset by peer]
19:06
monoprotic has quit [Ping timeout: 244 seconds]
19:06
rsampaio_ has joined #ruby
19:07
diprotic is now known as monoprotic
19:08
csk has quit [Quit: ZZZzzz…]
19:10
ta_ has quit [Remote host closed the connection]
19:14
Delesy has joined #ruby
19:16
baweaver is now known as baweaver_away
19:19
sarkis has quit [Ping timeout: 248 seconds]
19:20
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
19:20
BlkDynmt has quit [Ping timeout: 240 seconds]
19:21
rsampaio_ has quit [Ping timeout: 248 seconds]
19:24
maletor1 has joined #ruby
19:24
agit0 has joined #ruby
19:25
montyboy has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
19:25
sarkis has joined #ruby
19:27
Bellthoven has quit []
19:28
montyboy has joined #ruby
19:29
maletor1 has quit [Ping timeout: 272 seconds]
19:29
axsuul has joined #ruby
19:29
symm- has joined #ruby
19:31
Delesy has joined #ruby
19:32
tmtwd has joined #ruby
19:33
grh has quit [Ping timeout: 265 seconds]
19:34
tmtwd has quit [Remote host closed the connection]
19:35
threh has joined #ruby
19:37
a7d7p has quit [Quit: a7d7p]
19:37
BlkDynmt has joined #ruby
19:37
Delesy has quit [Read error: Connection reset by peer]
19:37
GodFather has joined #ruby
19:38
benaph has joined #ruby
19:38
cyclonis has quit [Ping timeout: 255 seconds]
19:39
|ifei5g00d has quit []
19:41
tectonic has quit []
19:41
Rodya_ has quit [Remote host closed the connection]
19:48
tristanp has quit [Remote host closed the connection]
19:48
Axl_ has joined #ruby
19:48
Axl_ has quit [Client Quit]
19:49
AlexRussia_ has joined #ruby
19:49
conta has joined #ruby
19:50
nullfxn has joined #ruby
19:51
fullofcaffeine has quit [Remote host closed the connection]
19:52
LuckyABA has joined #ruby
19:52
fullofcaffeine has joined #ruby
19:52
blackmes1 has quit [Ping timeout: 276 seconds]
19:52
fullofcaffeine has quit [Remote host closed the connection]
19:53
fullofcaffeine has joined #ruby
19:53
wombawomba has joined #ruby
19:53
fullofcaffeine has quit [Remote host closed the connection]
19:54
fullofcaffeine has joined #ruby
19:54
fullofcaffeine has quit [Remote host closed the connection]
19:55
fullofcaffeine has joined #ruby
19:55
siaw23 has joined #ruby
19:55
fullofcaffeine has quit [Remote host closed the connection]
19:56
fullofcaffeine has joined #ruby
19:56
fullofcaffeine has quit [Remote host closed the connection]
19:58
Pupeno has joined #ruby
19:59
conta has quit [Ping timeout: 265 seconds]
20:04
Pupeno has quit [Ping timeout: 265 seconds]
20:04
devil_tux has joined #ruby
20:04
<
devil_tux >
has anyone worked here with CAN protocol?
20:04
<
devil_tux >
I'm rewriting a socketCan to native ruby lib
20:05
vuoto has quit [Remote host closed the connection]
20:05
rsampaio_ has joined #ruby
20:07
<
devil_tux >
the data for example I get through recv() on binded socket
20:07
<
devil_tux >
\x01\x00\x00\x05\x00\x00\x00\xDE\xAD\xBE\xEF\xCA\x00\x00\x00
20:08
<
devil_tux >
you can see: x05 = no of bytes; and then 3x00 (padding) then the data: DEADBEEFCA
20:08
<
devil_tux >
is there a way to clean this padding bytes
20:08
<
devil_tux >
or to recieve a frame data in text format
20:09
<
devil_tux >
does it have to go into buffer?
20:11
<
devil_tux >
here is the C code: read(s, &frame, sizeof(struct can_frame)); // s is the socket, &frame is pointer to frame struct, sizeof(struct can_frame)) is size(frame)
20:13
eljimmy has joined #ruby
20:16
diprotic has joined #ruby
20:16
diprotic has joined #ruby
20:16
diprotic has quit [Changing host]
20:16
Channel6 has quit [Quit: Leaving]
20:16
<
apeiros >
devil_tux: that is text. \x00 - \x19 are non-printable characters, hence you will never
*see* anything but an escape sequence
20:16
<
apeiros >
as for decoding it:
20:16
<
apeiros >
&ri String#unpack devil_tux
20:17
monoprotic has quit [Ping timeout: 265 seconds]
20:18
cdg has joined #ruby
20:18
<
devil_tux >
apeiros thank you! both links are great resource
20:18
<
devil_tux >
apeiros: have you tried that gem?
20:19
adrianRor has joined #ruby
20:20
pwnd_nsfw has quit [Read error: Connection reset by peer]
20:20
c0mrad3 has quit [Quit: Connection closed for inactivity]
20:20
eljimmy has quit [Quit: This computer has gone to sleep]
20:20
pwnd_nsfw has joined #ruby
20:20
Guest43 has joined #ruby
20:20
Guest43 has quit [Changing host]
20:20
Guest43 has joined #ruby
20:21
rsampaio_ has quit [Ping timeout: 255 seconds]
20:21
Guest43 is now known as Rufus
20:22
cdg has quit [Read error: Connection reset by peer]
20:22
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
20:22
cdg has joined #ruby
20:22
\13k has quit [Disconnected by services]
20:22
\13k has joined #ruby
20:23
solocshaw has quit [Ping timeout: 265 seconds]
20:23
adrianRor has left #ruby [#ruby]
20:24
<
devil_tux >
seems like .unpack is what I need. The "flag" is: A16L
20:24
<
devil_tux >
a bit cleaner
20:24
<
devil_tux >
before: #\x01\x00\x00\x05\x00\x00\x00\xDE\xAD\xBE\xEF\xCA\x00\x00\x00
20:25
<
devil_tux >
now: #\x01\x00\x00\x05\x00\x00\x00\xDE\xAD\xBE\xEF\xCA
20:26
<
zenspider >
unpack is a hell of a powerful tool
20:27
rsampaio_ has joined #ruby
20:27
mikecmpb_ has quit [Quit: inabit.]
20:27
<
devil_tux >
tho' still not perfect
20:28
<
zenspider >
false dichotomy. nothing is perfect.
20:28
<
apeiros >
devil_tux: if \x05 (4th byte) is the number of bytes, then I doubt your pattern is A16L
20:29
Guest35258 has quit [Ping timeout: 240 seconds]
20:30
<
devil_tux >
yes, the 8 is the max no of bytes in one CAN frame
20:31
redpants has quit [Ping timeout: 244 seconds]
20:31
Bounga has joined #ruby
20:31
<
devil_tux >
its the problem with the sturct
20:32
<
devil_tux >
I havent defined it and recv does not detect a \n, so there it goes
20:32
rsampaio_ has quit [Ping timeout: 265 seconds]
20:34
<
zenspider >
devil_tux: why are you writing this?
20:34
<
devil_tux >
zenspider: writing what?
20:35
<
zenspider >
this can bus decoder thingy
20:35
<
siaw23 >
ideas please :)
20:35
[k- has quit [Ping timeout: 244 seconds]
20:35
<
siaw23 >
how to get the before block to work
20:35
<
devil_tux >
zenspider: there is no native lib for CAN on Ruby, and I'm working on a project tied to it
20:35
<
zenspider >
siaw23: you're defining a local variable "player" in your before block... it's not defined anywhere else. that's what local vars do
20:36
<
zenspider >
you probably want an instance variable
20:36
<
zenspider >
devil_tux: a quick google found me 3 different can bus implementations for ruby...
20:36
siaw23 has quit [Read error: Connection reset by peer]
20:36
<
devil_tux >
Oh? May I see them?
20:36
<
zenspider >
yes. you can google too. It's a public resource
20:36
<
devil_tux >
the only one available is ruby_can
20:36
<
devil_tux >
which is not even started
20:37
<
zenspider >
oddly, that one I didn't find :)
20:37
gilfoyle has joined #ruby
20:38
qakar has quit [Remote host closed the connection]
20:38
<
zenspider >
one uses bitstruct... that's intriguing. I've definitely needed that before.
20:38
gilfoyle is now known as Guest56443
20:38
<
devil_tux >
Ok :) it's a public resource and I can't find it, and you don't want to link it?
20:38
<
devil_tux >
great appreciation of communicity
20:38
<
devil_tux >
you are genious
20:38
<
devil_tux >
and generous
20:39
JeanCarloMachado has joined #ruby
20:39
ruby-lang032 has joined #ruby
20:40
skweek has quit [Ping timeout: 255 seconds]
20:40
GBrawl has joined #ruby
20:40
<
ruby-lang032 >
ping admin
20:40
<
zenspider >
devil_tux: wow. way to bite the hand that feeds you. good job. I googled for: can bus protocol ruby gem
20:40
<
zenspider >
ruby-lang032: what's up?
20:40
<
havenwood >
ruby-lang032: Need help?
20:40
dionysus69 has quit [Ping timeout: 265 seconds]
20:40
<
zenspider >
there's a number of admins in here. just speak up (or PM if you need)
20:41
pawnbox has quit [Remote host closed the connection]
20:42
devil_tux has quit [Quit: leaving]
20:42
<
pontiki >
hi, zenspider
20:42
Guest56443 has quit [Ping timeout: 250 seconds]
20:42
siaw23 has joined #ruby
20:42
<
zenspider >
pontiki: hey!
20:44
nikivi has joined #ruby
20:45
bovis has quit [Quit: leaving]
20:49
<
hays >
also is there an obvious replacement for gserver or was it just removed
20:50
<
apeiros >
hays: probably io is supposed to be an IO instance
20:50
<
apeiros >
no idea wrt gserver replacement
20:50
<
hays >
it looks like it was kinda a POS. found a note about its removal
20:51
pawnbox has joined #ruby
20:53
LoneHerm_ has quit [Remote host closed the connection]
20:53
<
hays >
unmaintained, badly documented, et
20:54
<
hays >
the plot thickens.. heh
20:54
<
apeiros >
not the point. read the last comment.
20:54
zacstewa1t has quit [Read error: Connection reset by peer]
20:54
zacstewart has joined #ruby
20:55
skweek has joined #ruby
20:56
hutch34 has joined #ruby
20:56
pawnbox has quit [Ping timeout: 260 seconds]
20:59
threh has quit [Ping timeout: 265 seconds]
21:00
nankyokusei has joined #ruby
21:00
<
apeiros >
oh? weird. that's what google gave me. and I thought google weighted results wrt TSL
21:01
hutch34 has quit [Ping timeout: 265 seconds]
21:02
shinnya has quit [Ping timeout: 265 seconds]
21:02
\13k_ has joined #ruby
21:02
Bounga has quit [Ping timeout: 248 seconds]
21:03
<
zenspider >
I didn't even know that gserver was removed. I should pay more attention
21:03
nikivi has quit [Quit: zzz]
21:03
last_staff has quit [Quit: going moo moo]
21:04
nikivi has joined #ruby
21:04
<
jazzonmym11nd >
apeiros: didn't you get a SSL cert error?
21:04
gingray has joined #ruby
21:05
nankyokusei has quit [Ping timeout: 276 seconds]
21:05
<
apeiros >
jazzonmym11nd: I guess I did. for anything I don't download stuff or isn't my banking website, I probably ignore them in a reflex.
21:06
gilfoyle_ has joined #ruby
21:07
montyboy has quit [Quit: montyboy]
21:07
Jackneill has quit [Remote host closed the connection]
21:09
Coldblackice has joined #ruby
21:11
gilfoyle_ has quit [Ping timeout: 265 seconds]
21:11
solocshaw has joined #ruby
21:11
Puffball has quit [Remote host closed the connection]
21:13
\13k_ has quit [Quit: \13k_]
21:14
<
GBrawl >
what does << do in ruby
21:15
<
jazzonmym11nd >
depends on what the receiver is
21:15
<
GBrawl >
3 << 5 for example
21:16
A124 has quit [Quit: '']
21:16
ruby-lang032 has quit [Ping timeout: 240 seconds]
21:17
skweek has quit [Ping timeout: 248 seconds]
21:18
A124 has joined #ruby
21:19
blackmes1 has joined #ruby
21:20
aidalgol has joined #ruby
21:21
pavshn has joined #ruby
21:22
djbkd has quit [Quit: Leaving...]
21:25
maletor1 has joined #ruby
21:25
JeanCarl1Machado has joined #ruby
21:29
JeanCarloMachado has quit [Ping timeout: 265 seconds]
21:29
qakar has joined #ruby
21:29
maletor1 has quit [Ping timeout: 250 seconds]
21:31
Puffball has joined #ruby
21:32
Klumben has quit [Ping timeout: 250 seconds]
21:33
nikivi has quit [Quit: irc]
21:33
alem0lars has quit [Ping timeout: 272 seconds]
21:34
qakar has quit [Ping timeout: 248 seconds]
21:34
claudiuinberlin has quit []
21:35
Puffball has quit [Remote host closed the connection]
21:36
Anatzum has joined #ruby
21:37
<
apeiros >
GBrawl: how to find out for `x << y` - you do x.class, then `ri ThatClass#<<` in your shell
21:37
<
GBrawl >
ah like that, thanks man
21:37
<
apeiros >
e.g. 3 << 5 --> 3.class => Fixnum --> `ri Fixnum#<<`
21:37
<
GBrawl >
I see I see
21:37
<
GBrawl >
that will help out
21:40
nullfxn has quit [Quit: leaving]
21:40
elastix has quit [Quit: elastix]
21:40
<
GBrawl >
is it possible to get back the array of an inject function if you have the result?
21:40
<
jazzonmym11nd >
code example please
21:41
7YUAB3GR2 has joined #ruby
21:41
pawnbox has joined #ruby
21:41
<
GBrawl >
(5..10).inject { |sum, n| sum + n }
21:41
<
GBrawl >
this basic one for example
21:41
<
pontiki >
the array you inject isn't destroyed or changed...
21:41
<
jazzonmym11nd >
well, there's no array in that example.
21:41
<
pontiki >
if you want it, just assign it first
21:42
biox has joined #ruby
21:42
threh has joined #ruby
21:42
<
GBrawl >
nono, but imagine I just get 45
21:42
<
pontiki >
arr=(5..10).to_a
21:42
<
GBrawl >
and the function inject { |sum, n| sum + n }
21:42
<
pontiki >
arr.inject...
21:42
<
jazzonmym11nd >
just keep a reference to it with a variable of some kind.
21:43
<
pontiki >
kinda like what i just showed them
21:43
<
GBrawl >
I don't have a reference, it's for decoding something
21:43
<
GBrawl >
I only have the result
21:43
Rodya_ has joined #ruby
21:43
<
GBrawl >
hmm okay, guess I'll have to find a workaround
21:43
<
jazzonmym11nd >
pontiki: yeah i'm not ignoring what you said, i'm just explaining, relax.
21:45
Pupeno has joined #ruby
21:45
<
jazzonmym11nd >
GBrawl: it's easier to understand what you mean if you share the code you're working with.
21:45
pawnbox has quit [Ping timeout: 250 seconds]
21:45
7YUAB3GR2 has quit [Ping timeout: 240 seconds]
21:45
<
GBrawl >
Well I could, but it's for a competition so that wouldn't be fair :)
21:46
<
GBrawl >
thanks for the help though :)
21:46
<
pontiki >
how do you know it's even an inject?
21:46
Rodya_ has quit [Remote host closed the connection]
21:46
<
GBrawl >
we get the encode algorithm
21:46
<
GBrawl >
and an encoded string
21:47
<
GBrawl >
and we have to write the decode algorithm
21:47
<
pontiki >
but not the decoded string?
21:47
<
GBrawl >
No, that's the point of the exercise :)
21:47
<
GBrawl >
but you can of course encode a string yourself and then you have a reference
21:48
[k- has joined #ruby
21:49
<
pontiki >
they you can assign the thing you're shovig in the inject
21:51
<
pontiki >
s/they/then/
21:51
<
pontiki >
sorry, this network connectn is so aweful
21:52
Anatzum has quit [Ping timeout: 255 seconds]
21:52
<
pontiki >
test_string="foo"; assert_equal decode(encode(test_string)), test_string;
21:52
k_ has joined #ruby
21:54
<
pontiki >
you just don't know what the contest givers used
21:55
k_ is now known as \13k_
21:55
armyriad has quit [Ping timeout: 265 seconds]
21:56
armyriad has joined #ruby
21:57
historypeats has joined #ruby
21:58
<
GBrawl >
still not really sure what they mean by "shift"
21:58
<
GBrawl >
like bit shifting to the right?
21:59
tristanp has joined #ruby
21:59
cevett has quit [Read error: Connection reset by peer]
21:59
Rodya_ has joined #ruby
22:00
<
GBrawl >
I see that's what it is
22:00
<
zenspider >
pontiki: assert_equal(expected, actual)
22:00
gilfoyle has joined #ruby
22:00
<
pontiki >
thanks, i'm always getting them backwards ;(
22:00
Wolland has joined #ruby
22:01
Oclair_ has quit [Quit: Bye Bye]
22:01
gilfoyle is now known as Guest38364
22:01
<
pontiki >
i blame foreced rspecing
22:01
Rodya_ has quit [Remote host closed the connection]
22:02
Rodya_ has joined #ruby
22:03
cevett has joined #ruby
22:04
Anatzum has joined #ruby
22:05
monoprotic has joined #ruby
22:05
Guest38364 has quit [Ping timeout: 265 seconds]
22:07
[k- has quit [Ping timeout: 264 seconds]
22:07
solocshaw has quit [Ping timeout: 248 seconds]
22:09
platzhir1 has joined #ruby
22:09
diprotic has quit [Ping timeout: 255 seconds]
22:12
ta_ has joined #ruby
22:12
solocshaw has joined #ruby
22:13
banisterfiend has joined #ruby
22:13
iooner has joined #ruby
22:15
Oclair has joined #ruby
22:17
yeticry has quit [Ping timeout: 248 seconds]
22:18
i- is now known as ^9
22:21
gizmore has joined #ruby
22:21
gizless has quit [Ping timeout: 272 seconds]
22:23
threh has quit [Ping timeout: 260 seconds]
22:23
biox has quit [Quit: brb servers are ded]
22:24
Klumben has joined #ruby
22:25
biox has joined #ruby
22:25
yeticry has joined #ruby
22:26
spider-mario has quit [Remote host closed the connection]
22:26
vqrs has quit [Ping timeout: 240 seconds]
22:27
siaw23 has quit [Quit: siaw23]
22:27
GBrawl has quit [Quit: (null)]
22:28
vqrs has joined #ruby
22:29
biox has quit [Client Quit]
22:29
benaph has quit [Quit: Leaving]
22:29
threh has joined #ruby
22:30
biox has joined #ruby
22:31
LoneHerm_ has joined #ruby
22:31
flying has joined #ruby
22:32
SteenJobs has quit [Quit: SteenJobs]
22:34
inra has joined #ruby
22:34
biox has quit [Client Quit]
22:35
firstdayonthejob has quit [Ping timeout: 272 seconds]
22:36
biox has joined #ruby
22:37
biox has quit [Client Quit]
22:37
ta_ has quit [Ping timeout: 250 seconds]
22:38
biox has joined #ruby
22:43
qakar has joined #ruby
22:44
tectonic has joined #ruby
22:45
grh has joined #ruby
22:49
nogic has joined #ruby
22:49
nogic has quit [Max SendQ exceeded]
22:49
pawnbox has joined #ruby
22:50
johnmilton has quit [Ping timeout: 260 seconds]
22:50
qakar has quit [Remote host closed the connection]
22:50
nogic has joined #ruby
22:53
Sashimi_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:54
pawnbox has quit [Ping timeout: 244 seconds]
22:54
gilfoyle has joined #ruby
22:55
gilfoyle is now known as Guest44521
22:55
alem0lars has joined #ruby
22:55
SteenJobs has joined #ruby
22:56
hutch34 has joined #ruby
22:57
Bounga has joined #ruby
22:59
qakar has joined #ruby
22:59
Guest44521 has quit [Ping timeout: 244 seconds]
22:59
nando293921 has quit [Ping timeout: 260 seconds]
23:00
gingray has quit [Ping timeout: 272 seconds]
23:01
nankyokusei has joined #ruby
23:01
hutch34 has quit [Ping timeout: 255 seconds]
23:02
nogic has quit [Ping timeout: 264 seconds]
23:02
Bounga has quit [Ping timeout: 265 seconds]
23:03
Wolland has quit []
23:03
ta_ has joined #ruby
23:05
nankyokusei has quit [Ping timeout: 265 seconds]
23:07
ItSANgo has quit [Ping timeout: 244 seconds]
23:10
ItSANgo has joined #ruby
23:11
threh has quit [Ping timeout: 250 seconds]
23:11
qakar has quit [Ping timeout: 272 seconds]
23:12
cdg has quit [Ping timeout: 240 seconds]
23:15
ItSANgo has quit [Quit: Leaving...]
23:16
d5sx43 has joined #ruby
23:16
a7d7p has joined #ruby
23:17
marr has quit [Ping timeout: 264 seconds]
23:18
kitikonti has quit [Ping timeout: 248 seconds]
23:18
\13k_ has quit [Quit: leaving]
23:19
\13k_ has joined #ruby
23:20
platzhir1 has quit [Ping timeout: 244 seconds]
23:23
tristanp has quit [Remote host closed the connection]
23:26
maletor1 has joined #ruby
23:28
tristanp has joined #ruby
23:30
maletor1 has quit [Ping timeout: 240 seconds]
23:31
qakar has joined #ruby
23:35
LoneHerm_ has quit [Remote host closed the connection]
23:36
a7d7p has quit [Quit: a7d7p]
23:36
tristanp has quit [Remote host closed the connection]
23:37
qakar has quit [Ping timeout: 248 seconds]
23:37
Channel6 has joined #ruby
23:37
tristanp has joined #ruby
23:37
grh has quit [Ping timeout: 265 seconds]
23:43
jtzero has quit [Ping timeout: 248 seconds]
23:44
blackmes1 has quit [Ping timeout: 264 seconds]
23:45
wombawomba has quit [Ping timeout: 240 seconds]
23:48
gilfoyle has joined #ruby
23:49
gilfoyle is now known as Guest4933
23:52
ebraga has joined #ruby
23:53
tristanp has quit [Remote host closed the connection]
23:53
Guest4933 has quit [Ping timeout: 265 seconds]
23:55
SteenJobs has quit [Quit: SteenJobs]
23:55
tvw has joined #ruby
23:58
Bounga has joined #ruby