choke has quit [Remote host closed the connection]
HoierM has quit [Ping timeout: 268 seconds]
raspado_ has quit [Remote host closed the connection]
bastrud has quit [Ping timeout: 260 seconds]
babykosh has joined #ruby
bkxd has joined #ruby
electrostat has quit [Remote host closed the connection]
electrostat has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
bastrud has joined #ruby
cagomez has joined #ruby
Chagel has joined #ruby
astrobunny has quit [Remote host closed the connection]
cagomez has quit [Ping timeout: 240 seconds]
bastrud has quit [Ping timeout: 260 seconds]
Asher has joined #ruby
Asher is now known as Guest61925
howdoi has joined #ruby
babykosh has quit [Quit: babykosh]
certainty has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
hutch34 has joined #ruby
roamingdog has joined #ruby
ElDoggo has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
Channel6 has quit [Quit: Leaving]
paul374 has joined #ruby
djbkd has joined #ruby
roamingdog has quit [Ping timeout: 246 seconds]
skweek has joined #ruby
roamingdog has joined #ruby
milardovich has joined #ruby
igniting has joined #ruby
milardovich has quit [Client Quit]
chouhoulis has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby
postmodern has quit [Client Quit]
jdm has quit [Remote host closed the connection]
^jud is now known as jud
jud has quit [Changing host]
jud has joined #ruby
astrobunny has joined #ruby
xenops has joined #ruby
rwb has quit [Ping timeout: 240 seconds]
jdm has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
nobitanobi has joined #ruby
rhyselsmore has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
certainty has quit [Ping timeout: 260 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
xenops has quit [Ping timeout: 240 seconds]
jeyraof^mbpr has joined #ruby
nobitanobi has quit [Ping timeout: 246 seconds]
gix has quit [Ping timeout: 256 seconds]
roflmyeggo has joined #ruby
gix has joined #ruby
bocaneri has joined #ruby
bocaneri has quit [Max SendQ exceeded]
astrobunny has quit [Remote host closed the connection]
sleetdrop has quit [Quit: Computer has gone to sleep.]
skweek has quit [Ping timeout: 246 seconds]
bocaneri has joined #ruby
igniting has quit [Ping timeout: 240 seconds]
astrobunny has joined #ruby
JoshS has quit [Ping timeout: 260 seconds]
skweek has joined #ruby
claw has quit [Ping timeout: 260 seconds]
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
claw has joined #ruby
babykosh has joined #ruby
djbkd has quit [Quit: My people need me...]
matcouto has quit [Remote host closed the connection]
bkxd has joined #ruby
anisha has joined #ruby
foul_owl has joined #ruby
<foul_owl>
Hi folks. Getting `initialize': not in gzip format trying to do "berks install"
hahuang61 has quit [Quit: WeeChat 1.7]
bkxd has quit [Ping timeout: 240 seconds]
xenops has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
hutch34 has joined #ruby
moei has joined #ruby
roamingdog has joined #ruby
grant has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
mim1k has quit [Ping timeout: 260 seconds]
Pumukel has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 258 seconds]
roamingdog has quit [Ping timeout: 240 seconds]
bungoman has quit [Read error: Connection reset by peer]
chopin has quit [Remote host closed the connection]
excel-nc17 has joined #ruby
muelleme has joined #ruby
astrobunny has quit [Remote host closed the connection]
<foul_owl>
nm
edliss has joined #ruby
astrobunny has joined #ruby
CloCkWeRX has joined #ruby
<excel-nc17>
Hello. I'm fairly new to ruby so I hope this question is okay. In learning about ruby it seems that there was once support for something called WIN32OLE that allowed ruby to function as a scripting language for MS Office. As far as I can tell currently that functionality is crippled in two ways (no x64 support, no Office360 support) and I am wondering if there are any projects to restore functionality for these issues?
edliss has quit [Ping timeout: 260 seconds]
skweek has joined #ruby
babykosh has quit [Quit: babykosh]
xall has joined #ruby
aryaching has quit [Ping timeout: 256 seconds]
<baweaver>
excel-nc17: not that I know of. Have you checked in their Github repos?
astrobunny has quit [Ping timeout: 258 seconds]
<excel-nc17>
baweaver: No. Good idea, I should have thought of that.
mim1k has joined #ruby
cagomez has joined #ruby
renchan has joined #ruby
sleetdrop has joined #ruby
cagomez has quit [Ping timeout: 258 seconds]
mim1k has quit [Ping timeout: 264 seconds]
muelleme has quit [Ping timeout: 240 seconds]
LiquidInsect has joined #ruby
raul782 has quit [Remote host closed the connection]
brent__ has joined #ruby
muelleme has joined #ruby
MicaFox[m] has joined #ruby
rippa has joined #ruby
brent__ has quit [Ping timeout: 268 seconds]
roflmyeggo has quit [Ping timeout: 240 seconds]
enterprisey has quit [Remote host closed the connection]
<excel-nc17>
baweaver: It appears that there is some x64 support (as in the extension will talk to x64 windows) but it is less clear if it will *then* talk to 64bit versions of Office. I will have to do some experimenting.
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
def_jam is now known as eblip
<excel-nc17>
baweaver: As for Office 365 that is much more murky. It seems there are two tools for this. One is called the Office365 API and the other is something called Microsoft Graph but the documentation on these will take some digging to find out if they offer the same granular level of control that WIN32OLE did.
edliss has joined #ruby
<excel-nc17>
baweaver: Thanks for the suggestion to check the repos, very helpful.
astrobunny has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
<ChickeNES>
Anyone know of a library for parsing ruby that's not itself in ruby? I wanted to experiment with writing my own ruby implementation but would love to skip writing the parser portion if possible. I've tried google but all I've found so far has been libraries for writing parsers in ruby, or ruby parsers also written in ruby.
Hobbyboy has joined #ruby
Gadgetoid has quit [Ping timeout: 240 seconds]
muelleme has quit [Ping timeout: 240 seconds]
astrobunny has joined #ruby
edliss has joined #ruby
Gadgetoid has joined #ruby
edliss has quit [Ping timeout: 240 seconds]
ammar has quit [Quit: Lost terminal]
aryaching has joined #ruby
ammar has joined #ruby
igniting has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
certainty has quit [Ping timeout: 240 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
hutch34 has joined #ruby
aufi has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
hutch34 has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
raspado has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
lheaded has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
anisha has joined #ruby
astrobunny has quit [Remote host closed the connection]
igniting has quit [Ping timeout: 246 seconds]
tristanp has quit [Read error: Connection reset by peer]
tristanp has joined #ruby
JaReAx has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
ta_ has quit [Remote host closed the connection]
skweek has joined #ruby
rhyselsmore has joined #ruby
jgnagy has quit [Remote host closed the connection]
jgnagy has joined #ruby
jgnagy has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Ping timeout: 258 seconds]
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
agit0 has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
sleetdrop has quit [Remote host closed the connection]
patarr has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
edliss has joined #ruby
astrobunny has joined #ruby
DaniG2k has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 258 seconds]
spicerack has joined #ruby
jamesaxl has joined #ruby
igniting has joined #ruby
gloscombe has quit [Quit: gloscombe]
bman013 has quit [Read error: Connection reset by peer]
raspado has quit [Remote host closed the connection]
gnufied has quit [Remote host closed the connection]
edliss has quit [Ping timeout: 260 seconds]
edliss_ has joined #ruby
DaniG2k has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
lheaded has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
conta has joined #ruby
Mortomes|Work has joined #ruby
certainty has joined #ruby
nowhereman has quit [Ping timeout: 240 seconds]
conta has quit [Remote host closed the connection]
vali has joined #ruby
conta has joined #ruby
lightheaded has joined #ruby
ta_ has joined #ruby
edliss_ has quit [Quit: Lost terminal]
cibs has quit [Ping timeout: 240 seconds]
conta has quit [Client Quit]
cibs has joined #ruby
FooMunki has joined #ruby
vali has quit [Quit: vali]
foul_owl has quit [Ping timeout: 240 seconds]
govg has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
biberu has joined #ruby
conta has joined #ruby
kreantos has joined #ruby
Guest61925 has quit [Quit: Leaving.]
siovene has joined #ruby
anisha has quit [Ping timeout: 256 seconds]
Asher has joined #ruby
Asher is now known as Guest49159
dionysus69 has joined #ruby
Guest49159 is now known as Asher-
andikr has joined #ruby
vali has joined #ruby
cfec0b8d has joined #ruby
nobitanobi has joined #ruby
aganov has joined #ruby
hutch34 has joined #ruby
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
anisha has joined #ruby
hutch34 has quit [Ping timeout: 256 seconds]
Pumukel has joined #ruby
mark_66 has joined #ruby
teclator has joined #ruby
teclator has quit [Read error: Connection reset by peer]
Pumukel has quit [Ping timeout: 240 seconds]
jaequery has joined #ruby
tvw has joined #ruby
antgel has joined #ruby
agit0 has joined #ruby
Arpanet69 has joined #ruby
FooMunki has quit [Quit: FooMunki]
doublemalt__ has quit [Ping timeout: 246 seconds]
lightheaded has quit [Remote host closed the connection]
lightheaded has joined #ruby
araujo has quit [Read error: Connection timed out]
araujo has joined #ruby
olivi____ has joined #ruby
foul_owl has joined #ruby
joneshf-laptop has quit [Ping timeout: 256 seconds]
lightheaded has quit [Ping timeout: 260 seconds]
roamingdog has joined #ruby
nobitano_ has joined #ruby
olivi____ has quit [Ping timeout: 246 seconds]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
nobitanobi has quit [Ping timeout: 268 seconds]
roamingdog has quit [Ping timeout: 260 seconds]
nobitano_ has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 240 seconds]
agit0 has quit [Ping timeout: 260 seconds]
astrobunny has quit [Remote host closed the connection]
certainty has quit [Ping timeout: 246 seconds]
SleepySensei has joined #ruby
astrobunny has joined #ruby
<Bish>
ChickeNES: well i guess MRI parses ruby in c :D
<Bish>
maybe look at the other implementations of ruby, truffleruby or whats it's called? maybe they write it in another language
<Bish>
maybe it's ruby, too though
FooMunki has joined #ruby
<Bish>
unfortunately ruby people tend to write their tools in ruby :o
nowhereman has joined #ruby
jaruga has joined #ruby
jaruga has quit [Remote host closed the connection]
jaruga has joined #ruby
newrubycoder has joined #ruby
pandaant has joined #ruby
pandaant has quit [Client Quit]
FooMunki has quit [Quit: FooMunki]
Pumukel has joined #ruby
<herwin>
ChickeNES: you could try to reuse parse.y from the ruby source tree
Mia has quit [Read error: Connection reset by peer]
lightheaded has joined #ruby
mikecmpbll has joined #ruby
mim1k has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
FooMunki has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
marr has joined #ruby
certainty has joined #ruby
mim1k has quit [Ping timeout: 246 seconds]
cfec0b8d has quit [Ping timeout: 256 seconds]
zeroDi has joined #ruby
Derperperd has quit [Max SendQ exceeded]
Derperperd has joined #ruby
mim1k has joined #ruby
Asher- has quit [Remote host closed the connection]
Asher has joined #ruby
dionysus69 has joined #ruby
jsrn_ has joined #ruby
patarr has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
bkxd has joined #ruby
ayonkhan has joined #ruby
tomphp has joined #ruby
lightheaded has quit [Remote host closed the connection]
patarr has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 264 seconds]
lightheaded has joined #ruby
cfec0b8d has joined #ruby
maattdd has joined #ruby
cuqfye has joined #ruby
znz_jp has quit [Remote host closed the connection]
SleepySensei has quit [Ping timeout: 246 seconds]
znz_jp has joined #ruby
Silthias1 has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
astrobunny has quit [Remote host closed the connection]
kent\n has quit [Quit: No Ping reply in 180 seconds.]
bpmedley has joined #ruby
snickers has joined #ruby
<Bish>
haha mri code is one of the ugliest to read there is
kent\n has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
toretore has joined #ruby
nobitanobi has joined #ruby
shamrock has joined #ruby
jaruga has joined #ruby
Burgestrand has joined #ruby
lxsameer has joined #ruby
rgr has quit [Ping timeout: 256 seconds]
flying has joined #ruby
brent__ has joined #ruby
Silthias1 has quit [Ping timeout: 240 seconds]
Silthias has joined #ruby
brent__ has quit [Ping timeout: 260 seconds]
andikr has quit [Remote host closed the connection]
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andikr has joined #ruby
doublemalt__ has joined #ruby
cfec0b8d has quit [Quit: Leaving.]
bigkevmcd has joined #ruby
workmad3 has joined #ruby
Fernando-Basso has joined #ruby
jeyraof^mbpr has quit [Quit: This computer has gone to sleep]
Burgestrand has quit [Quit: Closing time!]
hutch34 has joined #ruby
rikkipitt has joined #ruby
FooMunki has joined #ruby
shadeslayer_ is now known as shadeslayer
bkxd has joined #ruby
certainty has quit [Ping timeout: 246 seconds]
certainty has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
aufi has quit [Quit: Leaving]
aufi has joined #ruby
jameser has quit [Ping timeout: 258 seconds]
certainty has quit [Ping timeout: 264 seconds]
nobitanobi has quit [Remote host closed the connection]
dlitvak has joined #ruby
certainty has joined #ruby
duckpuppy has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
zeroDi has quit [Quit: WeeChat 1.7]
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti>
Hi
<GeorgesLeYeti>
I need help with nokogiri. I want to return the content and nodes of a specific node. For exemple: html = Nokogiri::HTML("<test>Does. <br/><br/> </test>")
fergal has joined #ruby
<GeorgesLeYeti>
I want to return Does. <br/><br/>
<GeorgesLeYeti>
But if i make html.xpath(".//test").first.content It only return the text Does.
nowhereman has quit [Ping timeout: 260 seconds]
<canton7>
GeorgesLeYeti, .inner_htm, I think
<canton7>
(although it returns 'Does. <br><br>', i.e. it's normalized those br's)
shamrock has quit [Remote host closed the connection]
GeorgesLeYeti has quit [Quit: Leaving]
shamrock has joined #ruby
shamrock has quit [Remote host closed the connection]
fkostovski has joined #ruby
Fernando-Basso has quit [Ping timeout: 256 seconds]
herbert_einstein has joined #ruby
Fernando-Basso has joined #ruby
<herbert_einstein>
Hi, does anyone have a solution to interact with dropdow lists ( option with value )? I have tried most of the cases provided on the web without any success, I would prefer to do it without gems or with mechanize
patarr has joined #ruby
<fkostovski>
selenium is a good choice for scraping data from the web
patarr has quit [Ping timeout: 240 seconds]
tdy has joined #ruby
cuqfye has quit [Remote host closed the connection]
<herbert_einstein>
Selenium is a web-driver but unfortunately it also did not work, even if i cleared the option value first
<herbert_einstein>
I am trying to fill out forms automatically
minimalism has quit [Ping timeout: 246 seconds]
<fkostovski>
have you tried to just open irb and go that from there, that is how i am approaching when i want to try something out, clicking, selecting stuff and make sure that it works ?
<fkostovski>
it is a sweet experience
<fkostovski>
just fire irb and watch the browser open, and do things interactively
<herbert_einstein>
Not yet, I have requested page uri, after evety steps. It stucked all the time when it had to set the option value
antoniobeyah has quit [Quit: Connection closed for inactivity]
Qchmqs has joined #ruby
certainty has quit [Ping timeout: 260 seconds]
<newrubycoder>
A3e57zhphgfjkl
<newrubycoder>
ops lol
rikkipitt has quit [Remote host closed the connection]
rikkipitt has joined #ruby
fkostovski has joined #ruby
<canton7>
might want to change your password ;)
__Yiota has joined #ruby
__Yiota has quit [Client Quit]
fkostovski has left #ruby [#ruby]
fkostovski has joined #ruby
<newrubycoder>
well its for my runescape account anyways
rikkipitt has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
centrx has joined #ruby
mzo has joined #ruby
HoierM has joined #ruby
zapata has quit [Ping timeout: 258 seconds]
Burgestrand has joined #ruby
<fergal>
hi guys. i want to persist some state between runs of my application. yaml::dump/load works somewhat, but loading in the state fails when it encounters IO/Procs. is there a way to tell yaml dump to skip persisting of IO/Procs? or is there another way to persist data that supports IO/Procs? i know that i can implement encode_with to omit named instance vars, but is possible to have a universal encode_with that omits types? i.e. IO/Procs?
nobitanobi has joined #ruby
esObe_ has joined #ruby
tvw has quit [Ping timeout: 260 seconds]
<toretore>
why are they in the data you're trying to persist in the first place?
nobitanobi has quit [Remote host closed the connection]
<fergal>
toretore: because one of my objects uses an ssh connection which is a netssh instance which has a proc
fkostovski has quit [Quit: fkostovski]
hutch34 has joined #ruby
<toretore>
again, why is it in the data you're trying to persist?
esObe_ has quit [Remote host closed the connection]
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fkostovski has joined #ruby
zapata has joined #ruby
mitrek has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
lacrymology has quit [Ping timeout: 240 seconds]
<mitrek>
Why I often see in job oportunities, knowledge in 'python OR ruby'. Are they that similar?
erebel55 has joined #ruby
<erebel55>
lo
<erebel55>
how can I specify the full path to my curl exe in my ruby file? I tried `C:\cygwin64\bin\curl http://google.com` but that didn't work
<erebel55>
I know I can add it to path, but I'm trying to do it without that
<toretore>
erebel55: that doesn't make any sense. gist your code?
<erebel55>
how could I protect it from breaking via '
agent_white has joined #ruby
<herwin>
is there any reason to have a dependency on curl, cygwin and a hardcoded path
<herwin>
instead of using Net::HTTP
<herwin>
or any other http lib
<erebel55>
noobiness
<gaussblurinc1>
or use Heavy Machine Gun "Faraday" if we are talking about ruby
cdg has quit [Remote host closed the connection]
<agent_white>
Mornin' folks
cdg has joined #ruby
nobitanobi has joined #ruby
rikkipitt has joined #ruby
nobitano_ has joined #ruby
fkostovski has joined #ruby
lightheaded has quit [Remote host closed the connection]
lightheaded has joined #ruby
nobitanobi has quit [Ping timeout: 240 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lightheaded has quit [Read error: No route to host]
lightheaded has joined #ruby
ramortegui has joined #ruby
aupadhye has joined #ruby
Derperperd has joined #ruby
cdg has quit [Remote host closed the connection]
anisha has quit [Ping timeout: 260 seconds]
anisha has joined #ruby
<erebel55>
okay converted to Net::HTTP
rikkipitt has quit [Remote host closed the connection]
<erebel55>
still have a dependency on cacert.pem and SSL_CERT_FILE
rikkipitt has joined #ruby
jameser has joined #ruby
<erebel55>
wonder why curl wasn't needing that
lacrymology has joined #ruby
jgnagy has joined #ruby
Mortomes|Work has quit [Ping timeout: 260 seconds]
TomyWork has joined #ruby
aupadhye has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby
<erebel55>
is there anyway to do Net:HTTP with https without requiring this cert?
oz has quit [Quit: EOF]
jgnagy has quit [Ping timeout: 240 seconds]
oz has joined #ruby
roamingdog has joined #ruby
tvw has joined #ruby
nofxxx has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
siovene has quit [Quit: Connection closed for inactivity]
<mnemon>
erebel55: you can disable the certificate verification or feed it a proper cert store, iirc you can use the windows one too. curl uses the system (ca)certs.
roamingdog has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
alphor has quit [Quit: Bye!]
charliesome has joined #ruby
<erebel55>
I see :)
<erebel55>
yeah that worked
<erebel55>
thank you!
<mnemon>
np
<matthewd>
Turning off certificate validation is basically equivalent to using HTTP
millerti has joined #ruby
ozcanesen has joined #ruby
<erebel55>
I see
<erebel55>
yeah posting to the http directly isn't working with the slack web hook stuff
<erebel55>
it wants me to go to the https url
<erebel55>
but it works when I turn off the cert validation via OpenSSL::SSL::VERIFY_NONE
bmurt has joined #ruby
<mnemon>
What he meant is that even if you use https url the data can be intercepted and modified quite easily unlike with https with cert validation.
<erebel55>
right, that makes sense
<mnemon>
with verify_none you're only protected from middle of the session attacks, not from proxies that mitm the handshake.
nettoweb has joined #ruby
DLSteve has joined #ruby
ElDoggo has quit [Remote host closed the connection]
ElDoggo has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mitrek>
let me rephrase my question, are there other good and succint ways to check for a substring in a string or a value inside an array?
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
certainty has quit [Ping timeout: 268 seconds]
<mitrek>
besides the .inside method
<mitrek>
.include*
lightheaded has quit [Read error: No route to host]
cdg has joined #ruby
jameser has quit [Max SendQ exceeded]
certainty has joined #ruby
jameser has joined #ruby
shinnya has joined #ruby
tomphp has joined #ruby
<matthewd>
For a string, you can use =~
lbernardelli has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
raul782 has joined #ruby
<mitrek>
>> print 'yes' if 'ye' =~ 'yes'
paul374 has quit [Ping timeout: 258 seconds]
<ruby[bot]>
mitrek: # => type mismatch: String given (TypeError) ...check link for more (https://eval.in/759037)
Derperperd has quit [Read error: Connection reset by peer]
Derperpe1 has joined #ruby
gaussblurinc1 has quit [Quit: Leaving.]
gnufied has joined #ruby
<matthewd>
include? exists because it is a clear way of expressing something; given more context, there might be another option, but with nothing but a method name (you're even mixing receivers), you're unlikely to get much IMO
<dminuoso>
Let this be the day where we get fresh docs. :-)
sneakerhax has quit [Ping timeout: 240 seconds]
<adaedra>
No time for that currently
<hxegon>
ooooooh 2.4.1!
<dminuoso>
havenwood: Sadly no useful changelog yet. :(
certainty has quit [Ping timeout: 260 seconds]
ferr1 has quit [Quit: WeeChat 1.7]
Pumukel has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
skweek has joined #ruby
snickers has quit [Ping timeout: 246 seconds]
vali has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
roamingdog has joined #ruby
synthroid has joined #ruby
al2o3-cr has joined #ruby
<baweaver>
drat, someone beat me to the topic
jgnagy has joined #ruby
synthroi_ has quit [Ping timeout: 246 seconds]
Didac has joined #ruby
roamingdog has quit [Ping timeout: 258 seconds]
hutch34 has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
patarr has joined #ruby
lightheaded has quit [Remote host closed the connection]
lightheaded has joined #ruby
lightheaded has quit [Read error: No route to host]
brent__ has joined #ruby
gaussblurinc1 has quit [Quit: Leaving.]
lightheaded has joined #ruby
lightheaded has quit [Remote host closed the connection]
lightheaded has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
Bulldoze has joined #ruby
shinnya has quit [Ping timeout: 264 seconds]
fkostovski has quit [Quit: fkostovski]
cagomez has joined #ruby
lightheaded has quit [Ping timeout: 240 seconds]
Qchmqs has quit [Read error: Connection reset by peer]
McSoFake has joined #ruby
dionysus69 has joined #ruby
ableto has joined #ruby
doublemalt__ has quit [Ping timeout: 240 seconds]
hobodave has joined #ruby
<Bulldoze>
Hi everybody, new to Ruby programming and new to #ruby, I need to learn this language fast for a new job. What is best online resource or best book? thanks
doublemalt__ has joined #ruby
stoffus has quit [Ping timeout: 260 seconds]
croberts is now known as Toledo-mtg
jrafanie has joined #ruby
amclain has joined #ruby
<ableto>
Bulldoze: I don't know much about Rubey at the moment but I've been developing in a lot of languages for a lot of years; quick is not the answer. You can learn the syntax quickly (some say a few hours) but you need to learn to solve problems with Ruby
fkostovski has joined #ruby
<darix>
opensuse packge updated to 2.4.1
<ableto>
Everything comes down to problem solving
<hxegon>
Bulldoze: what's your previous experience?
Pumukel has joined #ruby
raspado has joined #ruby
fkostovski has quit [Client Quit]
<Bulldoze>
little bit of Python, but mainly Basic and Pascal over 20 years ago
<mnemon>
Bulldoze: what will you use ruby for?
hays_ has joined #ruby
hays_ has joined #ruby
hays_ has quit [Changing host]
<mnemon>
there's usually pretty big difference between writing rails apps, ruby libs/gems and using it in something like chef (DSL).
<Bulldoze>
automation testing frameworks, so Ruby as a base but with cucumber, gherkin and watir-webdriver
<borodin>
trying to get started with testing ruby - thought I would start with Test::Unit and move on to more exptic forms later. Hoping there is some sort of evolutionary process from Test::Unit to rspec or whatever...
<borodin>
so, I have some ruby code in a path, and I create a rakefile, and I run rake test, and I see /opt/rbenv/versions/2.2.3/bin/ruby -I"lib:tests" "/opt/rbenv/versions/2.2.3/lib/ruby/2.2.0/rake/rake_test_loader.rb"
jdm has quit [Remote host closed the connection]
<borodin>
no errors, no tests ran, I don't get it
<borodin>
can somebody point me to a getting started website or something. I don't know what I am doing
<hxegon>
Bulldoze: Even if you know OO I'd still suggest POODR, because it's cheap, short, and great.
jphase has quit []
<hxegon>
Bulldoze: Also, rubytapas is a great resource if you are better with screencast style learning (which I am)
<hxegon>
Bulldoze: it isn't free, but IMO worth it
jameser has joined #ruby
<Bulldoze>
Thanks just looked at POODR.com that looks interesting - I must admit I dont truly think OO when attempting to find solutions
hobodave_ has joined #ruby
igniting has quit [Ping timeout: 268 seconds]
TomyWork has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
certainty has joined #ruby
mark_66 has quit [Remote host closed the connection]
<ableto>
Bulldoze: I was the same way for many years; it took a 25 yo interviewing me with his hat backwards in a tshirt a few months ago telling me my solutions were "old and tired" to realize my OO was weak and outdated.
jrafanie_ has joined #ruby
fergal has quit [Quit: fergal]
<ableto>
I leaned on a few built in functions and often drafted my own when a builtin existed; I blame it on not paying attention in Algorithms course in college
hobodave has quit [Ping timeout: 260 seconds]
<hxegon>
Bulldoze: That book is what got OO to feel natural for me. Also, any conference talk by the author (Sandi Metz)
muelleme has joined #ruby
<Bulldoze>
I have seen the name Sandi Metz pop up on a few Ruby websites
jdm has joined #ruby
shinnya has joined #ruby
aganov has quit [Remote host closed the connection]
Toledo-mtg is now known as croberts
jrafanie has quit [Ping timeout: 260 seconds]
tlaxkit has joined #ruby
srl295 has joined #ruby
skweek has quit [Ping timeout: 268 seconds]
pilne has joined #ruby
andikr has joined #ruby
bkxd has joined #ruby
<ableto>
hxegon: thanks for POODR, I think that's the primer I needed
<hxegon>
no problem, ableto
<hxegon>
Bulldoze: She's an ex-smalltalk programmer, so she knows her OO
bkxd has quit [Ping timeout: 256 seconds]
gaussblurinc1 has joined #ruby
last_staff has quit [Quit: last_staff]
aufi has quit [Quit: Leaving]
bweston92 has quit [Quit: Connection closed for inactivity]
<ableto>
I'm looking to make a career change of sorts; I've been using PHP and C# to build out pretty simple MVC stuff for years. I wouldn't call myself a genius in any language...I started down the Javascript Stack rabbit hole and...all I see are limitation
<ableto>
*limitations
pulkit4tech has quit [Quit: Connection closed for inactivity]
certainty has quit [Ping timeout: 256 seconds]
<borodin>
+1 Sandi Metz
<ableto>
I have a very wide skill range due to the job I've had for the last 12 years; I'd classify my knowledge as "a mile wide and an inch deep". With that said, I want to move into dev...something. Based on my background a friend suggested Ruby
<ableto>
I can't leave this job until July 1 so I'm hoping I can achieve some level of mastery by then, I would appreciate any other guidance you all may be able to offer
<ytti_>
probably more money in other languages
<ableto>
actually more after schedule flex than money tbh
jdelreal has quit [Quit: Connection closed for inactivity]
chopin has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
muelleme has quit [Ping timeout: 240 seconds]
ishe has joined #ruby
stoffus has quit [Ping timeout: 240 seconds]
roamingdog has joined #ruby
lacrymology has joined #ruby
vali has quit [Ping timeout: 246 seconds]
tubuliferous has quit [Remote host closed the connection]
Pumukel has quit [Remote host closed the connection]
olivi____ has quit [Remote host closed the connection]
conta has quit [Ping timeout: 256 seconds]
roamingdog has quit [Ping timeout: 268 seconds]
fusta has joined #ruby
oliv_____ has joined #ruby
muelleme has joined #ruby
flashbang has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
ishe has quit [Quit: Leaving.]
canton7 has joined #ruby
nobitano_ has quit [Remote host closed the connection]
Bulldoze has quit [Remote host closed the connection]
canton7 has quit [Client Quit]
oliv_____ has quit [Ping timeout: 246 seconds]
canton7 has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
canton7 has quit [Client Quit]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
canton7 has joined #ruby
pulkit4tech has joined #ruby
HoierM has quit [Ping timeout: 240 seconds]
roamingdog has joined #ruby
hays_ has quit [Ping timeout: 260 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JoshS has quit [Ping timeout: 260 seconds]
TomyLobo2 has joined #ruby
flying has quit []
muelleme has quit [Ping timeout: 260 seconds]
SerialCoder has joined #ruby
vali has joined #ruby
<SerialCoder>
I need to make an application that sends or receives files over a serial port. Later I will swap out osme code and it will work with TCP. Should I use ruby? I would be learning hte language as part of this project
<mordof>
trying to parse a host for the domain, and then potentially return if it works out. if it throws an exception, rescue, try something else, potentially return. the ensure ALWAYS HAPPENS
<mordof>
is there a way to do this properly, so that the second ensure return only takes place if either of the other two don't run?
oliv_____ has quit [Remote host closed the connection]
<mordof>
this makes sense i guess, since the first return is inside the begin, and the ensure is meant to always run....
montanonic has joined #ruby
synthroid has joined #ruby
<mordof>
but it's not what i want for this situation
<Papierkorb>
mordof: No, the point of `ensure` is to run always
oliv_____ has joined #ruby
<mordof>
Papierkorb: indeed, that's why i'm asking how i should be setting this up instead
<mordof>
oh
<mordof>
-.- i'm an idiot
<mordof>
i don't need the ensure, i can just put the last return outside the begin escue
<Papierkorb>
you don't need the `return` keyword there
<allisio>
And you can do away with the call to #select and just use #any?.
muelleme has joined #ruby
<mordof>
i like explicit returns
<mordof>
allisio: noted, thanks
__Yiota has joined #ruby
doublemalt__ has quit [Ping timeout: 240 seconds]
paul374 has quit [Ping timeout: 268 seconds]
muelleme has quit [Ping timeout: 246 seconds]
grrrkit has quit [Quit: WeeChat 1.5]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
Fischmiep has joined #ruby
oliv_____ has quit [Remote host closed the connection]
renatosilva has joined #ruby
olivi____ has joined #ruby
Bulldoze has quit [Ping timeout: 258 seconds]
Burgestrand has joined #ruby
Burgestrand has quit [Client Quit]
roamingdog has quit [Remote host closed the connection]
bkxd has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duckpuppy has quit [Ping timeout: 240 seconds]
chopin_ has quit [Remote host closed the connection]
olivi____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
<patarr>
What is the ruby idiomatic way of catching an exception to log it, but immediately propagate it? Is there any shorthand instead of begin ... rescue raise $! ?
Bulldoze has joined #ruby
brent__ has joined #ruby
cloaked1 has joined #ruby
cloaked1 has joined #ruby
cloaked1 has quit [Changing host]
dangerousdave has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
chopin has joined #ruby
<mordof>
patarr: wouldn't it make more sense to put that at an application-level catch? or you want it logged regardless if a higher up level resolves it?
<matthewd>
patarr: `raise` with no argument will raise $!. But log & re-raise doesn't seem very idiomatic to begin with.
duckpuppy has joined #ruby
cdg_ has quit [Ping timeout: 256 seconds]
brent__ has quit [Ping timeout: 240 seconds]
<havenwood>
patarr: do you mean like?: rescue => e; # log here; raise e
<ascio>
is this channel an appropriate place to ask a question about sandi metz's testing advice?
hutch34 has quit [Ping timeout: 268 seconds]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hxegon>
ascio: probably
<matthewd>
BADC0FFEE: I believe that's using built-in pack/unpack formatting in the strings
<hxegon>
?ask ascio
<ruby[bot]>
ascio: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
bmurt has joined #ruby
Derperpe1 has quit [Max SendQ exceeded]
renchan has joined #ruby
Derperpe1 has joined #ruby
<ascio>
ok, cool, and sorry... so I have a SynchronousObject which has a @mutex instance variable, passed in via dependency injection. if I test that a method on SynchronousObject is synchronous by testing that it calls #synchronize on @mutex, does that violate the principle of testing only incoming, not outgoing, commands and queries?
<BADC0FFEE>
how can I print all methods of a gem
<BADC0FFEE>
can this be done w/ irb
Derperpe1 has quit [Max SendQ exceeded]
Derperpe1 has joined #ruby
<ascio>
is there a particular gem you're doing this for?
<hxegon>
BADC0FFEE: you can print all methods of an object at least, use #instance_methods
<ascio>
or does it need to be general?
<BADC0FFEE>
the serialport gem
<BADC0FFEE>
I didnt see a close() method it in 15 line doc
Derperpe1 has quit [Max SendQ exceeded]
ramortegui has joined #ruby
<matthewd>
ascio: Yes. Especially when you consider that you wouldn't just need to test "does this call synchronize", but "does this call synchronize *around the operations that need it*"
<havenwood>
?pry BADC0FFEE
<ruby[bot]>
BADC0FFEE: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
Derperpe1 has joined #ruby
<havenwood>
BADC0FFEE: In Pry try a: ls SerialPort
<ascio>
BADC0FFEE: if you are using pry, and you install ri docs along with your gems, you can do "ri SerialPort" in pry
jdm has joined #ruby
<ascio>
alternatively
<ascio>
just "ri SerialPort" in your shell
<havenwood>
or in irb: help SerialPort
Derperpe1 has quit [Max SendQ exceeded]
<ascio>
matthewd: do you have any pointers for a better way to reason about this requirement?
<ascio>
it seems tangential to the object owning the mutex
<BADC0FFEE>
ty
jottr has joined #ruby
millerti has joined #ruby
aswen has quit [Client Quit]
<ascio>
is the synchronous nature just implementation altogether, that i should ignore when testing?
<matthewd>
ascio: Not really, sorry... a shared mutex does seem to complicate things
<ascio>
alright
muelleme has quit [Ping timeout: 240 seconds]
<ascio>
thank you regardless
jottr has quit [Client Quit]
jottr has joined #ruby
postmodern has joined #ruby
Arpanet69 has joined #ruby
s2013 has joined #ruby
lacrymology has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby
Guest90023 has quit [Ping timeout: 264 seconds]
raspado has joined #ruby
tlaxkit has quit [Quit: ¡Adiós!]
Derperpe1 has quit [Max SendQ exceeded]
Derperpe1 has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
boombox_ has quit [Remote host closed the connection]
fusta has quit [Ping timeout: 246 seconds]
nadir has joined #ruby
Derperpe1 has quit [Max SendQ exceeded]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Derperpe1 has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
<BADC0FFEE>
ruby can do things like
<BADC0FFEE>
iterate through a byte array and put every 7 into a new byte array then append that to a list of byte arrays?
harfangk has joined #ruby
<BADC0FFEE>
I don't want to get started and hten find out something hereis impossible
<allisio>
Ruby is Turing-complete.
<matthewd>
allisio beat me to it
<BADC0FFEE>
=\
<BADC0FFEE>
ok
Bulldoze has joined #ruby
<allisio>
You haven't expressed your intent all that clearly, but yes, Ruby can do it.
noan has quit [Read error: Connection reset by peer]
<matthewd>
BADC0FFEE: Low-level bit shuffling is C's strong suit, and not Ruby's, so that is something to be aware of
<allisio>
That's not true.
<matthewd>
But yes, "manipulate arrays while applying conditions" is definitely going to be just fine
<BADC0FFEE>
allisio: I will need to read from a file, create multiple byte array packets of the data with header and crc on each, then send them out over serial and later tcp
<allisio>
Ruby even has Integer#[] for accessing individual bits in one fell swoop.
<BADC0FFEE>
I also need to read such packets and process with my state machine
<BADC0FFEE>
and write to a file the result
synthroid has quit []
<BADC0FFEE>
ruby shouldnt be a problem? my goal is to use this assignment as a way of learning ruby, as we have a choice of any language
ascio has quit [Ping timeout: 260 seconds]
<BADC0FFEE>
sine the protocol is defined, my ruby app should be able to talk to others C# app
jottr has joined #ruby
jottr has quit [Changing host]
montanonic has joined #ruby
<matthewd>
BADC0FFEE: If you're honestly asking "I need to write to a file. Is that something Ruby will be able to do?", then... I'm not sure what to say.
antgel has joined #ruby
<BADC0FFEE>
?
paul374 has joined #ruby
<BADC0FFEE>
thats only 1% of what I described
<BADC0FFEE>
most of it is working with packetizing the bytes
<BADC0FFEE>
from/to file
jottr has quit [Quit: WeeChat 1.7]
jottr has joined #ruby
<BADC0FFEE>
it sounds like ruby should work fo rthis, so I;m going to begin
<BADC0FFEE>
I've been trying the irb and it was quite nice getting an array of bytes from the file with 2 lines
vali has joined #ruby
<BADC0FFEE>
I think that type of efficiency should make up for the slowdown of learning a new langiage
<BADC0FFEE>
thats a 90% reduction in code size vs c++
cibs has quit [Ping timeout: 246 seconds]
paul374 has quit [Client Quit]
ElDoggo has quit [Remote host closed the connection]
<matthewd>
Also a 90x reduction in runtime efficiency :P
<BADC0FFEE>
thats ok in this case
<BADC0FFEE>
I will continue my C and C++ studies when I need speed
<BADC0FFEE>
for^
cibs has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
<allisio>
He's going the distance.
<BADC0FFEE>
xD
al2o3-cr has joined #ruby
Burgestrand has joined #ruby
Burgestrand has quit [Client Quit]
<BADC0FFEE>
python seems more uptight than ruby
<BADC0FFEE>
the language, not its users)
<allisio>
Most languages are like that.
Derperpe1 has quit [Max SendQ exceeded]
<allisio>
Ruby wants you to run with scissors.
<allisio>
Hell, it wants you to run with a Swiss Army chainsaw.
lxsameer has joined #ruby
planigan has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
<BADC0FFEE>
writing this is going ot be so strange
<BADC0FFEE>
I just learned I likely wont even use a for loop to build each packet
<BADC0FFEE>
perhaps .times will be the way
<BADC0FFEE>
irb is nice to mess around with
vali has quit [Ping timeout: 246 seconds]
hutch34 has joined #ruby
ascio has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<BADC0FFEE>
I've been reading python vs ruby for a couple of days now
<BADC0FFEE>
I'm not closer to clarity
Fischmiep has quit [Quit: WeeChat 1.7]
borodin has quit [Ping timeout: 260 seconds]
sepp2k has quit [Ping timeout: 256 seconds]
vali has joined #ruby
dangerousdave has joined #ruby
<hxegon>
I'd encourage using Enumerable methods instead of times if at all possible BADC0FFEE
<renatosilva>
one clear difference to me is that ruby gives multiple ways to do the same thing, for the sake of "freedom", but no it's just confusion
Arpanet69 has quit [Ping timeout: 260 seconds]
<havenwood>
renatosilva: yet you can say that many ways and we can still understand you just fine
<havenwood>
renatosilva: there is more than one way to do it
<renatosilva>
"hey you can use if bool, or if bool then, ruby gives freedom, so cool, so amazing" -- no it just sucks
cibs has quit [Ping timeout: 240 seconds]
<havenwood>
renatosilva: some languages are designed for the fluent
<hxegon>
My experience with python vs ruby in a nutshell: Programmers bend ruby, Python bends programmers
nofxx has joined #ruby
<havenwood>
renatosilva: do you want to learn a simple language for beginners or something you can grow into and continue to use for years to come?
<hxegon>
^
ableto has quit [Quit: Leaving]
jottr has quit [Ping timeout: 264 seconds]
cibs has joined #ruby
spicerack has joined #ruby
montanonic has quit [Ping timeout: 246 seconds]
knight33 has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
<ascio>
python and ruby are both fine languages with great software written in both
<ascio>
they have different strengths and weaknesses
milardovich has joined #ruby
<DLSteve>
My bigest complaint with Python is the botched Python 2 to 3 migration.
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<DLSteve>
*biggest
<renatosilva>
yeah that sucks
<ascio>
yes, that is a pretty big deterrent for me as well
tvw has joined #ruby
<DLSteve>
Most of my code at work is in Python and it can be a challenge to write code that works on both versions. Some things I have moved to Python 3.4+ only.
enterprisey has quit [Quit: Leaving]
<renatosilva>
on the other side there are people obsessed with backward compatibility like java, as if an atomic bomb would explose somewhere if they removed all the ancient features that prevents the platform from evolving
<nofxx>
ascio, disagree, or, please eg one ruby weakness over python
<allisio>
>weakness over
<nofxx>
and that 2 -> 3 clearly states my point... if it's good it doesn't need to change =P
<nofxx>
hehe this remembers me the guy that wrote angular...twitter about angular 2: "everything will be different"
pulkit4tech has quit [Quit: Connection closed for inactivity]
<hxegon>
nofxx: an example of a weakness, out of control metaprogramming. This is also a strength when used correctly though, but just yesterday I saw code that dynamically defines constants on Object in an initializer :X
<BADC0FFEE>
ascio: what if I can't decide?
<BADC0FFEE>
its eating me alive
<BADC0FFEE>
im wasting more time trying to decide than picking one and learning it
<allisio>
That's pretty dumb.
<ascio>
what do you want to do?
<BADC0FFEE>
I have this problem with everything... it took me 8 months to pick a guitar amp
<allisio>
Are you in ##python lamenting similarly?
<BADC0FFEE>
I was earlier
<hxegon>
I'm kind of in the same boat with FP, but it's better to pick something and stick with it, so just pick ruby BADC0FFEE
<renatosilva>
it all narrows down to people's problems: selfishness, communication, organization, talent...
<allisio>
What's "it" there?
<nofxx>
hxegon, well, one could point that it such a great lang that won't stand on your way, even if you're writing java on it heh =D
<renatosilva>
allisio: the pathetic software we all use and think it's good
<allisio>
renatosilva: You're too young to be so full of such hatred.
<BADC0FFEE>
I'm coming from C++, C#, Some Python. I've only written a couple of <100 line py progs
<renatosilva>
no, it's just pathetic in general
<BADC0FFEE>
ruby I've never used
<nofxx>
BADC0FFEE, just had a great double ristretto brazilian arabic... G00DCOFFEE!
<DLSteve>
BADC0FFEE, Flip a coin and go all in, both languages are good.
<hxegon>
BADBADN0TG00D coffee
dionysus70 has joined #ruby
<renatosilva>
BADC0FFEE: are you a student?
<BADC0FFEE>
yes
<BADC0FFEE>
but they dont teach us ruby or python
<BADC0FFEE>
C++ and C# in school
<BADC0FFEE>
so now I'm trying to expand my abilities on my own
<BADC0FFEE>
and prepare for carreer
<nofxx>
could be worst, could be java
<BADC0FFEE>
-r
dionysus69 has quit [Ping timeout: 260 seconds]
dionysus70 is now known as dionysus69
muelleme has joined #ruby
<renatosilva>
BADC0FFEE: ok, step out all these passionate discussions... don't believe people one tool is good and another is not... have your OWN opinions
<BADC0FFEE>
we were supposed ot learn java but it never happened, i was going to teach myself
<ascio>
honestly the programming language is less important than the ecosystem
<BADC0FFEE>
well ruby feels higher level than python with my first hour here tryiung it
<renatosilva>
BADC0FFEE: that said, you don't need to choose python over ruby, learn both
antgel has quit [Ping timeout: 240 seconds]
montanonic has joined #ruby
<BADC0FFEE>
they are very different
<BADC0FFEE>
in python you seem to do things like len(str)
<renatosilva>
BADC0FFEE: because at work, if their software is python, you can hate python but still know it, and use it.... the same for ruby... for any tool...
<BADC0FFEE>
in ruby, str.len
t-recx has quit [Ping timeout: 240 seconds]
<nofxx>
BADC0FFEE, heheh.. I always make fun out of python ppl with that len thing... looks like they changed in 3
<renatosilva>
BADC0FFEE: if you for example do open source, you'll realize you cannot simply avoid tools that you don't like
<havenwood>
BADC0FFEE: in Perl 6 `len(str)` or `str.len`, you choose ;-)
jrochkind_ has joined #ruby
Bulldoze has quit []
<jrochkind_>
can a ruby `ensure` block know if there was an exception or not?
kreantos has quit [Ping timeout: 260 seconds]
<renatosilva>
nofxx: you brazillian?
<nofxx>
renatosilva, of course you can, in a worst case you can rewrite the whole darn thing... hehe JS being the only exception
<nofxx>
renatosilva, yup, you too?
<BADC0FFEE>
ruby block = c++ lambda?
<BADC0FFEE>
or should I not even worry about this yet
<BADC0FFEE>
I'd like to buy a hard copy of a ruby book but the one by the guy from japan has reviews saying its too difficult
<BADC0FFEE>
(for a beginner)
<renatosilva>
ascio: agree, the language is just one part of the ecosystem... I'd say more... the ecosystem is less important than the people behind it
<BADC0FFEE>
hmm
hutch34 has joined #ruby
<renatosilva>
havenwood: ah the freedom!
<ascio>
um idk, i guess in the sense that they created the ecosystem, but if everyone in the ruby community had a heart attack tomorrow, as long as the infrastructure like rubygems.org etc were still funded, ruby's ecosystem would continue to be pretty great
<havenwood>
BADC0FFEE: A block is like an unnamed lambda that no object is allocated for.
<hxegon>
Maybe we should restrict the english language to only the 10,000 most common words so there's no more "confusion" renatosilva
marxarelli is now known as marxarelli|afk
hutch34 has quit [Ping timeout: 258 seconds]
<nofxx>
hxegon, the internet is already doing that
<renatosilva>
hxegon: maybe you should translate the ruby language, so people have the "freedom" to write their code in native language
Derperpe1 has joined #ruby
loincloth has quit []
<nofxx>
I disagree... code in latin based languages looks just awful renatosilva
<BADC0FFEE>
" I am newbie for both Python and Ruby. I started from Python and like its style very much, especially its indentation. But the name of "Python" and snake pictures/icons (e.g., on official Python Tutorial page) made me feel sick. From this perspective, ruby has a better name than python."
<hxegon>
lol
jamesaxl has quit [Read error: Connection reset by peer]
ascio has quit [Read error: Connection reset by peer]
<nofxx>
BADC0FFEE, I always say that... choosing tech by logo always works. ugly snake or a beautiful gem?
<nofxx>
playful dolphin or an elephant that never forgets with your data?
<nofxx>
it just works
jamesaxl has joined #ruby
bkxd has joined #ruby
<renatosilva>
I want the "freedom" to write string.length, or when I'm tired, string.len, or when I just want, string.size, or when I feel like a poet, string.feelings
<nofxx>
the only exception (every rule has anyways) GNU stuff, nothing beats a gnu logo in facepalm per minute
montanonic has quit [Ping timeout: 240 seconds]
badeball_ has quit [Remote host closed the connection]
badeball has joined #ruby
<BADC0FFEE>
what does string.feelings return
<hxegon>
nothing unless you define it
<renatosilva>
nofxx: dolphin and elephant are for what?
<allisio>
renatosilva: That's embarrassing.
<BADC0FFEE>
elephan is php
<nofxx>
renatosilva, mysql vs pg
<allisio>
You sure talk like you know your shit.
<renatosilva>
nofxx: ah :)
<hxegon>
renatosilva: why is freedom in double quotes? Are you advocating restricting possible method names to only "serious", "businessy" words?
<allisio>
He's aimlessly complaining because that's what children do.
<hxegon>
string.to_tps_report or die?
<hxegon>
renatosilva: you know, you could probably do that in ruby by redefining how methods are defined, making it check a list of accepted possible names.
<BADC0FFEE>
can anyone recommend a physical book for ruby that isnt "The Ruby Programmng Language"
<BADC0FFEE>
the reviews said it's too difficult for a beginner and I can't learn as well from ebooks
<renatosilva>
def feelings; puts 'I love the freedom for creating confusion instead of actual freedom'; end
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
solocshaw has joined #ruby
<hxegon>
BADC0FFEE: POODR, but that isn't really an introductory text. Let me look around real quick and see if I can find something
<BADC0FFEE>
thank you, hxegon
<nofxx>
renatosilva, "I came here to confuse you, not to explain!" Chacrinha =D
<BADC0FFEE>
I know the C++ community talks about "books that should never be read" not sure if its the same for ruby
<BADC0FFEE>
thats why I ask here
bkxd has quit [Ping timeout: 240 seconds]
muelleme has quit [Ping timeout: 256 seconds]
<renatosilva>
nofxx: nao seria Tom Zé? :)
<allisio>
TRPL shouldn't be too difficult for someone with prior programming exposure.
<nofxx>
renatosilva, impersonating Chacrinha... that quote is from like 1970, 1980....
dangerousdave has joined #ruby
<matthewd>
I still default to recommending pickaxe
<renatosilva>
nofxx: ah, you from that time?
<hxegon>
BADC0FFEE: Why's poignant guide to ruby is great. Not a thorough text, but one every ruby programmer should read once
<nofxx>
BADC0FFEE, small and nice: chris pine's learn to program, and why's poingnant guide
<nofxx>
chris pine you can finish in an afternoon with programming background
<nofxx>
renatosilva, nope, born in 84
<BADC0FFEE>
I will look into those, ty
<nofxx>
BADC0FFEE, both online, not physical but worthy
<hxegon>
nofxx, BADC0FFEE actually there is at least a physical why's poingnant guide
<matthewd>
It's obviously not going to cover post-2.0 features, but since then, while some things have been added, nothing's really changed or gone away
hutch34 has joined #ruby
andikr has joined #ruby
<agent_white>
Tossing in my 2c. I found rubymonks to be extremely helpful, especially their explanations on metaprogramming and callbacks.
<hxegon>
Basically series of exercises that get you into the groove of ruby programming
djbkd has quit [Remote host closed the connection]
<nofxx>
matthewd, in my humble op, pickaxe isn't enjoyable for a starter, more like after you wrote something thing
pLaTo0n has joined #ruby
<pLaTo0n>
moin
<allisio>
Is there something for getting into the rube of Groovy programming?
<hxegon>
lol allisio
<BADC0FFEE>
ty
<renatosilva>
BADC0FFEE: you could also pick any you can find, then ask here when you have questions
<matthewd>
It worked for me.. but that was a different edition, a long time ago, and with a lot fewer alternatives available
spicerack has quit [Ping timeout: 240 seconds]
montanonic has joined #ruby
borodin has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
marxarelli|afk is now known as marxarelli
<BADC0FFEE>
its too soon to make a call... but ruby looks really nice.
<Disavowed>
nofxx: re: Python 'string'.len - we definitely don't have that! I just tried in 3.6.0 - I've always been baffled as to why len() is a builtin
<BADC0FFEE>
I feel a bit of excitement xD
<Disavowed>
3.6.0 is the latest version for context.
<renatosilva>
BADC0FFEE: it is nice
<borodin>
I am running minitest like this: ruby test.rb and it tells me "Run with --verbose for details." - how do I do that? ruby test.rb --verbose ?
__Yiota has joined #ruby
<allisio>
borodin: Other way.
<nofxx>
Disavowed, not coding python but sure there is... maybe .length ? or something else
<allisio>
Nope.
<borodin>
ruby --verbose test.rb?
<allisio>
You call the `len()` function for anything you want the length of, which defers to the object's __len__() method.
enterprisey has joined #ruby
<Disavowed>
BADC0FFEE: For what it's worth, I've been programming Python for about 8 years and Ruby for about one. For personal projects, I'll generally reach for Ruby. There's less 'WTF?!' moments with it and things like Rails are just orders of magnitude better than their Python counterparts. I'd go Ruby, but whatever you pick, you should be able to transfer to the other one pretty easily
<Disavowed>
Count sounds like it'll do what you want, but really it counts instances in a substring
<BADC0FFEE>
with C++ and ruby, I'm not sure where python would fit in
<Disavowed>
BADC0FFEE: I wouldn't say lower level especially. They both share many many similarities
<BADC0FFEE>
unless I needed to use it for work, or working with math or data
<BADC0FFEE>
scientific data
<Disavowed>
If you're going with sciency stuff or natural language, Python is the better pick. Anything else, I'd go Ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 260 seconds]
<BADC0FFEE>
Disavowed: is it absurd or completely reasonable to develop a serial port application with byte array packet protocol using ruby
__Yiota has joined #ruby
<Disavowed>
Actualyl saying that, I'm not sure what Ruby is like for crunching large amounts of data - Python has things like Pandas which are pretty good. Perhaps someone better versed in Ruby than me could make that call for you
<BADC0FFEE>
vs C#/C++ --- or python
workmad3 has joined #ruby
<Disavowed>
BADC0FFEE: I wouldn't say absurd at all. Although I'm unfamiliar with Ruby's offerings in that area so I'd naturally reach for Python's Twisted, but I'm sure Ruby has a similar thing
<BADC0FFEE>
I will read from a file, packetize it into fixed size byte array packets, send over serial (and later tcp)
<renatosilva>
the closer to the hardware, the more you want C++/C
<renatosilva>
the closer to the people, the more you want ruby/python/C#/Java
<Disavowed>
Oh, Event Machine is the Ruby equivalent.
<Disavowed>
BADC0FFEE: What renatosilva said ^
<Disavowed>
TIL logstash is written in EventMachine
<BADC0FFEE>
alright
djbkd has joined #ruby
t-recx has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
matcouto has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
hutch34 has joined #ruby
* BADC0FFEE
agonizes
Karunamon|2 has joined #ruby
Karunamon has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brent__ has quit [Remote host closed the connection]
Puffball has quit [Remote host closed the connection]
muelleme has joined #ruby
<BADC0FFEE>
great site, ty
<BADC0FFEE>
I can compare the same program in different langiages
<BADC0FFEE>
very nice
nowhere_man has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has joined #ruby
paulmcquad has joined #ruby
nobitanobi has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
Puffball has joined #ruby
<Disavowed>
AndroUser123: I'm not amazing at Ruby or anything but it looks like you're sorting that array on each pass - I'd bet that's where your time is spent. Is there a better way of tracking state?
jgnagy has joined #ruby
fusta has quit [Quit: Leaving]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hurricanehrndz has quit [Quit: Goodbye]
jdm has quit [Remote host closed the connection]
hutch34 has joined #ruby
prions_ has quit [Ping timeout: 268 seconds]
brent__ has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
JeanCarloMachado has quit [Ping timeout: 246 seconds]
ascio has quit [Read error: Connection reset by peer]
<AndroUser123>
this also doesnt work
bkxd has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
ldnunes has quit [Quit: Leaving]
dasher00 has quit [Ping timeout: 246 seconds]
<Disavowed>
AndroUser123: You have a nested loop so your algorithm is performing at O(n2). Is there a better solution? O(n)? O(log n) perhaps? What about memoization?
dasher00 has joined #ruby
renchan has quit [Remote host closed the connection]
<AndroUser123>
i got 2 arrays , in first array there are user scores after each level and in second top scores , i need to type for each score in first array what score is it in 2nd
balazs has joined #ruby
<AndroUser123>
like 1st[0] is 6th place 1st[n-1] is 1st place
<AndroUser123>
for example
haylon has quit [Quit: Leaving]
Guest24 has joined #ruby
<matthewd>
Yes, I understand the objective. Walk me through how your code achieves that.
SleepySensei has quit [Ping timeout: 246 seconds]
duckpupp1 has joined #ruby
antgel has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xenops has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<AndroUser123>
if element in user score is very lower than lowest in leaderboards its last then
electrostat has quit [Quit: uwotm8]
opt has left #ruby ["WeeChat 1.4"]
<AndroUser123>
i added uniq! on line five
<AndroUser123>
since code on line 13 wouldnt work without it
electrostat has joined #ruby
agent_white has quit [Quit: brbgoinhome]
tomphp has joined #ruby
muelleme has quit [Ping timeout: 240 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has quit [Read error: Connection reset by peer]
millerti has joined #ruby
centrx has joined #ruby
centrx has joined #ruby
centrx has quit [Changing host]
JeanCarloMachado has joined #ruby
__Yiota has joined #ruby
Verity has joined #ruby
tobiasvl has quit [Ping timeout: 246 seconds]
xenops has joined #ruby
hahuang65 has joined #ruby
<Verity>
I need to write an application that reads from a file, packetizes the data into byte arrays with header, crc, etc, then sends them out over serial and later I will change to TCP (the packet will be the payload in the tcp, I'm not writing it all scratch) I have about a year experience with C++ 2 small programs of python, a month or so of C# and no ruby. Should I choose C++, Python, or Ruby?
<hxegon>
Hmm...........
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang61 has joined #ruby
<hxegon>
Deja vu
aaooki has quit [Remote host closed the connection]
<Verity>
hxegon, its me =D, sorry.
<Verity>
just getting one last payload of advice before I commence
<hxegon>
There's no right answer
<Verity>
=\
<hxegon>
There are reasons someone would choose any of the three and be correct for those reasons, but it depends
<Verity>
I need to solve this life-issue of not being able to make decisions, it paralyzes me.
<Disavowed>
Verity: You'd get on really well with my mate BADC0FFEE
gaussblurinc1 has quit [Quit: Leaving.]
<hxegon>
and his friend SerialCoder
dangerousdave has joined #ruby
<Verity>
xD
loincloth has joined #ruby
<hxegon>
Verity: what do you want to do it in?
<Disavowed>
I'm assuming I'll see the exact same sentence if I scroll over to #Python? Honestly, you could have written it by now!
<Verity>
Disavowed, its there
<Verity>
No sense in asking just one "side" =P
<Disavowed>
I'm only playing
<Disavowed>
I agree
<centrx>
Ruby can make your decision for you. There's a gem for that
<matthewd>
Your code is wasting effort, which will make it too slow
esObe_ has joined #ruby
mikecmpbll has joined #ruby
Nightmare has quit [Ping timeout: 264 seconds]
<AndroUser123>
can you make it faster
<matthewd>
scores is known to be sorted, so you know where the minimum value is; you don't need to use .min to find it
<AndroUser123>
alice is sorted also
<matthewd>
... and that line isn't using anything from the loop, so there's no reason to put it in there
solocshaw has quit [Ping timeout: 246 seconds]
<matthewd>
finally, you're using each_with_index, but then you're not using `i`
vali has quit [Quit: vali]
<AndroUser123>
lol i just saw that
<AndroUser123>
thanks
<AndroUser123>
how do i skip one each do
jrafanie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<AndroUser123>
ah next if
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baked__beans has quit [Ping timeout: 240 seconds]
ascio has quit [Read error: Connection reset by peer]
<AndroUser123>
i can delete elements from alice when i print them
<matthewd>
gist what you have now
<AndroUser123>
sec
<matthewd>
If you've fixed the issues I noted above, it should be performing much better
jtperreault has joined #ruby
<Disavowed>
I'm impressed that Ruby has a native binary search. How are Arrays implemented to achieve that? Are they actually a tree behind the scenes, or is there some trickery in the implementation (ie it builds one on the fly or somthing)?
<AndroUser123>
still too slow
<matthewd>
Disavowed: It just uses an index
<allisio>
It's just a convenience method that doesn't have much bearing on the internal structure of Arrays.
duckpupp1 has quit [Ping timeout: 246 seconds]
lacrymology has joined #ruby
<AndroUser123>
how would you solve that challenge?
<AndroUser123>
your code i mean
<matthewd>
AndroUser123: That rather defeats the purpose of the exercise, does it not?
centrx has quit []
JeanCarloMachado has quit [Ping timeout: 258 seconds]
<Disavowed>
I don't see how that can be the case if it's getting O(log n) - are there any writeups on the subject that you guys know of?
Tralin has joined #ruby
<AndroUser123>
it does
JeanCarloMachado has joined #ruby
<AndroUser123>
but i got to study another subject this is just my hobby
<AndroUser123>
i deserve an answer?
<AndroUser123>
or so
<AndroUser123>
and i am on this problem for 2 hours
FooMunki has quit [Quit: FooMunki]
<allisio>
Admit that you're not here to learn and we'll move forward on that premise.
hxegon is now known as hxegon_afk
<AndroUser123>
i could admit it but that would be false
<Verity>
I'm here to learn
FooMunki has joined #ruby
planigan has quit [Quit: leaving]
<baweaver>
that's truth
planigan has joined #ruby
Nightmare has joined #ruby
LBRapid has joined #ruby
<AndroUser123>
ok i will come here tomorrow if i dont solve this
olivi____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
ascio has joined #ruby
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
jdm has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GodFather has quit [Ping timeout: 246 seconds]
GodFather has joined #ruby
TomyLobo2 has quit [Ping timeout: 240 seconds]
muelleme has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
thulsa_legume[m] has joined #ruby
oliv_____ has quit [Remote host closed the connection]
paulmcquad has left #ruby [#ruby]
lacrymology has quit [Ping timeout: 240 seconds]
oliv_____ has joined #ruby
oliv_____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
charliesome has joined #ruby
polishdub has quit [Quit: Leaving]
<cagomez>
I have an array with [{"foo": 1}, {"bar": 2}]. how would I pass this array to an object and use it to init the object with the values as properties, like myobj.foo, to equal their respective values? ie myobj.foo = 1, myobj.bar = 2, etc
<A124>
Windows SSL certificates, how do I fix those?
<A124>
For HTTPS.
muelleme has quit [Ping timeout: 258 seconds]
<allisio>
cagomez: Sounds like you "want" OpenStruct.
<Radar>
Or if you want to be fancy: [{"foo": 1}, {"bar": 2}].map(&OpenStruct.method(:new))
duckpupp1 has joined #ruby
<cagomez>
allisio: I was trying to insantiate an object that i Would use as a viewmodel. how would i incorporate an openstruct into my viewmodel class? I just want to call myviewmodel.foo in my .erb file
<allisio>
cagomez: What's wrong with `myviewmodel['foo']`?
SeepingN has joined #ruby
<cagomez>
myviewmodel can have will be used for a 2 separate objects, which don't have the same attribute. but they will have separate .erb files. I would like to just use 1 viewmodel object
D9- has quit [Quit: Quit]
D9 has joined #ruby
biberu has quit []
djbkd has joined #ruby
lacrymology has joined #ruby
<Disavowed>
TIL Openstruct. Is this considered a good idiom? Because I feel like I'm going to use it everywhere!
olivi____ has quit [Remote host closed the connection]
planigan has quit [Quit: leaving]
planigan has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]