<choke>
At one time this was true maybe. It's not a fad however, and I see it going nowhere.
<havenwood>
fab \ˈfab\ (adjective) : extremely good
cryptarium has quit [Ping timeout: 276 seconds]
icebourg has joined #ruby
<choke>
if you look at the global usage stats, while ruby may only account for 0.6% of all websites on the internet, it's steadily increasing... and only counts websites
lkba_ has joined #ruby
<choke>
doesnt count public api's, etc...
MatthewsFace[SEA has quit [Remote host closed the connection]
<choke>
and languages like php are in a steady decline
PhantomSpank has joined #ruby
jack_rabbit_ has joined #ruby
attlasbot has quit [Quit: Leaving]
ascarter_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roolo has quit [Remote host closed the connection]
dorei has quit []
lkba has quit [Ping timeout: 256 seconds]
sevenseacat has joined #ruby
attlasbot has joined #ruby
sankaber has joined #ruby
kblake has quit [Remote host closed the connection]
luksaur has quit [Quit: Leaving]
leafybasil has joined #ruby
serivich has joined #ruby
towski_ has quit [Remote host closed the connection]
redlegion has joined #ruby
lotyrin has joined #ruby
ismaelga has joined #ruby
that1guy has quit [Ping timeout: 276 seconds]
exadeci has quit [Quit: Connection closed for inactivity]
that1guy has joined #ruby
scripore has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
qwertme has joined #ruby
failshell has quit [Ping timeout: 265 seconds]
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FrankD has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mostlybadfly has quit [Quit: Connection closed for inactivity]
that1guy has quit [Ping timeout: 244 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has quit [Read error: Connection reset by peer]
gz_rain has joined #ruby
oo_ has joined #ruby
mistermocha has joined #ruby
failshell has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
zotherstupidguy has quit [Quit: Lost terminal]
mistermocha has quit [Ping timeout: 276 seconds]
Deele has joined #ruby
laurentide has joined #ruby
asmodlol has joined #ruby
yeticry has quit [Ping timeout: 245 seconds]
ismael_ has joined #ruby
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
yeticry has joined #ruby
ismaelga has quit [Ping timeout: 272 seconds]
bricker has quit [Quit: leaving]
icebourg has quit []
riceandbeans has quit [Ping timeout: 256 seconds]
ascarter has joined #ruby
Xoro has quit [Read error: Connection reset by peer]
Xoro has joined #ruby
ascarter_ has joined #ruby
mitchellhenke has joined #ruby
yfeldblum has joined #ruby
zz_barkerd427 is now known as barkerd427
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
greenbagels has quit [Ping timeout: 245 seconds]
tus has quit []
greenbagels has joined #ruby
wallerdev has quit [Ping timeout: 240 seconds]
bootstrappm has left #ruby [#ruby]
gz_rain has quit []
endash has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
iteratorP has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
beneggett has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has joined #ruby
vikaton has joined #ruby
bruno- has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MatthewsFace[SEA has joined #ruby
bruno- has quit [Ping timeout: 256 seconds]
programhappy has joined #ruby
delianides has joined #ruby
yh has quit [Ping timeout: 256 seconds]
DEA7TH_ has quit [Ping timeout: 244 seconds]
Akagi201 has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
lidenskap has quit [Remote host closed the connection]
amclain has joined #ruby
jshultz has joined #ruby
iasoon has quit [Ping timeout: 264 seconds]
programhappy has quit [Client Quit]
jackjackdripper has quit [Quit: Leaving.]
baweaver has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
baweaver has joined #ruby
mostlybadfly has joined #ruby
unreal_ has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vickleton has quit [Ping timeout: 276 seconds]
emptyflask has joined #ruby
unreal has quit [Ping timeout: 256 seconds]
guest1241234 has quit [Quit: Connection closed for inactivity]
DerisiveLogic has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
baweaver has quit [Ping timeout: 244 seconds]
casadei_ has joined #ruby
beneggett has quit [Read error: Connection reset by peer]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
rodfersou has quit [Remote host closed the connection]
casadei_ has quit [Ping timeout: 256 seconds]
metalic has joined #ruby
<attlasbot>
How should you write rspecs about classes?
wolflee has joined #ruby
that1guy has joined #ruby
<lotyrin>
attlasbot: elaborate?
<attlasbot>
I'm trying to learn ruby not as my first programming language but one of the thing that really caught my attention was rspec testing, but now I have no idea where to start and I have no idea how to start writing them.
<weaksauce>
attlasbot test each public function
<attlasbot>
I'm just really no understanding how to go about writing them for a class really
davedev2_ has joined #ruby
multi_io has quit [Ping timeout: 264 seconds]
ascarter_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<weaksauce>
do you have a specific class?
Pisuke has quit [Ping timeout: 255 seconds]
<attlasbot>
yeah i'm doing a simple socket searcher it was how I started learning cpp and python so I figured why not in ruby.
babykosh_ has joined #ruby
<weaksauce>
what do you mean socket searcher?
nobitanobi has quit [Remote host closed the connection]
mitchellhenke has joined #ruby
<attlasbot>
an open port searcher
<weaksauce>
ah
<lotyrin>
well, you'd `describe` your class, each method and their behavior in various contexts
<ruboto>
attlasbot, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<weaksauce>
attlasbot that's curious. try double quotes instead of single quotes perhaps?
ismael_ has quit [Ping timeout: 276 seconds]
KramerC has quit [Ping timeout: 256 seconds]
<weaksauce>
attlasbot are you absolutely sure you are editing the correct spec file?
<weaksauce>
you have two there
<attlasbot>
The current spec is searcher_spex
<attlasbot>
The current spec is searcher_spec
<weaksauce>
cat the file to make sure it's got the removed .rb
<attlasbot>
where are you wanting the removed .rb?
<weaksauce>
in the require_relative
<attlasbot>
It was the double quote ?????
<attlasbot>
Its now working
<weaksauce>
heh
KramerC has joined #ruby
<attlasbot>
Whats going on with that?
<sevenseacat>
gist the code now?
Motoservo has quit [Quit: Motoservo]
<weaksauce>
yeah I suppose they don't interpolate the .. with single quotes. strange
iotouch has joined #ruby
<sevenseacat>
well, no
ramfjord has quit [Ping timeout: 264 seconds]
<weaksauce>
seems like it should work both ways
<sevenseacat>
it should
<weaksauce>
I agree
<sevenseacat>
suspect the .rb only just got removed now at the same time as quotes got changed
<attlasbot>
Its now working single quotes as well?
<sevenseacat>
see?
<attlasbot>
okay thank you guys so damn much
<weaksauce>
must bee
<weaksauce>
be*
<attlasbot>
so now back to the whole writing specs
<weaksauce>
basically write tests that you would manually do.
<weaksauce>
it "should not crash when passed in an invalid port number"
<weaksauce>
it "should find an open port"
<weaksauce>
it "..."
<attlasbot>
okay so describe '#new' do
<attlasbot>
it 'should return searcher object' do
willharrison has joined #ruby
Motoservo has joined #ruby
<weaksauce>
I typically only test the code that I write
<sevenseacat>
thats testing ruby itself, your code
<sevenseacat>
*not your code
<attlasbot>
and then @s.should be_instance_of(Searcher)
mistermocha has quit [Ping timeout: 245 seconds]
<sevenseacat>
new will always return you an instance of the class you called new on
<weaksauce>
that will get implicitly tested because every other test depends on new working.
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
<attlasbot>
thank you!
Rickmasta has joined #ruby
<sevenseacat>
if youre doing things like setting values in the initialize method, that might be worth testing
<sevenseacat>
(note: might)
Soda has joined #ruby
Soda has quit [Remote host closed the connection]
icebourg has joined #ruby
mrmargolis has joined #ruby
FernandoBasso has quit [Quit: leaving]
barhum2013 has joined #ruby
barhum2013 has left #ruby [#ruby]
phutchins1 has quit [Ping timeout: 240 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
GriffinHeart has quit [Remote host closed the connection]
konsolebox has joined #ruby
GriffinHeart has joined #ruby
mistermocha has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
freerobby has joined #ruby
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
jack_rabbit_ has quit [Quit: Leaving]
jack_rabbit_ has joined #ruby
juanpablo____ has joined #ruby
barkerd427 is now known as zz_barkerd427
jack_rabbit_ has quit [Client Quit]
jack_rabbit has joined #ruby
Irfan_A has joined #ruby
jeromelanteri has joined #ruby
babykosh_ has joined #ruby
willharrison has quit [Ping timeout: 250 seconds]
endash has quit [Quit: endash]
juanpablo____ has quit [Ping timeout: 265 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
babykosh_ has quit [Read error: Connection reset by peer]
babykosh has quit [Ping timeout: 272 seconds]
G has quit [Remote host closed the connection]
<DynamicMetaFlow>
Hello, has anyone had any experience with bootcamps?
mistermocha has quit [Ping timeout: 256 seconds]
lidenskap has joined #ruby
oo_ has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
delianides has quit [Remote host closed the connection]
BTRE has joined #ruby
redlegion has quit [Read error: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac]
redlegion has joined #ruby
HTH_ has joined #ruby
<sevenseacat>
thankfully no
b4tm4n has quit [Quit: Leaving]
<havenwood>
DynamicMetaFlow: I know folk who have.
<havenwood>
DynamicMetaFlow: Considering it?
mistermocha has joined #ruby
<weaksauce>
I learned programming before the internet and before bootcamps
freerobby has quit [Quit: Leaving.]
<sevenseacat>
i learned programming when the internet was becoming big
<sevenseacat>
before bootcamps :P
gsd has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
redlegion has quit [Quit: Too function to stoned.]
dfinninger has joined #ruby
mistermo_ has joined #ruby
thatslifeson has joined #ruby
tyler617 has joined #ruby
mistermocha has quit [Ping timeout: 272 seconds]
parduse has joined #ruby
nobitanobi has joined #ruby
gusrub has quit [Quit: Leaving]
PhantomS_ has joined #ruby
thumpba has joined #ruby
PhantomSpank has quit [Ping timeout: 272 seconds]
oo_ has joined #ruby
harlen has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
claptor has joined #ruby
mrmargolis has quit []
millerti has joined #ruby
<that1guy>
Thankfully no?
<that1guy>
I'm considering a bootcamp, anyone want to expound on that?
gazay has joined #ruby
kwd has quit [Remote host closed the connection]
<sevenseacat>
i dont see the purpose. you spend a shitload of money for some intensive course, or you can just gather your own materials and do your own learning in your own time.
willharrison has joined #ruby
claptor has quit [Client Quit]
<that1guy>
My wife is working now, and I just quit my job to study full time. I've been gathering material and resources and trying problems but feel that I'm not making as much progress as I'd like. How would you suggest to structure the learning?
<pipework>
Some people like others to direct their learning and curate their experience.
DerisiveLogic has joined #ruby
dvlwrk has quit [Ping timeout: 256 seconds]
Eiam_ has joined #ruby
<pipework>
that1guy: generally, I'd suggest going through gettingstarted, maybe pick up r4ia, and then work on projects.
<havenwood>
that1guy: I haven't done the bootcamp route but I know a couple people who found it really rewarding. I actually don't know someone who's been burned by one so my feelings are pretty positive.
<sevenseacat>
its mainly the price and the speed of learning that bugs me. the quicker you shove this stuff down your throat, the less you're going to remember.
<sevenseacat>
the redis gem knows the method, but the redis server itself doesnt
<Eiam_>
okay.. so I guess im sending the wrong object the method
diegoviola has joined #ruby
<havenwood>
sevenseacat: It seems to me the more you were self-taught going in the more you could glean from it. I want to go to coding camp!! :)
ismaelga has joined #ruby
<havenwood>
I'm jealous.
<sevenseacat>
i didnt think they were aimed at people that already knew how to code.
<sevenseacat>
that makes even less sense to me.
<that1guy>
I'm pretty sold on going to app academy. I think the social aspect of it is going to help a lot. I wish I wasn't working on it alone all the time. I found an error that kept be back a few hours because of spelling.
jeromelanteri has quit [Ping timeout: 272 seconds]
nobitanobi has quit [Remote host closed the connection]
<sevenseacat>
that1guy: did you ask us about it and gist your code?
ramfjord has joined #ruby
<pipework>
Everything you really need to learn is free, but that might not translate to it being easy to learn from.
<Eiam_>
sevenseacat: i mean, "keys" is something you CAN tell redis server, so I'm not sure I follow
jack_rabbit has quit [Ping timeout: 240 seconds]
<havenwood>
pipework: So much code to read! We don't have to hunt down floppy drives or anything.
<havenwood>
sevenseacat: The ones that cater to folk who can already code tend not to charge.
nobitano_ has joined #ruby
parduse has quit []
<sevenseacat>
i see. maybe i have the wrong definition of bootcamp. i think of those 'we'll turn people from novice to ninja in six weeks if you give us 10k'
<sevenseacat>
ones
<havenwood>
sevenseacat: Like Recurse Center, they offer optional jobs at the end and somehow make a cut.
BTRE has quit [Quit: Leaving]
zz_barkerd427 is now known as barkerd427
<Eiam_>
k guess ill compile the redis-cli and just bypass ruby
<that1guy>
I usually use the channel called ##new2ruby and just monitor this channel because I feel in over my head here still.
almostworking has quit [Quit: Leaving]
<pipework>
havenwood: Probably recruiter bonus.
<that1guy>
I believe the recruiter bonus, app academy gets that on top of students paying.
BTRE has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
diegoaguilar has quit [Remote host closed the connection]
<havenwood>
that1guy: You can be anonymous if you'd like to be. I'm not with private info on my Githubs.
baweaver has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
moeabdol2 has quit [Ping timeout: 255 seconds]
PhantomSpank has joined #ruby
<that1guy>
Is that like a paid feature though? I don't remember seeing it around.
<havenwood>
that1guy: You can ask for a cloak in #freenode if you'd like to cloak your IP while they have SASL/TOR blocked.
casadei_ has joined #ruby
KramerC has quit [Ping timeout: 240 seconds]
braincras has joined #ruby
lidenskap has quit [Remote host closed the connection]
<havenwood>
that1guy: To be anonymous you don't post any personally identifying information and probably also connect via Tor's Tails and take other measures if you actually care.
workmad3 has quit [Ping timeout: 240 seconds]
<pipework>
sevenseacat: You're a shit person for having opinions that don't directly align with mine. Or was it that I'm the shit person? I can never recall.
<sevenseacat>
pipework: a little of column a, a little of column b :P
apurcell has quit [Quit: Be back later ...]
Jaood has joined #ruby
jalcine has quit [Client Quit]
<havenwood>
that1guy: A minority of folk operate solely under a nom de plume, and that's generally respected. But most just use real names.
sinkensabe has joined #ruby
juanpablo____ has joined #ruby
jalcine has joined #ruby
Jaood has left #ruby [#ruby]
jalcine has quit [Client Quit]
<havenwood>
Real name behind the nick.
jalcine has joined #ruby
<al2o3-cr>
peoples opinions please about constansts: DEFAULT or Default ?
<havenwood>
al2o3-cr: yes
<al2o3-cr>
which one?
<sevenseacat>
SCREAMING_SNAKE_CASE for constants IMO.
<sevenseacat>
thats the technical term.
<havenwood>
+1 SCREAMING_SNAKES
jgrevich has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
<havenwood>
just no headlessCamels
* havenwood
shudders
juanpablo____ has quit [Ping timeout: 240 seconds]
Hirzu has quit [Remote host closed the connection]
workmad3 has joined #ruby
SOLDIERz has joined #ruby
apurcell has quit [Ping timeout: 272 seconds]
amclain has quit [Quit: Leaving]
lotyrin has quit [Ping timeout: 256 seconds]
thatslifeson has quit [Remote host closed the connection]
lotyrin has joined #ruby
jeromelanteri has joined #ruby
vickleton has quit [Quit: Ex-Chat]
workmad3 has quit [Ping timeout: 252 seconds]
Matachines has joined #ruby
juanpablo____ has joined #ruby
oo_ has joined #ruby
andikr has joined #ruby
moeabdol2 has joined #ruby
fella5s has joined #ruby
djbkd has quit []
rippa has joined #ruby
juanpablo____ has quit [Ping timeout: 265 seconds]
babykosh has joined #ruby
babykosh has quit [Client Quit]
babykosh has joined #ruby
kwd has joined #ruby
ismaelga has quit [Ping timeout: 272 seconds]
rkazak has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
AlexRussia has joined #ruby
babykosh has quit [Client Quit]
baweaver has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
msgodf has joined #ruby
thumpba has quit [Remote host closed the connection]
Alina-malina has quit [Ping timeout: 264 seconds]
Alina-malina has joined #ruby
RegulationD has joined #ruby
exadeci has joined #ruby
ta has joined #ruby
gauke has joined #ruby
DynamicMetaFlow has joined #ruby
poguez_ has joined #ruby
Hirzu has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
sinkensabe has quit [Remote host closed the connection]
msgodf has quit [Ping timeout: 252 seconds]
astrobunny has quit [Remote host closed the connection]
arup_r has joined #ruby
roolo has joined #ruby
Matachines has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Spami has joined #ruby
alex88 has joined #ruby
cjim_ has quit [Quit: (null)]
troulouliou_dev has joined #ruby
hanmac has quit [Ping timeout: 256 seconds]
MatthewsFace[SEA has quit [Remote host closed the connection]
SuperTaz has quit [Ping timeout: 256 seconds]
Irfan_A has joined #ruby
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
sinkensabe has joined #ruby
diegoviola has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
terlar has joined #ruby
ismaelga has joined #ruby
msgodf has joined #ruby
casadei_ has joined #ruby
DynamicMetaFlow has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
selu has joined #ruby
sinkensabe has joined #ruby
sepp2k has joined #ruby
SuperTaz has joined #ruby
hanmac has joined #ruby
gazay has quit [Quit: gazay]
Hounddog has joined #ruby
casadei_ has quit [Ping timeout: 276 seconds]
sinkensabe has quit [Remote host closed the connection]
ShortCode has quit [Ping timeout: 276 seconds]
craigp has joined #ruby
<adaedra>
Hi
moeabdol2 has quit [Ping timeout: 265 seconds]
sinkensabe has joined #ruby
kenndel has joined #ruby
marr has joined #ruby
sandelius has joined #ruby
doertedev has joined #ruby
<flughafen>
hey adaedra
doertedev has quit [Client Quit]
hanmac1 has joined #ruby
kenndel has quit [Client Quit]
Irfan_A has left #ruby [#ruby]
sinkensabe has quit [Remote host closed the connection]
djbkd has joined #ruby
duncannz has quit [Ping timeout: 272 seconds]
TheHodge has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
djbkd has quit [Ping timeout: 256 seconds]
astrobunny has joined #ruby
neanderslob has joined #ruby
f3lp has joined #ruby
ismaelga has quit [Read error: Connection reset by peer]
doertedev has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
Zen-Zen has quit [Ping timeout: 264 seconds]
hmsimha has quit [Ping timeout: 256 seconds]
neanderslob has quit [Read error: Connection reset by peer]
craigp has quit [Ping timeout: 265 seconds]
livathinos has joined #ruby
kenndel has joined #ruby
sinkensabe has joined #ruby
Hirzu_ has joined #ruby
tesuji has joined #ruby
kyrylo has joined #ruby
fgo has quit [Ping timeout: 272 seconds]
joonty has joined #ruby
platzhirsch has left #ruby [#ruby]
Hirzu has quit [Ping timeout: 240 seconds]
PhantomSpank has quit [Remote host closed the connection]
CloCkWeRX1 has quit [Quit: Leaving.]
lidenskap has quit [Remote host closed the connection]
mrconfused has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: zzz]
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
ismaelga has joined #ruby
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
Pumukel has quit [Ping timeout: 265 seconds]
fgo has joined #ruby
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
mdw has joined #ruby
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
harlen has quit [Quit: Leaving.]
rkazak has quit [Quit: Sleep.....ing....]
yh has joined #ruby
granthatcher has joined #ruby
bigmac has joined #ruby
ralku has joined #ruby
ghr has joined #ruby
rdark has joined #ruby
lotyrin has quit [Quit: leaving]
ismaelga has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
PhantomSpank has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
PhantomS_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 264 seconds]
kenndel has quit [Quit: Leaving]
duckson has joined #ruby
PhantomSpank has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobunny has quit [Read error: Connection reset by peer]
astrobun_ has joined #ruby
craigp has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
vtunka has joined #ruby
PhantomSpank has joined #ruby
Pumukel has joined #ruby
GriffinHeart has joined #ruby
SOLDIERz has joined #ruby
huddy has joined #ruby
arup_r has quit [Remote host closed the connection]
PhantomSpank has quit [Read error: Connection reset by peer]
mtakkman has joined #ruby
PhantomSpank has joined #ruby
lloyd is now known as Lloyd
PhantomSpank has quit [Read error: Connection reset by peer]
lkba_ has quit [Ping timeout: 276 seconds]
PhantomSpank has joined #ruby
<certainty>
ok i don't understand the whitespace between method and black rule. The block lucks as if it didn't belong to the method. foo { something } ... even worse if you use the result of the block. foo { something }.something_else .. This looks as if the result of { something }.something_else is passed as an argument to foo
PhantomSpank has quit [Read error: Connection reset by peer]
duncannz has joined #ruby
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PhantomSpank has joined #ruby
workmad3 has joined #ruby
<certainty>
can someone please explain the rationale behind that rule?
<certainty>
also my typing is shit. black = block, lucks = looks
thatslifeson has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
edwinvdgraaf has joined #ruby
mtakkman has quit [Read error: Connection reset by peer]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
ralku is now known as ralku[away]
PhantomSpank has joined #ruby
PhantomS_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
thatslifeson has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
einarj has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
PhantomSpank has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
moeabdol2 has joined #ruby
juanpablo____ has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
PhantomS_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
moeabdol2 has quit [Ping timeout: 264 seconds]
juanpablo____ has quit [Ping timeout: 272 seconds]
toretore has joined #ruby
ki0 has joined #ruby
duncan_ has joined #ruby
craigp has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
craigp has joined #ruby
ralku[away] is now known as ralku
Deele has quit [Ping timeout: 256 seconds]
kaspernj has joined #ruby
colli5ion has joined #ruby
colli5ion has quit [Max SendQ exceeded]
craigp has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
colli5ion has joined #ruby
edwinvdgraaf has joined #ruby
craigp has joined #ruby
A205B064 has quit [Ping timeout: 255 seconds]
ismaelga has joined #ruby
quimrstorres has joined #ruby
leafybasil has quit [Remote host closed the connection]
quimrstorres has quit [Remote host closed the connection]
arup_r has joined #ruby
GriffinHeart has joined #ruby
arup_r has quit [Remote host closed the connection]
jph98 has joined #ruby
arup_r has joined #ruby
quimrstorres has joined #ruby
RegulationD has joined #ruby
Perdomo has joined #ruby
electriv has joined #ruby
scripore has joined #ruby
scripore has quit [Client Quit]
RegulationD has quit [Ping timeout: 244 seconds]
havenwood has quit [Ping timeout: 250 seconds]
TRManderson has joined #ruby
<TRManderson>
is there a rails-specific IRC channel?
charliesome has joined #ruby
<shevy>
yeah #rubyonrails
<TRManderson>
ty
mrconfused has joined #ruby
failshell has joined #ruby
<shevy>
you have to be registered with freenode perhaps
<shevy>
flughafen how are things in Berlin with you?
Perdomo has quit [Ping timeout: 256 seconds]
wolflee has quit [Remote host closed the connection]
wolflee has joined #ruby
duncannz has quit [Quit: Leaving]
lidenskap has joined #ruby
Cust0sL1men has joined #ruby
Guest49691 has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
failshell has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
Mohan has joined #ruby
Mohan is now known as Guest28649
yfeldblum has joined #ruby
DeBot has joined #ruby
astrobun_ has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
duncan_ has quit [Ping timeout: 245 seconds]
edwinvdgraaf has joined #ruby
lidenskap has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
DeBot has quit [Ping timeout: 272 seconds]
leafybasil has joined #ruby
gazay has joined #ruby
leafybasil has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
leafybasil has joined #ruby
ismaelga has quit [Remote host closed the connection]
timonv1 has joined #ruby
otisZart has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
sigurding has joined #ruby
workmad3 has joined #ruby
ralku is now known as ralku[away]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
PhantomSpank has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
GriffinHeart has quit [Remote host closed the connection]
ralku[away] is now known as ralku
glen has joined #ruby
<glen>
"3.14".to_f >= 3.5
<glen>
=> false
<glen>
why it's false?
<adaedra>
because 3.14 < 3.5
mengu__ has quit [Remote host closed the connection]
yfeldblum has quit [Read error: Connection reset by peer]
avril14th has quit [Remote host closed the connection]
djbkd has joined #ruby
yh has quit [Ping timeout: 276 seconds]
NinjaOps has joined #ruby
jhass has joined #ruby
haxrbyte has quit [Ping timeout: 276 seconds]
terlar has joined #ruby
mengu has joined #ruby
<hanmac1>
claw: hm are you sure its there? because it does works for me .-
<claw>
theres no need to require it for me
ralku[away] is now known as ralku
shortCircuit__ has joined #ruby
djbkd has quit [Ping timeout: 256 seconds]
<shortCircuit__>
I want to write a method that acts like rails's validate, I mean inside the method some actions will be executed if a condition passed like if: proc { 1 === 1 } is evaluated to true or false
mengu has quit [Ping timeout: 240 seconds]
jeromelanteri has joined #ruby
scripore has joined #ruby
jimms has quit [Remote host closed the connection]
rodfersou has joined #ruby
scripore has quit [Client Quit]
trouloulioud_dev has joined #ruby
ralku is now known as ralku[away]
troulouliou_dev has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
RegulationD has joined #ruby
fabrice31 has joined #ruby
mengu has joined #ruby
charliesome_ has quit [Ping timeout: 256 seconds]
turtil has quit [Ping timeout: 255 seconds]
mrconfused has quit [Read error: Connection timed out]
<jhass>
what are you stuck with?
RegulationD has quit [Ping timeout: 265 seconds]
mrconfused has joined #ruby
charliesome has quit [Ping timeout: 256 seconds]
leafybas_ has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
another_eddie has joined #ruby
sdothum has joined #ruby
moeabdol2 has joined #ruby
charliesome has joined #ruby
lidenskap has joined #ruby
ahmetkapikiran has joined #ruby
delianides has joined #ruby
another_eddie has quit []
mathie has quit [Quit: Quitting...]
ralku[away] is now known as ralku
emilkarl has joined #ruby
mathie has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
moeabdol2 has quit [Ping timeout: 264 seconds]
lidenskap has quit [Ping timeout: 272 seconds]
ndrei has joined #ruby
avril14th has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
ralku has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest28649 has quit [Ping timeout: 276 seconds]
Mohan__ has joined #ruby
haxrbyte has joined #ruby
<certainty>
hmm i don't know what i did, but somehow emacs tried to ping the domain under point
<apeiros>
mikecmpbll: not really. but it's your code.
codecop has quit [Remote host closed the connection]
<mikecmpbll>
not really what?
phutchins1 has joined #ruby
kblake has joined #ruby
<apeiros>
as said, Array.wrap uses to_ary. it doesn't care whether the value is an array or not. only whether it responds to to_ary.
<mikecmpbll>
are you saying that the behaviour i described is wrong?
mary5030 has joined #ruby
<mikecmpbll>
don't really know what point you're making
doodlehaus has joined #ruby
bigmac has joined #ruby
<apeiros>
you say, and I paraphrase: "I get either an array or not an array and I want to turn not-arrays into single element arrays". and I say Array.wrap is not the right tool for that.
<apeiros>
since "is Array" and "responds to_ary" is not the same.
<apeiros>
same for [obj].flatten. which is even worse. but as said, it's your code.
juanpablo____ has quit [Ping timeout: 244 seconds]
Deele has joined #ruby
sameerynho has quit [Quit: Leaving]
<apeiros>
and as you found out yourself, Array() isn't the right tool either.
* al2o3-cr
hides under cover
<mikecmpbll>
apeiros: can you provide an example where Array.wrap doesn't meet that criteria?
<mikecmpbll>
that's where i'm struggling to understand you.
<apeiros>
mikecmpbll: any object which responds to to_ary but isn't an array. isn't that obvious?
twistedpixels is now known as zz_twistedpixels
ndrei has quit [Ping timeout: 256 seconds]
freerobby has joined #ruby
<apeiros>
15:24 apeiros: since "is Array" and "responds to_ary" is not the same.
<apeiros>
don't know how to say it any more clear than this.
* avril14th
understood why ruby segfaults and jumps out the window
thiagovsk has joined #ruby
Rickmasta has joined #ruby
iasoon has joined #ruby
nettoweb has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
DexterLB has quit [Read error: Connection reset by peer]
nettoweb has quit [Max SendQ exceeded]
emilkarl has joined #ruby
jph98 has quit [Quit: jph98]
<mikecmpbll>
apeiros: i never explicitly said those were my requirements, that's probably the confusion
<mikecmpbll>
you've extrapolated on them somewhat and gave me the impression that the Array.wrap wasn't suitable for my needs. but interesting none-the-less, thanks :)
DexterLB has joined #ruby
jph98 has joined #ruby
<apeiros>
*shrug* as said, it's your code.
redjack1964 has joined #ruby
ndrei has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
<mikecmpbll>
haha, yet another implication that this is a bad way to do it
<mwlang>
are there any gems out there that would allow me to log into my bank and collect balance and account activity? I’m thinking to aggregate my view on all my accounts….something like what https://www.futureadvisor.com does.
shellfu_afk is now known as shellfu
<avril14th>
mwlang: that's their core business, I don't think you have a gem for it
<avril14th>
but if you do find one, let me know :)
<apeiros>
mikecmpbll: no. it is your code. this means you have to know what you need and what satisfies your needs. nothing more, nothing less.
<apeiros>
no implications. I've been, and try to be, explicit about what I think and what means what.
allcentury has joined #ruby
RegulationD has joined #ruby
endash has joined #ruby
<mwlang>
avril14th: I would think their core business is offering financial advice and ability to log into any bank/service is secondary.
nettoweb has joined #ruby
<avril14th>
well, in Europe people start business with core business as "I can log into your bank". Don't know about elsewehere
gsd has joined #ruby
jph98 has quit [Quit: jph98]
AlphaAtom has joined #ruby
<apeiros>
mwlang: there are some banking format standards. not sure whether there are also API standards. but it almost certainly depends on your specific bank whether and what it supports
AlphaAtom has quit [Max SendQ exceeded]
jenrzzz has joined #ruby
<mwlang>
avril14th: it’s akin to shopify being able to connect to any merchant with active_merchant. they can do it, but it’s not their “core business”
<toretore>
most banking apis consist of manually logging in and downloading an excel file
AlphaAtom has quit [Max SendQ exceeded]
Hirzu has quit [Read error: Connection reset by peer]
<apeiros>
that'd somewhat defy the name "API"
pushpak has joined #ruby
<mwlang>
apeiros: yeah, it’s the figuring out what those standards are. with capitalone360.com, it’s easy because they make it accessible (i.e. documented where I can find it). The other banks I have accounts at are not so transparent, but they seem to be using the same 3rd party provider behind the scenes (with a domain cname masking that).
<toretore>
considering that banks usually require 2f auth, integrating that with an api sounds painful
AlphaAtom has joined #ruby
<toretore>
aka i wouldn't want to be a developer at a bank
RegulationD has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
<apeiros>
seems hbci is only for germany
<apeiros>
that's the only standard for more than just format I knew about
AlphaAtom has quit [Max SendQ exceeded]
<ddv>
lots of banks still use cobol
<apeiros>
banks and IT is a mess from my experience.
zenguy_pc has joined #ruby
<mwlang>
2f login means password + mobile confirm or dongle generating a key, right?
<ddv>
aka the best language ever
<toretore>
usually
Python_Core_JP has quit [Ping timeout: 246 seconds]
<mwlang>
I don’t consider the picture + password as 2f.
AlphaAtom has joined #ruby
<apeiros>
mwlang: it isn't
dblessing has joined #ruby
denver has joined #ruby
<mwlang>
ddv: surely ye jest!? Fortran is the best language ever!
<apeiros>
unless I misunderstand "the picture" - you mean a captcha?
Leef_ has joined #ruby
<toretore>
he uploads a picture of himself to prove that it's really him
<toretore>
biometric
granthatcher has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
lidenskap has joined #ruby
Akagi201_ has joined #ruby
<apeiros>
toretore: you know what's sad? I'm not even sure whether you're kidding…
<mwlang>
apeiros: no, that silly picture they display and say, “type your password only if you recognize your picture”
<apeiros>
mwlang: that might be an anti-phishing measure. but not 2f
<mwlang>
basically the thing that’s supposed to prevent phishing
sevenseacat has joined #ruby
<mwlang>
apeiros: it was toretore that mentioned 2f login — your interpretation is same as mine, it seems.
krz has quit [Ping timeout: 256 seconds]
DexterLB has quit [Read error: Connection reset by peer]
<toretore>
apeiros: with today's paper obviously, then it gets sent to a bunch of people who manually inspect it and click approve/disprove
<apeiros>
that sounds actually like a good idea. wouldn't work against MITM, but phishing with non-dimwits? probably.
thatslifeson has joined #ruby
<apeiros>
toretore: you know, I still could imagine a bank actually doing that…
<toretore>
lol
Akagi201 has quit [Ping timeout: 244 seconds]
<toretore>
i laugh, but inside i cry :(
<apeiros>
I said it's sad.
mattp has quit [Disconnected by services]
mattp_ has joined #ruby
zenguy_pc has joined #ruby
tus has joined #ruby
blueOxigen has quit [Ping timeout: 256 seconds]
scripore has quit [Quit: This computer has gone to sleep]
lidenskap has quit [Ping timeout: 276 seconds]
scripore has joined #ruby
thatslifeson has quit [Ping timeout: 240 seconds]
DexterLB has joined #ruby
scripore has quit [Client Quit]
michael_mbp has quit [Excess Flood]
<mwlang>
I’ll tell you what’s sad…when you move across the country and set up a utility account and to prove that you’re who you really are before the account is created and before you give your SSN for “verification” the system is able to ask you about the last 5 addresses you lived at, the first name of your brother (pick from a list of names) and what is your mortgage amount from a loan you had 15 years ago. Then and only then does the
<mwlang>
system say, “ok, I believe you, gimme your ssn so we can do a credit check to determine if a security deposit is required."
edwinvdg_ has quit [Remote host closed the connection]
bluOxigen has joined #ruby
startupality has quit [Quit: startupality]
Igorshp has quit [Remote host closed the connection]
<c0def00d>
Imagine I’m using Rake as a means to automate certain operations in non-ruby projects, how would you go around sharing the evolutions of that Rakefile between projects? I tried creating a gem and requiring it with bundler, but can’t figure out how to have rake detect it automatically…
mengu has quit [Remote host closed the connection]
antgel has joined #ruby
tvw has joined #ruby
akkad has quit [Excess Flood]
krz has quit [Quit: WeeChat 1.0.1]
Igorshp has joined #ruby
jobewan has quit [Quit: leaving]
PhantomSpank has quit [Read error: Connection reset by peer]
jobewan has joined #ruby
PhantomSpank has joined #ruby
riotjones has quit [Ping timeout: 264 seconds]
nobitanobi has joined #ruby
charliesome has quit [Quit: zzz]
dfinninger has joined #ruby
pdoherty has joined #ruby
uri_ has joined #ruby
akkad has joined #ruby
banister has joined #ruby
willharrison has joined #ruby
<alex88>
having a process that imports some data into an in-memory sqlite database, is it possible, at the end of the import, to run an sql shell in-process so I can use the memory database?
snath has joined #ruby
<adaedra>
you can just read commands and execute them
Channel6 has joined #ruby
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
ixti has joined #ruby
<alex88>
adaedra: ok so I've to do the reading the executing/output by myself
<alex88>
thanks
emilkarl has quit [Quit: emilkarl]
_ixti_ has quit [Read error: Connection reset by peer]
<adaedra>
I'm not sure if there's no other way, but that's what I'd probably do
jobewan has quit [Quit: leaving]
jobewan has joined #ruby
Eiam_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
almostworking has left #ruby ["Leaving"]
jobewan has quit [Client Quit]
charliesome has joined #ruby
sinkensabe has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
PhantomSpank has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
PhantomSpank has joined #ruby
tectonic has joined #ruby
disgrntld has joined #ruby
coderhs has joined #ruby
gagrio_ has quit [Ping timeout: 240 seconds]
nobitanobi has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 240 seconds]
jobewan has joined #ruby
antgel has joined #ruby
huddy has quit [Quit: Connection closed for inactivity]
hsps_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
sinkensabe has quit [Ping timeout: 252 seconds]
wpp has quit [Quit: ZZZzzz…]
coderhs has quit [Ping timeout: 264 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ndrei has quit [Ping timeout: 256 seconds]
premera has quit [Ping timeout: 256 seconds]
rahult has quit [Read error: Connection reset by peer]
rahult has joined #ruby
Papierkorb_ has joined #ruby
jobewan has quit [Quit: leaving]
St1gma has quit [Remote host closed the connection]
swgillespie has joined #ruby
failshell has quit [Remote host closed the connection]
dblessing has joined #ruby
Papierkorb has quit [Ping timeout: 264 seconds]
ascarter has joined #ruby
gauke has quit [Quit: gauke]
hsps_ has quit [Ping timeout: 244 seconds]
ascarter has quit [Max SendQ exceeded]
jordanm has joined #ruby
Pumukel has quit [Remote host closed the connection]
Papierkorb has joined #ruby
quimrstorres has joined #ruby
jobewan has joined #ruby
ascarter has joined #ruby
Igorshp has quit [Remote host closed the connection]
hsps_ has joined #ruby
rahult has quit [Ping timeout: 272 seconds]
jobewan has quit [Client Quit]
swgillespie has quit [Client Quit]
ascarter has quit [Max SendQ exceeded]
jobewan has joined #ruby
failshell has joined #ruby
failshell has quit [Remote host closed the connection]
failshell has joined #ruby
ascarter has joined #ruby
Papierkorb_ has quit [Ping timeout: 265 seconds]
jobewan has quit [Client Quit]
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
c0def00d has quit [Quit: c0def00d]
PhantomSpank has quit [Read error: Connection reset by peer]
Papierkorb has quit [Ping timeout: 246 seconds]
sigurding has quit [Quit: sigurding]
PhantomSpank has joined #ruby
rippa has joined #ruby
ascarter has quit [Max SendQ exceeded]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
Spami has joined #ruby
hanmac1 has quit [Quit: Leaving.]
ascarter has joined #ruby
<adaedra>
Mmmmh, using opal makes me downgrade sprockets and tilt to old versions
rdark has quit [Quit: leaving]
rahult has joined #ruby
quimrstorres has quit [Ping timeout: 276 seconds]
ascarter has quit [Max SendQ exceeded]
jottr_ has joined #ruby
rgb-one has joined #ruby
ki0_ has joined #ruby
laurentide has quit [Quit: Leaving]
jottr has quit [Ping timeout: 276 seconds]
ascarter has joined #ruby
GaryOak_ has joined #ruby
Papierkorb has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
Igorshp has joined #ruby
ascarter has quit [Max SendQ exceeded]
edwinvdgraaf has joined #ruby
ascarter has joined #ruby
<mwlang>
alex88: use pry-debugger and call binding.pry at the point you want to stop executation and get a console to work with: https://github.com/nixme/pry-debugger
rahult is now known as rahult_
quimrstorres has joined #ruby
ki0 has quit [Ping timeout: 245 seconds]
rahult_ is now known as rahult
jenrzzz has joined #ruby
Dopagod has joined #ruby
ascarter has quit [Max SendQ exceeded]
<alex88>
mwlang: awesome! thanks a lot!
Guest1421 has joined #ruby
ascarter has joined #ruby
ki0_ has quit [Ping timeout: 246 seconds]
edwinvdg_ has joined #ruby
failshell has quit [Remote host closed the connection]
ascarter has quit [Max SendQ exceeded]
lidenskap has joined #ruby
ascarter has joined #ruby
ascarter has quit [Max SendQ exceeded]
Papierkorb has quit [Ping timeout: 246 seconds]
rahult has quit [Ping timeout: 256 seconds]
lidenskap has quit [Remote host closed the connection]
ascarter has joined #ruby
edwinvdgraaf has quit [Ping timeout: 255 seconds]
lidenskap has joined #ruby
startupality has quit [Quit: startupality]
ascarter has quit [Max SendQ exceeded]
delianides has quit [Remote host closed the connection]
that1guy has joined #ruby
ascarter has joined #ruby
him has joined #ruby
delianides has joined #ruby
ascarter has quit [Max SendQ exceeded]
tectonic has quit []
zz_twistedpixels is now known as twistedpixels
ascarter has joined #ruby
Akagi201_ has quit [Remote host closed the connection]
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
moted has joined #ruby
rahult has joined #ruby
ascarter has quit [Max SendQ exceeded]
rhllor has joined #ruby
DEA7TH has quit [Remote host closed the connection]
adac has joined #ruby
Astrologos_ has joined #ruby
ascarter has joined #ruby
<adac>
what is the best way to transform a date like 07.05.2015 to 2015-05-07 ?
casadei_ has joined #ruby
ascarter has quit [Max SendQ exceeded]
moeabdol has quit [Read error: Connection reset by peer]
lidenskap has quit [Remote host closed the connection]
hutch78 has joined #ruby
hexhaxtron has joined #ruby
Zen-Zen has joined #ruby
<hexhaxtron>
I'm having problems in running msfupdate and I read that doing 'rvm use 1.9.2' but I get this error: RVM is not a function, selecting rubies with 'rvm use ...' will not work.
jerius has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
<hexhaxtron>
What should I do?
<hexhaxtron>
*that doing ... would fix it
ascarter has joined #ruby
ascarter has quit [Read error: Connection reset by peer]
<havenwood>
hexhaxtron: source ~/.rvm/scripts/rvm
mikecmpbll has quit [Ping timeout: 256 seconds]
ki0 has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
hobodave has joined #ruby
<hexhaxtron>
havenwood, I get the same problem...
haxrbyte has quit [Remote host closed the connection]
<havenwood>
hexhaxtron: Using gnome terminal or a non-login shell?
haxrbyte has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
gauke has quit [Quit: gauke]
tcrypt has joined #ruby
<hexhaxtron>
havenwood, I'm using XFCE terminal.
haxrbyte has joined #ruby
<hexhaxtron>
havenwood, by the way, msfupdate is ran as root.
<havenwood>
hexhaxtron: Gist?: rvm info
Hirzu has joined #ruby
ki0 has quit [Ping timeout: 256 seconds]
JoshGlzBrk has joined #ruby
<havenwood>
hexhaxtron: I suspect you just need to: "Run command as login shell"
<hexhaxtron>
havenwood, I did that "Run command as login shell' then I opened a new tab and did source /root/.rvm/script/rvm and then rvm use 1.9.2 and I get the same error, is not a function...
<havenwood>
hexhaxtron: Ah, yeah another issue is that you have a multi-user install in /usr/local instead of the recommended single user install in the user home dir.
einarj has joined #ruby
<havenwood>
hexhaxtron: Install RVM without sudo and as a non-root user for a single user install.
<hexhaxtron>
havenwood, but I think I need to run it as root because msfupdate needs root.
<havenwood>
hexhaxtron: You can run commands with escalated privileges even using a single user install. RVM even has a `rvmsudo` script to keep the env vars around so things work when you rvmsudo.
<hexhaxtron>
Like this? rvmsudo rvm use 1.9.2
Hounddog has quit [Read error: Connection reset by peer]
<havenwood>
hexhaxtron: 1.9 is past end of life. Use Ruby 2.2.
einarj has quit [Read error: Connection reset by peer]
<havenwood>
hexhaxtron: No, you don't need to sudo to change rubies.
dfinninger has quit [Remote host closed the connection]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
einarj has joined #ruby
<havenwood>
hexhaxtron: Like if you wanted to run on port 80: rvmsudo ruby -run -ehttpd .
marr has quit [Ping timeout: 276 seconds]
<hexhaxtron>
havenwood, can you see that link?
<havenwood>
I can.
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
antgel has quit [Ping timeout: 246 seconds]
poguez_ has joined #ruby
leafybasil has quit [Ping timeout: 244 seconds]
ghr has quit [Ping timeout: 255 seconds]
wildroman2 has joined #ruby
redjack1964 has quit [Quit: Konversation terminated!]
<havenwood>
hexhaxtron: So someone a couple years ago was using an old Ruby?
dorei has joined #ruby
<hexhaxtron>
I don't know how to fix it now-a-days.
<havenwood>
hexhaxtron: Fix what?
rocknrollmarc has joined #ruby
<hexhaxtron>
msfupdate
Astrologos_ has quit [Ping timeout: 244 seconds]
fgo has quit [Quit: WeeChat 1.1.1]
c0def00d has quit [Quit: c0def00d]
wildroman2 has quit [Read error: No route to host]
baweaver has quit [Remote host closed the connection]
jenrzzz has joined #ruby
bruno- has joined #ruby
Akagi201 has joined #ruby
JDiPierro has joined #ruby
hutch78 has quit [Quit: hutch78]
vikaton has joined #ruby
ramfjord has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
towski_ has joined #ruby
quimrstorres has quit [Remote host closed the connection]
bootstrappm has joined #ruby
<havenwood>
hexhaxtron: There is #rvm if you're still having RVM trouble after following single user installation instructions. And for Metasploit-specific stuff there is #metasploit.
<havenwood>
hexhaxtron: It seems that Metasploit tests on TravisCI against Ruby 2.1, but ask what Ruby to use in #metasploit. Don't use Ruby 1.9 or earlier though, they're past end-of-life.
davedev24_ has quit [Ping timeout: 256 seconds]
wallerdev has joined #ruby
Hobogrammer has quit [Ping timeout: 256 seconds]
jottr_ has quit [Ping timeout: 255 seconds]
ki0 has quit [Remote host closed the connection]
vickleton has joined #ruby
ki0 has joined #ruby
lidenskap has joined #ruby
agarie has quit []
shadeslayer has quit [Ping timeout: 245 seconds]
mtakkman has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
shadeslayer has joined #ruby
ki0 has quit [Ping timeout: 256 seconds]
yalue has joined #ruby
jobewan has joined #ruby
Hirzu has quit [Remote host closed the connection]
mrsolo has joined #ruby
moeabdol has joined #ruby
mrsolo has left #ruby [#ruby]
jobewan has quit [Client Quit]
Hijiri has quit [Quit: WeeChat 1.0.1]
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
noname has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 256 seconds]
bruno- has quit [Read error: No route to host]
<ght>
Question: I'm am using RestClient to access API resources that utilize OAuth2, and I've successfully pulled and stored an OAuth2 bearer token, but I can't seem to pass that bearer token for further RestClient statements.
jobewan has joined #ruby
Igorshp has quit [Remote host closed the connection]
<ght>
Does anyone have an example of a RestClient get statement for any resource that uses OAuth v2 and passes a bearer token?
thumpba has joined #ruby
<ght>
The syntax is supposed to include the Authoriziation parameter. The curl equivalent is: -H "Authorization: Bearer <Bearer-Token>"
noname has joined #ruby
him has quit [Quit: Leaving]
ismaelga has quit [Remote host closed the connection]
jobewan has quit [Client Quit]
qwertme has joined #ruby
jobewan has joined #ruby
towski_ has quit [Remote host closed the connection]
thumpba has quit [Read error: Connection reset by peer]
Papierkorb has joined #ruby
thumpba has joined #ruby
merqlove has joined #ruby
thumpba_ has joined #ruby
jobewan has quit [Client Quit]
<xxneolithicxx>
most rest clients will let you add a headers hash so thats where you should put that
jobewan has joined #ruby
<ght>
Never mind, got it.
<ght>
Thank you.
allcentury has joined #ruby
<mwlang>
so mechanize doesn’t support javascript, right?
jobewan has quit [Client Quit]
<mwlang>
just making sure that’s for the ruby mechanize and not the python/perl mechanize
nobitanobi has quit [Read error: Connection reset by peer]
jobewan has joined #ruby
jobewan has quit [Client Quit]
<umgrosscol>
mwlang: I thought you could pipe it into something like phantomjs
nobitanobi has joined #ruby
<mwlang>
I got three pages into logging into my bank using mechanize then hit a wall with “Javascript must be enabled for you to log in"
thumpba has quit [Ping timeout: 256 seconds]
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
jobewan has joined #ruby
<mwlang>
umgrosscol: I was actually starting to hunt down more info on phantomjs and figuring out how I might use that outside a testing environment.
uri__ has joined #ruby
uri_ has quit [Read error: Connection reset by peer]
jobewan has quit [Client Quit]
<GaryOak_>
mwlang: I've used phantomjs to do some webscraping
jobewan has joined #ruby
fumduq has quit [Quit: die()]
longfeet has joined #ruby
Lloyd is now known as lloyd
tuelz has joined #ruby
gsd has joined #ruby
moeabdol has quit [Ping timeout: 246 seconds]
fabrice31 has joined #ruby
jottr_ has joined #ruby
lidenskap has quit [Remote host closed the connection]
<mwlang>
GaryOak_: looks like I’m going to have to write some js to drive the webscraping rather than ruby.
uri__ has quit [Client Quit]
<GaryOak_>
mwlang: you can use selenium to drive phantomjs at a high level
fumduq has joined #ruby
<umgrosscol>
I don't recall having to write any js to do my webscraping in ruby, but I'd have to check back on how that was done.
<mwlang>
GaryOak_: hmmmm…I’d like to avoid this issue if possible: “The obvious downside to Selenium is that it requires a full graphical desktop for any and all tests.”
gaboesquivel has quit [Ping timeout: 245 seconds]
<GaryOak_>
sure, but it's super easy to just say webdriver.Firefox and then webdriver.PhantomJS
<mwlang>
as far as I know, I don’t actually *need* to do anything with JS…I just need to tell the website I’m visiting that I’m Javascript enabled.
<bricker>
mwlang: it doesn't, really
<umgrosscol>
mwlang: Found it. Watir
<mwlang>
ah…watir — haven’t seen that one since 2007ish
<bricker>
I run thousands of selenium tests every day headlessly on an ubuntu server
<tuelz>
sounds awful
<GaryOak_>
hahaha
<umgrosscol>
Yeah. It looks like I just got the resulting DOMs and then murdered them apart with nokogiri
<bricker>
tuelz: it is :)
<GaryOak_>
bricker: are you using Selenium grid?
<bricker>
GaryOak_: I don't know what that is, so I guess not
mtakkman has quit [Ping timeout: 265 seconds]
<GaryOak_>
bricker: oh it just makes a Webdriver pool basically
<mwlang>
bricker: I see further down the page that selinium can drive phantomjs just like it does for browsers.
blueOxigen has joined #ruby
<mwlang>
so I guess that just getting selenium set up to use phantomjs is my ticket.
<bricker>
mwlang: yes, phantomjs works pretty well and is relatively fast (relative to booting up firefox, that is)
bluOxigen has quit [Ping timeout: 256 seconds]
MatthewsFace[SEA has joined #ruby
iamninja has joined #ruby
<tuelz>
I don't believe in testing views, mostly because it's slow and painful to upkeep, but also because I'll always have to visually QA anyways so I don't bother writing tests
<bricker>
Your opinion has been noted.
<tuelz>
#feelingvalidated
<workmad3>
(and ignored ;) )
<bricker>
hehe
browncow has joined #ruby
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3>
tuelz: as you can then tie it in and have automation telling you that the views haven't changed :)
nahtnam has quit [Quit: Connection closed for inactivity]
j_mcnally has joined #ruby
<bricker>
cool
ramfjord has joined #ruby
parduse has quit [Ping timeout: 256 seconds]
ki0 has joined #ruby
lavros has quit [Quit: leaving]
parduse has joined #ruby
towski_ has joined #ruby
einarj_ has joined #ruby
einarj has quit [Read error: Connection reset by peer]
allcentury has quit [Ping timeout: 244 seconds]
griffindy has joined #ruby
postmodern has joined #ruby
sargas has joined #ruby
gauke has joined #ruby
rbennacer has joined #ruby
<tuelz>
that does look nice workmad3
<tuelz>
that's a view test I could actually trust.
browncow has quit [Quit: leaving]
yfeldblum has joined #ruby
DEA7TH_ has joined #ruby
<mwlang>
bricker: I have it installed and I can hit the first page, but how would I step through multiple pages, collecting cookies and the likes a mechanize does?
<workmad3>
tuelz: personally, I do 'view testing' in the form of 'does the important information actually get spat out onto the page somewhere?' rather than doing fragile structural tests against the HTML :)
metalic has quit [Ping timeout: 272 seconds]
<bricker>
mwlang: click links
moeabdol has joined #ruby
hutch78 has joined #ruby
<workmad3>
tuelz: it still needs manual checking for the style side, but it gives at least a safety net when developing that the view is at least displaying the correct stuff
xcyclist has joined #ruby
colli5ion has quit []
leafybasil has joined #ruby
doertedev has quit [Quit: Lost terminal]
<xcyclist>
My gemfile update seems to be not doing anything. How can I make sure the gems get updated completely from the gem file, or that my Gemfile.lock is properly updated?
einarj has joined #ruby
einarj_ has quit [Read error: Connection reset by peer]
aldarsior has joined #ruby
rocknrollmarc has quit [Ping timeout: 272 seconds]
RegulationD has quit []
dfinninger has joined #ruby
mikecmpbll has joined #ruby
moeabdol has quit [Ping timeout: 255 seconds]
leafybasil has quit [Ping timeout: 246 seconds]
BTRE has joined #ruby
jobewan has quit [Quit: leaving]
jobewan has joined #ruby
denver has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 244 seconds]
diegoaguilar has quit [Remote host closed the connection]
ta has joined #ruby
that1guy has joined #ruby
Guest1421 has quit [Ping timeout: 265 seconds]
Guest1421 has joined #ruby
thatslifeson has joined #ruby
<tuelz>
xcyclist: trying to update everything?
iasoon has quit [Ping timeout: 256 seconds]
<tuelz>
if so I believe you can just delete the gemfile.lock and update
<tuelz>
sounds dangerous though, I'd recommend updating one at a time
Hirzu has joined #ruby
robertodecurnex has joined #ruby
balazs_ has joined #ruby
DeBot has quit [Remote host closed the connection]
<havenwood>
xcyclist: You can always rename or move your Gemfile.lock for safe keeping and rebuild it with a fresh: bundle
jhass has quit [Quit: Bye]
<xcyclist>
Ok. Sorry.
DEA7TH_ has quit [Changing host]
DEA7TH_ has joined #ruby
<xcyclist>
Does the bundle run also compile my coffeescript and scss files?
<havenwood>
nope
<havenwood>
a rake task for that, no?
sohrab has joined #ruby
shazaum has joined #ruby
shazaum has quit [Changing host]
gaboesqu_ has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
<havenwood>
xcyclist: What kind of app do you have?
<xcyclist>
Thank you havenwood.
<havenwood>
yw
ShortCode has joined #ruby
<xcyclist>
It is something supporting a company specific gitlab installation / site.
mistermocha has quit [Read error: Connection reset by peer]
Hirzu has quit [Remote host closed the connection]
<havenwood>
xcyclist: Ah, so Rails. If you run into Rails questions, #RubyOnRails is the Rails channel.
<pontiki>
hi
balazs_ has quit [Remote host closed the connection]
<shevy>
hey pontikers
hutch78 has quit [Quit: hutch78]
Mohan_ has quit [Ping timeout: 264 seconds]
<xcyclist>
Ok. I didn't go there today because nobody ever responded yesterday when I was there.
<xcyclist>
I'll try again.
baweaver has joined #ruby
bmurt has quit [Ping timeout: 256 seconds]
jhass has joined #ruby
<xcyclist>
Sorry. Looks like people are there today. Perhaps it was my problem anyway.
<havenwood>
xcyclist: Maybe you tried #rails, dunno?
Mohan has joined #ruby
<xcyclist>
I bet I just got disconnected and didn't realize it.
Mohan is now known as Guest70261
<havenwood>
xcyclist: Or were muted? Check the channel join message.
<pontiki>
also, in #rubyonrails, you have to be registered and identified to nickserv in order to talk
<xcyclist>
I have never heard of that.
jhass has quit [Excess Flood]
jhass has joined #ruby
<havenwood>
xcyclist: When you join the channel, the message says: "-ChanServ-Register with nickserv in order to talk: /msg nickserv help"
<shevy>
xcyclist yeah some channels here require registration; we here on #ruby don't! \o/
xcesariox has joined #ruby
bmurt has joined #ruby
djbkd has quit [Quit: My people need me...]
<shevy>
I mean, *some channels on freenode
baweaver has quit [Ping timeout: 255 seconds]
<shevy>
#python too
unreal_ is now known as unreal
<GaryOak_>
python! yeah!
chinmay_dd has quit [Quit: Leaving]
<xcyclist>
I am registered as xcyclist. I am logged in as nickserv user.
<shevy>
\o/
<mwlang>
with selenium, how do I select a link inside a form that doesn’t have an id or name? I can get a handle on the form, but not the link… what I want: pseudo_code => password_form = connection.find_element(id: “passwordForm”); password_form.links.first
baweaver has joined #ruby
snockerton has quit [Quit: Leaving.]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mwlang>
GaryOak_: I haven’t done a lot of xpath… copying “unique descriptor” from firebug says the button can be selected with “.bluebutton > a:nth-child(1)”
jhass has quit [Ping timeout: 272 seconds]
yh has quit [Ping timeout: 245 seconds]
MatthewsFace[SEA has quit [Remote host closed the connection]
<mwlang>
how do I turn that into an xpath selector?
nobitanobi has quit [Remote host closed the connection]
lidenskap has joined #ruby
snockerton has joined #ruby
davedev2_ has quit []
MatthewsFace[SEA has joined #ruby
nobitanobi has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
jackjackdripper has joined #ruby
maasha has joined #ruby
jhass has joined #ruby
DeBot has joined #ruby
<mwlang>
wowee…I am actually able to drive all the way to my bank account page.
<shevy>
is there a simple way to reposition a class from one module-namespace, into top module space, without include-ing that module? so
<mwlang>
its a little slow though…not sure if that’s selenium’s fault or the capitalone360.com site’s fault.
<shevy>
module Foo; class Bar ... to become Bar, without include on Foo. I wanna steal the class
allcentury has joined #ruby
<maasha>
I have an assertion that checks that the number forked process in my script is less than Parallell.processor_count
<maasha>
Now, processor_count returns the core count of the current node (28), but I am on machine here with 15000 cores. Somehow I should detect if the script is called through qsub?
<GaryOak_>
mwlang: I think it also speeds stuff up if you disable images and css from loading
Guest70261 has quit [Ping timeout: 264 seconds]
ta has quit [Remote host closed the connection]
tuelz has quit [Ping timeout: 256 seconds]
Mohan_ has joined #ruby
parduse has quit []
<wasamasa>
maasha: where do you get access to such machines
<wasamasa>
guess I shouldn't have went for a crappy college
sevvie has joined #ruby
<ebonics>
is there another way to define at_exit besides.. at_exit
<ebonics>
there's some random ruby library i'm using and it's override the exit function. but grepping for at_exit doesn't return any results
<GaryOak_>
wasamasa: yeah we had cheap ps3 clusters lol
sargas has quit [Quit: This computer has gone to sleep]
flughafen has joined #ruby
<mwlang>
GaryOak_: good idea. I think I’ll try that once I stop taking screenshots as I move along the chain of pages and actually have it functioning like I want it.
<maasha>
So any ideas to detect from Ruby if you are running in a queue system?
thatslifeson has quit [Remote host closed the connection]
turtil-kun has joined #ruby
bruno- has joined #ruby
<ebonics>
havenwood, im trying to just call exit(1)
<havenwood>
ebonics: abort
bluOxigen has joined #ruby
kohvihoor has joined #ruby
turtil-kun has quit [Client Quit]
swgillespie has joined #ruby
jobewan has quit [Quit: Leaving]
turtil has joined #ruby
jobewan has joined #ruby
<havenwood>
ebonics: Kernel.abort is effectively Kernel.exit(false)
sargas has joined #ruby
Mohan_ has joined #ruby
blueOxigen has quit [Ping timeout: 276 seconds]
lidenskap has quit [Remote host closed the connection]
thebastl has quit [Quit: Leaving...]
choke|work has joined #ruby
moeabdol has joined #ruby
insidious has joined #ruby
<ebonics>
havenwood, i need to be able to have multiple exit codes though
<havenwood>
ebonics: Does `Kernel.exit` work?
thatslifeson has joined #ruby
yfeldblum has joined #ruby
<havenwood>
warn 'Error: run for the hills!'; Kernel.exit 911 # 143
<ebonics>
havenwood, it does if i override it
<ebonics>
with Kernel.exit!(1)
<ebonics>
if i just do Kernel.exit(1) it doesn't work
Rollabunna has quit [Remote host closed the connection]
<havenwood>
ebonics: Why are you calling exit!?
<havenwood>
ebonics: I think I'm not following.
Rollabunna has joined #ruby
<ebonics>
havenwood, because im overriding raise
NinjaOps has quit [Remote host closed the connection]
<ebonics>
and i need it to return different exit codes depending on the reason for the raise
moeabdol has quit [Ping timeout: 272 seconds]
<pontiki>
something about this sounds quite wrong
<ebonics>
pontiki, how so
<baweaver>
very wrong
momomomomo has joined #ruby
<baweaver>
don't monkeypatch core behaviors like that
<baweaver>
you don't know what else uses it
<baweaver>
especially internally
<baweaver>
but go ahead, you'll find out very quickly on that one, just giving fair warning
<ebonics>
the library i'm working with already did that
<baweaver>
which library?
<pontiki>
if you want to do special things with errors, define specific errors in your code that inherit from RuntimeError or possibly other StandardError types. Create an error handler that can deal with those errors, and inject that in where you want it
<havenwood>
Signal.trap('EXIT') { exit 2 }
<ebonics>
pontiki, it's not _my_ code
<mwlang>
hmmm…I see a <TABLE> of accounts in the screenshot and also when I inspect the same page with firefox and can see it in the DOM/source in Firefox as well, but it’s not in the #page_source…I’m guessing because JavaScript is writing those parts to the DOM. So next question is how to re-eval the page_source to get the asyncronously loaded elements.
<baweaver>
don't use it, it'll cause you all types of issues later.
<ebonics>
havenwood, thanks that works
<ebonics>
i know what i'm doing is disgusting
jottr_ has quit [Ping timeout: 272 seconds]
<ebonics>
but my question isn't how to write good ruby code
<shevy>
is there a way to force Abbrev into supplying a random shortened key
<shevy>
or perhaps there is another way, my head is very unclear right now
existensil has joined #ruby
<shevy>
the latter happens, I assume, because "sad" could mean both "sadly" and "sadistically"; in this case, I'd use a rule that picks the shorter variant (so, sad -> sadly)
mrconfused has joined #ruby
alexherbo2 has quit [Ping timeout: 272 seconds]
Mohan has joined #ruby
jottr_ has quit [Ping timeout: 255 seconds]
Mohan is now known as Guest8664
LJT has joined #ruby
mengu has joined #ruby
merqlove has quit [Quit: Connection closed for inactivity]
chinmay_dd has quit [Ping timeout: 244 seconds]
Guest1421 has joined #ruby
Kricir has quit [Remote host closed the connection]
slash_nick has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
<weaksauce>
shevy do a .each and merge the results?
<weaksauce>
order the array by length first
jottr_ has joined #ruby
nym has quit [Quit: Connection closed for inactivity]
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
diegoaguilar has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
kadoppe has quit [Ping timeout: 250 seconds]
kadoppe has joined #ruby
djbkd has quit [Remote host closed the connection]
bigmac has quit [Ping timeout: 256 seconds]
vikaton has quit []
gregf has quit [Quit: WeeChat 1.1.1]
lkba has joined #ruby
slash_nick has quit [Ping timeout: 256 seconds]
jackjackdripper has joined #ruby
insidious has joined #ruby
failshell has quit [Remote host closed the connection]
allcentury has joined #ruby
bigmac has joined #ruby
sevvie has quit [Ping timeout: 265 seconds]
ki0 has quit [Remote host closed the connection]
henrikhodne has quit [Ping timeout: 272 seconds]
gregf has joined #ruby
mistermocha has joined #ruby
Leef_ has joined #ruby
ebernhardson has joined #ruby
endash has quit [Quit: endash]
<ebernhardson>
in rspec, i know i can do expect(list).to include(string) to assert that a particular string is in list, how might i go about asserting that the string is a substring of a string in the list htough?
endash has joined #ruby
<jhass>
doubt there's a premade matcher, I'd opt for writing my own for clarity, it's easy enough
gsd has joined #ruby
alexherbo2 has joined #ruby
<mwlang>
for selenium, how do I select elements that are either td or th? i.e. table_rows = connection.find_elements(css: “tr”); cells = table_rows.map{|tr| tr.find_elements(css: “??”)
gsd has quit [Max SendQ exceeded]
gsd has joined #ruby
<jhass>
doesn't td, th work?
Hirzu has joined #ruby
<ebonics>
no point in using css selectors if you're just using tags to identify the elements
<mwlang>
jhass: yup, that worked perfectly. thanks
<ebernhardson>
i'm imagining it must be possible to make a matcher thats not crazy long, because i just looked at the implementation of the Include matcher and it goes on for pages
<ebernhardson>
although .. it looks like expect(results).to include(include(title)) might work..must try
<havenwood>
shevy: I didn't bother to really look what the existing Abbrev is doing, just yanked stuff out to get the output you asked for. :P
<weaksauce>
>> require 'abbrev'; results = {}; x =['sadly','sadistically', "I" ].sort_by(&:length).reverse.each do |x| results = results.merge(Abbrev.abbrev([x])); end; results
<ruboto>
weaksauce # => {"sadistically"=>"sadistically", "sadisticall"=>"sadistically", "sadistical"=>"sadistically", "sadis ...check link for more (https://eval.in/335188)
Channel6 has quit [Quit: Leaving]
<weaksauce>
shevy^
msgodf has joined #ruby
msgodf has quit [Max SendQ exceeded]
<havenwood>
shevy: Or just use sort the way you want and #find: sort_by(&:size).find { |word| word.start_with? 'sad' }
gauke has quit [Quit: gauke]
<baweaver>
Damerau–Levenshtein distance
haylon has joined #ruby
<haylon>
Hello all! If I am to connect to a DB2 server using ruby, would just installing the db2 gem work for me, or do I need to install the DB2 client as well?
freerobby has joined #ruby
livathinos has quit []
msgodf has joined #ruby
<shevy>
cool
<shevy>
weaksauce my brain has to understand that code first...
<shevy>
why do we sort by length first?
msgodf has quit [Max SendQ exceeded]
jottr_ has quit [Ping timeout: 240 seconds]
quimrstorres has joined #ruby
bashusr has quit [Ping timeout: 244 seconds]
<havenwood>
>> require 'rubygems/text'; include Gem::Text; ['sadly','sadistically'].sort_by { |word| levenshtein_distance word, 'istically' }
<weaksauce>
so merge works correctly. you wanted the smallest abbreviation to take precedence? each merge overwrites the already set values so we want to start with the longest first
<havenwood>
shevy: You said you want the shortest word.
pdoherty has quit [Ping timeout: 264 seconds]
hexhaxtron has left #ruby ["Leaving"]
<weaksauce>
shevy put a puts statement in the each block and you will see what's happening
moretti has joined #ruby
<shevy>
havenwood oh yes
pontiki has quit [Ping timeout: 240 seconds]
redjack1964 has quit [Remote host closed the connection]
<shevy>
I think I need to add that explanation in the comments since I already forgot 1 hour afterwards :)))
redjack1964 has joined #ruby
jobewan has quit [Quit: leaving]
ta has quit [Remote host closed the connection]
jobewan has joined #ruby
ta has joined #ruby
jenrzzz has joined #ruby
codecop has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<shevy>
weaksauce yeah, the other part is easier to understand; .merge to merge into the hash, and .abbrev to find the abbrevitations... I really forgot why we would want to use sort by length though lol
<shevy>
*abbreviations
<shevy>
now you see why def intialize errors can happen!
Rapier- has quit [Quit: (null)]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ismaelga has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 256 seconds]
jobewan has quit [Quit: leaving]
LJT has quit [Quit: Quiting...]
x1337807x has joined #ruby
jobewan has joined #ruby
<weaksauce>
shevy here's a more complete example with words that are subwords. sadist and sadistically
<ruboto>
havenwood # => {"sadistically"=>"sadistically", "sadisticall"=>"sadistically", "sadistical"=>"sadistically", "sadis ...check link for more (https://eval.in/335245)
jobewan has quit [Client Quit]
einarj_ has joined #ruby
<shevy>
havenwood huh... how did you avoid the .reverse there
<shevy>
the -word.size it is?
<havenwood>
shevy: just another derivation of weaksauce's solution
<weaksauce>
yeah -word.size shevy
<shevy>
well that's cool or? I get rid of one method call, just by adding one more character, the - :)
einarj has quit [Ping timeout: 245 seconds]
<weaksauce>
well not really one character but yeah that's the idea.
<shevy>
true
<shevy>
I have to add the {} part
<shevy>
if only we could add arguments to stuff like .sort_by(&:size)
<ruboto>
havenwood # => {"s"=>"sadly", "sa"=>"sadly", "sad"=>"sadly", "sadi"=>"sadistically", "sadis"=>"sadistically", "sadi ...check link for more (https://eval.in/335250)
jobewan has joined #ruby
revoohc has quit [Quit: revoohc]
<havenwood>
shevy: ^ not using abbrev
<shevy>
huh
<shevy>
did you just implement an abbrev without abbrev
<havenwood>
shevy: i do what i want!
<shevy>
I don't think I have seen .flat_map before. That is a combination of .flatten.map ?
njs126 has quit [Ping timeout: 272 seconds]
<havenwood>
shevy: map and flatten(1)
<shevy>
ah
edwinvdg_ has joined #ruby
Akagi201 has joined #ruby
spider-mario has joined #ruby
ismaelga has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lidenskap has quit [Remote host closed the connection]
edwinvdgraaf has quit [Ping timeout: 245 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
Hirzu has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jobewan has quit [Quit: leaving]
startupality has joined #ruby
<mwlang>
This may be asking for trouble, but I don’t suppose the vcr gem can be used with selenium + phantomjs to set up cached server responses (I’m not using selenium + phantomjs to test, but rather to automate a data retrieval process from protected websites).
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yh has joined #ruby
noname has quit [Ping timeout: 256 seconds]
Motoservo has quit [Quit: Over & out.]
andrew-l has quit [Ping timeout: 276 seconds]
speaking1ode has quit [Ping timeout: 276 seconds]
startupality has quit [Client Quit]
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ebonics>
is it possible to enable line numbers in "compile?" error messages in rubymine
pocketprotector has quit [Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number]
speakingcode has joined #ruby
lidenskap has joined #ruby
<ebonics>
all i get is these generic errors with no line numbers: no implicit conversion of Symbol into Integer
Channel6 has joined #ruby
iasoon has joined #ruby
moretti has quit [Remote host closed the connection]
<xxneolithicxx>
are you capturing the exception and only printing the message?
jobewan has joined #ruby
<ebonics>
xxneolithicxx, maybe. i'm modifying a library
<ebonics>
this is painful not knowing ruby :)
woodruffw_ has joined #ruby
redjack1964 has quit [Remote host closed the connection]
woodruffw has quit [Read error: Connection reset by peer]
<xxneolithicxx>
have any code you can gist?
jobewan has quit [Client Quit]
<ebonics>
xxneolithicxx, the library is quite big
jobewan has joined #ruby
jobewan has quit [Client Quit]
<xxneolithicxx>
ok well without being able to see it look for a piece of code that expects an integer but you are giving it a symbol instead, a value that looks like :symbol_name
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 272 seconds]
<xxneolithicxx>
convert that symbol to an integer by calling .to_i on it, best i can guess without seeing something
barkerd427 is now known as zz_barkerd427
<ebonics>
xxneolithicxx, i think it's because i'm trying to insert map key/values into an array
woodruffw_ is now known as woodruffw
jobewan has joined #ruby
failshell has joined #ruby
<ebonics>
derp
<xxneolithicxx>
lol
<ebonics>
still i'd like to be able to turn on line nubmers
<shevy>
ebonics hmm you use rubymine but don't know ruby?
<ebonics>
sure why not shevy
bigmac has quit [Ping timeout: 246 seconds]
redjack1964 has joined #ruby
failshell has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
<shevy>
you have a special variable __LINE__ which holds the line number
lele is now known as Guest24
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
normally the exceptions have all of that information
<ebonics>
shevy, i meant when an exception gets thrown i'm not getting the stacktrace
<shevy>
and there is caller() too
<ebonics>
i guess it's probably related to the library and not rubymine
<shevy>
yeah I would not trust this rubymine thingy too much :)
DynamicMetaFlow has joined #ruby
<shevy>
I don't know... I remember years ago someone was doing stuff in rubymine
bigmac has joined #ruby
pocketprotector has joined #ruby
<shevy>
and rubymine did stuff to counteract that stuff
<shevy>
automatically
<ebonics>
intellij products are typically top notch so
<xxneolithicxx>
lol
<ebonics>
i doubt it's on their end
<xxneolithicxx>
no no... dont do that stuffs
quimrstorres has quit [Remote host closed the connection]
<shevy>
his code worked all fine for everyone else from his pastie
<ebonics>
or it's not configured properly
qwertme has joined #ruby
<ebonics>
i think years ago rubymine was just a plugin
<ebonics>
so it probably had bugs
pocketprotector has quit [Client Quit]
<adaedra>
it's still more or less
bmurt has quit [Ping timeout: 245 seconds]
<ebonics>
well yeah
<adaedra>
RubyMine is just a cut down version of IntelliJ
<ebonics>
just like phpstorm is "more or less" a plugin though
quimrstorres has joined #ruby
<adaedra>
I've got IntelliJ at work and RubyMine at home
<ebonics>
i have intellij, rubymine, phpstorm, and webstorm
<ebonics>
all on here :p
startupality has joined #ruby
greenbagels has joined #ruby
vdamewood has joined #ruby
<adaedra>
meh
yfeldblum has quit [Remote host closed the connection]
<ebonics>
i don't understand who would want to strip stacktraces on errors
<adaedra>
why have all of them when IntelliJ alone does all?
moeabdol has quit [Quit: WeeChat 1.1.1]
colin___ has joined #ruby
yh has quit [Ping timeout: 240 seconds]
<ebonics>
adaedra, so all my workspaces and default settings are decoupled
<ebonics>
drocsid, you just helped answer my question
<ebonics>
thanks
<drocsid>
cool
<ebonics>
you're the man
<drocsid>
maybe I can get some help with mine
<ebonics>
i would if i could
momomomomo has quit [Quit: momomomomo]
ebernhardson|lch is now known as ebernhardson
nini1294 has joined #ruby
lidenskap has quit [Remote host closed the connection]
jobewan has quit [Quit: leaving]
<drocsid>
ebonics: I just entered the room, what was your question?
tuelz has quit [Ping timeout: 272 seconds]
moeabdol has joined #ruby
<ebonics>
drocsid, i'm modifying a library and the damn thing was recueing an exception and removing the stacktrace. but i didnt know the syntax or whatever that was used to do that
<ebonics>
so i just grepped rescue and found it
<ebonics>
(i don't know any ruby)
quimrstorres has quit [Remote host closed the connection]
<mwlang>
drocsid: you may need to adjust the regexp in the timestamp method as this was some code I pulled from one of my log parsers and I see your timestamps aren’t quite the same as mine.
<havenwood>
mwlang: commented on your gist
mengu has quit [Remote host closed the connection]
yfeldblum has joined #ruby
jobewan has joined #ruby
jottr_ has joined #ruby
<xxneolithicxx>
interesting, fyi the one i posted should be (retries_left + 1).times so as to not count the first attempt as a retry
revoohc has quit [Client Quit]
Astrologos_ has joined #ruby
<xxneolithicxx>
ive never used retry, how does that decide what to retry is it the current block
EagleDelta has quit [Remote host closed the connection]
jobewan has quit [Client Quit]
<mwlang>
havenwood: #retry ? :-o
dorei has quit [Ping timeout: 244 seconds]
einarj has joined #ruby
<havenwood>
xxneolithicxx: it retries from begin, or if an implicit begin the beginning of the method
einarj_ has quit [Read error: Connection reset by peer]
robertodecurnex has quit [Remote host closed the connection]
leafybasil has joined #ruby
n008f4g_ has joined #ruby
workmad3 has joined #ruby
<mwlang>
I have definitely learned something new today
thatslifeson has quit [Remote host closed the connection]
<xxneolithicxx>
TIL to retry
umgrosscol has quit [Quit: Quit]
Hijiri has joined #ruby
<mwlang>
there’s also a #redo
rbennacer has quit [Remote host closed the connection]
woodruffw has quit [Quit: And then he took off.]
woodruffw has joined #ruby
momomomomo has joined #ruby
<ebonics>
man this language is so easy haha
pocketprotector has joined #ruby
Aww is now known as cutevibes
jobewan has joined #ruby
<havenwood>
mwlang: redo is a keyword not a method, but you use it in a loop like you would `next` but instead of proceeding to the next it redoes the current iteration
tuelz has quit [Read error: No route to host]
quimrstorres has quit [Remote host closed the connection]
baweaver has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jobewan has joined #ruby
jobewan has quit [Remote host closed the connection]
adac has quit [Ping timeout: 264 seconds]
ndrei has quit [Ping timeout: 244 seconds]
nini1294 has joined #ruby
quimrsto_ has quit [Remote host closed the connection]
paulcsmith has quit [Quit: Be back later ...]
<drocsid>
mwlang, thanks. But I would still like to try to understand why my script. I am not having any issues till I hit a line which throws an exception
<drocsid>
mwlang: ^^^
<havenwood>
>> retwos = 2; 1.upto(3) { |n| puts n; if retwos > 0 && n == 2; retwos -= 1; redo end }
<ebonics>
to reference a def that returns a hash as the hash itself
tejasmanohar has quit [Client Quit]
jobewan has joined #ruby
tejasmanohar has joined #ruby
jobewan has quit [Client Quit]
jobewan has joined #ruby
<adaedra>
aewffwea: if you're looking at code testing as in unit testing, look at rspec or minitest. If you're looking at exploring and testing small bits of ruby, try irb or pry. If you want to run ruby code from a file, `ruby file.rb`.
aldarsior has quit [Ping timeout: 244 seconds]
DynamicMetaFlow has quit [Remote host closed the connection]
<ebonics>
oh im an idiot
<aewffwea>
I wanted to test in the chat :p
<aewffwea>
anyway, found it
<aewffwea>
Return fucking returns from the method where you define it...
nini1294 has quit [Read error: Connection reset by peer]
<adaedra>
anyway
<aewffwea>
adaedra: In most languages, return returns from the current "execution" unit... like, if you return inside a block, you return the result of the block, not of the method
<aewffwea>
adaedra: I like this behavior... I was just surprised it works like this...
<drocsid>
do I have to begin / rescue inside the block?
jobewan has quit [Client Quit]
badhatter has quit [Read error: Connection reset by peer]
<aewffwea>
adaedra: As far as I knew, Smalltalk was the only language that supported this "weird" return xD
<adaedra>
aewffwea: it's logical
<aewffwea>
adaedra: not really :p
Zai00 has joined #ruby
<drocsid>
to "continue" / next , get the next line?
badhatter has joined #ruby
<drocsid>
after the exception
<aewffwea>
adaedra: it's also quite difficult to implement....
<drocsid>
is that the issue
<adaedra>
aewffwea: well, for me it is :)
<aewffwea>
adaedra: good for you :)
mistermocha has joined #ruby
<adaedra>
also, be careful about return in blocks.
<adaedra>
>> c = proc do return end; c.call
<mwlang>
drocsid: sorry, I stepped away for a bit….still have a question on the exception handling?
<ruboto>
adaedra # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/335496)
<drocsid>
I'm printing quite a bit of debugging
pontiki has joined #ruby
<aewffwea>
adaedra: that's just because you are running the code outside a method
<adaedra>
yes
jenrzzz_ has joined #ruby
<aewffwea>
anyway, I am 100% familiar with this behavior... I just didn't know ruby had it
<adaedra>
got bitten some times :p
quimrstorres has joined #ruby
jobewan has joined #ruby
baweaver has quit [Remote host closed the connection]
henrikhodne has joined #ruby
<drocsid>
yes, I'm just asking about my program above. It seems to work except the exception handling part. Do I have to handle the exception in the block, guess I will try that next
HTH_ has left #ruby ["Leaving"]
jenrzzz has quit [Ping timeout: 240 seconds]
<mwlang>
aewffwea: ruby does take many of its cues from smalltalk.
shazaum has quit [Quit: This computer has gone to sleep]
baweaver has joined #ruby
<aewffwea>
mwlang: I've noticed
<aewffwea>
mwlang: Sadly it doesn't do keyword messages: p
Guest1421 has quit [Ping timeout: 252 seconds]
<aewffwea>
mwlang: Sadly it doesn't do keyword messages: :p
<mwlang>
drocsid: yes, if you want to continue trying files. where it is now, you’re escaping the dir.glob loop
<mwlang>
aewffwea: and what are keyword messages?
pontiki has quit [Ping timeout: 240 seconds]
thatslifeson has joined #ruby
DexterLB has quit [Ping timeout: 240 seconds]
<drocsid>
mwlang: the exception is thrown due to a bad date in a specific file
<drocsid>
or a line without a timestamp first
<drocsid>
a bad line
<drocsid>
Date cannot parse the line
<drocsid>
just asking why I can't recover from the exception, get to the next line, or how to appropriatly get the next line
pengin_ has quit []
<mwlang>
drocsid: because your rescue block is outside the loops
moeabdol has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby
zz_barkerd427 is now known as barkerd427
bigmac has quit [Ping timeout: 252 seconds]
moeabdol has joined #ruby
DexterLB has joined #ruby
<drocsid>
mwlang: that's what I was suspecting. Will try to figure out how to get it right. Thanks..
chimche has quit [Quit: Leaving.]
bigmac has joined #ruby
gsd has joined #ruby
<ebonics>
is it possible to overload the hash/array access syntax
<mwlang>
drocsid: it might help to make your code more ruby-like. Your code is challenging to read as-is.
<ebonics>
like.. if i want to add functionality to myhash[:mysymbol]
quimrstorres has quit [Remote host closed the connection]
<apeiros>
ebonics: you can define [] as a method, yes
<apeiros>
ebonics: it's not overloading, though. ruby by definition can't have that.
yfeldblum has quit [Ping timeout: 265 seconds]
metalic has joined #ruby
A205B064 has joined #ruby
chimche has joined #ruby
Astrologos_ has quit []
jobewan has quit [Quit: leaving]
<apeiros>
(overloading requires typed params - which ruby doesn't have)
moeabdol has quit [Read error: Connection reset by peer]
metalic has quit [Max SendQ exceeded]
dorei has joined #ruby
<aewffwea>
apeiros: You could have multimethods though'
<ebonics>
i want to make it so that when i access a key that's nil that it creates it
<apeiros>
aewffwea: how do you define that term?
metalic has joined #ruby
pontiki has joined #ruby
<ebonics>
but i don't want all the code in the entire library to have that functionality
subtwo has joined #ruby
<aewffwea>
apeiros: A multimethod chooses which method to use for answering a message based on the type of the receiver plus all the parameters
gambl0re has quit [Ping timeout: 256 seconds]
jobewan has joined #ruby
Peetooshock has quit [Quit: Leaving]
<pontiki>
hi
<aewffwea>
(String, Int, Int) vs (String, Int, String) vs (Int, Int, Int) may all go to diffeernt methods
<apeiros>
aewffwea: ruby only considers the receiver. never the parameters. so no, by that definition, it doesn't.
Peetooshock has joined #ruby
Peetooshock has quit [Changing host]
Peetooshock has joined #ruby
moeabdol has joined #ruby
chipotle has quit [Quit: cheerio]
<aewffwea>
apeiros: You could extend ruby to support multimethods
<apeiros>
aewffwea: it'd still not be ruby, the language, which supports it.
bashusr has joined #ruby
<aewffwea>
apeiros: Who cares?
<ebonics>
apeiros or aewffwea, could i make this a multimethod for [] https://dpaste.de/HOui
<ebonics>
for example?
<apeiros>
aewffwea: it makes your statement pointless.
<apeiros>
so if you don't care - why make it in the first place?
<aewffwea>
ebonics: I'm talking more on a theoretical level... If you want to implement something right now, I'd advise you not to use multimethods xD
jobewan has quit [Client Quit]
<ebonics>
ic
<aewffwea>
apeiros: I don't care that the language doesn't support it, and you'll need a library for it
<ebonics>
having to call those methods is pretty redundant though
<aewffwea>
ebonics: What problem are you trying to solve?
<ebonics>
like if i call somehash[:somesymbol] = blah
<pontiki>
please don't take my beautiful beautiful ruby and turn it into C++
m3t4l1c_s0ul has joined #ruby
<apeiros>
ebonics: you define the [] method for your class by doing `class Foo; def [](arg1, …); …code… end; end`
ki0 has quit [Remote host closed the connection]
<ebonics>
i want it to create an array or hash for :mysymbol
<ebonics>
if it doesn't exist already
<aewffwea>
what?
<apeiros>
ebonics: and `somehash[arg1] = arg2` is the []= method with 2 args
lidenskap has joined #ruby
ki0 has joined #ruby
<ebonics>
apeiros, ooo
moeabdol1 has joined #ruby
jottr_ has quit [Quit: WeeChat 1.1.1]
<ebonics>
ok cool thanks
<apeiros>
I'm not quite sure I understand "i want it to create an array or hash for :mysymbol"
barkerd427 is now known as zz_barkerd427
ebernhardson has left #ruby [#ruby]
disgrntld has quit [Quit: Leaving.]
<ebonics>
apeiros, when i access an element that doesnt exist, i want it to create it
<apeiros>
ebonics: also the convention is that _var means the variable is not used.
<ebonics>
o
<apeiros>
i.e. don't call your local variables _foo if you actually use it
<ebonics>
ok
lkba has quit [Ping timeout: 272 seconds]
<apeiros>
ebonics: hash[key] ||= value
<ebonics>
.
<apeiros>
note that it will override an existing nil or false value
<ebonics>
o
jobewan has joined #ruby
<apeiros>
if you don't want that, you have to test for existence explicitly: hash[key] = value unless hash.has_key?(key)
jobewan has quit [Client Quit]
<ebonics>
apeiros, that's what i want to add into the operator
lkba has joined #ruby
<apeiros>
also note that that behavior depends on using a Hash with nil as default.
jobewan has joined #ruby
<apeiros>
ebonics: well then, have fun coding :)
<zenspider>
(or false)
moeabdol has quit [Ping timeout: 272 seconds]
<apeiros>
moin zenspider
<ebonics>
wait can i "overload" ||=
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
redefine
metalic has quit [Ping timeout: 240 seconds]
<apeiros>
or define
<apeiros>
and no, ||= is syntax sugar
<ebonics>
ok
<apeiros>
a ||= b expands to a || a = b
<zenspider>
'lo apeiros
<apeiros>
and foo[arg1] ||= arg2 expands to foo[arg1] || foo[arg1] = arg2
<apeiros>
so the methods you need for ||= with [] are [] and []=
<ebonics>
honestly ruby is pretty dope
<ebonics>
i gave it too little respect before
<ebonics>
i'm not the biggest fan of scripting languages
ki0 has quit [Ping timeout: 256 seconds]
moeabdol1 has quit [Ping timeout: 240 seconds]
<zenspider>
define "scripting language"
jobewan has quit [Client Quit]
<apeiros>
<3 urbandict
<apeiros>
helps with keeping up with slang…
<ebonics>
non-compiled languages
<apeiros>
ebonics: like C?
<apeiros>
because you know, there are C interpreters…
lidenskap has quit [Remote host closed the connection]
<ebonics>
ok well i don't use those lol
<apeiros>
also there are compiled versions of ruby. even without counting jruby which compiles to java byte code…
that1guy has joined #ruby
<ebonics>
i'm not tyring to get into semantics. plus i know you can compile ruby to java bytecode
jobewan has joined #ruby
<ebonics>
you know what i'm saying though
jobewan has quit [Client Quit]
<apeiros>
ebonics: yes. and we tell you it's a flawed view.
jobewan has joined #ruby
<apeiros>
compiled/interpreted is not a property of the language
<pontiki>
never want to argue of the meaning of things....
<pontiki>
then we can call pretend we understand
<aewffwea>
i'm not tyring to get into semantics. plus i know you can compile ruby to java bytecode ---> Is that actually a thing?
<aewffwea>
I though JRuby was an interpreter
<ebonics>
it is, but it's compiled to bytecode
<ebonics>
to run on the jvm
<weaksauce>
java runs on java bytecode
msgodf has joined #ruby
<aewffwea>
ebonics: But does Ruby actually run on Java Bytecode? Or does ruby run on the JRuby interpreter which runs on java bytecode?
<aewffwea>
it's not thes ame
<ebonics>
afaik it gets compiled at runtime to actual btyecode and gets executed directly on the jvm
<ebonics>
but i'm not 100% that was just my interpretation
<apeiros>
you can ask headius over in #ruby-lang
that1guy has quit [Client Quit]
<ebonics>
i've heard arguments that using jruby speeds up your code
<ebonics>
so i assume it does get compiled, else the ruby interpreter would be faster since it's running at a lower level
<apeiros>
for code which runs more than just a couple of seconds, jruby is quite probably faster
<ebonics>
you mean because of JIT
<ebonics>
that could be the reason
<apeiros>
more because of java having quite a long time to boot
<apeiros>
or jvm rather
<ebonics>
the boot time is typically omitted from benchmarks
<ebonics>
it's not really a fair comparison that way. and you can use the jvm as a server to avoid that
jobewan has quit [Quit: leaving]
<ebonics>
not saying im advocating java, but yeah
<apeiros>
ebonics: that's bollocks
jackjackdripper1 has joined #ruby
<apeiros>
it's pointless if your benchmark says it's the fastest when stuff like `git commit` takes 10s…
duderonomy has quit [Ping timeout: 256 seconds]
qwertme has joined #ruby
jobewan has joined #ruby
<Eiam>
anyone use the Naught gem?
<ebonics>
apeiros, you can just run the jvm as a server and not have that overhead
<Eiam>
was just reading through the readme
<ebonics>
so it's not really bollocks.
<apeiros>
ebonics: does that now work with any jvm based program?
<ebonics>
not out of the box afaik
<ebonics>
but it's simple to do yourself
<apeiros>
ebonics: or do you need to start an individual jvm per program? also how about required jvm versions?
jackjackdripper has quit [Read error: Connection reset by peer]
<apeiros>
well, then I'll still call it bollocks :)
<ebonics>
you wouldnt need to run a jvm per program
<ebonics>
apeiros, it's like VERY VERY trivial to do yourself
<ebonics>
and it might already be a thing, i just don't know
<ebonics>
there's also some other techniques like pre-booting depending on use case
<ebonics>
either way it's not a fair comparison of "speed" if you include java's boot time
vikaton has quit [Quit: Connection closed for inactivity]
<ebonics>
typically it's omitted as i said
tuelz has quit [Ping timeout: 264 seconds]
jackjackdripper has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
jackjackdripper1 has quit [Read error: Connection reset by peer]
jenrzzz_ has quit [Ping timeout: 240 seconds]
einarj_ has joined #ruby
<ebonics>
the only reaosns i could see jruby being faster than normal ruby is: a) the ruby gets compiled directly to bytecode or b) JIT
<apeiros>
ebonics: like in everything, context matters. and I stand by that. if you want to know how your long running code performs - of course you take out boot time. if you want to know how your 1s running programm will do, of course you will include it.
einarj has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
havenwood has quit []
<ebonics>
apeiros, the context was "is jruby faster than ruby", you implied it would probably be faster after the boot time was negligible
icebourg has quit []
<ebonics>
my statement was talking about processing time, of course
<apeiros>
00:28 headius: aewffwea: JRuby has an interpreter written in Java and a JIT that converts hot Ruby code into JVM bytecode
<apeiros>
over from #ruby-lang
<ebonics>
so are there tools to do the compilation statically
bruno- has quit [Quit: Lost terminal]
<apeiros>
macruby and rubymotion compile ruby
<ebonics>
ic
<apeiros>
I think there are other compilers
bruno- has joined #ruby
that1guy has joined #ruby
<ebonics>
pretty cute
<apeiros>
I'm not sure about how much of ruby's syntax each can actually compile
<ebonics>
i'm not sure of the benefit though
<apeiros>
rubymotion afaik has limits for legal reasons already.
<ebonics>
if you cared you could probbaly just hook the internal compiler it uses and dump the bytecode
<ebonics>
would be decent for eliminating some overhead anyway
<ebonics>
i think if you're using ruby you already don't care about speed though so it's not really important imo
<apeiros>
I wouldn't wonder if jruby already created cache files for that
tjbiddle has quit [Quit: tjbiddle]
<apeiros>
but as said, headius over in #ruby-lang will know all that
PrincessAww is now known as Aww
jobewan has quit [Quit: leaving]
rgb-one has quit [Quit: rgb-one]
jobewan has joined #ruby
<ebonics>
i wonder if there's native compilers for ruby
rodfersou has joined #ruby
<ebonics>
i would seriously consider ruby if that were possible
rodfersou has quit [Client Quit]
rodfersou has joined #ruby
zz_barkerd427 is now known as barkerd427
startupality has quit [Quit: startupality]
dfinninger has quit [Remote host closed the connection]
gojira_ has quit [Remote host closed the connection]
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cust0sL1men has joined #ruby
startupality has joined #ruby
Ropeney has joined #ruby
snath has quit [Ping timeout: 256 seconds]
<ebonics>
apeiros, i dont understand this redefining implementation
<ebonics>
can i redefine [] for a specific method
jobewan has quit [Quit: leaving]
<apeiros>
um, [] is a method
ujjain has quit [Ping timeout: 250 seconds]
<apeiros>
and you define methods on classes, not on methods
<ebonics>
method1()[blah]
<apeiros>
so not sure what you're asking for…
kirun has quit [Quit: Client exiting]
<ebonics>
can i redefine [] for method1
<apeiros>
ok, you misunderstand something there
mary5030_ has joined #ruby
<apeiros>
method1() returns an object
<apeiros>
and you call [] on that object, not on method1
<ebonics>
oh
<ebonics>
so basically i can subclass Hash
<ebonics>
and then override the [] method?
<apeiros>
you could. it's generally a bad idea to subclass classes you don't own, though.
<ebonics>
really
<ebonics>
what the hell lol
<ebonics>
how's that a bad idea
<aewffwea>
<apeiros> you could. it's generally a bad idea to subclass classes you don't own, though. ---> why?
failshell has joined #ruby
<zenspider>
ebonics: how is it a good idea?
<apeiros>
aewffwea: because you have no control over changes
<aewffwea>
apeiros: That doesn't matter... The changes should be reasonable... Assuming that class is meant to be subclasses
<aewffwea>
d
<apeiros>
aewffwea: also chances are that you miss stuff even without changes happening
<apeiros>
even reasonable changes can break your subclasses.
<ebonics>
zenspider, i'm not saying it's a good idea
<ebonics>
i'm asking why it's a bad idea
Deele has quit [Ping timeout: 256 seconds]
<ebonics>
i didn't make the claim that it's a good idea :|
that1guy has joined #ruby
<ebonics>
reading comprehension son
<adaedra>
son
<apeiros>
and Hash/Array are not specifically built to be subclassed. such classes are usually called *Abstract or *Base
* baweaver
waits for ban hammer for mouthyness
<aewffwea>
apeiros: I agree with that statement... You should basically never subclass something that it's not meant to be subclassed....
<apeiros>
that's not my statement, though
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
<apeiros>
my statement is: don't subclass classes you don't own.
cosmicfires has joined #ruby
<aewffwea>
apeiros: My statement is: Don't subclass classes that are not meant to be subclassed....
<ebonics>
it's weird how you can still do it if you're not meant to
<cosmicfires>
does ruby come with getopt() or do I have to install a gem?
<apeiros>
see, so we don't actually agree :)
<ebonics>
seems like you should have a final keyword in ruberino
<aewffwea>
apeiros: We agree only on a subset
<apeiros>
cosmicfires: there's optparse and another option parsers. check the stdlib.
<cosmicfires>
thanks
diegoaguilar has quit [Remote host closed the connection]
<apeiros>
ebonics: it's not "you're not meant to"
<apeiros>
and ruby doesn't handhold the developers. and that's good.
mary5030_ has quit [Ping timeout: 256 seconds]
<apeiros>
just because it's *IMO* not a good idea doesn't mean that a) it's *never* a good idea or b) that you share that opinion
<ebonics>
right, but if something in the standard library is going to break by subclassing it then there should be restrictions imo
CloCkWeRX has left #ruby [#ruby]
<shadoi1>
"not a good idea" != "is going to break"
<ebonics>
you say not a good idea because the behaviour isn't defined
snockerton has quit [Quit: Leaving.]
bruno- has quit [Quit: Lost terminal]
failshell has quit [Ping timeout: 265 seconds]
<ebonics>
which means it could break, which means it's unsafe
<apeiros>
ebonics: stdlib is all owned by "ruby". so a subclass there is not a subclass of a class which is not owned by it.
paulcsmith has joined #ruby
bruno- has joined #ruby
<apeiros>
the behavior is defined. I say you have no control over changes.
<ebonics>
i'm not understanding the distinction
<ebonics>
i'm too new to the language probably
<apeiros>
well, see, lets say you subclass Hash
<apeiros>
there's a ton of methods on Hash which return a Hash
<apeiros>
now you define those methods in your subclass too, to make them return instances of your class
<apeiros>
sane, right?
<ebonics>
yeah
<apeiros>
now a new version of ruby is released which adds a new method to Hash
<ebonics>
although i don't think you would need to do that
<ebonics>
unless i don't understand properly
sargas has quit [Quit: Leaving]
<apeiros>
your subclass there will return a Hash, as your implementation does not define it.
<ebonics>
if you have an instance of the subclass then won't you still have all the same access to your subclass when the super class returns itself
vickleton has quit [Quit: Ex-Chat]
<apeiros>
who says it returns itself?
<apeiros>
many methods return new hashes. take select/reject
Guest1421 has joined #ruby
<ebonics>
if it returns a new instance then i guess you would need to define that
<apeiros>
they don't return self. they return a new copy of self with elements removed.
<ebonics>
i see
bigmac has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
<ebonics>
so i guess it's better to just wrap it
<apeiros>
correct
<apeiros>
that's the suggested approach
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Contigi777 has quit [Quit: Leaving]
<ebonics>
so much code required though
<ebonics>
ugh
KC9YDN has joined #ruby
<ebonics>
i think for my use case i'm going to just subclass it
<ebonics>
but i understand what you mean
<apeiros>
ebonics: not necessarily. stuff like Forwardable help a ton
<apeiros>
also for Array/Hash I think there are gems helping with wrapping them.
<apeiros>
personally I never had the need, though
einarj_ has quit [Remote host closed the connection]
<apeiros>
mostly because I believe in SRP. a class should focus on its task. Hash/Array are rather unfocused classes (which is ok, but should IMO be the exception)
m3t4l1c_s0ul has quit [Quit: Leaving]
<ebonics>
the only reason i want to extend their functionality is because im lazy
harlen has joined #ruby
<ebonics>
the fact that you can have your own [] implementation is pretty cool to me
<apeiros>
you can also modify the existing class or modify a single instance
<ebonics>
how
<apeiros>
for the former, google for "ruby refinements". for the latter: define the method in a module and use Object#extend
baweaver has joined #ruby
<apeiros>
>> module WeirdUpcase; def upcase; chars.map { |c| rand(2).zero? ? c : c.upcase }.join(""); end; end; a = "hello"; b = "world"; a.extend WeirdUpcase; [a.upcase, b.upcase]
<Eiam>
does anyone integrate NullObject into their actual code?
<ebonics>
that's hot
<Eiam>
conceptually its nice, and im amused at it offering Maybe and Just
<crowell>
null object is hot?
<ebonics>
nah that code apeiros showed
<apeiros>
Eiam: no, but to make a coworker happy I once changed nil:NilClass error to NullPointerException :D
juanpablo____ has quit [Quit: (null)]
<Eiam>
apeiros: why don't you use it?
<apeiros>
the pattern?
<Eiam>
I'm about to sit down and refactor a bunch of code that I was prototyping out
<Eiam>
yep
<Eiam>
and just debating which way I want to go with it
juanpablo____ has joined #ruby
paulcsmith has quit [Ping timeout: 256 seconds]
juanpablo____ has quit [Client Quit]
<apeiros>
I find the pattern interesting actually. maybe I even used it without noticing. not using it - probably because I don't think about it / doesn't occur to me to use it in situations where it might be used.
juanpablo____ has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
<ebonics>
apeiros, can i just do liek
mistermocha has quit [Remote host closed the connection]
<ebonics>
this.extend Module; in my class' constructor
tuelz has joined #ruby
<ebonics>
or self.extend
<ebonics>
leme see
<apeiros>
sure. but if you use it in the constructor, why not just add those methods to the class?
babykosh has quit [Read error: Connection reset by peer]
umby24|offline is now known as umby24
thatslifeson has quit [Remote host closed the connection]
<ebonics>
yeah that's redundant
<ebonics>
nvm
xxneolithicxx has quit [Ping timeout: 255 seconds]
juanpablo_____ has joined #ruby
juanpablo____ has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
<shevy>
NullPointerException
<shevy>
that makes people happy?
<apeiros>
shevy: seasoned java developer.
doodlehaus has joined #ruby
ghr has quit [Ping timeout: 244 seconds]
<shevy>
hehe
doodlehaus has quit [Read error: Connection reset by peer]
doodlehaus has joined #ruby
nini1294 has joined #ruby
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpablo_____ has quit [Ping timeout: 246 seconds]
<adaedra>
NullPointerExceptionFactory
roolo has quit [Remote host closed the connection]
longfeet has joined #ruby
doodleha_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doodlehaus has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
<ebonics>
apeiros, do i need to call self.[] key, value if i call extend on it? or does it already get called
jenrzzz has joined #ruby
<apeiros>
ebonics: I don't follow. maybe gist actual code?
tuelz has quit [Ping timeout: 240 seconds]
<ebonics>
i dont even know if its going to work
<ebonics>
cause i have to change my implementation
<ebonics>
but 1 sec
<Radar>
lol if you think explaining a problem with words is as useful as explaining it with code
<ebonics>
not sure when i said i think that
xcyclist has quit [Quit: Page closed]
<ebonics>
apeiros, you're prob gonna cringe or this code won't even work
fschuindt has joined #ruby
<ebonics>
but lol 1 sec
workmad3 has joined #ruby
<apeiros>
ebonics: I cringe at almost all foreign code. so don't let that stop you :-p
<apeiros>
define "support". yes, it has to actively do something with the block. what it does with it is store it away and call it whenever you use [] with a missing key.
<ebonics>
yeh
malcolmva has quit [Ping timeout: 255 seconds]
<ebonics>
and it wont work with arrays because array class doesnt support blocks
<ebonics>
?
<apeiros>
Array.new does take a block but does something differently with it
<apeiros>
Array doesn't have a concept of missing key/default value
<ebonics>
it seems like there's a damn lot of gotchas with this language
<apeiros>
not really
phoo1234567 has quit [Quit: Leaving]
<ebonics>
that or you're expected to read the source code lol
<apeiros>
most stuff which matters follows from a relatively small set of knowledge.
<apeiros>
but it takes a bit to figure that small set out and understand how actually all comes from that.
<ebonics>
ic
<ebonics>
apeiros, thanks for your help :) you're awesome
<apeiros>
heh, thanks
longfeet has quit [Ping timeout: 255 seconds]
<ebonics>
i think i figured out how to do it though apeiros with extend
attlasbot has joined #ruby
<ebonics>
cause i sorta need it to work with arrays
moeabdol1 has joined #ruby
<apeiros>
the final bit to the story of `Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) }` - Hash#default_proc returns that block you passed to Hash.new
nobitanobi has joined #ruby
<apeiros>
so with Hash.new(&h.default_proc) we create a hash which uses the same default proc.
<apeiros>
that's how it becomes recursive.
<ebonics>
yeah
<ebonics>
i see
danzilio has quit [Quit: Baiii!]
<apeiros>
the & there is syntax to instruct ruby to treat the argument as a block