lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
simoz has joined #ruby-lang
mdedetrich has joined #ruby-lang
sascha_d has joined #ruby-lang
simoz has quit [Ping timeout: 264 seconds]
iliketurtles has joined #ruby-lang
simoz has joined #ruby-lang
bzalasky has joined #ruby-lang
richardburton has joined #ruby-lang
simoz has quit [Ping timeout: 246 seconds]
vxxr has quit [Quit: leaving]
RickHull1 has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
dik_dak has joined #ruby-lang
bungoman has quit [Remote host closed the connection]
__GG has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
nathanstitt has quit [Quit: I growing sleepy]
iliketurtles has quit [Ping timeout: 264 seconds]
saarinen has quit [Quit: saarinen]
bzalasky has joined #ruby-lang
iliketurtles has joined #ruby-lang
iliketurtles has quit [Max SendQ exceeded]
iliketurtles has joined #ruby-lang
_jpb_ has quit [Quit: Lost terminal]
tharindu has joined #ruby-lang
iliketurtles has quit [Client Quit]
dhruvasagar has quit [Ping timeout: 264 seconds]
dik_dak has quit [Quit: Leaving]
iliketurtles has joined #ruby-lang
iliketurtles has quit [Client Quit]
__GG has quit [Quit: Leaving.]
ledestin has joined #ruby-lang
__GG has joined #ruby-lang
jsullivandigs has joined #ruby-lang
iliketurtles has joined #ruby-lang
rue has quit [Read error: Connection reset by peer]
rue|w has quit [Read error: Connection reset by peer]
rue has joined #ruby-lang
rue|w has joined #ruby-lang
cyndis has quit [Remote host closed the connection]
norplr_ has quit [Ping timeout: 260 seconds]
franckverrot has quit [Ping timeout: 260 seconds]
cyndis has joined #ruby-lang
Paradox has joined #ruby-lang
iliketurtles has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby-lang
symm- has quit [Ping timeout: 256 seconds]
tris has quit [Excess Flood]
tris has joined #ruby-lang
bungoman has joined #ruby-lang
<RickHull1>
i've got a bit of a puzzle, though I feel like it has an "obvious" answer. bear with me while i set it up. the model should be fairly simple, and I'll seed it with some plausible values to make it concrete. the "optimal" answer should not depend on the seed values, but it's ok if it performs suboptimally for implausible values.
<RickHull1>
main thread is pulling records from a REST API. 0.5 - 1.5 seconds per request. the request may have 0-100 records. insert thread shares a queue with the main thread, and his only job is to pull from the queue and insert to database
<RickHull1>
naive inserts have slow insertion rate. batch inserts can be up to 10x faster
<RickHull1>
this is a real problem, btw. not much of a problem, just thinking how to optimize it
symm- has joined #ruby-lang
<RickHull1>
right now, i set a static batch size
stardiviner has joined #ruby-lang
<RickHull1>
so the insert guy is idle at the start until the first batch fills up
<RickHull1>
now i'm thinking the batch size should be a function of the queue size somehow
<RickHull1>
insert guy blocks on an empty queue btw
<RickHull1>
either that, or just ramp up to the static batch size?
gja has joined #ruby-lang
gja has quit [Changing host]
gja has joined #ruby-lang
<RickHull1>
for my particular impl, i think the sqlite lib blocks the main thread on a slow insert
<RickHull1>
but with batch inserts, i think it's negligible
<RickHull1>
given the potential for inserts to block, it's probably best to leave the insert thread idle, and minimize the number of batches
<RickHull1>
of course, just toss out the threaded design in that case anyhow ;)
<RickHull1>
i'm not convinced that the way i do it blocks now, and even if so, the chance of using a different way that doesn't block is nonzero
<erikh>
fill a queue, wake the thread after x fills
<erikh>
open a transaction, empty the queue
<erikh>
commit
<erikh>
GREAT SUCCESS
<RickHull1>
ok, yeah, roughly analagous to what i'm doing today
<RickHull1>
how can i block the thread on x fills?
<RickHull1>
right now i'm blocking on deque, and then deq'ing until batch_size
<RickHull1>
"wake the thread" makes sense, but i'm more comfortable with pure blocking
<RickHull1>
which doesn't mean much of anything, just have to wrap my head around it
<RickHull1>
s/blocking on deq/blocking on deq'ing an empty queue/
<RickHull1>
i think it really is effectively analagous / isomorphic
<RickHull1>
i still think that if there is no stopping-the-world-on-insert, there is an optimization opportunity to not be idle on first batch
<RickHull1>
grand scheme of things, tiny and probably silly
<RickHull1>
but hey, it's a puzzle
dik_dak has joined #ruby-lang
mistym has joined #ruby-lang
<RickHull1>
side story: i was asking about charts in here earlier. i started down this puzzle line of thinking because i this setup i'm describing is a proof of concept I built, and it's abundantly obvious at this point that we need to stop developing the PoC. PoC success, let's build something we actually want to maintain. So of course my mind somehow wanders to optimizing something totally silly.
<RickHull1>
could make a good interview question though: estimate the optimization opportunity, and estimate how much code complexity you would put up with to achieve it ;)
<RickHull1>
s/estimate/evaluate/
<RickHull1>
in the grand scheme of things, i think a static batch size is best for most plausible scenarios
<RickHull1>
anyone here with graphite experience?
<erikh>
oh
<RickHull1>
i'm 99% sure we want to dump to graphite and offload most charting stuff to graphite
<RickHull1>
i don't know how capable it is of analytic slicing and dicing
gja has quit [Quit: This computer has gone to sleep]
relix has joined #ruby-lang
woollyams has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bungoman has quit [Remote host closed the connection]
gja has joined #ruby-lang
gja has quit [Changing host]
gja has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
apeiros has quit [Read error: Connection reset by peer]
charliesome has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruby-lang887 has joined #ruby-lang
GeissT has quit [Ping timeout: 260 seconds]
ruby-lang887 has quit [Client Quit]
apeiros_ has quit [Remote host closed the connection]
softrli has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
lfox has quit [Quit: ZZZzzz…]
bzalasky has joined #ruby-lang
lun_ has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
dostoyevsky has left #ruby-lang [#ruby-lang]
jsullivandigs has quit [Read error: Connection reset by peer]
franckverrot has joined #ruby-lang
jsullivandigs has joined #ruby-lang
RickHull1 has quit [Quit: Leaving.]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
iliketurtles has joined #ruby-lang
iliketurtles has quit [Client Quit]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sr78ger has joined #ruby-lang
sr78ger has quit [Max SendQ exceeded]
sr78ger has joined #ruby-lang
sr78ger has quit [Max SendQ exceeded]
vlad_starkov has joined #ruby-lang
sr78ger has joined #ruby-lang
sr78ger has quit [Max SendQ exceeded]
sr78ger has joined #ruby-lang
sr78ger has quit [Max SendQ exceeded]
sr78ger has joined #ruby-lang
lun_ has quit [Remote host closed the connection]
sr78ger has quit [Max SendQ exceeded]
lun_ has joined #ruby-lang
sr78ger has joined #ruby-lang
sr78ger has quit [Max SendQ exceeded]
Coincidental has joined #ruby-lang
sr78ger has joined #ruby-lang
lun_ has quit [Ping timeout: 260 seconds]
dagobah has joined #ruby-lang
Senjai has quit [Ping timeout: 264 seconds]
kith has quit [Quit: kith]
kith has joined #ruby-lang
iliketurtles has joined #ruby-lang
toretore has joined #ruby-lang
iliketurtles has quit [Client Quit]
Coincidental has quit [Remote host closed the connection]
gja has quit [Quit: This computer has gone to sleep]
bzalasky has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
mistym has quit [Remote host closed the connection]
arBmind has quit [Quit: Leaving.]
arBmind has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
arBmind has quit [Client Quit]
guns has joined #ruby-lang
RickHull1 has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
hhatch has joined #ruby-lang
jerrytgarcia has quit [Quit: WeeChat 0.4.1]
schaerli has joined #ruby-lang
shireesh has quit [Ping timeout: 260 seconds]
runeb has joined #ruby-lang
Coincidental has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
hashkey_ has joined #ruby-lang
hashkey_ has quit [Changing host]
hashkey_ has joined #ruby-lang
Johz has joined #ruby-lang
richardburton has quit [Quit: Leaving.]
hashkey has quit [Killed (wolfe.freenode.net (Nickname regained by services))]
hashkey_ is now known as hashkey
apeiros has joined #ruby-lang
superdealloc has quit [Quit: Leaving...]
<maloik>
baruco day \o/
dc5ala has joined #ruby-lang
hashkey has quit [Ping timeout: 256 seconds]
Johz has quit [Read error: Connection reset by peer]
hashkey_ has joined #ruby-lang
hashkey_ is now known as hashkey
hashkey has quit [Changing host]
hashkey has joined #ruby-lang
Johz has joined #ruby-lang
julweber has joined #ruby-lang
skmp has quit [Read error: Connection reset by peer]
relix has joined #ruby-lang
rue|w has joined #ruby-lang
guns has quit [Quit: guns]
elia has joined #ruby-lang
Johz has quit [Read error: Connection reset by peer]
Johz has joined #ruby-lang
hhatch has quit [Ping timeout: 240 seconds]
julweber has quit [Remote host closed the connection]
runeb has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
arBmind has quit [Client Quit]
arBmind has joined #ruby-lang
adambeynon has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
runeb has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
jsullivandigs has quit [Ping timeout: 256 seconds]
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wh1t3l10n has joined #ruby-lang
<wh1t3l10n>
I'm learning about Array object loop and Hash object loop but the hash object loop doesn't work, please check here: http://pastebin.com/EucvP59g correct me please, tell me what I'm doing wrong.
<ledestin>
wh1t3l10n: there's no hash there
zmike has joined #ruby-lang
<wh1t3l10n>
ledestin: Hash Array means the Array contains objects, am I right?
<maloik>
take alook at that, tried to add some explanations
hhatch has joined #ruby-lang
<wh1t3l10n>
ledestin: Thank you. I'll google that :)
<ledestin>
wh1t3l10n: you're welcome
<wh1t3l10n>
maloik: Thank you so much!
workmad3 has joined #ruby-lang
<maloik>
one way of explaining array vs hash would be that an array is just a pile of objects, and you need to find the object you need by either going through all of them or if you know the number of the object
<maloik>
whereas a hash is a well ordered collection, where each object is properly labeled (the key), so that you can tell the hash you're looking for the object with key x
<wh1t3l10n>
maloik: nicely explained :)
<maloik>
I'm sad that I couldn't make a car analogy :( cars are usually perfect for that
<ledestin>
hash isn't ordered though
<ledestin>
by keys or otherwise
<maloik>
by ordered I meant organized
<maloik>
but you're right, ordered is definately not the right word
lun_ has joined #ruby-lang
<wh1t3l10n>
ledestin: maloik: once I finish learning Ruby, the Rails farmework would be enough to create a membership website?
<ledestin>
wh1t3l10n: I believe, yes
<wh1t3l10n>
ledestin: do you know about themeforest.com? It's made of Ruby Rails. I'm going to achieve the same membership features but the subject will be different :)
<gnufied>
wat
<maloik>
I doubt any modern framework won't be able to achieve that, but yes rails will do the trick
<yorickpeterse>
herro
<wh1t3l10n>
maloik: Yes, I hope. And they are using WordPress inside Rails framework, how is it possible?
<maloik>
theyre not :P
<maloik>
perhaps they have a separate app/site for the blog (wordpress) and the rest (rails), sure...
havenwood has quit [Remote host closed the connection]
<gnufied>
how do you know that maloik?
adambeynon has joined #ruby-lang
<wh1t3l10n>
maloik: go to http://builtwith.com/ and you can see what is it made of :)
<gnufied>
for all we know they can be running wordpress inside rails
<wh1t3l10n>
gnufied: that's true, I guess :)
<maloik>
how would you even do that ?
<gnufied>
I am joking
<maloik>
:P
<wh1t3l10n>
Guys guys :P
<wh1t3l10n>
:d
<wh1t3l10n>
Thanks for the help, see you later :)
<maloik>
yw
wh1t3l10n has left #ruby-lang [#ruby-lang]
wallerdev has quit [Quit: wallerdev]
sepp2k has joined #ruby-lang
wallerdev has joined #ruby-lang
__GG has quit [Quit: Leaving.]
<erikh>
phuby
wallerdev has quit [Quit: wallerdev]
stamina has joined #ruby-lang
wallerdev has joined #ruby-lang
faces has joined #ruby-lang
face has quit [Ping timeout: 268 seconds]
havenwood has joined #ruby-lang
<yorickpeterse>
HAHA, I can segfault Vim by opening the default config/deploy.rb of Capistrano
relix has joined #ruby-lang
<erikh>
you have a bad build of vim
softrli has quit [Remote host closed the connection]
<gnufied>
I doubt that
<darix>
yorickpeterse: one of your vim plugins is crashing vim
<darix>
move your ~/.vim* stuff away and see if it still crashes
<whitequark>
why are vim plugins even able to segfault it? sounds like bad design
<darix>
whitequark: because it links such stable things like libperl, libruby, libpython
<whitequark>
darix: ah, that explains
<darix>
without a stacktrace we cant say where it crashes
<erikh>
eh, that was why I was commenting bad build
<erikh>
he's probably hitting the ruby internal crap
<erikh>
from libruby
<erikh>
and it's doing something dumb.
<whitequark>
can you even use libruby and libperl in a single app?
<erikh>
yes
<whitequark>
they're both override sigsegv and shit
<gnufied>
xchat
<darix>
weechat too if i recall correctly
<erikh>
weechat too
<darix>
^5
<erikh>
^5
<whitequark>
I... I don't think I want to know how it's done
<erikh>
darix: did you take over my proxy
<darix>
erikh: no comment
<erikh>
weechat's clever about it
<erikh>
*really* clever.
<whitequark>
sounds horrible.
<erikh>
converts all C pointer addresses to strings
<erikh>
then gives that to the plugins to work with as opaque handles
<gnufied>
nice
<erikh>
and i think dominikh wrote the libruby stuff initially
<erikh>
or just ported it to 1.9
<gnufied>
I once wrote octave-gtk bindings
<erikh>
he might be able to answer the signals question
<gnufied>
was converting pointers to long ints
wallerdev has quit [Quit: wallerdev]
lun_ has quit [Remote host closed the connection]
<erikh>
nice
lun_ has joined #ruby-lang
mbj has joined #ruby-lang
lun_ has quit [Ping timeout: 260 seconds]
jiuweigui has joined #ruby-lang
sascha_d has quit [Quit: obai]
<matti>
;]
<yorickpeterse>
darix: would be nice if Vim logged that stuff somewhere
<yorickpeterse>
it just says "lol segfault bye"
<darix>
yorickpeterse: as you said it is reproducable
<darix>
gdb --args vim ...
<yorickpeterse>
hmm
<darix>
r
<darix>
bt
<whitequark>
yorickpeterse: man core
<darix>
or that
<darix>
if it wrote a core file
<yorickpeterse>
that's disabled, but it could work too
lun_ has joined #ruby-lang
<darix>
so gdb --args
<whitequark>
yorickpeterse: well yes, it's not vim's job to record backtraces or something
<whitequark>
it's not even possible in general case
<whitequark>
because its memory could be FUBAR
hogeo has quit [Remote host closed the connection]
havenwood has quit [Read error: Connection reset by peer]
hogeo has joined #ruby-lang
havenwood has joined #ruby-lang
<yorickpeterse>
No, but it should be able to log everything up to that point
<darix>
yorickpeterse: now run the gdb line and get us a backtrace :p
<yorickpeterse>
yeah I'm trying but my gdb-fu is fucking rusty
<whitequark>
you need to press five keys
<whitequark>
gdb-fu?
<darix>
yorickpeterse: gdb --args vim ..
<darix>
press r
<darix>
bt
<darix>
done
<yorickpeterse>
haha this backtrace is fucking useless
<darix>
and your distro/os doesnt provide debuginfo packages?
<whitequark>
apt-get install vim-dbg
<yorickpeterse>
apt? what is this?
<whitequark>
oh fuck you.
<yorickpeterse>
I run the Arse Linux
<yorickpeterse>
but no, it doesn't have debuginfo stuff I think
<darix>
is that one of the distros that compiles everything on install?
<yorickpeterse>
no
<gnufied>
...
<darix>
well maybe get a decent distro then
<darix>
lunch time
C0C0 has joined #ruby-lang
leex has joined #ruby-lang
zmike has quit [Read error: Operation timed out]
lun_ has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
lun_ has joined #ruby-lang
lun_ has quit [Ping timeout: 246 seconds]
<leex>
Hi I am having an issue using PTY in ruby, I have some code that opens a PTY and that works fine in ruby 1.9.3 but fails in 2.0.0 anyone any idea why this might fail in ruby 2.0.0? Here is a link to the relevant code and output: https://gist.github.com/klautcomputing/6548827
lun_ has joined #ruby-lang
Criztian has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
hogeo has quit [Remote host closed the connection]
setmeaway has quit [Ping timeout: 264 seconds]
bondar has joined #ruby-lang
kek has joined #ruby-lang
mdedetrich has joined #ruby-lang
minivan has joined #ruby-lang
sush24 has joined #ruby-lang
mbj has quit [Quit: leaving]
jiuweigui has quit [Quit: Gone...]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
Domon has quit [Remote host closed the connection]
Domon has joined #ruby-lang
Domon has quit [Ping timeout: 240 seconds]
GeissT has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
arBmind has quit [Ping timeout: 256 seconds]
postmodern has quit [Quit: Leaving]
arBmind has joined #ruby-lang
<ljarvis>
yeahBITCHES
<ljarvis>
uh
<ljarvis>
wrong channel
<ljarvis>
also, good morning
<ljarvis>
uh wtf its 12:15 already
<ljarvis>
good afternoon
arBmind has quit [Quit: Leaving.]
<darix>
ljarvis: tststs
arBmind has joined #ruby-lang
<ljarvis>
darix: also, re tap: [something].tap { |a| a << x if foo? }.map { .. }.tap { |a| a << if bar? }.select {... }
<ljarvis>
it's really for convenience
jxie has quit [Quit: leaving]
softrli has joined #ruby-lang
setmeaway has joined #ruby-lang
<ljarvis>
but it abused
<ljarvis>
also why is it so quiet this morning, yorickpeterse are you having a good day?
lun_ has quit [Remote host closed the connection]
lun_ has joined #ruby-lang
<yorickpeterse>
I'm sleepy today
<yorickpeterse>
plus I have half a day anyway since I need to head out in a bit
mbj has joined #ruby-lang
softrli has quit [Ping timeout: 264 seconds]
lun_ has quit [Ping timeout: 256 seconds]
ldnunes has joined #ruby-lang
JohnBat26 has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
lun_ has joined #ruby-lang
nisstyre has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
Criztian has quit [Remote host closed the connection]
lun_ has quit [Remote host closed the connection]
lun_ has joined #ruby-lang
havenwood has quit [Ping timeout: 256 seconds]
lun__ has joined #ruby-lang
lun_ has quit [Read error: Connection reset by peer]