cagomez has quit [Remote host closed the connection]
jrabe has joined #ruby
alveric3 has joined #ruby
orbyt_ has quit [Ping timeout: 255 seconds]
nymous has joined #ruby
alveric2 has quit [Ping timeout: 240 seconds]
nofxx has quit [Remote host closed the connection]
safetypin has joined #ruby
nofxx has joined #ruby
cschneid_ has quit [Remote host closed the connection]
vondruch has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
<nymous>
hey folks, i just want to let you know, if someone were interested in, i made my gem to kind of first release point, you might check it here https://github.com/divanikus/salus
<nymous>
i didn't released it anywhere yet
cagomez has joined #ruby
contradictioned_ has quit [Quit: No Ping reply in 180 seconds.]
plexigras has quit [Ping timeout: 248 seconds]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg_ has quit [Remote host closed the connection]
goyox86 has quit [Quit: goyox86]
cdg has joined #ruby
21WAADFGZ has joined #ruby
cschneid_ has quit [Ping timeout: 250 seconds]
Psybur has quit [Ping timeout: 248 seconds]
kryptoz has joined #ruby
nowhere_man has quit [Ping timeout: 260 seconds]
contradictioned has joined #ruby
kryptoz has quit [Ping timeout: 250 seconds]
troys_ is now known as troys
hahuang65 has joined #ruby
synthroid has quit []
Technodrome has joined #ruby
pragmatism has joined #ruby
mim1k has joined #ruby
hutch34 has joined #ruby
enterprisey has quit [Ping timeout: 260 seconds]
mim1k has quit [Ping timeout: 255 seconds]
contradictioned has quit [Quit: No Ping reply in 180 seconds.]
kus_ubuntui686 has joined #ruby
kus_ubuntui686 has quit [Max SendQ exceeded]
<centrx>
nymous: interesting
hutch34 has quit [Ping timeout: 240 seconds]
voodoofish430 has left #ruby [#ruby]
govg has quit [Ping timeout: 268 seconds]
xco has quit [Quit: xco]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Technodrome has joined #ruby
govg has joined #ruby
21WAADFGZ has quit [Quit: 21WAADFGZ]
alfiemax has joined #ruby
hutch34 has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
vikaton has joined #ruby
br0d1n has quit [Quit: Leaving]
rhyselsmore has joined #ruby
<nymous>
centrx: consider it as v0.1.0 quality product, but any suggestions are welcome
millerti has joined #ruby
govg has quit [Ping timeout: 250 seconds]
alfiemax has quit [Ping timeout: 268 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
<RickHull>
nymous: one thing I like to do in the early days is put a notice at the top of the README, something like *this is alpha software still in development*
Dimik has quit [Ping timeout: 248 seconds]
<nymous>
added a small disclaimer
cschneid_ has quit [Ping timeout: 250 seconds]
hutch34 has joined #ruby
contradictioned has joined #ruby
hutch34 has quit [Ping timeout: 250 seconds]
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
alveric4 has joined #ruby
bmurt has joined #ruby
shreve has joined #ruby
kitsunenokenja has joined #ruby
Emmanuel_Chanel has joined #ruby
alveric3 has quit [Ping timeout: 255 seconds]
mjolnird has quit [Quit: Leaving]
nowhere_man has joined #ruby
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
enterprisey has joined #ruby
millerti has quit [Ping timeout: 248 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
emilford has quit [Quit: leaving]
yeticry has joined #ruby
yeticry_ has quit [Read error: Connection reset by peer]
<nymous>
for example, you might ask redis-server for stats, which are just counters
<nymous>
pull them into "counter" metrics in my dsl
<nymous>
and get "rate per sec" automagically
jackjackdripper has quit [Quit: Leaving.]
<nymous>
no special processing required
<RickHull>
so I assume collectd and e.g. zabbix have some common functionality -- and though they express it differently, your DSL allows a single expression that works for both?
<nymous>
well, i can't guarantee that
<nymous>
zabbix is much more complex than many other collectors
<RickHull>
I am kind of thinking in terms of a database abstraction layer
<nymous>
but for things like graphite, collectd - yeah, most likely
<RickHull>
different RDBMS have a lot of common functionality
<RickHull>
but a DB abstraction layer usually sacrifices a lot to have a common interface
hutch34 has joined #ruby
<RickHull>
and then allows bypassing to use RDBMS specific instructions
<bougyman>
and then some don't.
<nymous>
the only problem is that they usually have different naming schemes
<bougyman>
like Sequel.
cdg has quit [Ping timeout: 250 seconds]
sylario has quit [Quit: Connection closed for inactivity]
<nymous>
my dsl is not that complex, is just several primitives for getting current value or rate per sec from a foreign source
kryptoz has joined #ruby
<nymous>
like you shouldn't reimplement it again
<RickHull>
what does the data flow look like?
<RickHull>
i'm assuming the app and the OS are data sources
<RickHull>
and some metrics warehouse and graphing thing is the data sink
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
emilford has quit [Quit: WeeChat 1.9.1]
<nymous>
salus is invoked somehow, grabs data, calculates metrics and pulls them to renderer objects
emilford has joined #ruby
<nymous>
renderer can just output it to stdout or file, or send to a graphite server, for example
<nymous>
most collector agents like collectd can grab data from stdout
<RickHull>
so app to collectd to salus?
<nymous>
no
ttrx has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
<nymous>
app -> salus -> collectd
<RickHull>
ah ok
<RickHull>
sorry, I should kinda know this stuff but it's been a while :)
<nymous>
collectd runs salus to grab some data
<nymous>
and you define how
<RickHull>
ah ok
<nymous>
same with zabbix
kryptoz has quit [Ping timeout: 248 seconds]
<nymous>
as with graphite, you might run salus by cron and would send data to graphite by himself
<nymous>
actually i didn't made this yet, but you might implement it rather simple
<nymous>
current graphite renderer just output data in graphite protocol to stdout
cdg has joined #ruby
fyrril has quit [Read error: Connection reset by peer]
<nymous>
well, ok, i have to go off to bed, it's 5 am here already :)
<nymous>
no, it won't, name is a string and you are converting it to_i
<nymous>
also consider space in /^cpu /, it on purpose, get only all cores stats
<RickHull>
ah well, just throwing it out there :)
<nymous>
you might change it to /^cpu\d/ to get per core stats
<RickHull>
cheers, looks like an interesting project :)
<nymous>
but you'll have to add name to metrics in that case
<nymous>
check the zabbix example code in the readme
GodFather has quit [Ping timeout: 240 seconds]
<nymous>
anyways, thanks for advices, bye
nymous has quit [Quit: RAGING AXE! RAGING AXE!]
mim1k has joined #ruby
safetypin has quit [Quit: ZZZzzz…]
JsilverT has joined #ruby
hutch34 has quit [Ping timeout: 250 seconds]
ResidentBiscuit has quit []
hutch34 has joined #ruby
cdg has joined #ruby
emilford has quit [Quit: WeeChat 1.9.1]
mim1k has quit [Ping timeout: 255 seconds]
char_var[buffer] has joined #ruby
shinnya has quit [Ping timeout: 258 seconds]
emilford has joined #ruby
centrx has quit [Remote host closed the connection]
centrx has joined #ruby
cdg has quit [Ping timeout: 250 seconds]
char_var[buffer] has quit [Client Quit]
char_var[buffer] has joined #ruby
aroaminggeek has joined #ruby
c0ncealed has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 240 seconds]
c0ncealed has joined #ruby
hutch34 has joined #ruby
kinduff has quit [Remote host closed the connection]
ptx0 has joined #ruby
cschneid_ has quit [Remote host closed the connection]
drowze has joined #ruby
John__ has quit [Read error: Connection reset by peer]
fyrril has joined #ruby
d^sh has joined #ruby
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
shreve has quit [Ping timeout: 248 seconds]
Asher has quit [Quit: Leaving.]
emilford has quit [Quit: WeeChat 1.9.1]
emilford has joined #ruby
emilford has quit [Client Quit]
emilford has joined #ruby
shreve has joined #ruby
d^sh_ has quit [Ping timeout: 248 seconds]
guacamole has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore|2 has joined #ruby
marxarelli is now known as marxarelli|afk
cadillac_ has quit [Quit: I quit]
gizmore has quit [Ping timeout: 248 seconds]
alfiemax has quit [Remote host closed the connection]
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
LenPayne_ has joined #ruby
emilford has quit [Quit: leaving]
emilford has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
emilford has quit [Client Quit]
hutch34 has joined #ruby
guacamole has joined #ruby
sightes has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
govg has joined #ruby
shreve has quit [Ping timeout: 268 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
safetypin has joined #ruby
hahuang65 has joined #ruby
sightes has quit [Quit: WeeChat 1.9.1]
LenPayne_ has quit [Quit: ZNC 1.6.5 - http://znc.in]
LenPayne has quit [Quit: WeeChat 0.4.3]
LenPayne_ has joined #ruby
LenPayne_ has quit [Remote host closed the connection]
LenPayne has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
cschneid_ has joined #ruby
guest9803 has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
mjolnird has quit [Quit: Leaving]
kitsunenokenja has quit [Ping timeout: 255 seconds]
mson has quit [Quit: Connection closed for inactivity]
imode has joined #ruby
Technodrome has joined #ruby
minimalism has quit [Quit: minimalism]
motstgo has joined #ruby
orbyt_ has joined #ruby
dviola has quit [Quit: WeeChat 1.9.1]
safetypin has quit [Quit: ZZZzzz…]
minimalism has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
knight33 has joined #ruby
an_ has joined #ruby
kies has quit [Ping timeout: 248 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
centrx has quit []
moei has joined #ruby
cschneid_ has quit [Remote host closed the connection]
hutch34 has joined #ruby
hahuang65 has joined #ruby
hutch34 has quit [Ping timeout: 250 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
hutch34 has joined #ruby
motstgo has left #ruby ["WeeChat 1.9"]
gix- has joined #ruby
gix has quit [Disconnected by services]
knight33 has quit [Ping timeout: 268 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
mim1k has joined #ruby
JsilverT has quit [Quit: WeeChat 2.0-dev]
drowze has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
AliasSpider has quit [Ping timeout: 268 seconds]
whippythellama has quit [Quit: WeeChat 1.4]
Asher has joined #ruby
drowze has joined #ruby
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iamarun has joined #ruby
mjolnird has joined #ruby
mniip has quit [Ping timeout: 600 seconds]
hutch34 has quit [Ping timeout: 250 seconds]
kryptoz has joined #ruby
mniip has joined #ruby
duderonomy has joined #ruby
hutch34 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mjolnird has quit [Remote host closed the connection]
exchgr has quit [Ping timeout: 264 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
troys_ is now known as troys
hutch34 has joined #ruby
apparition has joined #ruby
apparition has quit [Client Quit]
lagweezle_away is now known as lagweezle
ur5us has quit [Remote host closed the connection]
aroaminggeek has joined #ruby
enterprisey has joined #ruby
hutch34 has quit [Ping timeout: 250 seconds]
hdqn has joined #ruby
hdqn has left #ruby [#ruby]
Scorpion has quit [Quit: Leaving]
hutch34 has joined #ruby
cdg has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
cagmz has quit [Read error: Connection reset by peer]
hutch34 has quit [Ping timeout: 255 seconds]
cdg has quit [Ping timeout: 255 seconds]
mim1k has quit [Ping timeout: 250 seconds]
exhiled has joined #ruby
duderonomy has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
uZiel has joined #ruby
an_ has quit [Remote host closed the connection]
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has quit [Read error: Connection reset by peer]
war_pigs has joined #ruby
war_pigs has quit [Client Quit]
rabajaj has joined #ruby
AliasSpider has joined #ruby
drowze has quit [Ping timeout: 248 seconds]
reber has joined #ruby
alfiemax has joined #ruby
dn` has quit [Remote host closed the connection]
dn` has joined #ruby
Dimik has joined #ruby
hutch34 has joined #ruby
reber has quit [Remote host closed the connection]
reber has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
quobo has joined #ruby
exchgr has joined #ruby
uZiel has quit [Remote host closed the connection]
uZiel has joined #ruby
hahuang65 has joined #ruby
LocaMocha has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
enterprisey has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 248 seconds]
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has quit [Ping timeout: 240 seconds]
anisha has joined #ruby
ruby-lang093 has joined #ruby
hays_ has joined #ruby
<hays_>
looking for a smart/easy way to do true concurrency in ruby
<ruby-lang093>
string interpolation or +
<hays_>
i guess i mean paralelism
hutch34 has joined #ruby
<ruby-lang093>
oops sorry
troys has quit [Quit: Bye]
hutch34 has quit [Ping timeout: 240 seconds]
armando has quit [Ping timeout: 248 seconds]
armando has joined #ruby
alfiemax has quit [Remote host closed the connection]
dionysus69 has joined #ruby
<RickHull>
hays_: you need multiple processes or jruby/rbx/etc runtime
<RickHull>
I think of concurrency as doing different stuff, maybe the same stuff in parallel
<RickHull>
parallel implies splitting a single task into homogenous chunks and doing them concurrently
<RickHull>
time-splitting a single processor can simulate concurrency, but it's not true concurrency
<hays_>
so i've got lets say 20 connections open and i want to basically write asynchronously to all 20 of them
<RickHull>
you can do an event loop
<hays_>
i think concurrency is fine, but i've had some experiences where i think performance might start to be an issue if i don't actually do some stuff in parallel
rabajaj has quit [Remote host closed the connection]
hutch34 has joined #ruby
<RickHull>
I like making tiny simple threads that own a connection too
rabajaj has joined #ruby
<RickHull>
hays_: are you sure you're on a concurrent execution platform? i.e. multiple cpus?
<hays_>
yep
alfiemax has joined #ruby
nowhere_man has quit [Remote host closed the connection]
dinfuehr has quit [Ping timeout: 248 seconds]
<RickHull>
a single MRI process has all its threads on the same cpu
nowhere_man has joined #ruby
cgfbee has quit [Ping timeout: 248 seconds]
<hays_>
yeah so jruby i think is the best option from what ive read
<hays_>
im also looking at celluloid
<RickHull>
but if you're just doing concurrent I/O, then you could just have a threaded listener per CPU
<hays_>
im having trouble figuring out how to structure the code
<hays_>
i think i need listener threads and also sender threads
<hays_>
since robust error handling is important. if someone disconnects, i want the listener to re-establish the connection
cgfbee has joined #ruby
<RickHull>
so you are writing a TCP service?
hutch34 has joined #ruby
andikr has joined #ruby
<hays_>
RickHull: more like real time programming. one can imagine maybe 20-40 independent servers , and a requirement to write values to these 20-40 servers every few seconds, but then interleaved with that other commands as well
<hays_>
and if you lose a connection to these, you re-establish and keep going
hutch34 has quit [Ping timeout: 258 seconds]
<RickHull>
so UDP?
<hays_>
but the connection stays alive
<hays_>
no its all TCP
<RickHull>
ok -- this is the realm of an application server if you want to heavyweight and battle testest
<hays_>
Regs class needs to have @cl in order to handle the exception
conta has joined #ruby
<RickHull>
what's the problem?
hutch34 has joined #ruby
<hays_>
it seems like a weird way to structure the whole thing
michael3 has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
uZiel has joined #ruby
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
b100s has quit [Remote host closed the connection]
<RickHull>
can you put your finger on it?
JsilverT has joined #ruby
hutch34 has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
<AliasSpider>
alfiemax has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 255 seconds]
dn` has quit [Read error: Connection reset by peer]
dn` has joined #ruby
michael3 has quit [Ping timeout: 240 seconds]
mjolnird has joined #ruby
ged has quit [Read error: Connection reset by peer]
syndikate has quit [Ping timeout: 268 seconds]
andikr has quit [Quit: No Ping reply in 180 seconds.]
brucebag_ has joined #ruby
mistym- has quit [Ping timeout: 268 seconds]
shortdudey123 has quit [Ping timeout: 268 seconds]
ged has joined #ruby
konsolebox has quit [Ping timeout: 268 seconds]
waveprop has quit [Ping timeout: 268 seconds]
waveprop has joined #ruby
andikr has joined #ruby
minimalism has quit [Ping timeout: 268 seconds]
kenichi has quit [Ping timeout: 268 seconds]
waveprop is now known as Guest60078
konsolebox has joined #ruby
brucebag has quit [Ping timeout: 268 seconds]
hutch34 has joined #ruby
biberu has joined #ruby
syndikate has joined #ruby
kenichi has joined #ruby
<RickHull>
AliasSpider: hi
mistym has joined #ruby
mistym has quit [Changing host]
mistym has joined #ruby
an has joined #ruby
shortdudey123 has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
lembron has joined #ruby
minimalism has joined #ruby
kenichi has quit [Remote host closed the connection]
<lembron>
hi there, so i dont know anything about ruby specifically -- is it feasable with a bit of hack&slay to hack 'codeclimate' to run its formater on a json stream i provide, instead of its internal data struct? :P
<RickHull>
probably you can show stats on a per PID basis
<scientes>
is there a re2 binding for ruby?
<lembron>
ive got ~5 years of php in me, so as long as its not clojure-like brainfu i shall be good :P --- was more about not taping into a ratnest when trying to extract a gazillion sub-dependencies of it or such
<scientes>
cause ruby use to have a really slow regexp
<RickHull>
scientes: since oniguruma?
<scientes>
no before 1.8.7
<RickHull>
how long ago was that?
<scientes>
*with 1.8.7
<RickHull>
it's fair to assume things have improved since then
guille-moe has joined #ruby
<RickHull>
2005?
<baweaver>
Since 1.8.7? Massive increases
<baweaver>
So what is this program doing exactly?
<scientes>
well, is ruby's regexp O(n)?
hahuang65 has quit [Ping timeout: 258 seconds]
<scientes>
its indexing the apt Contents file, for a command-not-found implemnetation
<scientes>
its a 1.2 MB end database
<scientes>
and much bigger before the reduction
hutch34 has joined #ruby
<baweaver>
So you're opening each of those files using a popen?
<baweaver>
well, reading.
<scientes>
its not a real popen, ruby doesn't open a shell
<scientes>
its only about 10 files
<baweaver>
and what's the match doing there on 13?
<baweaver>
looks like tab delimited something, not sure the line format
<scientes>
yes its reducing the lines to just what i'm interested in
<baweaver>
may be able to get away without using refex there.
<baweaver>
regex
claudiuinberlin has joined #ruby
<baweaver>
Can you shoot us an example of one of the lines you want to match against?
<baweaver>
Making sure I understand what all is going on in it
<apeiros>
scientes: btw., `putc '\n'` almost certainly does not do what you think/want it to
johnny56 has joined #ruby
<scientes>
oh damn your right
Azure has quit [Ping timeout: 248 seconds]
rabajaj has joined #ruby
<RickHull>
my left!
rahul_bajaj has quit [Ping timeout: 255 seconds]
hs366 has quit [Read error: Connection reset by peer]
<Guest60078>
lols
* scientes
takes off the C hat
hutch34 has joined #ruby
<apeiros>
scientes: : Dir.entries("/var/lib/apt/lists").grep_v(/diff_Index$/).grep(/Contents-#{`dpkg --print-architecture`.chomp}/).each do |repo| …
<apeiros>
grep_v is ruby 2.4 iirc
<apeiros>
pre 2.4, reject { |v| v =~ /diff_Index$/ }
<scientes>
lol, my shell code uses grep v exactly like that too
<elomatreb>
2.3 has grep_v as well
<apeiros>
ah, then it's 2.3+
<RickHull>
do they operate like dminuoso style? passing along curried functions?
<dminuoso>
RickHull: Semantically kind of.
<RickHull>
i wonder if there are performance optimizations enabled, or unavailable
hs366 has joined #ruby
<apeiros>
scientes: btw., what's that top level "include Enumerable"?
hutch34 has quit [Ping timeout: 250 seconds]
<dminuoso>
RickHull: In my library .grep(a) will be extensionally equivalent to filter(match(a)) and grep_v(a) will be extensionally equivalent to filter(not * match(a))
<scientes>
apeiros, gone, but wasn't that requires eons ago?
<apeiros>
scientes: no
<apeiros>
Enumerable is for classes which define "each"
kapil___ has joined #ruby
hutch34 has joined #ruby
<Bish>
how do i overload (if that is the correct term)
<Bish>
a method, witht he same parameters as super
<dminuoso>
RickHull: (notice that incredibly handy composition with not, which is just a function Boolean -> Boolean
<dminuoso>
)
<dminuoso>
Bish: you use *args, and you call keyword_super
<dminuoso>
or *args, &blk and super(*args, &blk)
<dminuoso>
If your method wants to take something out, you have to poke into those.
<Bish>
and arity of that method will be the same?
<dminuoso>
Bish: Yes.
<dminuoso>
Well
<Bish>
how does ruby know?
<RickHull>
dminuoso: you win this time, I can't keep up
<dminuoso>
RickHull: not = -> (e) { !e }
<RickHull>
please forgive me until the morn
<dminuoso>
Heh
<apeiros>
Bish: overloading is not possible in ruby. it is when you define multiple methods of the same name, which are selected depending on the type of the arguments. e.g. sum(float, float) & sum(int, int)
<dminuoso>
RickHull: Are you an ozzy?
<RickHull>
hardly, only in spirit
hutch34 has quit [Ping timeout: 240 seconds]
<Bish>
apeiros: yeah i know the term was 100% correct
<apeiros>
Bish, dminuoso: no, arity won't be the same, but if too few/many arguments are passed, an exception will be raised when super is invoked
<dminuoso>
apeiros: Oh I see what you mean. I have some tricks to mimic the same arity though.
<Bish>
okay, cool, so if i want the same arity i need some super cool metaprogramming stuff
<apeiros>
dminuoso: sure, but IMO what for? just call super and let it raise there.
<dminuoso>
Bish: Yes.
<apeiros>
Bish: ^
<Bish>
how would i create a proc with arity of n
<Bish>
eval i guess?
duderonomy has quit [Ping timeout: 250 seconds]
<dminuoso>
Interesting
andikr has joined #ruby
guille-moe has joined #ruby
<apeiros>
?xy Bish
<ruby[bot]>
Bish: 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
ferr has joined #ruby
<Bish>
that textbinding is so useless in this context..
<Bish>
i have a sequel mode, and i want to emit an event when a association is added.
<apeiros>
-.--
<Bish>
that doesnt help at all..
<Bish>
s/mode/model
MrBusiness has joined #ruby
<apeiros>
why. do. you. need. to. emulate. arity?
MrBismuth has joined #ruby
<Bish>
because i dont want people to call the function with different parameters than 1?
hutch34 has joined #ruby
<Bish>
i want good debugging messages if u want to give it more parametersh
<apeiros>
then make a method which takes one argument.
<apeiros>
no eval. no shenanigans.
<Bish>
works in this case.
<Bish>
but the next time i have this problem: nope
duderonomy has joined #ruby
<apeiros>
and why'd that be?
<Bish>
because i want to "overload" a function with arity, but dont want to lose the arity?
<apeiros>
do you always call super?
<Bish>
undefined, yet
ur5us has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 240 seconds]
<apeiros>
IMO this reeks. but well: raise ArgumentError, "wrong number of arguments (#{args.size} for …)" unless args.size.between?(…, …)
mim1k has joined #ruby
<Bish>
yes, i would do that, i guess
<apeiros>
personal opinion: if you don't call super you don't care about arity. if you do call super, let it handle arity.
<apeiros>
but that's where we get back to "why"
<apeiros>
and that collides with "I have a very vague problem because I might do it like this or maybe not"
cschneid_ has joined #ruby
<Bish>
it's not vague at all, i dont want to change the arity when "overloading"
<Bish>
because i like the ruby errormessages it provides when calling with wrong arity
<apeiros>
as said, you get that when you call super
<Bish>
yeah because i have the wrong arity.
<Bish>
oh, it's just an argumenterror, also
<Bish>
so it's not different at all..
<Bish>
i see.
<Bish>
nvm then
cschnei__ has joined #ruby
cschneid_ has quit [Ping timeout: 240 seconds]
hays_ has quit [Ping timeout: 248 seconds]
hutch34 has joined #ruby
ferr has left #ruby ["WeeChat 1.9.1"]
scientes has quit [Ping timeout: 260 seconds]
mim1k has quit [Disconnected by services]
mim1k_ has joined #ruby
cschnei__ has quit [Ping timeout: 255 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
marr has joined #ruby
aiguuu has quit [Ping timeout: 258 seconds]
danielpclark has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
hutch34 has joined #ruby
_main_ has joined #ruby
gradio has quit [Ping timeout: 248 seconds]
__main__ has quit [Ping timeout: 248 seconds]
_main_ is now known as __main__
hutch34 has quit [Ping timeout: 255 seconds]
gradio has joined #ruby
an has quit [Remote host closed the connection]
aiguuu has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
cdg has joined #ruby
hutch34 has joined #ruby
__main__ has joined #ruby
AliasSpider has quit [K-Lined]
cdg has quit [Ping timeout: 258 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has joined #ruby
kies has joined #ruby
hutch34 has joined #ruby
Snowy has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
eroux has joined #ruby
reber has quit [Remote host closed the connection]
Beams has joined #ruby
reber has joined #ruby
ur5us has quit [Remote host closed the connection]
matcouto has quit [Remote host closed the connection]
hutch34 has joined #ruby
mim1k_ is now known as mim1k
hutch34 has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
hutch34 has joined #ruby
hahuang65 has joined #ruby
tcopeland has quit [Quit: tcopeland]
hutch34 has quit [Ping timeout: 264 seconds]
Rouge has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
elphe has quit [Ping timeout: 250 seconds]
hutch34 has joined #ruby
matcouto has joined #ruby
Silthias has quit [Read error: Connection reset by peer]
mim1k has quit [Read error: Connection reset by peer]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lexruee has quit [Quit: ZNC 1.6.5-frankenznc - http://znc.in]
vondruch has quit [Quit: vondruch]
lexruee has joined #ruby
vondruch has joined #ruby
hutch34 has joined #ruby
ski7777 has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
Rouge has quit [Remote host closed the connection]
Rouge has joined #ruby
hutch34 has joined #ruby
<darix>
wow latest 2.5 snapshot tarball is 1.1 MB larger than the previous one
matcouto has joined #ruby
jaruga has joined #ruby
<darix>
spec directory went up by 16M unpacked
hutch34 has quit [Ping timeout: 240 seconds]
matcouto has quit [Ping timeout: 268 seconds]
GodFather has joined #ruby
guille-moe has quit [Ping timeout: 255 seconds]
hightower2 has joined #ruby
elphe has joined #ruby
InfinityFye has joined #ruby
hutch34 has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
hutch34 has quit [Ping timeout: 246 seconds]
conta has quit [Remote host closed the connection]
conta has joined #ruby
apparition has joined #ruby
apparition has quit [Client Quit]
apparition has joined #ruby
hutch34 has joined #ruby
JsilverT has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 250 seconds]
mim1k has joined #ruby
tcopeland has joined #ruby
conta has quit [Read error: Connection reset by peer]
guille-moe has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
conta1 has joined #ruby
vtx has joined #ruby
<vtx>
hi guys, i am trying to stub out a web request with WebMock. something i’m doing isn’t quite right, because my app seems to be hitting the back end service with a valid request. is there a way i can have WebMock print out the syntax of any requests that are happening during test execution, so i can add them to my tests and stub them out properly?
iamarun has quit [Remote host closed the connection]
conta1 is now known as conta
xco has joined #ruby
hutch34 has joined #ruby
zanoni has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
newcoder has joined #ruby
<newcoder>
hey guys
newcoder is now known as Guest70600
hutch34 has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
zanoni has quit [Quit: ChatZilla 0.9.92-rdmsoft [XULRunner 35.0.1/20150122214805]]
<Burgestrand>
vtx you can block all requests that aren't mocked out AFAIK
tvw has joined #ruby
dstolfa has joined #ruby
dstolfa has quit [Client Quit]
ap4y has quit [Quit: WeeChat 1.9.1]
elphe has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
matcouto has joined #ruby
elphe has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
workmad3 has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
matcouto has quit [Ping timeout: 268 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
ahrs has quit [Remote host closed the connection]
hutch34 has joined #ruby
ahrs has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
Psybur has joined #ruby
<xco>
hi, i want to get a hash that looks like this data = { "a" => 1, "b" => 2, "c" => 3, ... }
<Bish>
xco: your a.next and b.next do nothing because you dont assign anything
<Bish>
it's not a reference.. it's just the number
<tobiasvl>
xco: well. your approach is a bit strange. but to try to fix your actual algorithm, try changing `a.next` to `a = a.next` (or a.next!) and `b.next` to `b = b.next`
<tobiasvl>
yeah, what Bish said
<xco>
oh right! now it works!
<xco>
Bish: do you have a better way of doing this?
<xco>
how would you do it?
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<xco>
oh no, sorry
<xco>
tobiasvl: how else would you do this? :D
<Bish>
>> data = {a:"a",b:1};100.times { data.map{|x| x.map(&:next) }.to_h}
<Bish>
lol.
<Bish>
>> data = {a:"a",b:1};100.times { data.map{|x| x.map(&:next) }.to_h}
<Bish>
it fills data, and does data = {a.next,b.next} 100 times
<xco>
looking
<Bish>
"z".next being "aa" btw.
<xco>
right
<xco>
got it :) thank you
<Bish>
you're welcome
tcopeland has quit [Quit: tcopeland]
<Bish>
actually interesting problem, no clue how i would do it beautiful
elphe has quit [Ping timeout: 255 seconds]
<Bish>
is there some way to call a method 100 times to an object, and have each one input to the next
hutch34 has joined #ruby
<Bish>
so i have a short way to write
<Bish>
a.next.next.next
hahuang65 has joined #ruby
dinoangelov has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
<Bish>
doMultipleTimes = ->(what,times,&b){times.times{ what = b.call(what) }}
<Bish>
something like that?
duckpuppy has joined #ruby
cschneid_ has joined #ruby
hahuang65 has quit [Ping timeout: 255 seconds]
<apeiros>
>> ("a".."z").zip(1..26).to_h # @ xco
<ruby[bot]>
apeiros: # => {"a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5, "f"=>6, "g"=>7, "h"=>8, "i"=>9, "j"=>10, "k"=>11, "l"=>12, ...check link for more (https://eval.in/900613)
<xco>
apeiros: :o
elphe has joined #ruby
cschneid_ has quit [Ping timeout: 240 seconds]
<xco>
this is nice but i don’t like it because i’d have to know the “index” of the last letter
hutch34 has joined #ruby
<xco>
so i have to know the limit which is “z” and it’s corresponding number “26”
raynold has quit [Quit: Connection closed for inactivity]
<apeiros>
>> ("a".."z").zip(1..9999).to_h # @ xco
<ruby[bot]>
apeiros: # => {"a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5, "f"=>6, "g"=>7, "h"=>8, "i"=>9, "j"=>10, "k"=>11, "l"=>12, ...check link for more (https://eval.in/900615)
<apeiros>
though honestly, if you don't know how many letters exist in the alphabet, you have other problems :-p
InfinityFye has quit [Quit: Leaving]
<xco>
hahahahha that’s not the point
<xco>
the point is to generate keys and values as many as N
<xco>
where N is number of element in hash that i want
matcouto has joined #ruby
<xco>
so the letters “a” and numbers mean nothing :P
<apeiros>
well…
<xco>
and with the number of letters in my alphabet we have 24 :P
<xco>
not 26
<apeiros>
if you *know* that you want N keys
<apeiros>
then you KNOW it's 1..N :-p
<Bish>
>> (1..100).to_a.map {|x| [x,x]}.to_h
<ruby[bot]>
Bish: # => {1=>1, 2=>2, 3=>3, 4=>4, 5=>5, 6=>6, 7=>7, 8=>8, 9=>9, 10=>10, 11=>11, 12=>12, 13=>13, 14=>14, 15=>1 ...check link for more (https://eval.in/900617)
<xco>
apeiros: and values?
<Bish>
well, what he says is, if the keys do not matter, you want an array
<Bish>
sorta, kinda.
<apeiros>
xco: well, since you said "a" and "z" mean nothing, you'll have to tell more about the logic for the vlaues
<xco>
values should be increments of 1 starting from 1
<apeiros>
though actually I think you meant "and keys?", since you use the numbers as the values.
<apeiros>
yeah, 1..N
<xco>
apeiros: values and keys yes
hutch34 has quit [Ping timeout: 240 seconds]
cout has joined #ruby
jrafanie has joined #ruby
yahmds has joined #ruby
tcopeland has joined #ruby
<apeiros>
I'll repeat then > xco: well, since you said "a" and "z" mean nothing, you'll have to tell more about the logic for the keys
<apeiros>
you only repeated the logic for the values, and that one I gave you already with 1..N
bob_f_ is now known as bob_f
matcouto has quit [Ping timeout: 255 seconds]
bob_f has quit [Changing host]
bob_f has joined #ruby
<xco>
the keys are can be anything random, provided they are unique to hold values upt to N
jrafanie has quit [Client Quit]
<apeiros>
uh, ok? then…
<xco>
makes sense now?
<bob_f>
Hi. Is it possible to define metaclass methods via an included module ?
<apeiros>
>> n = 99; (1..n).zip(1..n).to_h # there
<ruby[bot]>
apeiros: # => {1=>1, 2=>2, 3=>3, 4=>4, 5=>5, 6=>6, 7=>7, 8=>8, 9=>9, 10=>10, 11=>11, 12=>12, 13=>13, 14=>14, 15=>1 ...check link for more (https://eval.in/900618)
<apeiros>
the keys are unique
<apeiros>
call me crazy but I think your explanation leaves out something important. otherwise I fail to see the point :D
<apeiros>
bob_f: yes, though you should use extend.
<xco>
excellent try :D @ apeiros
<bob_f>
apeiros: I can use extend as well, but I can't make that work either.
<apeiros>
>> module X; def wee; "wee!"; end; class A; class << self; include X; end; end; A.wee
<ruby[bot]>
apeiros: # => /tmp/execpad-db09813a2fbe/source-db09813a2fbe:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/900619)
danielpclark has quit [Ping timeout: 240 seconds]
<apeiros>
>> module X; def wee; "wee!"; end; end; class A; class << self; include X; end; end; A.wee
<bob_f>
apeiros: A method defined on the class constructor.
<Bish>
oh thats all.
<Bish>
dont get when this is useful
<bob_f>
apeiros: I think I'm just forgetting that classes are built sooner in Ruby than in Python, so a regular class method can exist before the `end` of the class.
hutch34 has quit [Ping timeout: 264 seconds]
<apeiros>
Bish: most common case I use it is when I translate tables, e.g. first_names, last_names, ages = people.transpose; ages.map!(&:to_i); mapped_people = [first_names, last_names, ages].transpose
<apeiros>
bob_f: ok, that makes sense.
<apeiros>
bob_f: a class method in ruby is just an instance method of the singleton_class
<bob_f>
apeiros: Yup, got it.
<bob_f>
Thanks for clarifying - having a fuzzy day today ..
<apeiros>
and some people call the singleton_class meta class. so I'd assume "metaclass method" to mean the same as class method
<bob_f>
apeiros: Yeah, it's really just down to my incorrect assumptions about Ruby's object model.
<apeiros>
bob_f: also note that in the module you always have to define the methods as instance methods. include vs. extend determines where those methods end up.
<jokke>
hi, anyone here using "rr"? I'm having trouble with doubles bleeding into other tests...
<dminuoso>
bob_f: The general term is "singleton class". "Metaclass" is internally used to denote singleton classes of class objects themselves.
aScottishBoat has joined #ruby
my123 has joined #ruby
my123 has quit [Changing host]
my123 has joined #ruby
<bob_f>
dminuoso: Understood. I've heard the term "singleton class" used for this before, it just always seemed a bit odd, but I'll go with the flow.
<dminuoso>
bob_f: What I just said correlates in no way with any convention outside the Ruby source code itself.
Guest70600 has quit [Quit: Page closed]
elphe has quit [Ping timeout: 240 seconds]
Snowy has quit [Remote host closed the connection]
guille-moe has quit [Ping timeout: 240 seconds]
<dminuoso>
bob_f: My rule of thumb is always: Ruby has no "class methods" or "instance methods". It only has methods, and methods are always on a class or a module.
hutch34 has joined #ruby
Snowy has joined #ruby
Snowy has quit [Remote host closed the connection]
* Bish
tries to get a 3 dimensional array and fails
<Bish>
in my younger days i did this in c with ease!
<dminuoso>
The quirk comes from the fact that modules and classes themselves are ruby objects too. As such if you invoke a method on them, ruby looks in *its* class + ancestory.
elphe has joined #ruby
<apeiros>
bob_f: re naming - I preferred eigenclass. but since ruby 1.9, there's a method to access it and it's called singleton_class, hence I'd say that's the canonical name in ruby for it.
hutch34 has quit [Ping timeout: 255 seconds]
nachoman has quit []
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 255 seconds]
<dminuoso>
apeiros: Interestingly with all the type theory Im learning, singleton_class fits amazingly well.
<apeiros>
my main issue with the term is how easy it's to confuse with singleton pattern
<apeiros>
and while the two are related, they aren't the same
<dminuoso>
A good intuition is to consider a type a set of possible values. Classes represent that notion -> they form a set of all possible objects constructed from it. And singleton classes have only a single object, thus forming a set with just one element.
<dminuoso>
Those are called singleton sets in set theory
<apeiros>
oh, didn't know. you happen to know the german term for singleton sets?
synthroid has joined #ruby
hutch34 has joined #ruby
raynold has joined #ruby
xco has quit [Ping timeout: 240 seconds]
vondruch_ has joined #ruby
matcouto has joined #ruby
<elomatreb>
According to Wikipedia "Einelementige Menge"
<dminuoso>
apeiros: Singleton or Einermenge
<dminuoso>
But Im not well versed in German terminology.
vondruch has quit [Ping timeout: 255 seconds]
vondruch_ is now known as vondruch
<apeiros>
elomatreb: heh, I'm there right now too :)
<elomatreb>
My problem with the Eigenclass term is that it's very inaccessible to someone who doesn't know German
<apeiros>
I wondered whether they might be called eigenset. but seems not.
<leah2>
it doesnt make sense to germans either :P
hutch34 has quit [Ping timeout: 258 seconds]
alfiemax_ has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
<dminuoso>
leah2: Just as much as eigenvalues or eigenvectors :P
<leah2>
those make slightly more sense, but not much ;)
<apeiros>
elomatreb: eh, most technical terms aren't very accessible no matter what. you have to learn what it means anyway.
<apeiros>
I didn't learn the meaning of singleton outside of programming either.
<dminuoso>
apeiros: Tell me about it. Im advancing beyond beginner levels of category theory - and the terminology becomes quite strange now.
<dminuoso>
It's constantly just "accept that its named like this. just do it."
matcouto has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
<elomatreb>
Sure, but "metaclass" uses just very common terminology and doesn't require you to learn (parts of) a speaker-hostile language
<leah2>
hm, most category theory terms are kinda useful imo :)
<elomatreb>
And "singleton" is very clear in it's meaning IMO? "There is only a single one of this"
<leah2>
at least in german
banisterfiend has quit [Changing host]
banisterfiend has joined #ruby
alfiemax has quit [Remote host closed the connection]
<dminuoso>
leah2: ηx for example is pronounced "the component of η at x"
<leah2>
fibre, sheaf, quiver
<dminuoso>
leah2: what about ring?
<dminuoso>
;-)
<leah2>
those have kinda geometric ideas
<dminuoso>
No it does not.
<dminuoso>
Rings dont.
<leah2>
dminuoso: at least for Z_n ring makes lot of sense? ;)
<dminuoso>
leah2: but not ethymologically. let me dig it up again
<dminuoso>
based on this (and Ive done some research based on this, it appears to be correct) its mostly just speculation.
<dminuoso>
I mean if you poke further into algebraic structures, it becomes a real mess
dinoangelov has quit [Quit: (null)]
<dminuoso>
like
<dminuoso>
Rng (its obvious what they did there, but its completely silly)
Hexafox[I] has quit [Ping timeout: 255 seconds]
<leah2>
yes
<leah2>
i like that :D
<dminuoso>
What's an rng called in German?
<leah2>
and Rig ;)
hutch34 has joined #ruby
<leah2>
some use Ring and Ring mit Eins
<dminuoso>
Literally or Ring1 ?
<leah2>
literally
<leah2>
i've seen R1ng too
<dminuoso>
Hah
<leah2>
it depends on the field (hehe) i guess
<dminuoso>
Yeah as it does in math.
<leah2>
some people always assume unitary rings
<dminuoso>
leah2: Ive been battling with the 3 different notations for natural transformations.
<leah2>
or two notations for composition? :D
<dminuoso>
For the past 2 days.
<dminuoso>
Well yeah because horizontal and vertical composition
<dminuoso>
Its an inconsistent mess.
shreve has joined #ruby
<dminuoso>
I can live with it, if special notation is defined somewhere. But a lot of papers just make up their own notation, and expect the reader to deduce the meaning from the context.
yusuf34 has quit [Ping timeout: 260 seconds]
<dminuoso>
leah2: Did or do you study anything math related?
<leah2>
i have a bsc
<dminuoso>
Which field?
<leah2>
general math
<leah2>
cs minor
<leah2>
then msc in cs
<dminuoso>
What is "general math" ?
<leah2>
we dont have specialization
<leah2>
my thesis was about constructive analysis
<dminuoso>
Ah okay. So you just took a variety of courses?
<leah2>
yeah
hutch34 has quit [Ping timeout: 264 seconds]
<leah2>
did mostly things without applications :D
<dminuoso>
leah2: This is why Im studying category theory right now, it has broad implications in (functional) programming. :)
<leah2>
yeah
<leah2>
we had awodney as a guest lecturer during my time, but i didnt follow the course closely
<dminuoso>
Though some bits and juicy pieces came from it. The intuition that a ring is just a monoid in the category of commutative groups is amazing.
<dminuoso>
That is about the cleanest definition of a ring (since the topic was raised) Ive ever seen.
<leah2>
:)
kryptoz has quit [Remote host closed the connection]
<dminuoso>
Once Im through with monads from the categorical perspective, I think I should study f-algebras
hutch34 has joined #ruby
InfinityFye has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mon_Ouie has joined #ruby
andikr has quit [Remote host closed the connection]
kobain has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
bmurt has joined #ruby
minimalism has quit [Quit: minimalism]
GodFather has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
cdg has joined #ruby
jameser has joined #ruby
alfiemax has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has quit [Ping timeout: 250 seconds]
cdg has quit [Ping timeout: 250 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shreve has quit [Quit: Lost terminal]
workmad3 has joined #ruby
matcouto has joined #ruby
yahmds has quit [Quit: yahmds]
eroux has quit [Quit: ZZZzzz… ZZZzzz…]
banisterfiend has joined #ruby
GodFather has joined #ruby
matcouto has quit [Ping timeout: 258 seconds]
kryptoz has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Changing host]
banisterfiend has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
Silthias1 has quit [Read error: Connection reset by peer]
Silthias has joined #ruby
cdg has joined #ruby
danielpclark has quit [Remote host closed the connection]
tcopeland has joined #ruby
vee__ has quit [Ping timeout: 255 seconds]
mtkd has joined #ruby
jrafanie has joined #ruby
yahmds has joined #ruby
stamina has quit [Quit: WeeChat 1.9.1]
Silthias1 has joined #ruby
Silthias1 has quit [Read error: Connection reset by peer]
Silthias has quit [Ping timeout: 248 seconds]
yahmds has quit [Client Quit]
mson has joined #ruby
qqmash has joined #ruby
cdg has quit [Remote host closed the connection]
alfiemax has joined #ruby
uZiel has joined #ruby
alfiemax has quit [Remote host closed the connection]
vee__ has joined #ruby
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Ping timeout: 255 seconds]
vtx has quit [Read error: Connection reset by peer]
d10n-work has joined #ruby
vtx has joined #ruby
vtx has quit [Client Quit]
elphe has quit [Ping timeout: 255 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DLSteve_ has joined #ruby
vondruch has quit [Quit: vondruch]
matcouto has joined #ruby
vondruch has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
bmurt has joined #ruby
matcouto has quit [Ping timeout: 240 seconds]
gnoss has joined #ruby
tcopeland has quit [Quit: tcopeland]
workmad3 has joined #ruby
oleo has joined #ruby
wald0 has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
tcopeland has joined #ruby
apparition has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
apeiros has quit [Remote host closed the connection]
hutch34 has joined #ruby
safetypin has joined #ruby
tcopeland has quit [Quit: tcopeland]
conta1 has joined #ruby
conta has quit [Ping timeout: 248 seconds]
conta1 is now known as conta
dionysus69 has quit [Quit: dionysus69]
sylario has joined #ruby
hutch34 has quit [Ping timeout: 264 seconds]
polishdub has joined #ruby
pwnd_nsfw has joined #ruby
qqmash has quit [Quit: Leaving.]
mim1k has quit [Quit: Reconnecting]
mim1k has joined #ruby
Rapture has joined #ruby
matcouto has joined #ruby
cdg has joined #ruby
jameser has joined #ruby
apeiros has joined #ruby
alfiemax has joined #ruby
matcouto has quit [Ping timeout: 248 seconds]
guille-moe has joined #ruby
aScottishBoat has quit [Ping timeout: 255 seconds]
tacoboy has joined #ruby
jameser has quit [Client Quit]
iamarun has joined #ruby
mim1k has quit [Quit: Reconnecting]
mim1k has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Quit: Closing time!]
chouhoulis has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrafanie has joined #ruby
kryptoz has quit [Remote host closed the connection]
cdg has quit [Remote host closed the connection]
truenito has joined #ruby
truenito has quit [Remote host closed the connection]
gnoss has quit [Quit: Leaving]
Torrone has joined #ruby
tsglove2 has quit [Quit: Leaving]
<Torrone>
Hello, I'm running a rails application on an old version of ruby (1.9.3). I'm doing some stress tests on a server instance and I've noticed that after the test has finished, the % of used memory of ruby processes does not go down. How can I address this issue? Is this due to the ruby version being old or should I check some other factors? Thank you
<jordanm>
Torrone: that's just how MRI works, most (any?) memory is not returned to the OS even after GC
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has quit [Remote host closed the connection]
GodFather has quit [Ping timeout: 240 seconds]
<jordanm>
Torrone: you will find that's the case with most interpreted languages
banisterfiend has joined #ruby
<Torrone>
jordanm, I see, I'm trying to find out if I can do anything about the performance issues the application is suffering from, requests take longer and longer to process as their number increases
apeiros has joined #ruby
<jordanm>
Torrone: there are many reasons for that
<jordanm>
Torrone: more concurrent requests == less available resources, more strain on shared data sources
<jordanm>
Torrone: also depending on what you are using for your rack server, your application is only going to be able to handle a certain number of requests before requests get queued
<jordanm>
Torrone: so it won't even start processing the requests until it has finished current requests and freed a worker and/or thread
<Torrone>
jordanm, I know, I'm using Puma + nginx
<jordanm>
performance tuning can be a long and complex process, but throwing more servers at it always an option
<jordanm>
Torrone: yeah, so you can only handle num_workers * num_threads requests concurrently
<jordanm>
before puma will queue requests
alfiemax has joined #ruby
cdg has joined #ruby
alfiemax has quit [Client Quit]
alfiemax has joined #ruby
Dutjub has joined #ruby
apeiros has quit [Remote host closed the connection]
<jolamb>
I have a sacreligious question: Is there a setting or an add-on cop for Rubocop to flag "unless" and convert it to "if !"?
rabajaj has quit [Quit: Leaving]
cdg has quit [Ping timeout: 258 seconds]
Dutjub has quit [Client Quit]
<Torrone>
jordan, seems like the app is taking way too much CPU, it goes to 100% on a AWS c4.large very quickly
<Torrone>
wondering wether or not it's worth upgrading to a newer ruby/rails version to see the difference
vondruch has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
Dutjub has joined #ruby
rafadc has joined #ruby
rabajaj has joined #ruby
apeiros has joined #ruby
rippa has joined #ruby
polishdub has left #ruby [#ruby]
apeiros has quit [Remote host closed the connection]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fusta has joined #ruby
Dutjub has quit [Remote host closed the connection]
jrafanie has joined #ruby
cschneid_ has joined #ruby
GodFather has joined #ruby
cdg has joined #ruby
troys has joined #ruby
isene has joined #ruby
stoopidmunkey has joined #ruby
<isene>
I need to flatten a hash with arrays and write the result to a file. Basically I want to write to the file exactly what I get when I do "puts" of this array: [["0C6000", [nil, "test", nil, "isene"]], ["0C8000", [nil, nil, nil, "isene"]], ["0C8001", [nil, nil, nil, "isene"]]]
<isene>
Can I somehow do a puts on that array and capture that output and write to a file?
conta has quit [Ping timeout: 248 seconds]
hightower2 has quit [Ping timeout: 248 seconds]
hahuang65 has joined #ruby
cschnei__ has joined #ruby
cschneid_ has quit [Read error: Connection reset by peer]
John__ has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
kobain has quit [Ping timeout: 252 seconds]
rabajaj has quit [Quit: Leaving]
jrgriffiniii has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschnei__ has quit []
dinfuehr has quit [Ping timeout: 255 seconds]
aufi has quit [Quit: Leaving]
guille-moe has quit [Ping timeout: 240 seconds]
rafadc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ShalokShalom has joined #ruby
Illianthe2 has quit [Ping timeout: 248 seconds]
dinfuehr has joined #ruby
jackjackdripper has joined #ruby
jrafanie has joined #ruby
thinkpad has quit [Ping timeout: 260 seconds]
guille-moe has joined #ruby
cagomez has joined #ruby
apeiros has joined #ruby
Rouge has quit [Ping timeout: 240 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
stoopidmunkey has quit [Ping timeout: 248 seconds]
<jolamb>
BlaDe^: b is nil because @reader.read(1) is returning nil, you're catching the exception but you're not returning a valid value from inside the rescue block, so the method is returning nil
<apeiros>
where v is the result of an Integer#fdiv(BigDecimal) (any fdiv with those two operands returns the same value)
_main_ is now known as __main__
Devalo has joined #ruby
<RickHull>
looks pretty small to me xD
<al2o3-cr>
>> [
<ruby[bot]>
al2o3-cr: # => /tmp/execpad-e7e632c2de27/source-e7e632c2de27:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/900887)
<al2o3-cr>
G double precision
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has quit [Ping timeout: 255 seconds]
orbyt_ has joined #ruby
guacamole has joined #ruby
vee__ has joined #ruby
kobain has joined #ruby
Devalo has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hexafox[I] has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]