jhass changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
freerobby has quit [Quit: Leaving.]
sharpmachine has quit [Remote host closed the connection]
Billias has quit [Ping timeout: 265 seconds]
Billias has joined #ruby
nopolitica has joined #ruby
nopolitica has quit [Client Quit]
renderful has joined #ruby
nopolitica has joined #ruby
nopolitica has quit [Client Quit]
Cust0sLim3n has quit [Quit: Leaving]
sevenseacat has joined #ruby
nopolitica has joined #ruby
Cust0sLim3n has joined #ruby
datanoise has joined #ruby
acsigusz has quit [Quit: leaving]
renderful has quit [Ping timeout: 256 seconds]
arooni-mobile has quit [Ping timeout: 248 seconds]
marr has quit []
towski_ has joined #ruby
rubie has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
Tau has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 256 seconds]
dorei has quit []
towski_ has quit [Remote host closed the connection]
Torrieri has quit [Quit: Be back later ...]
Torrieri has joined #ruby
totimkopf has joined #ruby
Torrieri has quit [Client Quit]
Torrieri has joined #ruby
datanoise has quit [Ping timeout: 246 seconds]
robustus has quit [Ping timeout: 255 seconds]
User458764 has joined #ruby
phizzbuzz has quit [Read error: Connection reset by peer]
robustus has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
CloCkWeRX has quit [Quit: Leaving.]
freerobby has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
Torrieri has quit [Quit: Be back later ...]
fujimura has joined #ruby
t0rrieri has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oo_ has joined #ruby
phutchins has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
t0rrieri has quit [Ping timeout: 244 seconds]
transiency has quit [Ping timeout: 276 seconds]
Robert__ has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
h4sh3dN4m3 has quit [Quit: Leaving]
kenndel_ has quit [Ping timeout: 244 seconds]
al2o3-cr has quit [Read error: Connection reset by peer]
phizzbuzz has joined #ruby
avahey has joined #ruby
Hongo has joined #ruby
Hongo has left #ruby [#ruby]
Blaguvest has quit []
Al3ks has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 264 seconds]
EllisTAA has quit [Quit: EllisTAA]
ltd has quit [Quit: leaving]
bruno- has quit [Ping timeout: 252 seconds]
ltd has joined #ruby
Robert__ has quit [Ping timeout: 246 seconds]
transiency has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
Casty has joined #ruby
al2o3-cr has joined #ruby
e1nh4nd3r has quit [Quit: Leaving.]
ur5us has quit [Remote host closed the connection]
fujimura has quit [Remote host closed the connection]
fujimura has joined #ruby
sharpmachine has joined #ruby
bronson has joined #ruby
dgutierrez1287 has joined #ruby
ramfjord has joined #ruby
fujimura has quit [Ping timeout: 252 seconds]
shtirlic_ has quit [Quit: ZNC - http://znc.in]
phutchins has quit [Ping timeout: 255 seconds]
sharpmachine has quit [Ping timeout: 265 seconds]
jack_rabbit has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
<freedrull> i'm getting this ssl error, but only with soundcloud. https://gist.github.com/mcfiredrill/c5a1e6d5b84bc081324f other sites seem to be fine
nopolitica has quit [Ping timeout: 244 seconds]
slumos is now known as slumos[away]
scripore has joined #ruby
slumos[away] is now known as slumos
benegget_ has joined #ruby
fujimura has joined #ruby
t0rrieri has joined #ruby
yqt has quit [Ping timeout: 252 seconds]
beneggett has quit [Ping timeout: 256 seconds]
fujimura has quit [Remote host closed the connection]
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
senayar has joined #ruby
t0rrieri has quit [Ping timeout: 246 seconds]
ramfjord has quit [Quit: leaving]
ged_ has quit [Read error: Connection reset by peer]
kenichi has quit [Ping timeout: 276 seconds]
arescorpio has joined #ruby
ged_ has joined #ruby
jacor has quit [Read error: Connection reset by peer]
jacor has joined #ruby
rubie has joined #ruby
datanoise has joined #ruby
senayar has quit [Ping timeout: 264 seconds]
Agoldfish has quit [Quit: G'Bye]
kenichi has joined #ruby
baxx has joined #ruby
workmad3 has joined #ruby
<baxx> i was just wondering if there was a user flag for using Ruby gems like there is with pip --user <package>
tractatus has quit [Ping timeout: 264 seconds]
santana has joined #ruby
dominic has joined #ruby
<toretore> baxx: what does the flag do?
workmad3 has quit [Ping timeout: 265 seconds]
fujimura has joined #ruby
JoshL has quit [Remote host closed the connection]
Jarboe has joined #ruby
blizzy is now known as _blizzy_
<al2o3-cr> toretore: --user = Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%Python on Windows.
<al2o3-cr> --user-install ?
CloCkWeRX has joined #ruby
JoshL has joined #ruby
jack_rabbit_ has joined #ruby
fujimura has quit [Ping timeout: 265 seconds]
jack_rabbit has quit [Ping timeout: 272 seconds]
Alayde_ has joined #ruby
<freedrull> baxx: i'm not sure, but most people use rbenv or rvm and all the gems end up getting installed to your home directory that way...
Fluent_ is now known as Fluent
Fluent has quit [Changing host]
Fluent has joined #ruby
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
freerobby has quit [Client Quit]
<Aeyrix> baxx: That's default behaviour in Ruby.
<Aeyrix> Or, with `gem`.
<Aeyrix> It's encouraged to use something like rbenv unless you know what you're doing when you install gems systemwide.
<Aeyrix> freedrull: error code 10: certificate has expired
jtdoncas has joined #ruby
<Aeyrix> I mean that's a pretty obvious error.
stardiviner has quit [Ping timeout: 256 seconds]
Alayde_ has quit [Ping timeout: 250 seconds]
<freedrull> Aeyrix: do you know how to fix it?
<Aeyrix> freedrull: No.
<Aeyrix> Not something you can fix.
<Aeyrix> Either ignore the expired certificate, or use HTTP instead of HTTPS.
<toretore> freedrull: how recent are the certificates installed on your machine?
<toretore> go to https://soundcloud.com in the browser and see if you get an error
<freedrull> Aeyrix: i don't get this error on my other machine though https://gist.github.com/mcfiredrill/27af9ac714135c95696a
<Aeyrix> Fucking OpenSSL
<Aeyrix> such a piece of shit
JoshL has quit [Remote host closed the connection]
<freedrull> toretore: no issues accessing soundcloud in my browser
malconis has joined #ruby
<toretore> freedrull: and this is on the same machine where you get the error?
<freedrull> toretore: yes
<freedrull> is there some cache i have to try clearing or something ?____?
<Aeyrix> There's a cache you have to try filling.
<freedrull> or can i get new certs?
jack_rabbit_ has quit [Ping timeout: 250 seconds]
<toretore> freedrull: which os?
lordkryss has quit [Quit: Connection closed for inactivity]
fedexo has joined #ruby
<freedrull> toretore: osx yosemite 10.10.3
Casty has quit [Quit: Textual IRC Client: www.textualapp.com]
Casty has joined #ruby
aphprentice has quit [Remote host closed the connection]
santana has quit [Quit: leaving]
baxx has quit [Ping timeout: 244 seconds]
stardiviner has joined #ruby
davedev24_ has quit []
uptownhr has joined #ruby
serivichi has joined #ruby
<havenwood> freedrull: Homebrew?
Spami has joined #ruby
<havenwood> freedrull: brew tap raggi/ale && brew install openssl-osx-ca
Manolo_ has joined #ruby
A124 has quit [Remote host closed the connection]
<havenwood> freedrull: But the ruby-build tool that rbenv uses ships its own openssl instead of using your package managers. I don't know what implication that has on certs if any.
<havenwood> manager's
NeverDie has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> I don't like it that they do it.
<havenwood> Use the package manager's openssl!
NeverDie has joined #ruby
Hijiri has joined #ruby
Manolo_ has quit [Client Quit]
shazaum has quit [Quit: This computer has gone to sleep]
<havenwood> freedrull: On most distros it's the ca-certificates pacakge.
A124 has joined #ruby
<freedrull> havenwood: yeah i'm on homebrew...i installed that...oh really? that's weird..
<havenwood> For common CA certs.
<havenwood> freedrull: Ah, already have openssl-osx-ca and still having issues? Hrm.
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
noname has quit [Quit: WeeChat 1.0.1]
guardianx has joined #ruby
uptownhr has quit [Quit: uptownhr]
<havenwood> freedrull: One option would be to try a ruby-install installation to the rbenv location.
<havenwood> freedrull: git clone https://github.com/postmodern/ruby-install.git && cd ruby-install && sudo make install
<havenwood> freedrull: ruby-install --install-dir ~/.rbenv/versions/2.2.2 ruby 2.2.2
dgutierrez1287 has quit [Remote host closed the connection]
p1k has joined #ruby
<freedrull> havenwood: alright well, i haven't tried that yet so ill give it a shot
freerobby has joined #ruby
freerobby has quit [Client Quit]
bkxd has quit [Ping timeout: 256 seconds]
Cust0sLim3n has quit [Read error: Connection timed out]
creakybones has quit [Ping timeout: 246 seconds]
<freedrull> havenwood ruby-install is just ruby-build alternative? i haven't used it yet....
Cust0sLim3n has joined #ruby
growlove has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 248 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<havenwood> freedrull: Yup, it's an alternative that uses the package manager instead of shipping it's own openssl.
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar_ has joined #ruby
senayar_ has quit [Remote host closed the connection]
iooner_ has quit [Ping timeout: 265 seconds]
n008f4g_ has quit [Ping timeout: 265 seconds]
uptownhr has joined #ruby
senayar has joined #ruby
oo_ has quit [Remote host closed the connection]
senayar has quit [Client Quit]
iooner has joined #ruby
<sevenseacat> another reason not to like rbenv? well i never.
bkxd has joined #ruby
<freedrull> havenwood: well, i tried it. no dice there either :|
<freedrull> im gonna stare at this blog article until i think of something else http://mislav.uniqpath.com/2013/07/ruby-openssl/
freerobby has joined #ruby
oo_ has joined #ruby
skysploit has joined #ruby
freerobby has quit [Client Quit]
houhoulis has quit [Remote host closed the connection]
p1k has quit [Ping timeout: 265 seconds]
havenwood has quit [Ping timeout: 265 seconds]
d10n-work has joined #ruby
krz has joined #ruby
p1k has joined #ruby
darkf has joined #ruby
freerobby has joined #ruby
freerobby has quit [Client Quit]
skysploit has quit [Remote host closed the connection]
bturker has quit [Ping timeout: 265 seconds]
<freedrull> should this directory be empty? :| /usr/local/etc/openssl/certs/
skysploit has joined #ruby
xcesariox has joined #ruby
<sevenseacat> mine is.
skysploit has quit [Remote host closed the connection]
x0f has quit [Ping timeout: 256 seconds]
j4cknewt has joined #ruby
Silent__ has quit [Quit: さようなら]
uptownhr has quit [Quit: uptownhr]
fabrice31 has joined #ruby
pontiki has joined #ruby
krz has quit [Ping timeout: 256 seconds]
soulcake has quit [Ping timeout: 276 seconds]
fabrice31 has quit [Ping timeout: 272 seconds]
soulcake has joined #ruby
icebourg has joined #ruby
scx_ has joined #ruby
bturker has joined #ruby
symm- has joined #ruby
JoshL has joined #ruby
aryaching has joined #ruby
scx has quit [Ping timeout: 276 seconds]
sharpmachine has joined #ruby
GitGud has quit [Read error: Connection reset by peer]
braincrash has quit [Quit: bye bye]
guardianx has quit []
x0f has joined #ruby
bkxd has quit [Ping timeout: 246 seconds]
krz has joined #ruby
sharpmachine has quit [Ping timeout: 246 seconds]
serivichi has quit [Ping timeout: 246 seconds]
icebourg has quit []
serivich has joined #ruby
redlegion has quit [Quit: Dying the fuck to death.]
braincrash has joined #ruby
redlegion has joined #ruby
<nofxxx> freedrull, do you have any reason to use multiple ruby version? just use 2.2.2 from brew and have fun
workmad3 has joined #ruby
Plimsol has joined #ruby
bturker has quit [Quit: leaving]
auzty has joined #ruby
<freedrull> nofxxx: lol, might have to try that if nothing else works. i have one 2.1 project but i can probably live without it for now....
freerobby has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 264 seconds]
mattarse has joined #ruby
<nofxxx> freedrull, it'll problably work on 2.2 ;)
<freedrull> nofxxx: good point
ReK2 has quit [Ping timeout: 256 seconds]
kahuna_ has quit [Quit: leaving]
JoshL has quit []
ReK2 has joined #ruby
HotCoder has joined #ruby
jtdoncas has quit [Ping timeout: 264 seconds]
HotCoder has quit [Client Quit]
djbkd has quit [Remote host closed the connection]
GitGud has joined #ruby
bruno- has joined #ruby
bungoman has joined #ruby
_blizzy_ has quit [Ping timeout: 248 seconds]
gix has quit [Ping timeout: 256 seconds]
JoshGlzBrk has joined #ruby
JoshGlzBrk has quit [Client Quit]
aryaching_ has joined #ruby
JoshGlzBrk has joined #ruby
bruno- has quit [Ping timeout: 248 seconds]
linoespinoza has joined #ruby
linoespinoza has quit [Remote host closed the connection]
fujimura has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gix has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
<krowv> HI channel. Does anyone have example code for ruby gtk3 to use the gtk_window_get_position method? https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-get-position
<krowv> I'd like to get the current coordinates of a window and then use those coordinates to open another window relative to the location of the existing window
Matt_P has joined #ruby
<Matt_P> hi, im trying to install a gem, but it depends on another gem that cant install on my machine (there is a bug fix in the next minor version)
<Matt_P> is it possible to trick gem in to installing 1.0.4 as 1.0.3 ?
<Radar> no
<Radar> install 1.0.4
<Matt_P> or better yet installing the other gem with an updated gem version for its dependency?
bnagy_ is now known as bnagy
<Matt_P> the package i want to install depends on a specific version :(
<Radar> it would be helpful to know which gems you are talking about so that we can reproduce the problem on our machines
<Matt_P> sensu -> eventmachine 1.0.3
<Matt_P> on archLinux ruby 2.2
<baweaver> Submit a PR to sensu to not be a pain about it
<Radar> what baweaver said
<Matt_P> haha :)
growlove has quit [Quit: Leaving]
<Matt_P> is there a download gem local and install from local?
<Matt_P> so i can just patch the gem spec?
keen___________0 has joined #ruby
<baweaver> Most of the time it's not really needed
<baweaver> gemfile path
<Radar> I guess this is the project you're talking about: https://github.com/sensu/sensu
<baweaver> yeah
<Matt_P> ye Radar
<Radar> Fork, change that version, `rake install`
Plimsol has quit [Quit: Leaving]
keen____________ has quit [Ping timeout: 252 seconds]
dross has joined #ruby
kp666 has quit [Quit: Leaving]
kp666_ has quit [Quit: Leaving]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
michael_mbp has quit [Excess Flood]
<Radar> p.s. donations at radarlistener@gmail.com greatly appreciated ;)
bronson has joined #ruby
higuys has quit []
MVPhelp has quit [Remote host closed the connection]
gambl0re has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacts has quit [Quit: leaving]
tangledhelix has joined #ruby
<Matt_P> Radar: haha if rake install worked maybe :P
michael_mbp has joined #ruby
<Matt_P> ive prob messed something up with all the hackish things ive been trying to do ;_;
<Matt_P> .gem/ruby/2.2.0/gems/psych-2.0.13/lib/psych/deprecated.rb:19:in `block in quick_emit': stack level too deep (SystemStackError)
<Matt_P> /o\
<Radar> oops
luckyruby has quit [Quit: Leaving...]
bronson has quit [Ping timeout: 246 seconds]
<Matt_P> ... 9618 levels...
<Matt_P> i can see why lol
oo_ has quit [Remote host closed the connection]
aryaching_ has quit []
<Radar> that doesn't seem good
oo_ has joined #ruby
<Matt_P> update --system fixed that issue
krz has quit [Quit: WeeChat 1.0.1]
<Matt_P> sensu (0.19.2) installed.
<Matt_P> \o/ thanks Radar and baweaver
Ox0dea has joined #ruby
CalvinnHobbes has quit [Ping timeout: 256 seconds]
jfarmer has quit [Quit: Textual IRC Client: www.textualapp.com]
bungoman has quit []
Juanchito has quit [Quit: Connection closed for inactivity]
Channel6 has quit [Quit: Leaving]
marsjaninzmarsa has quit [Ping timeout: 250 seconds]
krz has joined #ruby
tangledhelix has quit [Quit: Textual IRC Client: www.textualapp.com]
tangledhelix has joined #ruby
[k- has joined #ruby
scx_ is now known as scx
tangledhelix has quit [Client Quit]
serivich has quit [Ping timeout: 272 seconds]
theery has joined #ruby
<Ox0dea> >> "#\{}"
<ruboto> Ox0dea # => "\#{}" (https://eval.in/385238)
<Ox0dea> Magical teleporting backslash.
freerobby has quit [Quit: Leaving.]
<baweaver> .....how do you find these things?
<Radar> ^ wondering the same thing
dgutierrez1287 has joined #ruby
benegget_ has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
dross has quit [Ping timeout: 252 seconds]
<pontiki> it's the best entertainment
<Radar> Ox0dea meditates for days, then taps random keys and comes across these weirdness
* baweaver nods
<pontiki> it's very zen
Spami has quit [Quit: Leaving]
dgutierrez1287 has quit [Ping timeout: 264 seconds]
mattrse has joined #ruby
beneggett has joined #ruby
mattarse has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
xcesariox has quit [Remote host closed the connection]
yfeldblum has joined #ruby
uber_ has quit [Ping timeout: 252 seconds]
Tempesta has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
xcesariox has joined #ruby
ra4king1 has joined #ruby
ra4king1 has quit [Remote host closed the connection]
towski_ has joined #ruby
apt-get_ has quit [Quit: Quit]
sarkyniin has joined #ruby
djbkd has joined #ruby
<Aeyrix> bnagy: n e?
fabrice31 has joined #ruby
DANtheBE- has quit [Quit: I hate quit messages.]
t_mmyv has quit [Quit: Textual IRC Client: www.textualapp.com]
<Aeyrix> dongs
uptownhr has joined #ruby
hanmac1 has quit [Ping timeout: 256 seconds]
arooni-mobile has joined #ruby
oo_ has quit [Remote host closed the connection]
uber has joined #ruby
gambl0re has quit [Ping timeout: 252 seconds]
lala has joined #ruby
dfockler has joined #ruby
<[k-> how...
sinkensabe has joined #ruby
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
fabrice31 has quit [Ping timeout: 246 seconds]
jesterfraud has joined #ruby
casadei has joined #ruby
Ox0dea has quit [Read error: No route to host]
dfockler has quit [Ping timeout: 246 seconds]
bakedb has quit [Ping timeout: 276 seconds]
bakedb_ has joined #ruby
gianlucadv has joined #ruby
ta has joined #ruby
hanmac has joined #ruby
revath has joined #ruby
charliesome has joined #ruby
sinkensabe has quit [Remote host closed the connection]
stardiviner has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby
chinmay_dd has joined #ruby
datanoise has quit [Ping timeout: 265 seconds]
bluOxigen has joined #ruby
olistik has joined #ruby
allomov has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
towski_ has quit [Remote host closed the connection]
shafox_ has joined #ruby
shafox_ is now known as shafox
GnuYawk has quit [Quit: WeeChat 1.0]
shafox has quit [Client Quit]
towski_ has joined #ruby
GnuYawk has joined #ruby
GnuYawk has quit [Changing host]
GnuYawk has joined #ruby
shafox has joined #ruby
towski_ has quit [Remote host closed the connection]
MVPhelp has joined #ruby
GnuYawk has quit [Client Quit]
M-Technic has quit [Quit: leaving]
GnuYawk has joined #ruby
ndrei has joined #ruby
stardiviner has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
MVPhelp has quit [Remote host closed the connection]
MVPhelp has joined #ruby
peter_paule has joined #ruby
aridere has quit [Quit: Leaving]
ta has quit [Remote host closed the connection]
sarkyniin has quit [Ping timeout: 276 seconds]
postmodern has quit [Quit: Leaving]
ndhamecom has joined #ruby
sarkyniin has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
uptownhr has quit [Quit: uptownhr]
zenguy_pc has quit [Read error: Connection reset by peer]
roolo has joined #ruby
aganov has joined #ruby
lxsameer has joined #ruby
pl1ght has quit [Ping timeout: 276 seconds]
uptownhr has joined #ruby
pontiki has quit [Quit: <poit>]
fsvehla has joined #ruby
CloCkWeRX1 has joined #ruby
darkf_ has joined #ruby
pl1ght has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
darkf has quit [Ping timeout: 248 seconds]
Jarboe has quit []
darkf_ is now known as darkf
lxsameer has quit [Ping timeout: 275 seconds]
EllisTAA has joined #ruby
<EllisTAA> this is my first time coming to the challenge just to hang out
lxsameer has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
<Radar> coming to the where
theery has quit []
<[k-> o_O
MatthewsFace has joined #ruby
p1k has quit [Ping timeout: 255 seconds]
arescorpio has quit [Quit: Leaving.]
ndhamecom has quit [Ping timeout: 276 seconds]
A205B064 has quit [Ping timeout: 272 seconds]
avahey has quit [Quit: Connection closed for inactivity]
zenguy_pc has joined #ruby
EllisTAA has quit [Client Quit]
uptownhr has quit [Quit: uptownhr]
peter_paule has quit [Ping timeout: 264 seconds]
darkf_ has joined #ruby
uptownhr has joined #ruby
EllisTAA has joined #ruby
charliesome has quit [Ping timeout: 252 seconds]
Tempesta has joined #ruby
sinkensabe has joined #ruby
darkf has quit [Ping timeout: 248 seconds]
darkf_ is now known as darkf
p1k has joined #ruby
p1k has quit [Client Quit]
tagrudev has joined #ruby
p1k has joined #ruby
micmus has joined #ruby
charliesome has joined #ruby
uptownhr has quit [Quit: uptownhr]
uptownhr has joined #ruby
Matt_P has left #ruby [#ruby]
NightMonkey has quit [Ping timeout: 264 seconds]
CalvinnHobbes has joined #ruby
dopie has quit [Quit: Leaving]
dumdedum has joined #ruby
dopie has joined #ruby
spider-mario has quit [Ping timeout: 264 seconds]
NightMonkey has joined #ruby
darkf_ has joined #ruby
dhjondoh has joined #ruby
uptownhr has quit [Quit: uptownhr]
last_staff has joined #ruby
TvL2386 has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
darkf has quit [Ping timeout: 248 seconds]
GnuYawk has quit [Quit: WeeChat 1.0]
GnuYawk has joined #ruby
GnuYawk has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
darkf_ is now known as darkf
GnuYawk has quit [Client Quit]
GnuYawk has joined #ruby
GnuYawk has quit [Changing host]
GnuYawk has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
ta has joined #ruby
C1V0 has joined #ruby
dg-ratio1 has joined #ruby
spider-mario has joined #ruby
Igorshp has joined #ruby
datanoise has joined #ruby
Igorshp has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
GnuYawk has quit [Quit: WeeChat 1.0]
EllisTAA has quit [Quit: EllisTAA]
olistik has quit [Remote host closed the connection]
codecop has joined #ruby
<TvL2386> hi guys, I'm having an application that creates a file and writes to it for an hour and this loops indefinitely (tcpdump -G 3600). I need to upload the finished files to an ftp server. I'm wondering how I can do this. I was thinking of keeping a yaml file to register what's been uploaded. And upload based on ctime age or check if it's not in use anymore
GnuYawk has joined #ruby
techsethi has joined #ruby
uptownhr has joined #ruby
jokester has quit [Changing host]
jokester has joined #ruby
dhjondoh has joined #ruby
sandstrom has joined #ruby
oo_ has joined #ruby
atom3 has quit [Ping timeout: 276 seconds]
<al2o3-cr> o/ oo_
atomi_ has quit [Quit: leaving]
atom3 has joined #ruby
atomi has joined #ruby
sarkyniin has quit [Remote host closed the connection]
GnuYawk has quit [Quit: WeeChat 1.0]
GnuYawk has joined #ruby
casadei has quit [Remote host closed the connection]
<shevy> more code people
dg-ratio1 has quit [Ping timeout: 256 seconds]
<dopie> anyone here good with sql?
<TvL2386> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
<TvL2386> haha! Last time I've been slapped with that!
<certainty> moin
<al2o3-cr> o/
Igorshp has quit [Remote host closed the connection]
stan has joined #ruby
datanoise has quit [Ping timeout: 248 seconds]
lapide_viridi has joined #ruby
chinmay_dd has joined #ruby
chinmay_dd has quit [Client Quit]
last_staff has quit [Ping timeout: 248 seconds]
revath has quit [Ping timeout: 265 seconds]
rubie has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
allomov has quit [Remote host closed the connection]
ndrei has joined #ruby
<[k-> 1h blocking IO ;-;
revath has joined #ruby
User458764 has joined #ruby
<shevy> dopie I hate SQL
<shevy> you can do lots of optimizations
_blizzy_ has joined #ruby
<shevy> I hated these even more
ndrei has quit [Ping timeout: 276 seconds]
fsvehla has quit [Quit: fsvehla]
uptownhr has quit [Quit: uptownhr]
<certainty> shevy is grouchy smurf
<shevy> depends
<shevy> other things are much cooler
<shevy> ruby is usually very cool
lapide_viridi has quit [Read error: Connection reset by peer]
soulcake has quit [Ping timeout: 275 seconds]
froots_0xff has quit [Remote host closed the connection]
<[k-> do you like mongodb
<shevy> have no experience with it. How is its syntax?
<shevy> I actually used postgresql and postgresql is cool; but I still hate SQL
soulcake has joined #ruby
_blizzy_ has quit [Ping timeout: 248 seconds]
ruby-lang381 has joined #ruby
bigkevmcd has joined #ruby
<[k-> I only ever used it with a binding
<[k-> but I forgot
<starfox_sf> often times I am running a ruby program which has some sort of long loop and I try to do Ctrl-c to break out of it and it does not work. I have to go and kill the process. Is there any way to make Ctrl-C interrupt the program?
ndrei has joined #ruby
<ddv> starfox_sf: it should work
<shevy> ruby can also be ugly
<shevy> I am looking at this here, verbatim copy:
<shevy> $><<"\e[2J\e[0;0H#{' '*10}_\n #{i&1==1?' '*7+'<':'Quack! >'}(*)____,\n#{' '*9}(` =~~/\n#{w*5}`---'#{w*4}"
<[k-> CTRL-D/CTRL-Z
<ddv> starfox_sf: you sure you aren't catching it with rescue?
<shevy> starfox_sf you can register a handle
<ruby-lang381> anyone in here can help with consuming API?
<starfox_sf> ddv: that might be it
* wasamasa munches
<shevy> def register_sigint; Signal.trap('SIGINT') { exit };end # <--- then call that method in your .rb file
<ddv> starfox_sf: don't rescue from Exception
<shevy> anyone remembers offhand what is $> or do I have to look it up ... :P
<ddv> starfox_sf: but from StandardError if you really need to
<[k-> >> $>
<ruboto> [k- # => #<IO:<STDOUT>> (https://eval.in/385294)
<starfox_sf> people always say no matter what, never rescue from Exception... I should have listened
<[k-> :D
<starfox_sf> thanks guys
p1k has quit [Ping timeout: 246 seconds]
<al2o3-cr> >> $<
<ruboto> al2o3-cr # => ARGF (https://eval.in/385296)
<ddv> starfox_sf: most people are stupid
<ddv> including me
<ddv> :p
<ruby-lang381> haha
<ruby-lang381> i am with you ddv
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy> huh
<shevy> I hate those $ variables
kwd has joined #ruby
<shevy> I mean the short ones
<ruby-lang381> i am trying to consume Amazon API but i am having a hard time coding it, can anyone help
<starfox_sf> ddv: good point.
<shevy> well actually, I don't like global variables very much to begin with but I understand that it is sometimes necessary to be able to globally control or assign stuff
GitGud has quit [Ping timeout: 256 seconds]
dhjondoh has quit [Quit: dhjondoh]
<al2o3-cr> i like these one $' and $`
d10n-work has quit [Quit: Connection closed for inactivity]
Xeago has joined #ruby
krz has quit [Read error: Connection reset by peer]
<[k-> >> $!
<ruboto> [k- # => nil (https://eval.in/385313)
p1k has joined #ruby
<[k-> yay it's free of exceptions!
C1V0 has quit []
toretore has quit [Quit: This computer has gone to sleep]
timonv has joined #ruby
ruby-lang381 has quit [Ping timeout: 246 seconds]
uptownhr has joined #ruby
revath has left #ruby [#ruby]
rbennacer has joined #ruby
<al2o3-cr> >> 1/0 rescue $@
<ruboto> al2o3-cr # => ["/tmp/execpad-0a7e3e2011cd/source-0a7e3e2011cd:2:in `/'", "/tmp/execpad-0a7e3e2011cd/source-0a7e3e2 ...check link for more (https://eval.in/385323)
andikr has joined #ruby
baweaver has quit [Remote host closed the connection]
fedexo has quit [Quit: No Ping reply in 180 seconds.]
blue_deref has quit [Quit: bbn]
dhjondoh has joined #ruby
workmad3 has joined #ruby
techsethi has quit [Quit: techsethi]
rbennacer has quit [Ping timeout: 264 seconds]
Zimsky__ has quit [Ping timeout: 276 seconds]
Ox0dea has joined #ruby
<Ox0dea> >> /#{'()' * 32768}/
<ruboto> Ox0dea, I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
chinmay_dd has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
<Ox0dea> Well, this was supposed to happen: https://eval.in/private/8ae5ebedfb986f
<Ox0dea> And they say Ruby isn't a Lisp.
SOLDIERz has joined #ruby
krz has joined #ruby
<sevenseacat> empty capture groups? nice.
gagrio has joined #ruby
bronson has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
fabrice31 has joined #ruby
<Ox0dea> Gotta love that Oniguruma will happily let you define a regular expression with 32,767 capture groups.
User458764 has joined #ruby
vondruch has quit [Ping timeout: 264 seconds]
Zimsky_ has joined #ruby
Sembei has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
Pisuke has quit [Ping timeout: 272 seconds]
fedexo has joined #ruby
<Ox0dea> >> ('a' * 10)[/#{'(a)' * 10}/]; g = global_variables; [$10, g.include?(:$9), g.include?(:$10)]
<ruboto> Ox0dea # => ["a", true, false] (https://eval.in/385330)
<Ox0dea> What's this about?
workmad3 has joined #ruby
dominic has quit [Remote host closed the connection]
wildroman2 has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
dhjondoh has joined #ruby
wildroman2 has quit [Remote host closed the connection]
acke has joined #ruby
wildroman2 has joined #ruby
charliesome has quit [Quit: zzz]
mattrse has quit [Ping timeout: 252 seconds]
<shevy> you are trying to break ruby
<shevy> >> global_variables
<ruboto> shevy # => [:$;, :$-F, :$@, :$!, :$SAFE, :$~, :$&, :$`, :$', :$+, :$=, :$KCODE, :$-K, :$,, :$/, :$-0, :$\, :$_, ...check link for more (https://eval.in/385331)
<shevy> cool
<shevy> I don't think I have seen that method before
last_staff has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
Cust0sLim3n has quit [Ping timeout: 248 seconds]
<[k-> >> $nerd = 0; global_variables
<ruboto> [k- # => [:$;, :$-F, :$@, :$!, :$SAFE, :$~, :$&, :$`, :$', :$+, :$=, :$KCODE, :$-K, :$,, :$/, :$-0, :$\, :$_, ...check link for more (https://eval.in/385332)
<Ox0dea> >> $foo = 1; global_variables.include?(:$foo)
<ruboto> Ox0dea # => true (https://eval.in/385333)
<Ox0dea> So what's going on with the capture groups >9?
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
solars has joined #ruby
<[k-> kernel trace? kek
Xeago has quit [Read error: Connection reset by peer]
bigkevmcd has quit [Ping timeout: 276 seconds]
<shevy> nobody needs more than 9
msgodf has joined #ruby
datanoise has joined #ruby
fsvehla has joined #ruby
Cust0sLim3n has joined #ruby
<Ox0dea> That's not the matter of contention.
<Ox0dea> $10 does "exist", and it's a global variable as best I can tell, so why doesn't it end up in the list?
edwinvdgraaf has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
zeroDivisible has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 248 seconds]
Renich has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
datanoise has quit [Ping timeout: 248 seconds]
renderful has joined #ruby
<shevy> it does not exist
dg-ratio1 has joined #ruby
<shevy> hack!
<Ox0dea> It turns out $1-$9 are just pushed into the return value for show.
<Ox0dea> That seems rather sily.
<shevy> they are cheat variables anyway
SOLDIERz has quit [Max SendQ exceeded]
htmldrum has joined #ruby
<Ox0dea> How do you mean?
n3vtelen is now known as guerilla
<shevy> they mysteriously disappear!
pandb has joined #ruby
<Ox0dea> Right, they're "magical", but they're really no different from $10+, so it seemed odd to me that they should show up in the result.
guerilla is now known as n3vtelen
mattrse has joined #ruby
djbkd has quit [Remote host closed the connection]
SOLDIERz has joined #ruby
djbkd has joined #ruby
dgutierrez1287 has joined #ruby
renderful has quit [Ping timeout: 255 seconds]
rubie has joined #ruby
vondruch has joined #ruby
User458764 has joined #ruby
timonv has quit [Ping timeout: 256 seconds]
bkxd has quit [Ping timeout: 250 seconds]
tesuji has joined #ruby
j4cknewt has quit [Remote host closed the connection]
vasilakisfil__ has joined #ruby
_djbkd has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
dgutierrez1287 has quit [Ping timeout: 248 seconds]
rubie has quit [Ping timeout: 265 seconds]
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
sophiedeziel has joined #ruby
allomov has joined #ruby
oo_ has quit [Remote host closed the connection]
white_bear has joined #ruby
rafaelsales has quit [Remote host closed the connection]
Xeago has joined #ruby
bkxd has joined #ruby
sandstrom has joined #ruby
white_bear_ has joined #ruby
oo_ has joined #ruby
nofxxx has quit [Ping timeout: 256 seconds]
uptownhr has quit [Quit: uptownhr]
fusillicode has joined #ruby
white_bear has quit [Ping timeout: 272 seconds]
Deele has joined #ruby
GnuYawk has quit [Quit: WeeChat 1.0]
uptownhr has joined #ruby
alex88 has joined #ruby
fabrice31_ has joined #ruby
fusillicode has quit [Ping timeout: 276 seconds]
fabrice31 has quit [Ping timeout: 252 seconds]
fusillicode has joined #ruby
lee-jon has joined #ruby
Iskarlar has joined #ruby
micmus has quit [Ping timeout: 256 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<adaedra> hello
dhjondoh has quit [Quit: dhjondoh]
fedexo has quit [Ping timeout: 248 seconds]
fusillicode has left #ruby [#ruby]
livathinos has joined #ruby
User458764 has joined #ruby
al2o3-cr has quit [Ping timeout: 248 seconds]
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
Juanchito has joined #ruby
jacor has quit [Read error: Connection reset by peer]
jacor has joined #ruby
GnuYawk has joined #ruby
<[k-> hello
Scroff has joined #ruby
Hounddog has joined #ruby
mister_solo has joined #ruby
micmus has joined #ruby
anisha has joined #ruby
workmad3 has joined #ruby
subtwo has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
sinkensabe has quit [Remote host closed the connection]
subtwo has joined #ruby
Hounddog has quit [Ping timeout: 265 seconds]
mikecmpbll has joined #ruby
Hounddog has joined #ruby
krz has quit [Read error: Connection reset by peer]
zeroDivisible has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
Ox0dea has quit [Read error: No route to host]
<flughafen_> hey adaedra shevy
khebbie has joined #ruby
<[k-> why is there no dance for bogosort :(
ndrei has quit [Ping timeout: 256 seconds]
<shevy> yo flughafen_, ready for take off? I see that you have a Landeplattform now, the _ in your nick
<flughafen_> oh, i guess i'm just so cool
bigkevmcd has joined #ruby
amclain has quit [Quit: Leaving]
<shevy> the more _ the better
<shevy> build BIG THINGS flughafen_
<shevy> learn from berlin
ndrei has joined #ruby
<shevy> build the biggest castle with sand
<shevy> what could possibly go wrong
dede has joined #ruby
rdark has joined #ruby
Renich has quit [Ping timeout: 256 seconds]
bkxd has quit [Ping timeout: 265 seconds]
dseitz has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
Renich has joined #ruby
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
pandb has quit [Ping timeout: 276 seconds]
pandb has joined #ruby
mgorbach has quit [Ping timeout: 250 seconds]
j4cknewt has joined #ruby
Jackneill has joined #ruby
seitensei has quit [Quit: No Ping reply in 180 seconds.]
fabrice31 has joined #ruby
bruno- has joined #ruby
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
aganov has quit [Ping timeout: 250 seconds]
duper` has quit [Ping timeout: 250 seconds]
funnel has quit [Ping timeout: 250 seconds]
surs has quit [Ping timeout: 250 seconds]
Darkwater has quit [Ping timeout: 250 seconds]
dseitz has joined #ruby
j4cknewt has quit [Remote host closed the connection]
mgorbach has joined #ruby
Mon_Ouie has quit [Ping timeout: 276 seconds]
j4cknewt has joined #ruby
Darkwater has joined #ruby
Sp4rKy_ is now known as Sp4rKy
sophiedeziel has quit [Remote host closed the connection]
keen___________0 has quit [Ping timeout: 250 seconds]
Sp4rKy has quit [Changing host]
Sp4rKy has joined #ruby
fabrice31_ has quit [Ping timeout: 252 seconds]
sophiedeziel has joined #ruby
robbyoconnor has quit [Excess Flood]
Tempesta has quit [Read error: Connection reset by peer]
funnel has joined #ruby
iwishiwerearobot has quit [Ping timeout: 246 seconds]
datanoise has joined #ruby
robbyoconnor has joined #ruby
lee-jon has left #ruby [#ruby]
super has joined #ruby
krz has joined #ruby
Tempesta has joined #ruby
keen___________0 has joined #ruby
Macaveli has joined #ruby
al2o3-cr has joined #ruby
aganov has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Excess Flood]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
fantazo has joined #ruby
mikecmpbll has joined #ruby
soulcake has quit [Ping timeout: 276 seconds]
datanoise has quit [Ping timeout: 276 seconds]
k3asd` has joined #ruby
bkxd has joined #ruby
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
j4cknewt has quit [Remote host closed the connection]
withnale_ has joined #ruby
soulcake has joined #ruby
Scroff has quit [Ping timeout: 256 seconds]
_mh_ has joined #ruby
_mh_ has joined #ruby
duper` has joined #ruby
super has quit [Ping timeout: 276 seconds]
_djbkd has quit [Remote host closed the connection]
revath has joined #ruby
soulcake has quit [Changing host]
soulcake has joined #ruby
tvw has joined #ruby
Xeago has quit [Remote host closed the connection]
jimms has joined #ruby
workmad3 has joined #ruby
n008f4g_ has joined #ruby
konsolebox has joined #ruby
mister_solo has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
ahmetkapikiran has joined #ruby
Xeago has joined #ruby
chthon has joined #ruby
Scroff has joined #ruby
Xeago has quit [Remote host closed the connection]
lkba_ has joined #ruby
tomaz_b has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
negev has joined #ruby
oo_ has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 264 seconds]
Tempesta has quit [Read error: Connection reset by peer]
<negev> hi, i'm going crazy trying to figure out how to include subtemplates using Erubis. can anyone help? i'm doing this in a cgi wrapper: puts Erubis::FastEruby.new(File.read(ENV["PATH_TRANSLATED"])).result(binding()) but then within the .erb script that it's loading, there's no way i can see to include a subtemplate
<negev> for example, in index.erb if i do: puts ERB.new(File.read('menu.erb')).result(binding)
<negev> it will render it immediately, at the top of the output
Tempesta has joined #ruby
<negev> is there a buffer i can append to or something?
lkba has quit [Ping timeout: 248 seconds]
<adaedra> I think there's one, _erbout or something
<adaedra> Ah, Erubis
Mon_Ouie has joined #ruby
bogdanteleaga has joined #ruby
oo_ has joined #ruby
Xeago has joined #ruby
Igorshp has joined #ruby
<negev> there must be a way to use subtemplates with erubis
<adaedra> Erubis or ERB?
<negev> either i just need it to work
<adaedra> I see both in your question
<negev> i'm using Erubis to render the initial template
rubie has joined #ruby
<negev> yeah i think that's just because i was trying solutions i found online
<negev> they seem to do similar things
<adaedra> it doesn't work if you do your template rendering in a <%= %> block?
<adaedra> no puts
Xeago has quit [Remote host closed the connection]
dg-ratio1 has quit [Remote host closed the connection]
rubie has quit [Ping timeout: 265 seconds]
dg-ratio1 has joined #ruby
quimrstorres has joined #ruby
GnuYawk has quit [Ping timeout: 244 seconds]
quimrstorres has quit [Remote host closed the connection]
mister_solo has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
quimrstorres has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
quazimodo has quit [Ping timeout: 244 seconds]
c0m0 has joined #ruby
quimrstorres has quit [Remote host closed the connection]
ndrei has joined #ruby
quimrstorres has joined #ruby
<white_bear_> is doing: path = 'foo/bar/baz'; File.join(path.split(File::SEPARATOR)) fine regarding path portability?
fabrice31 has joined #ruby
skade has joined #ruby
<adaedra> what do you want to do?
valkyrka has joined #ruby
<adaedra> ensuring use of \ on Windows and / else?
<white_bear_> yep
workmad3 has joined #ruby
htmldrum has quit [Ping timeout: 272 seconds]
<adaedra> You're sample won't work then
<adaedra> If you're Windows, it would split on '\' and thus not split anything
<adaedra> Your*
<white_bear_> i have this path: 'foo/bar/baz', i want it to be portable
<white_bear_> what about: File.join('foo/bar/baz'.split('/')) ?
<adaedra> Just do File.join('foo', 'bar', 'baz')
<adaedra> If your string is hardcoded
<canton7> also, windows handles '/' just fine :P
<yorickpeterse> morning
dhjondoh has joined #ruby
<adaedra> yeah, I would let the compatibility layer do its job
<white_bear_> it's not hardcoded
<jhass> there's File.split btw
Xeago has joined #ruby
<jhass> oh, that's basename/dirname, nvm
<white_bear_> File.join(%w(foo bar baz)) makes foo/bar/baz path portable right? so, path = 'foo/bar/baz; File.join(path.split('/')) should make it right?
yoongkang has quit [Remote host closed the connection]
yoongkang has joined #ruby
<jhass> white_bear_: what's not portable in your scenario about always using "foo/bar/baz" directly?
workmad3 has quit [Ping timeout: 276 seconds]
ahmetkapikiran has quit [Quit: ahmetkapikiran]
auzty has quit [Ping timeout: 276 seconds]
<white_bear_> jhass: foo/bar/baz is variable supplied by user at the top of the script
Cust0sLim3n has quit [Ping timeout: 252 seconds]
<negev> adaedra: oh yeah that does work, thanks :)
_fumk is now known as fumk
<adaedra> yw
DaniG2k has joined #ruby
<jhass> white_bear_: I don't follow how that makes it non-portable
ghormoon_ has quit [Quit: ZNC - http://znc.in]
ghormoon has joined #ruby
<white_bear_> jhass: look at this sample: Dir[File.join(%W[ #{PUPPET_DIR} hieradata nodes *])]
<white_bear_> jhass: i'd like "#{PUPPET_DIR}/hieradata/nodes" to be dynamic
<adaedra> oh, puppet
rafaelsales has joined #ruby
<adaedra> What's wrong with File.join ?
OrbitalKitten has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
quazimodo has joined #ruby
<jhass> white_bear_: as previously noted always using / should work on Windows
hectortrope has joined #ruby
<negev> quit
negev has quit [Quit: leaving]
<adaedra> quat
<white_bear_> adaedra: File.join requires the path to be exploded, right? i.e., File.join("#{PUPPET_DIR}", 'hieradata', 'nodes'), while i'd like the path to be declared as "#{PUPPET_DIR}/hieradata/nodes"
yh has joined #ruby
lee-jon has joined #ruby
Cust0sLim3n has joined #ruby
<adaedra> Then just use your string, as jhass stated / should be able to work on Windows. But the fact you should "explode" the path with File.join is not an issue, except if you've coding in tweets
konsolebox has joined #ruby
<white_bear_> jhass: yeah, that's right, i just wanted to know how to handle portability correctly
timonv has joined #ruby
rafaelsales has quit [Ping timeout: 246 seconds]
bayed has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
<white_bear_> thanks
arup_r has joined #ruby
<white_bear_> also, is there a way to retrieve all files in PATH without using a glob? i.e., avoid doing: Dir[DIR_PATH + '/*']
<white_bear_> s/PATH/DIR_PATH/
<jhass> Dir.entries
bruno- has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<white_bear_> jhass: cool, thanks!
ahmetkapikiran has joined #ruby
<[k-> Dir.entries contain . and .. iirc
<white_bear_> indeed, is there an idiom to skip them?
<ljarvis> yes, next if f == "." or f == ".."
* [k- checks the docs
<ljarvis> or all hidden files, just check for f.start_with?(".")
OrbitalKitten has joined #ruby
<ljarvis> it's just a simple loop
quazimodo has quit [Ping timeout: 272 seconds]
auzty has joined #ruby
* adaedra checks [k-
DexterLB has quit [Read error: Connection reset by peer]
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
auzty has quit [Read error: Connection reset by peer]
<[k-> there's no opts to skip those that I hoped :/
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
yoongkang has quit [Remote host closed the connection]
okdas_ is now known as okdas
okdas has quit [Changing host]
okdas has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
white_bear_ has quit [Ping timeout: 272 seconds]
chinmay_dd has quit [Ping timeout: 256 seconds]
uptownhr has quit [Quit: uptownhr]
DexterLB has joined #ruby
mister_solo has quit [Ping timeout: 256 seconds]
dionysus69 has joined #ruby
multi_io has quit [Ping timeout: 264 seconds]
chinmay_dd has joined #ruby
multi_io has joined #ruby
white_bear has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
dhjondoh has joined #ruby
workmad3 has joined #ruby
<adaedra> I never remember the outcome when this is discussed here: ruby-install or ruby-build?
konsolebox has joined #ruby
white_bear_ has joined #ruby
<white_bear_> back i guess
<adaedra> un ours
<white_bear_> :D
<jhass> adaedra: the one not associated with rbenv :P
fabrice31 has quit [Remote host closed the connection]
<white_bear_> so, how do you exclude "." and ".." in this: Dir[DIR_PATH].entries.map! ... # ?
fabrice31 has joined #ruby
<jhass> uh, Dir[] is glob already, might just use it then
chinmay_dd has quit [Read error: Connection reset by peer]
chinmay__ has joined #ruby
<ljarvis> ^
<adaedra> jhass: wow, such wisdom :p
white_bear has quit [Ping timeout: 265 seconds]
<ljarvis> adaedra: ruby-install
<al2o3-cr> does anyone use test ?<operator>, <file> in code?
Scrofff has joined #ruby
<ljarvis> al2o3-cr: it's not very popular no
<white_bear_> jhass: implying Dir[DIR_PATH + '/*'] # ?
<al2o3-cr> ljarvis: ah, ok :)
workmad3 has quit [Ping timeout: 265 seconds]
<adaedra> >> Dir['.']
<ruboto> adaedra # => ["."] (https://eval.in/385378)
<jhass> white_bear_: Dir["#{DIR_PATH}/*"] but yeah
<white_bear_> is / portable here? :p
<adaedra> .
<jhass> if DIR_PATH contains no \, yes
pandb has quit [Quit: leaving]
workmad3 has joined #ruby
<white_bear_> sounds good
stardiviner has quit [Ping timeout: 264 seconds]
yh has quit [Ping timeout: 250 seconds]
Scroff has quit [Ping timeout: 252 seconds]
ghostpl has joined #ruby
<white_bear_> thanks :)
ahmetkapikiran has quit [Quit: ahmetkapikiran]
lee-jon has left #ruby [#ruby]
anne-marie35 has joined #ruby
tkuchiki has joined #ruby
yh has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
lacrosse__ is now known as lacrosse
konsolebox has quit [Read error: Connection reset by peer]
<[k-> there is also Dir.entries(path)
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
<white_bear_> it keeps . and .. too
iamninja has quit [Read error: Connection reset by peer]
OrbitalKitten has joined #ruby
n008f4g_ has quit [Ping timeout: 252 seconds]
iamninja has joined #ruby
<[k-> just opening your options
<ljarvis> that's exactly what was just discussed
al2o3-cr has quit [Ping timeout: 272 seconds]
<shevy> the bear!
<shevy> catch him!
yoongkang has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
CloCkWeRX1 has quit [Quit: Leaving.]
tkuchiki has quit [Remote host closed the connection]
olistik has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<anne-marie35> Hello
<[k-> *reminding him his options
exadeci has joined #ruby
<anne-marie35> i'm a newbie in ruby (first time i use irc). i was wondering what kind of question i can ask to the ruby community. Many thanks
<[k-> I need to make my trip to the docs worthwhile, you'd know
Scroff has joined #ruby
<[k-> you can ask any question but you may not get a response
chinmay__ is now known as chinmay_dd
tkuchiki has joined #ruby
<ljarvis> anne-marie35: a ruby question
<adaedra> anne-marie35: anything!
<anne-marie35> ok thank you ljarvis ^^
chinmay_dd has quit [Remote host closed the connection]
Scrofff has quit [Ping timeout: 250 seconds]
<apeiros> anne-marie35: any ruby related question is fine. sometimes it needs patience to get an answer. sometimes getting no answer means that nobody understood your question.
<anne-marie35> so i would like to make rake tasks for a sinatra application with postgresql (no active record gem used), the purpose is to create databases with those tasks.
yardenbar has joined #ruby
<apeiros> oh, adaedra - back to life again?
<adaedra> [k-: why not?
<anne-marie35> i've search and read some stackoverflow questions, the official doc for rake, etc. and i so this, put the sql in a sql file and execute it with the task. Is it a good way to do things ?the url --> https://gist.github.com/KevM/1705486
<adaedra> apeiros: yeah, znc got connection problems yesterday, pushed back by old nick
<shevy> adaedra bring back the undead in you
<shevy> and send him with some baguette to us too :)
<[k-> oops, the message before that was 174808
chinmay_dd has joined #ruby
* wasamasa is imagining undead rails zombies
<wasamasa> the horror
<[k-> you broke the chain of 8s
<[k-> huehuehue
<shevy> they spawn threads until the computer crashes
<adaedra> [k-: sorry
<zenspider> I can't read anything past the first tab
<anne-marie35> @<apeiros>ok, i will take care about the way i wrote in enlish
<adaedra> anne-marie35: not a lot of us speak english natively, I guess it'll be ok :)
<apeiros> anne-marie35: heh, from experience, most often the language is not the problem :) more that people leave out tons of context.
terlar has joined #ruby
<[k-> please don't wing mandarin at us
<[k-> swing*
startupality has joined #ruby
<[k-> the horror when you fail mandarin badly
ghostpl has quit [Remote host closed the connection]
<adaedra> huehuehuehue
<[k-> cute
ndrei has joined #ruby
<white_bear_> aren't you a perl guy apeiros? remind me someone...
yoongkang has quit [Remote host closed the connection]
<apeiros> white_bear_: perl was one of my first languages. but I think somebody else goes by a similar nick and is an active perl user.
mister_solo has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
nopolitica has joined #ruby
<adaedra> aperlos
Cust0sLim3n has quit [Ping timeout: 244 seconds]
<shevy> haha
khebbie has quit [Ping timeout: 252 seconds]
<apeiros> anne-marie35: I've only skimmed your gist. there's a couple of things I'd do differently stylistically. but overall it looks fine.
<shevy> he also did some php so he could be apephp
<[k-> mandarun throwing https://youtu.be/Pfo1BrYPi-E
<shevy> [k- write more code man!
<apeiros> anne-marie35: for some reason I really dislike e.g. manually invoking tasks in rake (Rake::Task["apply_sqlserver_sql"].execute()). convention in ruby is to use snake_case for variable names (se_config instead of seConfig f.ex.)
<apeiros> and of course 2 spaces, not tabs :)
<[k-> I don't write much code anymore :(
tkuchiki has quit [Remote host closed the connection]
mister_solo has quit [Ping timeout: 265 seconds]
<ljarvis> apeiros: apeiron probably
mattrse has quit [Ping timeout: 264 seconds]
<apeiros> ljarvis: that'd fit with my memory, yes
* ljarvis does lots of perl
<apeiros> it's not the first time this came up :)
<ljarvis> heh
<adaedra> [k-: Do you have videos with even less quality? I can still see what happens.
<jhass> s = r, n = p, can you break the code?
<[k-> adaedra: no I don't ;p
bluOxigen has quit [Ping timeout: 256 seconds]
unshadow has quit [Quit: leaving]
<shevy> [k- try to write a little bit every now and then
terlar has quit [Read error: No buffer space available]
<shevy> adaedra it was recorded with a potato
<anne-marie35> apeiros: thanks for the answer and the tip
yh has quit [Ping timeout: 265 seconds]
<adaedra> DIe, potato
<adaedra> s/I/i/
<shevy> and as you may now from the french cuisine, a potato has really bad eyesight
Mon_Ouie has quit [Remote host closed the connection]
p1k has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
Cust0sLim3n has joined #ruby
<[k-> have you seen a potato budding from a potato?
<[k-> looks very gross
bluOxigen has joined #ruby
<shevy> well that's how plants tend to expand man
<adaedra> Potatisar
<shevy> you are killing baby plants when you eat them; you should eat stone instead
<adaedra> To be stoned?
<[k-> I'm sure stones are very nutritious!
<[k-> fossils power our electricity!
yh has joined #ruby
<[k-> think of the energy we would get!
<_mh_> am sure, given enough time to be digested and depending on the type of stone, the enclosed minerals could be very healthy.
dg-ratio1 has quit [Remote host closed the connection]
dg-ratio1 has joined #ruby
<apeiros> anne-marie35: another thing you might consider: I tend to not have any code in my rake tasks themselves. I have the code in classes and call out to those.
<adaedra> Fascinating
ndrei has quit [Remote host closed the connection]
ndrei has joined #ruby
<shevy> classes are very useful
dfockler has joined #ruby
yoongkang has joined #ruby
<[k-> does the community like refinements now?
<ddv> refinements are awesome
endash has joined #ruby
<shevy> I don't like its syntax
<ddv> and I represent the community in full
<shevy> the idea is ok
<ljarvis> dont let yorickpeterse see that
<yorickpeterse> I saw it
<yorickpeterse> I see everything
antgel has joined #ruby
<yorickpeterse> well mostly everything
dede has quit [Quit: Connection closed for inactivity]
konsolebox has joined #ruby
fabrice31_ has joined #ruby
<apeiros> yorickpeterse's family name is Heimdall
mattrse has joined #ruby
<yorickpeterse> heh
dfockler has quit [Ping timeout: 246 seconds]
konsolebox has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 248 seconds]
fabrice31_ has quit [Remote host closed the connection]
<shevy> sounds mighty
<shevy> like a Viking
<shevy> Heimdall Wauki, brother of Thor Wauki!
ndrei has joined #ruby
datanoise has joined #ruby
<apeiros> there's those wimps who fear winter coming. they should fear ragnarök.
<anne-marie35> apeiros: i saw some examples with a lot of code in a task indeed and i was wondering why they do that
yh has quit [Ping timeout: 265 seconds]
stardiviner has joined #ruby
olistik has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 256 seconds]
<[k-> is this an example of encapsulation not being followed?
bluOxigen has quit [Read error: Connection reset by peer]
mcpierce` is now known as mcpierce
bluOxigen has joined #ruby
<apeiros> it's an example of early convenience staying around for too long
yh has joined #ruby
<apeiros> small rake tasks with code you don't need anywhere else is usually where it starts
<apeiros> so you put all code in the task itself. and then never reconsider the pattern, even as your tasks grow.
bkxd has quit [Ping timeout: 255 seconds]
quimrstorres has quit [Remote host closed the connection]
<jhass> invoking other tasks is probably the last red flag that you should extract stuff
ndrei has quit [Ping timeout: 248 seconds]
<apeiros> jhass: I'm actually thinking about *why* I dislike that so much. it's a gut feel and I can't rationalize it. so I wonder whether it's mistaken :-|
<apeiros> might also just still be those f'ing meds I'm on, preventing me from thinking clearly :<
ta has quit [Remote host closed the connection]
ndrei has joined #ruby
quimrstorres has joined #ruby
<jhass> I'd rationalize it about above point actually, it's a big red flag that you actually want to extract stuff to a class or at least some regular methods, it indicates people forgetting that rake tasks are regular Ruby after all
<jhass> and I think it's also that it feels like it's not intended by Rake by not having a DSL method to do it, it looks like breaking up Rake internals
farhad_hf has joined #ruby
Blaguvest has joined #ruby
<jhass> (I do agree about it if you didn't figure ;D)
farhad_hf has left #ruby ["Konversation terminated!"]
mister_solo has joined #ruby
al2o3-cr has joined #ruby
al2o3-cr is now known as Guest16239
surs has joined #ruby
<apeiros> :)
nopolitica has quit [Ping timeout: 265 seconds]
mcpierce has quit [Quit: Coyote finally caught me]
<shevy> coding while being drugged rocks
<shevy> guess how _why was able to code so much!
<jhass> baconed
jimms has quit [Remote host closed the connection]
fujimura has quit [Remote host closed the connection]
p1k has joined #ruby
bkxd has joined #ruby
<adaedra> bacon?
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
sandstrom has joined #ruby
denver has joined #ruby
<ljarvis> baconed what his state
duoi has quit [Quit: duoi]
Guest16239 has quit [Quit: the quieter you become, the more you are able to hear]
<tobiasvl> chunky bacon
gr33n7007h has joined #ruby
<apeiros> he never told the fox that the chunky bacon was fox bacon…
gr33n7007h is now known as al2o3-r
kp666 has quit [Remote host closed the connection]
duoi has joined #ruby
z3uS has quit [Ping timeout: 264 seconds]
bar0n has joined #ruby
<[k-> guess what did the fox say?
iamninja has quit [Ping timeout: 252 seconds]
al2o3-r is now known as al2o3-cr
<jhass> apeiros: I see what you mean about the meds
_blizzy_ has joined #ruby
<apeiros>
z3uS has joined #ruby
lucianob has joined #ruby
lkba has joined #ruby
<[k-> I wish I could be remotely as funny but... guess not ;-;
olistik has joined #ruby
baxx has joined #ruby
Pupeno has quit [Remote host closed the connection]
<[k-> I hope nobody gave a blank look on that one hehe
* adaedra pats [k-
<jhass> nah, we're busy playing hangman
uptownhr has joined #ruby
endash has quit [Quit: endash]
bkxd has quit [*.net *.split]
surs has quit [*.net *.split]
stan has quit [*.net *.split]
MVPhelp has quit [*.net *.split]
shafox has quit [*.net *.split]
jesterfraud has quit [*.net *.split]
kenichi has quit [*.net *.split]
unclouded has quit [*.net *.split]
jokester has quit [*.net *.split]
BackEndCoder has quit [*.net *.split]
bougyman has quit [*.net *.split]
nertzy has quit [*.net *.split]
CHVNX has quit [*.net *.split]
quarcu has quit [*.net *.split]
RazorX_ has quit [*.net *.split]
Fluent has quit [*.net *.split]
Janusz1_ has quit [*.net *.split]
spectra has quit [*.net *.split]
ElderFain has quit [*.net *.split]
mistym has quit [*.net *.split]
johnhamelink has quit [*.net *.split]
george2 has quit [*.net *.split]
PlasmaStar has quit [*.net *.split]
RoryHughes has quit [*.net *.split]
drewdavis has quit [*.net *.split]
jimeh has quit [*.net *.split]
blackjid has quit [*.net *.split]
jalcine has quit [*.net *.split]
LBRapid has quit [*.net *.split]
lupine has quit [*.net *.split]
teotwaki has quit [*.net *.split]
sfr^ has quit [*.net *.split]
prasselpikachu has quit [*.net *.split]
df has quit [*.net *.split]
epochwolf has quit [*.net *.split]
Shidash has quit [*.net *.split]
Seich_ has quit [*.net *.split]
nullwarp has quit [*.net *.split]
DarkBushido has quit [*.net *.split]
ytti has quit [*.net *.split]
jamo___ has quit [*.net *.split]
MiracleBlue has quit [*.net *.split]
BLuEGoD has quit [*.net *.split]
Dwarf has quit [*.net *.split]
akahn has quit [*.net *.split]
jokke has quit [*.net *.split]
canton7 has quit [*.net *.split]
programmerq has quit [*.net *.split]
melter has quit [*.net *.split]
tylersmith has quit [*.net *.split]
chinmay_dd has quit [Remote host closed the connection]
tylersmith has joined #ruby
Janusz1 has joined #ruby
drewdavis has joined #ruby
nullwarp has joined #ruby
bkxd has joined #ruby
quazimodo has joined #ruby
sfr^ has joined #ruby
<apeiros> [k-: I was refusing to say "Ring-ding-ding-ding-dingeringeding!"
Seich has joined #ruby
stan has joined #ruby
jesterfraud has joined #ruby
DarkBushido has joined #ruby
Jamo__ has joined #ruby
df has joined #ruby
PlasmaStar has joined #ruby
bougyman has joined #ruby
bougyman has quit [Changing host]
bougyman has joined #ruby
nertzy has joined #ruby
surs has joined #ruby
CHVNX has joined #ruby
kenichi has joined #ruby
unclouded has joined #ruby
Shidash has joined #ruby
RoryHughes has joined #ruby
teotwaki has joined #ruby
epochwolf has joined #ruby
prasselpikachu has joined #ruby
LBRapid has joined #ruby
Fluent_ has joined #ruby
george2 has joined #ruby
jalcine has joined #ruby
blackjid has joined #ruby
RazorX has joined #ruby
johnhamelink has joined #ruby
fabrice31 has joined #ruby
BackEndCoder has joined #ruby
ElderFain- has joined #ruby
ElderFain- is now known as ElderFain
MVPhelp_ has joined #ruby
mistym has joined #ruby
programmerq has joined #ruby
jimeh has joined #ruby
ghostpl has joined #ruby
lkba_ has quit [Ping timeout: 276 seconds]
jokester has joined #ruby
ElderFain has quit [Changing host]
ElderFain has joined #ruby
quarcu has joined #ruby
Dwarf has joined #ruby
melter has joined #ruby
BLuEGoD has joined #ruby
Pupeno has joined #ruby
khebbie has joined #ruby
chinmay_dd has joined #ruby
shafox has joined #ruby
akahn has joined #ruby
lupine has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
<adaedra> Can we stop with this? It's dead and buried since long.
<[k->
MiracleBlue has joined #ruby
patteh has joined #ruby
spectra has joined #ruby
patteh has quit [Client Quit]
DexterLB has quit [Quit: So long and thanks for all the fish]
ndrei has quit [Ping timeout: 250 seconds]
DexterLB has joined #ruby
mattrse has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
Kero_ is now known as Kero
mattrse has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<shevy> the buried baguette
k3asd` has quit [Ping timeout: 276 seconds]
<shevy> most of _why's projects seem to have been able to find new maintainers
chinmay_dd has quit [Remote host closed the connection]
tlarevo has joined #ruby
<adaedra>
<ljarvis> long live hpricot
k3asd` has joined #ruby
skade has joined #ruby
<shevy> here is the full code, just a bit modified already https://gist.github.com/anonymous/dec6d9741cf08508667f
renderful has joined #ruby
<jhass> shevy: yeah, could use a messenger object
chinmay_dd has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
<ljarvis> clear = `clear`
<ljarvis> i lol'd
ndrei has joined #ruby
<[k-> imagine that in a constructor
anne-marie35 has quit [Ping timeout: 246 seconds]
<[k-> in a strongly typed language, even
marsjani- has joined #ruby
skade has quit [Ping timeout: 255 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
marsjani- is now known as marsjaninzmarsa
Pupeno has quit [Remote host closed the connection]
<[k-> >> $PROGRAM_NAME
<ruboto> [k- # => "/tmp/execpad-c1783743b833/source-c1783743b833" (https://eval.in/385433)
<workmad3> [k-: do you mean a strongly typed, or a staticly typed? :)
<[k-> The second one :)
chinmay_dd has joined #ruby
renderful has quit [Ping timeout: 256 seconds]
rodfersou has joined #ruby
Jackneill has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 246 seconds]
<stan> is there a cleaner way of getting a value from a list of hashes than this? [{1 => 1, 2 => 2}, {3 => 3}].find { |h| h[1] }[1]
<shevy> ack
<adaedra> Hello VB
<shevy> lol
Jackneill has joined #ruby
<shevy> so an Array with Hashes inside
bkxd has joined #ruby
<ljarvis> shevy: .map(&:values)
<jhass> stan: you can spare the .find in that case
<ljarvis> stan: ^
<shevy> I am stan!
<shevy> he is shevy
<jhass> oh, mh, actually nvm
<jhass> that's one I'd like find_value for :/
<stan> but the value of a particular key
<ljarvis> ah i read it wrong heh
<[k-> .find &:[1]
<jhass> that doesn't work
<ljarvis> it's been proposed
<[k-> why not :(
<ljarvis> bit clunky though
<[k-> .find &:second
<ljarvis> ^ active support only
MatthewsFace has quit [Remote host closed the connection]
<[k-> clearly more readable!
<workmad3> [k-: because a) that's not a valid symbol and b) you can't pass arguments to Symbol#to_proc like that
ndrei has quit [Ping timeout: 276 seconds]
ndrei_ has joined #ruby
<jhass> you'll still need .find(&:second).second :/
<ljarvis> :D
<ljarvis> beautiful...
<jhass> or .lazy.map(&:second).find(&:itself)
<[k-> I missed the second [1] part
<jhass> I really should write a patch for find_value
noname has joined #ruby
<ljarvis> yarly
<workmad3> [k-: it's possible to patch Symbol so that .find :[].(1) would work
Pupeno has joined #ruby
<[k-> but that would be ugly
<workmad3> :[][1] ? :)
tvw has joined #ruby
<[k-> using &:values looks much better
ta has joined #ruby
<[k-> wait, that method call doesn't make sense
skyrocker has left #ruby [#ruby]
<[k-> oh, I just got it
<jhass> stan: maybe you can restructure your stuff so that becomes unnecessary :/
chthon has quit [Ping timeout: 244 seconds]
<[k-> merging the hashes may be nice
lkba has quit [Remote host closed the connection]
skade has joined #ruby
<abyss> helo again;) I have this code: https://gist.github.com/anonymous/15b22caab60edfe9caf5. It reads ids from id_to_change_all_uniq put to array. Then loop in each, check if line contain one of the id from ids array if yes, then add 1000 to id and change old id to new id.
Renich has quit [Ping timeout: 264 seconds]
iamninja has joined #ruby
skade has quit [Client Quit]
<[k-> I got a 404 :(
BaconOverflow has joined #ruby
<abyss> the problem is that I have to find all ids in line not only first id from array (id = ids.find), someone could help me in that?
<adaedra> remove the dot, [k-
al2o3-cr has quit [Ping timeout: 244 seconds]
<[k-> oh
<[k-> haha
<adaedra> ?gist_usage
<ruboto> To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
<adaedra> ?gistusage
<ruboto> I don't know anything about gistusage
<adaedra> jhass, help me
<adaedra> nvm
<workmad3> ?gist-usage
<ruboto> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<workmad3> adaedra: :P
<adaedra> ruboto is slow today :(
<workmad3> oh wait, that looks like gist... and you already found gist_usage :D
<abyss> btw: it's to my code?;)
rodferso1 has joined #ruby
<shevy> lol
<adaedra> yes, enable syntax coloring
<shevy> so many lines of ? bot fail, and nobdy answers this poor man's question
sandstrom has joined #ruby
<shevy> we have... .find .select .scan .grep we have everything man
<[k-> if you want to find many, use .select
<shevy> 16 lines!
<shevy> and you still don't have the solution...
diegoviola has joined #ruby
djellemah has quit [Ping timeout: 256 seconds]
<shevy> I don't like this code
<abyss> shevy: I have but not so good I suppose because I wanted to add ids.each between 9 and 10 lines;)
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> it would be better to separate the various concerns
<[k-> there is no proper indentation! *screams*
k3asd` has quit [Ping timeout: 264 seconds]
tvw has quit [Ping timeout: 248 seconds]
quazimodo has quit [Ping timeout: 248 seconds]
<shevy> oh but there is
<shevy> he indents with one space :)
<adaedra> yep, just replace your .find by .select and you'll get an array of all matches
OrbitalKitten has joined #ruby
rodfersou has quit [Ping timeout: 276 seconds]
livcd has joined #ruby
<abyss> adaedra: ok, but it wouldn't be better to add another line with select? If select is slower than find? Thank you.
al2o3-cr has joined #ruby
k3asd` has joined #ruby
Pupeno has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
<[k-> select is slower than find in the worst case scenario
<adaedra> abyss: they do different things. #find returns the first match (or nil), #select returns all the values which match your predicate in a new array.
<[k-> find and select are the same in the best case scenario :D
<adaedra> so instead of a if, maybe use a each
blackmesa has quit [Ping timeout: 276 seconds]
<adaedra> ah wait
<abyss> yes, that why I wonder if it will be slower I mean maybe I should add another line beneath ids.find. if find something then put everything to array, or not?
<adaedra> I don't see well what you're trying to achieve
<abyss> adaedra: if I use each then always for each line the script will be try to add 1000 to id and try to change for each id (there's about 65000 ids;)), yes?
<adaedra> or you could just
<abyss> adaedra: I'd like to check each line in my file and if line contain one of the id (ids array) then add 1000 and change old value to new one.
<abyss> *add 10000
<adaedra> .gsub!(/\b\d+\b/) { |n| n.to_i + 1000 }
<adaedra> or something like that
chthon has joined #ruby
<[k-> regex is quite slow...
<bnagy> abyss: we gave you a bunch of ideas about optimising your regexp lookups, but doesn't look like you did any of it
User458764 has quit [Ping timeout: 276 seconds]
<abyss> adaedra: I'm afraid I don't get this code;)
Rapier- has quit [Quit: (null)]
<adaedra> [k-: I don't know if it would be slower than what he's doing already
User458764 has joined #ruby
<bnagy> another way might just be to convert ALL of the sub ids to a Hash, then get all the numbers out of each line instead
User458764 has quit [Max SendQ exceeded]
<[k-> yes bnagy!
<[k-> wait, sub ids?
<bnagy> so instead of checking for each possible subst if, you get the ids that are actually there, see if they're in to_substitute and then replace if so
datanoise has quit [Ping timeout: 264 seconds]
User458764 has joined #ruby
oo_ has quit [Remote host closed the connection]
endash has joined #ruby
<bnagy> should change it from O n**2 to O n :/
<abyss> bnagy: yes, but I have different problem:) Sorry for that I didn't understand well how I should change it, so I left this one. It's works for me but only for the first occurrence
<bnagy> well O n*m
<[k-> arrays aren't really fast for that huge a number
bnumfw has joined #ruby
mattrse has quit [Remote host closed the connection]
<bnagy> abyss: basically, instead of iterating ids for each input line, just turn that into a Hash
<[k-> you could use a set, that takes away the ugly solution of hash for you
<bnagy> then for each line, just get everything that might be an id
denver has quit [Ping timeout: 252 seconds]
<bnagy> and see if a) there are any and b) if they are in the hash
<bnagy> that will be much lower order
<bnagy> [k-: set is just a hash in ruby, right?
<[k-> yes, its in the stdlib
<bnagy> ok well I don't think bikeshedding Set vs Hash is the main problem :)
Zai00 has joined #ruby
<bnagy> compared to reducing it by a factor of ~ ids.size / 2 ;)
<abyss> adaedra: btw: this code: .gsub!(/\b\d+\b/) { |n| n.to_i + 1000 } As I said I can't change each number I have to change id from ids array:)
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<abyss> bnagy: sorry for that but I don't get it how hashes will help me:(
<adaedra> you can add your condition in the block
<[k-> you can also do this: as you read the line, check if the id is in the hash, if not, insert it to the hash.
<bnagy> [k-: I don't think that's the problem
<[k-> but it would be faster :3
<bnagy> [k-: afaik the problem is "if any line has an id in $this_list, increase all those ids by 1000"
<[k-> he also wants it to be fast
<abyss> bnagy: exactly
<bnagy> so you don't need to modify your starting hit list
<adaedra> functional > fast
<adaedra> ;)
<[k-> of course, of course
rubie has joined #ruby
<bnagy> basically my suggestion is: turn hit list into a hash, then for each line, get all things that might be ids, look up in hitlist, if they are there do gsub
<bnagy> so it's one scan per line, one lookup per scan result
<abyss> bnagy: now my script works something like this: if any line has an id in $this_list, increase first accurance of id by 1000 intead of all ids in line. Adding each after that find will add for each id 10000 even if that id doesn't accur in line :(
<[k-> I'm not sure how adding 10000 wouldn't result in another collision though
yfeldblum has quit [Ping timeout: 248 seconds]
ta has joined #ruby
<bnagy> [k-: well presumably the initial list is defined like that, it's a DB dump where the ids were monotonically increasing I think
<abyss> yeah, you're not sure about that but I'm not sure what are you talking about ;)
<bnagy> but yes, you're right in theory :)
rodferso1 has quit [Quit: leaving]
<bnagy> abyss: might one line contain more than one id from the replace_list ?
<abyss> bnagy: I have list of ids that I need to increase in my binlog file.
rodfersou has joined #ruby
<abyss> bnagy: yes , that's the problem
<[k-> by list you mean arrays?
<workmad3> [k-: it's fine as long as: 1) there's only a chance of 2 items having the same ID and 2) the largest id is < 10000 :)
<bnagy> ok then my thing still works, you just need to go through the found ids and use sub
<abyss> otherwise the script would be work fine
rubie has quit [Ping timeout: 265 seconds]
Pupeno has joined #ruby
<[k-> workmad3: I hope it is a one time only script then
<bnagy> basically say your scan for numbers in the line finds [20, 50, 20] you do found_ids.each {|id| if (replace=sub_list[id]; line.sub! id, replace; end } or something
ldnunes has joined #ruby
<bnagy> modulo syntax errors
Iskarlar has quit [Read error: No route to host]
phat4life has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Iskarlar has joined #ruby
<bnagy> you'll run twice for 20 there, but it's fine
Zai00 has quit [Ping timeout: 252 seconds]
toretore has joined #ruby
<bnagy> because it's still like 30000 times faster than what you have :)
Zai00 has joined #ruby
phat4life has joined #ruby
<[k-> you shouldn't use arrays or regexp for 65000 things, that'll be super duper ultra mega slow
MasterPiece has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<bnagy> [k-: we had this a few days ago, and were suggesting using a Regexp.union
<DefV_> don't underestimate your computer
<bnagy> but the code has changed slightly
<bnagy> also, regexp is surprisingly fast :<
<shevy> ruby is fast!
<bnagy> I hate regexp and never use them, but when you're performance golfing regexp solutions do better than you'd expect
<shevy> once it'll become mruby
<bnagy> apart from the object creation
startupality has quit [Quit: startupality]
OrbitalKitten has joined #ruby
don_ has joined #ruby
<adaedra> %r{fast}
<abyss> bnagy: sorry:(
<DefV_> bnagy: why do you hate regexp?
Iskarlar has quit [Client Quit]
<[k-> so... we don't need to optimise Ruby by hand? :D
<abyss> bnagy: I still don't know how to achieve that? First I need to find this 20,50, 20 , yes?;)
yeticry has quit [Ping timeout: 264 seconds]
<abyss> no, I don't understand your code sorry
<[k-> abyss, show us what you have!
platzhirsch has joined #ruby
yeticry has joined #ruby
<[k-> no, the new one...
<abyss> I know I could add between line 9 and 10 ids.each do |id| do and do everything between line 10 and 12 but i would be extremely slow:(
<bnagy> let's start with that. I didn't test anything so it will be buggy
soulcake has quit [Ping timeout: 276 seconds]
<[k-> bnagy, you didn't indent properly!
luciano__ has joined #ruby
luciano__ has joined #ruby
<bnagy> DefV_: they rapidly become impossible to read, and people use them instead of parsing
<bnagy> [k-: I know, I just blatted it in the gist fork, sorry :/
<[k-> parsing is the only way to do things in Haskell and I don't know how to parse ;-;
<DefV_> bnagy: Good tests fix the impossible-to-read problem (for me)
<bnagy> how do tests make shit regexps less eyeburning?
blackmesa has joined #ruby
<bnagy> regexp is just a horrible language
<ljarvis> :o
<flughafen_> i love me some regex
soulcake has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lucianob has quit [Ping timeout: 246 seconds]
<bnagy> abyss: do you get what I'm trying to do with that code?
<bougyman> bnagy: /x with comments :)
<abyss> bnagy: It wouldn't change each number I mean if in line is 78889 and I want to change 888 to 1888 it change 78889 to 718889 as well?
<DefV_> bnagy: most of the time regexes become complex when you try to catch different kinds of input and ignoring others
yeticry has quit [Ping timeout: 256 seconds]
<bnagy> abyss: no, it will only change complete matches
<[k-> I think abyss is under a lot of stress
nopolitica has joined #ruby
<DefV_> bnagy: tests capture all the exceptions for which you've made your regexp complex
yeticry has joined #ruby
<abyss> [k-: yes;) Because we have really bad issue;) But how you uncover this?;)
<[k-> you said some nonsensical stuff which shows that you are facing a lot of stress
<abyss> and client is pissed off so I'm a bit stress because everybody in company looks at me;)
<abyss> [k-: uhhh, it maybe bacause of my english;)
railsraider has joined #ruby
<[k-> no, it's this: 195026 <abyss> bnagy: It wouldn't change each number I mean if in line is 78889 and I want to change 888 to 1888 it change 78889 to 718889 as well?
quimrstorres has joined #ruby
<[k-> no offense :D
Zai00 has quit [Quit: Zai00]
<[k-> bnagy: time to swing some production code?
<abyss> [k-: uhh, because I did that;) in my script in line 9 and 11 I omitted \b \b and then it changed everything;) even that I mentioned 78889 to 718889 ;)
<bnagy> abyss: I updated it to fix a small bug
<bnagy> I am drinking beer so I won't swear 100% that it does what you want, but it lgtm
<bnagy> it's slightly inefficient if you have a lot of ids to replace per input line. If it's like one or two this approach is better imho
<abyss> bnagy: How I can list the whole code I can see only the first version:(
<bnagy> either way it's much more efficient than your code I think
hoov has joined #ruby
<bnagy> abyss: just refresh, it's gist
<abyss> hmmm I still see ids.each {|id| replace[id] = id.to_i + 1000} intead of +ids.each {|id| replace[id] = (Integer(id)+ 1000).to_s}
<[k-> :o there are multiple ids per line?
<abyss> [k-: yes, it's all fuss about;)
<bnagy> abyss: uh.. the second thing you said is the change
codecop has quit [Remote host closed the connection]
jacor has quit [Read error: Connection reset by peer]
nopolitica has quit [Ping timeout: 255 seconds]
<bnagy> so if you can't see it, how did you know it was there? ;)
jacor has joined #ruby
<adaedra> that's why I proposed the gsub! above, got all changes in one line
<abyss> bnagy: yeah, but I cant see this in one file only when I click reviosions then I can see your changes - never mind;) I will stick it together:)
<bnagy> adaedra: the ideas can differ I think
serivich has joined #ruby
flughafen_ has quit [Ping timeout: 264 seconds]
<bnagy> abyss: make sure you use my whole gist, I construct the hash completely differently
<bnagy> adaedra: s/ideas/ids/
<shevy> circle.rb:87:in `initialize': bignum too big to convert into `long' (RangeError)
<shevy> ruby does not let me count to Infinity :(
<bnagy> like I think a line can be like "DO SQL SHIT WITH 13, AND ALSO 15"
<bnagy> and we need to convert to "DO SQL SHIT TO 1013, AND ALSO 1015"
<adaedra> ?
droidburgundy has joined #ruby
<adaedra> .gsub!(/\b\d+\b/) { |n| n.to_i + 1000 }
djbkd has joined #ruby
<adaedra> >> "DO SQL SHIT WITH 13 AND ALSO 15".gsub(/\b\d+\b/) { |n| n.to_i + 1000 }
<bnagy> you can't do that
<ruboto> adaedra # => "DO SQL SHIT WITH 1013 AND ALSO 1015" (https://eval.in/385458)
<bnagy> because you need to check each id to see if it's in the list to sub
<adaedra> I can't ?
<abyss> bnagy: lines could looks like: NSERT INTO codes (package_id,code,add_date,exp_date,licence_duration,students_licences,comment) VALUES ('1693', 'vvvv', 1443109600, 15381293600, '12', '1', NULL) and should looks like: NSERT INTO codes (package_id,code,add_date,exp_date,licence_duration,students_licences,comment) VALUES ('11693', 'vvvv', 1443109600, 15381293600, '1012', '1', NULL) or something, but lines could looks like: SET INSERT_ID=481699/*!*/; and it should l
tvw has joined #ruby
<abyss> bnagy: yes, exactly:)
<abyss> adaedra: I have list of ids (in array) that I want to change
olistik has quit [Remote host closed the connection]
<abyss> s/but lines could looks like/but lines could looks like
<abyss> s/but lines could looks like/but lines could also looks like/g
<adaedra> bnagy: add a if in the block
don_ has quit [Read error: Connection reset by peer]
<shevy> your lines could look like
<adaedra> but that was only an idea, can be reworked
olistik has joined #ruby
hoov has quit [Quit: Leaving]
<bnagy> abyss: in my code at the point where I'm doing sub! I'm using strings, not regexp, so it can't "overmatch" but it can undermatch :/
gagrio has quit [Ping timeout: 264 seconds]
<bnagy> abyss: so it should probably be converted to a regex with boundary anchors
<bnagy> adaedra: gsub (without !) with a block would work
unshadow has joined #ruby
<bnagy> I just don't think it's any more efficient and it's harder to read (imho)
otisZart has joined #ruby
<bnagy> but my sub with a string is definitely buggy
djbkd has quit [Ping timeout: 256 seconds]
<adaedra> Also, for the above hash, instead of storing all possible ids, just have a magic hash like h = Hash.new { |_, n| n + 1000 }
Blaguvest has quit [Ping timeout: 244 seconds]
<bnagy> updated... how's that?
<abyss> adaedra: it's too complicated for me;p
<bnagy> adaedra: that's in my gist already ;)
allenn has joined #ruby
<adaedra> it sets base for unknown ids, and you can manually set replacements
<bnagy> oh.. like a default
<bnagy> no that's not going to work
<bnagy> because they're strings
jsrn_ is now known as jsrn
<adaedra> I don't have the right gist then
<adaedra> abyss: no it isn't ;)
<bnagy> maybe I just don't know how updating gists works :|
krz has quit [Quit: WeeChat 1.0.1]
<adaedra> then use strings ;)
<bnagy> adaedra: you can't have defaults like that for string values you have to use block form
rfv_ is now known as rfv
fabrice31 has quit [Remote host closed the connection]
[k-_ has joined #ruby
<adaedra> >> h = Hash.new { |_, n| (n.to_i + 1000).to_s }; h[3] = 4; [ h[3], h[7] ]
<ruboto> adaedra # => [4, "1007"] (https://eval.in/385461)
<bnagy> and if you don't save them it's actually _less_ efficient
blackmesa has quit [Ping timeout: 272 seconds]
hoov has joined #ruby
fabrice31 has joined #ruby
<adaedra> >> h = Hash.new { |_, n| (n.to_i + 1000).to_s }; h["3"] = "4"; [ h["3"], h["7"] ]
<ruboto> adaedra # => ["4", "1007"] (https://eval.in/385462)
<[k-_> the problem isnt solved yet? :(
<bnagy> which is why I did it the readable, simple way
<bnagy> [k-: it's solved, adaedra is just bikeshedding, badly
sinkensabe has quit [Remote host closed the connection]
<[k-_> bikeshedding?
<adaedra> bnagy: they're saved at first lookup iirc
<adaedra> ah no, by bad
skade has joined #ruby
flughafen has joined #ruby
<abyss> please look at the example file that I want to modify: https://gist.github.com/anonymous/5c7ce3143f8756271cd8
<bnagy> abyss: did you try my updated gist?
tlarevo_ has joined #ruby
<flughafen> yay! my computer froze while compile phantomjs
<adaedra> :(
<abyss> bnagy: not yet:) I going to that, thank you:)
<adaedra> flughafen: congrats! your computer is now haunted
stardiviner has quit [Ping timeout: 272 seconds]
canton7 has joined #ruby
canton7 has joined #ruby
<bnagy> by javascript, at the very least
<flughafen> boooooo!
ndrei_ has quit [Ping timeout: 256 seconds]
jokke has joined #ruby
tlarevo has quit [Ping timeout: 255 seconds]
Iskarlar has joined #ruby
ndrei has joined #ruby
<bnagy> adaedra: you can use your form if you Hash.new {|h,k| h[k] = ...
timonv has quit [Ping timeout: 264 seconds]
<bnagy> but since we have to read the target id file it's not really possible to make it truly lazy imho
yh has quit [Ping timeout: 244 seconds]
<adaedra> right
<adaedra> I thought it added it on lookup :/
CloCkWeRX has joined #ruby
arup_r has quit [Remote host closed the connection]
sandstro_ has joined #ruby
<adaedra> with a merge?
rodfersou has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<adaedra> I should go to eat, it's 14h already :x
sinkensabe has joined #ruby
rodfersou has joined #ruby
edwinvdg_ has joined #ruby
Palmer11 has joined #ruby
<flughafen> it is 14!
<bnagy> well it will if you set it in the block, but not when you _ the hash param in the block
<bnagy> I should eat also! \o/ EVERYBODY EAT
Blaguvest has joined #ruby
<shevy> flughafen hey, do you have working clocks in the berlin flughafen
<flughafen> shevy: no, it's stuck on lunch time
<flughafen> since 4 years
sandstrom has quit [Ping timeout: 256 seconds]
j416 has quit [Ping timeout: 256 seconds]
<shevy> lol
edwinvd__ has joined #ruby
gagrio has joined #ruby
gaucheph__ has quit [Ping timeout: 248 seconds]
edwinvdgraaf has quit [Ping timeout: 276 seconds]
bronson has joined #ruby
ahmetkapikiran has joined #ruby
edwinvdg_ has quit [Ping timeout: 250 seconds]
melter has quit [Quit: Client exiting]
rbennacer has joined #ruby
ndrei has quit [Ping timeout: 276 seconds]
bronson has quit [Ping timeout: 265 seconds]
Zai00 has joined #ruby
arup_r has joined #ruby
<abyss> bnagy: I get: 10: undefined local variable or method `lookup' for main:Object (NameError
wildroman3 has joined #ruby
<[k-_> huehuehue
havenwood has joined #ruby
<abyss> ;)
* flughafen see's if phantomjs compiles without freezing ze computer
afrianska has joined #ruby
<shevy> [Some Time Later ...]
<shevy> damn it, the flughafen in berlin is down again
wildroman2 has quit [Ping timeout: 246 seconds]
<[k-_> awww :(
zlude has quit [Quit: Leaving]
hamster88 has joined #ruby
<[k-_> why is replace being assigned in the if statement anyway
<[k-_> i thought u guys use rubocop ;-;
Rapier- has joined #ruby
thiagovsk has quit [Quit: Connection closed for inactivity]
quimrstorres has quit [Remote host closed the connection]
<abyss> [k-_: you're talking about my issue?;)
<[k-_> abyss, firstly change replace = lookup[id] into replace == lookup[id]
timonv has joined #ruby
<[k-_> wait,
<[k-_> bnagy, there seems to be another logical error
jimms has joined #ruby
Xeago has quit [Remote host closed the connection]
<abyss> I thought it would be easier to do that;) I'm not sure what we're doing in bnagy script (why hash for example)
<[k-_> abyss, explain your problem again?
<[k-_> ids_to_change_all_uniq, is that the list of ids to change?
ponga has joined #ruby
segfalt has joined #ruby
<abyss> [k-_: yes
strixd has joined #ruby
strixd has quit [Excess Flood]
mister_solo has quit [Ping timeout: 256 seconds]
<[k-_> then there isnt a logical error then actually
<abyss> [k-_: I'd like to check each line if contain one of the id from array if yes then increase id to change about 1000 and replace old value with new one
strixd has joined #ruby
strixd has quit [Excess Flood]
<abyss> for example I have line: SET INSERT_ID=283418/*!*/; I want: SET INSERT_ID=284418/*!*/;
<abyss> I have line: UPDATE codes SET code='MKGB47B7', status=1, students_licences='1', licences_used='0', unlock_date=1433421747, licence_till=1465044147, user_id='21465', school_id='14363', comment='Nsomethisdfvklas fjs kasldf jasf asid.' WHERE id='46923'
<abyss> /*!*/;
<abyss> SET INSERT_ID=283418/*!*/;
<abyss>
<abyss> SET INSERT_ID=21477/*!*/;
<abyss> INSERT INTO `user` (^M
strixd has joined #ruby
<abyss> login,^M
<abyss> password,^M
<abyss> password_salt,^M
<abyss> role_id,^M
<abyss> firstname,^M
strixd has quit [Excess Flood]
<abyss> lastname,^M
<abyss> email,^M
OrbitalKitten has joined #ruby
<abyss> processallow,^M
<flughafen> holy crap
<abyss> allow_remind_email,^M
<abyss> created,^M
<abyss> sso_id,^M
<abyss> quota,^M
<redlegion> Holy paste to channel
<abyss> trial_period_date,^M
<sevenseacat> !mute abyss
<flughafen> sevenseacat to the rescut
<redlegion> Loool
<[k-_> this will only take a moment
strixd has joined #ruby
<flughafen> rescue* .. you were so fast you wouldn't even think you wear an eye-patch
Xeago has joined #ruby
Pupeno has quit [Ping timeout: 246 seconds]
phutchins has joined #ruby
rafaelsales has joined #ruby
<[k-_> he is done now
<[k-_> he can be unmuted
Xeago has quit [Remote host closed the connection]
k3asd` has quit [Ping timeout: 276 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sevenseacat> !unmute abyss
<abyss> thank you. Sorry again for that.
hanmac1 has joined #ruby
<sevenseacat> s'ok.
sgambino has joined #ruby
<jesterfraud> ?gist
<ruboto> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<[k-_> so what is the purpose of ids_to_change_all_uniq?
<abyss> [k-_: so, there's all ids I need to change
<abyss> *there're
<[k-_> ah, so it contains all the ids you need to change
<abyss> yes
<abyss> wow, my english have to be really bad :D Sorry.
<[k-_> do you have an example of a line of yshop_14-megaslice?
hanmac1 has quit [Quit: Leaving.]
Al3ks has joined #ruby
Papierkorb has joined #ruby
luciano__ has quit [Read error: Connection reset by peer]
<flughafen> shevy: no freezing, flughafen is still no open for business
<abyss> it's bunch of sqls + SET INSERT_ID
MVPhelp_ has quit [Ping timeout: 276 seconds]
<[k-_> wait, so that is yshop_14-megaslice?
luciano__ has joined #ruby
tesuji has quit [Ping timeout: 264 seconds]
<adaedra> gigaslice
<abyss> [k-_: errr yes:)
Xeago has joined #ruby
<abyss> id_to_change_all_uniq - list of ids; dump-to-database-yshop - file where to write; yshop_14-megaslice - file I wanted to change
devdazed has quit [Quit: Computer has gone to sleep.]
renderful has joined #ruby
hanmac1 has joined #ruby
C0deMaver1ck_ is now known as C0deMaver1ck
rbennacer has quit [Remote host closed the connection]
<[k-_> your code will be horrible to maintain ;)
stardiviner has joined #ruby
DaniG2k has quit [Quit: leaving]
afrianska has quit [Ping timeout: 264 seconds]
symm- has joined #ruby
endash has quit [Quit: endash]
OrbitalKitten has joined #ruby
duoi has quit [Quit: duoi]
<abyss> [k-_: Now I need just to work this;)
duoi has joined #ruby
yoongkang has quit [Remote host closed the connection]
<[k-_> wait a moment, writing code :D
flughafen has quit [Remote host closed the connection]
OrbitalKitten has quit [Client Quit]
<adaedra> [k-_: you won an underscore?
<[k-_> yes, my client blessed me with it
yh has joined #ruby
OrbitalKitten has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
umgrosscol has joined #ruby
rafaelsales has quit [Remote host closed the connection]
rafaelsales has joined #ruby
flughafen has joined #ruby
atomical has joined #ruby
musgravejw has joined #ruby
jimms has quit []
thelastinuit has joined #ruby
Papierkorb_ has joined #ruby
Papierkorb has quit [Ping timeout: 275 seconds]
gagrio has quit [Ping timeout: 246 seconds]
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
afrianska has joined #ruby
musgravejw has quit [Ping timeout: 252 seconds]
jschoolcraft has quit [Quit: peace]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
<[k-_> does this work?
fabrice31_ has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
dANO_ has joined #ruby
malconis has joined #ruby
zeroDivisible has quit [Ping timeout: 244 seconds]
vasilakisfil has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago_ has joined #ruby
atom3 has quit [Ping timeout: 276 seconds]
atom3 has joined #ruby
griffindy has joined #ruby
<abyss> [k-_: I get: :18:in `+': can't convert Fixnum into String (TypeError)
<shevy> I just came back to see that sevenseacat has once again saved this channel
<abyss> it's def where is: id + 1000
vasilakisfil__ has quit [Ping timeout: 256 seconds]
transiency has quit [Ping timeout: 256 seconds]
<[k-_> oopw
fabrice31 has quit [Ping timeout: 246 seconds]
<sevenseacat> so here i come to save the day, a regular joe now on parade
afrianska has quit [Ping timeout: 272 seconds]
lxsameer has quit [Quit: Leaving]
<[k-_> i updated the gist
<[k-_> try that
thiagovsk has joined #ruby
<havenwood> No more rhymes now I mean it... Anybody wanna peanut?
yqt has joined #ruby
dblessing has joined #ruby
<shevy> a peanut in my hut
dorei has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-_> look shevy! i coded!
scripore has joined #ruby
<abyss> [k-_: I'm checking... It has done its job too fast;p Something is suspicious;)
arup_r has quit [Remote host closed the connection]
<adaedra> I can code too
<adaedra> puts "Hello"
<adaedra> Hop, done
<[k-_> yay adaedra can code too
<[k-_> \o/
<shevy> [k-_ yeah
<shevy> [k-_ but you did not write code for yourself
<shevy> you just help other people write code :(
whippythellama has joined #ruby
<[k-_> :(
<[k-_> i help other people write code to make myself happy
<[k-_> does that count?
<shevy> I don't know
<shevy> it seems fishy
<[k-_> i managed to get into insert mode in vim!
<[k-_> i dont know how i did it, but i did it!
sdothum has joined #ruby
Thenews has joined #ruby
zeroDivisible has joined #ruby
seansith has quit [Changing host]
seansith has joined #ruby
<abyss> [k-_: it's extremely fast in comparison to my script - your - 5sec, my: 160min ;p
e1nh4nd3r has joined #ruby
scx has quit [Ping timeout: 244 seconds]
zz_Outlastsheep is now known as Outlastsheep
<[k-_> it works?
quimrstorres has joined #ruby
<abyss> but it's doesn't work in some cases, instead of figures I get NULL
e1nh4nd3r has quit [Client Quit]
e1nh4nd3r has joined #ruby
<[k-_> do you have the line?
scx has joined #ruby
tomaz_b has quit [Ping timeout: 244 seconds]
<Thenews> www.VALBOT.com provides domain valuations. Reporting globally on Site Traffic, Pagerank, Malware, WHOIS data, SEO & even Social Media presence.
jespada has joined #ruby
kenpoint has joined #ruby
nopolitica has joined #ruby
transiency has joined #ruby
<apeiros> !kick Thenews
Thenews was kicked from #ruby by ruboto [Thenews]
<apeiros> f'ing asshole :-(
<abyss> ;)
BaconOverflow has quit [Quit: Connection closed for inactivity]
<jhass> sadly no pattern in the hostmask at all :/
<apeiros> I wish irc allowed pre-screening of messages
afrianska has joined #ruby
<[k-_> are we supposed to change INSERT_ID only?
<jhass> eh, would you really want to do that?
<abyss> [k-_: so the everything changed to NULL execpt last one where it increase right
<[k-_> apeiros, that would be moderating then
devdazed has joined #ruby
<flughafen> apeiros: make all messages go through ruboto
<jhass> apeiros: the mode would be to set +z and voice people...
<abyss> [k-_: no, each accurance of id in ids array
<jhass> aka #ruby-pro
Soda has quit [Remote host closed the connection]
khebbie has joined #ruby
nopolitica has quit [Client Quit]
<abyss> so we have to change INSERT_ID and each reference
<adaedra> !ops
atom3_ has joined #ruby
<ruboto> fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, sevenseacat, miah, workmad3, Coraline, drbrain, zenspider, slyphon, rubyhacker1, Aria, ljarvis
<adaedra> >_>
<sevenseacat> ?
<havenwood> adaedra: hey
<[k-_> abyss but you have a lot of numbers @.@
<abyss> [k-_: errr yes:)
<abyss> that why I was suprised when your script finished so fast;)
dhjondoh has quit [Quit: dhjondoh]
atom3 has quit [Ping timeout: 276 seconds]
<abyss> my scrpt lasted about 160min
<bnagy> abyss: oh, yeah it was just a bug, lookup should have been ids
<bnagy> or vice versa
<abyss> lookup = ids?
<[k-_> abyss, you should try using a diff checker with the expected result and the script's result
<bnagy> you got a local variable error right?
<abyss> yes
* flughafen is leaving work, see you guys later
Xeago_ has quit [Remote host closed the connection]
<bnagy> I did say I didn't actually run it :)
<abyss> [k-_: I did that, that why I can see it's not good:)
<abyss> bnagy: yes, and you said you're drinking beer as well:)
ziprar has joined #ruby
ziprar has joined #ruby
<Aria> Yes, adaedra?
<bnagy> it's just that I called the lookup hash ids when I set it up instead of lookup :/
<adaedra> apeiros: I think it's possible to automatically k-line on patterns
<[k-_> can i assume all ids are in the form ID=000000 or id='000000'
<adaedra> but that's server-level :/
<abyss> [k-_: nope;)
dopie has quit [Ping timeout: 248 seconds]
<adaedra> mmmmh
<adaedra> znc, what are you doing
k3asd` has joined #ruby
<abyss> [k-_: look here: https://gist.github.com/anonymous/5c7ce3143f8756271cd8 and look at that long INSERT, we can't assume that
<bnagy> [k-_: not a fan of your code
afrianska has quit [Ping timeout: 248 seconds]
adaedra has quit [Quit: ZNC - http://znc.in]
<bnagy> [k-_: not a fan of your code
<abyss> bnagy: errrr, what I should to change?;)
devdazed has quit [Quit: Bye]
<bnagy> ugh sorry client
narcan has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has joined #ruby
<[k-_> is my code horrid ;-;
revath has quit [Ping timeout: 252 seconds]
<bnagy> abyss: just make the names of the lookup hash match - either change both to lookup or both to ids
ahmetkapikiran has joined #ruby
adaedra has joined #ruby
<bnagy> [k-_: well I don't inherently mind using Set
<bnagy> but when you have to make a method call in each replace then it seems simpler and faster just to use a Hash in the first place
<adaedra> what the hell
zipace has quit [Ping timeout: 246 seconds]
<bnagy> like.. I think you fell in love with the idea of Set and then didn't reconsider
<[k-_> but hash []= is also a method call
subtwo has quit [Quit: (null)]
rbennacer has joined #ruby
imanzarrabian has joined #ruby
Xeago has joined #ruby
<[k-_> and my code only calls change_id when it is needed
<bnagy> but you have to call change_id
tedstriker has joined #ruby
rbennacer has quit [Remote host closed the connection]
<[k-_> it doesnt add +1000 to everything
tedstriker has quit [Max SendQ exceeded]
<bnagy> any time there is more than one change per line I win
<bnagy> no?
arup_r has joined #ruby
<[k-_> method calls are indeed expensive
<[k-_> I can use a lambda, yes?
tedstriker has joined #ruby
<[k-_> worst case is to inline it
<bnagy> why not just not use a set?
<bnagy> do you get paid per line of code, or what?
<abyss> [k-_: why it's so fast!;)
<adaedra> ok, sorry about earlier Aria havenwood – I was responding to Thenews message, but something in my connection delayed the message
<abyss> [k-_: hmm I still get NULL in that updates
<[k-_> if i get paid per minute i would write abyss's code immediately
devdazed has joined #ruby
<apeiros> adaedra: the problem is that those are still post-fact
rubie has quit [Ping timeout: 265 seconds]
<adaedra> apeiros: which ones?
<abyss> [k-_: ;)
<abyss> [k-_: you've said that is just fun;p
arup_r has quit [Remote host closed the connection]
<apeiros> adaedra: kline on pattern
<adaedra> Grmbl, maybe if FreeNode was not routing me through Chicago I wouldn't lag so much >_>
<Aria> Aaah!
arup_r has joined #ruby
<apeiros> [k-_, flughafen, jhass: I mean I'd want a mode where a service has to approve of messages and/or users. i.e. message gets first sent to service, service returns accept/reject, on accept, message is sent from the original sender to the channel/user
<[k-_> it shouldn't replace the numbers with null ;-;
rbennacer has joined #ruby
<adaedra> apeiros: I think I saw it work on message send – so nothing was send. But that may depend on the server.
<[k-_> i saw something like that before adaedra
<[k-_> services provided a filter list
<abyss> [k-_: it's works for you?
<[k-_> no i didnt run it
<bnagy> [k-_: your sub is wrong in the last gist I think
undeadaedra has joined #ruby
<abyss> bnagy: I've changed lookup to ids, yes?
adaedra has quit [Quit: ZNC - http://znc.in]
TvL2386 has quit [Read error: Connection reset by peer]
<bnagy> I think it has the same inside match bug mine had.. like your sub will incorrectly sub 888 inside 1888
<GreatSUN> hey
endash has joined #ruby
bnumfw has quit [Remote host closed the connection]
<bnagy> I think you need to sub it with anchors
<GreatSUN> one question about documentation (yard or general)
<bnagy> abyss: should be all you need, yeah
djellemah has joined #ruby
<GreatSUN> if you have a parameter *attrs to gather all attributes as array
<bnagy> abyss: but either of these should work for you, they're pretty close to equivalent
<GreatSUN> how would you document that? is there some standard/default for this?
<bnagy> just small bugs left to fix
<abyss> bnagy: yes, I trying all :)
<abyss> I'm
uptownhr has quit [Quit: uptownhr]
<shevy> I feel so lonely... who is writing in ruby-gnome
dg-ratio1 has quit [Remote host closed the connection]
blackmesa has joined #ruby
<[k-_> sub with anchors?
<abyss> but [k-_ is very, very fast, but change some figures into NULL instead of increasing about 1000
chinmay_dd has quit []
<[k-_> pls wait while i steal some code
dg-ratio1 has joined #ruby
<abyss> ok:)
soulcake has quit [Ping timeout: 276 seconds]
<abyss> bnagy: 13:in `[]': can't convert String into Integer (TypeError
<[k-_> done!
<[k-_> i updated the gist
quimrstorres has quit [Remote host closed the connection]
<abyss> bnagy: it's a line: if (replace = ids[id])
MatthewsFace has joined #ruby
adaedra has joined #ruby
NeverDie has joined #ruby
afrianska has joined #ruby
<[k-_> bnagy: _replace = replace[id]
MatthewsFace has quit [Remote host closed the connection]
<adaedra> Umeå – Should be better
soulcake has joined #ruby
undeadaedra has quit [Quit: .]
denver has joined #ruby
<bnagy> abyss: that doesn't make sense, gist the whole thing you're trying
soulcake has quit [Changing host]
soulcake has joined #ruby
last_staff has quit [Quit: last_staff]
bohallor has joined #ruby
<abyss> bnagy: gimme a sec please
coderhs has joined #ruby
<[k-_> bnagy, its ur code haha
<bnagy> it's not
<bnagy> because that's not my linre 13 :)
freerobby has joined #ruby
casadei has joined #ruby
<abyss> bnagy: yeah I've added #! to script;p
<[k-_> he probably added some comments i hope
<abyss> [k-_: yes
<abyss> ;)
jespada has quit [Ping timeout: 264 seconds]
ledestin has quit [Read error: Connection reset by peer]
<bnagy> oic.. when you changed it you changed lookup to ids
<bnagy> ids is an array
ta has quit [Remote host closed the connection]
<abyss> [k-_: don't be angry... But I'm using ruby 1.8, sorry;)
<bnagy> if replace = replace[id]
<adaedra> ruby 1.8
<[k-_> omy 1.8?
<bnagy> possibly a poor choice of variable name :/
afrianska has quit [Ping timeout: 246 seconds]
<adaedra> Here's your problem
hagabaka has quit [Read error: Connection reset by peer]
<[k-_> bnagy then the hash will disappear
<[k-_> which was why i suggested _replace = replace[id]
<abyss> yeah, I do everything on server, and server has old ruby
freerobby has quit [Client Quit]
<abyss> change_id-2:17: syntax error, unexpected '>'
<abyss> change_id = -> (id) { id + 1000 }
michael_mbp has quit [Excess Flood]
tlarevo_ has quit [Remote host closed the connection]
hagabaka has joined #ruby
<bnagy> abyss: honestly, you should be able to fix those kind of trivial bugs yourself :|
<[k-_> 1.8 doesnt have lambda literals ;-;
<adaedra> 1.8 has one thing: expiration.
<havenwood> adaedra: ah, thanks!
<[k-_> badumtss!
<adaedra> thanks to what?
<abyss> ;)
<[k-_> abyss: change it to change_id = lambda { |id| id + 1000 }
arup_r has quit [Remote host closed the connection]
cpruitt has joined #ruby
<havenwood> adaedra: the ping, now i'm late ;)
TinkerTyper has quit [Ping timeout: 264 seconds]
<adaedra> oh
quimrstorres has joined #ruby
<adaedra> yeah, would have been better without network issues >_>
symm- has quit [Ping timeout: 248 seconds]
<havenwood> hehe
<[k-_> do you have special late privileges by any chance ;)
musgravejw has joined #ruby
renderful has quit [Remote host closed the connection]
dross has joined #ruby
<abyss> bnagy: you want leave me alone, I fight with this for 3 days, not only with script but whole this bunch of duplications in binlogs etc - my wise and intelligence decrease to 60;)
TinkerTyper has joined #ruby
<abyss> [k-_: change_id = lambda { |id| id + 1000 } , get: undefined method `change_id' for main:Object (NoMethodError)
michael_mbp has joined #ruby
<[k-_> haish
jesterfraud is now known as noyoudont
commondream has joined #ruby
imanzarrabian has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
noyoudont is now known as jesterfraud
<[k-_> i updated the gist again
davedev24_ has joined #ruby
yoongkang has joined #ruby
coderhs has quit [Quit: Leaving]
skysploit has joined #ruby
skysploit has quit [Remote host closed the connection]
skysploit has joined #ruby
revath has joined #ruby
jerius has joined #ruby
<abyss> [k-_: I still get NULLs :(
<[k-_> do you get nulls on bnagy's?
<abyss> bnagy code doesn't work for me
<[k-_> i stole the sub code from him!
<[k-_> pls wait while i try to go interactive
skysploit has quit [Client Quit]
<bnagy> abyss: in what way? What's the error from the latest gist?
<abyss> undefined local variable or method `replace' for main:Object (NameError) - but I was afraid to show this because he would beat me that it's easy to repair
soulcake has quit [Ping timeout: 276 seconds]
dblessing has quit [Ping timeout: 244 seconds]
dross has quit [Ping timeout: 250 seconds]
<bnagy> oh, well change it in line 3 :|
enebo has joined #ruby
<bnagy> updated
lordkryss has joined #ruby
<bnagy> but seriously 0_o
<abyss> bnagy: yeah, but I'm not sure what your code do, so I'm not sure if I thought righ to change it, Why hash for example ;)
<bnagy> abyss: ok well I'm out
bogdanteleaga has quit [Ping timeout: 250 seconds]
<bnagy> it doesn't seem like you can actually code at all
<[k-_> abyss: the reason why we give you code is for you to learn from it ;-;
<bnagy> so this isn't really a programming question any more
ta has joined #ruby
<abyss> bnagy: Your patience has been exhausted by me?:(
<bnagy> abyss: yes
imanzarrabian has joined #ruby
hutch78 has joined #ruby
<shevy> lol
<bnagy> the last bug was between lines 2 and 3. If you can't figure that out for yourself then you're not programming
mister_solo has joined #ruby
<abyss> yeah, ok sorry for that, it's my bad, I spent 3 days on it (not only that script) everybody looks at me I have knife on my neck and I stopped thinking - my bad.
<bnagy> I mean I apologise for my code that I'm typing untested into gist not working perfectly
<bnagy> that bit is clearly my fault
soulcake has joined #ruby
MasterPiece has quit [Remote host closed the connection]
<abyss> [k-_: yes, I know, people from this channel help me many times and I learn a lot (not only ruby, but programming :)) it's my bad that I turn off thinking its because all that circumstances :/
podman has joined #ruby
<shevy> now you two make out and kiss and we can move on
<abyss> three of us
datanoise has joined #ruby
<shevy> wat
<shevy> that's illegal
<shevy> in some US states
<abyss> err bnagy [k-_ and me?;)
<shevy> oh dear
Al3ks has quit [Quit: Leaving]
<_mh_> abyss: Out of experience, don't let yourself being overrun by requests. Sure people want their fixes and quick, but the more stress you put on yourself, the more likely you'll be making a lot of mistakes.
mallu has joined #ruby
<abyss> _mh_: yes, sometimes live isn't so easy;)
mallu has quit [Client Quit]
<adaedra> <shevy> in some US states
soulcake has quit [Changing host]
soulcake has joined #ruby
<adaedra> since when the US law is a reference?
<shevy> since TTIP
<bnagy> since BIS! \o/
terlar has joined #ruby
msnyon has joined #ruby
<_mh_> abyss: I sure as well know. But sometimes it takes a ping to take a step back, take a deep breath and realize work's going to take the time and rushing it does more harm then good.
adamjleonard has joined #ruby
<abyss> [k-_: yes I get NULLs with bnagy code as well.
davedev2_ has joined #ruby
revath has quit [Ping timeout: 256 seconds]
<shevy> guys you are not programming
<shevy> this is programming:
<abyss> _mh_: additionally ofcourse I have other tasks on me so it double my stress;)
<abyss> shevy: ;)
Blaguvest has quit []
dopie has joined #ruby
<abyss> I've never said I'm a programmer;p
ValicekB has joined #ruby
JakFrist has joined #ruby
<[k-_> abyss, you have any versions other than 1.8?
imanzarrabian has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bnagy> abyss: I don't know what you mean by NULLs. What bug causes that? Obviously the code can't ever literally insert NULL
claw_ has quit [Remote host closed the connection]
<[k-_> i think it is caused by File#print of nils
davedev24_ has quit [Ping timeout: 248 seconds]
Al3ks has joined #ruby
<bnagy> I don't think print can do that
wildroman3 has quit [Remote host closed the connection]
<bnagy> abyss: what is that example from?
Scrofff has joined #ruby
<abyss> [k-_: I can move everything to my server, here I have ruby 2.x
fabrice31_ has quit [Remote host closed the connection]
<bnagy> is that a direct paste from file2?
dg-ratio1 has quit [Read error: Connection reset by peer]
<abyss> bnagy: the first line is the original file the second is modyfied by your script
<abyss> bnagy: yes
fabrice31 has joined #ruby
jpfuentes2 has joined #ruby
<bnagy> .. wtf
<bnagy> maybe this is some 1.8 thing I forgot
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<abyss> errr, meeting to say about my pogress... brb ;)
_ixti_ has joined #ruby
<[k-_> abyss: it works well on mine
<[k-_> i have ruby 2.2.0
Rollabunna has joined #ruby
wildroman2 has joined #ruby
<[k-_> dun dun dun
<shevy> you are the man
<shevy> >> RUBY_VERSION
<[k-_> now he went for a meeting
<ruboto> shevy # => "2.2.0" (https://eval.in/385546)
<shevy> like the bot
<[k-_> yes i am updated!
SOLDIERz has quit [Ping timeout: 246 seconds]
Scroff has quit [Ping timeout: 244 seconds]
<[k-_> i have 2.2.0p0 to be precise
livathinos has quit []
freerobby has joined #ruby
mbeasley_ has left #ruby ["WeeChat 0.4.2"]
axl__ has joined #ruby
<adaedra> we are at 2.2.2 now no?
<shevy> ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
<adaedra> I've 2.2.2p95
DoubleMalt has joined #ruby
luciano__ has quit [Ping timeout: 255 seconds]
<shevy> someone update the bot!
<[k-_> ;-;
<adaedra> yes, exactly like shevy, except the platform
ahmetkapikiran has joined #ruby
ChronosLegion has quit [Quit: All your base are belong to us]
vasilakisfil has quit [Read error: Connection reset by peer]
aganov has quit [Quit: Leaving]
<shevy> you are not on linux?
flughafe2 has joined #ruby
<adaedra> nope
<shevy> you make matz sad
<[k-_> abyss: It works well on mine, on ruby 2.2.0. Files I used are all included here: https://gist.github.com/SkyBirdSoar/6948924e4e39c9140804
<[k-_> ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
<adaedra> even if I've a linux at hand
c355E3B has joined #ruby
AvidChronos has joined #ruby
ta has quit [Ping timeout: 246 seconds]
<adaedra> I may have had one if I has found my USB stick
<adaedra> Have you seen it?
<shevy> no
allomov has quit [Remote host closed the connection]
vasilakisfil has joined #ruby
<[k-_> i really dont have any patience for finding things
GitGud has joined #ruby
<shevy> find what?
yardenbar has quit [Quit: Leaving]
<shevy> you mean reallife objects?
<shevy> or documentation :)
<adaedra> google.tld is here for documentation
sandstro_ has quit [Quit: My computer has gone to sleep.]
<adaedra> guess I need a google.irl
downwithbender has joined #ruby
<[k-_> real life objects
downwithbender has quit [Max SendQ exceeded]
mary5030 has joined #ruby
bogdanteleaga has joined #ruby
downwithbender has joined #ruby
hoov has quit [Ping timeout: 256 seconds]
micmus has quit [Ping timeout: 265 seconds]
soulcake has quit [Ping timeout: 277 seconds]
droidburgundy has quit [Read error: Connection reset by peer]
<bohallor> does the ruby interpreter v. 2.2 every use threads when a programmer does *not* use the ruby Thread class?
<bohallor> *ever use sorry
droidburgundy has joined #ruby
<bougyman> no
<bougyman> i mean, a lib you require could be doing it without your knowledge, I guess.
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-_> doesnt io spawn threads
JoshL has joined #ruby
Scroff has joined #ruby
Synthead has quit [Quit: Leaving]
mhi^ has joined #ruby
revath has joined #ruby
downwithbender has quit [Client Quit]
Synthead has joined #ruby
<_mh_> If I remember correctly the main context is handled as a thread and, as [k-_ mentioned, IO likely is using threads as well.
Kricir has joined #ruby
rubie has joined #ruby
_ixti_ has quit [Ping timeout: 276 seconds]
<[k-_> >> Threads.current
<ruboto> [k-_ # => uninitialized constant Threads (NameError) ...check link for more (https://eval.in/385550)
<[k-_> >> Thread.current
<ruboto> [k-_ # => #<Thread:0x41bf5a54 run> (https://eval.in/385551)
Al3ks has quit [Remote host closed the connection]
<[k-_> ^ there
_ixti_ has joined #ruby
soulcake has joined #ruby
<bnagy> uh
<bnagy> well there has to be at least one thread
jespada has joined #ruby
<[k-_> his question was *ever* :3
soulcake has quit [Changing host]
soulcake has joined #ruby
<bnagy> I didn't know IO would create more though, I thought all that stuff just blocked the main thread
<[k-_> no, no, no
<[k-_> ruby is smart enough to have async io :D
<bnagy> no it's not
Scrofff has quit [Ping timeout: 264 seconds]
<[k-_> or non-blocking io
<[k-_> whatever the correct term is
<bnagy> also false premise
<adaedra> when was the syntax for named arguments introduced?
<[k-_> 2.0 i think
<[k-_> or 2.1
<_mh_> 2.1, I believe
<jhass> 2.0 for optional, 2.1 for required ones iirc
Xeago has quit [Remote host closed the connection]
<adaedra> oh
<adaedra> ok
kobain has joined #ruby
Pupeno has joined #ruby
<dudedudeman> 'marnin to you all
mikecmpb_ has joined #ruby
l0oky has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
<bohallor> thanks guys. so only multi-threaded during IO. and the main thread waits or tries to continue? eg loading a Ruby script with ./ruby helloworld.rb or require etc.
kahuna_ has joined #ruby
<l0oky> unless keyword in ruby is so confusing
<[k-_> yes l0oky, we all agree :)
<havenwood> l0oky: It's like unless in real life.
<l0oky> can someone enlighten me hehe
<havenwood> l0oky: this unless that
<adaedra> [k-_: no I don't
hanmac1 has quit [Quit: Leaving.]
<l0oky> unless i don't have 'this'
scripore has quit [Quit: This computer has gone to sleep]
<l0oky> haha
revath has quit [Ping timeout: 246 seconds]
<_mh_> bohallor: Your question is about 'default' parallel execution of code?
mary5030 has quit [Remote host closed the connection]
<[k-_> adaedra has acheived nirvana!
<l0oky> -.-'
PapaSierra has joined #ruby
<bnagy> bohallor: not even multi-threaded during io
<bohallor> yes. default unmodified ruby 2.2, but just running (what appears to be) sequential ruby code.
mary5030 has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Ping timeout: 246 seconds]
<l0oky> unless current_user.activated? doesn't contain 'this'
scripore has joined #ruby
<_mh_> bohallor: Top down, no hidden paralell executions
<bnagy> l0oky: "if not"
<[k-_> just use if not
<bnagy> nono use unless
<l0oky> yeah but rubymine is being such a jerk
<bohallor> _mh_: that's what i was hoping for
<bnagy> but the semantic meaning is "if not"
<[k-_> nono if not is less confusing
<bnagy> false
<l0oky> highlighting that statement in yellow :S
<[k-_> true
<PapaSierra> hi. i'm learning about mixins. if i use an analogy from js, if i already have a class i could add a method to it. i understand how to do this: obj.extend(SomeMixin), but that adds the mixin to an instance. how would i add it to the *class* so all instances have the mixin?
<bnagy> [k-_: not and ! have different precedence :(
<bnagy> like and and &&
micmus has joined #ruby
ndrei has joined #ruby
Xeago has joined #ruby
<adaedra> l0oky: put your mouse over the keyword, it should tells you what's wrong
<bnagy> in general, best to just use unless
IrishGringo has joined #ruby
scripore has quit [Client Quit]
<jhass> PapaSierra: by calling include on the class
<jhass> PapaSierra: class Foo; include SomeMixin; end; typically
dg-ratio1 has joined #ruby
<jhass> and that's actually the common case over extend
<adaedra> l0oky: iirc, it doesn't like unless if it has a else with it, it would want you to revert the cases and use if
<l0oky> Control flow statement with negative condition less...
<[k-_> I know they do
<[k-_> .-----.
aphprentice has joined #ruby
<l0oky> whatever that means hahaha
Outlastsheep is now known as zz_Outlastsheep
<[k-_> i would kill someone if they use multiple unless
<[k-_> and unless not
<adaedra> "unless not"
<adaedra> ahah
<l0oky> hahhahahahaha
sevenseacat has quit [Quit: Me dun like you no more.]
* l0oky *derp*
<PapaSierra> jhass: that presumes my code declared class Foo. what if Foo is declared in a gem that i'm using and i simply want to add extra behaviour after the fact?
kirun has joined #ruby
jenrzzz has joined #ruby
<jhass> [k-_: l0oky worth pointing out that unless and if not are not equivalent, if not/ if ! call the ! method, unless doesn't
<shevy> PapaSierra ruby is open at run-time to modifications
scripore has joined #ruby
<l0oky> right..
<[k-_> then how does it work?!
<[k-_> i thought it was just syntactic sugar
railsraider_ has joined #ruby
<bohallor> _mh_: that's what i was hoping for
<jhass> PapaSierra: you could just reopen the class, though you're properly better off writing a decorator, OO design wise speaking
roa has quit [Ping timeout: 272 seconds]
<jhass> *probably
dross has joined #ruby
<PapaSierra> jhass: right
sandstrom has joined #ruby
<[k-_> >> module A;def hi;end;end; class B;end; a = B.new; B.include(A); a.hi
<ruboto> [k-_ # => nil (https://eval.in/385564)
<[k-_> yay it works!
<[k-_> yes you can just call include outside the class
<jhass> mmh, right it's no longer private
<jhass> 20>> Object.include(Kernel)
<ruboto> jhass # => private method `include' called for Object:Class (NoMethodError) ...check link for more (https://eval.in/385565)
<jhass> 21>> Object.include(Kernel)
<adaedra> [k-_: it surely enters if value is 0 or nil, as oppsed to if.
<ruboto> jhass # => Object (https://eval.in/385566)
ndrei has quit [Ping timeout: 244 seconds]
andikr has quit [Remote host closed the connection]
<bnagy> whoa
railsraider has quit [Ping timeout: 264 seconds]
railsraider_ is now known as railsraider
roa has joined #ruby
railsraider has quit [Client Quit]
<bnagy> I guess that makes sense
<[k-_> i cant think in unless logic
<jhass> [k-_: try to read it like english, don't think about the negation
<bnagy> [k-_: it's much easier in postfix statements
<[k-_> 20>> Object.__send__(:include, Kernel)
<ruboto> [k-_ # => Object (https://eval.in/385567)
<[k-_> or you can use that hack ^
<jhass> eh, no need for __send__, send is available there
<[k-_> we need to be safe jhass
subtwo has joined #ruby
troulouliou_dev has joined #ruby
<havenwood> [k-_: #public_send
<jhass> I'd actually want to fail my code there if somebody removed send from Class
<[k-_> public_send doesnt work
<[k-_> its private
<havenwood> >> Object.public_send :include
<ruboto> havenwood # => Object (https://eval.in/385568)
<[k-_> havenwood: 2.0
<havenwood> [k-_: Maintenance mode, live in the now!
uptownhr has joined #ruby
<[k-_> yes, i am on a fairly recent release
lalalaaa has joined #ruby
<lalalaaa> Hi! Is anybody aware of a Ruby alternative to Majordomo for running small mailinglists?
marr has joined #ruby
<wmoxam> why Ruby? :p
ta has joined #ruby
uber has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Read error: Connection reset by peer]
<Aria> Geez. I wrote something like that a long time ago but I'm struggling to remember what I called it and where I stowed the source.
<jhass> lol
<lalalaaa> wmoxam: im just biased i guess lol
<Aria> I was using gurgitate-mail at one point and some stuff plugged into it.
blackmes1 has joined #ruby
<lalalaaa> Aria: oh hey!
droidburgundy has quit []
<lalalaaa> do let me know if you remember
revath has joined #ruby
yh has quit [Ping timeout: 255 seconds]
<jhass> I heard discourse is the new fancy way to run a mailing list :P
yh has joined #ruby
dg-ratio1 has quit [Ping timeout: 256 seconds]
rubie has joined #ruby
<Aria> I'll try.
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<lalalaaa> oh man, pls no more discourse =)
codecop has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
anisha has quit [Quit: Leaving]
sinkensabe has quit [Remote host closed the connection]
Jackneill has quit [Remote host closed the connection]
<lalalaaa> cant even get discourse to send emails to localhost. nobody will help me because i dont run it inside linux/docker
ahmetkapikiran has quit [Quit: ahmetkapikiran]
endash has quit [Quit: endash]
afrianska has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<lalalaaa> the guys in #openbsd seem to recommend http://www.gnu.org/software/mailman/ i think ill try that out
<ddv> lalalaaa: pebcak
pik_ has joined #ruby
<adaedra> #openbsd which recommend something in gnu.org?
<[k-_> now, now, they arent biased beasts
Xeago has quit [Remote host closed the connection]
p1k has quit [Ping timeout: 276 seconds]
<jhass> adaedra: if you ever setup a mailman you'll know why :P
kwd has quit [Quit: kwd]
dfockler has joined #ruby
snockerton has joined #ruby
Jackneill has joined #ruby
<adaedra> [k-_: I thought BSD guys disliked the GPL.
CloCkWeRX has quit [Quit: Leaving.]
<[k-_> they do
scripore has quit [Quit: This computer has gone to sleep]
<adaedra> jhass: Doesn't seems to be the case before long.
bluish has joined #ruby
<jhass> be glad
wookiehangover has quit [Ping timeout: 252 seconds]
<adaedra> you say that because it's difficult to do?
<jhass> well, it's fairly easy actually. If you start with a blank postfix and don't intend to use it for anything besides
pik_ has quit [Client Quit]
phat4life has quit [Ping timeout: 248 seconds]
unshadow has quit [Ping timeout: 250 seconds]
afrianska has quit [Ping timeout: 264 seconds]
phat4life has joined #ruby
jenrzzz has joined #ruby
gambl0re has joined #ruby
<adaedra> I see
Soda has joined #ruby
<lalalaaa> ddv: dunno, email delivery via localhost works fine for normal rails apps but discourse has been abstracted to the point where it no longer resembles a rails app
Xeago has joined #ruby
zeroDi has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
<adaedra> it ressembles a road app
atom3_ has quit [Ping timeout: 276 seconds]
<lalalaaa> but thats just my opinion. it works great for people who're not familiar with rails and who want a 1-click install via docker
* adaedra --> []
baweaver has joined #ruby
axilla has joined #ruby
<[k-_> wut
atom3 has joined #ruby
<[k-_> i hope your meds wear off soon
uber_ has joined #ruby
<adaedra> ?
wookiehangover has joined #ruby
ccooke has quit [Ping timeout: 256 seconds]
yoongkang has quit [Remote host closed the connection]
tvw has quit [Read error: Connection reset by peer]
zeroDivisible has quit [Ping timeout: 256 seconds]
tvw has joined #ruby
<[k-_> you arent taking meds?
ccooke has joined #ruby
imanzarrabian has joined #ruby
tjbiddle has joined #ruby
<adaedra> no
<jhass> just bacon
<jhass> chunky bacon
<adaedra> :D
chinmay_dd has joined #ruby
ta has quit [Read error: Connection reset by peer]
<Aria> [k-_: not appropriate.
diegoviola has quit [Ping timeout: 244 seconds]
<[k-_> it must be apeiros who is/was taking meds then
* lalalaaa <3 http://ariaengine.com =)
atom3 has quit [Ping timeout: 276 seconds]
* Aria raises her eyebrows at [k-_
atom3 has joined #ruby
<apeiros> yepp
<[k-_> ^
<apeiros> but that you confuse me and adaedra - shame on you
<Takumo> What's the simplist way to perform some sort of 'transformation' to all the keys of a hash
timonv has quit [Quit: WeeChat 1.2]
<Takumo> i.e. hash.keys.each { |key| key = key + '2' } type thing
<adaedra> Takumo: ActiveRecord/Facets have that, if you have it
<[k-_> im relatively new!
theRoUS` has quit [Changing host]
theRoUS` has joined #ruby
<bnagy> Takumo: create a new hash
<jhass> .map { }.to_h
<[k-_> use the Hash[]?
<jhass> Hash[] is so 1.9
<havenwood> >> {aim: true, weekend: false}.map { |k, v| [k.to_s, v] }.to_h
<ruboto> havenwood # => {"aim"=>true, "weekend"=>false} (https://eval.in/385613)
<havenwood> Takumo: ^
afrianska has joined #ruby
<Takumo> kadoppe: so I'd need to just replace k.to_s with k+'2' :)
icebourg has joined #ruby
<[k-_> you should abstract it to have a HashKeyUpdaterFactory
timonv_ has joined #ruby
bkxd has quit [Ping timeout: 246 seconds]
<bnagy> >:(
imanzarrabian has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-_> :)
<Takumo> [k-_: ThisIsNotJ2EError
* jhass hands [k-_ some chunky bacon
<bnagy> JUST CREATE A NEW HASH IT IS NOT THAT HARD
renderful has joined #ruby
theRoUS` is now known as theROUS
* jhass hands bnagy some chunky bacon, too
shakes has joined #ruby
<bnagy> effing hipsters
<[k-_> this is not fox bacon right
<adaedra> there, there.
ahmadsoe has joined #ruby
<DefV_> This solution needs more threads!
DefV_ is now known as DefV
lalalaaa has quit [Quit: leaving]
<[k-_> no, threads are too heavy
<adaedra> -_-
<[k-_> we should use fibers!
n008f4g_ has joined #ruby
<havenwood> [k-_: At the same time that factory work exhausts the nervous system to the uttermost, it does away with the many-sided play of the muscles, and confiscates every atom of freedom, both in bodily and intellectual activity.
<bnagy> somewhere along the line there was this new movement where it became illegal to hit the enter key
<Takumo> bnagy: yeah, this DB just has some crap like "userinfofield1" "userinfofield2" "userinfofield3" etc :(
<DefV> We need a forking model so we can use all our cores
devdazed_ has joined #ruby
<shevy> how do you guys keep track of news in ruby?
imanzarrabian has joined #ruby
<bnagy> new = {}; old.each {|k,v| #do stuff
<DefV> shevy: twitter
<[k-_> r/ruby?
<[k-_> r/programming?
<apeiros> shevy: twitter/ruby-flow
<shevy> aha ok
<apeiros> shevy: also see ruby-community.com for links ;-)
<havenwood> shevy: Read the commits. ;)
<apeiros> suggestions welcome
<shevy> ahhh now I see... on https://twitter.com/rubyinside I just saw a link to some matz talk or something
<[k-_> apeiros: is it supposed to redirect to irc rules permanently?
<havenwood> shevy: You can follow RubyGems on twitter to see every gem release as they're released.
<shevy> less than 2 weeks old
<havenwood> shevy: He talks about the possibility of merging Streem into Ruby 3.
<shevy> havenwood yeah don't flood me with too much! my brain is still stuck at DefV mention...
ta has joined #ruby
<shevy> my brain is linear, I need to work down that list slowly step by step
<Takumo> shevy: or you can use Gemnasium and get regular updates about your projects dependencies
Channel6 has joined #ruby
devdazed has quit [Ping timeout: 265 seconds]
<havenwood> >> 0123
<ruboto> havenwood # => 83 (https://eval.in/385615)
chridal_ is now known as chridal
<[k-_> :O
<[k-_> >> 00001
<ruboto> [k-_ # => 1 (https://eval.in/385616)
GnuYawk has joined #ruby
dg-ratio1 has joined #ruby
<adaedra> what's so surprising, [k-_ ?
rippa has joined #ruby
terlar has quit [Ping timeout: 264 seconds]
railsraider has joined #ruby
<jhass> >> 0o0
<ruboto> jhass # => 0 (https://eval.in/385617)
<havenwood> >> 0x0
<ruboto> havenwood # => 0 (https://eval.in/385618)
lrocksmashtime has joined #ruby
<havenwood> >> 0b0
<GarethAdams> >> 0b0
<ruboto> havenwood # => 0 (https://eval.in/385619)
<ruboto> GarethAdams # => 0 (https://eval.in/385620)
<GarethAdams> hah
<havenwood> jinx
<lrocksmashtime> anyone here happen to be using the Geocoder gem with yandex and having issues?
<jhass> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
scripore has joined #ruby
jcromartie has joined #ruby
cndiv has joined #ruby
cndiv has joined #ruby
terlar has joined #ruby
<shevy> probably nobody uses that
timonv_ has quit [Remote host closed the connection]
<jhass> I still wonder how nobody finds time for all the stuff they do :/
<apeiros> [k-_: until we have a proper start page, yes
treehug88 has joined #ruby
Papierkorb_ is now known as Papierkorb
<jhass> [k-_: read: until you contribute a proper start page
<shevy> by the way, would you guys recommend rubocop?
djbkd has joined #ruby
<apeiros> [k-_: what jhass said :D£
<jhass> shevy: if you want to take the time and configure it to a sane style, es
<jhass> *yes
<apeiros> -£
<adaedra> what's this strange symbol
<apeiros> you haven't been to england?
djbkd has quit [Remote host closed the connection]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra> when I was young
djbkd has joined #ruby
MatthewsFace has joined #ruby
<adaedra> Oh, but I have it on my keyboard!
<Takumo> jhass: what's wrong with Rubocop's style?
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> :<
<jhass> too slow :P
<[k-_> jhass such skill, did it in 1 line too
<apeiros> I'm handicapped, ok?!? >:-(
<[k-_> hehehehe
<adaedra> poor apeiros
claw has joined #ruby
claw has quit [Client Quit]
claw has joined #ruby
Rickmasta has joined #ruby
nofxxx has joined #ruby
<[k-_> do we actually use ?ugt
hectortrope has quit [Quit: WeeChat 0.4.2]
<jhass> why not?
diegoviola has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
afrianska has quit [Ping timeout: 276 seconds]
yoongkang has joined #ruby
<[k-_> There is this help page for support channels which is pretty good http://wiki.mc-ess.net/wiki/Help
terlar has quit [Ping timeout: 244 seconds]
Xeago has quit [Remote host closed the connection]
MatthewsFace has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
<white_bear_> is there a canonical way to execute cygwin commands in ruby?
subtwo has quit [Quit: (null)]
alphaatom|pc has joined #ruby
baweaver has quit [Remote host closed the connection]
<Senjai> Good morning ruby
<adaedra> "Cygwin commands"
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<adaedra> like any other binary
<Senjai> ^
<adaedra> Hi Senjai
PapaSierra has quit []
timonv_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
slash_nick has joined #ruby
slash_nick has joined #ruby
gagrio has joined #ruby
<[k-_> there is a lot of non-related stuff, but there are a few nice err things: http://sbnc.khobbits.co.uk/setcmd/commands/%23essentials
ebarrett_ is now known as ebarrett
afrianska has joined #ruby
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
timonv has joined #ruby
<[k-_> minecraft help channels usually face a lot of ... idi-
sinkensabe has joined #ruby
acke has quit [Remote host closed the connection]
baweaver has joined #ruby
symbol has joined #ruby
symbol has quit [Client Quit]
jpfuentes2 has joined #ruby
shakes has quit [Quit: Leaving]
<shevy> guys
<shevy> matz has rediscovered duck typing:
Rollabunna has quit [Remote host closed the connection]
<adaedra> \_o<
<[k-_> is reddot conference in singapore?
<[k-_> adaedra: nice duck...
baweaver has quit [Remote host closed the connection]
<adaedra> \_o< -( Thanks!
ndrei has joined #ruby
lotherk_ has quit [Ping timeout: 256 seconds]
hectortrope has joined #ruby
last_staff has joined #ruby
white_bear_ has quit [Quit: leaving]
<[k-_> frankly, i dont have half of any idea of what #haskell is talking about 100% of the time
<ponga> hi
<[k-_> hi
skade has joined #ruby
<ponga> shevy: where's that photo from
<adaedra> [k-_: haskell.
sinkensabe has quit [Remote host closed the connection]
<shevy> ponga I am watching matz talk on https://www.youtube.com/watch?v=bqWBB8-iEac - is your english better than this english by the way? :D
<[k-_> adaedra: well done!
<shevy> he spoke about fu-ma-ji-me
<adaedra> Thanks, thanks.
<shevy> lazy person
eggoez has quit [Ping timeout: 272 seconds]
musgravejw has quit [Quit: Leaving]
<ponga> lol shevy
<[k-_> fu-ma-ji-me?
<ponga> plz
njs126 has joined #ruby
argoneus has quit [Quit: leaving]
lurkmaster has joined #ruby
<shevy> [k-_ yeah... and majime means diligent hard-working person
<shevy> they kinda negate the word with just a leading fu- syllable
jcromartie has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-_> o_O
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ponga> fumajime is not diligent
<michael_mbp> guys QQ
devdazed_ has quit [Quit: Computer has gone to sleep.]
<[k-_> yesh?
<michael_mbp> when an instance has #[] as an instance method
<michael_mbp> how come one can call instance[...]
<michael_mbp> rather than instance.[..]
<jhass> because ruby magic
atom3 has quit [Ping timeout: 276 seconds]
<[k-_> syntactic sugar
<jhass> it's simply a syntax rule, ruby rewrites it for you
devdazed has joined #ruby
bluish has quit [Quit: bluish]
<jhass> like foo += 1 is foo = foo + 1
<michael_mbp> ah...
<[k-_> also it should be instance.[] (...)
<michael_mbp> and that applies to [] specifically
<michael_mbp> ah [k-_ !!!
eggoez has joined #ruby
<jhass> or a.b = c is a.b=(c)
<[k-_> i once tried to monkey patch Proc
<[k-_> instead of Proc.call, i did Proc.()
<adaedra> It didn't end well?
<jhass> or a.(b) is a.call(b)
<michael_mbp> def [](name)
<michael_mbp> I see.
atom3 has joined #ruby
<bnagy> michael_mbp: most of the operators are actually methods
dg-ratio1 has quit [Read error: Connection reset by peer]
<[k-_> i tried to do Proc() too, but that didnt work
mister_s_ has joined #ruby
<[k-_> Apparently scala can do that?
<michael_mbp> interesting
<michael_mbp> is there a list of where it does all this?
<michael_mbp> or is this all done in C?
episage has joined #ruby
<jhass> parse.y magic afaik
<jhass> you don't want to look at parse.y
<episage> Hi Folks!
<michael_mbp> heh... :)
yoongkang has quit [Remote host closed the connection]
<episage> Do you know how to implement a working loop do .. queue.pop end daemon queue?
<episage> i get `pop': No live threads left. Deadlock
<Senjai> [k-_: You tried.. to monkey patch Proc?
<jhass> episage: looks like you didn't spawn a thread that could fill the Queue
<[k-_> or lambda ?.?
<[k-_> i dont remember
<episage> jhass: i remember u
<episage> jhass: :D
revath has quit [Ping timeout: 246 seconds]
<[k-_> but proc { 'hello' }.() works now
<bnagy> >> class Fixnum; def + (other); self - other; end; end; 2+1
<ruboto> bnagy # => 1 (https://eval.in/385627)
<[k-_> >> proc { 'hello' }.() works now
<ruboto> [k-_ # => /tmp/execpad-9fb50764b50d/source-9fb50764b50d:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/385628)
hutch78 has quit [Quit: hutch78]
davedev24_ has joined #ruby
<[k-_> it works in my irb ;-;
<adaedra> >> proc { 'hello' }.() # works now
davedev2_ has quit [Ping timeout: 248 seconds]
mister_solo has quit [Ping timeout: 248 seconds]
<ruboto> adaedra # => "hello" (https://eval.in/385629)
<adaedra> :o)
<episage> jhass: i want to work on the main thread, is it possible?
<episage> jhass: so the app blocks forever
<[k-_> >> proc { 'hello' }.()
<ruboto> [k-_ # => "hello" (https://eval.in/385630)
<bnagy> episage: no, Queue#pop blocks
<[k-_> ahhh
<[k-_> heh
<jhass> episage: so you want to quit the loop if the Queue is empty?
<adaedra> If you put comments in comments, it works better, [k-_
<episage> jhass: no, i want it to be still running, waiting for the next push
<jhass> episage: who's pushing if you have only one thread?
<[k-_> adaedra: i just replaced but with >> T^T
last_staff has quit [Ping timeout: 244 seconds]
<adaedra> :v
strixd has quit [Quit: 500]
ivanskie has joined #ruby
<[k-_> 20>> proc { 'hello' }.()
<ruboto> [k-_ # => "hello" (https://eval.in/385638)
<[k-_> 19>> proc { 'hello' }.()
<ruboto> [k-_ # => "hello" (https://eval.in/385639)
gagrio has quit [Ping timeout: 275 seconds]
<[k-_> hmm
<ivanskie> hey guys.
<[k-_> it worked the whole time?
beneggett has joined #ruby
<adaedra> 18>> proc { 'hello' }.()
<ruboto> adaedra # => /tmp/execpad-9a6cd3110dcd/source-9a6cd3110dcd:2: syntax error, unexpected '(' ...check link for more (https://eval.in/385640)
<[k-_> i didnt use 18
<adaedra> well
edwinvd__ has quit []
<adaedra> hi ivanskie
<ivanskie> I'm trying to find the right tool. not sure if i should do a single page (single file too) html/javascript or.. make a ruby script...
revath has joined #ruby
<ponga> damn it i can't understand duck typing concept
<[k-_> i must have created my own class then
Alayde_ has joined #ruby
<ivanskie> I have csv file being generated everyday. one csv per day.
timonv has quit [Ping timeout: 276 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
<ivanskie> I need to read csv file, and show a count of different items... per day..
dANO_ has quit []
bronson has joined #ruby
<[k-_> ivanskie: is this frontend or backend
NeverDie has joined #ruby
<episage> jhass: spot on :D, i am pushing before i call run
<jhass> "show", elaborate on that
<ivanskie> front.. its not to be a hosted app.. customer wants to have something she can run/open... and view it.
<jhass> episage: but if it's run empty, who's pushing new items then?
<michael_mbp> thanks jhass and [k-_
<michael_mbp> I'd completely forgotten about parse.y
<[k-_> yw
msgodf has quit [Ping timeout: 272 seconds]
<[k-_> well you should use javascript then or opal2js
fantazo has quit [Ping timeout: 265 seconds]
<ivanskie> basically.. got a printer applicator machine.. every time it prints a label.. it prints a diff label for diff product.. and software writes back into csv file of the productID.. so i want to go back into that CSV file, and count number of these different productIDs to show her a count per day.. but the csv file is different each day..
<michael_mbp> I do a fair bit of ecma, but not dived that much under the covers. I want to.
<ivanskie> with a date written in filename
caseypatrickdris has joined #ruby
<michael_mbp> done backbone, some ES6, node.
Rollabunna has joined #ruby
<ivanskie> and i'm not sure if i want to do this in Ruby.. and then instal ruby on her laptop.. or do it in JS
<jhass> ivanskie: do you know how to do it in either?
husanu1 has joined #ruby
<michael_mbp> ivanskie: name the file with a certain pattern
<michael_mbp> like products_<date>
yh has quit [Ping timeout: 246 seconds]
<ivanskie> ruby.. i have idea.. i know more ruby than i know JS.. and in JS i was thinking of maybe doing emberjs or angular single page thing.. in one file.. so she'd just open it and it'd show her
k3asd`_ has joined #ruby
<michael_mbp> where date is in an isoformat
lotherk has joined #ruby
<ivanskie> hm.. its in 62215 right now
<michael_mbp> you can then regexp the date
JEG2 has joined #ruby
<michael_mbp> FileUtils will help you some
<episage> jhass: i should spawn separate thread to manage it
davedev2_ has joined #ruby
<ivanskie> hm
<jhass> episage: sounds about right, google producer/consumer pattern
sandstrom has joined #ruby
<[k-_> ivanskie, check out opal
<episage> ok
<ivanskie> ooh
husanu1 has quit [Remote host closed the connection]
ivanskie is now known as ivanskie_away
<ponga> shevy: what is a well known language that does not support duck typing?
Senjai has quit [Changing host]
Senjai has joined #ruby
husanu has joined #ruby
<ponga> i always thought it as a natural stuff, i can't imagine something without it
<jhass> ponga: basically anything statically typed - Crystal ;P
Lucky_ has joined #ruby
yh has joined #ruby
<shevy> ponga possibly the language nim
<jhass> C, C++, Java,
<bnagy> uh
<bnagy> C possibly bad example ;)
<michael_mbp> File.exists?("products_#{Time.current.strftime('%d%m%y')}")
<michael_mbp> ivanskie_away: ^^
<shevy> proc yes(question: string): bool = echo(question, " (y/n)")
<michael_mbp> something like that.
<shevy> proc sumTillNegative(x: varargs[int]): int =
k3asd` has quit [Ping timeout: 252 seconds]
<bnagy> "cast typing" - "We'll MAKE you a duck!"
<shevy> and the last one... proc myWriteln(f: File, a: varargs[string]) =
acke has joined #ruby
<shevy> bnagy they make meat out of a duck in a factory!
<[k-_> abyss is having a really long meeting
davedev24_ has quit [Ping timeout: 248 seconds]
enebo has quit [Quit: enebo]
<ponga> i can't understand it... isn't it just different objects having different methods and a programmer's job to handle them?
k3asd`_ has quit [Ping timeout: 276 seconds]
k3asd` has joined #ruby
<bnagy> ponga: "objects" and "methods" are already making assumptions
shinnya has joined #ruby
<Senjai> I'm putting rails on notice
<ponga> bnagy: i know i am but i don't have good prerequisite knowledges to explain it well
endash has joined #ruby
IrishGringo has quit [Ping timeout: 248 seconds]
<bnagy> ponga: there are plenty of languages that don't have wither
<bnagy> *either
<jhass> foo.to_s.upcase # duck typing; if foo.is_a?(String); foo.upcase; elsif foo.is_a?(Symbol); foo.to_s.upcase; else raise ArgumentError, "pass something I can handle!"; end # no duck typing
<[k-_> i am proud to present: https://eval.in/385646
hoelzro_ is now known as hoelzro
<ponga> ok i get it now
skade has quit [Quit: Computer has gone to sleep.]
rbennacer has quit [Remote host closed the connection]
<ponga> bnagy: " For example, in a non-duck-typed language, one would create a function that requires that the object passed into it be of type Duck, " this line helped me to grasp it
* [k-_ checks if f.oo website exists
momomomomo has joined #ruby
Iarfen has joined #ruby
<Iarfen> Hi!!
<[k-_> hi!
spider-mario has joined #ruby
<shevy> ponga what I don't understand is
<bnagy> ponga: that's kind of wrong imho :/
<shevy> duck typing relies on .respond_to? right?
<ponga> shevy: when do you think matz will speak english comfortably?
<Iarfen> I wanted to ask: is Ruby a good programming language to make videogames? Comparing against c++ and objective-c?
<shevy> in LPC, non-existing methods return 0
enebo has joined #ruby
<shevy> ponga he is 50 now, perhaps when he is 99
<bnagy> ponga: for example you can write ruby duckishly or non-duckishly
<jhass> Iarfen: depends on the type of the game, but tbh. probably not
<_blizzy_> is there a way to run multiple class instances at the same time without them colliding?
<ivanskie_away> back
<jhass> Iarfen: the ecosystem isn't too strong there
<_blizzy_> they can be started whenever I use a command, let's say, !foo
<bnagy> so it's not a langauge thing, it's a programming approach
<ivanskie_away> how do i undo the away thing
ivanskie_away is now known as ivanskie
<[k-_> >> Array my_a = []
<ruboto> [k-_ # => [] (https://eval.in/385649)
<[k-_> ^ shevy
<ivanskie> oh nmv
<[k-_> that is duck typing
<jhass> [k-_: stop trolling
<_blizzy_> so !foo, would start 1, !foo would start a second one, but 1 and 2 wouldn't interfere with each other.
j416 has joined #ruby
<ponga> shevy: maybe he's not willing or trying hard
blackmes1 has quit [Ping timeout: 255 seconds]
<jhass> _blizzy_: if you have proper encapsulation (= no shared state) that should just work
<_blizzy_> jhass, the instances are anonymous
<ponga> ability to code overlaps a lot with ability of language accquisition
<ivanskie> if I make a visual page.. im thinking of listing all csv files, then when she clicks on each one it shows the counts on the right kinda thing hmm. you'd think it makes mose sence to write it as an excel macro. but i haven't touched VB in yeeears
<jhass> _blizzy_: not relevant
<[k-_> is that not duck typing?
<[k-_> how does that work then?
<jhass> [k-_: can't tell if you're serious...
<ponga> oh thank you bnagy "so it's not a langauge thing, it's a programming approach" your line really solved the last puzzle piece inside my head
<ponga> thanks
* [k-_ goes research on the subject
deric_skibotn has joined #ruby
<jhass> [k-_: Kernel.Array(my_a=[])
<jhass> that's what you're doing there
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_blizzy_> jhass, so this https://gist.github.com/NotBlizzard/45990af8297c3868827e, if called twice, would start two separate Foo instances, and they wouldn't interfere with each other, and both would both be running until they finish.
dross has quit [Ping timeout: 272 seconds]
<[k-_> oh!
sarkyniin has joined #ruby
<[k-_> @.@
<jhass> _blizzy_: in your example there's no concurrency so they wouldn't start in parallel or even run concurrently
<Iarfen> jhass, why not? because of performance issues respecto to c++ or because of other reasons? I prefer ruby as a programming language, it has more flexibility than c++
<_blizzy_> jhass, I mean like, I call !foo once, and it starts to run
<_blizzy_> you call !foo 5 minutes later, and a second instances runs
IrishGringo has joined #ruby
<_blizzy_> my instance is still running
<_blizzy_> while yours is now running
<jhass> Iarfen: you can bypass the performance issues with bindings to native libraries, I rather mean lack thereof & frameworks on top
<bnagy> Iarfen: you can do anything in anything
<_blizzy_> I'm using EventMachine if that helps. c:
<Iarfen> jhass, I wanted to do my own framework, frameworks are not an issue :D
<bnagy> notch made 2 billion bucks out of java
<[k-_> you shouldn't really write games in ruby...
<jhass> Iarfen: if all you want is some SDL/2D side scroller type of thing you should be fine with the SDL bindings or something like Gosu though
<_blizzy_> if you're making a game make it in C# or Java, or C++.
momomomomo has quit [Quit: momomomomo]
<[k-_> it becomes hell to maintain ruby when the code base gets huge
<Iarfen> jhass, I want to do an MMORPG, ruby is not the option then? I really prefer it
<bnagy> smelling trolling
<_blizzy_> Iarfen, i'm not jhass, but making a MMORPG in ruby is possible
<jhass> _blizzy_: not me, never used eventmachine yet, thus not familiar with its implementation
<_blizzy_> but not recommended
<Iarfen> blizzy_, thank you, why is not recommender
<[k-_> larfen, twitter shifted off ruby because it wasnt keeping up
<yh> keeping up in what way?
<_blizzy_> because there are better languages for MMORPGS.
<[k-_> slow
mikecmpb_ has quit [Quit: i've nodded off.]
<_blizzy_> Twitter now uses Scala, which is a great language btw.
<yh> JRuby is pretty fast
alex88 has quit [Ping timeout: 248 seconds]
<havenwood> [k-_: Twitter still uses Rails as well.
<[k-_> minor minor
<_blizzy_> Twitter uses Scala now I though.
blackmes2 has joined #ruby
<_blizzy_> *thought
<_blizzy_> jhass, minus Event Machine, how would I achieve my goal if possible.
<_blizzy_> threads?
<Iarfen> blizzy_, but why the other languages are best, only because of frameworks?
<havenwood> _blizzy_: For the backend, aye.
<jhass> _blizzy_: stuff that gets as big as twitter would be stupid to base on a single technology
xxneolithicxx has joined #ruby
darkf has quit [Quit: Leaving]
<_blizzy_> jhass, yeah.
<bnagy> EM is dead, no?
<_blizzy_> havenwood, ok, thanks.
<_blizzy_> Iarfen, because each tool has it's use.
towski_ has joined #ruby
<_blizzy_> I wouldn't build an airplane with just a hammer.
<_blizzy_> it's possible, but it would be hard as hell.
icebourg has quit []
dross has joined #ruby
<[k-_> it's possible?
<_blizzy_> ok, probably not possible, but you get the point. c:
<jhass> Iarfen: just toying or building something specific?
icebourg has joined #ruby
revath has quit [Ping timeout: 244 seconds]
<Iarfen> jhass, building an MMORPG, it will be specific
<shevy> once they grow
<Iarfen> trying to decide the best programming language, I don't like C++ because the syntax is really anoying
<shevy> they abandon ruby
<shevy> :(
<Iarfen> so prefer to use another if possible
<nofxxx> Is jruby-head >= 2.0.0 ?
<[k-_> ruby really isnt the right choice for this things
<havenwood> nofxxx: JRuby 9.0 is up to 2.2 now. :)
<[k-_> larfen: you should get a strongly typed language with static typing
husanu has quit [Remote host closed the connection]
droidburgundy has joined #ruby
<nofxxx> havenwood, ty. For travis CI. Gonna try jruby-head.
husanu has joined #ruby
cndiv has quit []
<[k-_> and don't jump onto the haskell bandwagon
<[k-_> IO wont be easy to handle...
<[k-_> you could try D
droidburgundy has quit [Client Quit]
<[k-_> it has type inference
<havenwood> nofxxx: For earlier JRuby you can: export JRUBY_OPTS=--2.0
<havenwood> nofxxx: 9.0.0.0.rc1 ship in 2.2 mode.
<nofxxx> Iarfen, I disagree, ruby would be perfect for a lot of stuff. And when it comes to the realtime/socket part you can just choose what to use. deepstream/node, or maybe elixir/erlang
<jhass> Iarfen: I guess Elixir for the backend could be interesting, but for the client you'll C++ is probably still your best bet :/
snath has joined #ruby
<jhass> eh, s/you'll//
<havenwood> Iarfen: Crystal and Elixir are the answers. What is the question?
<Iarfen> okay, thank you all for the advices, I'll decide
<nofxxx> Iarfen, as said, you need a lot of tools to build an airplane. Ruby being the dewalt 20V
<[k-_> havenwood: hue hue hue
<jhass> well yeah, Crystal if you don't fear fixing language bugs :P
<havenwood> nofxxx: I thought Ruby was legos. ;)
<[k-_> please, we need more D users
* havenwood flies off in a lego plane...
<nofxxx> havenwood, dude, with some money and a dewalt 20V you can launch to space. I've built half my furniture with it hehe
allenn has quit [Ping timeout: 252 seconds]
<[k-_> you'll be mistreating yourself and others
<nofxxx> Iarfen, checkout rethinkdb too
<jhass> use mongo because mongo is webscale. MySQL isn't wescale. use mongo
cndiv has joined #ruby
antgel has quit [Ping timeout: 256 seconds]
<nofxxx> havenwood, and thanks again
<[k-_> are you sure mongo is the right choice
<nofxxx> yeah, mongo or rethink. Love'em both.
<[k-_> most people have criticised mongo
<[k-_> they said it should be used if your data is not important @.@
<[k-_> only*
<nofxxx> [k-_, while they talk I use, and dont waste a second migrating or shell working
<dudedudeman> our company uses mongo for everything. web, pipeline, production, whatever
<[k-_> but mongo journalling is a bit awkwardish
nofxxxx has joined #ruby
<eam> [k-_: those people are correct
rafaelsales has quit [Remote host closed the connection]
<[k-_> they are? not sure who to trust @.@
lrocksmashtime has left #ruby [#ruby]
<adaedra> [k-_: problem is that mongo does not guarantees data correctness iirc
<adaedra> it say it writes, but not really
<jhass> uhm
<jhass> I'm sorry
<eam> there are very few cases where a typical sql database isn't appropriate for someone who doesn't know what they're doing
<jhass> ?ot
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<nofxxxx> adaedra, not true... you choose how to write, with majority or even wait for all machines to reply
<adaedra> meh, I'll move to the train rather
<jhass> _blizzy_: what do you mean? you serialize execution there so this is equivalent to using no threads at all
dross has quit [Quit: WeeChat 1.1.1]
acke has quit [Remote host closed the connection]
<_blizzy_> jhass, it's back to the !foo thing. when I run !foo, it starts a new thread, pushes it to @threads, then runs @threads.map(&:join)
fantazo has joined #ruby
Rickmasta has joined #ruby
<_blizzy_> is there a way to prevent a thread from restarting when map is used if a thread is already running
<jhass> inside eventmachine? doubt that's a good idea
<[k-_> but it isnt running anything else on the main thread
<jhass> I have no idea what you mean by restarting or why you even think anything restarts
<_blizzy_> ok let's use the real example. I'm making a Pokemon battle bot. the bot can battle multiple people at the same time
nofxxx has quit [Ping timeout: 250 seconds]
<_blizzy_> every time a battle starts, it starts a new instance of the Battle class.
mister_s_ has quit [Quit: So long, and thanks for all the fish!]
<_blizzy_> I'm using threads so that it's possible for the bot to battle in multiple battles at the same time
<jhass> keep a shared hash with nick => battle_instance
<jhass> dispatch input to the right instance based on nick
sinkensabe has joined #ruby
<jhass> no need for threads, just dispatch input
<_blizzy_> ok.
rafaelsales has joined #ruby
<_blizzy_> the reason why I'm using threads is because I tried your method once.
<_blizzy_> it got messy.
<bnagy> you can thread out your Battles if you want, but you'll still have to fan out input
momomomomo has joined #ruby
lurkmaster has quit [Ping timeout: 246 seconds]
<jhass> yeah I see zero benefit in threading, it'll just add complexity and increase the mess
c0m0 has quit [Ping timeout: 256 seconds]
<_blizzy_> it starts a battle instance with the room in the initializer, so it knows what battle to send info to
<bnagy> you have one bot in the irc chan reading input, right? So it needs to mux, effectively
<jhass> especially if you use a event driven approach otherwise
TheNet has joined #ruby
duper` has quit [Ping timeout: 256 seconds]
rikai has quit [Ping timeout: 264 seconds]
snath has left #ruby ["Leaving"]
<[k-_> event driven approach seems the best for this type of bots
sinkensabe has quit [Read error: No route to host]
<bnagy> doubt it
obscured has joined #ruby
jenksy has quit [Ping timeout: 264 seconds]
<bnagy> greenthreads is going to be easier to code
Hounddog has quit [Remote host closed the connection]
<[k-_> what is a better way? i have been using event driven
sinkensabe has joined #ruby
rjno has joined #ruby
<bnagy> well ruby event libs are.. :/
<_blizzy_> so far I've been using threads and I haven't been having problems.
<_blizzy_> c:
<[k-_> you should use fibers
<bnagy> no.
<_blizzy_> especially since there is so much that goes on in a battle
<_blizzy_> it would be one big hash
<bnagy> using threads lets you keep your individual statemachines simple
<[k-_> i thought fighting was just a few moves
nwhirschfeld_ has quit [Quit: No Ping reply in 180 seconds.]
<[k-_> battles can be paused and resumed?
<bnagy> imho the only reason to go evented is speed
<_blizzy_> [k-_, it's pokemon. so I gotta factor in health, moves, evs, weather
<_blizzy_> etc
<_blizzy_> it gets crazy.
<[k-_> oh, it is that complex
<_blizzy_> I'm making an AI(?) so it's crazy.
<[k-_> kudos to you then
<_blizzy_> thxs. c:
lkba has joined #ruby
<bnagy> in my mind this is just a dispatcher fan in-out kind of thing
<bnagy> where your Battles have a Queue for in and out
<bnagy> and the irc bot does the multiplexing
<_blizzy_> oh ok.
last_staff has joined #ruby
joshbamboo1 has joined #ruby
<jhass> and you can totally develop that single threaded and add in the threads later if you actually run into delays due to heavy computations
<jhass> one players actions blocking others
<_blizzy_> true.
fantazo has quit [Ping timeout: 264 seconds]
yoongkang has joined #ruby
<bnagy> won't you get blocky if you don't have a thread per battle?
<bnagy> like.. not real threads, just mri threads
<jhass> yes, but if response time is like 250ms on avg, why care?
fabrice31 has joined #ruby
withnale_ has quit [Ping timeout: 272 seconds]
WildBamboo-Josh has quit [Ping timeout: 252 seconds]
<[k-_> arent mri threads fibers
<jhass> no
<jhass> MRI threads are backed by pthreads
<jhass> the GVL makes it just so that the VM is running ruby code only for one at a time
<bnagy> oh.. you can't select over ruby queues anyway
atom3 has quit [Ping timeout: 276 seconds]
<_blizzy_> what exactly is the diff between threads and fibers anyway.
<bnagy> so you'd need one output queue and many input queues
Excelsior2015 has joined #ruby
Xeago has quit [Remote host closed the connection]
<_blizzy_> every time I hear fibers I think of anime.
<bnagy> fibers are more hipseter
<jhass> _blizzy_: fibers achieve concurrency, threads (in theory) achieve parallelism
<[k-_> fibers are more lightwhite
<bnagy> a fiber is just a thread where you have explicit control over the pause resume
<[k-_> lightweight*
atom3 has joined #ruby
<_blizzy_> oh.
sinkensabe has quit [Remote host closed the connection]
<_blizzy_> so why use threads over fibers.
<jhass> fibers are a fancy way to swap the stack of the current thread
<bnagy> threads are easier to map onto OS threads
<[k-_> arent fibers not mapped to os threads?
<jhass> no
<bnagy> no fibers are always explicitly scheduled imho
<_blizzy_> oh, then I need concurrency
<bnagy> in all languages
jenksy has joined #ruby
peter_paule has joined #ruby
<_blizzy_> since battles can start and end at different times.
<jhass> bnagy: pretty sure that's not the case
<jhass> especially if used as IO model, they're scheduled by the IO events
<bnagy> jhass: hrmmmm.
Zai00 has quit [Quit: Zai00]
<toretore> no, ruby fibers are always explicitly scheduled by the user
<bnagy> all the stuff I can think of they're scheduled by the process runtime
<jhass> yes, Ruby fibers
<bnagy> not by the OS
jtdowney_ has quit [Quit: ZNC]
<jhass> well, yes
fabrice31 has quit [Ping timeout: 272 seconds]
<toretore> an io loop may be in charge of the scheduling, but it's in user space, so to speak
<jhass> but your runtime can very well have its own scheduler opaque to the user of the language
jtdowney_ has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
chthon has quit [Ping timeout: 244 seconds]
<toretore> exactly
sdothum has joined #ruby
<toretore> wait
<toretore> not the runtime, user code
momomomomo has quit [Quit: momomomomo]
valkyrka has quit [Quit: valkyrka]
<bnagy> to me, if it's being scheduled in-process in userland it's explicit :)
nwhirschfeld has joined #ruby
lkba_ has joined #ruby
<jhass> example of what I mean
<bnagy> but, going further, I thought that fibers were explicitly manually scheduled
<toretore> "ruby fibers" ;)
<toretore> oh right, but that's user space
<bnagy> otherwise they're coros or something
<_blizzy_> every time I hear fibers, I think of "life fibers"
<bnagy> but I lose track of jargon :`(
<toretore> fibers are coroutines
<jhass> eh, fiber and coroutine ah pretty much two names for the same thing
<toretore> coroutines may not have their own stack
swgillespie has joined #ruby
rbennacer has joined #ruby
air_ has joined #ruby
<_blizzy_> so, concurrency is running two things that can both start and stop at separate times at the same time
swgillespie has quit [Client Quit]
<_blizzy_> parallelism is two things running exactly at same time
<toretore> don't get hung up on difference between the two
<bnagy> _blizzy_: concurrency is the illusion of paralellism
pietr0 has joined #ruby
<_blizzy_> bnagy, so Golang is an illusion?
<bnagy> which may or may not actually be parallelism
skade has joined #ruby
<_blizzy_> toretore, oh ok.
<toretore> only that parallelism is only attainable with multiple cpus
wjimenez5271_ is now known as wjimenez5271
<_blizzy_> oh ok.
lkba has quit [Ping timeout: 246 seconds]
peter_paule has quit [Ping timeout: 276 seconds]
<jhass> Go is running on multiple threads these days, no?
Scroff has quit [Ping timeout: 264 seconds]
peter_paule has joined #ruby
<bnagy> go has always run on multiple threads
<toretore> yes, go uses a work-stealing scheduler
<jhass> thread control is just not exposed to the user
<bnagy> because syscalls
<bnagy> but GOMAXPROCS default is still 1
<bnagy> in 1.5 things change a bit
<air_> its ruby grp or go grp?
<toretore> there is talk of preemptive scheduling of goroutines
<shevy> wat
<[k-_> ruby
diegoviola has quit [Ping timeout: 276 seconds]
[k-_ is now known as [k-|
jenksy has quit [Ping timeout: 246 seconds]
<[k-|> does this look better
yh has quit [Ping timeout: 256 seconds]
<[k-|> (apparently not for my client)
wallerdev has joined #ruby
<bnagy> air_: we're just comparing concurrency models
<_blizzy_> https://i.imgur.com/E3vQqns.jpg multithreading expectations vs reality.
nwhirschfeld has quit [Quit: No Ping reply in 180 seconds.]
<_blizzy_> I get the joke now.
episage has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
<[k-|> the first one is parallelism isnt it
<eam> interestingly we have parallelism in one cpu as well due to superscalar architecture
super has joined #ruby
jenksy has joined #ruby
<eam> though it's hidden from view at the ruby level
<jhass> [k-|: both are
<toretore> meaning? hyperthreading?
nwhirschfeld has joined #ruby
<jhass> [k-|: the second one is how it works out in reality ;)
<eam> toretore: pipelining
<jhass> the first one is how you planned it
<[k-|> but..but...
<toretore> eam: oh
<eam> hyperthreading isn't hidden from view, it appears as a real cpu core to userspace
<[k-|> that is so much less elegant than ruby!
<toretore> right
zeroDi has quit [Ping timeout: 255 seconds]
<[k-|> A superscalar CPU architecture implements a form of parallelism called instruction-level parallelism within a single processor. It therefore allows faster CPU throughput than would otherwise be possible at a given clock rate.
<[k-|> [Wikipedia]
subtwo has joined #ruby
afrianska has quit [Ping timeout: 252 seconds]
<eam> [k-|: read that as: the CPU determines that the next X instructions don't interact with each other, so it executes them all at the same time (in a pipeline)
bronson has quit [Remote host closed the connection]
<[k-|> :o
droidburgundy has joined #ruby
<atmosx_> hello
atmosx_ is now known as atmosx
droidburgundy has quit [Client Quit]
<[k-|> hello
<toretore> why is it a pipeline if they don't interact?
baweaver has joined #ruby
vikaton has joined #ruby
<eam> view program code as stuff you're pushing through the cpu - an instruction pipeline
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
<eam> the amount you can execute in parallel (empty the pipe fast) is the depth of your pipeline
<eam> all kinds of tricks are used on modern processors to set up long pipelines with maximum parallelism (branch prediction, out of order execution)
<toretore> yeah i was being facetious :P
<eam> ah :)
<eam> oh well, should be interesting material for newbies
<toretore> usually pipeline means the result of one job goes into the next
<toretore> yeah for sure
<vkgfx> it does
<vkgfx> the parallel execution is just different phases of execution
<vkgfx> like reading instruction from memory, loading data, executing instruction, etc.
<vkgfx> they flow along a pipeline
baweaver has quit [Remote host closed the connection]
<vkgfx> pipelining means that you can be loading the next instruction's data while you executing the previous one
dblessing has joined #ruby
<vkgfx> and you can be loading the instruction for the instruction after that
<toretore> sure, but they don't depend on each other
<vkgfx> sometimes they do
<vkgfx> that causes a stall
tlarevo has joined #ruby
<vkgfx> but it can also be resolved by making a data path
yqt has quit [Ping timeout: 246 seconds]
<vkgfx> so that data from one instruction can be redirected back to the next one that uses it
<toretore> at least in the case of "superscalar" architecture
subtwo has quit [Quit: (null)]
<toretore> the whole point being that they can be executed in parallel because they're not waiting on each other
Rollabunna has quit [Remote host closed the connection]
<vkgfx> pipelining and superscalar execution are not that same thing toretore
charliesome has joined #ruby
<[k-|> add -> mov can be in parallel but mov -> add cannot?
<toretore> vkgfx: ok
caseypatrickdris has quit [Quit: Leaving...]
<eam> [k-|: depends on what's going on where
<eam> if nothing interacts with the memory being touched then there's probably no issue
IrishGringo has quit [Ping timeout: 246 seconds]
<pipework> Did someone mention pipes?
shadoi has joined #ruby
n008f4g_ has quit [Ping timeout: 252 seconds]
postmodern has joined #ruby
afrianska has joined #ruby
<havenwood> PIPE ALL THE THINGS \o/
<toretore> thinking of everything as a stream is interesting
<havenwood> [0, 1, 1].map(&:expensive).async(:waterfall).map(&:processed_as_piped_from_expensive).async(:round_robin).to_a
<[k-|> isnt that haskell
stan has quit [Ping timeout: 246 seconds]
<shevy> hehehe
<toretore> it's basically.. what are they calling it? the .net guys
<toretore> or java 8 streams
blaines has joined #ruby
Excelsior2015_ has joined #ruby
bronson has joined #ruby
kahuna_ has quit [Quit: Lost terminal]
<toretore> reactive is what i was looking for
afrianska has quit [Read error: Connection reset by peer]
<havenwood> pipeline parallelism ftw
Excelsior2015 has quit [Ping timeout: 265 seconds]
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nwhirschfeld has quit [Ping timeout: 276 seconds]
revath has joined #ruby
<havenwood> I'd love it if Ruby had pipeline parallelism similar to what's planned for Elixir 1.3: http://www.youtube.com/watch?v=EaP0y4pdKD0&t=47m24s
baweaver has joined #ruby
<air_> maybe it will bw in gsoc..
aryaching has joined #ruby
vasilakisfil has quit [Ping timeout: 256 seconds]
casadei has quit [Remote host closed the connection]
<[k-|> time to beg?
msnyon has quit [Ping timeout: 246 seconds]
<toretore> havenwood: that can be done without explicit language support
blue_deref has joined #ruby
<toretore> just need someone to build it
nwhirschfeld has joined #ruby
<toretore> and i don't like the cutesy syntax :/
alphaatom|pc has quit [Ping timeout: 256 seconds]
msnyon has joined #ruby
two-gun has joined #ruby
quimrstorres has quit [Remote host closed the connection]
lkba has joined #ruby
alphaatom|pc has joined #ruby
DLSteve has joined #ruby
Ilyas has joined #ruby
<[k-|> we have <|> in haskell... whatever that is
<[k-|> but the elixir code looks ~beautiful~
<[k-|> i shall add it to my list of things to learn
Jackneill has quit [Remote host closed the connection]
acke has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tjbiddle has quit [Quit: tjbiddle]
psy_ has quit [Read error: Connection reset by peer]
zz_Outlastsheep is now known as Outlastsheep
<two-gun> evening all. I'm having trouble with a gem called wordmove (am i in the right channel?) the stack is vagrant/vvv/wordmove for wordpress but my problem is wordmove seems to have been install at root. if i do sudo gem list, it shows up, if i do gem list, it doesn't. this is a problem because wordmove uses rsync to push the wp site to the production server. it's no good if i can only do that as root. is it a st
<two-gun> raightforward thing to change the path or something? I'm not so fluent with this stuff yet. thanks
Channel6 has quit [Quit: Leaving]
msnyon has quit [Ping timeout: 252 seconds]
crdpink has joined #ruby
lkba_ has quit [Ping timeout: 250 seconds]
crdpink2 has quit [Ping timeout: 248 seconds]
Scroff has joined #ruby
<havenwood> two-gun: Yup, this is the right channel. See: gem help install | grep user\-install -A1
s2013 has joined #ruby
yoongkang has quit [Remote host closed the connection]
diegoviola has joined #ruby
<[k-|> i hardly use any gems
<havenwood> two-gun: You can put a `gem: --user-install` in your ~.gemrc or install the gem with: gem install foo --user-install
tubuliferous_ has joined #ruby
<havenwood> two-gun: To install in your home directory instead of system. ^
casadei has joined #ruby
<two-gun> havenwood: is there anyway to modify it as it stands. it was installed as part of a shell script and i'm a little unsure if i remove it and re-install it what might fall apart. to build the vagrant virtual machine takes forever an di've already done it 3 times. thanks for your help
kohgpat has joined #ruby
ahmadsoe has quit [Quit: Connection closed for inactivity]
<havenwood> two-gun: Do you have just one Ruby installed? Ubuntu system Ruby?
<two-gun> havenwood: how might i check that?
<havenwood> two-gun: uname -a
<havenwood> two-gun: which ruby
lucianosousa has joined #ruby
<havenwood> two-gun: which -a ruby
<two-gun> i might have 2. i just did ruby -v and sudo ruby -v
<two-gun> different version numbers :-O
<havenwood> two-gun: Do you get anything for?: command -v rvm
<two-gun> uname -a: Linux vvv 3.13.0-55-generic #92-Ubuntu SMP Sun Jun 14 18:33:09 UTC 2015 i686 i686 i686 GNU/Linux
<two-gun> which ruby: /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby
<havenwood> So I'm guessing Ubuntu system Ruby as well as RVM.
<havenwood> Aye
<two-gun> which -a ruby/usr/local/rvm/rubies/ruby-2.2.1/bin/ruby
<two-gun> /usr/bin/ruby
<havenwood> two-gun: So when you use `sudo` it is dropping your RVM env which gives you system Ruby.
trieepiee has joined #ruby
<trieepiee> if I want to learn ruby today what's the best way to do so
<havenwood> two-gun: There's an `rvmsudo` that keeps the RVM env while elevating privileges.
<two-gun> havenwood: that sounds interesting...
<havenwood> trieepiee: This is a good place to ask questions. Here are some links: http://ruby-community.com/pages/links
msnyon has joined #ruby
duderonomy has quit [Ping timeout: 276 seconds]
<nofxxxx> trieepiee, codeschool, code achademy, chris pine learn to program
<two-gun> trieepiee: not sure what this community thinks of code academy but you could start that right now. might be nice to just dive in (i haven't done it myself)
<havenwood> trieepiee: The Learn to Program book ^ is a gentle introduction if this is your first foray into programming.
<nofxxxx> two-gun, which version ubuntu is shipping from apt? if it's > 2.2 you might just well drop rvm, it'll just cause headaches
<Outlastsheep> http://mislav.uniqpath.com/poignant-guide/book/ It's outdated since it explains an older version of Ruby (most of the info's still relevant though). But it's still the most *entertaining* way to go.
sdwrage has joined #ruby
kohgpat has quit [Quit: leaving]
<trieepiee> thanks all of you
<havenwood> Outlastsheep: And it has a soundtrack, which is lacking from most other programming books.
<Outlastsheep> trieepiee: you're welcome!
<Outlastsheep> havenwood: and cartoon foxes! _Cartoon Foxes_, man!
<havenwood> Chunky. Bacon.
<Outlastsheep> Yeah dude, chunky bacon.
imanzarrabian has quit [Quit: Textual IRC Client: www.textualapp.com]
<two-gun> nofxxxx: not sure i understand but my ubuntu is trusty tahr About 645,000 results (0.31 seconds)
<two-gun> Search Results
djbkd has quit [Remote host closed the connection]
<air_> rubymonk is goodone too
<two-gun> Ubuntu 14.04
<nofxxxx> two-gun, the ruby version you get from apt
<atmosx> out of 200 porn domains on my list, only 68 are still active (I've got the list from UK black-list website)
<atmosx> difficult times for the porn industry
<atmosx> I wonder what kind of taxes do they pay
arup_r has joined #ruby
Scroff has quit [Remote host closed the connection]
<atmosx> if any..
trieepiee has quit [Client Quit]
michael_mbp has quit [Excess Flood]
scripore has joined #ruby
<havenwood> nofxxxx: Old, but Brightbox maintains a good ruby2.2 package for Ubuntu.
<dfockler> If they make money, they have to pay taxes
TheHodge has quit [Quit: Connection closed for inactivity]
<dfockler> but this is offtopic :P
<rbennacer> is there a function in Hash api that does something like array map ? ex h= {1=>2,3=>4} , h.map{+1}... => {1=>3,3=>5}
<Outlastsheep> Why's Poignant Guide was how I learnt ruby. It was amazing. Giggling to myself during school classes.
sarmiena_ has joined #ruby
<havenwood> >> {1=>2,3=>4}.map { |k, v| [k, v.next] }.to_h
<ruboto> havenwood # => {1=>3, 3=>5} (https://eval.in/385688)
<havenwood> rbennacer: ^
<rbennacer> havenwood: :) L(
michael_mbp has joined #ruby
vickleton has joined #ruby
<air_> hey ruboto are you from ruboto grp?
<rbennacer> havenwood: i was trying to avoid that hehe
<havenwood> rbennacer: require 'hashy'; h.map_value &:next
<[k-|> havenwood: i prefer succ
<rbennacer> havenwood: it looks more like what i want, thank you
<havenwood> rbennacer: Or: class Hash; def map_value; each_with_object({}) { |(k, v), h| h[k] = yield(v) } end end
diegoviola has quit [Changing host]
diegoviola has joined #ruby
<havenwood> rbennacer: ^ if you want to just add it yourself.
arup_r has quit [Ping timeout: 248 seconds]
flughafen_ has joined #ruby
<crowell> why_'s poignant guide is really not a very good oen
<crowell> *one
baweaver has quit [Remote host closed the connection]
vickleton has quit [Client Quit]
jerius has quit [Quit: /quit]
rdark has quit [Quit: leaving]
<[k-|> i read the first chapter, didnt understand it, closed it
JoshGlzBrk has joined #ruby
<havenwood> Chunky bacon? Check. Soundtrack? Check. Live a little!
<jhass> it's a good read once you know Ruby :P
unshadow has joined #ruby
<air_> dave thomas now with erlang left ruby it seems..
momomomomo has joined #ruby
<[k-|> oh, so theres the chunky bacon reference
flughafe2 has quit [Ping timeout: 256 seconds]
hahuang65 has joined #ruby
quimrstorres has joined #ruby
Jackneill has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
quimrstorres has quit [Remote host closed the connection]
bluish has joined #ruby
djbkd has joined #ruby
droidburgundy has joined #ruby
jerius has joined #ruby
ghostpl has quit [Ping timeout: 264 seconds]
Doc_IX is now known as dylannorthrup
<[k-|> i wished i knew some gems, but the truth is, i dont do much ¯\_(ツ)_/¯
<[k-|> im not sure why i have so many
<[k-|> i just installed finishing_moves and all these gems came up
Regulati_ has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
<air_> k- freenode is irritating much everytime someone join or leaft it give notifiacation. which irc you all are using?
baweaver has joined #ruby
JoshGlzBrk has quit [Quit: Textual IRC Client: www.textualapp.com]
<dudedudeman> you can turn that feature off in options
<air_> where?
<[k-|> very good irc client™
Igorshp has quit [Remote host closed the connection]
<dudedudeman> top left if you're already in a channel, and it's in the middle if you're at the sign on page
<wasamasa> air_: smartfilter ftw
stan has joined #ruby
<dudedudeman> i use pigin
<wasamasa> lol
<dudedudeman> it does what i need it to
<wasamasa> then give up
<[k-|> yup i definitely turned join/parts off
<jhass> wasamasa: pidgin actually has a plugin that does smart filter :D
* wasamasa rolls eyes
<dudedudeman> i think you were the on that told me about that, jhass
<wasamasa> guess they've got better things to do than fixing this gaping wound libpurple is
<[k-|> but is pidgin a real irc client
<jhass> [k-|: what's an unreal one?
<Aria> Not sure what makes something 'real' vs 'not'.
<Aria> It exists.
<Aria> Therefore it's real?
<jhass> oooh metaphyisics
<Outlastsheep> Something like "SuperLobsterMealWithCaviarIRC" doesn't exist.
<Outlastsheep> Because nobody has made it yet.
momomomomo_ has joined #ruby
<two-gun> havenwood: thanks for your help. i fear i've run out of time. might get another chance to look at this later tongiht. thanks
<dudedudeman> ugh. i don't have time for another existential crisis today. not regarding irc at least
kies has joined #ruby
icarus has joined #ruby
<[k-|> i dont know how to define real
<[k-|> but i'll get it soon enough
<[k-|> i'll just fetch one from urbandictionary in the mean time
<havenwood> two-gun: You're welcome. Let us know if you get stuck later, I'm sure we can get you sorted.
<havenwood> [k-|: That's on-topic in #ruby-offtopic!
<Aria> friends don't let friends use urbandictionary.
platzhirsch has left #ruby [#ruby]
momomomomo has quit [Ping timeout: 244 seconds]
momomomomo_ is now known as momomomomo
alphaatom|pc has quit [Ping timeout: 264 seconds]
Regulati_ has quit [Remote host closed the connection]
<air_> ohoo eehich otion you are choosing for making thatshit off..
solars has quit [Ping timeout: 272 seconds]
two-gun_ has joined #ruby
zeroDi has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-|> hide join/parts?
RegulationD has joined #ruby
<air_> hide join parts queue. its unlocked still its functioning.
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
bkxd has joined #ruby
<[k-|> i have no idea what you are saying
<air_> i have turned it off and click on save. but its not working.
two-gun has quit [Ping timeout: 255 seconds]
<dudedudeman> might be worth trying a different browser
geilt has joined #ruby
<air_> firefox using on linux
<[k-|> are you considering to stay for long periods of time?
Palmer11 has quit [Quit: Palmer11]
failshell has joined #ruby
gagrio has joined #ruby
obscured has quit [Quit: leaving]
nveselinov has joined #ruby
bkxd has quit [Ping timeout: 265 seconds]
air__ has joined #ruby
<air__> yup
air_ has quit [Ping timeout: 246 seconds]
rubie has quit [Remote host closed the connection]
yh has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
<[k-|> get a "real" client then
<[k-|> irc is srz biznuz
<air__> how?
<[k-|> try hexchat
n008f4g_ has joined #ruby
<air__> its for only 30 daystrail i think
tvw has quit [Remote host closed the connection]
<air__> now its working that option works but opposite way.
<[k-|> hexchat is free
pietr0_ has joined #ruby
k3asd` has quit [Ping timeout: 255 seconds]
<ponga> shevy: matz talks about typing in ruby again.. do you like his ideas?
<air__> when i turns it off its on , but when i turn it on it got off
Andriamanitra has left #ruby ["morjs"]
pietr0 has quit [Ping timeout: 250 seconds]
pietr0_ is now known as pietr0
quimrstorres has joined #ruby
yqt has joined #ruby
RegulationD has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
<[k-|> air__ that is really an issue you have to figure out
<air__> yeah
BrianBoyko1 has joined #ruby
vasilakisfil has joined #ruby
<BrianBoyko1> Hello. I could use some ruby help connecting to a postgresql database, does anyone have any experience there?
rjno has quit []
<jhass> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
baweaver has quit [Remote host closed the connection]
Outlastsheep is now known as zz_Outlastsheep
ivanskie has joined #ruby
dumdedum has quit [Quit: foo]
djbkd has joined #ruby
<ponga> >> p "I am here!"
<ruboto> ponga # => "I am here!" ...check link for more (https://eval.in/385701)
kerrizor has joined #ruby
workmad3 has joined #ruby
<BrianBoyko1> I have a program - written by someone else - that processes Stripe payments. I'd like to create a log of those payments (just e-mail and amount) to a PG database. Difficulty: I'm a newbie programmer. Ultra Hardcore Difficulty: studying Javascript.
freerobby has quit [Quit: Leaving.]
<BrianBoyko1> so basically, I just have to pass @amount and @email to a database.
tlarevo has quit [Remote host closed the connection]
<BrianBoyko1> This program doesn't need to retrieve anything.
<adaedra> Most direct way is pg. If you want a nice layer in top of that, you have Sequel.
baweaver has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
chinmay_dd has quit []
<BrianBoyko1> I'm going through the pg docs now and I'm more or less lost. Especially since I can't get this program to run locally.
Zai00 has joined #ruby
shinnya has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
<adaedra> Which program? The code you were given?
psy_ has joined #ruby
Iarfen has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.5/20150525141253]]
cir0x has joined #ruby
<BrianBoyko1> Yes - I'm getting the old "you have the wrong version of ruby" error. Problem is, I've done everything to get it to the right version of Ruby and it's still thinking I have the wrong version of Ruby
symm- has joined #ruby
denver has quit [Read error: Connection reset by peer]
senayar has joined #ruby
<adaedra> what do you mean by "to get it to the right version", what did you do?
<jhass> something's literally printing you "you have the wrong version of ruby"? if so what's that?
dstarh has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
GitGud has quit [Read error: Connection reset by peer]
<BrianBoyko1> bundle install
<BrianBoyko1> conn = PG.connect( dbname: 'sales' )
<BrianBoyko1> sorry
<BrianBoyko1> here's the error:
<BrianBoyko1> Your Ruby version is 2.1.2, but your Gemfile specified 2.1.5
<adaedra> ok, what do you mean now by: I've done everything to get it to the right version
<air__> ha ha version error
flughafen_ has quit [Ping timeout: 252 seconds]
<[k-|> its not nice to laugh at people :(
rubie has joined #ruby
<[k-|> i bet he was pulling his hairs out over this
Scroff has joined #ruby
<BrianBoyko1> You're right.
baweaver has quit [Remote host closed the connection]
<BrianBoyko1> I mean, you're mean, but you're right.
Beoran_ has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
<jhass> heh, I'm sure we can get through this, how did you install Ruby?
<BrianBoyko1> Well, I've googled how to change ruby versions, I've installed the latest version of ruby, I've installed rvm (and that was an ordeal) and at the end - I still get this error
<BrianBoyko1> sudo apt-get install ruby ruby-dev
scripore has joined #ruby
<jhass> but you have rvm now?
<BrianBoyko1> yes
<jhass> what's the output of?: rvm current
<adaedra> ?gist
<ruboto> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
BanzaiJoe has joined #ruby
<jhass> adaedra: it's a single line...
<adaedra> oh
<BrianBoyko1> ruby-2.1.5
<jhass> what's the exact command you run that claims it's Ruby 2.1.2 ?
GitGud has joined #ruby
<BrianBoyko1> bundle install
atom3 has joined #ruby
atom3 has quit [Remote host closed the connection]
blackmes2 has quit [Ping timeout: 276 seconds]
yoongkang has joined #ruby
<jhass> what's?: which bundle
fabrice31 has joined #ruby
<jhass> no
<BrianBoyko1> my local version of *that* code which lives on my heroku.
<jhass> "which bundle" is a command too
geiltalasdair has joined #ruby
momomomomo_ has joined #ruby
vasilakisfil has quit [Quit: Konversation terminated!]
<jhass> calling the command which with the argument bundle
<BrianBoyko1> Next you'll be telling me to run WHOSE on FIRST
<BrianBoyko1> /usr/bin/bundle
<jhass> okay, suspected as much
vasilakisfil has joined #ruby
<jhass> try running, without sudo or anything just plain that: gem install bundler
<jhass> then bundle install again
<BrianBoyko1> gem installed
vasilakisfil has quit [Client Quit]
vasilakisfil has joined #ruby
tcrypt has joined #ruby
<BrianBoyko1> It's running now.
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
geilt has quit [Ping timeout: 244 seconds]
commondream has quit [Remote host closed the connection]
<BrianBoyko1> Post-install message from httparty:
<BrianBoyko1> When you HTTParty, you must party hard!
momomomomo has quit [Ping timeout: 255 seconds]
momomomomo_ is now known as momomomomo
vasilakisfil has quit [Client Quit]
vasilakisfil_ has joined #ruby
fabrice31 has quit [Ping timeout: 256 seconds]
peter_paule has quit [Ping timeout: 250 seconds]
nobitanobi has joined #ruby
geiltadecht has joined #ruby
vasilakisfil_ has quit [Client Quit]
vasilakisfil__ has joined #ruby
AlphaAtom has joined #ruby
Al3ks has joined #ruby
jaycee has joined #ruby
geilt has joined #ruby
geiltalasdair has quit [Read error: Connection reset by peer]
geiltadecht has quit [Client Quit]
geilt has joined #ruby
Al3ks has quit [Client Quit]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<BrianBoyko1> Okay - new question - how do you concatinate a string in Ruby?
<Aria> string + string
<jhass> there's "string " + concatenation but we prefer "string #{interpolation}"
<Aria> or string << string if you don't mind modifying the original left one.
<BrianBoyko1> So, say, I wanted to @conn.exec("INSERT INTO donors VALUES ("@email", "@amount);")
Beoran_ has joined #ruby
<jhass> there please please use bind params
<Aria> Well, for SQL, you should be using parameterized queries.
<Aria> Because the first Bobby Tables you run into will hose your database.
<BrianBoyko1> Paramatawhozamagia querwhatitzs?
<jhass> @conn.exec("INSERT INTO donors VALUES (?, ?)", @email, @amount)
<BrianBoyko1> Aha!
nux443 has quit [Ping timeout: 276 seconds]
hamster88 has quit [Quit: Leaving]
<jhass> that's a feature of pg though, not ruby
<[k-|> "(%s, %s)" % [@email, @amount]
otisZart has quit [Ping timeout: 256 seconds]
<jhass> [k-|: no
<jhass> not for this case
<[k-|> oh
chinmay_dd has joined #ruby
<[k-|> we need to sanitize it anyway
<jhass> s/anyway//
<BrianBoyko1> So, does this text, starting at Line 151 and ending at line 158, look good to you??
<[k-|> you can def something in begin statements? :O
<[k-|> also, your indentation is weird
commondream has joined #ruby
<BrianBoyko1> uh,
<BrianBoyko1> ...
<BrianBoyko1> that's because I've never used ruby
baroquebobcat has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<jhass> doubt that's going to work that way :/
djbkd_ has joined #ruby
<[k-|> inconsistent style is a code smell
<jhass> you have two options here, either assign the connection to a CONSTANT like it's done for LOG and pray it stays open
<BrianBoyko1> where should I put the def?
<BrianBoyko1> Yeah, well, the only lines I wrote were 151 and 156
chinmay_dd has quit [Client Quit]
<jhass> or you reconnect to the db for each query
<jhass> which is slower but easier to get stable
<[k-|> you can't put a definition in a proc!
<jhass> for the latter case I'd suggest you follow the example of the push_msg method you got there
Channel6 has joined #ruby
claw has quit [Ping timeout: 276 seconds]
<jhass> and then use a local_variable for conn inside the method and move the conn.exec inside too
[k-| has quit [Quit: Lingo: www.lingoirc.com]
[k- has quit [Quit: AndroidIrc Disconnecting]
<BrianBoyko1> Sounds solid, but the truth is that I don't even know what a method in ruby looks like.
claw has joined #ruby
<jhass> it's the things that start with def
asmodlol has joined #ruby
workmad3 has joined #ruby
djbkd_ has quit [Ping timeout: 276 seconds]
waxjar is now known as Lingo
<BrianBoyko1> so, something like this https://gist.github.com/brianboyko/fb65cc80baeedb385942#file-gistfile1-txt-L93 -- line 93 and line 162?
rubie has quit [Remote host closed the connection]
framling has joined #ruby
<jhass> that's the right place, and 162 looks good too, 93 just doesn't match it yet
bhorn1 has joined #ruby
<jhass> that is connect is never called
<jhass> and as said I'd say just move the connection inside log_donation
<air__> https://gist.github.com/aj07/4b2a791ee42578b82631 is there anything wrong in these code.. its not running
sandstrom has quit [Quit: My computer has gone to sleep.]
<jhass> air__: "not running" is not a useful problem description. Detail your expectations and the behavior you observe instead
<jhass> BrianBoyko1: yeah, which makes the @ superfluous, just conn
fantazo has joined #ruby
<jhass> BrianBoyko1: btw gists have an edit button ;)
bronson has quit [Remote host closed the connection]
<BrianBoyko1> conn.exec then, not @conn.exec -- right, cause I don't have to declare the local variable twice.
<jhass> oh and the @'s for email and amount need to go too
<jhass> they're parameters now
<air__> jhass: i want to call addressbook via ffi and while running make command its asking .so file
<jhass> BrianBoyko1: @ doesn't declare a variable, they're @instance_variables
<BrianBoyko1> Isn't that always the way. Your little variables becoming parameters before you know it. Brings a tear to the eye.
<jhass> air__: keep in mind that we don't see your screen
workmad3 has quit [Ping timeout: 264 seconds]
<BrianBoyko1> Okay, so theoretically, this should work. (Realistically, I doubt it will, but we can debug later.)
<air__> ok i am posting my error too
<jhass> BrianBoyko1: what's "this"? did you remove the @ in @conn = PG.connect too?
phutchins has quit [Ping timeout: 276 seconds]
<BrianBoyko1> no, i didn't.
<BrianBoyko1> Should I?
blackmes2 has joined #ruby
<jhass> yes
Rollabunna has joined #ruby
robbyoconnor has quit [Ping timeout: 272 seconds]
<jhass> local_variable, @instance_variable, $global, Constant
<jhass> so @foo and foo are two different variables
<BrianBoyko1> *nods*.
<jhass> oh and @@class_vars but the actual usecases for these are very rare
<Aria> And instance variable on a class.
<Aria> (which is usually what one wants instead of @@vars)
<jhass> yeah
<air__> jhass check it.
jackjackdripper has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> air__: where's addressbook.so located?
asmodlol has quit [Ping timeout: 252 seconds]
bdnelson has joined #ruby
cpruitt has quit [Quit: cpruitt]
quimrstorres has joined #ruby
<BrianBoyko1> Ugh.
<BrianBoyko1> It's giving me "payment failed, unknown error"
<air__> it has been not made. i think it has been made by make command
slawrence00 has joined #ruby
asmodlol has joined #ruby
bronson has joined #ruby
failshell has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 248 seconds]
<jhass> air__: it has or it hasen't? either way it needs to exists before you can load it (= before you can start your ruby program)
e1nh4nd3r has quit [Quit: Leaving.]
jobewan has joined #ruby
<jhass> BrianBoyko1: probably just didn't setup the credentials correctly or something, check the DB whether that part worked
bdnelson has quit [Client Quit]
rubie has joined #ruby
<atmosx> hello
<BrianBoyko1> Okay.
AlphaAtom has joined #ruby
creakybones has joined #ruby
creakybones has joined #ruby
<jhass> mmh, that is unless it failed in the stripe call even before that
ringarin has joined #ruby
ringarring_ has joined #ruby
Kricir has quit [Remote host closed the connection]
Tamae has quit [Ping timeout: 256 seconds]
quimrstorres has quit [Ping timeout: 252 seconds]
l0oky has quit [Quit: leaving]
rikai has joined #ruby
<BrianBoyko1> Say, Jhass, can you do me a favor and send a direct message to me with your Github name, I'd love to give you credit on the blog.
<jhass> oh no worries, that was hardly any work ;)
<BrianBoyko1> No, but you're teaching me.
ringarin has quit [Ping timeout: 252 seconds]
asmodlol has quit [Ping timeout: 256 seconds]
<BrianBoyko1> Sort of. I mean, it still doesn't work (you were right about the DB name though)
<jhass> yeah, that's what I'm here for, nothing special ;)
givello has quit [Remote host closed the connection]
husanu has quit [Remote host closed the connection]
husanu has joined #ruby
ringarring_ has quit [Ping timeout: 272 seconds]
unshadow has quit [Ping timeout: 248 seconds]
asmodlol has joined #ruby
BanzaiJoe has quit [Ping timeout: 246 seconds]
BanzaiJoe has joined #ruby
choke has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
peter_paule has joined #ruby
mary5030 has joined #ruby
sandstrom has joined #ruby
Soda has quit [Remote host closed the connection]
malconis_ has joined #ruby
freerobby has quit [Quit: Leaving.]
<BrianBoyko1> Well, I'm stuck...
Scroff has quit [Remote host closed the connection]
maxmanders_ is now known as maxmanders
malconis has quit [Ping timeout: 250 seconds]
Igorshp has joined #ruby
Scroff has joined #ruby
<BrianBoyko1> Are you sure I'm calling this function correctly? https://gist.github.com/brianboyko/0476f6554cb0201a6e2f#file-gistfile1-txt-L160
momomomomo has quit [Quit: momomomomo]
Scroff has quit [Remote host closed the connection]
otherj has joined #ruby
<jhass> yeah, that part seems right
<ivanskie> perhaps a dumb question...
<ivanskie> warning: redefining Object#initialize may cause infinite loop
<ivanskie> whats wrong with me writing my own initialize block?
mary5030_ has joined #ruby
air__ has quit [Ping timeout: 246 seconds]
<ivanskie> its not in a module.. just a single lonesome .rb file
<BrianBoyko1> Hmm... I don't understand why the code breaks when I add my logging code, but worked before...
<jhass> BrianBoyko1: my guess is it fails in the Stripe call before that already, we can verify if you just add a puts e.backtrace or LOG.error(e.backtrace) in lines 178, 185 and 196 and share the output
<jhass> oh, you had it working locally before?
mary5030 has quit [Ping timeout: 252 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BrianBoyko1> okay. That'll show up in the console, correct?
<jhass> ?code ivanskie
<ruboto> ivanskie, We can't help you without your code, please post it to https://gist.github.com
wallerdev has quit [Quit: wallerdev]
snockerton has quit [Quit: Leaving.]
<jhass> BrianBoyko1: I hope so
atomical has joined #ruby
<ivanskie> im not worried about refactoring at this point.. just need basic functionality laid out then will refactor and all that.
<jhass> ivanskie: ah well. Okay the issue here is that toplevel methods are actually added as private methods to the class Object which is the default base class for all other classes
charliesome has quit [Quit: zzz]
<BrianBoyko1> It's not generating anything other than POST https://thisguy-donation.herokuapp.com/charge 500 (Internal Server Error)
snockerton has joined #ruby
<jhass> ivanskie: so you redefine the default initialize method of all classes that don't define their own
mikecmpbll has joined #ruby
<ivanskie> hmm.
snockerton has quit [Client Quit]
<jhass> best just pick a different name
<ivanskie> what would be the best practice here? make my own class?
<jhass> yes
<abyss> [k went home? bnagy thank you for your help. Tommorow I will check it on 2.x ruby.
<ivanskie> im usually working with rails. so this is a first doing Ruby alone stuff..
<jhass> BrianBoyko1: nothing in the logs? hard to believe...
<jhass> running on heroku? check heroku logs iirc
<BrianBoyko1> Heroku has logs?
<jhass> sure!
Zai00 has quit [Quit: Zai00]
<jhass> heroku logs as command literally
<jhass> iirc
moloch is now known as zly
workmad3 has joined #ruby
<ivanskie> ah nice
zly has quit [Changing host]
zly has joined #ruby
<ivanskie> okay moving on. thanks!
khebbie has joined #ruby
<jhass> ivanskie: btw ruby's community is strong on using snake_case instead of headlessCamlCase ;)
<ivanskie> alright
<BrianBoyko1> 2015-06-22T19:33:02.203694+00:00 app[web.1]: PG::ConnectionBad - could not connect to server: No such file or directory
<Aria> unix domain socket connection
<Aria> And it's not where it expects it to be.
<ivanskie> yeah this stuff is mixing with me trying to learn JS and Ember lol.. earlier I was scratching my scrambled brain head trying to remember how to declare a function in ruby.. i was like. do not ask in irc!
<jhass> :P
<Aria> I do wish language channels were more polyglot friendly.
bronson has quit [Remote host closed the connection]
<jhass> let's make a new channel for each combination!
ziprar is now known as zipace
<ivanskie> lol
<jhass> #cppandabitperlandjs
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
<BrianBoyko1> Jember. Rubescript, Javerlang
<ivanskie> might as well name it #brainscrambler-cppanddabitperlandjs
<ivanskie> no one will ever know what ur talking about
<jhass> BrianBoyko1: so yeah, your connect call doesn't fit what you can reach on Heroku
<jhass> where's the DB supposed to be?
fsvehla has quit [Quit: fsvehla]
<BrianBoyko1> Well, it's telling me the URL is postgres://qucsbxejiqhfnl:CQkNveZA21tUrTs046lhgHcBGg@ec2-54-227-247-161.compute-1.amazonaws.com:5432/d1e3fv1kfb1muf
<Aria> GOodness.
symm- has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<BrianBoyko1> so, uh...
freerobby has joined #ruby
<BrianBoyko1> ...mars.
<jhass> https://devcenter.heroku.com/articles/heroku-postgresql#connecting-in-ruby of course heroku only has a Rails example :/
<BrianBoyko1> it's probably on Mars.
<BrianBoyko1> Can I put this ruby app on rails?
<BrianBoyko1> (if I knew what rails was)
<jhass> no
bronson has joined #ruby
platzhirsch has joined #ruby
<jhass> so, if you peek at the python example, I think we can do something similar
roger_rabbit has quit [Ping timeout: 276 seconds]
<BrianBoyko1> ding ding ding, we're now on programming language # 4!
<jhass> require "uri" at the top
<jhass> uri = URI.parse(ENV["DATABASE_URL"]) in the method
<BrianBoyko1> You sure it's URI and not URL?
<jhass> yep
freerobby has quit [Client Quit]
crdpink2 has joined #ruby
<jhass> :database => uri.path[1..-1]
asmodlol has quit [Ping timeout: 255 seconds]
<jhass> :user = uri.user
<jhass> * =>
<jhass> you get the idea
EllisTAA has joined #ruby
crdpink has quit [Ping timeout: 248 seconds]
baweaver has quit [Ping timeout: 246 seconds]
<jhass> :password => uri.password, :host => uri.host, :port => uri.port
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
<EllisTAA> why isn’t an api called an ari - application resource interface? aren’t we getting resources?
kenpoint has quit []
<jhass> not in all cases, no
<jhass> API is very general term
<ivanskie> ok I have no idea what I'm doing now
jerius has quit [Quit: /quit]
<ivanskie> do I add PrintJobs.new on the bottom somewhere? or.. lolz i feel dumb now. wow way out of practice
asmodlol has joined #ruby
<jhass> ivanskie: yep, exactly that
<EllisTAA> jhass: what would those other cases be doing?
<jhass> EllisTAA: trigger an action for example
<jhass> like "turn on the light"
<EllisTAA> so that would be using a post method?
jerius has joined #ruby
<atmosx> ivanskie: readData(file) <-- line 18 is not defined
<jhass> in a RESTful web based API, likely, or a PUT to update the state of the light resource, but you don't have to model it that way
<EllisTAA> ah i see
<ivanskie> oooh
<ivanskie> thank you
malconis_ has quit [Ping timeout: 256 seconds]
malconis has joined #ruby
<atmosx> ivanskie: you probably mean read_data(file)
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ivanskie> yes indeed
<EllisTAA> so if apis only accepted get requests it would be just a way to access resources, but since it can accept puts or delete or post it is called a programming interface
atom3 has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Read error: Connection reset by peer]
<ivanskie> ok now if I knew how to properly work with csv.. (reading docs, and examples)... I think the best way here.. would be to build an array of files inside the get_files block..
<ivanskie> method*
<EllisTAA> so an api is an api because you can create read update and delete?
<atmosx> ivanskie: you don't need the initialize method either
<jhass> EllisTAA: I'm sure there are API's out there that let you trigger stuff via GET's, not saying they're pretty but it doesn't disqualify them for the term API
<ivanskie> oh?
<ivanskie> thought it looks better with it. but..
<EllisTAA> gotcha ty
<atmosx> ivanskie: you're not setting any instance variables, why do you need it?
peter_paule has quit [Ping timeout: 265 seconds]
<ivanskie> good point
<atmosx> you dont. Your class looks more like a module to me :-)
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> BrianBoyko1: ah no, I meant to replace the parameters in the PG.connect call with that
sinkensabe has joined #ruby
<ivanskie> i think it is too.
AlphaAtom has joined #ruby
<jhass> BrianBoyko1: ENV accesses the environment variables, like you can see with heroku config
<BrianBoyko1> okay.
<jhass> BrianBoyko1: so literally uri = URI.parse(ENV["DATABASE_URL"])
<ivanskie> basically what I have to work with.. is.. something else out there.. creates a new csv file every day... then once something gets printed, the csv file gets populated with some information like what got printed, productID etc...
<jhass> BrianBoyko1: and then use uri to pull out the values in the PG.connect call
<jhass> BrianBoyko1: don't forget to pull out the host and port too
Zai00 has joined #ruby
<ivanskie> what I need to do is read each CSV file.. and count how many times each unique productID got printed.. or is mentioned per day..
Ilyas has quit [Ping timeout: 272 seconds]
iPdev has joined #ruby
<ivanskie> man this is like most basic ruby stuff.. yet I feel like im in ruby 101 class.
<jhass> BrianBoyko1: yes close, like this http://paste.mrzyx.de/p4imklzsn
Igorshp has quit [Remote host closed the connection]
<ivanskie> if only it was an activerecord database lol
galeido^ has quit [Remote host closed the connection]
jerius has quit [Quit: /quit]
pipework is now known as Spaceghostc2c
MuffinPimp has quit [Quit: ZNC - http://znc.in]
MuffinPimp has joined #ruby
two-gun_ has left #ruby [#ruby]
sinkensabe has quit [Remote host closed the connection]
skyjumpe1 has joined #ruby
freerobby has joined #ruby
<ivanskie> oooh
<ivanskie> pretty
<ivanskie> ic what u did ther
<BrianBoyko1> And I use the real URL, not DATABASE_URL, right?
User458764 has joined #ruby
<atmosx> ivanskie: Well, once you read the CSV data you can do anything you want, it's not hard. Just try to analyze the problem and take one step at a time.
<atmosx> ivanskie: once you have a owrking version, (no matter how long/wrong/bad) you can start to optimize your code.
<ivanskie> yep. gonna try to play around in irb for a bit
<jhass> BrianBoyko1: no, ENV["DATABASE_URL"] obtains the real one
charliesome has joined #ruby
<ivanskie> cause one tutorial showed the headers thing.. and he was doing .to_a.map { |row| row.to_hash }.. but that doesn't work if i do my_data = CSV.read.. works only with CSV.new but then he doesn't actually show how to work with arrays of hashes later.. which sounds basic.. but i can're remember
<ivanskie> can't
<jhass> ?pry ivanskie
<ruboto> ivanskie, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ’binding.pry’ directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
<ivanskie> i've got pry installed
<jhass> just because you said irb ;P
<atmosx> jhass: what makes pry superior?
<jhass> atmosx: see above ;)
<ivanskie> colors
<ivanskie> :)
<bougyman> everything
<ivanskie> lol
jerius has joined #ruby
<ivanskie> its got the most important improvement.. its got pretty colors :)
<ivanskie> its what counts right?
<ivanskie> :P
baxx has quit [Ping timeout: 244 seconds]
freerobby has quit [Quit: Leaving.]
<bougyman> edit BlahObject
<bougyman> is the #1 best feature
<bougyman> repl-based iterative programming
atom3 has joined #ruby
momomomomo has joined #ruby
Rollabunna has joined #ruby
freerobby has joined #ruby
otherj has quit [Quit: .]
<dudedudeman> the pry link in that above bit jhass is broken
djbkd has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jhass> works fine here
<bougyman> same
bluish has left #ruby ["Good Bye"]
<dudedudeman> i get this guy: ERR_SSL_VERSION_OR_CIPHER_MISMATCH
<dudedudeman> ah, taking the https:// off the front worked
<jhass> oO ssleuth rates it 9.0, get a recent openssl
romero has joined #ruby
<BrianBoyko1> Now I've got Failed to load resource: the server responded with a status of 503 (Service Unavailable)
<BrianBoyko1> and the checkout doesn't work.
<BrianBoyko1> I think I may have accidentially did something to the pub key
<jhass> git to the rescue?
Jackneill has quit [Ping timeout: 265 seconds]
<atmosx> This OSX Activiy Monitor thing is really awesome.
k3asd` has joined #ruby
* atmosx is playing with threads
<BrianBoyko1> Hold on. I forgot the commas
wallerdev has joined #ruby
<BrianBoyko1> 90% of the time the problem is unsolvable, it is do to a stray punctuation mark that is either where it shouldn't be, or isn't where it should.
momomomomo has quit [Client Quit]
<ivanskie> how can I work with an array of hashes like this: #<CSV::Row dropdate:"19/06/15" droptime:"10:07:41" drop:"03" productid:"124" serialno:"30">
<ivanskie> ?
freerobby has quit [Ping timeout: 248 seconds]
Rollabunna has quit [Ping timeout: 248 seconds]
<jhass> mmh, you could've just copy pasted my stuff :P
<BrianBoyko1> Still have payment failed: reason unknown error
<jhass> what do the logs say now?
<atmosx> ivanskie: show the code that result
<jhass> ivanskie: you can treat CSV::Row's like that like a hash
<jhass> row[:dropdate]
symm- has joined #ruby
Spaceghostc2c is now known as |work
<BrianBoyko1> 2015-06-22T20:08:35.799334+00:00 app[web.1]: PG::ConnectionBad - invalid connection option "database"
__butch__ has joined #ruby
<jhass> uh, duh
droidburgundy has quit []
<jhass> I guess it was dbname
<BrianBoyko1> okay...
<atmosx> 178 seconds without threads, 78 seconds with threads.
tvw has joined #ruby
<BrianBoyko1> one second, gonna run to the WindowsME while this compiles.
<ivanskie> i might not even need to do the header stuff..
decoponio has quit [Quit: Leaving...]
Cust0sLim3n has quit [Ping timeout: 248 seconds]
<ivanskie> really i just need the count of each unique productid per file..
blackmes2 has quit [Ping timeout: 276 seconds]
framling has quit [Quit: errands]
jacor has quit [Read error: Connection reset by peer]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jacor has joined #ruby
<jhass> ivanskie: my answer still holds...
<ivanskie> i was thinking of get list of files > on each file, print birthdate in human date like i did in work.rb earlier > do my count and print each product id followed by its count.
<ivanskie> yeah
<jhass> .map {|row| row[:productid] }
<ivanskie> oh
<ivanskie> ooooh o.O awesome
<ivanskie> thank you
<BrianBoyko1> 2015-06-22T20:15:56.094497+00:00 app[web.1]: TypeError - no implicit conversion of String into Integer:
<BrianBoyko1> 2015-06-22T20:15:56.094503+00:00 app[web.1]: app.rb:103:in `log_donation'
<BrianBoyko1> app.rb:164:in `block in <main>'
vikaton has quit [Quit: Connection closed for inactivity]
havenwood has quit [Ping timeout: 256 seconds]
<jhass> BrianBoyko1: what's the code?
<BrianBoyko1> 103: conn.exec("INSERT INTO donors VALUES (?, ?);", email, amount)
<jhass> oh
<BrianBoyko1> 164: log_donation(@email, @amount)
<BrianBoyko1> you know, I might be at fault here.
<jhass> I guess you created the schema as an integer for amount?
yh has quit [Ping timeout: 256 seconds]
<BrianBoyko1> I actually created the schema as a real for amount.
<BrianBoyko1> and I think it's passing an interger
<jhass> try email, amount.to_f)
droidburgundy has joined #ruby
shadoi has quit [Quit: Leaving.]
<BrianBoyko1> well, I really should keep it as intergers.
<BrianBoyko1> so I'm going to change the schema in the database.
<jhass> it complains it's a String though
<jhass> so then to_i instead of to_f
<ivanskie> brilliant
revath has quit [Ping timeout: 276 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Excelsior2015_ has quit [Ping timeout: 255 seconds]
jerius has quit [Quit: /quit]
EllisTAA has quit [Quit: EllisTAA]
djbkd has joined #ruby
lfox has joined #ruby
shadoi has joined #ruby
Papierkorb has joined #ruby
<BrianBoyko1> TypeError - wrong argument type String (expected Array):
benegget_ has joined #ruby
<jhass> line?
<jhass> 103 still?
<BrianBoyko1> didn't give me one
beneggett has quit [Ping timeout: 252 seconds]
<jhass> huh
Pwnna has joined #ruby
ledestin has joined #ruby
<jhass> try ", [email, amount.to_i]) anyway
<BrianBoyko1> 2015-06-22T20:25:45.320793+00:00 app[web.1]: TypeError - wrong argument type String (expected Array):
<Pwnna> how do you get the threadid of a thread?
<Pwnna> like. i'm looking for `syscall( __NR_gettid )`
atom3 has quit [Ping timeout: 276 seconds]
<jhass> BrianBoyko1: the line is probably on the next line of the log
<BrianBoyko1> nope.
<BrianBoyko1> Looking at it.
atom3 has joined #ruby
soulcake has quit [Ping timeout: 276 seconds]
<BrianBoyko1> So, this is what we want? : log_donation([@email, @amount.to_i])
<jhass> no
<jhass> in 103
soulcake has joined #ruby
<BrianBoyko1> oh, then let's try this: conn.exec("INSERT INTO donors VALUES (?, ?);", email, amount.to_i)
<Senjai> Alright
jerius has joined #ruby
<Senjai> I has a question this time
Cust0sLim3n has joined #ruby
<Senjai> Given the following structure: https://gist.github.com/Senjai/7aa67dd16790a8db9ab1
awer has joined #ruby
fabrice31 has joined #ruby
Guest54 has joined #ruby
<BrianBoyko1> TypeError - wrong argument type String (expected Array):
lfox has quit [Quit: Textual IRC Client: www.textualapp.com]
Lucky_ has joined #ruby
momomomomo has joined #ruby
<BrianBoyko1> okay, let's try this.
<Senjai> I want to get all ids for priority: 0 to perform an operation, then all ids for priority 1, until there are no more ids for the incrementing priority
<jhass> BrianBoyko1: actually looking at pg's docs: conn.exec_params("INSERT INTO donors VALUES ($1, $2)", [email, amount.to_i])
<Guest54> hey guys i'm looking at a code emersion class that focuses on Ruby Development.
momomomomo has quit [Client Quit]
Igorshp has joined #ruby
<Senjai> I'm probably going to try and change the data structure to make it easier
<Guest54> any front-end dev people here who use ruby regularly?
Igorshp has quit [Remote host closed the connection]
<Senjai> so I can do an each over the key value pairs
<Senjai> unless someone has a better solution
<Senjai> Guest54: Almost every webdev
<Senjai> That uses rails
<Senjai> that is
<BrianBoyko1> :(
<BrianBoyko1> Well, let's try it.
patteh_ has quit [Quit: Lost terminal]
nveselinov has quit [Quit: Connection closed for inactivity]
baweaver has joined #ruby
<Guest54> Senjai how hard to learn compared with something like php or node?
patteh has joined #ruby
<Senjai> PHP is a terrible language, and node requires you to write javascript
<BrianBoyko1> Good News/Bad News
<Senjai> so I would suggest Ruby, for sure
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BrianBoyko1> Good news - the transaction went through
<BrianBoyko1> Bad news, it's not in the database.
<jhass> wat
<Guest54> so easier then those two?
failshell has joined #ruby
fabrice31 has quit [Ping timeout: 248 seconds]
<Guest54> mysql supported?
<BrianBoyko1> I probably messed up when re-creating the table to use INT instead of real#
<Guest54> i'm sure it is
<jhass> BrianBoyko1: it should error if it failed to insert though
<failshell> so im printing the output of a script, which has colored output. id like to remove the control codes for the color, before saving the output to a file. any idea how to do that?
yh has joined #ruby
workmad3 has joined #ruby
<failshell> not printing, but writing
nahtnam has quit [Quit: Connection closed for inactivity]
fantazo has quit [Quit: Verlassend]
kerrizor has quit [Quit: Textual IRC Client: www.textualapp.com]
freerobby has joined #ruby
dgutierrez1287 has joined #ruby
<BrianBoyko1> Dammit... now I'm getting Kernel Panic - not syncing: Fatal exception in interrupt
<BrianBoyko1> ...
* BrianBoyko1 giggles
<BrianBoyko1> Only kidding. IT WORKED!!!!!
<BrianBoyko1> The transaction went through AND it's in the database!
<BrianBoyko1> Works perfectly!
<BrianBoyko1> FINALLY!
<BrianBoyko1> THANKS TO YOU!
<failshell> kernel panic is always a great success
<BrianBoyko1> And our Pair Coding Skill.
* BanzaiJoe wonders 'does Ruby even have Kernel Panic?'
<BanzaiJoe> specifically 'Panic'?
<BrianBoyko1> (mostly your skill and my panic)
wallerdev has quit [Quit: wallerdev]
DroidBur_ has joined #ruby
droidburgundy has quit [Remote host closed the connection]
uber_ has quit [Ping timeout: 276 seconds]
langlands has joined #ruby
Ray` has joined #ruby
DroidBur_ has quit [Client Quit]
droidburgundy has joined #ruby
sinkensabe has joined #ruby
DroidBur_ has joined #ruby
DroidBur_ has quit [Client Quit]
<ivanskie> well.. i could probably get it to look better.. but so far, this is what i got, thanks to jhass
micmus has quit [Quit: Leaving]
<Guest54> can anyone recommend a good getting started book for ruby?
sinkensabe has quit [Remote host closed the connection]
<jhass> ivanskie: data.uniq.size
<jhass> oh, nvm
papercod1 has quit [Quit: WeeChat 0.4.3]
<jhass> counts = data.group_by(&:itself).map {|id, occurrences| [id, occurrences.size] }.to_h
<ivanskie> Guest54 The Well-Grounded Rubyist
tamarin has joined #ruby
<Guest54> thanks ivanskie
papercode has joined #ruby
Pupeno_ has joined #ruby
<tamarin> I'm trying to do a YAML.load, but it looks like some of my hashes are coming in as strings (ie: ":myhash"). Any idea what would cause that?
<Guest54> ivanskie now i'm a beginner, and i'm still unclear on the rails and ruby side of things
<phat4life> learn ruby first, then rails
<Guest54> is this still a good recommendation? for a beginner?
<ivanskie> im a more advanced beginner lol... but i'd recommend start with ruby.. then move into rails. rails is basically a bunch of ruby gems slapped together into a beautiful framework.. (beautiful is subjective)
<bougyman> don't bother learning ruby if you plan on using rails.
<ivanskie> it depends on how you learn better. reading, video, or class
<Guest54> whoa whoa here's where i'm getting confused
<ivanskie> and you don't need to be a pro at ruby to write rails, like bougyman said
<Guest54> where did you guys start?
<Guest54> start with ruby?
<ivanskie> i started with rails...
Boohbah has quit [Ping timeout: 246 seconds]
<Guest54> shoot....
<ivanskie> but i always do everything backwards
<ivanskie> and everyone i've asked before said learn Ruby
Pupeno has quit [Ping timeout: 276 seconds]
<Guest54> thanks phat, let me check this out and i'll be back with my questions
<phat4life> and lastly read http://www.poodr.com/
asmodlol has quit [Ping timeout: 256 seconds]
<ivanskie> also try ruby coans
<phat4life> and read rails anti patterns
<phat4life> when you get to rails
<ivanskie> a really good book for rails is Rails 4 in Action
bogdanteleaga has quit [Ping timeout: 265 seconds]
<phat4life> i feel like most of the ruby programmers i know didn't come from oop backgrounds
<phat4life> and you start with Rails, its a very narrow view of oop
<ivanskie> it covers a lot of what basic tutorials cover, plus introduces you to more stuff that you'd usually come across when develping rails apps
uber has joined #ruby
<BrianBoyko1> When I get this site built, I'll learn some ruby. I thought I could get by by programming in one language and branching out to others later. But... as this project has just shown, you've got to be a polyglot to make it in the world today.
asmodlol has joined #ruby
User458764 has joined #ruby
<phat4life> i mean, most languages are easy to pick up, just learn fp, oop, thos apply to many languages
<phat4life> the problem is knowing all the crazy gems or libraries, that is what differentiates you
skade has joined #ruby
<Guest54> word thanks phat4life, i think these design patterns might be a good starting point
Rollabunna has joined #ruby
<phat4life> that one is excellent
bar0n has quit [Quit: Page closed]
acke has quit [Remote host closed the connection]
void has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
Rapier- has quit [Quit: (null)]
droidburgundy has quit []
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby
void has quit [Client Quit]
Rollabunna has quit [Ping timeout: 276 seconds]
yfeldblum has joined #ruby
failshell has quit []
snockerton has joined #ruby
umgrosscol has quit [Remote host closed the connection]
<Guest54> phat4life, just ordered it. thanks so much for the recommendation.
diegoviola has quit [Remote host closed the connection]
tamarin has left #ruby ["Good Bye"]
bohallor has quit [Ping timeout: 252 seconds]
baxx has joined #ruby
BrianBoyko1 has quit [Read error: Connection reset by peer]
Ilyas has joined #ruby
Ilyas has quit [Remote host closed the connection]
phutchins has joined #ruby
blue_deref has quit [Quit: bbn]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
langlands has quit [Ping timeout: 272 seconds]
spider-mario has quit [Ping timeout: 252 seconds]
skyjumpe1 is now known as skyjumper
skyjumper has quit [Changing host]
skyjumper has joined #ruby
ldnunes has quit [Quit: Leaving]
platzhirsch has left #ruby [#ruby]
sarkyniin has quit [Ping timeout: 265 seconds]
benegget_ has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
roolo has quit [Remote host closed the connection]
casadei has quit [Remote host closed the connection]
spider-mario has joined #ruby
bruno- has quit [Ping timeout: 248 seconds]
Agoldfish has joined #ruby
subtwo has joined #ruby
rafaelsales has quit [Remote host closed the connection]
rafaelsales has joined #ruby
bhorn1 has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
rbennacer has quit [Ping timeout: 252 seconds]
hal_9000 has joined #ruby
pengin has joined #ruby
rafaelsales has quit [Remote host closed the connection]
rafaelsales has joined #ruby
beneggett has joined #ruby
d10n-work has joined #ruby
atom3 has quit [Ping timeout: 277 seconds]
Yiota has joined #ruby
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 248 seconds]
iPdev is now known as suited_pdev
atom3 has joined #ruby
danzilio has joined #ruby
n008f4g_ has quit [Ping timeout: 272 seconds]
endash has quit [Quit: endash]
sarkyniin has joined #ruby
scpike_ has quit [Quit: leaving]
scpike has joined #ruby
sinkensabe has joined #ruby
<ivanskie> what do you guys use to compile a ruby into a windows executable
<ivanskie> to run on a machine without ruby and etc etc..
<ivanskie> ?
<ivanskie> im having not so great time with visualruby.. it just doesnt run.
<ivanskie> i found ocra so far..
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sinkensabe has quit [Remote host closed the connection]
JakFrist has joined #ruby
doublemalt_ has joined #ruby
Guest54 has quit [Quit: Textual IRC Client: www.textualapp.com]
vasilakisfil__ has quit [Ping timeout: 256 seconds]
<adaedra> you can also bundle ruby with your program, or require ruby to be installed
<jhass> traveling ruby comes to mind
sinkensabe has joined #ruby
Alayde has joined #ruby
<ivanskie> traveling ruby seems nice
geiltalasdair has joined #ruby
geilt has quit [Read error: Connection reset by peer]
<ivanskie> looks like visualruby is a relic
Deele has quit [Ping timeout: 256 seconds]
<ivanskie> ok i guess so far i want to try Shoes 4.. and Ocra or traveling ruby
jenrzzz has joined #ruby
DoubleMalt has quit [Ping timeout: 265 seconds]
seitensei has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
tcrypt has quit [Read error: Connection reset by peer]
michael_mbp has quit [Excess Flood]
seitensei has joined #ruby
tcrypt has joined #ruby
Alayde_ has quit [Ping timeout: 272 seconds]
_ixti_ has quit [Quit: WeeChat 1.2]
Pupeno has joined #ruby
chris2 has quit [Ping timeout: 272 seconds]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
Pupeno_ has quit [Ping timeout: 264 seconds]
unreal_ has quit [Ping timeout: 264 seconds]
michael_mbp has joined #ruby
User458764 has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
papercode has quit [Ping timeout: 277 seconds]
sinkensabe has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
unreal has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eggoez has quit [Ping timeout: 248 seconds]
jerius has quit [Read error: Connection reset by peer]
mary5030_ has quit [Remote host closed the connection]
jerius has joined #ruby
seitensei has quit [Read error: Connection reset by peer]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
papercode has joined #ruby
dopie has quit [Read error: Connection reset by peer]
dopie has joined #ruby
seitensei has joined #ruby
BackEndCoder has quit [Ping timeout: 252 seconds]
baweaver has quit [Remote host closed the connection]
<weaksauce> is there anything that converts between "ModuleName" <==> "module_name" built into ruby or is it more of a roll your own thing
Rollabunna has joined #ruby
Iskarlar has quit [Ping timeout: 246 seconds]
mahlon has quit [Read error: Connection reset by peer]
akkad has quit [Ping timeout: 264 seconds]
cschneid has quit [Ping timeout: 252 seconds]
rikai has quit [Quit: No Ping reply in 180 seconds.]
<jhass> activesupport/rails has some
<jhass> ruby, nope
<Senjai> weaksauce: "ModuleName".underscore
<Senjai> iirc
<Senjai> in active support
Cork has quit [Ping timeout: 245 seconds]
<yorickpeterse> brrrr activesupport
<weaksauce> ah gotcha.
Sypheren_ has quit [Ping timeout: 256 seconds]
dented42 has joined #ruby
chris2 has joined #ruby
ddfreyne has quit [Ping timeout: 272 seconds]
rikai has joined #ruby
super has quit [Ping timeout: 256 seconds]
existensil has quit [Ping timeout: 256 seconds]
Hijiri has quit [Ping timeout: 252 seconds]
sparr has quit [Ping timeout: 252 seconds]
momomomomo has joined #ruby
asmodlol has quit [Ping timeout: 254 seconds]
<adaedra> .gsub(/[A-Z]/) { |e| "_#{e.downcase}" }.sub(/^_/, '')
skade has joined #ruby
<Senjai> yorickpeterse: <3 activesupport
<Senjai> parts of it
godemperor has quit [Ping timeout: 256 seconds]
Sypheren has joined #ruby
dseitz has joined #ruby
<yorickpeterse> I've not found a single part of it that I found useful
<Senjai> which is active supports implimentation
<yorickpeterse> (that mandated ActiveSupport)
mahlon has joined #ruby
foobarbaz has joined #ruby
<Senjai> Wow, that underscore does a lot of passes..
bkxd has joined #ruby
asmodlol has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
super has joined #ruby
geiltadecht has joined #ruby
geiltadecht has quit [Read error: Connection reset by peer]
geilt has joined #ruby
vdamewood has joined #ruby
blaines has quit [Ping timeout: 246 seconds]
<adaedra> :x
<Senjai> yorickpeterse: That's fair.
cschneid has joined #ruby
<Senjai> I cant think of anything that would make me bring in active support
yfeldblum has quit [Remote host closed the connection]
<Senjai> but when its already there, there are parts of it that are helpful
<Senjai> and other parts that are super silly
djbkd has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
<Senjai> I would maybe want the inflector
blaines has joined #ruby
marienz has quit [Ping timeout: 606 seconds]
<Senjai> the cache maybe, and other random things
sparr has joined #ruby
<adaedra> you have facets implementation too https://github.com/rubyworks/facets/blob/master/lib/core/facets/string/snakecase.rb (cc weaksauce)
<Senjai> The mini gzip class isn't terrible either
<Senjai> just a bunch of random stuff
BackEndCoder has joined #ruby
acke has joined #ruby
centrx has joined #ruby
yfeldblum has joined #ruby
akkad has joined #ruby
<yorickpeterse> ActiveSupport is a dumpster for all crap people come up with and don't want to put in dedicated Gems
<Senjai> yorickpeterse: Not disagreeing :P
djbkd has joined #ruby
<Senjai> Some of it should be attempted to be contributed to the stdlib
<adaedra> yep
dented42 has quit [Ping timeout: 246 seconds]
bkxd has quit [Ping timeout: 244 seconds]
geiltalasdair has quit [Ping timeout: 244 seconds]
dfockler has quit [Remote host closed the connection]
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
ddfreyne has joined #ruby
tvw has quit [Remote host closed the connection]
<adaedra> Good night
dented42 has joined #ruby
<jhass> Senjai: oh noes, they'll just try to make HWIA the default Hash again :O
<Senjai> jhass: Not that
<Senjai> there are obvious reasons why that is terrible
EllisTAA has joined #ruby
eggoez has joined #ruby
<jhass> I know, and still people proposed it! more than once1
<Senjai> I would care less if it was just there in the stdlib
foobarbaz has quit [Ping timeout: 246 seconds]
tvw has joined #ruby
djbkd has quit [Remote host closed the connection]
<Senjai> and people could use it if they choose
Cork has joined #ruby
casadei has joined #ruby
FernandoBasso has joined #ruby
yqt has quit [Ping timeout: 252 seconds]
acke has quit [Ping timeout: 276 seconds]
jaycee has quit [Read error: Connection reset by peer]
EllisTAA has quit [Client Quit]
blackmes2 has joined #ruby
freerobby has joined #ruby
<Ray`> then you end up with a bloated stdlib
A124 has quit [Remote host closed the connection]
asmodlol has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
A124 has joined #ruby
kirun has quit [Quit: Client exiting]
duderonomy has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marienz has joined #ruby
<Senjai> That's fair
existensil has joined #ruby
<Ray`> I mean, I'm using the most extreme example here:
<Senjai> I would probably argue about stdlib
<Ray`> took forever for this to get out http://php.net/manual/en/function.easter-days.php
<Senjai> Dude, thats php
<Senjai> apples and oranges
<Ray`> hence why I said extreme
<Senjai> self contained classes are a different story
godemperor has joined #ruby
A205B064 has joined #ruby
<Senjai> The most important thing about the stdlib is that it is reliable, and easy to maintain, not that its small
asmodlol has joined #ruby
yqt has joined #ruby
<Senjai> and doesnt change often
<Senjai> many things in AS fit that description
<Senjai> many dont
LJT has joined #ruby
<Ray`> aye
<Senjai> Ray of something terrible in the stdlib?
<Ray`> (I didn't have a ruby example to hand)
<Ray`> yeah
geiltalasdair has joined #ruby
<Ray`> right, I used that as a function due to the fact that it's a) useless and b) extra code to maintain
Agoldfish has quit [Quit: G'Bye]
<ivanskie> im trying the Opal thing... and it doesn't want to do anything says Opal::Builder::MissingRequire: A file required by "application" wasn't found.... and tries to look for it in opal's gem's directory..
momomomomo has quit [Quit: momomomomo]
danzilio has quit [Quit: Baiii!]
<jhass> ivanskie: maybe someone in #opal is alive
<Senjai> I have a gribe with open-uri
<Senjai> gripe*
<Senjai> as it monkey patches kernel
<Ray`> reasonable point
djbkd has quit [Ping timeout: 256 seconds]
User458764 has joined #ruby
jerius has quit [Quit: /quit]
momomomomo has joined #ruby
<Senjai> but I'm sure someone will tell me I'm wrong
<jhass> huh, what's wrong with tempfile?
<Senjai> Nothing, I just donth think it needs to exist :P
<eam> why not?
yh has quit [Ping timeout: 272 seconds]
<jhass> why should everybody reimplement it?
<eam> any module that wraps a basic libc function probably should exist, IMO
<Senjai> I didn't know it was a libc function
geilt has quit [Ping timeout: 248 seconds]
yh has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
<Senjai> eam: ty
rjno has joined #ruby
kies has quit [Ping timeout: 252 seconds]
FernandoBasso has quit [Quit: WeeChat 1.2]
minibar has quit [Ping timeout: 272 seconds]
chris2 has quit [Ping timeout: 277 seconds]
soulcake has quit [Ping timeout: 276 seconds]
momomomomo has quit [Client Quit]
frem has joined #ruby
soulcake has joined #ruby
geilt has joined #ruby
soulcake has quit [Changing host]
soulcake has joined #ruby
geiltalasdair has quit [Read error: Connection reset by peer]
<ivanskie> fond a workaround
FernandoBasso has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
shinnya has joined #ruby
c355E3B has quit [Quit: Connection closed for inactivity]
<Senjai> does someone have a better idea?
wildroman2 has quit [Remote host closed the connection]
crdpink2 has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crdpink has quit [Ping timeout: 248 seconds]
gambl0re has quit [Ping timeout: 272 seconds]
fabrice31 has joined #ruby
tvw has quit []
jenrzzz has quit [Ping timeout: 248 seconds]
choke has joined #ruby
djbkd has joined #ruby
__butch__ has quit [Quit: Linkinus - http://linkinus.com]
Zai00 has quit [Quit: Zai00]
asmodlol has quit [Ping timeout: 256 seconds]
geilt has quit [Read error: Connection reset by peer]
asmodlol has joined #ruby
geilt has joined #ruby
fabrice31 has quit [Ping timeout: 248 seconds]
minibar has joined #ruby
<jhass> join/includes & order, no?
<jhass> *joins
yh has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
nateberkopec has joined #ruby
Rapier- has joined #ruby
aryaching has quit [Ping timeout: 255 seconds]
<Senjai> jhass: I would have to do a n-way join
<Senjai> to do that instead of ruby
<Senjai> for each group_id, I have to add another join to the option_value table, which I can do programattically
<Senjai> but I've been shying away from i
geilt has quit [Ping timeout: 272 seconds]
<Senjai> egh, i didn't gist that part
<Senjai> sorry
bruno- has joined #ruby
minibar has quit [Max SendQ exceeded]
chris2 has joined #ruby
vasilakisfil__ has joined #ruby
kobain has quit [Ping timeout: 246 seconds]
raddazong has quit [Ping timeout: 250 seconds]
madhatter has joined #ruby
baweaver has joined #ruby
senayar has quit [Remote host closed the connection]
djbkd_ has joined #ruby
renderful has quit []
claw has quit [Ping timeout: 246 seconds]
senayar_ has joined #ruby
minibar has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
husanu has quit [Remote host closed the connection]
husanu has joined #ruby
zeroDi has quit [Quit: WeeChat 1.2]
wildroman2 has joined #ruby
zeroDivisible has joined #ruby
whippythellama has quit [Quit: WeeChat 1.2]
blazes816 has joined #ruby
devdazed has quit [Ping timeout: 256 seconds]
djbkd_ has quit [Ping timeout: 246 seconds]
zeroDivisible has quit [Remote host closed the connection]
zeroDivisible has joined #ruby
uptownhr has quit [Quit: uptownhr]
avahey has joined #ruby
scripore has joined #ruby
tcrypt has quit [Ping timeout: 246 seconds]
Iskarlar has joined #ruby
zenguy_pc has quit [Read error: No route to host]
baweaver has quit [Remote host closed the connection]
blazes816 has quit [Ping timeout: 276 seconds]
Rollabunna has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jglover has joined #ruby
<jglover> having some issues with a Thin server. Seems like it sporadically starts and stops reactor
<jglover> and sometimes doesn't start it for over an hour after deployment
<jglover> any ideas?
baweaver has joined #ruby
havenwood has joined #ruby
kobain has joined #ruby
last_staff has quit [Quit: last_staff]
Casty has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<ivanskie> well #opal's dead..
bluOxigen has quit [Ping timeout: 256 seconds]
<ivanskie> how do you include other ruby classes? like csv for example?
<ivanskie> oh nevermind
<ivanskie> lol nevermind already solved the problem i had. forgot (got a lot of crap going on at same time)
Rollabunna has quit [Ping timeout: 248 seconds]
<nofxxxx> ivanskie, does it work? csv on opal
<ivanskie> nofxxxx well.. i'll find out.. for now when I load my html console says failed to load resource.. opal is not defined... but i just realized i think i need to include opal.js separately?
slumos has left #ruby [#ruby]
<nofxxxx> ivanskie, sorry never played but it's in my todo list. But iirc, doesn't it precompile??
<ivanskie> *shrug*
<nofxxxx> ahh, even precompiled you need the main lib... I figure
RegulationD has quit [Remote host closed the connection]
thelastinuit has quit [Quit: Textual IRC Client: www.textualapp.com]
BanzaiJoe has quit []
rubie has quit [Remote host closed the connection]
bkxd has joined #ruby
rjno has quit []
rubie has joined #ruby
<ivanskie> heh. i build the opal.js and load it in html.. but it still tells me opal is not defined
<ivanskie> o.O
c355E3B has joined #ruby
rubie has quit [Remote host closed the connection]
jobewan has quit [Read error: Connection reset by peer]
k3asd` has quit [Ping timeout: 252 seconds]
towski__ has joined #ruby
dgutierrez1287 has joined #ruby
towski___ has joined #ruby
rubie has joined #ruby
rubie has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 252 seconds]
rubie has joined #ruby
Yiota has joined #ruby
zenguy_pc has joined #ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
towski_ has quit [Ping timeout: 248 seconds]
dstarh has joined #ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
<ivanskie> ya dunno im still getting ReferenceError: Opal is not defined
<ivanskie> even tho I load opal.js before my app.js
nateberkopec has quit [Quit: Leaving...]
<Senjai> ivanskie: This is pretty localized to opal, and doesn't sound totally related to ruby
rubie has quit [Remote host closed the connection]
<Senjai> Consider the mailing list perhaps?
<ivanskie> not at all.
rubie has joined #ruby
<ivanskie> maybe
zeroDivisible has quit [Quit: WeeChat 1.2]
<ivanskie> ok then I guess i need to go to plan b..
towski__ has quit [Ping timeout: 248 seconds]
zeroDivisible has joined #ruby
<ivanskie> how else can I get ruby executed without installing ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
<ivanskie> ocra is not working for me for some reason
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
PaulCapestany has joined #ruby
mois3x has joined #ruby
<havenwood> What are you trying to do? Distribute an app?
rubie has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 265 seconds]
nettoweb has joined #ruby
rubie has joined #ruby
Deele has joined #ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
ruv has quit [Ping timeout: 265 seconds]
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
htmldrum has joined #ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
<ivanskie> I'm trying to give the app to end user..
<ivanskie> so in short. yes. lol
ndrei has quit [Ping timeout: 246 seconds]
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
jglover has quit [Quit: leaving]
TheHodge has joined #ruby
duoi has quit [Ping timeout: 248 seconds]
rubie has quit [Remote host closed the connection]
zeroDivisible has quit [Quit: WeeChat 1.2]
pengin has quit [Remote host closed the connection]
<ivanskie> argh.. looks like i need to move over to my windows machine
rubie has joined #ruby
<ivanskie> dredded windows
rubie has quit [Remote host closed the connection]
zeroDivisible has joined #ruby
pengin has joined #ruby
atom3 has quit [Remote host closed the connection]
beneggett has quit [Quit: (╯°□°)╯︵ ┻━┻) - keep on keeping on]
nveselinov has joined #ruby
atom3 has joined #ruby
cir0x has quit [Quit: Leaving.]
<Senjai> Are you packaging just for windows?
<ivanskie> yep
<_blizzy_> are fibers the way to prevent blocking in ruby?
<_blizzy_> so two things can run at the same time without them blocking each other?
workmad3 has joined #ruby
<Senjai> _blizzy_: They cannot run at the *same* time, but fibers are like lightweight threads yeah,
<Senjai> They are concurrent, but not paralell
lucianosousa has quit [Quit: lucianosousa]
pengin has quit [Ping timeout: 248 seconds]
<_blizzy_> thanks, Senjai
<Senjai> _blizzy_: Unless you have a reason to use fibers, just use threads
jpfuentes2 has quit [Ping timeout: 246 seconds]
<_blizzy_> Senjai, oh ok, thank you.
dopie has quit [Quit: This computer has gone to sleep]
<_blizzy_> why wouldn't I use fibers then if they are light weight?
coffeeju1 has quit [Ping timeout: 245 seconds]
olso has joined #ruby
baxx has quit [Ping timeout: 246 seconds]
EllisTAA has joined #ruby
baweaver has quit [Remote host closed the connection]
baxx has joined #ruby
icebourg has quit []
<Senjai> Heh, depends on the operations I suppose
<Senjai> Looked up some material on it, I think I may have misunderstood fibers
workmad3 has quit [Ping timeout: 255 seconds]
axl__ has quit [Quit: axl__]
wildroman2 has joined #ruby
<_blizzy_> thxs 4 the link, Senjai
yh has joined #ruby
rubie has joined #ruby
rubie has quit [Remote host closed the connection]
<olso> why is ruby magical? take https://gist.github.com/anonymous/56d373c074169d03dfb7 replacing all occurences of substring in a string by accessing it like key => value, wtffff (coming from php)
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<olso> actually only first occurance
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<olso> which is even more wtf
<Senjai> olso: Hahahah, I didn't know about that. I would be explicit and use sub though
al2o3-cr has quit [Quit: the quieter you become, the more you are able to hear]
<mozzarella> olso: it works like gsub, it's not magical
<havenwood> olso: Try: poem.gsub 'toast', 'honeydew'
bronson has quit [Remote host closed the connection]
<havenwood> mozzarella: no g
workmad3 has joined #ruby
<mozzarella> alright
rubie has joined #ruby
<jhass> isn't String#[]= an alias for String#sub in fact?
<mozzarella> works like sub
rubie has quit [Remote host closed the connection]
<Senjai> jhass: I dont think it is..
<Senjai> I'm looking it up now
<olso> i dont know about this guys, i really want to dive into ruby (read rails world), i am only on first tutorial
<olso> where arou you looking in up Senjai?
<olso> you; it
<Senjai> olso: ^
<Senjai> click show source
<Senjai> If you have pry-doc you can use that to
<Senjai> I would assume subpat calls sub at some point
<olso> also, should i start with rails4 or wait for rails5? are "gems" (this sounds so hipsterish :D) compatible rails4 with rails5 or gems are just ruby packages, not rails packages?
<olso> sorry if this is too basic for you
<Senjai> olso: There is a RubyOnRails channel
<Senjai> olso: but just use 4
<olso> i want to learn the language first tho :P
Pupeno has quit [Quit: Leaving...]
workmad3 has quit [Ping timeout: 256 seconds]
<Senjai> olso: Do you know another language already?
<_blizzy_> is it me, but is using Fibers and Threads in EventMachine slow?
<Senjai> _blizzy_: Well, ruby is GIL'd. Also use Celluloid, EventMachine = sadness
michael_mbp has quit [Excess Flood]
<Senjai> I would recommend that
coffeeju1 has joined #ruby
<Senjai> if you're sure you want to continue learning
<_blizzy_> what's wrong with EM?
EllisTAA has quit [Quit: EllisTAA]
quazimodo has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jokke has quit [Ping timeout: 252 seconds]
rcs has quit [Ping timeout: 272 seconds]
<olso> i have the luxury of learning new stuff full time, im deciding between ruby, python, scala, go?
rubie has joined #ruby
rubie has quit [Remote host closed the connection]
<_blizzy_> olso, why not all 4?
<Senjai> _blizzy_: ^
<_blizzy_> but 1 at a time.
nettoweb has joined #ruby
<Senjai> olso: If you're new to the game, go with ruby or python
<_blizzy_> ^
rcs has joined #ruby
<Senjai> avoid scala and go until you have more of an understanding about generic computer science principles
<_blizzy_> it's obv which one we'll recommend you, but both are good.
<olso> i have few years of symfony (php) under my belt
<Senjai> ruby and python will hide that from you, until you get deep enough to where you need to learn it
<Senjai> PHP isn't programming :P
jokke has joined #ruby
<Senjai> It's throwing crap against a wall until enough of it sticks :P
<Senjai> </rant>
<Senjai> For reals though, you can write code well in PHP
<olso> thus i want to move away
<Senjai> it's just a horrible language
<_blizzy_> PHP is a ok langauge imo
<Senjai> olso: Go with ruby
<_blizzy_> I like it.
<Senjai> read the book
<_blizzy_> and yes, PHP is programming.
<_blizzy_> :P
<_blizzy_> also thxs for the link Senjai
<_blizzy_> i'll try the other one.
<olso> php is good these days, no need to hate
renier has joined #ruby
<Senjai> I'm going to drop this before it turns into a war :P
<Senjai> I'll leave that out there though
<_blizzy_> what olso said.
pietr0 has quit [Quit: pietr0]
<Senjai> Some of that is no longer applicable, but much of it is
michael_mbp has joined #ruby
<_blizzy_> but php is still good at what it does.
quimrstorres has joined #ruby
<Senjai> It's literally the worst tool for every problem :P. I'm going to stop now
bhorn1 has joined #ruby
<Senjai> _blizzy_: Read the article :P
pengin has joined #ruby
<olso> Senjai, that book looks nice, but im looking for something kind of "here is everything you should know about syntax, here is stuff you look it up in" and then i learn by doing
<_blizzy_> Senjai, I've read it.
<_blizzy_> learnxinyminutes.com
<bhorn1> Hey guys quick question. Creating a ruby gtk3 application as a sort of menu that I would like to stay on top of all windows at all times.
<bhorn1> I've figured out how to keep it on top, but I was wondering it there was a way to make the application take up a set amount of space on either side of the screen that other windows wouldn't go behind.
snockerton has quit [Quit: Leaving.]
<bhorn1> So it reacted similar to the way the unity bar does, just taking up a portion of the screen and when something gets maximized it will stay to the left of my application.
kaleido has joined #ruby
bronson has joined #ruby
<olso> thanks _blizzy_ , thats something i like :)
Rollabunna has joined #ruby
<_blizzy_> olso, :)
baweaver has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<Senjai> olso: I would avoid sites promising to learn things in minutes
jsaak has quit [Ping timeout: 264 seconds]
commondream has quit [Remote host closed the connection]
<Senjai> eventually you'll have to get a complete understanding of things, the best thing I can recommend is create your own project while cusing a proper resource
<Senjai> each chapter
davedev2_ has quit [Ping timeout: 256 seconds]
davedev24_ has joined #ruby
<Senjai> add a feature using what you learned to your application
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
yh has quit [Ping timeout: 248 seconds]
<olso> each data type is object? so i can just chain methods?
<olso> noice
<Senjai> olso: They dont all return self, but the ones that do, yeah
Rollabunna has quit [Ping timeout: 248 seconds]
wallerdev has quit [Quit: wallerdev]
quimrstorres has quit [Remote host closed the connection]
quimrstorres has joined #ruby
crdpink2 has quit [Ping timeout: 248 seconds]
crdpink2 has joined #ruby
rodfersou has quit [Quit: leaving]
ledestin has quit [Read error: Connection reset by peer]
<baweaver> Most of the chaining is from Enumerable.
arescorpio has joined #ruby
asmodlol has quit [Ping timeout: 246 seconds]
<baweaver> Anything that says learn x from y perspective I'm extremely skeptical of
<Senjai> ^^^^^^
wallerdev has joined #ruby
<baweaver> Because writing Ruby like Java or PHP is likely to get you in a bad way pretty fast.
<Senjai> Feel free to write it like Smalltalk though.
<baweaver> Write Ruby like Ruby, there are enough styleguides out there to set things straight.
<baweaver> granted a lot came from Smalltalk and Lisp
<baweaver> and Perl, but that'd get you in real hot water
<Senjai> From Lisp too eh?
<Senjai> Haven't heard that story
dfockler has joined #ruby
<Senjai> I thought it was mostly Smalltalk and Perl
<Senjai> What comes from lisp?
<baweaver> Where do you think blocks came from?
<Senjai> ah
<Senjai> that makes sense
<baweaver> and first class functions and some of the other parts like that.
<Senjai> Dodm
mizaki has joined #ruby
<Senjai> I thought blocks came from smalltalk too.
<baweaver> keyword args, garbage collection, conditional branches, symbols, first class functions, metaprogramming
<baweaver> those are are lisp descendant.
yoongkang has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
bhorn1 has quit [Quit: Leaving]
yoongkang has joined #ruby
<Senjai> Cool, good to know
<_blizzy_> so, in Event Machine, I would do
<_blizzy_> EventMachine.run do Stuff Goes Here end
JEG2 has quit [Quit: Connection closed for inactivity]
<_blizzy_> how would I achieve that in Celluloid?
<baweaver> _blizzy_: What have you tried?
acke has joined #ruby
<_blizzy_> baweaver, putting "include Celluloid" inside the class
yh has joined #ruby
dfockler has quit [Ping timeout: 265 seconds]
<baweaver> and have you read any of the docs yet?
<Senjai> _blizzy_: Gotta trudge through the celluloid wiki man
<_blizzy_> baweaver, no. c: Senjai, ok.
<Senjai> _blizzy_: Typically, try first, ask when it's not working how you expect it to :P
gianlucadv has quit [Ping timeout: 264 seconds]
husanu has quit [Remote host closed the connection]
<_blizzy_> ok. :P
michael_mbp has joined #ruby
husanu has joined #ruby
jsaak has joined #ruby
jasonw22 has joined #ruby
RegulationD has joined #ruby
radens has joined #ruby
framling has joined #ruby
duoi has joined #ruby
<radens> How do I install the ruby development headers on osx?
quimrstorres has quit [Remote host closed the connection]
dfinninger has joined #ruby
cpruitt has joined #ruby
DLSteve has quit [Quit: Leaving]
vasilakisfil__ has quit [Ping timeout: 256 seconds]
<baweaver> radens: What have you tried?
dgutierrez1287 has quit [Remote host closed the connection]
acke has quit [Ping timeout: 248 seconds]
<havenwood> radens: Already have XCode installed? Which package manager are you using?