havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ http://irclog.whitequark.org/ruby/
neanderslob_ is now known as neanderslob
PaulCape_ has quit [Quit: .]
pawnbox has quit [Ping timeout: 276 seconds]
sid_fules has joined #ruby
GriffinHeart has joined #ruby
Es0teric has joined #ruby
johnmilton has quit [Remote host closed the connection]
wldcordeiro has quit [Ping timeout: 252 seconds]
rubie has joined #ruby
mfb2 has joined #ruby
rahult has quit [Ping timeout: 244 seconds]
ensyde has joined #ruby
sid_fules has quit [Read error: Connection reset by peer]
statelesscode has joined #ruby
mfb2 has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
bronson has quit [Remote host closed the connection]
PaulCapestany has joined #ruby
rahult has joined #ruby
yfeldblum has joined #ruby
lemur has quit [Remote host closed the connection]
ixti has quit [Ping timeout: 240 seconds]
rcvalle has quit [Quit: rcvalle]
speaking1ode has quit [Ping timeout: 260 seconds]
diegoviola has joined #ruby
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
CloCkWeRX has joined #ruby
chipotle has quit [Quit: cheerio]
ssiris has joined #ruby
gnufied has quit [Quit: Leaving]
cdg has quit [Remote host closed the connection]
flashpoint9 has quit [Remote host closed the connection]
cdg has joined #ruby
baweaver has joined #ruby
gheegh has quit [Quit: Textual IRC Client: www.textualapp.com]
thejamespinto_ has joined #ruby
darkf has joined #ruby
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby
cdg has quit [Ping timeout: 268 seconds]
sid_fules has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
sid_fules has quit [Client Quit]
tw1sted has joined #ruby
bradleyprice has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
_djbkd has joined #ruby
thejamespinto has quit [Ping timeout: 260 seconds]
ensyde__ has joined #ruby
diegoaguilar has joined #ruby
pawnbox has joined #ruby
bradleyprice has quit [Ping timeout: 240 seconds]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
jenrzzz has quit [Ping timeout: 276 seconds]
jaguarmagenta has joined #ruby
ensyde has quit [Ping timeout: 250 seconds]
joneshf-laptop has quit [Ping timeout: 260 seconds]
idefine has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
idefine has joined #ruby
SilverKe_ has joined #ruby
fowl has joined #ruby
fowl was banned on #ruby by ChanServ [*!*@unaffiliated/fowlmouth]
fowl was kicked from #ruby by ChanServ [Banned: Obsessive troll, see http://logs.ryanbigg.com/p/fowl]
arlek_ has joined #ruby
yaewa has joined #ruby
mfb2 has joined #ruby
blackgoat_ has joined #ruby
dn`_ has joined #ruby
sdothum has quit [Ping timeout: 252 seconds]
moei has quit [Ping timeout: 252 seconds]
ICantCook has quit [Ping timeout: 252 seconds]
EdwardIII has quit [Ping timeout: 252 seconds]
nirix has quit [Ping timeout: 252 seconds]
rahult_ has joined #ruby
yude_ has joined #ruby
idefine has quit [Read error: Connection reset by peer]
diprotic has joined #ruby
unsymbol has quit [Ping timeout: 252 seconds]
monoprotic has quit [Ping timeout: 252 seconds]
jolts has quit [Ping timeout: 252 seconds]
davedev24 has quit []
pawnbox has quit [Ping timeout: 268 seconds]
idefine has joined #ruby
yaewa has quit [Client Quit]
blaxter has quit [Quit: KTHXBYE]
moei has joined #ruby
thai_ has quit [Ping timeout: 252 seconds]
alexherbo2 has quit [Ping timeout: 252 seconds]
dn` has quit [Ping timeout: 252 seconds]
nullwarp has quit [Ping timeout: 252 seconds]
alexblom has quit [Ping timeout: 252 seconds]
apeiros has quit [Ping timeout: 252 seconds]
xMopxShell has quit [Ping timeout: 252 seconds]
Authenticator has quit [Ping timeout: 252 seconds]
Kharma has quit [Ping timeout: 252 seconds]
dn`_ is now known as dn`
_djbkd has quit [Ping timeout: 252 seconds]
rubie has quit [Ping timeout: 252 seconds]
s2013 has quit [Ping timeout: 252 seconds]
SilverKey has quit [Ping timeout: 252 seconds]
gregf has quit [Ping timeout: 252 seconds]
blackgoat has quit [Ping timeout: 252 seconds]
BTRE has quit [Ping timeout: 252 seconds]
polishdub has quit [Ping timeout: 252 seconds]
kappy has quit [Ping timeout: 252 seconds]
armyriad has quit [Ping timeout: 252 seconds]
arlek__ has quit [Ping timeout: 252 seconds]
brainslug has quit [Ping timeout: 252 seconds]
yude has quit [Ping timeout: 252 seconds]
catpoop has quit [Ping timeout: 252 seconds]
Sammichmaker has quit [Ping timeout: 252 seconds]
segy has quit [Ping timeout: 252 seconds]
Takumo has quit [Ping timeout: 252 seconds]
kaleido has quit [Ping timeout: 252 seconds]
kriskropd has quit [Ping timeout: 252 seconds]
rahult has quit [Ping timeout: 252 seconds]
neanderslob has quit [Ping timeout: 252 seconds]
GodFather has quit [Ping timeout: 252 seconds]
binaryplease has quit [Ping timeout: 252 seconds]
darkxploit has quit [Ping timeout: 252 seconds]
bqscott has quit [Ping timeout: 252 seconds]
neanderslob has joined #ruby
ixti has joined #ruby
armyriad has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
kaleido has joined #ruby
flashpoint9 has joined #ruby
joneshf-laptop has joined #ruby
SilverKe_ has quit [Quit: Halted.]
kappy has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
ensyde__ has quit [Quit: Leaving]
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
_djbkd has joined #ruby
<baweaver> !unban fowl
stannard has joined #ruby
Spami has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
sapslaj_ is now known as sapslaj
thai_ has joined #ruby
xMopxShell has joined #ruby
nullwarp has joined #ruby
alexblom has joined #ruby
unsymbol has joined #ruby
torandu has quit [Ping timeout: 264 seconds]
bqscott has joined #ruby
sdothum has joined #ruby
apeiros has joined #ruby
ixti has quit [Ping timeout: 240 seconds]
symm- has quit [Ping timeout: 250 seconds]
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
torandu has joined #ruby
segy has joined #ruby
stannard has quit [Ping timeout: 250 seconds]
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
_djbkd has quit [Quit: My people need me...]
mfb2 has quit [Ping timeout: 250 seconds]
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
EdwardIII has joined #ruby
fowl has joined #ruby
fowl was kicked from #ruby by ChanServ [Banned: Obsessive troll, see http://logs.ryanbigg.com/p/fowl]
stunder has quit [Quit: WeeChat 1.4]
BTRE has joined #ruby
polishdub has joined #ruby
jolts has joined #ruby
mfb2 has joined #ruby
jolts has quit [Max SendQ exceeded]
gregf has joined #ruby
GodFather has joined #ruby
lemur has joined #ruby
darkxploit has joined #ruby
CausaMortis has quit [Ping timeout: 250 seconds]
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
catpoop has joined #ruby
nirix has joined #ruby
alexherbo2 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
moeabdol has joined #ruby
mnrmnaugh has joined #ruby
cdg has joined #ruby
binaryplease has joined #ruby
william3 has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
kriskropd has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
GriffinHeart has joined #ruby
mfb2 has quit [Ping timeout: 276 seconds]
flashpoint9 has joined #ruby
lemur has quit [Ping timeout: 250 seconds]
bruno- has quit [Read error: Connection reset by peer]
moeabdol has quit [Ping timeout: 260 seconds]
william3 has quit [Ping timeout: 250 seconds]
ixti has joined #ruby
jenrzzz has joined #ruby
Azure has quit [Ping timeout: 250 seconds]
flashpoint9 has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
bruno- has joined #ruby
mfb2 has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
Dimik1 has joined #ruby
bronson has joined #ruby
kareeoleez has joined #ruby
diegoviola has quit [Read error: Connection reset by peer]
stardiviner has joined #ruby
swills has joined #ruby
LoneHerm_ has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
kareeoleez has quit [Ping timeout: 276 seconds]
diegoviola has joined #ruby
lkba_ has quit [Ping timeout: 276 seconds]
workmad3 has joined #ruby
GriffinHeart has joined #ruby
johnmilton has joined #ruby
doublemalt_ has quit [Remote host closed the connection]
mfb2 has quit [Ping timeout: 250 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
mfb2 has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
smathy is now known as smathy_afk
rahult_ has quit [Ping timeout: 276 seconds]
thejamespinto_ is now known as thejamespinto
mfb2 has quit [Ping timeout: 246 seconds]
ropeney has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
GriffinHeart has joined #ruby
kaleido has quit [Changing host]
kaleido has joined #ruby
jpfuentes2 has joined #ruby
thejamespinto_ has joined #ruby
Authenticator has joined #ruby
mfb2 has joined #ruby
rubie has joined #ruby
brainslug has joined #ruby
thejamespinto has quit [Ping timeout: 250 seconds]
rodfersou has joined #ruby
LastWhisper____ has joined #ruby
Kharma has joined #ruby
mfb2 has quit [Ping timeout: 260 seconds]
idefine has quit [Read error: Connection reset by peer]
shibly has joined #ruby
idefine has joined #ruby
<shibly> What are the disadvantages of ruby?
<ropeney> lol
<kaleido> hard quaestion to answer when youre so specific, can you be ore vague?
<ropeney> it's all perspective
<pipework> shibly: They exist deep within yourself and are only manifested within ruby. It is a reflection of yourself.
bruno- has quit [Read error: Connection reset by peer]
xxneolithicxx has joined #ruby
johnmilton has quit [Remote host closed the connection]
idefine has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
idefine has joined #ruby
stannard has joined #ruby
<shibly> Can anyone answer?
kies has joined #ruby
rahult has joined #ruby
PaulCapestany has quit [Quit: .]
bruno- has joined #ruby
jgrevich has quit [Ping timeout: 244 seconds]
SilverKey has joined #ruby
vdamewood has quit [Quit: Life beckons.]
tenzan has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
<ramfjord_> shibly: ruby is not suitable for applications where performance is of paramount concern - be it memory or CPU
<ramfjord_> I worked a a company that made their own mapreduce framework in ruby - that was a really bad idea
<ramfjord_> similarly it would be a bad idea to use it for embedded systems
GriffinHeart has quit [Remote host closed the connection]
PaulCapestany has joined #ruby
<ramfjord_> ruby uses duck typing, which can be considered an advantage or a disadvantage. You're not going to get a nice IDE like eclipse to do a bunch of autocompletes for you, but you do get a lot of freedom
<havenwood> ramfjord_: mruby ftw?
ledestin has joined #ruby
baweaver has quit [Remote host closed the connection]
<havenwood> re embedded*
cdg has quit [Remote host closed the connection]
<ramfjord_> you miss out type safety, but most rubyists will argue that you should be guaranteeing behavior with unit tests anyway
cdg has joined #ruby
<shibly> Is using thread available and good in ruby?
GriffinHeart has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
wldcordeiro has joined #ruby
<ramfjord_> yeah, that... the main "Matz" ruby implementation (MRI) has a global interpreter lock which prevents multiple statements from being executed concurrently in a single process
<havenwood> shibly: Ruby uses system threads. It's implementation-specific whether or not there's a global vm lock but the reference implementation currently has one.
mfb2 has joined #ruby
markfletcher has joined #ruby
<shibly> So there is no problem with thread?
RegulationD has joined #ruby
<havenwood> shibly: Threads are a fairly low level concurrency primitive and they're fraught with peril.
rodferso1 has joined #ruby
<ramfjord_> There are languages with better built in concurrency support for a lot of use cases
william3 has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
<Arcaire> See: Go, Erlang.
<shibly> ramfjord_: What did you mean by performance?
<Arcaire> Probably better off with Go than Erlang to be honest.
cdg has quit [Ping timeout: 246 seconds]
<shibly> ramfjord_: Is performance related with cpu,memory?
<ramfjord_> I still get a lot of benefit out of using threads in ruby - they are super easy to use, just not super concurrent. Good for things like making concurrent API calls, where there may be a wait between each call
rodfersou has quit [Ping timeout: 276 seconds]
<ramfjord_> both - if you want to be super strict about your memory management, you probably don't want anything with a garbage collector built in
<ramfjord_> cpu sort of problems are often mitigated by using libraries which are backed by fast C libraries
<havenwood> shibly: See the general rules for using Threads in JRuby (same as other platforms): https://github.com/jruby/jruby/wiki/Concurrency-in-jruby#concurrency-basics
<Arcaire> >JRuby maps Ruby threads to Java threads, which are usually mapped directly to native threads.
<ramfjord_> for instance the ruby CSV library isn't slow at all, and I wouldn't chose anything else
<Arcaire> It's mapping all the way down.
GriffinHeart has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
<ramfjord_> but in Jruby (or rubinius) you miss out on a lot of libraries that work on MRI
RegulationD has quit [Ping timeout: 260 seconds]
<Arcaire> shibly: The general rule of thumb is that if you can't tell what the disadvantages of Ruby are with respect to your current project, you probably don't need to worry about them.
<ramfjord_> Arcaire: +1
<Arcaire> Most of them boil down to a couple things: It's not the highest performing language, and people who use NodeJS will endlessly tell you to start using JavaScript.
william3 has quit [Ping timeout: 276 seconds]
<Arcaire> If neither of those concern you, you should use Ruby (imo). It's a wonderful language that got a lot of things right based on mistakes other languages made.
PaulCapestany has quit [Read error: Connection reset by peer]
<ramfjord_> I like to think of it as a nice mix of perl and smalltalk - super practical and super object oriented
<Arcaire> >nice
<Arcaire> >Perl
<Arcaire> The substances you're taking must be of the highest quality known to man.
<Arcaire> ;)
PaulCapestany has joined #ruby
<Arcaire> But in seriousness, that's the direction that Matz wants/wanted Ruby to go originally, iirc.
<ramfjord_> I also really like Bundler - ruby's main dependency manager
GriffinHeart has quit [Remote host closed the connection]
elifoster has joined #ruby
<Arcaire> The general library ecosystem around Ruby is honestly awesome.
<ramfjord_> For concurrency I've been looking into celluloid, but I don't have much experience with the actor model
<Arcaire> There's a few issues I have with it but are mostly small edge-case irks I've found regarding ecosystem security.
<ramfjord_> tbh for the most part I've been using Queue + Threadpool
<Arcaire> Celluloid is pretty good.
<Arcaire> In a lot of cases you can ignore the actor model entirely and just use Celluloid/IO.
<ramfjord_> but I'm not making anything complicated
<Arcaire> (I do that lol)
wilbert has joined #ruby
<Arcaire> I wrote an IRC services system (think Nickserv, Chanserv) using Celluloid/IO. Good performance even under a stress test.
rodferso1 has quit [Quit: leaving]
<kaleido> is node even 50% js anymore?
<ramfjord_> Arcaire: so my main use case is making a ton of API calls, and loading them into a database (preferably on a single connection/transaction)
agentmeerkat has quit [Ping timeout: 240 seconds]
<ramfjord_> do you think that's something Celluloid would be better suited for than Queue + ThreadPool (one thread with reading from a queue, a bunch of api call threads writing to it)?
zzach has joined #ruby
zzach1 has quit [Ping timeout: 244 seconds]
<ramfjord_> the thing that I've really thought would be best for this would be to ignore the queue/threads, and just call select on a socket pool hehe
<ramfjord_> but afaik no libraries do this, and I'd have to actually manually write the http requests to the pool of TcpSockets
LoneHerm_ has quit [Remote host closed the connection]
<ramfjord_> aaaaand there's absolutely no reason it needs to be that performant anyway
LoneHerm_ has joined #ruby
william3 has joined #ruby
<Arcaire> ramfjord_: Hm you'll probably want the actor pooling and supervision anyway then.
<Arcaire> I was using the simplistic celluloid for async TCP but single socket.
<shibly> Did ruby take anything from python? Any syntax similarity? Or any concept of feature?
mfb2 has quit [Ping timeout: 240 seconds]
UKn0Me is now known as BobaFett
<Arcaire> Yes
<Arcaire> Lots
<shibly> Can you metion few of those?
amclain has quit [Ping timeout: 260 seconds]
william3 has quit [Ping timeout: 260 seconds]
BobaFett is now known as UKn0Me
FooMunki has quit [Quit: FooMunki]
rubie has quit [Remote host closed the connection]
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GriffinHeart has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
LoneHerm_ has quit [Remote host closed the connection]
Chagel has joined #ruby
stannard has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
wilbert has quit [Quit: quit]
Devalo has joined #ruby
shibly has left #ruby [#ruby]
stannard has quit [Ping timeout: 250 seconds]
rahult_ has joined #ruby
shayan has joined #ruby
william3 has joined #ruby
rahult has quit [Ping timeout: 250 seconds]
Chagel_ has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
Chagel has quit [Ping timeout: 276 seconds]
ICantCook has joined #ruby
jaguarmagenta has joined #ruby
statelesscode has quit [Quit: statelesscode]
william3 has quit [Ping timeout: 276 seconds]
Spami has joined #ruby
pawnbox has joined #ruby
Spami has quit [Remote host closed the connection]
moeabdol has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
mfb2 has joined #ruby
Es0teric has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
rubie has joined #ruby
Ebok has quit [Ping timeout: 240 seconds]
moeabdol has quit [Ping timeout: 260 seconds]
rubie has quit [Remote host closed the connection]
mfb2 has quit [Ping timeout: 260 seconds]
Ebok has joined #ruby
ramfjord_ has quit [Ping timeout: 276 seconds]
LoneHermit has joined #ruby
lkba has joined #ruby
baweaver has joined #ruby
xxneolithicxx has quit [Quit: Leaving.]
jenrzzz has quit [Ping timeout: 276 seconds]
amclain has joined #ruby
LoneHermit has quit [Ping timeout: 260 seconds]
GriffinHeart has quit [Remote host closed the connection]
jyaworski has quit [Quit: ZNC - http://znc.in]
machinewar has joined #ruby
GriffinHeart has joined #ruby
<machinewar> is there any way to version an API without copying all the code?
<machinewar> since you can't really depend on most of it between versions right?
<machinewar> at least any of the business logic around the response bodies
baweaver has quit [Ping timeout: 250 seconds]
mfb2 has joined #ruby
arescorpio has joined #ruby
htmldrum has quit [Ping timeout: 250 seconds]
<flaf> Hi, I'm using ruby 2.1.8 and I'm trying to do something like “curl --key $my_privkey --cert $my_cert --cacert $ca_cert https://xxxx” (it's 2-way SSL) but in ruby with 'net/http'. I have problems with the ssl part. Do you have examples in the web which could help me?
BSaboia has joined #ruby
droptone_ has left #ruby [#ruby]
jobewan has joined #ruby
mfb2 has quit [Ping timeout: 268 seconds]
braincrash has quit [Quit: bye bye]
stannard has joined #ruby
jaguarmagenta has joined #ruby
rubie has joined #ruby
Trynemjoel has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bronson has joined #ruby
stannard has quit [Ping timeout: 276 seconds]
bruno- has joined #ruby
mfb2 has joined #ruby
braincras has joined #ruby
jyaworski has joined #ruby
phaza_ has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 252 seconds]
Dimik1 has quit [Ping timeout: 276 seconds]
<Arcaire> What problems, flaf?
zast has joined #ruby
mfb2 has quit [Ping timeout: 250 seconds]
<Arcaire> Client-side certificate auth or what?
skol has joined #ruby
postmodern has joined #ruby
ixti has quit [Quit: WeeChat 1.4]
GriffinHeart has quit [Remote host closed the connection]
phaza has joined #ruby
jyaworski has quit [Remote host closed the connection]
stannard has joined #ruby
shayan has quit [Quit: shayan]
jyaworski has joined #ruby
frem_ has quit [Quit: Connection closed for inactivity]
finisherr has joined #ruby
rubie has quit [Remote host closed the connection]
jyaworski has quit [Client Quit]
Blaguvest has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
stannard has quit [Ping timeout: 250 seconds]
diegoviola has quit [Quit: WeeChat 1.4]
GriffinHeart has quit [Remote host closed the connection]
jgrevich has joined #ruby
<flaf> Arcaire: in fact, I find no example in the web to just make the equivalent of my curl command above.
baweaver has joined #ruby
<flaf> ie how to set my priv key, my cert and the cert of the CA.
<ruby[bot]> Arcaire: we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/58e63a1fafdda3761106b41569a988d8
<ruby[bot]> Arcaire: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
<Arcaire> p sure it does bud but ok
GriffinHeart has joined #ruby
<Arcaire> also that's a literal copy-paste of the meme for pastebin
<Arcaire> with a switch out of pastebin.com to irccloud.com
<Arcaire> am i only allowed to shill gist.github.com in here?
skol has quit [Remote host closed the connection]
bb010g has joined #ruby
mfb2 has joined #ruby
bruno- has quit [Ping timeout: 276 seconds]
<baweaver> Arcaire: That's about the gist of it, yeah
noService has joined #ruby
<Arcaire> Not again.
<baweaver> Rather forked up isn't it?
<flaf> Arcaire: I have a problem with “http.cert = OpenSSL::X509::Certificate.new(pem)”
<flaf> => OpenSSL::X509::CertificateError: nested asn1 error
<Arcaire> baweaver: ur killing me here
<baweaver> I'm rather mercurial about it.
A5101 has joined #ruby
<Arcaire> flaf: “Neither PUB key nor PRIV key:: nested asn1 error” ?
A5101_ has joined #ruby
jpfuentes2 has quit [Quit: Textual IRC Client: www.textualapp.com]
<flaf> No just the message I have given above.
A5101_ has quit [Remote host closed the connection]
A5101 has quit [Client Quit]
jyaworski has joined #ruby
<flaf> My pem is a valid private key.
<Arcaire> Couple reasons it could be caused and most of them are on stackoverflow if you google for that exact error.
A5101 has joined #ruby
jyaworski has quit [Client Quit]
<Arcaire> It's probably the way your .pem was exported though, as a .pem isn't necessarily a private (or public) key.
mfb2 has quit [Ping timeout: 252 seconds]
<flaf> My shell "curl" command works well, so I think I'm ok concerning my private key, my cert and the CA cert.
gix has quit [Ping timeout: 250 seconds]
noService has quit [Ping timeout: 260 seconds]
<Arcaire> I've found that when I drive non-European cars, using the right stalk does not appear to activate my indicators.
<Arcaire> The same principle applies here.
<Arcaire> It's similar, but not the same.
<Arcaire> afaik 'net/http' isn't built off libcurl.
<flaf> Yes, sure. Furthermore, I'm not a ruby expert at all.
<Arcaire> Where'd you get the .pem from?
<flaf> It's a .pem generated automatically via puppet (/etc/puppetlabs/puppet/ssl/private_keys/$fqdn.pem).
gix has joined #ruby
tildes has joined #ruby
Nawn has joined #ruby
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 250 seconds]
Nawn has quit [Client Quit]
idl3_ has joined #ruby
crowell is now known as pwnwell
Rodya_ has joined #ruby
<flaf> The file command tells me => “PEM RSA private key”
Yeomra has quit [Quit: WeeChat 1.4]
Chagel_ has quit [Ping timeout: 260 seconds]
<Arcaire> i thought you needed both priv and pub in a .pem for things like this
Chagel has joined #ruby
mfb2 has joined #ruby
KnownSyntax has quit [Read error: Connection reset by peer]
CloCkWeRX has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
william3 has joined #ruby
aiguu has joined #ruby
GriffinHeart has joined #ruby
diegoviola has joined #ruby
mfb2 has quit [Ping timeout: 268 seconds]
chihhsin has joined #ruby
chihhsin has quit [Client Quit]
william3 has quit [Ping timeout: 260 seconds]
<flaf> No, like in the curl command I have given above I have a file for my private key, a file for my certificate and a file for the cert of the CA.
chihhsin has joined #ruby
moeabdol has joined #ruby
idefine has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
idefine has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
AnoHito has quit [Ping timeout: 240 seconds]
jyaworski has joined #ruby
Rodya_ has quit [Remote host closed the connection]
AnoHito has joined #ruby
dcunit3d has joined #ruby
_blizzy_ has joined #ruby
_djbkd has joined #ruby
_blizzy_ has quit [Client Quit]
freerobby has quit [Quit: Leaving.]
blackgoat_ has quit [Quit: WeeChat 1.4]
jyaworski has quit [Quit: ZNC - http://znc.in]
jyaworski has joined #ruby
kp666 has joined #ruby
nickjj_ has joined #ruby
william3 has joined #ruby
kareeoleez has joined #ruby
hk238 has joined #ruby
nickjj has quit [Ping timeout: 240 seconds]
tenzan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
zapata has quit [Quit: WeeChat 1.4]
william3 has quit [Ping timeout: 276 seconds]
fedexo has joined #ruby
mfb2 has joined #ruby
LoneHerm_ has joined #ruby
Dry_Lips has quit [Ping timeout: 260 seconds]
rubie has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
Dry_Lips has joined #ruby
Dry_Lips has quit [Changing host]
Dry_Lips has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
mfb2 has quit [Ping timeout: 244 seconds]
rohit has joined #ruby
KnownSyntax has joined #ruby
xingped has quit [Ping timeout: 276 seconds]
Mendenhall has left #ruby ["WeeChat 1.0.1"]
CloCkWeRX has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
tenzan has joined #ruby
Devalo has joined #ruby
Dry_Lips has quit [Ping timeout: 240 seconds]
BSaboia has quit [Ping timeout: 240 seconds]
moeabdol has quit [Ping timeout: 276 seconds]
Dry_Lips has joined #ruby
Dry_Lips has joined #ruby
saneax_AFK is now known as saneax
Devalo has quit [Ping timeout: 250 seconds]
ljames has quit []
htmldrum has joined #ruby
blackgoat has joined #ruby
chipotle has quit [Quit: cheerio]
dionysus69 has joined #ruby
idefine has quit [Read error: Connection reset by peer]
IrishGringo has quit [Ping timeout: 268 seconds]
gmci_ has joined #ruby
moeabdol has joined #ruby
kareeole_ has joined #ruby
ta_ has quit [Remote host closed the connection]
idefine has joined #ruby
<Radar> http.cert = '/etc/puppetlabs/puppet/ssl/certs/puppet.athome.priv.pem'
<Radar> This line
<Radar> flaf: ^
<flaf> yes, indeed thx.
<Radar> gg
<flaf> Sometimes an object is expected.
kareeoleez has quit [Ping timeout: 244 seconds]
<flaf> (not a string)
meinside has joined #ruby
AdamMeghji__ has joined #ruby
<flaf> (ok a string is an object but you know what I mean ;))
olivierjanss has quit [Read error: Connection reset by peer]
zrl__ has joined #ruby
stannard has joined #ruby
idefine has quit [Read error: Connection reset by peer]
gmci has quit [Ping timeout: 244 seconds]
zrl_ has quit [Ping timeout: 250 seconds]
gmci_ is now known as gmci
olivierjanss has joined #ruby
zrl__ is now known as zrl_
troter__________ has quit [Ping timeout: 250 seconds]
Matthew__ has joined #ruby
Matthew_ is now known as Guest49991
rahult has joined #ruby
AdamMeghji_ has quit [Ping timeout: 250 seconds]
moeabdol has quit [Ping timeout: 246 seconds]
agit0 has quit [Quit: zzzZZZ….]
Guest49991 has quit [Ping timeout: 250 seconds]
troter__________ has joined #ruby
rahult_ has quit [Ping timeout: 246 seconds]
saramic has joined #ruby
stannard has quit [Ping timeout: 268 seconds]
tildes has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
mfb2 has joined #ruby
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
Matthew__ is now known as MRB[away]
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
kareeole_ is now known as kareeoleez
rbennacer has quit [Remote host closed the connection]
mfb2 has quit [Ping timeout: 250 seconds]
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
saneax has left #ruby ["Leaving"]
noService has joined #ruby
Abhijit has joined #ruby
<Abhijit> hi
<Abhijit> how would i know if my centos gave me patches for those or not?
<Abhijit> centos and ubuntu
idefine has joined #ruby
rubie has quit [Remote host closed the connection]
YaknotiS has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
rahult_ has joined #ruby
astrobun_ has joined #ruby
rahult has quit [Ping timeout: 276 seconds]
YaknotiS has joined #ruby
Dimik1 has joined #ruby
speaking1ode has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
sauvin has joined #ruby
bluOxigen has joined #ruby
<Radar> Abhijit: Uh, that looks to be depending on a specific Rails version? Isn't the solution to just upgrade to the most modern version of Rails specific to your app?
<Radar> So if you have a 3.2 app, upgrade to 3.2.22.2
finisherr has quit [Quit: finisherr]
agit0 has joined #ruby
<Abhijit> Radar, ok so its should be taken care by ruby / rails and not by os. fine.
<Radar> Abhijit: It should be taken care of by your application's Gemfile
<Abhijit> yeah. but due to one another get restriction i am stuck to 4.1.8 rails.
machinewar has quit [Remote host closed the connection]
<Abhijit> gem*
wasane has joined #ruby
<Abhijit> i just wanted to know confirm that its os responsibility or not.
<Arcaire> Abhijit: It's not the OS responsibility.
<Arcaire> These things aren't installed by the OS and aren't in the package manager archives, it's stuff you gotta manage yourself.
<Arcaire> Also that vulnerability isn't an issue unless you do stupid things with the Rails render method.
<Arcaire> I work in infosec and I've only seen it in the wild once.
kareeoleez has quit [Remote host closed the connection]
william3 has joined #ruby
bronson has joined #ruby
arescorpio has quit [Quit: Leaving.]
<Arcaire> Nice work flaf. Thanks for your solution too, it might come up in the future.
SilverKey has quit [Quit: Halted.]
william3 has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 252 seconds]
Chagel has quit [Ping timeout: 276 seconds]
_djbkd has quit [Quit: My people need me...]
pawnbox has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
wasane has quit [Quit: Mutter: www.mutterirc.com]
howdoi has joined #ruby
baweaver has joined #ruby
zast has quit [Remote host closed the connection]
rohit has quit [Ping timeout: 240 seconds]
noService has quit [Ping timeout: 260 seconds]
moeabdol has joined #ruby
bruno- has joined #ruby
moeabdol has quit [Client Quit]
GriffinHeart has joined #ruby
thejamespinto_ has quit [Remote host closed the connection]
LoneHerm_ has quit [Remote host closed the connection]
moeabdol has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
<Abhijit> Arcaire, ok
pawnbox has joined #ruby
Rodya_ has joined #ruby
lxsameer has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
joonty has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
MRB[away] is now known as Matthew_
diegoviola has quit [Quit: WeeChat 1.4]
SuperLag has quit [Quit: Lost terminal]
SuperLag has joined #ruby
morochena has joined #ruby
navneet has joined #ruby
A5101 has quit [Remote host closed the connection]
pandaant has joined #ruby
ur5us has quit [Remote host closed the connection]
djbkd_ has joined #ruby
yfeldblum has joined #ruby
kareeoleez has joined #ruby
saramic has quit [Remote host closed the connection]
speaking1ode has quit [Ping timeout: 240 seconds]
astrobu__ has joined #ruby
saramic has joined #ruby
zzach has quit []
galeido has joined #ruby
astrobun_ has quit [Ping timeout: 244 seconds]
jgrevich has quit [Ping timeout: 250 seconds]
saramic has quit [Ping timeout: 246 seconds]
jgrevich has joined #ruby
Ebok has quit [Quit: Leaving]
djbkd_ has quit []
nando293921 has quit [Ping timeout: 250 seconds]
rahult has joined #ruby
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rahult_ has quit [Ping timeout: 250 seconds]
Abhijit has quit [Quit: Bye.]
pLaToOn has joined #ruby
sphex_ has joined #ruby
sphex has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
aganov has joined #ruby
Mia has quit [Read error: Connection reset by peer]
tvw has joined #ruby
Chagel has joined #ruby
william3 has joined #ruby
Macaveli has quit [Client Quit]
saramic has joined #ruby
polysics has joined #ruby
Xeago has joined #ruby
ta_ has joined #ruby
saramic has quit [Remote host closed the connection]
saramic has joined #ruby
lxsameer has quit [Ping timeout: 250 seconds]
saramic has quit [Read error: Connection reset by peer]
saramic has joined #ruby
william3 has quit [Ping timeout: 276 seconds]
amclain has quit [Quit: Leaving]
benlieb has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
Devalo has quit [Remote host closed the connection]
firstdayonthejob has joined #ruby
thejamespinto has joined #ruby
codecop has joined #ruby
codecop_ has joined #ruby
codecop has quit [Client Quit]
lemur has joined #ruby
bruno- has joined #ruby
GriffinHeart has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
tvw has quit []
thejamespinto has quit [Ping timeout: 240 seconds]
tildes has joined #ruby
tildes has quit [Remote host closed the connection]
pelegreno_ has quit [Remote host closed the connection]
pelegreno has joined #ruby
william3 has joined #ruby
pelegreno has quit [Remote host closed the connection]
pelegreno has joined #ruby
Macaveli has joined #ruby
baweaver has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
tildes has joined #ruby
lemur has quit [Ping timeout: 250 seconds]
noService has joined #ruby
toretore has joined #ruby
william3 has quit [Ping timeout: 276 seconds]
lkba_ has joined #ruby
lkba has quit [Read error: Connection reset by peer]
benlieb has quit [Quit: benlieb]
GriffinHeart has joined #ruby
Chagel has quit [Ping timeout: 276 seconds]
navneet_ has joined #ruby
astrobu__ has quit [Remote host closed the connection]
armyriad has quit [Ping timeout: 260 seconds]
Chagel has joined #ruby
armyriad has joined #ruby
lkba_ has quit [Ping timeout: 276 seconds]
lemur has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
navneet has quit [Ping timeout: 252 seconds]
firstdayonthejob has quit [Ping timeout: 250 seconds]
last_staff has joined #ruby
kfpratt has quit [Remote host closed the connection]
william3 has joined #ruby
joonty has quit [Ping timeout: 240 seconds]
last_staff has quit [Client Quit]
aswen has joined #ruby
baweaver has joined #ruby
william3 has quit [Ping timeout: 276 seconds]
lemur has quit [Ping timeout: 250 seconds]
mark_66 has joined #ruby
minster_prime has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaruga___ has joined #ruby
jaruga___ has quit [Client Quit]
jaruga___ has joined #ruby
Rickmasta has quit [Ping timeout: 250 seconds]
Xeago has quit [Ping timeout: 240 seconds]
baweaver has quit [Ping timeout: 250 seconds]
ur5us has quit [Remote host closed the connection]
baweaver has joined #ruby
astrobun_ has joined #ruby
Rickmasta has joined #ruby
DoubleMalt has joined #ruby
waxxy has joined #ruby
lkba has joined #ruby
biberu has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tessi has joined #ruby
pawnbox has quit [Remote host closed the connection]
saramic has quit []
rahult has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
dionysus69 has joined #ruby
elifoster has quit [Ping timeout: 260 seconds]
Dimik1 has quit [Ping timeout: 260 seconds]
rahult has quit [Client Quit]
Xeago has joined #ruby
rodfersou has joined #ruby
x77686d has quit [Quit: x77686d]
x77686d has joined #ruby
TomyWork has joined #ruby
x77686d has quit [Client Quit]
kareeole_ has joined #ruby
tagaulap has joined #ruby
anisha has joined #ruby
igam has joined #ruby
kareeoleez has quit [Ping timeout: 250 seconds]
benlieb has joined #ruby
william3 has joined #ruby
fedexo has quit [Ping timeout: 276 seconds]
lkba_ has joined #ruby
ur5us has joined #ruby
tvw has joined #ruby
benlieb has quit [Client Quit]
benlieb has joined #ruby
tenzan has quit [Quit: Textual IRC Client: www.textualapp.com]
aiguu has quit [Quit: WeeChat 1.4]
lkba has quit [Ping timeout: 276 seconds]
stannard has joined #ruby
william3 has quit [Ping timeout: 260 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
kareeole_ is now known as kareeoleez
htmldrum has quit [Ping timeout: 260 seconds]
the_drow has joined #ruby
lsmola has quit [Ping timeout: 244 seconds]
stannard has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
pawnbox has joined #ruby
navneet_ has quit [Remote host closed the connection]
idl3_ has quit [Remote host closed the connection]
thejamespinto has joined #ruby
ur5us has quit [Remote host closed the connection]
aufi_ has joined #ruby
blackgoat has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
joonty has joined #ruby
infra-red has joined #ruby
AlexRussia has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
Prominent has joined #ruby
Prominent has quit [Remote host closed the connection]
thejamespinto has quit [Ping timeout: 268 seconds]
infra-re_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
william3 has joined #ruby
pandaant has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 268 seconds]
nobitanobi has joined #ruby
andikr has joined #ruby
konsolebox has joined #ruby
infra-red has quit [Ping timeout: 250 seconds]
CausaMortis has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
n008f4g_ has joined #ruby
antgel has joined #ruby
speaking1ode has joined #ruby
jobewan has quit [Quit: Textual IRC Client: www.textualapp.com]
araujo has joined #ruby
karapetyan has joined #ruby
febuiles_ has joined #ruby
febuiles_ has quit [Client Quit]
jenrzzz has quit [Ping timeout: 260 seconds]
n008f4g_ has quit [Ping timeout: 260 seconds]
neanderslob has quit [Remote host closed the connection]
jenrzzz has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
febuiles has quit [Ping timeout: 276 seconds]
GriffinHeart has quit [Remote host closed the connection]
iDontWantToBeTha has joined #ruby
darkxploit has quit [Ping timeout: 260 seconds]
Couch has joined #ruby
iDontWantToBeTha has left #ruby [#ruby]
ElSif has quit [Ping timeout: 246 seconds]
GriffinHeart has joined #ruby
benlieb has quit [Quit: benlieb]
last_staff has joined #ruby
terlar has joined #ruby
ur5us has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
tessi has quit [Quit: tessi]
Rodya_ has quit [Remote host closed the connection]
PedramT has joined #ruby
andikr has quit [Ping timeout: 246 seconds]
ur5us has quit [Ping timeout: 246 seconds]
GriffinHeart has quit [Remote host closed the connection]
darkxploit has joined #ruby
nobitanobi has quit [Remote host closed the connection]
haraoka has joined #ruby
the_drow has joined #ruby
drptbl has joined #ruby
Rodya_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
Macaveli has joined #ruby
weckl has joined #ruby
bronson has joined #ruby
araujo has quit [Ping timeout: 276 seconds]
modin has quit [Quit: ZNC - 1.6.0 - http://znc.in]
myntcake has joined #ruby
Snowy has joined #ruby
modin has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 250 seconds]
htmldrum has joined #ruby
pawnbox has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
norc has joined #ruby
pawnbox has joined #ruby
Devalo has joined #ruby
karapetyan has quit [Remote host closed the connection]
lxsameer has joined #ruby
lkba has joined #ruby
astrobun_ has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
lkba_ has quit [Ping timeout: 250 seconds]
poerror has joined #ruby
elaptics`away is now known as elaptics
Devalo has quit [Ping timeout: 250 seconds]
htmldrum has quit [Ping timeout: 244 seconds]
karapetyan has joined #ruby
navneet_ has joined #ruby
astrobun_ has joined #ruby
mfb2 has joined #ruby
moeabdol has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 240 seconds]
moeabdol has joined #ruby
thejamespinto has joined #ruby
gdp has joined #ruby
mfb2 has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
matp has quit [Remote host closed the connection]
bruno- has joined #ruby
Xeago has joined #ruby
infra-red has joined #ruby
thejamespinto has quit [Ping timeout: 246 seconds]
infra-re_ has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
ekroon has joined #ruby
ur5us has joined #ruby
Xeago has joined #ruby
ur5us has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 244 seconds]
ekroon has left #ruby [#ruby]
<ujjain> Can somebody help me fix this integration test error? http://pastebin.com/KkctLFKr
<ruby[bot]> ujjain: as I told you already, please use https://gist.github.com
<ujjain> Your block takes 1 argument, but the Regexp matched 0 arguments. (Cucumber::ArityMismatchError) - features/step_definitions/my_steps.rb:310:in `/^the output should be 'Err, timeout, ouch'$/'
yfeldblum has quit [Remote host closed the connection]
matp has joined #ruby
karapetyan has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 268 seconds]
lkba has joined #ruby
<apeiros> hm, Ox0dea, I bet you've investigated this - is there a way to have capturing groups higher than 9 in the \1-\9 notation in sub? e.g. str.sub(/(.) […](.)/, '\11') - straight \11 sadly inserts 11, not capturing group 11
poerror has left #ruby ["Textual IRC Client: www.textualapp.com"]
infra-red has quit [Remote host closed the connection]
RyanMcCoskrie has joined #ruby
RyanMcCoskrie has quit [Client Quit]
kspencer has quit [Read error: Connection reset by peer]
<ujjain> now I have expected: "Err, timeout, ouch"
<ujjain> got: "", looks like @timeout_exception isn't set during the gherkin test
infra-red has joined #ruby
ponga has joined #ruby
infra-red has quit [Remote host closed the connection]
infra-red has joined #ruby
kspencer has joined #ruby
infra-red has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
evidex has joined #ruby
<jhass> apeiros: I think I'd consider using the named stuff when I get that many groups
lxsameer has quit [Ping timeout: 240 seconds]
tessi has joined #ruby
infra-red has joined #ruby
mfb2 has joined #ruby
Shashikant86 has joined #ruby
yosafbridge has quit [Ping timeout: 244 seconds]
rbennacer has joined #ruby
infra-red has quit [Read error: Connection reset by peer]
infra-re_ has joined #ruby
Spami has joined #ruby
gregf has quit [Quit: WeeChat 1.4]
skislak has joined #ruby
mfb2 has quit [Ping timeout: 252 seconds]
blaxter has joined #ruby
infra-re_ has quit [Client Quit]
karapetyan has joined #ruby
yosafbridge has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
skislak has quit [Ping timeout: 276 seconds]
dcunit3d has quit [Ping timeout: 260 seconds]
skislak has joined #ruby
Dimik has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
gregf has joined #ruby
AlexJakeGreen has joined #ruby
modin has quit [Quit: ZNC - 1.6.0 - http://znc.in]
mfb2 has joined #ruby
modin has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
PedramT has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
mfb2 has quit [Ping timeout: 240 seconds]
htmldrum has joined #ruby
karapetyan has quit [Remote host closed the connection]
mdih has joined #ruby
mdih has quit [Max SendQ exceeded]
karapetyan has joined #ruby
mdih has joined #ruby
mdih has quit [Max SendQ exceeded]
mdih has joined #ruby
thejamespinto has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
htmldrum has quit [Ping timeout: 246 seconds]
doublemalt_ has joined #ruby
Bridge has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
terlar has quit [Quit: WeeChat 1.4]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
thejamespinto has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
terlar has joined #ruby
DoubleMalt has quit [Ping timeout: 276 seconds]
Rodya_ has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
pawnbox has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
ssiris has quit [Quit: End of Line]
astrobunny has joined #ruby
lsmola has joined #ruby
GriffinHeart has joined #ruby
weckl has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 260 seconds]
postmodern has quit [Quit: Leaving]
lkba_ has joined #ruby
ropeney has joined #ruby
<Ox0dea> apeiros: This doesn't look promising: https://git.io/vwCSU
galeido has quit [Ping timeout: 246 seconds]
<Ox0dea> If nothing else, you've unveiled a solid candidate for a refactor.
pawnbox_ has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 250 seconds]
galeido has joined #ruby
galeido has quit [Changing host]
galeido has joined #ruby
Bridge has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
charliesome has joined #ruby
marr has joined #ruby
Bridge has joined #ruby
mfb2 has joined #ruby
chipotle has joined #ruby
<apeiros> god, I'm horrible
<apeiros> I walked away and didn't tell. my apologies jhass and Ox0dea
<apeiros> jhass: I used named captures as a workaround
<apeiros> Ox0dea: thanks. that does indeed not look promising :D
<Ox0dea> apeiros: I can't imagine why it was done that way, honestly.
SuperSaiyan has joined #ruby
<SuperSaiyan> hii :)
<waxxy> 11 capture groups :o what are you parsing?
<Ox0dea> Eating digits isn't exactly an unsolved problem. :/
<SuperSaiyan> someone please chat with me :)
astrobun_ has quit [Remote host closed the connection]
navneet_ has quit []
noobsu has joined #ruby
Bridge has quit [Client Quit]
<SuperSaiyan> noobsu Hii
<Ox0dea> waxxy: My bet's on `ps aux` or the like.
<SuperSaiyan> Ox0dea :P
<apeiros> waxxy: mixing bits :)
<apeiros> sounds weird, I know
<Ox0dea> Use math.
<SuperSaiyan> what is math?
<apeiros> slower for this and much much more code
<apeiros> (slower mainly due to method call overhead)
navneet_ has joined #ruby
<shevy> hah who would have known that Ox0dea's being sceptical about the up-to-9 capture groups, would have a follow up like this with apeiros today!
<SuperSaiyan> please stop ignoring me :'(
* apeiros afk, jogging
<shevy> hmm scratch the 's there
<apeiros> SuperSaiyan: this is a chat for problems around the ruby programming language. not a chat for your entertainment.
<SuperSaiyan> Im super saiyan! I ll destroy you all !!!
mfb2 has quit [Ping timeout: 276 seconds]
<jhass> the latter would be to found at #ruby-offtopic
<apeiros> !spam SuperSaiyan
SuperSaiyan was kicked from #ruby by ruby[bot] [spamming is a bannable offense, see http://ruby-community.com/pages/user_rules]
Shashikant86 has quit [Ping timeout: 276 seconds]
<jhass> aw you stole my toy before I could put it into the sandbox
<apeiros> sry
johnmilton has joined #ruby
minster_prime has quit [Quit: minster_prime]
blackmesa has joined #ruby
<adaedra> They're SuperGone now.
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
johnmilton has quit [Ping timeout: 268 seconds]
moeabdol has quit [Ping timeout: 268 seconds]
polysics_ has joined #ruby
polysics has quit [Ping timeout: 246 seconds]
neanderslob has joined #ruby
resin has joined #ruby
PedramT has joined #ruby
yfeldblu_ has joined #ruby
araujo has joined #ruby
blaxter has quit [Read error: Connection reset by peer]
rippa has joined #ruby
yfeldblum has quit [Ping timeout: 268 seconds]
william3 has quit [Remote host closed the connection]
biberu has quit [Read error: Connection reset by peer]
pawnbox_ has quit [Remote host closed the connection]
moeabdol has joined #ruby
biberu has joined #ruby
pawnbox has joined #ruby
patrick_star_2 has quit [Quit: Leaving]
ruby421 has joined #ruby
<ruby421> hi
chosen1 has quit [Read error: Connection reset by peer]
chosen1 has joined #ruby
<jhass> hi
tristanp has quit [Read error: Connection reset by peer]
drptbl_ has joined #ruby
tristanp has joined #ruby
william3 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruby421 has quit [Ping timeout: 250 seconds]
chipotle has quit [Quit: cheerio]
<shevy> that was a short hi
ocbtec has joined #ruby
andikr has joined #ruby
drptbl has quit [Ping timeout: 276 seconds]
mfb2 has joined #ruby
noService has quit [Ping timeout: 252 seconds]
baweaver has joined #ruby
william3 has quit [Ping timeout: 260 seconds]
jaguarmagenta has joined #ruby
william3 has joined #ruby
armyriad has quit [Ping timeout: 252 seconds]
armyriad has joined #ruby
nobitanobi has joined #ruby
mfb2 has quit [Ping timeout: 276 seconds]
baweaver has quit [Ping timeout: 260 seconds]
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
edwinvdgraaf has joined #ruby
carella has quit [Read error: Connection timed out]
shibly has joined #ruby
jaguarmagenta has quit [Ping timeout: 250 seconds]
carella has joined #ruby
shibly has left #ruby ["Leaving"]
Gasher has joined #ruby
moeabdol has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
allisterantosik has joined #ruby
charliesome has joined #ruby
armyriad has quit [Ping timeout: 260 seconds]
rahult has joined #ruby
mfb2 has joined #ruby
lxsameer has joined #ruby
bruno- has joined #ruby
polysics_ has quit [Ping timeout: 260 seconds]
polysics has joined #ruby
mfb2 has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 252 seconds]
yfeldblu_ has quit [Ping timeout: 260 seconds]
Spami has quit [Quit: This computer has gone to sleep]
pawnbox has joined #ruby
hk238 has joined #ruby
sgambino has joined #ruby
Macaveli has joined #ruby
stannard has joined #ruby
lkba has joined #ruby
coyo has quit [Ping timeout: 240 seconds]
allisterantosik has quit [Quit: allisterantosik]
sandelius has joined #ruby
lkba_ has quit [Ping timeout: 252 seconds]
Emmanuel_Chanel has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 260 seconds]
<siaw> i have 2 folders, A and B which are both in another folder, C. How can i use a model method in a file in B from A?
<siaw> i have tried ‘require ‘filename’’
<siaw> and
<siaw> ‘require_relative ‘filename’’
<siaw> in the file in B and none’s doing the job
Emmanuel_Chanel has joined #ruby
The_Phoenix has joined #ruby
FooMunki has joined #ruby
karapetyan has joined #ruby
<shevy> siaw require_relative should work, you must get some kind of error if the file does not exist
The_Phoenix has quit [Max SendQ exceeded]
<shevy> require_relative 'foobar.rb' # LoadError: cannot load such file -- /Depot/j/foobar.rb
<siaw> the error i’m getting tells me it can load the file from folder B’s path
Madplatypus has quit [Quit: Connection closed for inactivity]
<siaw> meaning it’s not searching folder A at all
<jhass> siaw: can you reask with the actual paths relative to your project root please?
The_Phoenix has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> I feel like the abstraction here will just add confusion
The_Phoenix has quit [Max SendQ exceeded]
PedramT has quit [Remote host closed the connection]
<Ox0dea> siaw: require_relative '../B/foo'
lxsameer has quit [Ping timeout: 252 seconds]
blaxter has joined #ruby
araujo has quit [Ping timeout: 276 seconds]
evidex_ has joined #ruby
karapetyan has quit [Ping timeout: 244 seconds]
meee has joined #ruby
polysics has quit []
<siaw> Ox0dea: require_relative '../B/foo' works
jterra_ has joined #ruby
<siaw> :)
<Ox0dea> \o/
polysics has joined #ruby
<siaw> thanks you
<siaw> thank*
gnufied has joined #ruby
<Ox0dea> Happy to help. :)
eregon_ has joined #ruby
The_Phoenix has joined #ruby
araujo has joined #ruby
joonty1 has joined #ruby
<toretore> siaw: what's the reason you want to use require_relative instead of just require?
meee has left #ruby [#ruby]
pandaant has joined #ruby
araujo has quit [Max SendQ exceeded]
<siaw> toretore: i don’t know
mnrmnaugh_ has joined #ruby
icey_ has joined #ruby
s1kx_ has joined #ruby
<siaw> i was expecting require to work
<siaw> but it wasn't
<toretore> siaw: in general, you shouldn't require relative to the source file, you should expect the file you're requiring to be in $PATH
blackmesa has quit [Ping timeout: 260 seconds]
<siaw> so in which cases can we use require_relative then?
joneshf-laptop_ has joined #ruby
Rixius|Alt has joined #ruby
n008f4g_ has joined #ruby
<toretore> when you have a really good reason to
Adam_FrVancouver has quit [Ping timeout: 276 seconds]
nisstyre has quit [Ping timeout: 276 seconds]
jterra has quit [Ping timeout: 276 seconds]
eregon has quit [Ping timeout: 276 seconds]
joonty has quit [Ping timeout: 276 seconds]
yeticry has quit [Ping timeout: 276 seconds]
moeabdol has joined #ruby
jaruga___ has quit [Ping timeout: 276 seconds]
catpoop has quit [Ping timeout: 276 seconds]
evidex has quit [Ping timeout: 276 seconds]
icey has quit [Ping timeout: 276 seconds]
s1kx has quit [Ping timeout: 276 seconds]
joneshf-laptop has quit [Ping timeout: 276 seconds]
janelleb has quit [Ping timeout: 276 seconds]
Rixius has quit [Ping timeout: 276 seconds]
<toretore> and if you don't know why then you probably don't have one
nisstyre_ has joined #ruby
stardiviner has quit [Ping timeout: 240 seconds]
Adam_FrVancouver has joined #ruby
blackmesa has joined #ruby
<siaw> meaning i should still use require here?
moeabdol has quit [Ping timeout: 276 seconds]
yeticry has joined #ruby
<shevy> siaw for instance, in my gems I can use require() just fine, I don't have to use require_relative()
<Ox0dea> siaw: `require` will search every directory in $LOAD_PATH for a matching file; toretore is suggesting that it would be better for you to get '../B' into $LOAD_PATH and then just require 'foo'.
<toretore> siaw: probably, but it's hard to say without knowing anything about your project
navneet_ has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
coyo has joined #ruby
blackgoat has joined #ruby
<siaw> ok my file path looks like this https://github.com/siaw23/devsnap/tree/ground/app
navneet_ has joined #ruby
<siaw> the folders in question here are “models” and “services”
<siaw> in services i have snapchat_svg_service.rb
<siaw> which i want to use in ‘models/developer.rb'
ferr has joined #ruby
staticfox has quit [Read error: Connection reset by peer]
janelleb has joined #ruby
staticfox has joined #ruby
<toretore> you should require('services/snapchat_svg_service')
william3 has quit [Remote host closed the connection]
<toretore> or just require('snapchat_svg_service')
<siaw> i tried that alread and i get “cannot load such file -- services/snapchat_svg_service”
<toretore> depending on what you put in $LOAD_PATH
<siaw> ah
<siaw> so have to put $LOAD_PATH on top of the line
lxsameer has joined #ruby
william3 has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<toretore> no
xMopxShell has quit [Ping timeout: 260 seconds]
<toretore> $LOAD_PATH gets set externally
ponga has quit [Quit: Connection closed for inactivity]
<Ox0dea> Huh?
<toretore> it's not your file that makes this decision
<Ox0dea> That's simply not the case.
<toretore> it's the invoker, whoever that may be
<toretore> could be `ruby -I.` or there could be some setup done in another file
xMopxShell has joined #ruby
thorgi has joined #ruby
htmldrum has joined #ruby
zenlot has quit [Read error: Connection reset by peer]
mfb2 has joined #ruby
zenlot has joined #ruby
rbennacer has quit [Ping timeout: 252 seconds]
Shashikant86 has joined #ruby
<siaw> anyway after a successfull require
<siaw> i get “uninitialized constant Developer::SnapchatSvgService”
<siaw> on line “include SnapchatSvgService”
stannard has joined #ruby
<siaw> what did i do wrong?
rbennacer has joined #ruby
<siaw> “SnapchatSvgService” is the name of the module in the file i just required
<siaw> :/
Devalo has joined #ruby
navneet_ has quit [Ping timeout: 276 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tobiasvl> include?
stannard has quit [Read error: Connection reset by peer]
<siaw> yeap. or not?
navneet_ has joined #ruby
Shashika_ has joined #ruby
<tobiasvl> oh well maybe
<tobiasvl> pastebin your code
<siaw> i’m trying to INCLUDE the module from that file
<siaw> ok
<toretore> pastebin ..
<toretore> :(
<tobiasvl> "pastebin" as a generalized term :)
<tobiasvl> I don't want to say "paste" your code because that can easily be misinterpreted
<toretore> "gist" works well
<tobiasvl> maybe I should say "gist" your code since that's what's in the topic
<tobiasvl> yeah
lacrosse has joined #ruby
<shevy> just dump it here!
htmldrum has quit [Ping timeout: 260 seconds]
<jhass> siaw: given this is rails after all, I'd recommend to not explicitly require it at all, instead make sure to follow conventions and perhaps adjust autoload_paths accordingly
mfb2 has quit [Ping timeout: 252 seconds]
johnmilton has joined #ruby
aganov has quit [Remote host closed the connection]
Devalo has quit [Ping timeout: 250 seconds]
<tobiasvl> wow your indentation is all over the place
Shashikant86 has quit [Ping timeout: 240 seconds]
<tobiasvl> siaw: move the require_relative inside Developer or move the include outside Developer?
stardiviner has joined #ruby
<shevy> drunkentation
Shashika_ has quit [Client Quit]
<siaw> tobiasvl: same error outside Developer “uninitialized constant SnapchatSvgService”
<siaw> i think it’s got to do with how Rails work with file inclusion
<toretore> probably
<tobiasvl> siaw: well that's not the same error, earlier it said Developer::SnapchatSvgService
<tobiasvl> but yeah maybe some rails stuff
<toretore> autoload ftl
polysics_ has joined #ruby
<siaw> yeah right
<toretore> siaw: are you restarting the server?
<siaw> nope
<toretore> do that
<jhass> siaw: so either ensure app/ is in your autoload_paths and name it Services::SnapchatSvgService or ensure app/services is in your autoload_paths and then it should work without require
polysics has quit [Ping timeout: 268 seconds]
<toretore> so now that we know it's a rails app, rails has ways to add directories to the $LOAD_PATH which you should use instead of require_relative
<toretore> or, what jhass said
jaruga___ has joined #ruby
last_staff has quit [Quit: last_staff]
<siaw> yeah
<siaw> i’m using rails 5 beta 3 which makes things even worse
<siaw> it hasn’t got that autoload_paths :D
<workmad3> `app/*` is added to your autoload paths by default, so you should be able to just add a directory there
<workmad3> but you'll probably need to restart the server and run `spring stop`
bruno- has joined #ruby
<workmad3> (unless you've already taken spring out of your Gemfile :) )
darkxploit has quit [Ping timeout: 250 seconds]
<siaw> nope
<siaw> doing that now
haraoka has quit [Ping timeout: 250 seconds]
BTRE has quit [Read error: Connection reset by peer]
<siaw> that moved me forward :)
<siaw> and i’m getting “undefined method `get_svg_image' for SnapchatSvgService:Module”
bruno- has quit [Ping timeout: 250 seconds]
<siaw> but “get_svg_image” is a method clearly difined in that module get_svg_image
<jhass> &ri Module#module_function @siaw
polysics has joined #ruby
<siaw> `derpy: works
<siaw> whew! got a lot to learn
<gregf_> heh
<siaw> is this just in ruby 2.3?
<jhass> no
<gregf_> siaw: derpy is a bot :). jhass is'nt ;)
<siaw> i read a whole book on 1.9 and didn’t see anything like this! :o
bkxd has joined #ruby
<jhass> rumors are it's the other way around I hear
<waxxy> module_function is neat
<siaw> oh dear
<siaw> i never saw it.
<siaw> i saw it earlier today though
<jhass> I'm still biased as to whether I preferred it would create an alias or delegate instead of a copy
<siaw> and i was like “wth is this?”
polysics_ has quit [Ping timeout: 260 seconds]
<workmad3> siaw: if you only want it accessible directly on the module, you can also define it with `def self.get_svg_image(username)`
<workmad3> siaw: doing `def get_svg_image(username)` and then using `module_function` on it will make the method available both on the module and to objects where you mixed in the module
moeabdol has joined #ruby
<siaw> i get it
lxsameer has quit [Ping timeout: 260 seconds]
<siaw> thanks heroes :)
<siaw> app working perfectly as expected
pawnbox has quit [Remote host closed the connection]
stardiviner has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
<jhass> ?styleguide siaw
n008f4g_ has quit [Ping timeout: 250 seconds]
* jhass slaps ruby[bot]
<jhass> anyway, read one, at least your tabbing is a complete mess
darkxploit has joined #ruby
navneet_ has quit [Remote host closed the connection]
BTRE has joined #ruby
icey_ is now known as icey
TheBrayn has quit [Quit: ZNC - http://znc.in]
karapetyan has joined #ruby
codecop_ has quit [Remote host closed the connection]
stardiviner has joined #ruby
Chagel has quit [Ping timeout: 260 seconds]
maokomioko has joined #ruby
karapetyan has quit [Ping timeout: 244 seconds]
n008f4g_ has joined #ruby
Rickmasta has joined #ruby
mdih has quit [Ping timeout: 260 seconds]
Arcaire_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Arcaire_ has quit [Client Quit]
flashpoint9 has joined #ruby
navneet_ has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
synthroid has joined #ruby
kspencer has quit [Ping timeout: 268 seconds]
crameth has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
synthroid has quit [Remote host closed the connection]
synthroid has joined #ruby
Xeago has joined #ruby
navneet_ has quit [Ping timeout: 244 seconds]
Xeago has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
Arcaire_ has joined #ruby
william3 has quit [Remote host closed the connection]
Arcaire has quit []
Arcaire_ has quit [Client Quit]
Arcaire has joined #ruby
baweaver has joined #ruby
diegoaguilar has quit [Read error: Connection reset by peer]
diegoaguilar has joined #ruby
jaguarmagenta has joined #ruby
bkxd has quit [Ping timeout: 268 seconds]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
william3 has joined #ruby
pawnbox has joined #ruby
baweaver has quit [Ping timeout: 252 seconds]
navneet_ has joined #ruby
markfletcher has quit [Quit: Leaving]
CloCkWeRX has joined #ruby
jaguarmagenta has quit [Ping timeout: 250 seconds]
gnufied has quit [Quit: Leaving]
Xeago has joined #ruby
aupadhye has joined #ruby
gnufied has joined #ruby
thejamespinto has joined #ruby
TheBrayn has joined #ruby
sdothum has joined #ruby
gnufied has quit [Quit: Leaving]
swills has quit [Remote host closed the connection]
bruno- has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 276 seconds]
siaw has quit [Quit: siaw]
phaza has quit [Ping timeout: 260 seconds]
gnufied has joined #ruby
kareeoleez has quit [Remote host closed the connection]
vdamewood has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
tk__ has joined #ruby
kareeoleez has joined #ruby
GodFather has joined #ruby
kimegede has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
norc has quit [Quit: Page closed]
nando294021 has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
sgambino has joined #ruby
mfb2 has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
inukshuk_ has joined #ruby
inukshuk_ has quit [Client Quit]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elaptics is now known as elaptics`away
phaza has joined #ruby
LastWhisper____ has joined #ruby
sandelius has joined #ruby
cdg has joined #ruby
GinoMan2440 has joined #ruby
thejamespinto has quit [Ping timeout: 276 seconds]
nobitanobi has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
thejamespinto has joined #ruby
sandelius has quit [Client Quit]
vondruch has quit [Quit: Ex-Chat]
LastWhisper____ has quit [Client Quit]
phaza has quit [Ping timeout: 244 seconds]
nando294021 has quit [Ping timeout: 250 seconds]
aegis3121 has joined #ruby
ramortegui has joined #ruby
Shashikant86 has joined #ruby
elaptics`away is now known as elaptics
thejamespinto has quit [Read error: Connection reset by peer]
thejamespinto has joined #ruby
cibs has quit [Quit: leaving]
nobitanobi has joined #ruby
nobitanobi has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has joined #ruby
mfb2 has quit [Ping timeout: 246 seconds]
kfpratt has joined #ruby
JulienITARD has joined #ruby
<JulienITARD> Hello, i need help for a regex
<Ox0dea> JulienITARD: Are you trying to parse HTML?
<TomyWork> good guess :D
<JulienITARD> I have string like "15, ABC 12345 CITY" how can i convert it to an array ["15, ABC","12345","CITY"] ?
<JulienITARD> not HTML ^^'
blackgoat has quit [Quit: WeeChat 1.4]
kfpratt has quit [Remote host closed the connection]
<JulienITARD> any idea ?
<Ox0dea> >> "15, ABC 12345 CITY".reverse.split(' ', 3).reverse.map(&:reverse) # JulienITARD
<ruby[bot]> Ox0dea: # => ["15, ABC", "12345", "CITY"] (https://eval.in/557504)
<Ox0dea> Mostly a joke, though.
<Ox0dea> Something akin to #rsplit would be convenient.
shreeve has joined #ruby
<JulienITARD> the easy way is to split the string where there is a 5 digits sequence no ?
<jackdaniel> maybe "1 3 4, 5".sub(",", " ").split(" ")
<jackdaniel> (if it's only spaces and commas)
<Ox0dea> JulienITARD: But you also want to keep the 5-digit sequence.
<Ox0dea> #split destroys the delimiter.
<shreeve> looking for an easy way to: iterate through an enumerable, evaluating a block for each element and returning the first non-nil result (not the first non-nil element)
<jackdaniel> ach, delimiter has to be preserved. Sorry, misread the example
<jhass> >> "15, ABC 12345 CITY".split(/ (?<\d{5})/)
<Ox0dea> &ri #find shreeve
<jhass> apeiros: ruby[bot] ignores me again :(
<Ox0dea> It knows.
<shreeve> Ox0dea: #find returns the first *element*, not the first *result* of the object that is non-nil
phaza has joined #ruby
<toretore> shreeve: inject(nil){|r,e| something || r }
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> JulienITARD: anyway, see above, yes, just use a lookahead to keep the digits
banister has joined #ruby
<Ox0dea> toretore: Where does the `nil` get injected?
minimalism has quit [Quit: minimalism]
<toretore> what do you mean?
BSaboia has joined #ruby
<jhass> JulienITARD: or well, "15, ABC 12345 CITY".split(/ (?=\d{5})|(?<=\d{5}) /) actually, missed the middle part
rbennacer has quit [Remote host closed the connection]
<toretore> Ox0dea: i guess it should be the other way around: inject(nil){|r,e| r || something }
<jhass> JulienITARD: .partition(/\d{5}/) if you want to keep the spaces too actually
rbennacer has joined #ruby
<Ox0dea> toretore: I was just poking fun at #inject; it's a terrible name.
<toretore> still kind of wasteful without breaking the loop
htmldrum has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
malconis has joined #ruby
<toretore> Ox0dea: reduce then :)
bronson has joined #ruby
malconis has quit [Remote host closed the connection]
<Ox0dea> shreeve: Best is probably just `your_enum.lazy.map(foo).find(bar)`.
LastWhisper____ has joined #ruby
hogetaro has joined #ruby
maokomioko has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> There's nothing on Enumerable for this, and an explicit break loop is verboten.
mikecmpb_ has joined #ruby
nobitanobi has joined #ruby
kfpratt has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<JulienITARD> jhass: i'll try it
htmldrum has quit [Ping timeout: 246 seconds]
mfb2 has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
phaza has quit [Ping timeout: 246 seconds]
mikecmpbll has quit [Ping timeout: 252 seconds]
skol has joined #ruby
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
malconis has joined #ruby
nobitanobi has joined #ruby
mfb2 has quit [Ping timeout: 268 seconds]
navneet_ has quit [Remote host closed the connection]
godzillaenlacasa has joined #ruby
araujo has joined #ruby
platzhirsch has joined #ruby
<apeiros> jhass: :-S
araujo has quit [Max SendQ exceeded]
<jhass> shreeve: or .lazy.map(&:foo).drop_while(&:nil?).first
<apeiros> jhass: I'll reboot when I'm back home (~1h)
swills has joined #ruby
nobitano_ has joined #ruby
<jhass> that's not the proper fix :P
araujo has joined #ruby
Chagel has joined #ruby
ChiefAlexander has joined #ruby
<xpt> ?pr
<ruby[bot]> You think this is broken, could be done better, or have a good feature idea? Submit an issue on the concerned project, or even better, fix it and submit a Pull Request! ;)
araujo has quit [Max SendQ exceeded]
ChiefAlexander has quit [Remote host closed the connection]
araujo has joined #ruby
nobitan__ has joined #ruby
araujo has quit [Read error: Connection reset by peer]
nobitan__ has quit [Client Quit]
ChiefAlexander has joined #ruby
<apeiros> jhass: I know. A proper fix is about 1-2 months away. or 3-4 reboots. I think we'll manage :)
pawnbox has joined #ruby
idefine has joined #ruby
nobitanobi has quit [Ping timeout: 276 seconds]
skol has quit [Remote host closed the connection]
nobitano_ has quit [Ping timeout: 276 seconds]
ule has left #ruby [#ruby]
mfb2 has joined #ruby
rodfersou has quit [Quit: leaving]
anagha_ has joined #ruby
<anagha_> hello
phaza has joined #ruby
<anagha_> How does a string split work?
sepp2k has joined #ruby
<anagha_> String#split('Fear is the path to the dark side')
shreeve has quit [Ping timeout: 250 seconds]
<anagha_> For the above line code the output was just "string"
dionysus69 has joined #ruby
mfb2 has quit [Ping timeout: 246 seconds]
stannard has joined #ruby
JagaJaga has joined #ruby
<jhass> anagha_: String#split is documentation notation, it refers to the instance method split of the class String
<JagaJaga> Hello! Anyone form Korea here?
<jhass> ?aynone
<jhass> ?anyone
<jhass> meh, I tried :P
<JagaJaga> s/form/from
<xpt> ?anyone JagaJaga
<ruby[bot]> JagaJaga: Just ask your question, if anyone has or can, they will respond.
<ddv> JagaJaga: What Korea
<xpt> JagaJaga: there
<ddv> South or North
araujo has joined #ruby
<xpt> jhass: there
<JagaJaga> South :)
<jhass> anagha_: so 'Fear is the path to the dark side' is the string instance here
<jhass> xpt: thanks
<xpt> no problem
ramortegui has quit [Quit: Ex-Chat]
<jhass> anagha_: you want to call the split method on it
<jhass> anagha_: a method call has the form of instance.method(arguments)
garethrees has joined #ruby
stannard has quit [Ping timeout: 244 seconds]
jhass has left #ruby ["WeeChat 1.4"]
jhass has joined #ruby
<jhass> ?ping
<ruby[bot]> pong
<jhass> apeiros: there, part & rejoin worksaround too
phaza has quit [Ping timeout: 240 seconds]
speaking1ode has quit [Ping timeout: 260 seconds]
_blizzy_ has joined #ruby
_blizzy_ has quit [Remote host closed the connection]
lacrosse has quit [Quit: Connection closed for inactivity]
nando293921 has joined #ruby
sepp2k has quit [Quit: Leaving.]
n008f4g_ has quit [Ping timeout: 276 seconds]
n008f4g_ has joined #ruby
griffindy has joined #ruby
agent_white has joined #ruby
sadin has joined #ruby
pLaToOn has quit [Read error: Connection reset by peer]
TvL2386 has quit [Ping timeout: 260 seconds]
rubie has joined #ruby
mfb2 has joined #ruby
stannard has joined #ruby
hartuok has joined #ruby
<agent_white> Morn
sepp2k has joined #ruby
morochena has joined #ruby
TvL2386 has joined #ruby
tinnvec_ has quit [Remote host closed the connection]
idle_task has joined #ruby
tinnvec has joined #ruby
kimegede has quit [Quit: Linkinus - http://linkinus.com]
idletask has quit [Disconnected by services]
idle_task is now known as idletask
ta_ has quit [Remote host closed the connection]
mfb2 has quit [Ping timeout: 260 seconds]
tinnvec has quit [Read error: Connection reset by peer]
tinnvec has joined #ruby
moeabdol has joined #ruby
phaza has joined #ruby
LastWhisper____ has joined #ruby
LastWhisper____ has quit [Read error: Connection reset by peer]
Shashikant86 has quit [Ping timeout: 250 seconds]
moeabdol has quit [Client Quit]
norc has joined #ruby
thejamespinto_ has joined #ruby
<JulienITARD> jhass: It works tanks you
<norc> I feel stupid.
morochena has quit [Quit: Leaving...]
<norc> How can adding line 3 possibly change the behaviour of this code? https://gist.github.com/norc/e20a7065fa6a880c9a5610669aaae782
poerror has joined #ruby
theunraveler has joined #ruby
<jhass> why do you parse XML with regex? :P scnr
Yiota has joined #ruby
mrmortondk has joined #ruby
whippythellama has joined #ruby
<norc> jhass: Because I dont really care about XML in the slightest. But that is really besides the point.
phaza has quit [Ping timeout: 250 seconds]
thejamespinto has quit [Ping timeout: 240 seconds]
<norc> The exception in line 2 is never raised, but line 3 is always executed.
<jhass> hence "scnr"
<norc> :)
<jhass> anyway, not self contained so rather hard to poke at it
poerror has quit [Client Quit]
diegoaguilar has joined #ruby
rbennacer has quit [Ping timeout: 240 seconds]
<norc> jhass: There should not be anything in Ruby that allows execution to take place after an unconditional raise, should it?
Emmanuel_Chanel has quit [Remote host closed the connection]
phaza has joined #ruby
<jhass> not aware of it
LoneHermit has joined #ruby
TvL2386 has quit [Remote host closed the connection]
<norc> Then I think I must have stumbled onto some bizarre parsing bug.
mfb2 has joined #ruby
shreeve has joined #ruby
kareeoleez has quit []
raeoks has joined #ruby
rbennacer has joined #ruby
perlgod has joined #ruby
baweaver has joined #ruby
n008f4g_ has quit [Ping timeout: 268 seconds]
rbennace_ has joined #ruby
<norc> jhass: I cannot extract a test case from it, and reducing it from a full rails application would be quite an undertaking...
<norc> Though I have isolated that specific line #3 to have a side effect on the code that follows.
jaguarmagenta has joined #ruby
Raboo has joined #ruby
mfb2 has quit [Ping timeout: 268 seconds]
ponga has joined #ruby
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
kp666 has quit [Read error: Connection reset by peer]
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
Emmanuel_Chanel has joined #ruby
rbennacer has quit [Ping timeout: 260 seconds]
phaza has quit [Ping timeout: 250 seconds]
kp666 has joined #ruby
TvL2386 has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
mfb2 has joined #ruby
bruno- has joined #ruby
jaguarmagenta has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
tk__ has quit [Quit: ばいばい]
bruno- has quit [Read error: Connection reset by peer]
nando293921 has quit [Ping timeout: 250 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
daguilaraguilar has joined #ruby
gdp has quit [Ping timeout: 268 seconds]
mfb2 has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby
pawnbox has joined #ruby
<norc> Well, I created a test case.
<norc> This is definitely some serious bug.
<toretore> let's see it
mfb2 has joined #ruby
anisha has quit [Quit: Leaving]
The_Phoenix has quit [Quit: Leaving.]
idefine has quit [Remote host closed the connection]
karmatr0_ has quit [Ping timeout: 250 seconds]
CausaMortis has quit [Ping timeout: 250 seconds]
idefine has joined #ruby
norc has quit [Ping timeout: 250 seconds]
shreeve has quit [Ping timeout: 250 seconds]
mfb2 has quit [Ping timeout: 240 seconds]
idefine_ has joined #ruby
mustmodify has joined #ruby
<mustmodify> If I said I had a pass-through equation, what would that mean to you?
<mustmodify> if anything?
zast has joined #ruby
<waxxy> not a lot
coooas has joined #ruby
<mustmodify> yeah, that's what I thought. :(
dhollinger has joined #ruby
idefine_ has quit [Remote host closed the connection]
<waxxy> norc: a monkey patched Kernel#raise?
idefine has quit [Ping timeout: 260 seconds]
idefine has joined #ruby
<mustmodify> waxxy: NEVER SUGGEST THAT AGAIN.
bruno- has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
idefine has quit [Remote host closed the connection]
gdp has joined #ruby
<mustmodify> I didn't see the question or whatever but... I'm against patching #raise. :)
idefine_ has joined #ruby
<jhass> ?logs mustmodify
<ruby[bot]> mustmodify: You can find a log of this channel at http://irclog.whitequark.org/ruby/
Rickmasta has quit [Client Quit]
<mustmodify> jhass: so some things are ! and some are ?...
<mustmodify> !logs jhass
<waxxy> mustmodify i'd never do that
<mustmodify> ?logs jhass
<ruby[bot]> jhass: You can find a log of this channel at http://irclog.whitequark.org/ruby/
<mustmodify> waxxy: I'm against even joking about it. :P
<waxxy> check the logs ;)
idefine_ has quit [Remote host closed the connection]
<mustmodify> oh right
<jhass> mustmodify: nothing you can use starts with ! here ;)
norc has joined #ruby
<apeiros> the ? are factoids
Rickmasta has joined #ruby
<apeiros> there are some commands (!) which can be used by registered users. not sure whether there's any for unregistered users.
<shevy> ?adaedra
<ruby[bot]> don't be mean to adaedra
antgel has quit [Ping timeout: 250 seconds]
TvL2386 has quit [Quit: Ex-Chat]
<jhass> huh, there is by now?
mfb2 has joined #ruby
<adaedra> thanks for the gratuitous highlight
karapetyan has joined #ruby
<norc> jhass: Oh. I just realized, this might not be a bug, but a strange side effect from the way lvars exist.
<mustmodify> waxxy: Ah, yes. You are not the weakest link. Your answer is correct.
<apeiros> jhass: yeah, from the beginning. stuff like !ops
<norc> By the time the if clause is parsed, an lvar is created, and any subsequent reference uses that lvar.
Xeago has joined #ruby
<norc> Sorry, I meant LEXED.
JagaJaga has quit [Ping timeout: 250 seconds]
<norc> apeiros: https://eval.in/557630
<norc> Here. Which brings us back to the topic we once had.
<norc> lvars should be created on execution. not lexing.
<jhass> norc: oh, so addr is a method call initially?
<norc> Yes.
Rickmasta has quit [Client Quit]
<jhass> well that was the missing context then :)
<jhass> nil =~ /../ is never true
<apeiros> sad rule of ruby: don't shadow method calls with lvars
<waxxy> we should all switch to using parentheses to avoid this confusion in the future!
<apeiros> s/ calls/s/
Rickmasta has joined #ruby
bruno- has joined #ruby
<norc> apeiros: Things like this really make me appreciate having to declare all variables for a given scope.
paultreny has joined #ruby
<apeiros> mhm
<apeiros> things like that make me appreciate unambiguous syntax
<norc> I mean for languages like C it is a necessity because it needs to know how much space a function needs.
paultreny is now known as Guest61269
phaza has joined #ruby
<jhass> apeiros: right, forgot about !ops
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
karapetyan has quit [Ping timeout: 244 seconds]
rippa has joined #ruby
<norc> jhass: So yeah. I guess the lexer introducing lvars is the one and only side effect that can occur in dead code... :)
<norc> (And thus shadowing methods)
Guest61269 has quit [Client Quit]
paultreny_ has joined #ruby
poerror has joined #ruby
paultreny_ has quit [Remote host closed the connection]
<jhass> yup
poerror has left #ruby [#ruby]
jhn has joined #ruby
<jhass> I actually know that problem well, just didn't come to mind for a second that addr could be a method call
idefine has joined #ruby
<jhass> context helps so much ;)
<mustmodify> norc: So you had a conflict between a local var and a method name?
idefine has quit [Remote host closed the connection]
<norc> mustmodify: https://eval.in/557630
idefine has joined #ruby
<norc> mustmodify: My real mistake was that I accidentally tried using an attr_reader to write back.
<mustmodify> yeah that's not confusing.
<mustmodify> :P
darkxploit has quit [Ping timeout: 244 seconds]
<mustmodify> I mean, not the bug, but the code.
<mustmodify> Don't do that. :P
LoneHermit has quit [Remote host closed the connection]
SilverKey has joined #ruby
<norc> mustmodify: No it is confusing, but it is one of these things that are unlikely to change.
mfb2 has quit [Ping timeout: 252 seconds]
sadin has quit [Remote host closed the connection]
<apeiros> mustmodify: pass-through equations - you must modify it. passing through stuff to make them equate is bad, m'kay? (I have no idea what a pass-through equation is)
phaza has quit [Ping timeout: 240 seconds]
<mustmodify> You're unlikely to stop having local variables with the same name as declared messages? Well then you're going to have a hard life.
<mustmodify> apeiros: thanks. Yeah, I think it's just not a good name.
<mustmodify> apeiros: or it's very specific to my situation.
<apeiros> mustmodify: care to enlighten us about the context?
Chagel has quit [Ping timeout: 246 seconds]
<apeiros> google yields one equation which is used to intersect two lines…
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sadin has joined #ruby
<norc> mustmodify: Ruby is not known for making incompatible changes.
bruno- has quit [Read error: Connection reset by peer]
<mustmodify> sure. I have what I'm calling a micro-emr. We don't do a lot of EMR stuff, but we do collect data, do some conversions, etc., solely in support of a medical report. Some results, like bmi, are calculated based on height and weight. So we have equations. We also have some results, like Physiological Age, which are mapped to a specific other value. It isn't calculated... it's just a reference to another equation-or-value.
darkxploit has joined #ruby
wldcordeiro has quit [Ping timeout: 260 seconds]
<mustmodify> So instead of writing code to support that separately, I just created an equation with a single variable.
<jhass> well, MRI isn't, the community is doing it quite a bit more than elsewhere IME
<norc> jhass: Agreed.
<mustmodify> it's a pass-through equation in that we aren't doing any math... we're just passing another value through.
Xeago has quit [Remote host closed the connection]
AlexRussia has joined #ruby
<norc> jhass: But even JRuby strives to mimic MRIs behaviour with all the bizarre things.
<jhass> well sure, it tries to be a drop in replacement
<waxxy> excuse my ignorance, but if it's a value, why would you call it an equation?
<apeiros> mustmodify: ok, not sure I fully grasped what you're saying. but I guess I wouldn't have the term "equation" in it if there is no math.
<norc> Heck I even managed to find a corner case where I managed to actually crash MRI and JRuby using the same code. That made me smile.
<norc> Fully compatible, even the bugs!
Xeago has joined #ruby
bruno- has joined #ruby
htmldrum has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlexJakeGreen has quit [Remote host closed the connection]
mfb2 has joined #ruby
norc has quit [Ping timeout: 250 seconds]
sepp2k has quit [Ping timeout: 268 seconds]
skislak has quit [Ping timeout: 276 seconds]
shibly has joined #ruby
<shibly> I can't choose one. Python or Ruby, which one should i choose for web development?
<apeiros> toss a coin
<apeiros> why do you think we could make the decision for you?
<tubbo> shibly: python
szulak has joined #ruby
htmldrum has quit [Ping timeout: 268 seconds]
<shibly> tubbo, Why?
mfb2 has quit [Ping timeout: 240 seconds]
<apeiros> oh right, and:
haylon has joined #ruby
<apeiros> ?crosspost shibly
<ruby[bot]> shibly: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
finisherr has joined #ruby
<tubbo> because the coin flip resulted in heads ;)
<apeiros> ^5 tubbo :D
x77686d has joined #ruby
mlakewood has quit [Quit: mlakewood]
marr has quit [Ping timeout: 244 seconds]
<shevy> shibly is evil? :(
<apeiros> shevy: I wouldn't go as far as calling cross-posters evil. why?
bruno- has quit [Read error: Connection reset by peer]
garethrees has quit [Ping timeout: 276 seconds]
<shevy> he crossposted!
bruno- has joined #ruby
<tubbo> shibly: why only python & ruby?
rapha_ has quit [Quit: WeeChat 1.4]
<tubbo> i put it to you! how did you come up with this choice?
<shevy> tubbo hmm was there not a similar conversation yesterday...
kareeoleez has joined #ruby
Shashikant86 has joined #ruby
<shibly> tubbo, What else would you want to select?
<shevy> C!
<shibly> It's for web development.
<tubbo> shibly: well there's Go, Elixir, PHP, C++, Lua, JavaScript, Smalltalk, Erlang, Perl
<tubbo> shibly: all of these languages, while generally regarded as "general purpose", can be used for web development. and you'd be surprised at how many of your favorite sites are implemented in wacky languages for web dev.
rkazak has joined #ruby
<shevy> hehe
Xeago has quit [Remote host closed the connection]
<shevy> I like whacky
<jhass> shibly: pick Crystal!
JulienITARD has quit [Quit: Leaving]
<shibly> tubbo, You didn't mention C#.NET, java
<shevy> ohhh you indeed forgot crystal tubbo!
<kaleido> C# and java make baby jesus cry
<shevy> lol
diegoaguilar has quit [Remote host closed the connection]
daguilaraguilar has quit [Remote host closed the connection]
<kaleido> .NET was used by the nazis in 1939
<apeiros> kaleido: that's no reason not to choose them!
<tubbo> shibly: you are correct.
<mustmodify> kaleido: LOL
<tubbo> shevy: i am currently developing a web framework in crystal SHHHHHHH
DaniG2k has joined #ruby
smathy has joined #ruby
<shevy> yay!
<shevy> apeiros had a big ass web framework in php
<shevy> manveru too I think
<tubbo> shibly: have you done any programming before or are you just getting started to the whole thing?
Shashikant86 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<TomyWork> what do i need to implement in order to sort an array of my class's instances? <=>?
<apeiros> TomyWork: yes
<shibly> tubbo, I have worked with php, rails
<apeiros> TomyWork: for good measure, also include Comparable
Shashikant86 has joined #ruby
<shibly> tubbo, And doing fun with django
mfb2 has joined #ruby
sepp2k has joined #ruby
blackmesa has joined #ruby
<tubbo> shibly: i came from php as well
cschneid has joined #ruby
bronson has joined #ruby
myntcake has quit [Ping timeout: 260 seconds]
<tubbo> also did some stuff in python for Sick-Beard which was pretty fun, but reminded me about how much more i enjoyed ruby
Devalo has joined #ruby
<apeiros> heh, over in #python: `17:12 philr: shibly: Ruby`
Shashikant86 has quit [Max SendQ exceeded]
<tubbo> nice
<shibly> apeiros, But he didn't mention the reason to use ruby.
<tubbo> apeiros: we came to using https://github.com/apeiros/chronos at the job
<tubbo> it's p. cool
<shevy> shibly the differences are not huge
<apeiros> tubbo: oy, for real? it's… like… super old and unmaintained (there is a JS port on the way, though)
<shevy> the biggest one is the philosophy
<apeiros> tubbo: make sure to send patches :D
<tubbo> apeiros: well we found this other thing that did more what we wanted https://github.com/ondrejbartas/sidekiq-cron
<apeiros> tubbo: and of course thanks for the compliment! :D
<tubbo> we were trying to replace sidetiq
<shevy> apeiros wrote so many things that he is already forgetting half of his old stuff - like butler! ;P
<apeiros> shevy: na, didn't forget. it just became heck of a lot more difficult to maintain that stuff with a 100% job :-/
shibly has left #ruby ["Leaving"]
<apeiros> and I have far too many fun side projects
mfb2 has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 252 seconds]
Devalo has quit [Ping timeout: 250 seconds]
synthroid has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 276 seconds]
rbennacer has joined #ruby
kits has joined #ruby
eregon_ is now known as eregon
aufi_ has quit [Ping timeout: 276 seconds]
rbennace_ has quit [Ping timeout: 240 seconds]
<TomyWork> apeiros hmm i just figured out that i only have a "less than" operation on the backend
rbennace_ has joined #ruby
<TomyWork> i tried implementing < instead and including Comparable... didn't work
<TomyWork> ./foo.rb:66: stack level too deep (SystemStackError)
x77686d has quit [Remote host closed the connection]
myntcake has joined #ruby
x77686d has joined #ruby
rbennacer has quit [Ping timeout: 244 seconds]
<smathy> Sounds like you're probably calling <=> within your <=>
Yiota has joined #ruby
agentmeerkat has joined #ruby
IrishGringo has joined #ruby
kareeoleez has quit [Remote host closed the connection]
<TomyWork> does Comparable do that?
kareeoleez has joined #ruby
fedexo has joined #ruby
tubuliferous has joined #ruby
<TomyWork> well i removed Comparable and added a few more non-<=> operators. now it no longer crashes
<TomyWork> but it doesnt sort
<TomyWork> i'll check my criterion
nando294021 has joined #ruby
mfb2 has joined #ruby
SilverKey has quit [Quit: Halted.]
KnownSyntax_ has joined #ruby
aswen has quit [Quit: WeeChat 1.4]
bradleyprice has joined #ruby
Yiota has quit [Ping timeout: 252 seconds]
shredding has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
<smathy> Does Comparable do what? It doesn't insert <=> calls into your <=> method, nor create other infinite loops.
KnownSyntax has quit [Ping timeout: 268 seconds]
mfb2 has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 276 seconds]
<TomyWork> well i dont know... i'm not doing any recursion
<TomyWork> not even accidental
<TomyWork> Comparable gives me < > <= >= == if i define <=>
<TomyWork> i need the inverse :)
shibly has joined #ruby
<shevy> the inverse?
armyriad has joined #ruby
<TomyWork> or a way to sort given <, <=, ==, !=, >=, and >
<shibly> shevy, What did you mean by philosophy?
<shevy> shibly http://www.artima.com/intv/ruby.html - you'll notice a difference when you are using ruby (and have been using another programming language before, such as PHP)
SilverKey has joined #ruby
<shevy> things such as .map versus .collect
tubuliferous has quit [Ping timeout: 250 seconds]
<shevy> if it would be python, there would be only .map
cdg has quit [Ping timeout: 276 seconds]
<smathy> TomyWork, they all call <=> - that's the whole idea of redefining <=>
<smathy> TomyWork, so maybe you're calling one of those in your <=>
[Butch] has joined #ruby
tubuliferous has joined #ruby
mfb2 has joined #ruby
<smathy> (which would explain why the SystemStackError went away when you stopped including Comparable.
stennowork has joined #ruby
<TomyWork> smathy i dont have a <=> yet
terlar has quit [Ping timeout: 250 seconds]
<shibly> Python users will suggest to use python, ruby users will suggest to use ruby, then which one is to select?
kareeoleez has quit [Remote host closed the connection]
marr has joined #ruby
Yiota has joined #ruby
<TomyWork> perl
<shibly> Others will say that their language is good.
<TomyWork> i'm kidding. perl is horrible
<shibly> TomyWork, Perl is old.
Asher has quit [Read error: Connection reset by peer]
<shibly> TomyWork, Why is perl horrible.
<TomyWork> because it's old
<smathy> TomyWork, I'm so lost, you started out asking about <=> - you're telling me that you didn't override that? That *is* what you have to override to affect sort.
mlakewood has joined #ruby
<shibly> Perl is higly used in linux system.
<stennowork> are native extensions written exclusively in C, or can they also be written in C++?
<shevy> shibly but the difference is so small
rubie has quit [Remote host closed the connection]
<TomyWork> smathy ok i'll start over: i want to sort an array of instances of my class, and i have every comparison operator except <=>
Asher has joined #ruby
<stennowork> this tutorial i am following says in order to install passenger, you need c++
<smathy> TomyWork, why do you have the other operators?
<stennowork> (install from gem)
<shevy> stennowork you can use C++ too. hanmac here does so, he maintains one wxwidgets binding for ruby in C++ https://github.com/Hanmac/rwx
<stennowork> i see, thanks
<TomyWork> smathy because the backend implements them
<TomyWork> it does not implement anything similar to <=>
<smathy> TomyWork, what's "the backend"?
<TomyWork> dpkg --compare-versions
JagaJaga has joined #ruby
<shibly> shevy, Difference of what?
shredding has quit [Ping timeout: 250 seconds]
siaw has joined #ruby
<hanmac> stennowork: you can do: C++ stuff <=> C function <=> Ruby API to connect ruby with C++ functions
Yiota has quit [Ping timeout: 246 seconds]
<TomyWork> hanmac wont Inline work?
<stennowork> i see
resin has quit [Quit: leaving]
<stennowork> thanks for the info
<smathy> TomyWork, umm, I'm reading between the lines a bit here, so your class represents a package, and you're wanting to do various comparisons on them, and you thought in order to do that you had to implement all the comparison operators in your own class?
<shevy> shibly between ruby and python
mfb2 has quit [Ping timeout: 260 seconds]
<smathy> TomyWork, and now you're stuck because the tool you're calling out to doesn't have any notion of <=> ?
<TomyWork> smathy i thought that would be helpful, yes :)
<hanmac> TomyWork: hm i use macros to turn C++ getter/setter into c functions i can bind to the ruby api
<smathy> TomyWork, ok, so you're ass backwards. Read this: http://devdocs.io/ruby~2.3/comparable
brent__ has joined #ruby
<TomyWork> i could implement <=> in terms of the others, but i dont want to shell out more than necessary
Yiota has joined #ruby
mfb2 has joined #ruby
<shevy> whoa... cool site. that looks better than rubydoc
kits has quit [Quit: Leaving]
wilbert has joined #ruby
Chagel has joined #ruby
<smathy> TomyWork, read what I linked you to.
<TomyWork> smathy "The class must define the <=> operator" - i dont have one
<stennowork> assuming i know 1.9.2 pretty well, how difficult would it be to get used to 2.x?
<smathy> TomyWork, if you want sort then you have to have one.
bruno- has quit [Read error: Connection reset by peer]
<smathy> TomyWork, ...and read the whole thing.
<TomyWork> i already did 20 minutes ago :)
<shevy> stennowork should be quite simple really. may depend on how much code you have
<smathy> TomyWork, excellent, so you realize you made a mistake implementing each of the other comparison operators individualy..
<stennowork> oki
<shevy> 1.8.x to 1.9.x was bigger than 1.9.x to 2.x really
<stennowork> acn-
<stennowork> right, thats what i wanted to ask :P
<TomyWork> smathy like i said, i want to minimize the amount of dpkg invocations for performance reasons
<brent__> Hello, hoping to get some help w/ this battleship game i'm working on, I"m getting an error when running the rspec test saying wrogn number of arguments. the attached gist has the Board & Game class along w/ the error https://gist.github.com/brentluna/7bea3c5091938f90c79e156936056ed0
<stennowork> 1.8., where string[index] still returned the char code :P
<shevy> hehe
<shevy> I still use [number1,number2] out of habit!
<smathy> TomyWork, that goal has zero impact on the way to proceed.
elifoster has joined #ruby
<TomyWork> smathy but if every invocation of <=> shells out on average 2 times
<TomyWork> then that's bad
ChiefAlexander has quit [Remote host closed the connection]
<brent__> i was under the impression taht since i'm using the splat operator, i was actually giving the board#[] method 2 args instead of 1
<mustmodify> brent__: I don't think your gist's line numbers are the same as in your original file... line 43 is blank.
<brent__> you may be right
<smathy> TomyWork, how are you doing it for the other operators? Just do it the same, it'll have the same perf impact.
<brent__> let me see what it corresponds to
<TomyWork> c++'s sort stuff uses a less than operator (or was it less-or-equal?), so i figured maybe ruby has that too
Couch has quit [Ping timeout: 260 seconds]
andikr has quit [Remote host closed the connection]
<brent__> mustmodify: it's referring to line 45 the #[] method
amclain has joined #ruby
synthroid has joined #ruby
<smathy> TomyWork, ...but now you've read that Comparable page, so you know better.
<TomyWork> smathy the other operators shell out once each
aegis3121 has quit [Ping timeout: 240 seconds]
<TomyWork> smathy yes i know better about what's necessary in order to use the Comparable mixin
<smathy> TomyWork, because you already shelled out once for the object itself, but you can't `sort` an array of your objects like that.
idefine_ has joined #ruby
noobsu has quit []
<shevy> brent__ you probably still only pass the first argument, in array form there. you can find out though, add a second argument via a "," and then the invocation would happen without the error assumingly
<TomyWork> doesnt mean there isnt a sorting algorithm somewhere that's based on less-than operators
<smathy> TomyWork, if you're worried about performance then I'd approach that problem separately, eg. by caching.
araujo_ has joined #ruby
wilbert has quit [Ping timeout: 260 seconds]
rbennace_ has quit [Ping timeout: 260 seconds]
<mustmodify> brent__: How do you initialize your grid? I suspect what you want is @grid[row, col]
<stennowork> could procs/lambdas be considered first class function (method) objects?
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<toretore> stennowork: yes
<smathy> TomyWork, I'm sure you could write your own, but it doesn't matter because in an array of objects it will always be comparing two at a time, hence two shell-outs.
<TomyWork> smathy there's not a lot of caching i can do. dpkg --compare-versions already does compare the plain version numbers
<stennowork> right, fair
bruno- has joined #ruby
<TomyWork> it doesnt compare packages if that's what you thought
<smathy> TomyWork, you can use sort_by in Ruby to make that only shell out once for each unique object, or you can create your own caching solution.
<brent__> mustmodify: the gird is intialized as a arg for initializing the game
idefine_ has quit [Remote host closed the connection]
<smathy> TomyWork, but you can cache the result of the shell-out.
<mustmodify> brent__: show me
<brent__> it's a 2-dimensional array
idefine_ has joined #ruby
<TomyWork> smathy did i mention that debian's version comparison is a complicated algorithm?
<smathy> TomyWork, you mention a lot of irrelevant stuff.
antgel has joined #ruby
<mustmodify> brent__: well then [x, y] instead of [x][y]
<smathy> TomyWork, why do you think that impacts the solution?
Dimik has joined #ruby
joonty1 has quit [Ping timeout: 260 seconds]
<mustmodify> brent__: [x][y] would be for an array of arrays.
idefine has quit [Ping timeout: 252 seconds]
<brent__> mustmodify: it's the first 2 methods of the Board class, can you elaborate why it would be [x, y] instead of [x][y]
gdp has quit [Quit: Leaving]
araujo has quit [Ping timeout: 276 seconds]
<brent__> it is: @grid = Array.new(10){ Array.new(10) }
symm- has joined #ruby
<TomyWork> i cant compare them without dpkg --compare-versions. so the only caching i could do would only be useful if the same pair of objects is compared twice. a good sorting algorithm (i.e. not bogosort) will not let that happen
<TomyWork> even bubblesort compares each pair at most once
shibly has left #ruby ["Leaving"]
<mustmodify> brent__: missed that method somehow. So you have an array of arrays.
<TomyWork> hence its O(n²) complexity (and not like O(n³) or something)
helpa has quit [Remote host closed the connection]
carella_ has joined #ruby
mark_66 has quit [Remote host closed the connection]
helpa has joined #ruby
<smathy> TomyWork, again, reading between the lines, you're saying that what you're calling out two needs to be sent the two different packages for any comparison? So in your `<` implementation you're shelling out once, but sending BOTH versions/package-details?
<mustmodify> brent__: please add your failing test to the gist.
<smathy> *to
<brent__> mustmodify: it is in the gist
rkazak has quit [Ping timeout: 250 seconds]
diegoaguilar has joined #ruby
diegoaguilar has quit [Max SendQ exceeded]
<TomyWork> smathy my < implementation is roughly: return system("dpkg --compare-versions '#{@version}' lt '#{other.version}'")
diegoaguilar has joined #ruby
anagha_ has quit [Quit: Connection closed for inactivity]
the_drow has quit [Quit: This computer has gone to sleep]
carella has quit [Ping timeout: 250 seconds]
<mustmodify> brent__: great. When you said that I was like, "I know I didn't miss *that*."
<mustmodify> brent__: why [[1,1]] instead of just 1,1?
<smathy> TomyWork, ok, and what does that return?
araujo_ has quit [Quit: Leaving]
<TomyWork> true if @version is less than other.version, false otherwise
<brent__> mustmodify: where? in the rspec test?
<mustmodify> brent__: rather, [1,1]
<smathy> TomyWork, ...so false if they're the same?
<brent__> expect(game.board[[1,1]])..?
<TomyWork> smathy yes
<mustmodify> yes, board is an array of arrays. So you want to first access the row, then the column.
<smathy> Heh, ok, so that's terrible.
<mustmodify> So you want game.board[1,1]
<brent__> i just noticed that as well
<brent__> it's a given rspec file that we had to pass
<mustmodify> brent: Oh... hm...
<TomyWork> it's only terrible if you want to implement <=> with it :)
blackms has quit [Quit: Leaving]
<brent__> but it seems like it should be game.board[1, 1].to eq(:x)
agit0 has quit [Quit: zzzZZZ….]
RegulationD has joined #ruby
<smathy> TomyWork, well no, it's terrible for ANY engine that follows a standard approach to collation.
rbennacer has joined #ruby
<smathy> TomyWork, collating always needs three different values for less, same, greater.
<brent__> mustmodify: removing the extra [] from the test gets it to pass,
<mustmodify> Yep. is this for a tutorial or a class?
<smathy> TomyWork, it'd be the same if you wanted to have a DB of some sort order those for you.
<smathy> TomyWork, and there's no other call you can make to just get some sort of consolidated value for the version? A plain integer or bitmask or something that would make sense out in the real world?
<brent__> it seems like it shoudl only have single brackets, based on my knowledge
rbennacer has quit [Read error: Connection reset by peer]
<brent__> I guess a class. prepwork for a bootcamp
rbennacer has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
<mustmodify> brent__: either way, check the original spec to verify. If that's right, and you think it's not likely a typo. then I would ...
<mustmodify> hm....
<TomyWork> smathy i did mention C++'s approach
Snowy has quit [Quit: ragequit]
darkf has quit [Quit: Leaving]
<mustmodify> I would never do it that way, so I don't know.
<mustmodify> Let's see.
tessi has quit [Quit: tessi]
<TomyWork> "The elements are compared using operator<"
<mustmodify> Ah... If Game#board was a hash, which is how you would simulate a 2-dimensional array, then it would work.
allcentury has joined #ruby
<mustmodify> it would be like {[1,1] => nil, [1,2] => nil, [1,3] => ..., ... [5, 5] => ... }
<mustmodify> Or really, just Hash.new
baweaver has joined #ruby
<mustmodify> which would take up less memory than the way you're doing it. Still, I would rather the spec be implementation-agnostic.
<TomyWork> smathy nope. librpm has a 3-way comparison function, though, which i'm going to use once i get to RPMs :)
ramfjord has joined #ruby
DaniG2k has quit [Quit: leaving]
<TomyWork> but for .debs, i havent found a 3-way comparison function
<TomyWork> or a library, for that matter
<brent__> mustmodify: i was looking over the forums, it looks like they expect you to right a different syntatic sugar method for [] and []=
<smathy> TomyWork, you did, not sure what your point is, you want to use C++ instead?
<smathy> TomyWork, doesn't even need to be the cmp operator, just needs to give you a meaningful value.
carella_ has quit [Remote host closed the connection]
<mustmodify> brent__: do you have enough to solve your issue?
<brent__> giving it a shot now
hartuok has quit [Quit: Page closed]
Xeago has joined #ruby
<brent__> it sounds like they want the #[] to take 1 arg isntead fo 2
<TomyWork> my point is, either you're saying C++ doesn't use a standard approach to collation or using a '<' operator to sort things is a standard approach to collation :)
Raboo has quit [Remote host closed the connection]
<smathy> TomyWork, definitely the sort algorithms you can use with just a < approach are limited.
Raboo has joined #ruby
<TomyWork> in what way?
Spami has joined #ruby
bruno- has joined #ruby
<TomyWork> C++ sorts just fine. even has a stable sort
Weavel has joined #ruby
crameth has quit [Quit: crameth]
Chagel has quit [Ping timeout: 276 seconds]
karapetyan has joined #ruby
Cohedrin has joined #ruby
hxegon has joined #ruby
<brent__> mustmodify, so i changed the #[] to [](pos);row,col = pos; @grid[row][col];end and then removed the splat from the BattleshipGame#attack method and seemed to work
<shevy> \o/
bradleyprice has quit [Remote host closed the connection]
<TomyWork> toretore owww, now how do i get to that function? :D
* TomyWork digs
Rodya_ has joined #ruby
jaguarmagenta has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
senayar has quit [Ping timeout: 268 seconds]
<TomyWork> oh wait, that isn't apt, it's a rubygem
kspencer has joined #ruby
<brent__> thanks for the help mustmodify
<smathy> TomyWork, I'm not going to explain the complexities of into sort algorithms to you (for free), if you're interested in the theory here then you can start here: https://en.wikipedia.org/wiki/Three-way_comparison
wilbert has joined #ruby
antgel has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
Alayde has quit [Ping timeout: 244 seconds]
yxhuvud has quit [Remote host closed the connection]
<mustmodify> brent__: ok. I don't have a problem with them requiring you to have a specific implementation, but know that, on an interface level, that isn't what I would call a good long-term solution.
idefine_ has quit [Remote host closed the connection]
<mustmodify> brent__: good luck.
idefine has joined #ruby
<brent__> mustmodify, woudl you mind explaining?
St1gma has quit [Quit: laters]
bradleyprice has joined #ruby
<mustmodify> sure. awkward or implementation-specific interfaces suck.
jaguarmagenta has quit [Ping timeout: 252 seconds]
<TomyWork> smathy well if you bring in the mathematics. order relations are defined by what's less-than what. all else follows.
johnbat26 has joined #ruby
<mustmodify> brent__: because they pin you down.
<TomyWork> or more commonly less-or-equal
<brent__> are you referring to the need for the specific syntatic sugar method?
bruno- has quit [Read error: Connection reset by peer]
<TomyWork> but it's really equivalent, because (a<b) == !(b<a)
<TomyWork> err one second
charliesome has joined #ruby
<TomyWork> but it's really equivalent, because (a<=b) == !(b<a)
<mustmodify> I often find myself changing back-end implementations because an app has grown and that part of the code is now slow or doesn't meet a new requirement. I don't want to have a cascading sequence of things to change. I want to change just the one part. So your interfaces need to work hard to hide the inner mechanisms.
ferr has quit [Quit: WeeChat 1.4]
Norrin has quit [Max SendQ exceeded]
mikecmpbll has joined #ruby
edwinvdgraaf has quit [Ping timeout: 244 seconds]
yxhuvud has joined #ruby
<brent__> could you provide an example of what you would change to "hide the inner mechanisms"
<mustmodify> brent__: So I would rather the test be game.board[1,1]. No matter how you store the board, you can use a `def []` method and provide results.
<mustmodify> sure.
<mustmodify> let's see.
rbennacer has quit [Ping timeout: 240 seconds]
phaza has joined #ruby
Norrin has joined #ruby
rbennacer has joined #ruby
idefine has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 276 seconds]
tvw has quit [Remote host closed the connection]
mikecmpb_ has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
baweaver has quit [Remote host closed the connection]
sadin has quit [Ping timeout: 276 seconds]
<smathy> TomyWork, as I said, you can't use certain sort algorithms with that, like qsort. Anyway, digging into dpkg for you it looks like it *does* implement the cmp function: https://github.com/grondo/apt/blob/52df3fd91fd5e53ed982bbf6bc3203bb371f237e/apt/apt-pkg/deb/debversion.cc#L33-L121
tribals has joined #ruby
<tribals> hi there
rubie has joined #ruby
<smathy> TomyWork, that seems to be what that ruby gem exposes.
<tribals> what is the meaning of `SomeClass()` construct?
jaruga___ has quit [Quit: jaruga___]
RegulationD has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
<toretore> tribals: do you have a concrete example?
<TomyWork> that goes on until line 195, btw.... 160 lines for that, wow
idefine has joined #ruby
<tribals> yes, `Array(name.is_a?(Hash) ? controller.url_for(name).split("://").last : name)`
phaza has quit [Ping timeout: 268 seconds]
<toretore> tribals: Array is a method defined on Kernel
<toretore> it's not a "call" to the Array class
RegulationD has joined #ruby
<TomyWork> libapt-pkg is the library... let's see if i can get at that with ffi :)
<toretore> tribals: for Kernel#Array specifically, it will try to convert whatever it's given to an array
_wwwBukoLaycom has joined #ruby
<smathy> TomyWork, umm, no, there's DoCmpVersion starting at line 127. That calls CmpFragment - which is where the cmp logic is.
<TomyWork> oh, probably not... it uses start/end pointers and it's a C++ thing
<tribals> toretore: thanks! i didn't think of that
<TomyWork> smathy well i cant just compare fragments
<smathy> TomyWork, ...and seeing as you seem to think that presence within C++ legitimizes comsci methodologies, here's C++'s qsort, take note of the function you need to provide to it: http://www.cplusplus.com/reference/cstdlib/qsort/
idefine has quit [Remote host closed the connection]
<toretore> TomyWork: that's (kind of) what i linked you to
<smathy> toretore, yeah, your link caused me to go looking.
<TomyWork> cstdlib is C compatibility stuff
<toretore> gem install apt-pkg
rubie_ has joined #ruby
rubie has quit [Ping timeout: 252 seconds]
bruno- has quit [Read error: Connection reset by peer]
sadin has joined #ruby
<toretore> def <=>(other); Debian::AptPkg.cmp_version(version, other.version); end
<toretore> done
<smathy> TomyWork, ok, no winning with you then. Fine, you're right, the whole concept of cmp is something totally restricted to the fringes of computer science, only used in every DB to do collation, qsort, Ruby, Python, C, Perl, ....
<smathy> toretore, `include Comparable`
<TomyWork> smathy X isn't worthless just because Y also exists
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
<smathy> TomyWork, what did I say was worthless? You're in #ruby asking how to do sorting and you've never stopped resisting doing it the way Ruby (and a bunch of other platforms) do it.
_wwwBukoLaycom has quit [K-Lined]
<TomyWork> i was only arguing that both are valid, that C++ does it differently than ruby and since ruby usually has a dozen ways of doing something, i figured, maybe that also applies to sorting
<smathy> ...despite me telling you numerous times that it didn't.
<smathy> Anyway, HAND.
fmcgeough has joined #ruby
mnrmnaugh has quit [Disconnected by services]
mnrmnaugh has joined #ruby
<TomyWork> toretore thanks a lot. now i'm curious about whether dpkg uses libapt-pkg, though :)
<TomyWork> that sounds a bit circular
<mustmodify> brent__: this took longer than I wanted to spend on it. :) But here are many implementations of game.board[x, y]... interface stays the same, but implementation differs. https://gist.github.com/mustmodify/04f4b41d65f5d74e06c6f2bb83a701ae
johnbat26 has quit [Ping timeout: 260 seconds]
Yeomra has joined #ruby
bruno- has joined #ruby
tubuliferous has quit [Ping timeout: 260 seconds]
Blaguvest has joined #ruby
idefine has joined #ruby
<slash_nick> Shit... there's no #each_cons in ruby 1.8.5 D:
phaza has joined #ruby
<slash_nick> (for array, ok)
<TomyWork> https://github.com/davidben/dpkg/blob/8fd8d798a68d4c5e759637f09a229e117f0f0ccf/lib/dpkg/vercmp.c#L43 this 7-year-old version looks a lot like the one in libapt...
<toretore> 1.8.5 lol
<slash_nick> :)
<TomyWork> but it is separate and it looks the same in the current source
perlgod has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iamvery has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<smathy> ...might be easier to announce the things it DOES have.
fedexo has quit [Ping timeout: 268 seconds]
carella has joined #ruby
davedev24 has joined #ruby
idefine has quit [Remote host closed the connection]
tubuliferous has joined #ruby
igam has quit [Ping timeout: 250 seconds]
benlieb has joined #ruby
crazyphil2 has joined #ruby
p0p0pr37_ has joined #ruby
KnownSyntax has joined #ruby
phaza has quit [Ping timeout: 268 seconds]
bluOxigen_ has joined #ruby
_kfpratt has joined #ruby
AnoHito_ has joined #ruby
pwnd_nsfw` has joined #ruby
coooas has quit [Ping timeout: 268 seconds]
bluOxigen has quit [Ping timeout: 268 seconds]
crazyphil has quit [Ping timeout: 268 seconds]
valeri_ufo has quit [Ping timeout: 268 seconds]
Guest38576 has quit [Ping timeout: 250 seconds]
crazyphil2 is now known as crazyphil
EdwardIII has quit [Ping timeout: 268 seconds]
yo61_ has quit [Ping timeout: 268 seconds]
ddv has quit [Ping timeout: 268 seconds]
valeri_ufo has joined #ruby
sonne has quit [Ping timeout: 250 seconds]
crdpink has joined #ruby
RazorX- has joined #ruby
eggoez has quit [Ping timeout: 268 seconds]
mg^ has quit [Ping timeout: 268 seconds]
Kim^J has quit [Ping timeout: 268 seconds]
Puffball has quit [Quit: No Ping reply in 180 seconds.]
sadin has quit [Read error: Connection reset by peer]
hpltsy has joined #ruby
diegoaguilar has quit [Ping timeout: 250 seconds]
joonty1 has joined #ruby
sadin has joined #ruby
tinnvec_ has joined #ruby
Affix has joined #ruby
diegoaguilar has joined #ruby
iamvery has joined #ruby
blaxter has quit [Quit: foo]
KnownSyntax_ has quit [Ping timeout: 268 seconds]
kfpratt has quit [Ping timeout: 268 seconds]
gregf has quit [Ping timeout: 268 seconds]
zrl_ has quit [Ping timeout: 268 seconds]
AnoHito has quit [Ping timeout: 268 seconds]
crdpink2 has quit [Ping timeout: 268 seconds]
p0p0pr37 has quit [Ping timeout: 268 seconds]
p0p0pr37_ is now known as p0p0pr37
Affix is now known as Guest17477
Puffball has joined #ruby
mnrmnaugh__ has joined #ruby
RazorX has quit [Ping timeout: 268 seconds]
mg^ has joined #ruby
johnbat26 has joined #ruby
joneshf-laptop_ has quit [Ping timeout: 246 seconds]
Kim^J has joined #ruby
Alayde has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
eregon_ has joined #ruby
griffindy has quit [Max SendQ exceeded]
tinnvec has quit [Ping timeout: 268 seconds]
mnrmnaugh_ has quit [Ping timeout: 268 seconds]
chosen1 has quit [Ping timeout: 268 seconds]
amoeba has joined #ruby
MaienM_ has quit [Ping timeout: 268 seconds]
manveru has quit [Ping timeout: 268 seconds]
kapowaz has quit [Ping timeout: 268 seconds]
TheBrayn has quit [Ping timeout: 268 seconds]
eregon has quit [Ping timeout: 268 seconds]
joconcepts has quit [Ping timeout: 268 seconds]
moos3 has quit [Ping timeout: 268 seconds]
ta_ has joined #ruby
DenSchub has joined #ruby
chris2 has quit [Ping timeout: 268 seconds]
DenSchub has quit [Ping timeout: 268 seconds]
tribals has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
kapowaz has joined #ruby
joconcepts has joined #ruby
ddv has joined #ruby
FastJack has quit [Ping timeout: 268 seconds]
sonne has joined #ruby
Alayde_ has joined #ruby
gregf has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
yo61_ has joined #ruby
blaxter has joined #ruby
Log1x has quit [Ping timeout: 250 seconds]
idefine has joined #ruby
Spami_ has joined #ruby
ereslibre has joined #ruby
ereslibre has joined #ruby
manveru has joined #ruby
bmn has quit [Ping timeout: 250 seconds]
yorickpeterse has quit [Ping timeout: 250 seconds]
joonty1 has quit [Ping timeout: 250 seconds]
v1n has quit [Ping timeout: 250 seconds]
ereslibre_laptop has quit [Ping timeout: 250 seconds]
yorickpeterse has joined #ruby
triangles has joined #ruby
FastJack has joined #ruby
tjvc has quit [Ping timeout: 268 seconds]
rikai has quit [Ping timeout: 260 seconds]
htmldrum has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
bmn has joined #ruby
PaulCapestany has quit [Max SendQ exceeded]
Alayde has quit [Ping timeout: 276 seconds]
Fire-Dragon-DoL has quit [Ping timeout: 250 seconds]
kaleido has quit [Remote host closed the connection]
PaulCapestany has joined #ruby
phaza has joined #ruby
Fire-Dragon-DoL has joined #ruby
MaienM_ has joined #ruby
EdwardIII has joined #ruby
v1n has joined #ruby
FooMunki_ has joined #ruby
idefine has quit [Remote host closed the connection]
dumdedum has joined #ruby
ghr has joined #ruby
tjvc has joined #ruby
tjvc has quit [Changing host]
tjvc has joined #ruby
tjvc has quit [Max SendQ exceeded]
<slash_nick> working on an ancient machine ;)
tjvc has joined #ruby
tjvc has quit [Changing host]
tjvc has joined #ruby
sadin has quit [Read error: Connection reset by peer]
Spami has quit [Ping timeout: 275 seconds]
Log1x has joined #ruby
Log1x has quit [Changing host]
Log1x has joined #ruby
DenSchub has quit [Quit: This should never happen.]
htmldrum has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
bluOxigen_ has quit [Ping timeout: 244 seconds]
ryotarai_ has joined #ruby
hpltsy has quit [Read error: Connection reset by peer]
DenSchub has joined #ruby
astrobun_ has joined #ruby
aegis3121 has joined #ruby
trollface has joined #ruby
bnagy_ has joined #ruby
firstdayonthejob has joined #ruby
eggoez has joined #ruby
dostoyevsky has joined #ruby
xsdg has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
Cohedrin_ has joined #ruby
SilverKey has quit [Quit: Halted.]
crankhar1er has joined #ruby
wldcordeiro has joined #ruby
torandu_ has joined #ruby
LiquidIn1ect has joined #ruby
ahuman_ has joined #ruby
Weavel_ has joined #ruby
phaza has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
Gasher has quit [Quit: Leaving]
antgel has joined #ruby
agentmee1kat has joined #ruby
x77686d has quit [Quit: x77686d]
Cohedrin has quit [Ping timeout: 276 seconds]
tw1sted_ has joined #ruby
hoylemd_ has joined #ruby
kp666 has quit [Quit: Leaving]
atmosx_alt has joined #ruby
meinside_ has joined #ruby
zenlot6 has joined #ruby
n008f4g_ has quit [Ping timeout: 260 seconds]
shortdudey123_ has joined #ruby
manveru_ has joined #ruby
elusiveother_ has joined #ruby
<TomyWork> what's on it?
huyderman_ has joined #ruby
phaza has joined #ruby
<slash_nick> a whole world of things
<TomyWork> i mean which distro
zenguy_pc2 has joined #ruby
<slash_nick> ah... centos
Nilium_ has joined #ruby
<TomyWork> oh, didnt know they had ruby 1.9 yet
Rixius has joined #ruby
MRB[alt] has joined #ruby
MRB[alt] is now known as Matthew__
greenhat- has joined #ruby
imajes_ has joined #ruby
Bilge- has joined #ruby
Papierko- has joined #ruby
bmn has quit [*.net *.split]
manveru has quit [*.net *.split]
blaxter has quit [*.net *.split]
kapowaz has quit [*.net *.split]
carella has quit [*.net *.split]
Weavel has quit [*.net *.split]
agentmeerkat has quit [*.net *.split]
szulak has quit [*.net *.split]
banister has quit [*.net *.split]
vdamewood has quit [*.net *.split]
johnmilton has quit [*.net *.split]
zenlot has quit [*.net *.split]
Rixius|Alt has quit [*.net *.split]
s1kx_ has quit [*.net *.split]
FooMunki has quit [*.net *.split]
hk238 has quit [*.net *.split]
lsmola has quit [*.net *.split]
astrobunny has quit [*.net *.split]
tagaulap has quit [*.net *.split]
sauvin has quit [*.net *.split]
YaknotiS has quit [*.net *.split]
Matthew_ has quit [*.net *.split]
meinside has quit [*.net *.split]
gmci has quit [*.net *.split]
torandu has quit [*.net *.split]
tw1sted has quit [*.net *.split]
Elysia has quit [*.net *.split]
spastorino has quit [*.net *.split]
joeyjones has quit [*.net *.split]
ahuman has quit [*.net *.split]
ekem has quit [*.net *.split]
crankharder has quit [*.net *.split]
huyderman has quit [*.net *.split]
hoylemd has quit [*.net *.split]
Alina-malina has quit [*.net *.split]
thomasfedb has quit [*.net *.split]
flughafen has quit [*.net *.split]
elusiveother has quit [*.net *.split]
Paradox has quit [*.net *.split]
LiquidInsect has quit [*.net *.split]
greenhat has quit [*.net *.split]
SirFunk has quit [*.net *.split]
Nilium has quit [*.net *.split]
ryotarai has quit [*.net *.split]
Papierkorb has quit [*.net *.split]
err_ok has quit [*.net *.split]
shortdudey123 has quit [*.net *.split]
mroth has quit [*.net *.split]
zenguy_pc has quit [*.net *.split]
Bilge has quit [*.net *.split]
atmosx has quit [*.net *.split]
dostoyev1ky has quit [*.net *.split]
bnagy has quit [*.net *.split]
xsdg_ has quit [*.net *.split]
hinbody has quit [*.net *.split]
imajes has quit [*.net *.split]
callumacrae has quit [*.net *.split]
stryek has quit [*.net *.split]
deepak has quit [*.net *.split]
jpinnix_______ has quit [*.net *.split]
tobiasvl has quit [*.net *.split]
FooMunki_ is now known as FooMunki
Nilium_ is now known as Nilium
ryotarai_ is now known as ryotarai
imajes_ is now known as imajes
Matthew__ is now known as Matthew_
Papierko- is now known as Papierkorb
stryek has joined #ruby
YaknotiS has joined #ruby
<slash_nick> it's not the latest centos... not sure what latest would've shipped with
bruno- has joined #ruby
tagaulap_ has joined #ruby
joeyjones has joined #ruby
flughafen has joined #ruby
rikai has joined #ruby
SirFunk has joined #ruby
thomasfedb has joined #ruby
thomasfedb has quit [Changing host]
thomasfedb has joined #ruby
Xeago has joined #ruby
shortdudey123_ is now known as shortdudey123
ekem has joined #ruby
<TomyWork> i'm kidding of course, but centos is usually a bit old
meinside_ is now known as meinside
sauvin has joined #ruby
bmn has joined #ruby
manveru_ is now known as manveru
lsmola has joined #ruby
gmci has joined #ruby
s1kx_ has joined #ruby
Elysia has joined #ruby
karapetyan has quit [Remote host closed the connection]
cdg has joined #ruby
phaza has quit [Ping timeout: 252 seconds]
Alina-malina has joined #ruby
<smathy> Heh, using the distro's ruby, always fun.
johnmilton has joined #ruby
nibbo_ has quit [Ping timeout: 260 seconds]
<stennowork> i actually just installed ruby on centos
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
ramfjord has joined #ruby
<stennowork> but, of course, using rvm
callumacrae has joined #ruby
<slash_nick> yeah... of course i'd build a solution on ruby 2.3.0 that I'd need to use in 1.8.5-land... undetermined whether I can get a modern ruby in this env or whether I'll have to implement the moving window (#each_cons) myself.
<stennowork> and now i have ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
<stennowork> 1.8.5?
<stennowork> old
Xeago has quit [Ping timeout: 260 seconds]
idefine has joined #ruby
<TomyWork> slash_nick so you tried rvm and the likes?
nibbo has joined #ruby
frem_ has joined #ruby
err_ok has joined #ruby
6JTAACLKH has joined #ruby
hinbody has joined #ruby
carella has joined #ruby
err_ok has quit [Changing host]
err_ok has joined #ruby
<slash_nick> "ancient"
frem_ has quit [Changing host]
frem_ has joined #ruby
nibbo has quit [Changing host]
nibbo has joined #ruby
<smathy> I'm sure that whatever gems are working with 1.8 will not work with 2.3
<stennowork> oh kinda missed the intro on that
<stennowork> feels bad
6JTAACLKH has quit [Remote host closed the connection]
<slash_nick> TomyWork: oh no it's not a how-do-i issue... this is a not-my-decision issue
* slash_nick shrugs... stdlib.
<smathy> Oh look, hxegon is here, you came out the other side of your rebuild?
<slash_nick> ^ smathy
kaleido has joined #ruby
<hxegon> smathy slash_nick Sort of... Arch worked, but OS X didn't. I reinstalled and I'm going to try again tonight.
<smathy> slash_nick, huh?
<smathy> You can't install a later ruby because of some stdlib error?
yfeldblum has quit [Remote host closed the connection]
<smathy> hxegon, bummer, at least no brick.
<slash_nick> no, i dont care about which gems work because i'm using stdlib...
bradleyprice has quit [Remote host closed the connection]
<TomyWork> slash_nick wait, whose braindead decision was it to force you to use a ruby version whose sucessor's successor's successor is already EOL?
yfeldblum has joined #ruby
<smathy> Ah ok. I can't imagine not using an gems :)
<slash_nick> TomyWork: whether i'm forced to is still undetermined...
<TomyWork> (is 2.1 EOL yet? this page here says end of march)
mfb2_ has joined #ruby
spastorino has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
evidex_ has quit [Remote host closed the connection]
idefine has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby
deepak has joined #ruby
blackmesa has joined #ruby
TheBrayn has joined #ruby
mroth has joined #ruby
<TomyWork> (ah, nothing except security fixes since end of march)
tax has quit [Ping timeout: 276 seconds]
kapowaz has joined #ruby
mfb2__ has joined #ruby
RegulationD has quit [Remote host closed the connection]
mfb2_ has quit [Read error: Connection reset by peer]
chris2 has joined #ruby
jpinnix_______ has joined #ruby
gizmore has joined #ruby
zrl_ has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mfb2 has quit [Ping timeout: 252 seconds]
jackjackdripper has joined #ruby
johnbat26 has quit [Ping timeout: 244 seconds]
phaza has joined #ruby
SCHAAP137 has joined #ruby
rcvalle has joined #ruby
jhack has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
nanoz has joined #ruby
allcentury has quit [Quit: WeeChat 1.2]
wilbert has quit [Ping timeout: 260 seconds]
jackjackdripper has quit [Quit: Leaving.]
idefine has joined #ruby
symm- has quit [Ping timeout: 244 seconds]
jackjackdripper has joined #ruby
bradleyprice has joined #ruby
tvw has joined #ruby
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
stennowork has quit [Quit: Verlassend]
mfb2__ has quit [Remote host closed the connection]
TomyWork has quit [Ping timeout: 244 seconds]
mfb2 has joined #ruby
crdpink has quit [Ping timeout: 250 seconds]
crdpink2 has joined #ruby
n008f4g_ has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
SilverKey has joined #ruby
last_staff has joined #ruby
cdg has quit [Remote host closed the connection]
codecop has joined #ruby
cdg has joined #ruby
pandaant has quit [Remote host closed the connection]
mfb2 has quit [Remote host closed the connection]
karapetyan has joined #ruby
jackjackdripper1 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
johnbat26 has joined #ruby
phaza has quit [Ping timeout: 260 seconds]
stannard has quit [Remote host closed the connection]
bronson has joined #ruby
mr_rich101 has quit [Ping timeout: 276 seconds]
syk has joined #ruby
charliesome has joined #ruby
jackjackdripper has quit [Ping timeout: 260 seconds]
Rodya_ has quit [Remote host closed the connection]
kitallis has quit [Ping timeout: 276 seconds]
phaza has joined #ruby
bronson has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 244 seconds]
jordanm has joined #ruby
mr_rich101 has joined #ruby
kitallis has joined #ruby
chouhoulis has joined #ruby
agentmeerkat has joined #ruby
stannard has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
baweaver has joined #ruby
agentmee1kat has quit [Ping timeout: 276 seconds]
charliesome has quit [Read error: Connection reset by peer]
<duracrisis>
sharkman has joined #ruby
<sharkman> what does def [](k); @hash[k.to_s]; end
<sharkman> do?
<sharkman> especially what is the def []() syntax mean
charliesome has joined #ruby
<jhass> [] is just a valid method name
<jhass> you can invoke it like foo.[](bar)
<jhass> but ruby also rewrites foo[bar] to foo.[](bar)
chouhoulis has quit [Ping timeout: 260 seconds]
phaza has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 268 seconds]
charliesome has quit [Client Quit]
aiguu has joined #ruby
MagePsycho has joined #ruby
<sharkman> yikes okay
<sharkman> thanks
ramfjord has quit [Ping timeout: 246 seconds]
drptbl_ has quit [Quit: My MAC has gone to sleep. zZz..]
Lomex has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
tessi has joined #ruby
baweaver has joined #ruby
idefine has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
Alayde_ has left #ruby ["WeeChat 1.1.1"]
karapetyan has joined #ruby
s00pcan has quit [Read error: Connection reset by peer]
s00pcan_ has joined #ruby
mfb2 has joined #ruby
<ytti> not yikes, simple :)
<ytti> less special cases/expectaions
<ytti> 4-2 is actually 4.-(2)
<ytti> exceptions not expectations
kareeoleez has joined #ruby
joonty1 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
karapetyan has quit [Remote host closed the connection]
mfb2 has quit [Remote host closed the connection]
mfb2 has joined #ruby
rippa has quit [Ping timeout: 250 seconds]
mfb2 has quit [Remote host closed the connection]
mfb2 has joined #ruby
Rodya_ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
joonty1 has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
<shevy> beer not water
jhack has quit [Quit: jhack]
dsimon has joined #ruby
karapetyan has joined #ruby
<dsimon> hey all; i think i'm a bit confused about enumerators
<hanmac> yeah but i gets more complicated when ruby has a difference between "-3" and "- 3" ;P
<baweaver> Care to enumerate on that?
<dsimon> i thought they allowed for a kind of lazy evaluation, but this code: https://gist.github.com/DavidMikeSimon/95dd0a0643c364591e4a47433f6877f9
<hanmac> baweaver: XD
<dsimon> does not do what i would expect it to
<dsimon> i'd expect it to only print "AT 1", "AT 2", "ANY? true", but it prints an "AT" for every element
<baweaver> what do you expect it to do?
<baweaver> ninja
syk has quit [Quit: Textual IRC Client: www.textualapp.com]
<dsimon> jinx, coke, etc.
<dsimon> :-)
<baweaver> select returns an Enumerator
<baweaver> >> [1,2].select
<ruby[bot]> baweaver: # => #<Enumerator: [1, 2]:select> (https://eval.in/557730)
wldcordeiro has quit [Read error: Connection reset by peer]
<baweaver> which you put each on
<baweaver> making that select do nothing
blackmesa has joined #ruby
zast has quit [Remote host closed the connection]
RegulationD has joined #ruby
tvl has joined #ruby
<baweaver> and calling each with a block returns the array itself
tvl is now known as tobiasvl
<dsimon> no, hold on
<baweaver> >> [1,2].select.each { |v| nil }
<dsimon> i'm pretty sure the each in this case is "applying" the select
<ruby[bot]> baweaver: # => [] (https://eval.in/557731)
wldcordeiro has joined #ruby
<dsimon> >> [1,2,3].select.each { |v| v >= 2}
<ruby[bot]> dsimon: # => [2, 3] (https://eval.in/557732)
<dsimon> >> [1,2,3].select.each { |v| v >= 1}
<ruby[bot]> dsimon: # => [1, 2, 3] (https://eval.in/557733)
<baweaver> huh
<baweaver> well, TIL
<baweaver> but that's odd ruby in any case
<dsimon> yeah but TISC (today i'm still confused) :-(
<baweaver> why not just put the block on select?
<baweaver> or better yet, use find?
bruno- has quit [Read error: Connection reset by peer]
<baweaver> [1,2,3].find { |v| v > 2 }
<baweaver> >> [1,2,3].find { |v| v > 2 }
<ruby[bot]> baweaver: # => 3 (https://eval.in/557734)
johnbat26 has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
Dimik1 has joined #ruby
raeoks has quit [Quit: Textual IRC Client: www.textualapp.com]
jhack has joined #ruby
<baweaver> >> [1,2,3].find { |v| puts "visited: #{v}"; v >= 2 }
<ruby[bot]> baweaver: # => visited: 1 ...check link for more (https://eval.in/557735)
<dsimon> because i want to do lazy calculation in some cases but not in others
<baweaver> ?xy
<ruby[bot]> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
SilverKey has quit [Quit: Halted.]
ledestin has joined #ruby
elifoster has quit [Ping timeout: 250 seconds]
<dsimon> let's say i have an array that i want to filter on something expensive
<baweaver> find will break out when it finds something
<dsimon> sometimes i'm interested in getting all the filtered results
<baweaver> then make a flag
<dsimon> but other times i only want to know if there are *any*
crank1988 has quit [Ping timeout: 240 seconds]
<dsimon> i thought i could return an enumerator in either case, and call either .any? or .to_a on it depending on the use case
<dsimon> or, suppose i only wanted the first 3 results regardless of how many
<dsimon> and so on; the usual stuff that's handy about lazy evaluation
<hanmac> hey checkout take_while:
<hanmac> >> (1..10).take_while.each {|i| puts "AT #{i}"; i <= 2}
<ruby[bot]> hanmac: # => AT 1 ...check link for more (https://eval.in/557741)
tagaulap_ has quit [Quit: Connection closed for inactivity]
darkxploit has quit [Ping timeout: 244 seconds]
minster_prime has joined #ruby
<baweaver> >> flag = true; (1..10).select { |v| puts "visited: #{v}"; check = v > 2; return v if check && flag; check }
<dsimon> hm, maybe the problem is just that i'm expecting any? to stop early if it can
<ruby[bot]> baweaver: # => visited: 1 ...check link for more (https://eval.in/557745)
<dsimon> but the documentation seems to say that it doesn't do that
<dsimon> so this is something about Enumerable that confuses me, rather than Enumerator, maybe?
<baweaver> Enumerator isn't lazy
<baweaver> not unless you put lazy on it
<dsimon> nvm, any? does stop early when applied directly on an Array
<dsimon> put lazy on it?
<baweaver> &ri Enumerable#lazy
Chagel has joined #ruby
bruno- has joined #ruby
<baweaver> though admittedly I haven't used it myself in any live code
<baweaver> and don't know much about it
nalitia has joined #ruby
<dsimon> hm
crank1988 has joined #ruby
<dsimon> i tried putting it as `arr.select.lazy.each`
<dsimon> but no effect?
idefine has joined #ruby
jobewan has joined #ruby
<nalitia> How can I require a module with name "Xyz" when there is already a class loaded with name "Xyz"? I always get "Xyz is not a module (TypeError)"
<baweaver> >> (1..10).lazy.select { |v| v > 2 }
Waqas has joined #ruby
<ruby[bot]> baweaver: # => #<Enumerator::Lazy: #<Enumerator::Lazy: 1..10>:select> (https://eval.in/557748)
Xeago has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
<baweaver> >> (1..10).lazy.select { |v| v > 2 }.to_a
<ruby[bot]> baweaver: # => [3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/557749)
<baweaver> >> (1..10).lazy.select { |v| v > 2 }.any?
<ruby[bot]> baweaver: # => true (https://eval.in/557750)
<dsimon> yeah, just tried that and it works :-)
<baweaver> >> (1..10).lazy.select { |v| puts "visited: #{v}"; v > 2 }.any?
<ruby[bot]> baweaver: # => visited: 1 ...check link for more (https://eval.in/557751)
<dsimon> tho for some reason i cannot do .lazy.select.each
<baweaver> the each is redundant
TomyLobo has joined #ruby
<aegis3121> nalitia: I would say don't rename modules and classes to be the same?
<dsimon> well, select without block returns an enumerator, right?
charliesome has joined #ruby
<nalitia> aegis3121: I can't control the names, isn't there some alternative?
<aegis3121> not that I'm aware of
<nalitia> you have to be fucking kidding me...
<dsimon> so i'd expect .lazy.select. to return an enumerator on an enumerator... which is silly, but nonetheless :-)
<nalitia> that's what I thought
<aegis3121> Namespacing your modules/classes would get around that
<aegis3121> My::Xyz
<aegis3121> vs just Xyz
<nalitia> that's cute, out here in the real world, I can't!
<aegis3121> Do you have actual code you can share?
<nalitia> unreal that you guys use this trash
nalitia has quit [Client Quit]
<toretore> nalitia: how about providing some real code?
Chagel has quit [Ping timeout: 252 seconds]
<toretore> lol
jaguarmagenta has joined #ruby
<baweaver> dsimon: the each is irrelevant honestly, which is why I wouldn't have expected it to do that.
sauvin has quit [Remote host closed the connection]
stannard has quit [Read error: Connection reset by peer]
idefine has quit [Ping timeout: 240 seconds]
jhn has left #ruby ["Textual IRC Client: www.textualapp.com"]
<dsimon> the docs for enumerator seem to imply that #each is the default way to apply the enumerator, which does seem weird yeah
<baweaver> !rude nalitia
elaptics is now known as elaptics`away
<baweaver> just in case they come back in a bit later while I'm not here
Xeago has quit [Ping timeout: 260 seconds]
jordanm has quit [Read error: Connection reset by peer]
<dsimon> yeah, i must be misunderstanding Enumerator#each
<baweaver> >> (1..10).select(&:even?)
<ruby[bot]> baweaver: # => [2, 4, 6, 8, 10] (https://eval.in/557752)
<baweaver> all those methods just take a block
<baweaver> >> (1..10).select(&:even?).map { |v| v * 2 }
<ruby[bot]> baweaver: # => [4, 8, 12, 16, 20] (https://eval.in/557753)
william3 has quit [Remote host closed the connection]
<baweaver> >> (1..10).select(&:even?).map { |v| v * 2 }.reduce(0, :+)
<ruby[bot]> baweaver: # => 60 (https://eval.in/557754)
<baweaver> so you can just chain along your merry way
<baweaver> though once you get over 5-6 it's probably time to break things up a bit.
<dsimon> indeed, and i can even be lazy that way, which is what i was seeking :-)
aegis3121 has quit [Quit: Textual IRC Client: www.textualapp.com]
<baweaver> fair warning that I never really use it so anything I say on it is guesswork from Haskell
<shevy> lol
<dsimon> so then what's the use of select w/o block which returns an enumerator?
aegis3121 has joined #ruby
<baweaver> Not sure honestly
<baweaver> never had a use for it
jaguarmagenta has quit [Ping timeout: 244 seconds]
<baweaver> probably is one, but not one I'm immediately aware of.
<shevy> just like monads!
<baweaver> Anyways, food time for me. Ox0dea or jhass would probably know the magic there better than me.
<baweaver> A monad is just a monoid in the category of an endofunctor.
Es0teric has joined #ruby
* TomyLobo hits shevy's monads
baweaver has quit [Remote host closed the connection]
<TomyLobo> there, i found a use
darkxploit has joined #ruby
MagePsycho has quit [Ping timeout: 240 seconds]
tvon has joined #ruby
darkxploit has quit [Max SendQ exceeded]
darkxploit has joined #ruby
x77686d has joined #ruby
idefine has joined #ruby
<jhass> dsimon: I only read the beginning, but Enumerator executes each method in the chain for all elements at once, passing the result of the previous invocation to the next item in the chain. There's Enumerator::Lazy available through Enumerable#lazy (iirc), which executes the whole chain for each item before going to the next item
perlgod has joined #ruby
perlgod has quit [Client Quit]
william3 has joined #ruby
ramfjord has joined #ruby
<dsimon> jhass, is there any particular reason then to call methods like select without a block?
<dsimon> rather than just getting an enumerator first and then using its Enumerable methods in the usual way with a block
william3 has quit [Remote host closed the connection]
<jhass> >> [nil, false, 1].select.to_a
<ruby[bot]> jhass: # => [nil, false, 1] (https://eval.in/557756)
<jhass> mh
william3 has joined #ruby
<jhass> >> [nil, false, 1].select.each {|x| x }
<ruby[bot]> jhass: # => [1] (https://eval.in/557757)
<jhass> interesting?
<jhass> dunno I think nobody really does that and it's just for consistency of some sort
<dsimon> ok
<dsimon> in that spirit though i was surprising to find that this didn't work:
<dsimon> >> [nil, false, 1].lazy.select.each {|x| x}
<ruby[bot]> dsimon: # => tried to call lazy select without a block (ArgumentError) ...check link for more (https://eval.in/557758)
MagePsycho has joined #ruby
<dsimon> though this does:
<dsimon> >> [nil, false, 1].lazy.select {|x| x}
<ruby[bot]> dsimon: # => #<Enumerator::Lazy: #<Enumerator::Lazy: [nil, false, 1]>:select> (https://eval.in/557759)
<dsimon> >> [nil, false, 1].lazy.select {|x| x}.to_a
<ruby[bot]> dsimon: # => [1] (https://eval.in/557760)
SilverKey has joined #ruby
<jhass> Enumerator::Lazy is much much newer than Enumerator, I guess they simply didn't repeat that odd behavior ;)
<dsimon> fair enough :-)
htmldrum has joined #ruby
TomyLobo has quit [Read error: Connection reset by peer]
<sphex_> hey. I need to generate and send emails with Unicode in the subject field. Any one could recommend a module by any chance? I have zero experience with ruby and emails... Ideally it wouldn't need an SMTP server and could just spawn off sendmail(1).
karapetyan has quit [Remote host closed the connection]
<smathy> jhass, actually the non-lazy behavior makes sense to me. [ nil, false, 1 ].select.each {|x|x} should return the same as [ nil, false, 1 ].select {|x|x}
jhack has quit [Ping timeout: 276 seconds]
<jhass> >> [nil, false, 1].select.map {|x| x }
<ruby[bot]> jhass: # => [nil, false, 1] (https://eval.in/557761)
wldcordeiro has quit [Ping timeout: 268 seconds]
jrafanie has joined #ruby
stannard has joined #ruby
kirun has joined #ruby
jhack has joined #ruby
<jhass> smathy: ^ still follow that one?
mfb2 has quit [Remote host closed the connection]
<jhass> sphex_: pretty sure the mail gem has something to handle that
<smathy> Definitely less intuitive, but map returns its own damn things, whereas each does some sort of delegate my block to my input.
<jhass> dunno it's just inconsistent to me
<smathy> Yeah, definitely hard to intuit.
<smathy> map.select does what I'd expect.
Es0teric has quit [Quit: Computer has gone to sleep.]
<jhass> >> [nil, false, 1].select.reject.each {|x| x }
<ruby[bot]> jhass: # => [nil, false] (https://eval.in/557762)
lacrosse has joined #ruby
platzhirsch has quit [Quit: Leaving.]
superscott has joined #ruby
KramerC has quit [Quit: Leaving]
bronson has joined #ruby
<dsimon> sphex_, this is a little off-topic, but you are almost always better off routing through an email server if you don't want to get blocked by spam filters
<dsimon> attempting to directly connect to the recipient's server will usually not go well, because of greylisting, DNS-based mail server verification, etc.
<sphex_> jhass: alright. I haven't found how yet, but I'll keep looking. probably just need to word-encode manually the header when needed...
<jhass> I know that Mail::Address properly handles it for names in the To/From etc headers
<jhass> I would have expected it just handles it for the subject too
<sphex_> dsimon: oh yeah.. in this specific case the server already seems to have a good reputation and has been sending emails directly for years now. people can still setup a relaying local MTA if they want though. I just hate adding extra, mandatory configurations to things...
bronson has quit [Ping timeout: 252 seconds]
phaza has joined #ruby
<dsimon> no worries then, just wanted to keep you from getting bitten by the same thing i did a while back :-)
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
chouhoulis has joined #ruby
phaza has quit [Ping timeout: 252 seconds]
<sphex_> jhass: huh, you're right. it all just works. I messed up my testing. :/
moos3 has joined #ruby
aef has quit [Remote host closed the connection]
jrafanie_ has joined #ruby
morochena has joined #ruby
gregf has quit [Read error: Connection reset by peer]
<sphex_> eh, it seems like a pretty great module
davedev2_ has joined #ruby
morochena has quit [Client Quit]
davedev24 has quit [Ping timeout: 276 seconds]
joonty1 has joined #ruby
davedev24 has joined #ruby
davedev2_ has quit [Read error: Connection reset by peer]
jhack has quit [Ping timeout: 276 seconds]
jrafanie has quit [Ping timeout: 246 seconds]
sepp2k has quit [Quit: Leaving.]
phaza has joined #ruby
joonty1 has quit [Ping timeout: 250 seconds]
MagePsycho has quit [Ping timeout: 260 seconds]
<theRoUS> is there a non-file mutex mechanism that supports LOCK_SH and LOCK_EX? and not just exclusive all-or-nothing locking?
govg has joined #ruby
GinoMan2440 has quit [Ping timeout: 260 seconds]
codecop has quit [Remote host closed the connection]
GinoMan2440 has joined #ruby
Lomex has quit [Remote host closed the connection]
zeroXten has quit [Remote host closed the connection]
MagePsycho has joined #ruby
carella has quit [Remote host closed the connection]
carella has joined #ruby
TomyLobo has joined #ruby
sharkman has quit [Ping timeout: 268 seconds]
VeryBewitching has joined #ruby
Xeago has joined #ruby
spider-mario has joined #ruby
Xeago has quit [Ping timeout: 250 seconds]
Snowy has joined #ruby
<smathy> theRoUS, no, you might like ReadWriteLock from concurrent-ruby: https://github.com/ruby-concurrency/concurrent-ruby
Yeomra has quit [Ping timeout: 260 seconds]
ponga has quit [Quit: Connection closed for inactivity]
Ami00 has joined #ruby
baweaver has joined #ruby
ceej has quit [Ping timeout: 276 seconds]
<theRoUS> smathy: thanks
ta_ has quit [Read error: Connection reset by peer]
<smathy> Np.
IrishGringo has quit [Ping timeout: 276 seconds]
polysics has quit [Read error: Connection reset by peer]
govg has quit [Ping timeout: 240 seconds]
ceej has joined #ruby
polysics has joined #ruby
uri___ has joined #ruby
<uri___> if i have a lazy enum and i chain two selects on it, will it only iterate through the collection once?
ta_ has joined #ruby
frem_ has quit [Quit: Connection closed for inactivity]
william3 has quit [Remote host closed the connection]
polysics has quit [Client Quit]
polysics has joined #ruby
ffgghhj has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
<ffgghhj> hi, why does such error appears? http://pastie.org/10807300
davedev24 has quit []
<smathy> jhass, more about lazy enum ^
<jhass> uri___: I'd expect so, yes
<uri___> jhass thanks
elusiveother_ is now known as elusiveother
elusiveother has quit [Changing host]
elusiveother has joined #ruby
<smathy> ffgghhj, because Thread.exclusive is deprecated, the gem should be using Mutex
[Butch] has quit [Quit: I'm out . . .]
<smathy> ffgghhj, are you using the latest version of that gem?
<ffgghhj> yes
<ffgghhj> i did "bundle update"
<smathy> ffgghhj, you don't seem to be.
<smathy> ...maybe you have the version restricted in Gemfile.
<ffgghhj> padrino-core-0.12.5
<ffgghhj> i think this is last vesrion
<smathy> ffgghhj, maybe you should check.
jhack has joined #ruby
<ffgghhj> how
howdoi has quit [Quit: Connection closed for inactivity]
<smathy> ffgghhj, gems are hosted here: https://rubygems.org/
<ffgghhj> ok
<ffgghhj> seems found err
<ffgghhj> gem 'padrino', '0.12.5'
<smathy> ffgghhj, might be there for a good reason, but probably not.
baweaver has quit [Remote host closed the connection]
<ffgghhj> Installing padrino-helpers 0.13.1
<ffgghhj> nice, working
marens has joined #ruby
<smathy> ffgghhj, you're welcome.
IrishGringo has joined #ruby
allcentury has joined #ruby
<ironcamel> can someone explain this code snippet to me https://gist.github.com/ironcamel/6586c087db101f17c30b7912c1b1589d
<ironcamel> is that a block being passed to a function file() ?
govg has joined #ruby
<ironcamel> and what's up with '/srv/exports': ?
marens has quit [Client Quit]
infernix has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
<jhass> ironcamel: it's not actually valid ruby
<jhass> ironcamel: if we ignore the "file " for a moment we got a hash nested inside a hash though
ixti has joined #ruby
<ironcamel> this puppet code
<jhass> but I don't think this is ruby
<jhass> ?puppet
<ruby[bot]> Please join #puppet for help with it.
<ironcamel> so puppet is its own language
<jhass> I guess?
<jhass> this isn't #puppet
mfb2 has joined #ruby
<ironcamel> i don't want to learn puppet
MagePsycho has quit [Quit: MagePsycho]
<jhass> me neither
<ironcamel> was just trying to learn/understand the ruby code
Yeomra has joined #ruby
<eam> I've unfortunately learned some of it and I can confirm that yes, it is not ruby in pp files
<shevy> lol
<shevy> that discussion snippet between ironcamel and jhack was fun
<eam> though puppet itself is written in ruby (and rails!)
<jhass> there's no ruby code there
<jhass> scnr
crankhar1er is now known as crankharder
crankharder has quit [Quit: leaving]
symm- has joined #ruby
JagaJaga has quit [Ping timeout: 276 seconds]
<benzrf> 'scnr'?
crankharder has joined #ruby
MagePsycho has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
mfb2 has quit [Ping timeout: 250 seconds]
mfb2 has joined #ruby
marens has joined #ruby
<jhass> "sorry, could not resist"
jjt has joined #ruby
jjt has left #ruby [#ruby]
SilverKey has quit [Quit: Halted.]
<ramfjord> there is a pretty huge puppet IRC though
Snowy has quit [Remote host closed the connection]
SilverKey has joined #ruby
Rodya_ has quit [Read error: Connection reset by peer]
zeroDivisible has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
Asher has quit [Quit: Leaving.]
last_staff1 has joined #ruby
wldcordeiro has joined #ruby
Rodya_ has joined #ruby
Asher has joined #ruby
idefine_ has joined #ruby
infernix has joined #ruby
idefine_ has quit [Read error: Connection reset by peer]
idefine__ has joined #ruby
jenrzzz_ has joined #ruby
last_staff has quit [Ping timeout: 244 seconds]
Devalo has joined #ruby
FooMunki has quit [Quit: FooMunki]
last_staff has joined #ruby
Xeago has joined #ruby
FooMunki has joined #ruby
last_staff1 has quit [Ping timeout: 252 seconds]
idefine has quit [Ping timeout: 252 seconds]
Rodya_ has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
bruno- has joined #ruby
wldcordeiro has quit [Ping timeout: 268 seconds]
Yeomra has quit [Ping timeout: 246 seconds]
phaza has quit [Ping timeout: 260 seconds]
Guest17477 has quit [Ping timeout: 276 seconds]
last_staff1 has joined #ruby
idefine__ has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
flashpoint9 has quit [Remote host closed the connection]
idefine has joined #ruby
bluOxigen has quit [Ping timeout: 276 seconds]
Affix has joined #ruby
Devalo has quit [Remote host closed the connection]
phaza has joined #ruby
last_staff has quit [Ping timeout: 268 seconds]
last_staff1 is now known as last_staff
Affix is now known as Guest14534
toretore has quit [Ping timeout: 260 seconds]
slackbotgz has joined #ruby
Rickmasta has joined #ruby
idefine has quit [Remote host closed the connection]
<shevy> but nobody wants to learn puppet!
<shevy> neither ironcamel ... nor jhass... nor me
MagePsycho has quit [Ping timeout: 250 seconds]
<jhass> you don't want to be a puppetmaster?
* jhass needs to watch ghost in the shell again
<apeiros> the movie? or standalone complex?
allcentury has quit [Quit: WeeChat 1.2]
last_staff has quit [Ping timeout: 246 seconds]
<apeiros> though, puppetmaster would be the movie, I guess
jobewan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> it would
<jhass> though rewatching SAC would be nice too
<jhass> did you watch the new stuff?
<jhass> wait, we should go to offtopic with that
<apeiros> if "new stuff" = after SAC, then no
<apeiros> and yes, ot
jobewan has joined #ruby
<baweaver> or are we on Metallica now?
phaza has quit [Ping timeout: 260 seconds]
antgel has quit [Ping timeout: 240 seconds]
johnmilton has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
MagePsycho has joined #ruby
last_staff has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
antgel has joined #ruby
RegulationD has joined #ruby
aiguu has quit [Ping timeout: 240 seconds]
phaza has joined #ruby
Waqas has quit [Read error: Connection reset by peer]
Waqas has joined #ruby
Waqas has quit [Read error: Connection reset by peer]
Waqas has joined #ruby
Waqas has quit [Read error: Connection reset by peer]
rodfersou has joined #ruby
Waqas has joined #ruby
Waqas has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
Snowy has joined #ruby
Waqas has joined #ruby
Gasher has joined #ruby
last_staff has quit [Ping timeout: 246 seconds]
polysics_ has joined #ruby
IrishGringo has quit [Ping timeout: 250 seconds]
jaguarmagenta has joined #ruby
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
phaza has quit [Ping timeout: 276 seconds]
<shevy> that's not a good music to write ruby code!
polysics has quit [Ping timeout: 252 seconds]
idefine has joined #ruby
ddv has quit [Ping timeout: 268 seconds]
* Nilium agrees with jhass and also needs to watch Ghost in the Shell again.
<Nilium> But first, implement it.
ta_ has quit [Read error: Connection reset by peer]
polysics_ has quit [Ping timeout: 250 seconds]
haylon has left #ruby ["WeeChat 1.4"]
phaza has joined #ruby
polysics has joined #ruby
jaguarmagenta has quit [Ping timeout: 268 seconds]
bradleyprice has quit [Ping timeout: 244 seconds]
ta_ has joined #ruby
mfb2_ has joined #ruby
x77686d has quit [Quit: x77686d]
mfb2_ has quit [Remote host closed the connection]
idefine has quit [Ping timeout: 250 seconds]
ddv has joined #ruby
blackgoat has joined #ruby
aiguu has joined #ruby
bffff_ has joined #ruby
william3 has joined #ruby
mfb2 has quit [Ping timeout: 276 seconds]
idefine has joined #ruby
ffgghhj has quit [Quit: Leaving]
phaza has quit [Ping timeout: 240 seconds]
<hxegon> Opinions on using stuff like facets or contracts in production?
antgel has quit [Ping timeout: 276 seconds]
chipotle has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
antgel has joined #ruby
william3 has quit [Ping timeout: 276 seconds]
ta_ has quit [Read error: Connection reset by peer]
<dsimon> i've had a hell of a time getting facets to cooperate with some other gems
<dsimon> which is too bad cause there's some neat stuff in there i'd like to use
solars has quit [Ping timeout: 260 seconds]
slackbotgz has quit [Remote host closed the connection]
<dsimon> Hash#mash in particular really should be in the stdlib, imo...
<dsimon> ActiveSupport has something similar
ta_ has joined #ruby
<dsimon> that's the one
tenderlove has quit [Quit: Leaving...]
Coldblackice_ has joined #ruby
<dsimon> it's particularly useful to call on Hash as well
tenderlove has joined #ruby
<dsimon> to transform one hash into another
x77686d has joined #ruby
Madplatypus has joined #ruby
govg has quit [Ping timeout: 250 seconds]
jrafanie_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
phaza has joined #ruby
<hxegon> dsimon agreed, a lot of HOF stuff in ruby feels really awkward when trying to return a hash
replay has joined #ruby
replay has quit [Max SendQ exceeded]
<dsimon> i mean, obviously it's just map(&block).to_h, but i don't like sticking stuff onto the `end` of multi-line blocks
<dsimon> i feel like it's easy to miss there
dionysus69 has joined #ruby
replay has joined #ruby
rikai has quit [Ping timeout: 244 seconds]
<dsimon> HOF?
poerror has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
<hxegon> dsimon higher order function, so stuff like map, reduce, anything that takes a function as input.
poerror has left #ruby [#ruby]
<dsimon> ah, gotcha
bradleyprice has joined #ruby
idefine has joined #ruby
bronson has joined #ruby
<hxegon> dsimon facets has a lot of niceties for stuff like partial application, and function composition. Most of the code I write is just stuff like
sdothum has joined #ruby
synthroid has quit []
polishdub has quit [Quit: Leaving]
stannard has quit [Remote host closed the connection]
<hxegon> def foo x; foo.map { |e| e.something x }; end
Ami00 has quit [Quit: Залишаю]
freerobby has quit [Quit: Leaving.]
maneken has joined #ruby
bradleyprice has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 252 seconds]
idefine has quit [Ping timeout: 240 seconds]
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
rikai has joined #ruby
bradleyprice has joined #ruby
<hxegon> hmm... I was going to say partial application would clear that up, but I thing functions would have to be first class objects. So I'd have to rewrite a bunch of stuff to return Procs and Lambdas.
stannard has joined #ruby
<maneken> Hello ruby people. I'm a php developer, I have no experience with ruby, but I'm thinking about starting a project. It's gonna be a CRM/ERP open-source software, and I want to create something absolutely basic that could be extended with plugins so that anyone can contribute.
senayar has joined #ruby
senayar has joined #ruby
<maneken> Can you help with any resources to help with the plugin design?
ljames has joined #ruby
Akkad has joined #ruby
Rodya_ has joined #ruby
<gizmore> maneken: it is going to be a web2.0 website?
mfb2 has joined #ruby
<gizmore> plugins, generally, need an interface they obey to
<maneken> gizmore, yes
<gizmore> maybe like "config options"
<gizmore> are you going to use rails?
<havenwood> maneken: See the Sequel and Roda plugin systems.
<havenwood> maneken: I don't think a CRM is a good first Ruby project.
rahult has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<gizmore> any project is a good first ruby project, imo :)
Rodya_ has joined #ruby
<gizmore> and any v3 version is the best version!
mfb2 has quit [Remote host closed the connection]
lxsameer has joined #ruby
<maneken> i have experience in PHP. I suppose it's gonna be easier for me to use symphony or some other php framework, but I find it boring and i wanted to try something else
<havenwood> maneken: Ruby is lovely.
<gizmore> Ruby has a really nice syntax (coming from php too)
<maneken> havenwood, it looks like it :)
joonty has joined #ruby
<gizmore> btw, i am working on chatbot which has a plugin system too.... https://github.com/gizmore/ricer4-tcp this is a raw tcp/ip connector plugin for it :)
GinoMan2440 has quit [Ping timeout: 250 seconds]
GodFather has quit [Ping timeout: 268 seconds]
<gizmore> add_ricer_plugin_module(File.dirname(__FILE__)+'/ricer4/tcp') ^^
<gizmore> this adds the gems directory to be loaded for the bot... ugly, i bet
<maneken> oh god. It's gonna take a while to get used to ruby syntax :S
swills has quit [Ping timeout: 252 seconds]
yfeldbl__ has joined #ruby
<gizmore> maneken: i wrote a tut once for people like you
<maneken> ruby for php devs?
joonty has quit [Ping timeout: 252 seconds]
<gizmore> yep :)
ta__ has joined #ruby
<gizmore> it´s pretty incomplete... missing blocks and yield stuff
<gizmore> and maybe def foo(*restarg)
<gizmore> ruby is so flexible.... it´s amazing ^^
<gizmore> doing it for 2 or 3 years now... and i am still happy when i wire code in it
lacrosse has quit [Quit: Connection closed for inactivity]
ta_ has quit [Ping timeout: 250 seconds]
<gizmore> got pushed to it by work... and after a year decided it´s cool enough to write a hobby project in it
chipotle has quit [Quit: cheerio]
<gizmore> imho, only the performance is a slight concern
<gizmore> but the ecosystem and language itself is pretty awe
<gizmore> and of course, script/dynamic languages all have the problems of flexibility vs. typesafety
<gizmore> but debugging ruby is fun, compared to other langs, for me
vF3hNGxc47h8 has joined #ruby
<gizmore> byebug rules :)
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
mrmortondk has quit [Quit: Textual IRC Client: www.textualapp.com]
<maneken> monkeypatching looks terrifying.. O_o
<gizmore> actually it´s easy
<gizmore> there is "load" and "require"
<gizmore> both is the same, of course, but require keeps track of files loaded already
sameerynho has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
idefine has joined #ruby
<gizmore> so if you "load" a file, you just always overwrite (or create) definitions
<gizmore> you can simply do:
<gizmore> > class String; def to_s; "aaa"; end; end; "hello".to_s
lvn has joined #ruby
sharkman has joined #ruby
sharkman has quit [Max SendQ exceeded]
<gizmore> which would override the String's to_s implementation and return "aaa" always
sharkman has joined #ruby
<gizmore> easy to mess up core stuff.... soooo flexible =)
<gizmore> there is a lot discussion on the net about monkey patching and alike, but first you need to know that loading a file can just overwrite existing code without problems
<gizmore> unlike php
<gizmore> where "class Foo{}; class Foo{};" gives a crash
<gizmore> in ruby class Foo; end; class Foo; end; would both just work on the Foo class definitions
<gizmore> and either overwrite or create definitions
<gizmore> in PHP, monkey patching is not possible, iirc
<gizmore> in Ruby you should not do it, but can :) (and will!)
idefine has quit [Ping timeout: 276 seconds]
<gizmore> in PHP i wrote a chatbot and gave up on code reloading on runtime (PECL extension for it sucks)
freerobby has joined #ruby
sameerynho has quit [Ping timeout: 252 seconds]
<gizmore> in Ruby it was no problem :)
<gizmore> simply call "load" again on all files, and all methods are updated again \o/
aiguu has quit [Quit: WeeChat 1.4]
Robbie has joined #ruby
<gizmore> unloading methods that had been removed would be a problem, but i ignore that :P
Robbie has quit [Client Quit]
Robbie has joined #ruby
<gizmore> i assume WEBRick ignores that as well (a dev http server in rails)
SilverKey has joined #ruby
noobsu has joined #ruby
aupadhye has quit [Quit: Leaving]
polysics has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
Robbie has quit [Client Quit]
idefine has joined #ruby
joneshf-laptop has joined #ruby
CausaMortis has joined #ruby
hxegon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> gizmore: WEBRick doesn't do the code reloading, rails does
<jhass> and it doesn't ignore it
<gizmore> i bet removing methods is difficult?
Azure has joined #ruby
<jhass> there you go
hxegon has joined #ruby
<maneken> gizmore, do you think maybe ruby is not a good choice for a crm or erp system, and maybe i should something more strict?
<gizmore> maneken: i have learned SAP/ABAP, and the terms CRM and ERP cause mixed feelings here :)
william3 has joined #ruby
<jhass> gizmore: tl;dr don't monkey patch, drop constants and then load the file(s) that defined them
<gizmore> thanks jhass :)
<jhass> so existing instances will continue to use the old code
<jhass> new instances get the new one
BrunoSaboia has joined #ruby
<gizmore> jhass: old instances use new code for my project =)
neanderslob has quit [Remote host closed the connection]
gizless has joined #ruby
Gasher has quit [Quit: Leaving]
dumdedum has quit [Quit: KTHXBYE]
gizmore|2 has joined #ruby
Gasher has joined #ruby
xingped has joined #ruby
giz|work has joined #ruby
BSaboia has quit [Ping timeout: 252 seconds]
william3 has quit [Ping timeout: 260 seconds]
<giz|work> jhass: thanks... in my project i want old instances to use new code though... and i assume my "just load all again" approach is ok then?
sharkman has quit [Quit: Leaving]
Dimik1 has quit [Ping timeout: 246 seconds]
<jhass> iirc rkh discusses that approach in the above article, but it's some time since I read it
<giz|work> anywaa
gizmore has quit [Ping timeout: 250 seconds]
<giz|work> for the ERP / CRM.... i think it would be redicule to use Java or C for a new ERP system
<giz|work> i guess a script language is the way to go, to create a new huge beast
<giz|work> so either python, perl, ruby, php, javascript, etc?
Xeago has joined #ruby
<giz|work> maybe go?
gizless has quit [Ping timeout: 240 seconds]
<giz|work> i would love to try a node.js server/client website
<jhass> "Go" "script language" *cough*
Xeago has quit [Remote host closed the connection]
<giz|work> i know that Go is compiled :)
freerobby has quit [Quit: Leaving.]
<giz|work> but maybe it´s a reasonable choice?
<giz|work> i dunno
gizmore|2 has quit [Ping timeout: 240 seconds]
<giz|work> i wouldnt want to write a new huge website in C or Java, right?
<jhass> I know shit about CRM/ERP, can't judge
<giz|work> basically it´s just like any other website
<giz|work> CRM == Customer Relationship Management (a buzzword)
dionysus69 has quit [Ping timeout: 244 seconds]
<giz|work> basically its just managing contacts
<giz|work> ERP == taxes + shipping + products + material + recipes + costs + departments + customers + employees + etc
noobsu has left #ruby [#ruby]
<giz|work> the big problem in replacing SAP/ERP is that it really can handle a lot
<giz|work> its a beast, because economy is a beast
tessi has quit [Quit: tessi]
<giz|work> also SAP has grown since the 80's or 90's
davedev24 has joined #ruby
<giz|work> and it really is ugly, beside being a beast handler
victortyau has joined #ruby
<maneken> well, it's international software as well, so it has to support pretty much everything
lvn has quit [Ping timeout: 268 seconds]
uri___ has quit [Ping timeout: 250 seconds]
<giz|work> yep... you cant take a week off and say "i am going to recode SAP" :)
Yiota has joined #ruby
<maneken> well, you can't take a month off and say I'm going to learn SAP :P
<tubbo> giz|work: those kinds of massive services are typically pretty polyglot
<tubbo> like they'll use different technology for the frontend, APIs, and internal code that does the "real work"
konsolebox has quit [Read error: Connection reset by peer]
<giz|work> did you notice i code whitespace morse in my chat messages? Oo
<maneken> would you suggest using a sql database for such a project?
<giz|work> of course :)
swills has joined #ruby
<giz|work> databases are a nice thing to store data in a structured way
jbcden has joined #ruby
<tubbo> definitely, i wouldn't use any NoSQL database if you're a "system of record"...especially for financial data.
Weavel_ has quit [Quit: If you think nobody cares, try missing a few payments]
<tubbo> data integrity > data availability in this case.
jbcden has quit [Client Quit]
<giz|work> or just use System.exec "cat 'new data' > db.txt"
<giz|work> the data integrity is assured.... for the last and one and only entry
<tubbo> hah
aibot_ has joined #ruby
<giz|work> btw.... i have created an installer for ActiveRecord classes :P
aibot has quit [Ping timeout: 240 seconds]
lemur has joined #ruby
<giz|work> it assures that the scheme is inside the model,and the installer handles dependencies nicely :)
<giz|work> i like ActiveRecord, but dont like rails :)
vircung has quit [Remote host closed the connection]
<giz|work> so my classes install thyself, dependent on other install routines... way more fun than migration files
gnufied has quit [Quit: Leaving]
<tubbo> yeah i kinda wish i could just define the schema in AR and rails would infer changes on its own
<tubbo> s/AR/AR classes
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<giz|work> detecting changes is not implemented... and to be honest... its not that easy
vircung has joined #ruby
<giz|work> usually you have install and upgrade.... or just "upgrades"
<giz|work> so in my installer decoraror you just write install install install
<giz|work> which can have dependencies, and every install is a version++
<giz|work> but in the end you always, at least, have the scheme in the model
<giz|work> and there is never a problem with migration dependencies
lemur has quit [Ping timeout: 250 seconds]
neanderslob has joined #ruby
<giz|work> its my first spec driven development :)
<tubbo> interesting
dhollinger has quit [Quit: WeeChat 1.4]
<giz|work> could be split in more gems
<giz|work> should spec fine for 38 tests
<tubbo> giz|work: did you know about the event pub/sub system implemented in ActiveSupport?
Caerus has quit [Ping timeout: 264 seconds]
<giz|work> i have an own event system in my armagic
<giz|work> i am working on a text based chat mud
<giz|work> and events are a hot topic :)
<tubbo> yeah i saw that, i was curious as to why you made that rather than use something off the shelf
poerror has joined #ruby
<tubbo> unless it was just for fun, in which case more power to you!
minimalism has joined #ruby
poerror has left #ruby [#ruby]
<giz|work> because..... i have cities/areas, parties, locations etc
<giz|work> events are submiitted to event containers
CausaMortis has quit [Ping timeout: 246 seconds]
<giz|work> there is a global container where you publish/subscribe
<giz|work> but events can also be emitted to subscribers who are connected to your container
theunraveler has quit []
<giz|work> so party members and combatents get events when someone is hit
<giz|work> etc...
tessi has joined #ruby
<giz|work> i decided to code an own event system, because i am unsure if existing systems reflect my needs
<tubbo> cool
n008f4g_ has quit [Ping timeout: 252 seconds]
Caerus has joined #ruby
<giz|work> wanna see my irc/mud in action?
<tubbo> we have our own publish/subscribe system at work, but the real meat & potatoes is this gem called Wisper
<tubbo> sure
<giz|work> join #shadowlamb
joonty has joined #ruby
karapetyan has joined #ruby
kareeoleez has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
neanderslob has quit [Read error: Connection reset by peer]
kareeoleez has joined #ruby
yfeldbl__ has quit [Ping timeout: 246 seconds]
joonty has quit [Ping timeout: 250 seconds]
baweaver has quit [Remote host closed the connection]
bruno- has quit [Read error: Connection reset by peer]
MagePsycho has quit [Quit: MagePsycho]
bruno- has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
chipotle has quit [Quit: cheerio]
_kfpratt has quit [Read error: Connection reset by peer]
kfpratt has joined #ruby
x77686d has quit [Quit: x77686d]
gregf has joined #ruby
idefine has quit [Ping timeout: 246 seconds]
idefine has joined #ruby
shinnya has joined #ruby
aegis3121 has quit [Ping timeout: 260 seconds]
smathy is now known as smathy_afk
symm- has quit [Ping timeout: 276 seconds]
jaguarmagenta has joined #ruby
kareeoleez has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
zapata has joined #ruby
neanderslob has joined #ruby
jaguarmagenta has quit [Ping timeout: 250 seconds]
idefine has joined #ruby
benlieb has quit [Quit: benlieb]
x77686d has joined #ruby
biberu has quit []
mfb2 has joined #ruby
yfeldblum has joined #ruby
giz|work is now known as gizmore
Waqas has quit [Ping timeout: 250 seconds]
binaryplease1 has joined #ruby
wldcordeiro has joined #ruby
mfb2 has quit [Ping timeout: 252 seconds]
binaryplease has quit [Ping timeout: 244 seconds]
spider-mario has quit [Remote host closed the connection]
zenlot has joined #ruby
baweaver has joined #ruby
william3 has joined #ruby
zenlot6 has quit [Ping timeout: 244 seconds]
mfb2 has joined #ruby
firstdayonthejob has quit [Ping timeout: 252 seconds]
bffff_ has quit [Quit: Connection closed for inactivity]
kfpratt has quit [Remote host closed the connection]
renderfu_ has joined #ruby
antgel has quit [Ping timeout: 268 seconds]
binaryplease1 is now known as binaryplease
william3 has quit [Ping timeout: 276 seconds]
mnrmnaugh__ has quit [Remote host closed the connection]
renderful has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
idefine_ has joined #ruby
bradleyprice has quit [Remote host closed the connection]
idefine__ has joined #ruby
idefine has quit [Ping timeout: 246 seconds]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackjackdripper1 has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
idefine_ has quit [Ping timeout: 268 seconds]
idefine__ has quit []
senayar has quit [Remote host closed the connection]
chipotle has joined #ruby
mlakewood has quit [Quit: mlakewood]
tessi has quit [Quit: tessi]
renderful has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
mlakewood has joined #ruby
smathy_afk is now known as smathy
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
renderfu_ has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
banister has joined #ruby
renderfu_ has joined #ruby
zacstewart has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby
Gasher has quit [Quit: Leaving]
bruno- has joined #ruby
renderful has quit [Ping timeout: 276 seconds]
senayar has joined #ruby
mfb2_ has joined #ruby
renderful has joined #ruby
n008f4g_ has joined #ruby
Rutixz has quit [Remote host closed the connection]
VeryBewitching has quit [Quit: Konversation terminated!]
chipotle has quit [Quit: cheerio]
renderfu_ has quit [Ping timeout: 268 seconds]
mfb2 has quit [Ping timeout: 250 seconds]
jhack has quit [Quit: jhack]
mfb2_ has quit [Ping timeout: 244 seconds]
neanderslob has quit [Remote host closed the connection]
<xingped> hey, can anyone help me understand what "prototypal inheritance" means, how it works in ruby, and how it's different from classical inheritance?
victortyau has quit [Quit: Textual IRC Client: www.textualapp.com]
cschneid has quit [Remote host closed the connection]
Rutix has joined #ruby
Rutix has joined #ruby
SilverKey has joined #ruby
jobewan has quit [Ping timeout: 252 seconds]
fmcgeough has joined #ruby
duderonomy has joined #ruby
fmcgeough has quit [Client Quit]
rahult has joined #ruby
<smathy> xingped, is this an assignment?
rahult is now known as rahult_
agentmeerkat has quit [Ping timeout: 252 seconds]
rahult_ is now known as rahult
<xingped> smathy, not quite. i have an interview tomorrow for a position teaching full stack web dev. they know i've never used ruby, but i need to learn anyways and this is one of the things talked about. crash coursing myself the past couple days on ruby
yfeldblum has quit [Ping timeout: 250 seconds]
<xingped> i've only used PHP for backend dev prior to this
Chagel has joined #ruby
<smathy> xingped, ok, and you're sure the question is about ruby? Ruby is primarily a class-inheritance based language, and in the web world the classic example of prototypical inheritance is Javascript.
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper1 has joined #ruby
<xingped> hm... it's a "mock teaching session" interview, but it's a bit vague on whether they meant ruby or javascript. maybe they meant javascript
chipotle has joined #ruby
chipotle has quit [Client Quit]
<hxegon> xingped I would think they mean JS, as ruby (allegedly) has poor support for that kind of thing
Rutix has quit [Remote host closed the connection]
<baweaver> prototypes are straight Javascript
<xingped> haha, alright, thanks ya'll
<xingped> never done prototypal anything in javascript either
<smathy> xingped, so ruby does _kinda_ have the mechanism via mixins, but in the ruby world no one refers to it as prototypical inheritance because ruby's primary method of inheritance is class-based.
graft has joined #ruby
graft has joined #ruby
s1kx_ has quit [Quit: bai]
Chagel has quit [Ping timeout: 246 seconds]
<smathy> xingped, so maybe to cover all bases, take a quick look at mixins in ruby, they're easy, and then get into JS.
<xingped> alright, thanks smathy
freerobby has joined #ruby
<graft> heyo, so often i do: def initialize(foo,bar); @foo = foo; @bar = bar; end - is there a way to do this implicitly, i.e. initialize directly into an instance var?
<graft> like def initialize(@foo,@bar) or something
rodfersou has quit [Quit: leaving]
wldcordeiro has quit [Ping timeout: 252 seconds]
jackjackdripper has quit [Ping timeout: 260 seconds]
nickjj_ is now known as nickjj
<smathy> xingped, but seriously, I'm over 25 years as a dev, over 10 in ruby, and if I went for a job and they asked me about prototypical inheritance in ruby I'd say: "Huh? You mean javascript right."
<baweaver> not really for that without passing it a hash and dynamically assign them
<baweaver> which presents its own dangers
<smathy> graft, no, but you can do a parallel assignment: @foo, @bar = foo, bar;
<graft> smathy: yeah... still seems like a waste of characters
<xingped> smathy, haha, good to know. new to ruby so didn't know it wasn't really a thing in ruby
<smathy> I can't cure your biases against characters.
Azure has joined #ruby
<smathy> xingped, yep, good luck.
<Nilium> What do you have against glyphs
whippythellama has quit [Quit: WeeChat 1.4]
mfb2 has joined #ruby
<graft> they cost mana
<baweaver> you could make a macro type method for it based on attr_{reader, writer, accessor}
<smathy> graft, once I wanted to be able to just say: `def initialize @foo, @bar; end` - but y'know, it passed.
bradleyprice has joined #ruby
<baweaver> >> class Test < Struct.new(:foo, :bar); end; Test.new(1,2)
<ruby[bot]> baweaver: # => #<struct Test foo=1, bar=2> (https://eval.in/557792)
Arcaire has quit [Quit: wew lad]
Arcaire has joined #ruby
mfb2 has quit [Ping timeout: 246 seconds]
nando294021 has quit [Ping timeout: 240 seconds]
<smathy> I can hear all those saved characters rejoicing.
<smathy> ...and future baweaver swearing.
marr has quit [Ping timeout: 268 seconds]
* baweaver uses Structs on occasion
bronson has quit [Remote host closed the connection]
* smathy too, not for this reason though ;)
al2o3-cr has quit [Ping timeout: 246 seconds]
zeroDivisible has quit [Quit: WeeChat 1.4]
william3 has joined #ruby
<baweaver> Oh I know, it's dirty
<Nilium> I use Go. You get over languages not being ultra-concise.
baweaver has quit [Remote host closed the connection]
gizmore has quit [Ping timeout: 276 seconds]
crystal77 has joined #ruby
dunj3 has quit [Ping timeout: 244 seconds]
<crystal77> Figured this was the best place to ask this. Do we need to use "rbenv rehash" for rbenv anymore? Thought it was built in now? https://github.com/rbenv/rbenv/pull/638/commits/67f429c41de851052950ffdb372fda90a21a4356
baweaver has joined #ruby
govg has joined #ruby
william3 has quit [Ping timeout: 260 seconds]
devbug has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 244 seconds]
dunj3 has joined #ruby
RegulationD has quit [Remote host closed the connection]
mlakewood has quit [Quit: mlakewood]
govg has joined #ruby
mlakewood has joined #ruby
govg has quit [Ping timeout: 244 seconds]
govg has joined #ruby
neha- has joined #ruby
goodroot has joined #ruby
n008f4g_ has quit [Ping timeout: 276 seconds]
ocbtec has quit [Quit: leaving]