apeiros changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.10: https://www.ruby-lang.org || Paste >3 lines of text on https://gist.github.com || Rails questions? Ask on #RubyOnRails || logs @ https://irclog.whitequark.org/ruby/
saneax is now known as saneax-_-|AFK
hightower2 has quit [Ping timeout: 276 seconds]
programmerq has quit [Ping timeout: 240 seconds]
ICantCook has joined #ruby
tubuliferous has joined #ruby
nemesit|znc has quit [Quit: quit]
programmerq has joined #ruby
hightower2 has joined #ruby
asal2107 has quit [Ping timeout: 276 seconds]
nando293921 has quit [Ping timeout: 244 seconds]
Yzguy has quit [Quit: Bye]
sepp2k has quit [Ping timeout: 276 seconds]
rose_ has quit [Quit: Ex-Chat]
skweek has joined #ruby
nankyokusei has joined #ruby
jarred has quit [Quit: Connection closed for inactivity]
_sfiguser has quit [Quit: Leaving]
sleepee has quit [Ping timeout: 264 seconds]
nitric_ has quit [Ping timeout: 244 seconds]
xentity1x has quit [Ping timeout: 240 seconds]
barajasfab has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
moei has quit [Quit: Leaving...]
jax has joined #ruby
jax has left #ruby ["Leaving"]
millerti has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhack has joined #ruby
tdy has joined #ruby
piercedwater has joined #ruby
<piercedwater> i have an external javascript file that i can see being modified when i update it through the .js file. but my rails app is not executing the js code (simple alert). Can someone please help me
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
<piercedwater> oh no no one knows this guy
ResidentBiscuit has joined #ruby
<piercedwater> how dare he come in here asking for hep
<piercedwater> help
<piercedwater> ;)
codelogix has quit [Ping timeout: 276 seconds]
<adam12> piercedwater: Normally you're best to get answers for Rails in #RubyOnRails
<piercedwater> ok ty
<adam12> so ask it in there and I'll help you
<adam12> ;)
<piercedwater> well it was fun guys
<piercedwater> gotta go
<piercedwater> ;)
piercedwater has left #ruby ["bvl"]
Mrgoose has quit [Ping timeout: 240 seconds]
jphase has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
jphase has joined #ruby
codelogix has joined #ruby
harai has joined #ruby
dukedave has quit [Ping timeout: 244 seconds]
unforgiven512 has quit [Ping timeout: 244 seconds]
Majost has quit [Ping timeout: 244 seconds]
mgorbach has quit [Ping timeout: 244 seconds]
pizzaops has quit [Ping timeout: 244 seconds]
moshee has quit [Ping timeout: 244 seconds]
Majost has joined #ruby
dukedave has joined #ruby
pizzaops has joined #ruby
crankhar1er has quit [Ping timeout: 244 seconds]
constantinexvi has quit [Ping timeout: 244 seconds]
Mission-Critical has quit [Ping timeout: 244 seconds]
jphase has quit [Ping timeout: 272 seconds]
jaguarmagenta has quit [Ping timeout: 276 seconds]
jonadab has quit [Ping timeout: 244 seconds]
havenwood has quit [Ping timeout: 244 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
\13k has quit [Ping timeout: 244 seconds]
gnarf has quit [Ping timeout: 244 seconds]
mgorbach has joined #ruby
codelogix has quit [Ping timeout: 240 seconds]
techietrash has quit [Ping timeout: 244 seconds]
havenwood has joined #ruby
\13k has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
techietrash has joined #ruby
constantinexvi has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jonadab has joined #ruby
crankharder has joined #ruby
_djbkd has quit [Quit: My people need me...]
redpants has quit [Ping timeout: 264 seconds]
JeanCarloMachado has quit [Remote host closed the connection]
ramfjord has joined #ruby
JeanCarloMachado has joined #ruby
ramfjord_ has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Client Quit]
JeanCarloMachado has joined #ruby
cgfbee has quit [Excess Flood]
JeanCarloMachado has quit [Read error: Connection reset by peer]
emlee has joined #ruby
gnarf has joined #ruby
JeanCarloMachado has joined #ruby
cgfbee has joined #ruby
tmtwd has joined #ruby
unforgiven512 has joined #ruby
nofxx has quit [Ping timeout: 244 seconds]
codelogix has joined #ruby
frankiee_ has quit [Ping timeout: 276 seconds]
sonyayahab has quit [Quit: Leaving]
agent_white has quit [Quit: backinbit]
JeanCarloMachado has quit [Ping timeout: 276 seconds]
MissionCritical has joined #ruby
sleepee has joined #ruby
prawnzy has quit [Remote host closed the connection]
prawnzy has joined #ruby
sleepee has quit [Read error: Connection reset by peer]
ARCADIVS has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
horst has quit [Quit: horst]
Pupeno has joined #ruby
Guest59596 is now known as IceDragon
flughafen_ has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has quit [Ping timeout: 276 seconds]
enterprisey has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
barajasfab has quit [Ping timeout: 272 seconds]
Rickmasta has joined #ruby
askhat has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
nando293921 has joined #ruby
askhat has joined #ruby
flughafen_ has joined #ruby
askhat has quit [Client Quit]
sdothum has quit [Quit: ZNC 1.6.3 - http://znc.in]
codelogix has quit [Ping timeout: 272 seconds]
jphase has joined #ruby
replay_ has quit [Quit: Textual IRC Client: www.textualapp.com]
A_Drone has joined #ruby
A_Drone has quit [Remote host closed the connection]
hutch34_ has joined #ruby
blackmesa has joined #ruby
barajasfab has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
Bellthoven has joined #ruby
hutch34_ has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
M-manveru has joined #ruby
jhack has quit [Ping timeout: 264 seconds]
jphase has quit [Ping timeout: 272 seconds]
prawnzy has quit [Remote host closed the connection]
wingwalker has joined #ruby
roamingdog has quit [Remote host closed the connection]
ruby_ has quit [Remote host closed the connection]
hahuang62 has joined #ruby
mtkd has quit [Ping timeout: 264 seconds]
ninja007 has quit [Quit: ninja007]
fullofca_ has joined #ruby
hahuang62 has quit [Ping timeout: 276 seconds]
fullofcaffeine has quit [Ping timeout: 240 seconds]
redpants has joined #ruby
safetypin has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
duderono_ has quit [Ping timeout: 244 seconds]
fullofca_ has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
mtkd has joined #ruby
beatdown has quit [Quit: ZNC 1.6.1 - http://znc.in]
fullofcaffeine has quit [Ping timeout: 272 seconds]
beatdown has joined #ruby
ruby_ has joined #ruby
skweek has quit [Ping timeout: 264 seconds]
ruby_ has quit [Remote host closed the connection]
ruby_ has joined #ruby
jcao219 has quit [Ping timeout: 276 seconds]
wingwalker has quit [Ping timeout: 272 seconds]
fullofcaffeine has joined #ruby
horst has joined #ruby
wingwalker has joined #ruby
nankyokusei has joined #ruby
cdg has joined #ruby
A_Drone has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
fullofca_ has joined #ruby
fullofcaffeine has quit [Ping timeout: 244 seconds]
mikeiniowa has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
mtkd has quit [Ping timeout: 272 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
barajasfab has quit [Ping timeout: 272 seconds]
tubuliferous has quit [Ping timeout: 272 seconds]
charliesome has joined #ruby
M-shine has joined #ruby
codelogix has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codelogix has quit [Ping timeout: 240 seconds]
Ropeney has joined #ruby
jaguarmagenta has joined #ruby
A_Drone has quit [Ping timeout: 264 seconds]
zeroDi has quit [Quit: WeeChat 1.5]
hutch34_ has joined #ruby
duderonomy has joined #ruby
blackmesa has joined #ruby
crdpink__ has quit [Read error: No route to host]
jaguarmagenta has quit [Ping timeout: 272 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
tmtwd has joined #ruby
wingwalker has quit [Ping timeout: 264 seconds]
hutch34_ has quit [Ping timeout: 240 seconds]
ResidentBiscuit has quit [Ping timeout: 272 seconds]
johnny56_ has quit [Quit: WeeChat 1.4-dev]
blackmesa has quit [Ping timeout: 272 seconds]
toni has quit [Ping timeout: 264 seconds]
nofxx has joined #ruby
enterprisey has quit [Remote host closed the connection]
symm- has joined #ruby
roamingdog has joined #ruby
A_Drone has joined #ruby
roamingdog has quit [Ping timeout: 264 seconds]
ninja007 has joined #ruby
A_Drone has quit [Remote host closed the connection]
sphex has joined #ruby
xentity1x has joined #ruby
Wizznt has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ramfjord has quit [Ping timeout: 240 seconds]
nanoz has joined #ruby
nanoz has joined #ruby
nanoz has quit [Changing host]
braincrash has quit [Quit: bye bye]
barajasfab has joined #ruby
hahuang62 has joined #ruby
Wizznt has joined #ruby
jswe has quit [Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in]
Madplatypus has quit [Quit: Connection closed for inactivity]
djbkd has joined #ruby
moei has joined #ruby
gnufied has quit [Ping timeout: 272 seconds]
astrobunny has joined #ruby
horst has quit [Quit: horst]
jswe has joined #ruby
codelogix has joined #ruby
braincrash has joined #ruby
brendan- has joined #ruby
codelogix has quit [Ping timeout: 240 seconds]
hahuang62 has quit [Ping timeout: 272 seconds]
A_Drone has joined #ruby
aries_liuxueyang has quit [Quit: No Ping reply in 180 seconds.]
safetypin has quit [Quit: ZZZzzz…]
aries_liuxueyang has joined #ruby
rsampaio_ has joined #ruby
arescorpio has joined #ruby
safetypin has joined #ruby
A_Drone has quit [Ping timeout: 276 seconds]
aryaching has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jaguarmagenta has joined #ruby
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
tubuliferous has joined #ruby
pwnd_nsfw has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
ninja007 has quit [Quit: ninja007]
djbkd has quit [Read error: Connection reset by peer]
A_Drone has joined #ruby
djbkd has joined #ruby
gix has quit [Ping timeout: 240 seconds]
Bellthoven has quit []
redpants has quit [Ping timeout: 276 seconds]
tenderlo_ has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
ninja007 has joined #ruby
jenrzzz has joined #ruby
tubuliferous has quit [Quit: ZNC - http://znc.in]
gix has joined #ruby
blackmesa has joined #ruby
prawnzy has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
roamingdog has joined #ruby
tmtwd has quit [Ping timeout: 272 seconds]
prawnzy has quit [Ping timeout: 244 seconds]
dtscode has joined #ruby
roamingdog has quit [Ping timeout: 240 seconds]
cdg_ has joined #ruby
vdamewood has joined #ruby
tmtwd has joined #ruby
cdg has quit [Ping timeout: 272 seconds]
beauby has quit [Ping timeout: 264 seconds]
craigp has quit [Ping timeout: 272 seconds]
crdpink__ has joined #ruby
A_Drone has quit [Remote host closed the connection]
Rodya__ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
arescorpio has quit [Quit: Leaving.]
harfangk has quit [Ping timeout: 240 seconds]
JoshS has joined #ruby
harfangk has joined #ruby
Rodya_ has quit [Ping timeout: 272 seconds]
roflmyeggo has joined #ruby
harai has quit [Ping timeout: 272 seconds]
horst has joined #ruby
sdwrage has quit [Quit: Leaving]
nankyokusei has joined #ruby
codelogix has joined #ruby
sneakerhax has joined #ruby
safetypin has quit [Quit: ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 264 seconds]
codelogix has quit [Ping timeout: 272 seconds]
roflmyeggo has quit [Ping timeout: 276 seconds]
nanoz has quit [Read error: Connection reset by peer]
tonini has joined #ruby
Sucks has joined #ruby
ichkv has joined #ruby
Sucks has quit [Quit: Leaving]
crdpink__ has quit [Quit: Konversation terminated!]
Sucks has joined #ruby
SuperLag_ has joined #ruby
eizua has joined #ruby
SuperLag has quit [Ping timeout: 244 seconds]
hutch34_ has joined #ruby
SuperLag has joined #ruby
SuperLag_ has quit [Ping timeout: 276 seconds]
gizless has joined #ruby
blackmesa has joined #ruby
gizmore has quit [Ping timeout: 265 seconds]
hutch34_ has quit [Ping timeout: 272 seconds]
jaequery has joined #ruby
cdg_ has quit [Read error: Connection reset by peer]
cdg has joined #ruby
roamingdog has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
crdpink__ has joined #ruby
CloCkWeRX has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
roamingdog has quit [Ping timeout: 272 seconds]
prawnzy has joined #ruby
yeticry has quit [Ping timeout: 244 seconds]
craigp has joined #ruby
yeticry has joined #ruby
djbkd has quit [Remote host closed the connection]
Rickmasta has quit [Ping timeout: 240 seconds]
ishe_ua has joined #ruby
dminuoso has joined #ruby
A_Drone has joined #ruby
jcao219 has joined #ruby
bocaneri has joined #ruby
CloCkWeRX has joined #ruby
A_Drone has quit [Ping timeout: 264 seconds]
blackwind_123 has quit [Ping timeout: 255 seconds]
horst has quit [Quit: horst]
cdg has quit [Ping timeout: 272 seconds]
codelogix has joined #ruby
dminuoso has quit [Remote host closed the connection]
Rickmasta has joined #ruby
djbkd has joined #ruby
codelogix has quit [Ping timeout: 240 seconds]
djbkd has quit [Client Quit]
Dimik has joined #ruby
dminuoso has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ruby_ has quit [Remote host closed the connection]
<dminuoso> Mmm, so I have a situation where I parse some user input with a simple syntax. The user specifies multiple items separated by comma with optional whitespace, and each item can modifiers and things like "1a", "1-10", "m5-10". Right now Im simply parsing this with regular expressions, but it's kind of messy already using backreferences with nested case switches.
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
moeabdol has joined #ruby
<dminuoso> So I was thinking of using a simple parser library (perhaps parslet) - am I overthinking this?
grh has joined #ruby
Devalo has joined #ruby
ur5us has quit [Ping timeout: 272 seconds]
A_Drone has joined #ruby
fullofcaffeine has joined #ruby
fullofca_ has quit [Ping timeout: 264 seconds]
Madplatypus has joined #ruby
sneakerhax has quit [Quit: Back later]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
A_Drone has quit [Read error: Connection reset by peer]
nando293921 has quit [Ping timeout: 272 seconds]
moeabdol has quit [Ping timeout: 240 seconds]
grh has quit [Remote host closed the connection]
barajasfab has quit [Ping timeout: 272 seconds]
Sucks has quit [Ping timeout: 272 seconds]
Vingador has joined #ruby
A_Drone has joined #ruby
Vingador has quit [Remote host closed the connection]
blackmesa has joined #ruby
last_staff has joined #ruby
tmtwd has quit [Ping timeout: 264 seconds]
ayonkhan has joined #ruby
alexherbo2 has quit [Quit: WeeChat 1.5]
blackmesa has quit [Ping timeout: 276 seconds]
moeabdol has joined #ruby
Devalo has quit [Remote host closed the connection]
ichkv has quit [Remote host closed the connection]
mac_ has quit [Quit: This computer has gone to sleep]
frankiee_ has joined #ruby
ichkv has joined #ruby
ta_ has quit [Remote host closed the connection]
matp has quit [Quit: ZZzzzZz...]
tmtwd has joined #ruby
amclain_ has quit [Quit: Leaving]
ayonkhan has quit [Read error: Connection reset by peer]
ayonkhan has joined #ruby
ayonkhan has quit [Client Quit]
Macaveli has joined #ruby
aryaching has quit [Ping timeout: 272 seconds]
postmodern has joined #ruby
aryaching has joined #ruby
A_Drone has quit [Remote host closed the connection]
tax has joined #ruby
transhuman has quit [Remote host closed the connection]
jshjsh has joined #ruby
JoshS has quit [Disconnected by services]
horst has joined #ruby
jshjsh is now known as JoshS
nankyokusei has joined #ruby
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jshjsh has joined #ruby
JoshS has quit [Disconnected by services]
codelogix has joined #ruby
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
CloCkWeRX has quit [Ping timeout: 244 seconds]
JoshS has joined #ruby
Snickers has joined #ruby
matp has joined #ruby
Ropeney has quit [Ping timeout: 244 seconds]
nankyokusei has quit [Ping timeout: 264 seconds]
jshjsh has quit [Ping timeout: 272 seconds]
codelogix has quit [Ping timeout: 264 seconds]
roamingdog has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
wugy has joined #ruby
mtkd has joined #ruby
rsampaio_ has quit [Ping timeout: 272 seconds]
fullofca_ has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
Pupeno has joined #ruby
fullofcaffeine has quit [Ping timeout: 244 seconds]
firstdayonthejob has joined #ruby
moeabdol has joined #ruby
A_Drone has joined #ruby
CloCkWeRX has joined #ruby
andikr has joined #ruby
alexherbo2 has joined #ruby
crdpink__ has quit [Quit: Konversation terminated!]
moeabdol has quit [Ping timeout: 276 seconds]
Pumukel has joined #ruby
crdpink__ has joined #ruby
A_Drone has quit [Remote host closed the connection]
hutch34_ has joined #ruby
blaxter has joined #ruby
a7d7p has joined #ruby
<a7d7p> Ruby is my first software language, and I want to learn regex. Do I install regex? I’m reading “Mastering Reg Expressions” but it doesn’t cover Ruby, just Java, PHP, etc. Do I install regex with rvm or something?
tmtwd has quit [Ping timeout: 264 seconds]
<a7d7p> OSX
<dminuoso> a7d7p: No. Regex come with the standard library.
<dminuoso> a7d7p: Err, not even standard library, they are a builtin core feature
<a7d7p> dminuoso: arg. thx.
wingwalker has joined #ruby
hutch34_ has quit [Ping timeout: 264 seconds]
<dminuoso> a7d7p: Though I would be careful reading books on mastering regular expressions before learning a language properly.
<dminuoso> a7d7p: While regular expressions have their use, it's far more important to learn design patterns, language idioms and libraries.
blackmesa has joined #ruby
<a7d7p> dminuoso: noted. thank you. back to Programming Ruby I guess. regex looks really fun tho :-)
sjums_ is now known as sjums
x0f has quit [Ping timeout: 265 seconds]
vdamewood has quit [Quit: Life beckons.]
<nofxx> a7d7p, good to learn: http://rubular.com
<a7d7p> interesting! thanks
rippa has joined #ruby
ta_ has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
lxsameer has joined #ruby
xentity1x has quit [Ping timeout: 276 seconds]
grh has joined #ruby
prawnzy has quit [Remote host closed the connection]
Macaveli has joined #ruby
AlphaAtom has joined #ruby
fullofcaffeine has joined #ruby
A_Drone has joined #ruby
fullofca_ has quit [Ping timeout: 240 seconds]
Pupeno has quit [Quit: Leaving...]
rbr has joined #ruby
<dminuoso> Is there some library that converts a regular expression into a human readable form?
submitnine has joined #ruby
craigp has quit [Ping timeout: 240 seconds]
<dminuoso> i.e. something along the lines of /\d+./.to_english #=> "Pattern accepting 1 or more digits followed by any character"
rbr` has quit [Ping timeout: 252 seconds]
craigp has joined #ruby
aries_liuxueyang has quit [Quit: No Ping reply in 180 seconds.]
last_staff has quit [Quit: last_staff]
aries_liuxueyang has joined #ruby
<baweaver> though regex and human readable being in the same sentence causes me great physical distress.
<dminuoso> baweaver: Im just looking into options to visualize a required input format to a user.
<baweaver> dminuoso: there's a challenge for you. Make a regex analyzer in Ruby
A_Drone has quit [Remote host closed the connection]
<dtscode> hey guys... I'm writing a C extension for ruby using the API exposed through ruby.h. However I've run into a snag. If I want to return multiple values from my c extension, to a given ruby object, what function would I use?
blaxter has quit [Remote host closed the connection]
x0f has joined #ruby
<baweaver> (not ignoring you, I just don't know scratch on the C apis)
TomyWork has joined #ruby
symm- has quit [Ping timeout: 272 seconds]
<dminuoso> dtscode: I would probably have the extension return another Ruby object.
biberu has joined #ruby
blaxter has joined #ruby
<dtscode> oh so like create an object that is an array, push those values on it, and return that object?
A_Drone has joined #ruby
<dminuoso> dtscode: For example.
<dtscode> ?
<dminuoso> dtscode: It was an answer to your question.
horst has quit [Quit: horst]
<dtscode> ah ok
<dtscode> thanks bud
<dtscode> ill try that
A_Drone has quit [Remote host closed the connection]
AlphaAtom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
moeabdol has joined #ruby
<dminuoso> dtscode: So basically your function would return a VALUE.
<flughafen_> where is shevy, i'm in need of BER flughafen jokes
<dtscode> dminuoso: right
<dminuoso> dtscode: And that VALUE could be pointing at a T_ARRAY, or any custom poro object perhaps.
a7d7p has quit [Quit: a7d7p]
wingwalker has quit [Remote host closed the connection]
wingwalker has joined #ruby
<dminuoso> dtscode: You might find this resoure useful btw: https://silverhammermba.github.io/emberb/
claudiuinberlin has joined #ruby
codelogix has joined #ruby
<dminuoso> It's quite extensive, covering a lot of the interesting subjects when writing C extensions.
<dtscode> thanks. I'll check that out!
<dminuoso> baweaver: Let me guess, to make things more interesting, Im only allowed to use regular expressions? :-)
sameerynho has joined #ruby
sameerynho has left #ruby [#ruby]
frankiee_ has quit [Ping timeout: 240 seconds]
astrobunny has quit [Read error: Connection reset by peer]
codelogix has quit [Ping timeout: 276 seconds]
astrobunny has joined #ruby
A_Drone has joined #ruby
blackmesa has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
A_Drone has quit [Remote host closed the connection]
symm- has joined #ruby
aganov has joined #ruby
A_Drone has joined #ruby
LoneHerm_ has joined #ruby
craigp has quit [Ping timeout: 264 seconds]
LoneHerm_ has quit [Remote host closed the connection]
adac has joined #ruby
Burgestrand has joined #ruby
bsrd has joined #ruby
a7d7p has joined #ruby
marr has joined #ruby
tvw has joined #ruby
mark_66 has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.5]
CloCkWeRX has quit [Quit: Leaving.]
teclator has quit [Ping timeout: 240 seconds]
wingwalker has quit [Ping timeout: 272 seconds]
webus has joined #ruby
anisha has joined #ruby
A_Drone has quit [Ping timeout: 264 seconds]
symm- has quit [Read error: Connection reset by peer]
craigp has joined #ruby
JRajamaa has joined #ruby
teclator has joined #ruby
the_drow_ has joined #ruby
Silthias1 has joined #ruby
JiYu has quit [Remote host closed the connection]
Cohedrin has joined #ruby
Silthias2 has joined #ruby
symm- has joined #ruby
JiYu has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
Silthias has quit [Ping timeout: 264 seconds]
A_Drone has joined #ruby
jsrn_ has joined #ruby
moeabdol has joined #ruby
Silthias1 has quit [Ping timeout: 240 seconds]
pwnd_nsfw` has joined #ruby
ocbtec has joined #ruby
bascht has quit [Remote host closed the connection]
M-shine has quit [Write error: Connection reset by peer]
M-manveru has quit [Write error: Connection reset by peer]
M-mistake1 has quit [Write error: Broken pipe]
fladson[m] has quit [Write error: Broken pipe]
elenatanasoiu3 has joined #ruby
pwnd_nsfw has quit [Ping timeout: 272 seconds]
ninja007 has quit [Quit: ninja007]
Robtop__ has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
conta has joined #ruby
watersoul has quit [Ping timeout: 240 seconds]
A_Drone has quit [Ping timeout: 264 seconds]
pwnd_nsfw` has quit [Ping timeout: 272 seconds]
M-shine has joined #ruby
last_staff has joined #ruby
conta has quit [Quit: conta]
elenatanasoiu3 has quit [Quit: WeeChat 1.5]
conta has joined #ruby
matp has quit [Excess Flood]
pawnbox has quit [Remote host closed the connection]
horst has joined #ruby
nankyokusei has joined #ruby
ur5us has joined #ruby
A_Drone has joined #ruby
codelogix has joined #ruby
ur5us has quit [Remote host closed the connection]
elenatanasoiu has joined #ruby
ur5us has joined #ruby
toni has joined #ruby
salut has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
elenatanasoiu has quit [Client Quit]
elenatanasoiu has joined #ruby
flying has joined #ruby
elenatanasoiu has quit [Client Quit]
tomphp has joined #ruby
codelogix has quit [Ping timeout: 276 seconds]
ur5us has quit [Ping timeout: 244 seconds]
JeanCarloMachado has joined #ruby
MrBleu has joined #ruby
<MrBleu> Hello !
<MrBleu> a question about ERBs
NTrash has joined #ruby
<MrBleu> I have a erb file, that i would like to fill in .
mikecmpbll has joined #ruby
<MrBleu> do i absolutly needs a class or ?
tlaxkit has joined #ruby
<mikecmpbll> absolutely.
jusss has joined #ruby
<mikecmpbll> nah, i don't understand the question.
<MrBleu> http://ruby-doc.org/stdlib-2.3.1/libdoc/erb/rdoc/ERB.html in the doc, they are using a class.
toni has quit [Ping timeout: 240 seconds]
<MrBleu> can i render an erb without a class ?
pawnbox has joined #ruby
elenatanasoiu has joined #ruby
synruby has joined #ruby
matp has joined #ruby
elenatanasoiu has quit [Client Quit]
elenatanasoiu has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
<fbt> ERB.new(data).result returns rendered data.
compro has joined #ruby
toni has joined #ruby
Guest53639 is now known as silverdust
silverdust has quit [Changing host]
silverdust has joined #ruby
jokke has quit [Remote host closed the connection]
jokke has joined #ruby
elenatanasoiu has quit [Quit: WeeChat 1.5]
elenatanasoiu has joined #ruby
getxsick has joined #ruby
moeabdol has joined #ruby
frankiee_ has joined #ruby
<adac> How do I pass parameters to an HTTParty request? Do I really use "query" for that like it is stated here? http://stackoverflow.com/a/24691914
<getxsick> hi, i'm trying to use ri to read some docs, unfortunately seems like I'm missing something. E.g. `ri Array` shows very limited (and not interesting) output. `Array#push` says there is nothing to show
hutch34_ has joined #ruby
NTrash has quit [Quit: Konversation terminated!]
<dminuoso> getxsick: That's strange. How did you install Ruby?
NTrash has joined #ruby
a7d7p has quit [Quit: a7d7p]
compro has quit [Ping timeout: 240 seconds]
jcao219 has quit [Ping timeout: 244 seconds]
hutch34_ has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Snowy has joined #ruby
dminuoso has quit [Ping timeout: 272 seconds]
mim1k|work has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jusss has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
roamingdog has quit [Remote host closed the connection]
mim1k|wo1k has quit [Ping timeout: 244 seconds]
toni has quit [Ping timeout: 272 seconds]
dminuoso has joined #ruby
<getxsick> dminuoso: ok, found a solution. i had to install rdoc-data first
jcao219 has joined #ruby
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
tomphp has joined #ruby
<dminuoso> getxsick: great
M-shine has quit [K-Lined]
pragmaticus has joined #ruby
teclator has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
A_Drone has quit [Ping timeout: 264 seconds]
jaguarmagenta has quit [Remote host closed the connection]
mac_ has joined #ruby
watersoul has joined #ruby
astrobunny has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 276 seconds]
anisha has quit [Ping timeout: 244 seconds]
toni has joined #ruby
synruby has quit [Quit: Leaving]
antgel has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
senayar has joined #ruby
Dimik has quit [Ping timeout: 272 seconds]
flughafen_ has quit [Quit: WeeChat 1.3]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
nofxx has quit [Ping timeout: 244 seconds]
craigp has quit [Ping timeout: 272 seconds]
symm- has quit [Quit: Leaving...]
teclator has joined #ruby
<fbt> Heh. There is an mkfifo gem, but you could also just fork into mkfifo... choices, choices!
fivmo has joined #ruby
fivmo has quit [Client Quit]
<dminuoso> fbt: Or you know, you could simply use Ruby::mkfifo
fivmo has joined #ruby
<dminuoso> Err File::mkfifo
pwnd_nsfw has joined #ruby
<fbt> Oh. I was looking at an older doc
<dminuoso> fbt: That's why you should ideally use ri.
<dminuoso> fbt: It always gives you documentation on what you have installed.
craigp has joined #ruby
horst has quit [Quit: horst]
ur5us has joined #ruby
LoneHerm_ has joined #ruby
Robtop__ has quit [Ping timeout: 272 seconds]
codelogix has joined #ruby
M-shine has joined #ruby
nocco has joined #ruby
workmad3 has joined #ruby
<fbt> Playing with forks and pipes :3
moeabdol has joined #ruby
koooge has quit [Quit: Leaving...]
codelogix has quit [Ping timeout: 264 seconds]
compro has joined #ruby
horst has joined #ruby
<EdwardIII> hey, i upgraded to ruby-2.3.1 and started seeing some errors about needing to do a pristine install of a bunch of modules of different versions, so i decided to just clear out the gems and start again. however now i'm seeing "Your bundle is locked to json (1.8.3), but that version could not be found in any of the sources listed in your Gemfile... Run `bundle install` to install missing gems." here's the er
Silthias has joined #ruby
Silthias2 has quit [Ping timeout: 240 seconds]
JRajamaa has quit [Ping timeout: 272 seconds]
shinnya has joined #ruby
JRajamaa has joined #ruby
compro has quit [Ping timeout: 240 seconds]
Chair has joined #ruby
Chair is now known as Couch
Pisuke has joined #ruby
jayeola has joined #ruby
getxsick has quit [Quit: Page closed]
JeanCarl1Machado has joined #ruby
Sembei has quit [Ping timeout: 276 seconds]
dionysus69 has quit [Ping timeout: 264 seconds]
Sembei_ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 276 seconds]
<dminuoso> EdwardIII: What you have installed system-wide is relatively irrelevant. Your bundle needs to know about it.
<dminuoso> EdwardIII: Run "bundle install" and see how rails server likes that.
Pisuke has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
<dminuoso> EdwardIII: What do you have in there too?
gregf_ has joined #ruby
<EdwardIII> dminuoso: the output from bundle install
<EdwardIII> dminuoso: the link i pasted should take you straight to the output from bundle install
<dminuoso> EdwardIII: Im wondering about which binstub is being used. Try running rails with bundle exec
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
weckl has joined #ruby
weckl has quit [Max SendQ exceeded]
weckl has joined #ruby
weckl has quit [Max SendQ exceeded]
<EdwardIII> dminuoso: ah ok, let me try that
weckl has joined #ruby
weckl has quit [Max SendQ exceeded]
dionysus69 has joined #ruby
weckl has joined #ruby
Sembei has joined #ruby
weckl has quit [Max SendQ exceeded]
weckl has joined #ruby
stamina has joined #ruby
last_staff has quit [Quit: bbl]
weckl has quit [Max SendQ exceeded]
weckl has joined #ruby
weckl has quit [Max SendQ exceeded]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mim1k|work has quit [Read error: Connection reset by peer]
mim1k|work has joined #ruby
Sembei_ has quit [Ping timeout: 276 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
heftig has quit [Read error: Connection reset by peer]
JeanCarl1Machado has quit [Ping timeout: 264 seconds]
niggah is now known as paskuda
heftig has joined #ruby
NTrash has quit [Ping timeout: 255 seconds]
Snowy is now known as jimmysaville
<EdwardIII> dminuoso: before you suggested that, i tried a sneaky `gem install json -v 1.8.3` which produces this: https://gist.github.com/EdwardIII/976923256c58f377333a27b6627d9d5f#file-gistfile4-txt - so i guess i need to upgrade rubygems?
roamingdog has joined #ruby
<zenspider> nothing sneaky about that
<zenspider> upgrading rubygems might help. so might downgrading bundler
<EdwardIII> i did manually rm all the gems which maybe wasn't a smart move
rodfersou has joined #ruby
<EdwardIII> lemme try upgrading rubygems
<zenspider> nope. That's what backups are for.
<zenspider> time machine's local backups are great for this
<EdwardIII> but i didn't really care about blowing away ruby and doing a fresh install
<dminuoso> EdwardIII: No. Something looks broken here.
A_Drone has joined #ruby
<dminuoso> EdwardIII: Did you do an OSX upgrade?
<EdwardIII> dminuoso: yes i did - i'm doing this ruby upgrade following the os x upgrade
<zenspider> going to bed. good luck.
<EdwardIII> zenspider: thanks for the pointers!
<dminuoso> EdwardIII: Google for that error message, there's a couple of issues on github.
Burgestrand has joined #ruby
<EdwardIII> dminuoso: ah i thought it was just because i'd screwed everything, not a general issue, checking it out now
roamingdog has quit [Ping timeout: 264 seconds]
<EdwardIII> heh seems like people are saying do gem pristine then bundle all
* EdwardIII tries again
A_Drone has quit [Ping timeout: 264 seconds]
Timba-as has joined #ruby
A_Drone has joined #ruby
A_Drone has quit [Remote host closed the connection]
<dminuoso> EdwardIII: Are you using rvm or rbenv?
<EdwardIII> dminuoso: ruby-install & chruby
tvw has quit [Read error: Connection reset by peer]
<dminuoso> EdwardIII: any gemset thing perhaps?
<EdwardIII> dminuoso: hrm i'm not sure what that is, so i guess no?
<EdwardIII> well whaddya know
<EdwardIII> re-did ruby-install, gem install pristine, bundle install and now somehow everything seems to be working heh
toni has quit [Ping timeout: 240 seconds]
<dminuoso> EdwardIII: You probably mixed up the order before.
<EdwardIII> thanks dminuoso
<dminuoso> EdwardIII: The underlying issue seems to be a mismatch between the Ruby version the extension was built against and the installed ruby version.
<EdwardIII> yeah i guess that might be something to do with the osx upgrade
<dminuoso> EdwardIII: I dont think so.
LoneHerm_ has quit [Ping timeout: 244 seconds]
<EdwardIII> no? doesn't make sense that os x would update an underlying lib that something was linked against before?
<dminuoso> EdwardIII: You said you are using chruby / ruby-install which OSX knows nothing about.
banisterfiend has joined #ruby
<EdwardIII> i guess when it's building gems they are linked against system libs though
jcao219 has quit [Ping timeout: 264 seconds]
<EdwardIII> but then i did ruby-install so everything should have been linked to what's on the system right now
<dminuoso> EdwardIII: ruby-install only builds/installs ruby, it does not manage gems/extensions
jayeola has quit [Ping timeout: 264 seconds]
banisterfiend has quit [Client Quit]
banisterfiend has joined #ruby
anisha has joined #ruby
gnufied has joined #ruby
gnufied has quit [Max SendQ exceeded]
<EdwardIII> but i deleted all the gems and did 'bundle install' in a project i'm working on to get them all back
<EdwardIII> maybe somehow that happened against the old ruby or something
gnufied has joined #ruby
jcao219 has joined #ruby
last_staff has joined #ruby
gnufied has quit [Max SendQ exceeded]
gnufied has joined #ruby
nankyokusei has joined #ruby
toni_ has joined #ruby
Timba-as has quit [Quit: Be back later ...]
last_staff has quit [Client Quit]
gnufied has quit [Max SendQ exceeded]
gnufied has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jayeola has joined #ruby
codelogix has joined #ruby
dtscode has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
erlingur_ has quit [Ping timeout: 244 seconds]
gnufied has quit [Max SendQ exceeded]
nankyokusei has quit [Ping timeout: 276 seconds]
gnufied has joined #ruby
gnufied has quit [Max SendQ exceeded]
gnufied has joined #ruby
erlingur_ has joined #ruby
codelogix has quit [Ping timeout: 264 seconds]
compro has joined #ruby
skweek has joined #ruby
tlaxkit has quit [Read error: Connection reset by peer]
tlaxkit has joined #ruby
compro has quit [Ping timeout: 264 seconds]
bruce_lee has joined #ruby
hutch34_ has joined #ruby
nocco has quit [Remote host closed the connection]
ruby814 has joined #ruby
nocco has joined #ruby
hutch34_ has quit [Ping timeout: 240 seconds]
c355e3b has joined #ruby
nocco has quit [Ping timeout: 272 seconds]
ruby814 has quit [Ping timeout: 240 seconds]
nocco has joined #ruby
erlingur_ has quit [Ping timeout: 240 seconds]
<fbt> It really does suck to not understand what you are doing
<fbt> So, in theory, if I were to open a socket and listen on it with a mainloop, then spawn multiple workers and write to the socket, is it possible to implement a queue there?
<fbt> I'm kinda lost in the very basic stuff and can't quite form a google query for this that makes sense
<fbt> Wait. I don't need a queue in my case
prawnzy has joined #ruby
jcao219 has quit [Ping timeout: 272 seconds]
nocco has quit [Remote host closed the connection]
nocco has joined #ruby
vdamewood has joined #ruby
hanmac has quit [Ping timeout: 255 seconds]
prawnzy has quit [Ping timeout: 276 seconds]
jaguarmagenta has joined #ruby
nocco has quit [Ping timeout: 240 seconds]
jimmysaville is now known as jimmysaville-AFK
rubyonra_ has joined #ruby
LoneHerm_ has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
craigp has quit [Ping timeout: 240 seconds]
toni_ has quit [Ping timeout: 276 seconds]
jayeola has quit [Ping timeout: 240 seconds]
LoneHerm_ has quit [Ping timeout: 264 seconds]
toni_ has joined #ruby
hanmac has joined #ruby
compro has joined #ruby
JeanCarloMachado has joined #ruby
jayeola has joined #ruby
codelogix has joined #ruby
jayeola has quit [Client Quit]
sdothum has joined #ruby
elenatanasoiu has quit [Ping timeout: 240 seconds]
codelogix has quit [Ping timeout: 272 seconds]
mark_66 has quit [Remote host closed the connection]
johnmilton has quit [Remote host closed the connection]
marsjaninzmarsa has quit [Ping timeout: 248 seconds]
mark_66 has joined #ruby
NuckingFuts has quit [Ping timeout: 240 seconds]
nuck has joined #ruby
nuck is now known as Guest94926
marsjaninzmarsa has joined #ruby
nettoweb has joined #ruby
skweek has quit [Ping timeout: 244 seconds]
sepp2k has joined #ruby
erlingur_ has joined #ruby
ldnunes has joined #ruby
toni_ has quit [Ping timeout: 240 seconds]
nadir has joined #ruby
millerti has quit [Ping timeout: 264 seconds]
moeabdol has quit [Ping timeout: 264 seconds]
mim1k|wo1k has joined #ruby
mim1k|work has quit [Ping timeout: 264 seconds]
glcx has joined #ruby
glcx has joined #ruby
glcx has quit [Changing host]
toni_ has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
elenatanasoiu has joined #ruby
compro has quit [Ping timeout: 240 seconds]
moeabdol has joined #ruby
JeanCarloMachado has quit [Ping timeout: 276 seconds]
JeanCarloMachado has joined #ruby
NTrash has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
antgel has joined #ruby
roamingdog has joined #ruby
brujoand has quit [Ping timeout: 250 seconds]
<dminuoso> Bah, is there a more elegant way to do this? opts = Hash[opts.map { |k,v| [k, v == '' ? nil : v] }]
johnmilton has joined #ruby
johnmilton has quit [Read error: Connection reset by peer]
antgel has quit [Ping timeout: 240 seconds]
johnmilton has joined #ruby
Bish has joined #ruby
saneax-_-|AFK is now known as saneax
<Bish> can somebody advise me a gem that can parse multipart/form-data ? in http?
roamingdog has quit [Ping timeout: 276 seconds]
malcolmva has quit [Ping timeout: 276 seconds]
jimmysaville-AFK is now known as jimmysaville
<elomatreb> Bish: I think CGI from the standard library can do this http://ruby-doc.org/stdlib-2.3.1/libdoc/cgi/rdoc/CGI.html
<apeiros> dminuoso: only marginally nicer: opts = opts.map { |k,v| [k, v == '' ? nil : v] }.to_h
<Papierkorb> Bish: If not CGI ^, Rack can do that
<Bish> i am using rack, but rack gives me a StringIO with just the body in text
<Bish> i might be to stupid too see it though
<Bish> to be more specific i am using roda on rack
<dminuoso> apeiros: Oh.
<Papierkorb> Bish: Hah!
<dminuoso> apeiros: Let me just apply this, while I refactor 20 different lines of code... :>
<Bish> Hah! Papierkorb :( what now?
<Papierkorb> Bish: r[:the_param] or use r.POST[:the_param] if you only want to use POST parameters
<dminuoso> apeiros: That did the trick, it's readable now.
<Bish> you know roda!?
<Papierkorb> Bish: That should give you a String or something like a File to read from
<Bish> so fukin great.
<Papierkorb> Bish: Yes, I've been using it for all of my personal projects almost the entire year. Can't recommend it enough. Pair it with Sequel. Glorious.
<Papierkorb> Bish: There's also #roda btw
pawnbox has quit [Remote host closed the connection]
<Bish> Papierkorb: im in there already, i am also using sequel
<Bish> best thing i've ever seen in life
<Bish> everything jeremy evan touches is gold
johnmilton has quit [Ping timeout: 240 seconds]
NTrash_ has joined #ruby
NTrash has quit [Ping timeout: 255 seconds]
<[spoiler]> Oh, Roda is <3
<Bish> Papierkorb: when i asked jeremy the same question he just told me that rack does the handling
<Papierkorb> He just looks at ruby and uses language features to model something rubyists are thinking about, not like other HTTP frameworks where the API is modeled around HTTP. So much better.
<Bish> i never checked r.POST though.. ofcourse that was stupid
johnmilton has joined #ruby
tomphp_ has joined #ruby
tomphp has quit [Ping timeout: 244 seconds]
<apeiros> dminuoso: note that in rails there's a method to just map values
<dminuoso> apeiros: Rails also has this Concern thing and tons of other things I keep my fingers away from. :p
<apeiros> ah, right: opts.transform_values! do |value| v == '' ? nil : v end
<apeiros> dminuoso: sure. I'm still not sure about my opinion on concerns. stomach says "extend + include for inepts". but I might be mistaken.
nocco has joined #ruby
erlingur_ has quit [Ping timeout: 244 seconds]
<Papierkorb> apeiros: That's the issue with Rails for me. While having a rigid framework with specific rules how to do stuff is useful many times, it sometimes overcomplicates things a lot. Service objects, really? Just have ... plain old ruby classes, and call them .. plain old ruby classes?
<dminuoso> apeiros: Concerns are for those django folks switching to rails who dont know how Ruby works
tomphp has joined #ruby
<dminuoso> Papierkorb: service objects are a pattern.
<dminuoso> not a "type of class"
JeanCarloMachado has quit [Ping timeout: 276 seconds]
<dminuoso> Papierkorb: even models such as AR models are plain ruby classes, rails folks like to forget that
<Bish> Papierkorb: im on your side!
tomphp_ has quit [Ping timeout: 272 seconds]
<Papierkorb> dminuoso: Correct. But there's nothing special about them. For models you could make the case that they're magic in that they get a bunch of attributes injected and so on.
JeanCarloMachado has joined #ruby
bruce_lee has quit [Ping timeout: 276 seconds]
<Bish> rack even creates tmpfiles which contain the data?
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
<Bish> well i don't know if i like that one too much
<Papierkorb> Bish: Yes, it does :(
<dminuoso> Papierkorb: But that's the case for any class. It has some public interface.
chouhoulis has joined #ruby
<dminuoso> Papierkorb: You can construct it, and your object has some well-defined interface. There's nothing magical about Rails.
<fbt> What is the best way to check if a process actually is our child from ruby?
malcolmva has joined #ruby
<dminuoso> The real "magic" lies in the implementation, but that is completely hidden to the user.
<Bish> Papierkorb: is the the reason i get StringIO as body, because it's just an openfile descriptor?
<Bish> doesn't that make it slow?
<fbt> I mean I can check if a process with a pid that I recorded is running, but it doesn't mean it's the same process.
giorgos1 has joined #ruby
<dminuoso> Papierkorb: Rails is basically patterns and conventions. For example by convention we place classes representing data with business logic into app/models and call them "models" - naming and placing the class happens by convention, and the pattern to use such a class is by MVC pattern.
<Papierkorb> dminuoso: Yes, but other times, it can come back and bite you. So giving them a "special name" is kinda reasonable, much like bang! methods.
<apeiros> dminuoso: any sufficiently analyzed magic is indistinguishable from science ;-)
<dminuoso> apeiros: *advanaced.
<fbt> Oh. I can check if its ppid is the same as my pid
<apeiros> dminuoso: no, that's the other way round
<dminuoso> oh.
<Papierkorb> Bish: iirc, you get StringIO's for small data (could be wrong though). And it does slow down things. Not important if you're only handling small data, but if you're handling big files .. it's an issue :)
<apeiros> (any sufficiently advanced science is indistinguishable from magic)
<dminuoso> *technology
<dminuoso> :P
<apeiros> well, I think it's even s/science/technology/ there
<apeiros> right :)
<fbt> But ruby doesn't have a getppid .-.
hahuang61 has quit [Ping timeout: 272 seconds]
<dminuoso> apeiros: Rails does very well to keep the magic hidden though, which makes it bearable.
<dminuoso> apeiros: RSpec on the other hand... :D
nankyokusei has joined #ruby
<apeiros> in current times, I do prefer the inversion of that quote, though. given how many people say to all kinds of things "oh, that's magic!"
<Papierkorb> Bish: Roda/Rack stores the whole POST body as a single file somewhere, and then each file extacted from that extra. So, each upload takes basically double space on your HDD
d10n-work has joined #ruby
<dminuoso> apeiros: I just use the word "automagic"
<apeiros> dminuoso: yeah, one of the main reasons I don't like and use rspec.
<Bish> Papierkorb: that sucks.
<dminuoso> apeiros: Well I use it in my projects, in the end its fine. But I wouldn't know the first thing on how to customize things.
<fbt> Oh. PGID.
JeanCarloMachado has quit [Ping timeout: 244 seconds]
<Bish> isn't that configurable?
<dminuoso> apeiros: And in comparison: A couple months ago I stumbled upon rack - and within 30 minutes I had Rack figured out, a middle written and inserted - and it worked.
<Papierkorb> Bish: Didn't get around yet to write something more of my liking, but I agree. I wrote a online storage service for me with it. I know the pain :)
<dminuoso> *middleware
<Bish> Papierkorb: i'd love to save the stuff in DB
<dminuoso> apeiros: With RSpec I would probably spent days just trying to understand how it works in principle.
<Bish> but it seems like rack also "garbage collects" the files from /tmp/
<Bish> which is.. great i guess
<Papierkorb> Bish: How big is the data?
<apeiros> rails' magic annoys me a lot too sometimes. the biggest offender is its autoloading.
<Bish> well, the files will be about ~1-100mb
<Bish> not much
<dminuoso> apeiros: Actually autoloading is great once you figure it out :P
<apeiros> it tends to randomly break. and also suppresses useful analytics at times (similar to your issue with Range recently)
<Bish> and they will be processed and be deleted afterwards
<apeiros> dminuoso: not the way rails does it
<Papierkorb> Bish: That's way too large for databases (Well, maybe not for GridFS w/ MongoDB, but never used it)
<dminuoso> apeiros: That sounds strange. I have not had a single problem related to autoloading.
<apeiros> Kernel#autoload - ok. but rails autoloading kills discovery, hides exceptions during load, breaks and fails in random ways.
<dminuoso> apeiros: Some wrt to spring yes.
<Bish> Papierkorb: :( what can i do?
<Papierkorb> Bish: Store the data somewhere and INSERT the path in your DB. Maybe you can use the `shrine` gem?
JeanCarloMachado has joined #ruby
<apeiros> dminuoso: Foo.constants - works with Kernel#autoload, doesn't with rails' autoloading.
<dminuoso> apeiros: Well conceptually it's still a neat idea. I wouldn't want to register every class in Rails by hand honestly.
codelogix has joined #ruby
<dminuoso> apeiros: I know.
<apeiros> you can implement fully automatic loading with Kernel#autoload easily
<apeiros> (I know, I have)
<dminuoso> apeiros: but if you think about what rails intends to do, it could not possibly workk either.
<dminuoso> Huh?
nankyokusei has quit [Ping timeout: 244 seconds]
<apeiros> I did not implement reloading. but I'm pretty sure I could do that too.
<dminuoso> apeiros: So you would have to eager load all available classes following your some convention.
<apeiros> no
<apeiros> Kernel#autoload is lazy
<apeiros> but the constant is visible even when it isn't yet loaded.
<dminuoso> apeiros: Sure, but it requires marking that the constant exists in the first place.
<Bish> >sing the Sequel ORM also makes a lot of sense, because Sequel is objectively a better ORM
<dminuoso> apeiros: Rails by design wants to use convention, not configuration. If you add a class, you dont need to require it somewhere else (or mark it available as autoloadable)
<Bish> shots fired
<apeiros> i.e. the autoload/lazy loading is truly transparent. not like in rails where the abstraction leaks.
<Bish> i like him
<Papierkorb> Bish: Upside is, you can just File.rename() the uploaded file from /tmp/ to wherever you want to store it. This way, Rack isn't even doing much of an overhead :)
<dminuoso> apeiros: The problems I've actually had were related to reload! :P
<dminuoso> But all of those were understandable.
<Bish> Papierkorb: sounds good, i didn't quite get what shrine does with the files, but i will look into it
<Bish> because of that description alone
<apeiros> "Rails by design wants to use convention, not configuration. If you add a class, you dont need to require it somewhere else" - how does a fully automatic loading with Kernel#autoload change that?
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> apeiros: Let's say you have a known module Foo. How do you know what constants it has?
<Papierkorb> Bish: it's like `carrierwave` if you know that. It does file uploads for you and is based on Roda. Can also do stuff like picture transformations (resizing, ...)
<apeiros> dminuoso: Foo.constants
<dminuoso> apeiros: Sure. And how does that work?
<dminuoso> apeiros: How can it know about the module in foo/bar.rb you just created?
<Papierkorb> Bish: And integrates great into Sequel too! Used it once, but was happy with it.
<apeiros> &ri Kernel#autoload dminuoso
<apeiros> that's how
<dminuoso> apeiros: Which means you need to explicitly register the module, which I mentioned.
craigp has joined #ruby
brendan- has joined #ruby
codelogix has quit [Ping timeout: 276 seconds]
<apeiros> and if you mean "during development, when I create new files with a running app" - then there's FS notifiers
<dminuoso> apeiros: So FS notifiers are more elegant?
<Bish> Papierkorb: so shrine automagicially saves path to files in the db with sequel?
<dminuoso> I mean Im a big fan of inotify, don't get me wrong...
<dminuoso> But really?
<apeiros> dminuoso: compared to having a broken abstraction? definitively.
<dminuoso> apeiros: define broken abstraction
<apeiros> the alternative is to accept that adding files requires an explicit action.
grh has quit [Remote host closed the connection]
<apeiros> Foo.constants # => []
<apeiros> Foo::Bar # => Foo::Bar
<Papierkorb> Bish: Yes you can tell it where you want the data to be stored, then you add a plugin into your sequel model and 'add it'. Then, you can just use the model instance to obtain the file later again
<apeiros> that's a broken abstraction.
IsoLinCHiP has quit [Ping timeout: 250 seconds]
<apeiros> Foo says it doesn't have constants, but it does once I ask for an explicit one
<Bish> Papierkorb: well it will be weird if i scale that out, right?
<dminuoso> apeiros: If you insist, you can eager load classes.
<Bish> multiple databases and such
<apeiros> dminuoso: that breaks the purpose of lazy loading
<dminuoso> apeiros: You can't have it both ways. Rails autoloading is not broken - it works this way by design.
<apeiros> dminuoso: its *design* is broken. (in addition to the implementation)
<Papierkorb> Bish: It can use amazon S3, maybe something else too, you can also use stuff like GlusterFS to have a distributed read-write filesystem to store files in.
<apeiros> the *design* of "a constant exists once you ask for it" is a deeply broken design.
<Bish> Papierkorb: why is say 10mb too much for databases.. do they fragment to much? what's the problem
<Bish> talking about sql-ones, by the way
summation has quit [Read error: Connection reset by peer]
<Papierkorb> Bish: iirc Shrines FS driver doesn't really try "span out" files/directories to lessen the burden on the underlying FS, so if you get that far, you probably want to write some code for that
<apeiros> and yes, you can have it both ways. as said, I do have part of the "both ways", and it'd be easy enough to have the rest too (I see no point in that, though)
<dminuoso> apeiros: The design is rather "You do not have to register classes to rails to become available"
<Papierkorb> Bish: SQL databases are not built to store large chunks of binary data
IsoLinCHiP has joined #ruby
<apeiros> dminuoso: you don't pay attention. I don't either.
<Bish> yeah i get that, but still what is the problem to hold the reference to a big string?
<Bish> why does it fuck them up?
<Bish> thank you
<Papierkorb> Looks like a reasonable answer on first sight
<dminuoso> apeiros: And I strongly disagree that hooking into the filesystem is pretty.
redpants has joined #ruby
<dminuoso> apeiros: You just moved the implementation out of the application into the filesystem. Just thinking about it gives me a headache.
tyang has joined #ruby
<Bish> Papierkorb: shrine it is, thanks a lot!
<apeiros> dminuoso: you can have it without hooking into the filesystem too. I wouldn't do either anyway. IMO if a file doesn't exist when you start the app, then it isn't there. reload the app.
<dminuoso> apeiros: If you had said "similar to the rest of the world works, if you add files, you need to make them known to the application/toolchain" then fine.
<Papierkorb> Bish: Another thing is that with a real FS you can instruct your frontend HTTP server to serve the files, so you take that load off from your ruby app, which also greatly increases performance for everyone. It needs some configuration to do that, but IMO, well worth the effort if you're sending out large chunks of data
<apeiros> dminuoso: honestly, depending on the order of referencing constants gives me a bigger headache
<Papierkorb> Bish: cheers
<apeiros> or rather: having to pay attention to how you define your classes
<apeiros> module Foo; class Bar; … is verboten in rails.
<apeiros> unless you want to break its autoloading.
<apeiros> just one example
<apeiros> (well, actually the second, given Foo.constants)
Wizznt has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
fughetta has joined #ruby
bauruine has quit [Quit: ZNC - http://znc.in]
bauruine has joined #ruby
ishe_ua has quit [Remote host closed the connection]
bauruine has quit [Remote host closed the connection]
lxsameer has quit [Quit: WeeChat 1.5]
bauruine has joined #ruby
blackmesa has joined #ruby
<Bish> Papierkorb: i am not going "host" the files
<Bish> just processing them
<Bish> but a another part of the project does that, so i might end up doing that anyways
hutch34_ has joined #ruby
<Bish> but i am sure everything from a fellow roda/sequel enthusiast is good
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Bish> apeiros: is verboten in rails :p nice brain lag
<Bish> Papierkorb: does shrine somehow support chunked uploads
erlingur_ has joined #ruby
hahuang61 has joined #ruby
Burgestrand has joined #ruby
<Papierkorb> Bish: you mean that the user can complete a upload later if the network died? Not sure
<Bish> Papierkorb: no, i will upload my files in chunks ( so i can process already transmitted data, if possible )
<Bish> so roda / rack doesn't get the huge swell of multiple mbs
<Papierkorb> What kind of data is that?
<Bish> csv,excel sheets
hutch34_ has quit [Ping timeout: 240 seconds]
sczizzo has joined #ruby
<Bish> rack seems to support it, displays chunks and their metadata
etehtsea has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<Papierkorb> Bish: I'd consider (as in, maybe it's a bad idea?) streaming the data then completely. The user does a POST of the pure file without any multipart junk so I can feed it directly into a streaming capable "processor". Maybe that would work for you?
<Papierkorb> So no multiple upload hack, instead basically pipe the incoming data right into the processor. Not even sure if Rack can do that.
antgel has joined #ruby
Burgestrand has quit [Client Quit]
<Bish> but in some cases they might be binary files which can only be processed when completely transmitted
Burgestrand has joined #ruby
<Bish> xls for example or whats its called
<Bish> ugly microsoft zip files
erlingur has joined #ruby
JRajamaa has quit [Ping timeout: 272 seconds]
erlingur_ has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
tk__ has joined #ruby
LoneHermit has joined #ruby
erlingur has quit [Ping timeout: 276 seconds]
toni_ has quit [Ping timeout: 240 seconds]
prawnzy has joined #ruby
ramortegui has joined #ruby
the_drow_ has quit [Quit: This computer has gone to sleep]
LoneHermit has quit [Ping timeout: 276 seconds]
<MrBleu> Can you print out the variables/functions from a class ?
<MrBleu> i tried "puts myclass" without success
csk has joined #ruby
chouhoulis has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 240 seconds]
<apeiros> MyClass.instance_methods
<apeiros> and "variables from a class" does probably not exist in the form you wish.
<apeiros> instance variables do not belong to the class, but to the instances. the class therefore doesn't know about them.
Guest4034 is now known as marahin
marahin has quit [Changing host]
marahin has joined #ruby
prawnzy has quit [Ping timeout: 276 seconds]
<MrBleu> yeah, sorry, from the instance :)
<apeiros> MyClass.new(…).instance_variables # is probably what you want
<apeiros> for more, see Module and Object docs. all introspective methods are there.
<apeiros> in pry you can use `ls obj`
<MrBleu> apeiros: thanks ! i am trying these two.
jaguarmagenta has joined #ruby
aurelien has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
cdg has joined #ruby
ryez has joined #ruby
mattwashere has joined #ruby
teclator has quit [Ping timeout: 240 seconds]
toni_ has joined #ruby
jaguarmagenta has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
asal2107 has joined #ruby
ta_ has quit [Remote host closed the connection]
GinoManWrx has joined #ruby
compro has joined #ruby
toni_ has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
<apeiros> Bish: that was an intentional "verboten" :)
nickjj_ is now known as nickjj
andikr has joined #ruby
brendan- has joined #ruby
<Bish> why?
sdwrage has joined #ruby
Snickers has quit [Ping timeout: 264 seconds]
<apeiros> because you have a couple of german words, like kindergarten, blitzkrieg etc.
malconis has joined #ruby
andikr has quit [Remote host closed the connection]
<apeiros> it was supposed to be funny, entertaining.
<Bish> oh yeah the important ones
<dminuoso> apeiros: Funny enough, a class actually maintains an index of all instance variables in use. :p
<dminuoso> apeiros: So a class actually knows stuff about its instances.
<apeiros> dminuoso: you mean behind the scenes?
<dminuoso> apeiros: Yeah.
<apeiros> makes sense
symm- has joined #ruby
<apeiros> did something similar in my toy language
<apeiros> you can avoid using a hash lookup for ivars that way
<dminuoso> apeiros: I had to figure this out in order to implement proper casts in Ruby.
<dminuoso> (Ruby kept seg faulting in an interesting place until I noticed this)
<apeiros> i.e. only lookup by name was/is a hash lookup in my language. all literal use in code is an address directly in the AST
<fbt> ...File.mkfifo returns Fixnum
<fbt> wat
<apeiros> e.g. stuff like obj.instance_variable_get(:@some_name) would go via hashtable. `def foo; @some_name; end` would compile to an AST with with an address.
<ryez> in `[1, 2].map(&:to_s)`, the symbol :to_s is converted to a proc by the '&' operator, right?
<apeiros> fbt: probably a filedescriptor?
<apeiros> ryez: right
<fbt> apeiros, it's always 0, it seems
codelogix has joined #ruby
<fbt> Yea, it's always 0
nobitanobi has joined #ruby
<apeiros> fbt: hm, the docs are spaaaarse
<apeiros> *missing
malconis has quit [Remote host closed the connection]
<fbt> Yeah :)
<apeiros> fbt: have fun reading the source code? :D
<apeiros> fbt: and please be nice - provide a doc-patch once you figured it ;-)
<fbt> Eh, I don't quite care enough right now.
malconis has joined #ruby
<apeiros> aw :(
<fbt> I'm coding!
<fbt> :D
gchristensen has joined #ruby
<fbt> Re-writing that bar to use forks
<ryez> apeiros: thanks, given &:to_s is for method Fixnum#to_s, what can be used for puts?
jphase has joined #ruby
<apeiros> ryez: since the method is called on the fixnum, you can't use puts. it's not 5.puts after all, but puts(5)
<gchristensen> Hi, I have an array of objects. I want to iterate over each object, calling a function that yields. I want each subsequent function call to happen inside the yielding of the parent. ie: [ Foo1, Foo2, Foo3 ] ... Foo1.mycall do Foo2.mycall do Foo3.mycall do ... end end end how might I do this?
<apeiros> there is Object#display, but… eeew :D
<ryez> that is, IO#puts, or Kernel#puts
<apeiros> gchristensen: do you ever have an array which is not an array of objects? :)
fmcgeough has joined #ruby
codelogix has quit [Ping timeout: 264 seconds]
<apeiros> gchristensen: inject might be useful for that.
<gchristensen> apeiros: mmm.... I wonder, are blocks objects?
<apeiros> gchristensen: no. but tell me how you create an array of blocks :D
<gchristensen> haha fair enough. ok, I'll check out inject
<apeiros> but re inject - it really depends on what you want to achieve.
<gchristensen> (I used to be really good at ruby and knew these things ... then I stopped using it for long enough to atrophy :( )
<apeiros> I guess "an empty array" would qualify. but that'd be cheating!
<ryez> I found `[1, 2].each &IO.method(:puts)` works, but is that the usual solution?
<apeiros> ryez: the usual solution is to stop fuzzing around with & syntax and just use a proper block.
<apeiros> [1,2].each do |x| puts x end # ab-so-lutely nothing wrong with that
JeanCarloMachado has quit [Ping timeout: 264 seconds]
<fbt> I have a scoping/ideological question: If I have, say, a hash produced by parsing a config. And that has contains stuff my workers need, do I just make the hash an instance object so that objects spawned from main could read it or do I pass it to each object?
<fbt> Or maybe even a global variable for the config?
ChiefAlexander has joined #ruby
<apeiros> pass
JakFrist[WVU] has joined #ruby
<apeiros> I sometimes use a pattern like `class Foo::Bar; def initialize(config=Foo.default_config); …`
craigp has quit [Ping timeout: 264 seconds]
<ryez> apeiros: yes for sure, but this question just came to my mind and I want to know the answer, thanks anyway
JeanCarloMachado has joined #ruby
<apeiros> but I definitively allow passing the config.
cpfeilschifter[m has joined #ruby
M-manveru has joined #ruby
M-mistake has joined #ruby
fladson[m] has joined #ruby
bascht has joined #ruby
<apeiros> ryez: btw., it'd be $stdout.method(:puts), not IO.method(:puts)
<fbt> Hmm.
SteenJobs has joined #ruby
<apeiros> IO.puts is Kernel#puts
<fbt> If I pass the config as an argument to a method, the method then can modify the hash, right?
<fbt> Why am I asking this. I can check.
nando293921 has joined #ruby
<fbt> Ah. It can, but not accidentally.
claudiuinberlin has quit [Remote host closed the connection]
Guest571 is now known as ndrst
jhack has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
claudiuinberlin has joined #ruby
fivmo has quit [Quit: Textual IRC Client: www.textualapp.com]
csk has quit [Max SendQ exceeded]
ruby_ has joined #ruby
the_drow has joined #ruby
csk has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
oedgok has joined #ruby
the_drow has quit [Client Quit]
roamingdog has joined #ruby
JeanCarloMachado has quit [Ping timeout: 244 seconds]
velocity64 has joined #ruby
compro has quit [Ping timeout: 240 seconds]
velocity64 has quit [Remote host closed the connection]
elenatanasoiu has quit [Read error: Connection reset by peer]
JeanCarloMachado has joined #ruby
elenatanasoiu has joined #ruby
hk238 has joined #ruby
pandaant has joined #ruby
frankiee_ has quit [Quit: Lost terminal]
<apeiros> fbt: you can always make it an immutable object
patarr has joined #ruby
danmcguire has joined #ruby
<fbt> Oh. Right.
NTrash_ has quit [Ping timeout: 244 seconds]
<danmcguire> is there something like return that just goes up to the block callers scope instead of the method callers scope? e.g. I have a method that has a mapping method inside of it...I'd like to return a val inside the method without using if/else
<danmcguire> without returning that value all the way to the method callers scope
<dminuoso> danmcguire: use "next"
<danmcguire> dminuoso: thanks :)
antgel has joined #ruby
<fbt> I have another question I can't easily find an answer to. I have a config with a list of 'modules' (files with classes) to load. And I want to somehow register sai... wait, I have filenames. nvm.
<fbt> Wait, no, that doesn't answer the question.
<dminuoso> danmcguire: Note if you want to completely break out, then use "break"
<danmcguire> nice, thanks
craigp has joined #ruby
<elomatreb> There's also throw...catch, which I still really want to use in actual code sometime
<dminuoso> elomatreb: If Ruby had serious label/goto support that would be much better..
<dminuoso> :(
<dminuoso> But Id feel dirty if I compiled in JOKE support on production ruby servers..
<fbt> Basically I have files with classes that I want to first load then call from main, but the kicker is I need to create only specific objects depending on the config.
Ananthu has joined #ruby
<fbt> A friend of mine suggests eval'ing the files
<fbt> Instead of load.
<dminuoso> fbt: cancel your friendship and find knowledgeable people?
<fbt> :D
<dminuoso> Just a thought..
claudiuinberlin has joined #ruby
pandaant has quit [Ping timeout: 272 seconds]
<fbt> I just can't think of a way to load classes from files and then create objects of said classes without knowing beforehand what classes they may be.
moeabdol has quit [Ping timeout: 240 seconds]
<fbt> What comes to mind is registering the classes somehow, but I can't return anything from load, can I?
pandaant has joined #ruby
<apeiros> fbt: have a proper filename <-> classname mapping
fullofca_ has joined #ruby
<apeiros> that'd be sane and common anyway
<fbt> Hmmm.
<apeiros> foo/bar_baz.rb -> Foo::BarBaz
nettoweb has quit [Ping timeout: 264 seconds]
<apeiros> alternatively have a registry. in foo/bar_baz.rb: Registry.register(Foo::BarBaz)
<fbt> Oh.
<fbt> Shit. OOP.
bsrd has quit [Quit: WeeChat 1.5]
<fbt> I keep forgetting.
<apeiros> remember, only partially using oop is poop
SteenJobs has joined #ruby
fullofc__ has joined #ruby
<elomatreb> You can also use metaprogramming, e.g. included/inherited hooks
mark_66 has quit [Remote host closed the connection]
toni_ has joined #ruby
<flying> hi guys I need to write a function where to to need to get in input an array
<apeiros> that too, if those classes are forced to include/extend/subclass a module/class
mijk has joined #ruby
<flying> def myfunction(a) { ... }
<flying> could a be an array?
<apeiros> flying: what?
<apeiros> can't parse "where to to need to"
claudiuinberlin has quit [Ping timeout: 264 seconds]
fullofcaffeine has quit [Ping timeout: 264 seconds]
mark_66 has joined #ruby
ryez has quit [Ping timeout: 240 seconds]
notpratch is now known as pratch
<mijk> hi, I"m trying to set a variable to a string and ARGV but I'm getting "[argument]" and it fails the script
<apeiros> and yes, in `def mymethod(a)`, the argument `a` can be anything. that includes the possibility of it being an array
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<flying> I need to write a function in ruby function(array) { for each element "index" of the array do the sum of all the elements till the index}
<apeiros> ?code mijk
<ruby[bot]> mijk: We can't help you without your code, please post it to https://gist.github.com
<apeiros> mijk: don't forget to include the error. because "fails the script" is useless.
JeanCarl1Machado has joined #ruby
fullofca_ has quit [Ping timeout: 264 seconds]
SteenJobs has quit [Client Quit]
SteenJobs has joined #ruby
<apeiros> flying: and what's your question?
<apeiros> mijk: ARGV is an array. with all arguments. you probably want *one* argument. probably the .first.
Burgestrand has joined #ruby
hutch34_ has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
anisha has quit [Quit: This computer has gone to sleep]
JeanCarloMachado has quit [Ping timeout: 264 seconds]
<mijk> omg yes, thank you
<mijk> did not know that
nettoweb has joined #ruby
<apeiros> yw
mijk has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
karthick has joined #ruby
brendan- has joined #ruby
toni_ has quit [Ping timeout: 272 seconds]
<dminuoso> &ri Enumerable#with_object flying
<_derpy> No results
<dminuoso> Mmm.
<flying> what?
<dminuoso> I thought that was a thing.
<Papierkorb> &ri Enumerable#each_with_index dminuoso flying
<dminuoso> Papierkorb: No. Not that.
<apeiros> dminuoso: it's Enumerable#each_with_object and Enumerator#with_object
<dminuoso> Oh.
<dminuoso> Yeah that.
anisha has joined #ruby
<dminuoso> Always good to have my human ri: apeiros
<Papierkorb> dminuoso: As far the docs go, looks like they do the same?
<dminuoso> Better than that _derpy.
harfangk has joined #ruby
<apeiros> s/ri/encyclopedia/
<dminuoso> Papierkorb: No?
<apeiros> main content section being "trash knowledge the world doesn't need"
<dminuoso> &ri Enumerator#with_object
<apeiros> most recently acquired fact: herrings communicate through farting
blackmesa has quit [Ping timeout: 272 seconds]
whiteline has quit [Read error: Connection reset by peer]
Rodya_ has joined #ruby
mattwashere has quit [Remote host closed the connection]
mattwashere has joined #ruby
<yorickpeterse> apeiros: what about red herrings tho?
anisha has quit [Client Quit]
<apeiros> they too, are communication through and for the arse
<yorickpeterse> hahaha
blaxter has quit [Quit: foo]
whiteline has joined #ruby
mattwashere has quit [Ping timeout: 272 seconds]
<apeiros> Papierkorb: your point being?
<apeiros> with_index != with_object, and the source shows that too
nankyokusei has joined #ruby
nando293921 has quit [Ping timeout: 240 seconds]
<flying> I have an array .. if I choose an index (e.g. 5) how can I sum all the elements of that array < 5?
toni_ has joined #ruby
<apeiros> flying: what have you tried?
gchristensen has left #ruby ["WeeChat 0.4.2"]
<flying> I was just starting... I'm very new in ruby
<apeiros> ok. even more important then that you try something yourself first.
<apeiros> do you know how to solve parts of the problem? e.g. how to get the elements up to index 5? or how to sum all elements in an array?
<flying> ok let me try a bit::)
roamingdog has quit [Remote host closed the connection]
<flying> I don't know how can I get the sum of the elemtns
<flying> I know how can iterate ... using a array.each
<apeiros> ok. then all you need to do is add the elements somewhere.
roamingdog has joined #ruby
codelogix has joined #ruby
<apeiros> sum = 0; …add all elements in the array to sum…; sum
<dminuoso> flying: Instead of trying to be smart, split it into multiple tasks. Sizeable problems you know you can tackle.
nankyokusei has quit [Ping timeout: 272 seconds]
<flying> ok
tk__ has quit [Quit: ばいばい]
<flying> first thing I was thinking to do in this way: I need to iterate the array...
etehtsea has quit [Quit: Textual IRC Client: www.textualapp.com]
<flying> for each element I need to do the sum of the previous and the next elements
asal2107 has quit [Read error: Connection reset by peer]
asal2107 has joined #ruby
conta has quit [Ping timeout: 272 seconds]
<apeiros> that sounds more complicated than what you have to solve
<apeiros> you want the sum of all elements from index 0 to index N of an array, right?
<apeiros> the steps you'd take is: get a new array with all elments from index 0 to index N. then get the sum of all elements of that new array.
Zamyatin has joined #ruby
nando293921 has joined #ruby
duderonomy has quit [Ping timeout: 240 seconds]
aganov has quit [Remote host closed the connection]
codelogix has quit [Ping timeout: 244 seconds]
glcx has quit [Quit: Quitte]
synthroid has joined #ruby
tlaxkit has quit [Read error: Connection reset by peer]
gingray has joined #ruby
tlaxkit has joined #ruby
dminuoso has quit [Ping timeout: 264 seconds]
the_drow has joined #ruby
borodin has joined #ruby
babblebre has joined #ruby
ChiefAlexander has quit [Read error: Connection reset by peer]
ChiefAlexander has joined #ruby
hobodave has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Siraris has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
ninja007 has joined #ruby
<Siraris> Hi all, I’m having a hell of a time trying to get a param through strong params from an AJAX request. My data coming in is in the shape: {"position"=>{"position_data"=>{"187"=>{"row_order"=>"0"}, "188"=>{"row_order"=>"1"}, "189"=>{"row_order"=>"2"}, "190"=>{"row_order"=>"3"}, "191"=>{"row_order"=>"4"}, "192"=>{"row_order"=>”5”}}}}. I’ve required :position and permitted :position_data. I’ve tried a number of different methods
<Siraris> whitelist position_data to no avail. I continue to get forbiddenattributeerror exceptions
<apeiros> ?rails Siraris
<ruby[bot]> Siraris: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<Siraris> Ah thanks
<Siraris> I tried #rails and ##rails to no avail
<apeiros> for some weird reason, #rails no longer forwards to #rubyonrails
a1fa has joined #ruby
ta_ has joined #ruby
teclator has joined #ruby
<a1fa> ooo - nokogiri docs are not easy to find
<fbt> Rawr. To render an erb, I have to pass a binding to the damn object
<fbt> A binding with pieces of a hash that I also don't know beforehand! This is fun.
<a1fa> i have a simple xml document, with a list of changing nodes
<a1fa> how do you test the node name with nokogiri? would you do xpath again?
dminuoso has joined #ruby
<a1fa> doc.npath("HEAD").each do |head| .. if head.npath("TAIL")? or is there a more simple method
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hobbyboy has quit [Ping timeout: 272 seconds]
ninja007 has quit [Quit: ninja007]
AlexRussia has quit [Ping timeout: 276 seconds]
ninja007 has joined #ruby
tdy has quit [Ping timeout: 272 seconds]
pawnbox has quit [Remote host closed the connection]
Hobbyboy has joined #ruby
submitnine has quit [Remote host closed the connection]
frankiee_ has joined #ruby
moeabdol has joined #ruby
<fbt> ...bindings don't return hashes
prawnzy has joined #ruby
<fbt> contain*
<frankiee_> jhass: Regarding that code you wrote a while back to get products, any idea how to turn the final struct back into a hash? https://gist.github.com/frankie-loves-jesus/23bcf741b672da31cc8cb1ef8aa400df
Siraris has quit [Quit: Siraris]
toni_ has quit [Ping timeout: 272 seconds]
<fbt> So. I have two hashes local for main with values determined at runtime: config and panel_data. I want to render an erb template using values from these hashes.
andikr has joined #ruby
<fbt> I don't *know* what do I need to pass there aside from “something from these hashes”.
<fbt> Is this the point where you just use instance variables in main?
<flying> apeiros thanks :)
<apeiros> flying: I assume that means you solved the problem? congrats :)
mwlang has joined #ruby
jhack has quit [Ping timeout: 276 seconds]
tmtwd has joined #ruby
dminuoso has quit [Remote host closed the connection]
AlexRussia has joined #ruby
prawnzy has quit [Ping timeout: 264 seconds]
toni_ has joined #ruby
nocco has quit []
jaguarmagenta has joined #ruby
redpants has quit [Quit: leaving]
<flying> nono I m still working on that but your help is useful :)
NTrash has joined #ruby
hashrocket has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<flying> I have still 2 questions: - how can I count all the elements in an array? - how can I create a new array from another array?
<flying> array.count() should count all the elemtns :)
BytesAndCoffee has joined #ruby
banisterfiend has joined #ruby
JRajamaa has joined #ruby
ninja007 has quit [Quit: ninja007]
ta_ has quit [Remote host closed the connection]
<BytesAndCoffee> anyone know how to get YouCompleteMe (Vim plugin) to play nice with Ruby?
<apeiros> &ri Array#size flying
claudiuinberlin has joined #ruby
<havenwood> flying: It's probably worth scanning through all the Array methods: https://docs.ruby-lang.org/en/2.3.0/Array.html
dionysus69 has quit [Ping timeout: 240 seconds]
<apeiros> "create an array from another array" - you want a copy? or you want a part from the array?
<apeiros> and yeah, what havenwood said
Hobbyboy has quit [Ping timeout: 272 seconds]
<fbt> nvm, I figured it out
<apeiros> should read through Array, Hash, String at least.
ponga has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
<apeiros> fbt: you probably want Binding#local_variable_set
JeanCarl1Machado has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
tmtwd has quit [Ping timeout: 272 seconds]
<fbt> Well actually rendering seems to work just fine with local vars from main
<fbt> I thought it didn't because I'm dumb .-.
<ruby[bot]> a1fa: 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
<a1fa> how do you extract children with nokogiri?
<a1fa> err. in this case i am trying to see if test is a weekly test or monthly
<flying> I have an array like array [1,2,3,4,5,60,56,56,......] if I say array[4] I need to sum all the elements before and after that index
Siraris has joined #ruby
Siraris has quit [Client Quit]
<flying> array1 = sum elements before index
<flying> array2 = sum eleemtns after index
jhack has joined #ruby
polishdub has joined #ruby
<apeiros> a1fa: as the bot said - I won't even open that.
<a1fa> i am using pry to try to figure out this nokogiri thing, and its corn fusing
<apeiros> &ri Array#[]
<dyjakan> flying: try overriding [] method of array
* apeiros smacks dyjakan with a stick
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> bad advice. ignore that flying :)
chouhoul_ has joined #ruby
<apeiros> but read the docs of Array#[]. you can use it to relatively easily get an array with all elements up to index 4, and an array with all elements after index 4
<dyjakan> apeiros: care to explain why? (i'm a ruby noob, genuine questions)
<apeiros> dyjakan: you don't go overriding core methods. you'll break about all other code. including core/stdlib code.
moeabdol has quit [Ping timeout: 244 seconds]
Helheim has quit [Quit: Bah, stupid error messages.]
<dyjakan> so the override would have global scope in my code?
claudiuinberlin has quit [Remote host closed the connection]
<apeiros> yes. changing a method in a class changes it for all instances of that class. everywhere.
Helheim has joined #ruby
<apeiros> gtg, back in ~2h
<dyjakan> sheeit, then yes that would be funny situation to have on an Array ;)
mark_66 has quit [Remote host closed the connection]
Ananthu has quit []
aryaching has joined #ruby
Ananthu has joined #ruby
[k- has joined #ruby
claudiuinberlin has joined #ruby
minimalism has quit [Quit: minimalism]
johnmilton has quit [Remote host closed the connection]
<a1fa> nokogiri is a ... :(
coolboy has joined #ruby
Oclair has joined #ruby
codelogix has joined #ruby
whiteline has left #ruby ["Leaving"]
johnmilton has joined #ruby
whiteline has joined #ruby
Oclair_ has quit [Ping timeout: 244 seconds]
minimalism has joined #ruby
<flying> overriding?? oh no I don't think I've the just knownledge :)
nando293921 has quit [Ping timeout: 244 seconds]
synthroid has quit [Remote host closed the connection]
<havenwood> flying: It's easy to stomp on core object methods, but don't! Everything else that use those methods will get borked.
dionysus69 has joined #ruby
Devalo has joined #ruby
rubyonra_ has quit []
<havenwood> flying: To redefine a core method locally you can use refinements, see: https://ruby-doc.org/core/doc/syntax/refinements_rdoc.html
codelogix has quit [Ping timeout: 272 seconds]
<havenwood> "Refinements are designed to reduce the impact of monkey patching on other users of the monkey-patched class."
<havenwood> Freedom patching!
<elomatreb> But if you're still new to the language I'd say to ignore things like refinements, since they require quite a bit of understanding of how the classes in Ruby work
SteenJobs has quit [Quit: SteenJobs]
SteenJobs has joined #ruby
biberu\ has joined #ruby
jimmysaville has quit [Remote host closed the connection]
charliesome has joined #ruby
nando293921 has joined #ruby
jimmysaville has joined #ruby
biberu has quit [Ping timeout: 272 seconds]
jimmysaville has quit [Ping timeout: 276 seconds]
<dyjakan> you could also make YourOwnArray that inherits from Array and then override its [] method; wouldn't that be a clean solution to the problem?
Devalo has quit [Remote host closed the connection]
minimalism has quit [Quit: minimalism]
<elomatreb> dyjakan: A class that has your custom access methods and stores an array internally would probably better
tdy has joined #ruby
mattwashere has joined #ruby
<BytesAndCoffee> anyone?
<BytesAndCoffee> anyone know how to get YouCompleteMe (Vim plugin) to play nice with Ruby?
<a1fa> BytesAndCoffee: anyone is out
dgncn has quit [Ping timeout: 244 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
phredus_ has joined #ruby
phredus_ has quit [Remote host closed the connection]
arashb has joined #ruby
brendan- has joined #ruby
MrBleu has quit [Quit: Page closed]
synthroid has joined #ruby
amclain has joined #ruby
jsrn_ has quit [Quit: Leaving]
<TomyWork> is it possible to take a heap dump of an unmodified ruby process?
<TomyWork> i want to see which objects take up most of the memory
b3atr has joined #ruby
[Butch] has joined #ruby
<b3atr> how to test if a method takes a specific argument in minitest?
<TomyWork> i have a rather small sinatra application that takes up 276 MB resident size for no apparent reason
coolboy has quit [Remote host closed the connection]
ninja007 has joined #ruby
AndrewIsHere has joined #ruby
<BytesAndCoffee> oh. no decorator syntax? :(
karthick has left #ruby [#ruby]
pawnbox has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
jonathanwallace_ has joined #ruby
<havenwood> TomyWork: Would objspace be an option?: http://ruby-doc.org/stdlib/libdoc/objspace/rdoc/ObjectSpace.html
<TomyWork> havenwood i dont know, would i have to invoke that from within my ruby app?
Coldblackice has joined #ruby
<havenwood> TomyWork: Yeah, maybe pry or pry-remote in and give it a look.
gingray has quit [Ping timeout: 272 seconds]
<TomyWork> awesome
troulouliou_div2 has joined #ruby
skweek has quit [Ping timeout: 272 seconds]
tlaxkit has quit [Quit: tlaxkit]
jonathanwallace_ is now known as jonathanwallace
tyang has quit [Ping timeout: 264 seconds]
brendan- has joined #ruby
elifoster has joined #ruby
compro has joined #ruby
bsrd has joined #ruby
bsrd has quit [Client Quit]
erlingur has joined #ruby
tomphp has quit [Ping timeout: 264 seconds]
tomphp_ has joined #ruby
<TomyWork> havenwood do i have any chance to get into a running ruby process with that?
<TomyWork> i.e. one that's running now and that was written with no awareness of pry or anything
Rodya_ has joined #ruby
preyalone has joined #ruby
nettoweb has joined #ruby
<flying> to sum all the elements in an array array.inject(:+) is correct?
charlie_ has joined #ruby
<flying> is that correct?
charlie_ is now known as Guest78561
<havenwood> TomyWork: Ah, yeah pry-remote would have to already be running remotely.
<TomyWork> https://spin.atomicobject.com/2013/08/19/debug-ruby-processes/ i just found some gdb trickery here
ishahnaz has joined #ruby
<flying> there are other ways to do that?
faces has quit [Ping timeout: 244 seconds]
<havenwood> flying: that's correct until Array#sum lands in Ruby 2.4
<TomyWork> crap, can't use gdb because someone didnt reboot since the last system update
claudiuinberlin has quit []
Guest78561 is now known as CharlieLo
Rodya_ has quit [Ping timeout: 272 seconds]
tyang has joined #ruby
<flying> in the older version is not correct anymore? :)
jshjsh has joined #ruby
rodfersou is now known as rodfersou|lunch
<havenwood> flying: `inject(:+)` will still work but there's a new optimized `sum`
JoshS has quit [Disconnected by services]
jshjsh is now known as JoshS
<havenwood> flying: you can get it now with the enumerable-statistics gem
SteenJobs has quit [Quit: SteenJobs]
<TomyWork> that worked rather well
roamingdog has quit [Read error: Connection reset by peer]
<TomyWork> until i crashed it :D
pokalyis has joined #ruby
xentity1x has joined #ruby
roamingdog has joined #ruby
senayar has quit []
<TomyWork> ah well, i'll let it run for a while and try again
last_staff has joined #ruby
nando293921 has quit [Ping timeout: 240 seconds]
<havenwood> TomyWork: oops! nice
ruby_ has quit [Remote host closed the connection]
<TomyWork> evalr "'hello'" didnt work that well apparently
ruby_ has joined #ruby
<TomyWork> could be due to the mismatching libs, could be something else
last_staff has quit [Client Quit]
braincrash has quit [Ping timeout: 244 seconds]
CharlieLo has quit [Remote host closed the connection]
nankyokusei has joined #ruby
braincrash has joined #ruby
ruby_ has quit [Ping timeout: 264 seconds]
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
skweek has joined #ruby
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
antgel has quit [Ping timeout: 264 seconds]
<flying> I was doing this test guys https://codility.com/c/run/demoEPG9K3-525
<flying> :)
CharlieLo has joined #ruby
<flying> I done something can you help me to check if its' fine my solution?
nankyokusei has quit [Ping timeout: 264 seconds]
erlingur has quit [Ping timeout: 264 seconds]
<ruby[bot]> flying: as I told you already, please use https://gist.github.com
codelogix has joined #ruby
antgel has joined #ruby
<CharlieLo> I have a page that contains tabs of other models like movies, actors, locations etc. I am having difficulty updating the actors from within the movies_controller. Any help is much appreciated.
nando293921 has joined #ruby
peteykun has joined #ruby
erlingur has joined #ruby
nando293921 has quit [Client Quit]
<flying> I have an issue... if doesn't work properly if I have negative numbers
<flying> if -2 == -2 don't match
hakunin has quit [Ping timeout: 240 seconds]
giorgos1 has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 240 seconds]
<havenwood> CharlieLo: #RubyOnRails is the best channel for Rails stuff!
<ljarvis> >> -2 == -2
<ljarvis> >> -2 == -2
<ruby[bot]> ljarvis: # => true (https://eval.in/652050)
codelogix has quit [Ping timeout: 276 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<CharlieLo> havenwood: Awesome! Thank you. This is my first time using chat. Thanks again!
<flying> and why in my code when arraymin == arraymax don't match if negative numbers?
araujo has quit [Read error: Connection timed out]
petrichorx has joined #ruby
Zamyatin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toni_ has quit [Ping timeout: 272 seconds]
asal2107 has quit [Ping timeout: 244 seconds]
<flying> oh yes it matches
<flying> :)
<ljarvis> glad we got to the bottom of that
araujo has joined #ruby
ruby_ has joined #ruby
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 272 seconds]
Zamyatin has joined #ruby
Asher has quit [Quit: Leaving.]
Sucks has joined #ruby
NTrash has quit [Quit: Konversation terminated!]
<flying> how can I print the index of an array? last question :)
NTrash has joined #ruby
tomphp_ has quit [Ping timeout: 240 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
Asher has joined #ruby
Asher has quit [Client Quit]
Asher has joined #ruby
codelogix has joined #ruby
JeanCarloMachado has joined #ruby
compro has quit [Ping timeout: 264 seconds]
dgncn has joined #ruby
roamingdog has quit [Remote host closed the connection]
nitric has joined #ruby
tyang has quit [Ping timeout: 264 seconds]
Wolland has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
adac has quit [Ping timeout: 272 seconds]
Cohedrin has joined #ruby
wugy has quit [Read error: Connection reset by peer]
beauby has joined #ruby
mwlang has quit [Ping timeout: 264 seconds]
SteenJobs has joined #ruby
<LyndsySimon> Are exceptions typically used as flow control in Ruby? Note that I'm coming from Python, which is why I ask.
Regulati_ has quit [Remote host closed the connection]
<apeiros> LyndsySimon: no. we have throw/catch for that.
<hanmac> LyndsySimon: hm mostly not as far as i know. did you checkout https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-python/ yet?
ichkv has quit [Remote host closed the connection]
<apeiros> flying: the value at an index? or what do you mean?
<LyndsySimon> hanmac: I have read that. It was helpful, but doesn't seem like it was written by someone who is really fluent in Python, unfortunately.
<hanmac> flying: only with each_with_index or with_index ... otherwise not possible without manual counting
<apeiros> LyndsySimon: and throw/catch is also rarely used, since we usually have methods which do what you want without multilevel return
<flying> for example array [10,20,30,40] I want to print the index of 30
<LyndsySimon> I'm whipping up an example of what I'm thinking, one sec :)
<flying> how can I do that?
<apeiros> &ri Array#index flying
<flying> it should be 2 but how can I print with ruby?
<apeiros> flying: should really take a quarter of an hour and go through array's methods ;-)
<apeiros> >> [10,20,30,40].index(30)
<ruby[bot]> apeiros: # => 2 (https://eval.in/652068)
<apeiros> seems to work just fine?
<hanmac> i think flying wants the print methods like p or puts or print or any of their derivates
arnonhongklay has joined #ruby
Vingador has joined #ruby
<LyndsySimon> apeiros: Yeah, throw/catch is certainly not what I'm looking for. My first impression of that structure is that it seems to be a slightly more complex version of GOTO.
<flying> ok thanks for the help I can continue from myself :)
<flying> yes
prawnzy has joined #ruby
<hanmac> Ruby has GOTO too, but only as a joke ;P
<apeiros> LyndsySimon: it's precisely what raise/rescue is, except you can use it to unwind the stack with any value, not just exceptions
<apeiros> LyndsySimon: and no, it's a more limited (but hence less spaghetti) version of goto
AlphaAtom has joined #ruby
pwnd_nsfw has joined #ruby
ninja007 has left #ruby [#ruby]
<LyndsySimon> catch also works on exceptions?
wrkrcoop has joined #ruby
<LyndsySimon> Here's a minimal example of what I was thinking about when I asked the question. Would this be considered "fluent Ruby"? http://pastebin.com/2uWtJkZ1
<ruby[bot]> LyndsySimon: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/631e990ea2bea05655304465f58ba05e
<ruby[bot]> LyndsySimon: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
arashb has quit [Remote host closed the connection]
<wrkrcoop> is it possible to dyanmically create a class variable? like user = ‘steve’ @@user would be @@steve
jaequery has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 272 seconds]
<apeiros> LyndsySimon: that seems like a reasonable use for exceptions and doesn't seem to be flow control. if you'd use flow control, you'd get a race condition.
<apeiros> LyndsySimon: i.e. flow control would be `if api_available? then get_from_api else get_from_db end`
flying has quit []
<LyndsySimon> apeiros: OK, cool. I do consider it flow control, because it's expected that the exception be raised often.
<bougyman> you don't need the begin in that get_the_thing method
<apeiros> but that's prone to races. API might be available when you do api_available?, and gone when you do the actual request.
<hanmac> wrkrcoop: it is possible, but that is very bad code
<LyndsySimon> apeiros: As opposed to Javascript for instance, where it's inadvisable to use exceptions in this way because there is significant overhead in creating them.
prawnzy has quit [Ping timeout: 240 seconds]
<wrkrcoop> hanmac: the other solution is to create 4 methods that all do the same thing but finish by creating a class variable witha particular name
<wrkrcoop> i guess i could use a case statement …
<wrkrcoop> hanmac: how do i interpolate on a class variable?
<hanmac> wrkrcoop: either that or use a hash as class variable
<LyndsySimon> wrkrcoop: I would consider defining method_missing for the class, if I understand properly
<LyndsySimon> Note that I have ~10 hours of Ruby experience thus far though :)
<apeiros> LyndsySimon: if "less heavy" also means "less correct", then you shouldn't opt for it.
<apeiros> and I'm pretty sure testing for api presence is heavier than creating an exception, even in JS ;-)
jaguarmagenta has joined #ruby
Couch has quit [Ping timeout: 276 seconds]
<apeiros> (and even if it wasn't - the "less correct" would still stand)
<hanmac> method_missing is one of my 13 most liked methods, next to included and method_defined ;P
<apeiros> hanmac: and there I thought it'd be one from fiddle :D
lxsameer has joined #ruby
Dysp has joined #ruby
<hanmac> apeiros: which one? i didnt use fiddle that often
<apeiros> no idea. one which allows you to tinker with ruby's internals.
<apeiros> hm, or maybe one from RubyVM?
<Dysp> Mjello. I am trying to produce some documentation with YARD. Works like a charm. One issue I would like to get your ideas on is how to host it; do you know of any service that will host such documentation? It must be privately accessable.
erlingur has quit [Ping timeout: 244 seconds]
elenatanasoiu has quit [Ping timeout: 240 seconds]
<apeiros> define "privately accessible"
<hanmac> LyndsySimon: hm i would prefer the exception route, or combine them with first doing if api_available? before even trying to get the api if able
<hanmac> apeiros: do you mean: RubyVM::InstructionSequence.compile(str).disasm ? ;P
duderonomy has joined #ruby
JakFrist[WVU] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
pawnbox has quit [Remote host closed the connection]
erlingur has joined #ruby
peteykun has quit [Quit: Leaving]
<Dysp> apeiros: I mean only accessable by people I choose to make it accessable for. Just like a private repository :)
<LyndsySimon> hanmac: That example was just barely-working pseudocode at the moment :) In the real world where I've been tasked with something similar I'm actually using Spyke models to access the API.
<apeiros> Dysp: then any paid hosting provider
<apeiros> it's plain html after all.
xentity1x has quit [Ping timeout: 244 seconds]
beauby has quit [Read error: Connection reset by peer]
<Dysp> apeiros: Yeah, sure, of course.
pawnbox has joined #ruby
<LyndsySimon> I'm going to need a way to attempt to access the model via Spyke, but handle the error properly and notify the user of the failure, using little or no additional code during model access.
beauby has joined #ruby
<Dysp> But I was wondering if you knew of anyone providing that service. But of course a private host is the proper solution
<Dysp> Thank you.
nikivi has joined #ruby
<LyndsySimon> I've got about seven years of Python experience and just moved to a Ruby shop, so I'm in this weird position where I know how to architect the solution, but don't yet know enough about the Ruby's architecture and idioms to do it elegantly. I'm rapidly coming up to speed though.
<apeiros> Dysp: private for free is rare (for obvious reasons?)
<Dysp> Yes. Obviously.
ponga has quit [Quit: Connection closed for inactivity]
wrkrcoop has left #ruby [#ruby]
<apeiros> LyndsySimon: this channel should be able to help you easily with such things, assuming you provide a good gist
ishahnaz has quit []
* LyndsySimon nods
<LyndsySimon> apeiros: I think so, and it lets me not constantly interrupt people in my office who are working :)
<LyndsySimon> In exchange I'll hang around and answer as many of the newbie questions as I can.
Madplatypus has joined #ruby
<apeiros> sure. helping is top-down. much appreciated ;-)
marxarelli has joined #ruby
<frankiee_> Hi! Can someone help me convert a Struct to a Hash? https://gist.github.com/frankie-loves-jesus/23bcf741b672da31cc8cb1ef8aa400df
beauby_ has joined #ruby
beauby has quit [Ping timeout: 244 seconds]
<LyndsySimon> Is it generally advisable to subclass Exception or StandardError for application-defined exceptions?
SteenJobs has quit [Quit: SteenJobs]
webus has quit [Quit: goodbye]
<apeiros> never subclass Exception
<havenwood> LyndsySimon: the latter
<apeiros> always something lower down
<matthewd> LyndsySimon: StandardError (or a subclass thereof).. always.
Guest38 has joined #ruby
<LyndsySimon> Awesome, thanks :)
<apeiros> rescue defaults to StandardError, i.e. it won't rescue Exception and direct subclasses of it
<havenwood> LyndsySimon: here's a handy quickref: http://www.zenspider.com/ruby/quickref.html
erlingur has quit [Ping timeout: 264 seconds]
<apeiros> that's because things like Interrupt, NoMemoryError etc. should not be rescued by default :)
<hanmac> also even more never rescue from Exception
SteenJobs has joined #ruby
<LyndsySimon> Cool, I'll add that to my reading list.
compro has joined #ruby
<LyndsySimon> hanmac: Yep. Don't want to be catcing SystemExit when someone is trying to shut down the process.
csk has quit [Read error: Connection reset by peer]
<hanmac> yeah, someone wants to close it, but the program says "no" ;P
<apeiros> frankiee_: Struct#to_h is correct. seems to me like your problem was elsewhere.
rcvalle has joined #ruby
csk has joined #ruby
mooe has joined #ruby
replay has joined #ruby
antgel has quit [Ping timeout: 272 seconds]
mrmortondk has joined #ruby
<frankiee_> apeiros: awesome.. thanks for bringing me a step closer
moeabdol has joined #ruby
asal2107 has joined #ruby
ramfjord has joined #ruby
<apeiros> frankiee_: sorry to not give you more. slightly distracted. but you put in a lot of effort to describe your problem. if it's still not solved later, I'll give it another shot.
fivmo has joined #ruby
Hobbyboy has joined #ruby
<frankiee_> apeiros: thanks man i really appreciate hearing that. i try to describe it as much as possible because it also helps me lol
asal2107 has quit [Ping timeout: 272 seconds]
gingray has joined #ruby
yeticry has quit [Ping timeout: 264 seconds]
tyang has joined #ruby
Ananthu has quit [Quit: Connection closed for inactivity]
JoshS has quit [Quit: Leaving]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
adac has joined #ruby
rodfersou|lunch is now known as rodfersou
symm- has quit [Ping timeout: 276 seconds]
Ropeney has joined #ruby
pawnbox has quit [Remote host closed the connection]
emlee has quit [Ping timeout: 240 seconds]
Pumukel has quit [Ping timeout: 276 seconds]
cloaked1 has quit [Ping timeout: 240 seconds]
hobodave has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
gingray has quit [Ping timeout: 276 seconds]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.2 Aria]
babblebre has joined #ruby
salut has quit [Quit: salut]
Hobbyboy has quit [Ping timeout: 272 seconds]
MrBusiness3 has joined #ruby
CharlieLo has quit [Remote host closed the connection]
roamingdog has joined #ruby
MrBusiness2 has quit [Ping timeout: 265 seconds]
CharlieLo has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
nando293921 has joined #ruby
nikivi has quit [Read error: Connection reset by peer]
mac_ has quit [Quit: This computer has gone to sleep]
khaki has joined #ruby
nobitanobi has quit []
Azure|dc has joined #ruby
SuperLag has quit [Quit: Lost terminal]
whathappens has joined #ruby
claudiuinberlin has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
roamingdog has quit [Ping timeout: 240 seconds]
pwnd_nsfw` has joined #ruby
Azure has quit [Ping timeout: 244 seconds]
pwnd_nsfw has quit [Ping timeout: 272 seconds]
spider-mario has joined #ruby
khaki has quit [Client Quit]
marxarelli has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nofxx has joined #ruby
marxarelli has joined #ruby
khaki has joined #ruby
RegulationD has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
Macrobiotic has joined #ruby
khaki has quit [Client Quit]
tyang has quit [Ping timeout: 264 seconds]
Devalo has joined #ruby
conta has joined #ruby
oncall-pokemon has joined #ruby
compro has quit [Ping timeout: 244 seconds]
RegulationD has quit [Ping timeout: 244 seconds]
elifoster has quit [Ping timeout: 276 seconds]
dviola has joined #ruby
Hobbyboy has joined #ruby
hlieberman has left #ruby [#ruby]
workmad3 has quit [Ping timeout: 272 seconds]
conta has quit [Ping timeout: 264 seconds]
jimmysaville has joined #ruby
Ishido has joined #ruby
jimmysaville is now known as Snowy
dn5 has joined #ruby
dn5 has quit [Client Quit]
optiz0r has quit [Ping timeout: 276 seconds]
SuperLag has joined #ruby
dn5 has joined #ruby
dn5 has quit [Client Quit]
pawnbox has joined #ruby
dn5 has joined #ruby
dn5 has quit [Client Quit]
claudiuinberlin has joined #ruby
RegulationD has joined #ruby
conta has joined #ruby
jackjackdripper has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cloaked1 has joined #ruby
harai has joined #ruby
dn5 has joined #ruby
tyang has joined #ruby
last_staff has joined #ruby
asal2107 has joined #ruby
RegulationD has quit [Remote host closed the connection]
RegulationD has joined #ruby
dn5 has quit [Client Quit]
dn5 has joined #ruby
sdothum has quit [Quit: ZNC 1.6.3 - http://znc.in]
ocbtec has quit [Quit: leaving]
dn5 has quit [Client Quit]
adac has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bob434 has joined #ruby
optiz0r has joined #ruby
SeepingN has joined #ruby
nankyokusei has joined #ruby
Guest54 has joined #ruby
bocaneri has quit [Read error: Connection reset by peer]
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 264 seconds]
<BytesAndCoffee> where's a good place to learn ruby? i don't mean project euler or something like that, im already competent in python, i want to learn idiomatic ruby
<BytesAndCoffee> using ruby like its meant to be used
preyalone has quit [Quit: Connection closed for inactivity]
jaequery has joined #ruby
<pabs> BytesAndCoffee: the "programming ruby" book by dave thomas is a good source: https://pragprog.com/book/ruby4/programming-ruby-1-9-2-0
nikivi has joined #ruby
<BytesAndCoffee> pabs: i was looking for something like ruby uin 20 minutes, but more in-depth
Zamyatin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
codelogix has quit [Ping timeout: 272 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
<pabs> BytesAndCoffee: i don't have a good answer for that, although i'm sure there's something out there
s2013 has joined #ruby
miqlas-H has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
govg has joined #ruby
dn5 has joined #ruby
andll has joined #ruby
cdg has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 244 seconds]
SteenJobs has joined #ruby
codelogix has joined #ruby
adac has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
ramfjord has joined #ruby
claudiuinberlin has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
pandaant has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 272 seconds]
jonathanwallace has quit [Quit: Connection closed for inactivity]
<havenwood> BytesAndCoffee: The Ruby Koans go further.
arnonhongklay has quit [Remote host closed the connection]
jmignault has joined #ruby
Devalo has quit [Remote host closed the connection]
synthroid has quit [Remote host closed the connection]
<havenwood> BytesAndCoffee: http://rubykoans.com
fullofc__ has quit [Remote host closed the connection]
<havenwood> BytesAndCoffee: See other links here: https://ruby-community.com/pages/links
<havenwood> Exercism.io is quite nice!
fullofcaffeine has joined #ruby
<BytesAndCoffee> thanks! :)
pwnd_nsfw has joined #ruby
jackjackdripper1 has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 272 seconds]
dfockler has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
dn5 has quit [Quit: leaving]
dn5 has joined #ruby
fullofcaffeine has quit [Ping timeout: 276 seconds]
bob434 has quit [Quit: This computer has gone to sleep]
Xeago has joined #ruby
jackjackdripper has quit [Ping timeout: 240 seconds]
Devalo has joined #ruby
h1d has joined #ruby
pawnbox has joined #ruby
paradx has joined #ruby
roamingdog has joined #ruby
arnonhongklay has joined #ruby
Timba-as has joined #ruby
bob434 has joined #ruby
Tele has left #ruby ["Chau"]
pwnd_nsfw has quit [Ping timeout: 272 seconds]
fullofcaffeine has joined #ruby
bob434 has quit [Remote host closed the connection]
johnmilton has quit [Remote host closed the connection]
mim1k|work has joined #ruby
synthroid has joined #ruby
pwnd_nsfw has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bob434 has joined #ruby
bob434 has quit [Client Quit]
justinf has joined #ruby
petrichorx has quit [Quit: Connection closed for inactivity]
arnonhongklay has quit [Ping timeout: 244 seconds]
mim1k|wo1k has quit [Ping timeout: 240 seconds]
roamingdog has quit [Ping timeout: 264 seconds]
stamina has quit [Ping timeout: 276 seconds]
nettoweb has joined #ruby
charliesome has joined #ruby
<justinf> when using Open3#popen3, what's the most efficient way for me to just pass through the data from the stdout and stderr file descriptors given to me by popen to the ruby process's stdout and stderr?
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
prawnzy has joined #ruby
Ananthu has joined #ruby
<justinf> ideally the user experience I'm looking for is that there shouldn't be an appreciable difference between running my ruby script and the underlying script that is being popened
dennisz has joined #ruby
dennisz has quit [Client Quit]
Wolland has quit [Remote host closed the connection]
toni_ has joined #ruby
fughetta_ has joined #ruby
sczizzo has quit []
prawnzy has quit [Ping timeout: 244 seconds]
bsrd has joined #ruby
<ciawal> justinf: if you're just passing everything through, why do you need open3?
jaguarmagenta has joined #ruby
fughetta has quit [Ping timeout: 272 seconds]
toni_ has quit [Client Quit]
blackwind_123 has joined #ruby
<justinf> ciawal: well, I'm running several subsequent commands, I want to make branching decisions based on retvals, etc.
<ciawal> so why do you need open3?
ixti has joined #ruby
<justinf> maybe I don't - what else could I be using?
<miqlas-H> Guys is there any online IRC log for #ruby?
<miqlas-H> echelog doesn't have anything if i see it correctly.
<ciawal> you can just check the exit status no?
<havenwood> miqlas-H: See the channel topic: https://irclog.whitequark.org/ruby
johnmilton has joined #ruby
<miqlas-H> havenwood: thank you!
<eam> justinf: if you just fork/exec, system, whatever, it by default will use the same stdin, stdout and stderr as the parent process
<justinf> that could work for me here, yeah
<eam> that's why you can see the output of ruby -e'system "ls"'
<justinf> how about if I wanted to capture the IO _and_ show it to the user?
<justinf> I don't think I need to but good to be prepared
<eam> then you'll need to use open3 and shuttle it between descriptors
<justinf> yeah ok
<eam> ala tee
<justinf> thanks
jaguarmagenta has quit [Ping timeout: 276 seconds]
the_drow has joined #ruby
brendan- has joined #ruby
Dysp has quit [Quit: Page closed]
Devalo has quit [Remote host closed the connection]
justinf has left #ruby ["done"]
the_drow_ has joined #ruby
dfockler has quit [Quit: Leaving]
stamina has joined #ruby
CharlieLo has quit [Remote host closed the connection]
the_drow has quit [Ping timeout: 276 seconds]
JakFrist[WVU] has joined #ruby
CharlieLo has joined #ruby
pragmaticus has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
graft has quit [Quit: Lost terminal]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Dimik has joined #ruby
asal2107 has quit [Read error: Connection reset by peer]
asal2107 has joined #ruby
dn5 has quit [Ping timeout: 264 seconds]
tyang has quit [Ping timeout: 264 seconds]
cloaked1 has quit [Ping timeout: 240 seconds]
pwnd_nsfw` has joined #ruby
Joufflu has joined #ruby
dn5 has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
pwnd_nsfw has quit [Ping timeout: 272 seconds]
stamina has quit [Quit: WeeChat 1.5]
conta has quit [Ping timeout: 272 seconds]
elifoster has joined #ruby
elifoster has quit [Client Quit]
jenrzzz has quit [Ping timeout: 264 seconds]
skweek has joined #ruby
Devalo has joined #ruby
the_drow has joined #ruby
Pumukel has joined #ruby
the_drow_ has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
CharlieLo has quit []
eljimmy has joined #ruby
Devalo has quit [Remote host closed the connection]
Snowy has quit [Remote host closed the connection]
dn5 has quit [Ping timeout: 240 seconds]
roamingdog has joined #ruby
mrgrieve1 has joined #ruby
hakunin has joined #ruby
roamingdog has quit [Read error: Connection reset by peer]
roamingdog has joined #ruby
Guest51435 is now known as Cyrus
Cyrus has quit [Changing host]
Cyrus has joined #ruby
Pumukel has quit [Ping timeout: 272 seconds]
jaequery has joined #ruby
mrgrieves has quit [Ping timeout: 276 seconds]
YaknotiS has quit [Remote host closed the connection]
Zamyatin has joined #ruby
dn5 has joined #ruby
paradx has quit [Ping timeout: 272 seconds]
tyang has joined #ruby
<frankiee_> apeiros: still in trouble land incase your distraction has dissipated :-)
<frankiee_> if not lets talk tomorrow or something no probs
Vingador has quit [Ping timeout: 264 seconds]
hahuang62 has joined #ruby
nando293921 has quit [Ping timeout: 240 seconds]
the_drow has quit [Ping timeout: 272 seconds]
ur5us has joined #ruby
prawnzy has joined #ruby
JRajamaa has quit [Ping timeout: 240 seconds]
bsrd has quit [Quit: WeeChat 1.5]
JRajamaa has joined #ruby
the_drow has joined #ruby
Coldblackice has quit []
<BytesAndCoffee> anyone know whats going on with this syntax error?
failshell has joined #ruby
<havenwood> BytesAndCoffee: I think you're in the wrong channel! :-P
dionysus69 has quit [Remote host closed the connection]
elenatanasoiu has joined #ruby
eizua has quit [Quit: Leaving]
<SeepingN> your line endings are wrong
<BytesAndCoffee> havenwood: the two windows in the right are ruby
dionysus69 has joined #ruby
<BytesAndCoffee> im translating a python script to ruby as an excercise
nando293921 has joined #ruby
<SeepingN> remove "for "
jenrzzz has joined #ruby
<SeepingN> on line 12
<havenwood> BytesAndCoffee: Hah, just saw it scrolling to the right... heh. Use Gist in the future so it's text instead of an image of text!
<apeiros> frankiee_: ah right. can you link again? (different computer here, don't have the backlog)
ta_ has joined #ruby
<SeepingN> $primes.each do |p|
<havenwood> ?gist BytesAndCoffee
<ruby[bot]> BytesAndCoffee: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
beauby_ has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
<SeepingN> line 9: i += 2
<BytesAndCoffee> SeepingN: thanks, that fixed it
<BytesAndCoffee> havenwood: i wanted to include the execution window below
<BytesAndCoffee> and i was too lazy to mod+shift the python window to another workspace
<BytesAndCoffee> (i3 ftw)
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
moeabdol has quit [Ping timeout: 240 seconds]
zeroDi has joined #ruby
oedgok has quit [Remote host closed the connection]
<BytesAndCoffee> also is ideone down?
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
beauby has joined #ruby
<frankiee_> the hashie mash magic is all jhass though
babblebre has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 276 seconds]
moeabdol has joined #ruby
<apeiros> frankiee_: can you add `p product.class, product` before line 134?
<apeiros> without the `
ode_to_code has joined #ruby
adac has quit [Ping timeout: 264 seconds]
<frankiee_> oh wait line mix up
<apeiros> frankiee_: there we go. your product variable doesn't contain a single product. interestingly it contains an empty array.
ramfjord_ has joined #ruby
claudiuinberlin has quit []
<apeiros> which makes sense. means that Tradedoubler.fetch returns an array. and map { array } gives you a nested array.
<apeiros> and that also explains the behaviour. you don't do Struct#to_h, you do Array#to_h
nando293921 has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
<apeiros> frankiee_: should be: @products_of_all_categories.each do |products| products.each do |product| puts product.to_h end end
<apeiros> where @products_of_all_categories = your current @products
replay has quit [Ping timeout: 244 seconds]
nankyokusei has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
Sucks has quit [Ping timeout: 272 seconds]
<frankiee_> oh thsi is so excellent
<apeiros> the Array#to_h btw. fails because it needs [[key, value], …], but you have [value, …]
<frankiee_> hmmm
NTrash has quit [Quit: Konversation terminated!]
hutch34_ has quit [Quit: WeeChat 1.5]
<frankiee_> YEESEESSSS!!
NTrash has joined #ruby
ruby-lang147 has joined #ruby
<frankiee_> we have hash apeiros thank you from the bottom of my heart
<apeiros> alternatively you can use .flat_map in line 20 instead of .map
<apeiros> then you have a flat array, not a nested.
nando293921 has joined #ruby
dagda1 has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
nankyokusei has quit [Ping timeout: 272 seconds]
Zamyatin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tcrypt has joined #ruby
<frankiee_> apeiros: i'll try it out as well
<frankiee_> oh man now i can go to sleep with peace on my mind
* frankiee_ does one of those crazy icelandic cheers to honor apeiros (https://www.youtube.com/watch?v=bYy2WHbbbSA)
NTrash has quit [Quit: Konversation terminated!]
nofxx has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
tyang has quit [Ping timeout: 264 seconds]
JeanCarloMachado has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
lxsameer has quit [Quit: WeeChat 1.5]
hahuang62 has quit [Ping timeout: 244 seconds]
roamingdog has quit [Remote host closed the connection]
hakunin has quit [Remote host closed the connection]
the_drow has quit [Quit: This computer has gone to sleep]
ode_to_code has quit [Quit: ode_to_code]
hakunin has joined #ruby
hahuang62 has joined #ruby
roamingdog has joined #ruby
<fbt> Awww yisss. My panel now forks workers
<fbt> If someone is in the mood for telling me how wrong my code is: https://git.fleshless.org/moltenbar/tree/
<fbt> :3
gener1c has joined #ruby
TechIsCool has joined #ruby
<gener1c> hello
<TechIsCool> What is the difference between value.each and value&.each
<gener1c> was silver platter replaced by cinch?
mattwashere has quit [Remote host closed the connection]
hakunin has quit [Ping timeout: 244 seconds]
<gener1c> you mean values.each and values.each! ?
blackgoat has joined #ruby
rose_ has joined #ruby
cdg has joined #ruby
mattwashere has joined #ruby
<rose_> How easy is to be tracked, using Mechanize with some proxy?
skweek has quit [Ping timeout: 272 seconds]
paradx has joined #ruby
arnonhongklay has joined #ruby
<gener1c> rose_: how easy will it be to detect you are scraping someone with mech if you use a proxy?
<gener1c> very easy
cdg has quit [Read error: Connection reset by peer]
bob434 has joined #ruby
<rose_> Acctually I want to post some automated messages in a html form to troll a friend, so I don't want him caught me
<gener1c> well
cdg has joined #ruby
<gener1c> that would be illegal
<apeiros> TechIsCool: nil.each will raise, nil&.each will just return nil
replay has joined #ruby
<rose_> I've been researching about tor-privoxy, but always give me my real IP.
synthroid has quit []
asal2107 has quit [Ping timeout: 240 seconds]
<TechIsCool> apeiros: I was prototyping in 2.3 but the platform I am on is 2.1.8
<apeiros> &. is 2.3+ only
<gener1c> i dont like this op
<gener1c> its ugly :(
<rose_> My country has no laws that can be applyed in this context... So... Whatever...
arnonhongklay has quit [Remote host closed the connection]
<gener1c> rose_: do you live in sumalya?
ruby-lang147 has quit [Quit: Page closed]
elenatanasoiu has quit [Quit: WeeChat 1.5]
<gener1c> thats the only country i know that doesnt enforce such things
xentity1x has joined #ruby
pawnbox has quit [Remote host closed the connection]
dn5 has quit [Quit: Lost terminal]
sandroqz has joined #ruby
<rose_> Well... Welcome to my country, where the only existent laws for that area, are 'digital robbery' and defamation....
beauby has quit [Read error: Connection reset by peer]
<rose_> Oh... Sorry... And post anything in any placa against the government.
sandroqz has quit [Client Quit]
tcrypt_ has joined #ruby
sandroqz has joined #ruby
arnonhongklay has joined #ruby
nikivi has quit [Quit: irc]
sandroqz has quit [Client Quit]
marxarelli is now known as marxarelli|afk
<fbt> rose_, are you Russian?
tcrypt has quit [Ping timeout: 276 seconds]
<gener1c> maybe from north korea
<gener1c> or mainland china
<rose_> Well, I can't force you to believe that I want to troll a friend...
<rose_> None of those... Acctually, the Onu seems to care about my country, but the truth is that what the world are seeing it's a lie.
NTrash has joined #ruby
arnonhongklay has quit [Remote host closed the connection]
beauby has joined #ruby
<gener1c> what?
jenrzzz has joined #ruby
cloaked1 has joined #ruby
_sfiguser has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
paradx has quit [Remote host closed the connection]
h1d has quit [Changing host]
h1d has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Vingador has joined #ruby
failshell has quit []
arnonhongklay has joined #ruby
arnonhongklay has quit [Read error: Connection reset by peer]
patarr has quit [Quit: patarr]
Helheim has quit [Quit: Bah, stupid error messages.]
beauby has quit [Read error: Connection reset by peer]
Vingador has quit [Remote host closed the connection]
redpants has joined #ruby
erlingur has joined #ruby
jaguarmagenta has joined #ruby
Helheim has joined #ruby
elastix has joined #ruby
AlphaAtom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Snowy has joined #ruby
mooe has quit [Quit: Connection closed for inactivity]
dagda1 has quit [Quit: Textual IRC Client: www.textualapp.com]
RobertBirnie has joined #ruby
[]\[] has joined #ruby
go|dfish has quit [Ping timeout: 250 seconds]
ldnunes has quit [Quit: Leaving]
rodfersou has quit [Quit: leaving]
jaguarmagenta has quit [Ping timeout: 244 seconds]
drbrain has quit [Quit: Goodbye]
drbrain has joined #ruby
drbrain has quit [Changing host]
drbrain has joined #ruby
beauby has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
phaza has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
tcrypt has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
tcrypt_ has quit [Ping timeout: 276 seconds]
Guest71658 is now known as zapata
ramfjord_ has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
csk has quit [Quit: ZZZzzz…]
RikkiMongoose has joined #ruby
go|dfish has joined #ruby
zapata has quit [Quit: WeeChat 1.5]
zapata has joined #ruby
roamingdog has quit [Remote host closed the connection]
blackmesa has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
mrmortondk has quit [Quit: Textual IRC Client: www.textualapp.com]
h1d has quit [Quit: h1d]
fivmo has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Guest54 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JakFrist[WVU] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Zamyatin has joined #ruby
biberu\ has quit [Read error: Connection reset by peer]
JakFrist[WVU] has joined #ruby
marxarelli|afk is now known as marxarelli
marxarelli is now known as marxarelli|afk
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
roamingdog has joined #ruby
dnewkerk has joined #ruby
d5sx43 has joined #ruby
hakunin has joined #ruby
elastix has quit [Quit: elastix]
mattwashere has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
mattwashere has joined #ruby
roamingd_ has joined #ruby
dnewkerk has quit [Client Quit]
hahuang62 has quit [Ping timeout: 244 seconds]
mattwashere has quit [Ping timeout: 272 seconds]
babblebre has joined #ruby
john3 is now known as squidbits
xentity1x has quit [Ping timeout: 240 seconds]
millerti has joined #ruby
aidalgol has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JRajamaa has quit [Quit: Konversation terminated!]
andll has quit [Ping timeout: 240 seconds]
roamingd_ has quit [Remote host closed the connection]
gfvcastro has joined #ruby
roamingdog has joined #ruby
bobdobbs has quit [Ping timeout: 252 seconds]
NTrash has quit [Quit: Konversation terminated!]
roamingdog has quit [Ping timeout: 240 seconds]
beauby has quit [Read error: Connection reset by peer]
blackmes1 has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
d5sx43 has quit []
jcao219 has joined #ruby
roamingdog has joined #ruby
beauby has joined #ruby
roamingdog has quit [Remote host closed the connection]
hanmac has quit [Ping timeout: 272 seconds]
hanmac has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
roamingd_ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 272 seconds]
[Butch] has quit [Quit: I'm out . . .]
jphase_ has joined #ruby
Ananthu has quit [Quit: Connection closed for inactivity]
marxarelli|afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marxarelli has joined #ruby
jphase has quit [Ping timeout: 245 seconds]
roamingd_ has quit [Remote host closed the connection]
jphase_ has quit [Ping timeout: 244 seconds]
hakunin has quit [Remote host closed the connection]
prawnzy has quit [Remote host closed the connection]
prawnzy has joined #ruby
marxarelli is now known as marxarelli|afk
Azure|dc is now known as Azure
roamingdog has joined #ruby
marxarelli|afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
last_staff has quit [Quit: goes moo moo]
chouhoul_ has quit [Remote host closed the connection]
roamingd_ has joined #ruby
marxarelli has joined #ruby
roamingdog has quit [Read error: Connection reset by peer]
tvsutton has quit [Changing host]
tvsutton has joined #ruby
Zamyatin has quit [Quit: Knocking out. Peace y'all...]
huthuthuthuthuth has joined #ruby
<huthuthuthuthuth> is there a book that has ruby projects with code solutions that will challenge and improve a beginner's skill?
elenatanasoiu has joined #ruby
nando293921 has quit [Ping timeout: 244 seconds]
<havenwood> huthuthuthuthuth: it's not a book but exercism.io sounds like that and you also get feedback on improvements from the community
Burgestrand has joined #ruby
<huthuthuthuthuth> thanks :)
beauby has quit [Read error: Connection reset by peer]
Burgestrand has quit [Client Quit]
<havenwood> huthuthuthuthuth: Learn to Program by Chris Pine is a gentle introduction to Ruby or The Well-Grounded Rubyist (2nd edition for modern Ruby) goes into more detail.
nankyokusei has joined #ruby
beauby has joined #ruby
hanmac has quit [Ping timeout: 272 seconds]
nando293921 has joined #ruby
hammond has joined #ruby
hanmac has joined #ruby
<huthuthuthuthuth> what should i read after well grounded rubyist?
JeanCarloMachado has joined #ruby
<havenwood> huthuthuthuthuth: Ruby code on the Githubs
roamingd_ has quit [Remote host closed the connection]
cyphase has quit [Ping timeout: 265 seconds]
<huthuthuthuthuth> what is a good project on github that i should look for?
<huthuthuthuthuth> i'm a complete beginner by the way
<hammond> what are you trying to develop huthuthuthuthuth ?
moeabdol has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 272 seconds]
<huthuthuthuthuth> ideally i would be able to create new frameworks and methodologies, but i don't want to get ahead of myself
<havenwood> huthuthuthuthuth: I think you'll come across some ideas after going through those books and the exercism.io exercises.
<hammond> what kinds of frameworks?
<huthuthuthuthuth> basically i would love to be able to develop things like twitter, facebook, zillow, airbnb and the like
polishdub has quit [Quit: Leaving]
<huthuthuthuthuth> hammond: anything really, i have no idea... i'm learning on my own
<havenwood> huthuthuthuthuth: Learning Ruby is a good start!
roamingdog has joined #ruby
<hammond> ruby is great for learning programming terms.
<hammond> I would say rubyonrails huthuthuthuthuth .
<hammond> SQL/Databases is useful too.
<elomatreb> I'd advise againt goingt into Rails when you're new to the language, it's quite complex if you want to understand it
<hammond> it is.
<havenwood> huthuthuthuthuth: There's a lot of Ruby to learn - I'd vote focus on that for now!
cyphase has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
<hammond> learning how to create webapps is good though.
<huthuthuthuthuth> how hard is it to create a chess game?
<huthuthuthuthuth> no ai
<huthuthuthuthuth> just two players
<havenwood> huthuthuthuthuth: A command line chess game? ;-) It's a fun exercise!
RegulationD has quit [Remote host closed the connection]
cyphase has quit [Max SendQ exceeded]
<huthuthuthuthuth> yeah i would like to make that
<huthuthuthuthuth> it seems impossible for me at the moment lol
cyphase has joined #ruby
<hammond> 400 lines of code away.
<elomatreb> huthuthuthuthuth: Keep in mind that code you write to learn does not have to be any more beautiful, elegant, or efficient than you personally deem necessary
<huthuthuthuthuth> as long as it works and i understand what it does i'm happy
<hammond> huthuthuthuthuth: yeah well you would first design modules and classes from top to buttom, design the architecture, make it work conceptually and then implement it.
<huthuthuthuthuth> i don't want my code to be like actual code
nofxx has joined #ruby
RikkiMongoose has quit [Quit: Leaving]
<frankiee_> hammond b-400
cyphase has quit [Max SendQ exceeded]
rashid has joined #ruby
[k- has quit [Quit: -a- IRC for Android 2.1.32]
cyphase has joined #ruby
cyphase has quit [Max SendQ exceeded]
cyphase has joined #ruby
<hammond> huthuthuthuthuth: ruby has a window builder too you can play with. it creates guis.
jackjackdripper1 has quit [Quit: Leaving.]
Macrobiotic has quit [Quit: Connection closed for inactivity]
sepp2k has quit [Quit: Leaving.]
tcrypt_ has joined #ruby
chouhoulis has joined #ruby
tcrypt has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
hanmac has quit [Ping timeout: 272 seconds]
conta has joined #ruby
tcrypt_ has quit [Ping timeout: 272 seconds]
Derperperd has joined #ruby
Azure has quit [Excess Flood]
beauby has quit [Read error: Connection reset by peer]
hanmac has joined #ruby
Azure has joined #ruby
marxarelli is now known as marxarelli|afk
marxarelli|afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
conta has quit [Ping timeout: 272 seconds]
ResidentBiscuit has joined #ruby
tcrypt has joined #ruby
fughetta_ has quit [Quit: WeeChat 1.0.1]
AndrewIsHere has quit [Remote host closed the connection]
elenatanasoiu has quit [Ping timeout: 276 seconds]
AndrewIsHere has joined #ruby
<_sfiguser> hello everyone i need help for creating my gui app in ruby
beauby has joined #ruby
<_sfiguser> i need to have a background image and two buttons on these background image
<_sfiguser> how can i do that ?
<havenwood> _sfiguser: What GUI library are you using?
AndrewIs_ has joined #ruby
AndrewI__ has joined #ruby
hakunin has joined #ruby
hana has joined #ruby
AndrewIsHere has quit [Ping timeout: 272 seconds]
hana has quit [Client Quit]
AndrewIs_ has quit [Ping timeout: 272 seconds]
AndrewI__ has quit []
<_sfiguser> havenwood, shoesrb
<_sfiguser> havenwood, any suggestion ?
NTrash has joined #ruby
<_sfiguser> havenwood, is shoesrb ok ?
Madplatypus has quit [Quit: Connection closed for inactivity]
<havenwood> _sfiguser: Sure. Are you using Shoes 3 or Shoes 4?
jaguarmagenta has joined #ruby
gizless has quit [Ping timeout: 264 seconds]
gizless has joined #ruby
<havenwood> _sfiguser: Try running this example: https://github.com/shoes/shoes4/blob/master/samples/good-image-dl.rb
elenatanasoiu has joined #ruby
<havenwood> (That's a Shoes 4 one.)
mattwashere has joined #ruby
<havenwood> _sfiguser: I'm relocating but I'm sure others can help. Show your code once you get something going! :-)
bob434 has quit [Quit: This computer has gone to sleep]
jaguarmagenta has quit [Ping timeout: 244 seconds]
a7d7p has joined #ruby
bob434 has joined #ruby
<_sfiguser> actually i have problems installing shoes...
<_sfiguser> how can i install it as a agem
<_sfiguser> i did "gem install shoes"
<_sfiguser> and it installed ok
<_sfiguser> but when i try to run that code it tells me ...
<_sfiguser> github_test.rb:1:in `<main>': uninitialized constant Shoes (NameError)
elenatanasoiu has quit [Ping timeout: 244 seconds]
gfvcastro has quit [Read error: Connection reset by peer]
mattwashere has quit [Remote host closed the connection]
NTrash has quit [Quit: Konversation terminated!]
tcrypt has quit [Ping timeout: 272 seconds]
mattwashere has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Ping timeout: 276 seconds]
moeabdol has joined #ruby
Sceko has joined #ruby
Sceko has joined #ruby
Sceko has quit [Changing host]
tcrypt has joined #ruby
giorgos1 has joined #ruby
cyphase has quit [Ping timeout: 244 seconds]
JeanCarloMachado has joined #ruby
Tempesta has joined #ruby
marxarelli has joined #ruby
sdothum has joined #ruby
mattwashere has quit [Ping timeout: 240 seconds]
marr has quit [Ping timeout: 276 seconds]
ResidentBiscuit has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 240 seconds]
cyphase has joined #ruby
elenatanasoiu has joined #ruby
bob434 has quit [Quit: This computer has gone to sleep]
mattwashere has joined #ruby
chouhoulis has quit [Remote host closed the connection]
sdothum- has joined #ruby
Synthead has joined #ruby
codelogix has quit [Ping timeout: 272 seconds]
bronson has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
RegulationD has joined #ruby
elenatanasoiu has quit [Ping timeout: 276 seconds]
tdy has quit [Ping timeout: 276 seconds]
Derperperd has quit [Quit: Derperperd]
tcrypt has quit [Ping timeout: 272 seconds]
horst has quit [Quit: horst]
codelogix has joined #ruby
roamingdog has quit [Read error: Connection reset by peer]
roamingd_ has joined #ruby
tcrypt has joined #ruby
Sceko has quit [Quit: www.oklop.me]
roamingd_ has quit [Remote host closed the connection]
beauby_ has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
cdg has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
hakunin has quit [Remote host closed the connection]
beauby has quit [Ping timeout: 272 seconds]
nando293921 has quit [Ping timeout: 276 seconds]
preyalone has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
cyphase has quit [Ping timeout: 272 seconds]
koooge has joined #ruby
cyphase has joined #ruby
rcvalle has quit [Quit: rcvalle]
gingray has joined #ruby
codelogix has quit [Ping timeout: 244 seconds]
todd2 is now known as Todd
<baweaver> _sfiguser: Have you read any books on Ruby yet?
arnonhongklay has joined #ruby
<baweaver> short answer is you need to require it as well
<baweaver> but you really need to read a book or a longer tutorial to get these things