<Ox0dea>
"Ruby is, in the general case, not computationally efficient."
<j416>
he did it again
p1k has joined #ruby
<Ox0dea>
Get 'im!
mdw has quit [Quit: Sleeping Zzzzz]
nodejunkie has joined #ruby
Grays0n has joined #ruby
terminalrecluse has joined #ruby
kam270 has joined #ruby
chouhoulis has joined #ruby
lxsameer has joined #ruby
solars has joined #ruby
terminalrecluse has quit [Client Quit]
symm- has joined #ruby
LoneHerm_ has joined #ruby
darkf has quit [Quit: Leaving]
chouhoulis has quit [Ping timeout: 264 seconds]
aufi has joined #ruby
karapetyan has joined #ruby
<Ox0dea>
wolffles: Can you say why my and j416's solutions suck, computationally speaking?
mondok has joined #ruby
<wolffles>
umm
intrigueD has joined #ruby
<j416>
fwiw I didn't give a solution
<Ox0dea>
I misinterpreted your "ffs", then.
<j416>
I just fixed yours by adding friggin parentheses to your method :P
<Ox0dea>
Pfft.
<j416>
sorry for the misunderstanding
<Ox0dea>
GTFO.
<j416>
:D
<Ox0dea>
<3
<j416>
would have been hilarious if we had the exact same solution though
<Ox0dea>
That's... what I thought had happened.
<j416>
with the exact same syntax
elifoster has quit [Ping timeout: 240 seconds]
<j416>
D:
<Ox0dea>
I don't even.
<j416>
Ox0dea: what country are you from?
<j416>
if I may ask
JDiPierro has joined #ruby
andrew has quit [Remote host closed the connection]
<Ox0dea>
One of the sovereign ones.
elifoster has joined #ruby
<RickHull>
there is no sovereignty on the internet (crosses fingers)
<j416>
Ox0dea: I see.
LoneHerm_ has quit [Remote host closed the connection]
moeabdol has joined #ruby
andrew_ has joined #ruby
<Ox0dea>
wolffles: The algorithm hardly matters for such tiny inputs, but considering what happens with "pathological" inputs can make these little programming challenges much more worthwhile.
JDiPierro has quit [Ping timeout: 250 seconds]
<Ox0dea>
What if the input array had, like, a million elements, and the nearest larger was one to the left of the input index?
blackmesa has joined #ruby
<Ox0dea>
My pretty solution would run #select over the entire array to pare down the candidate pool, but that's retarded.
<wolffles>
what would you do about it ?
SirCmpwn has quit [Ping timeout: 250 seconds]
<Ox0dea>
I'd fix it. :)
mhoungbo has joined #ruby
<wolffles>
like use different methods?
<Ox0dea>
How would you do it as a human if, say, the array were a corridor and you were looking for the door behind which the nearest larger number was hidden?
<Ox0dea>
Spoiler alert: call a friend. :)
<RickHull>
i'd start looking for rope
<Ox0dea>
wolffles: Picture it: you and a friend both start at door `i`. One of you goes to the left and the other to the right, and each of you calls out "found it!" when you hit a door that has a larger number than the one behind the starting door.
roshanavand has joined #ruby
intrigueD has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 256 seconds]
<Ox0dea>
You'd both want to count how many steps it took you to get there, of course.
<wolffles>
why stop there
<Ox0dea>
Where?
<wolffles>
why not divide the work load each of you call 2 more friends
SirCmpwn has joined #ruby
<Ox0dea>
Why would that be an optimization?
pawnbox has joined #ruby
<wolffles>
time wise its faster
<Ox0dea>
Not inherently.
<Ox0dea>
It'd be faster if you knew exactly what you were looking for.
intrigueD has joined #ruby
<Ox0dea>
In this case, what's behind each door is essentially a complete mystery.
<Ox0dea>
Imagine you called over fifteen friends and everybody got to searching, only for you to find it two doors to the left of your starting position.
<Ox0dea>
They'd all be like, "Well, this was a fuckin' waste o' time, eh?"
scepticulous has joined #ruby
<RickHull>
you could ramp up the friend pool
<wolffles>
but thats just one example
<wolffles>
imagine having to do it multiple times
infra-red has joined #ruby
<Ox0dea>
wolffles: Assume the corridor is infinite; where do you position everybody at the start?
Mon_Ouie has quit [Ping timeout: 250 seconds]
<RickHull>
infinite / N positions away from each other
SOLDIERz has quit [Ping timeout: 240 seconds]
<Ox0dea>
^
<wolffles>
not that easy tho
infra-re_ has joined #ruby
<Ox0dea>
...
Spami has joined #ruby
dcunit3d has quit [Ping timeout: 272 seconds]
pawnbox has quit [Remote host closed the connection]
<p1k>
is there a ruby equivalent to python's threading.event() ?
intrigueD has quit [Remote host closed the connection]
roshanavand has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
gaspaio has joined #ruby
<p1k>
thanks, is there a non-locking example?
Tempesta has quit [Ping timeout: 240 seconds]
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tempesta has joined #ruby
<Ox0dea>
Oh, right.
<p1k>
I'm looking to do something like t= Thread.new {#intialize, #more stuff}; and in the main thread wait(t.initialized)
<Ox0dea>
Just #join that Thread?
<p1k>
that's totally different
<j416>
p1k: so did you figure out your merge problem?
SirCmpwn has quit [Ping timeout: 240 seconds]
<p1k>
j416: I can't remember now sorry -_- I hope i did
blackgoat has joined #ruby
<j416>
p1k: you asked in #git and I answered, then you disappeared
<p1k>
j416: Oh i just cherry-picked, it was quite strange
Abrin has quit [Ping timeout: 250 seconds]
<j416>
that works, yes
<p1k>
j416: normally when you rebase and sha's change git considers them different commits (e.g. this is how you often end up with duplicates) but in this case for some reason it still considered them to be shared
<j416>
effectively a manual force-rebase.
<j416>
yes.
<j416>
normally when you rebase commits with identical content as something that already exists, it will discard them.
<j416>
anyway, this is offtopic for the channel.
Grays0n has quit [Ping timeout: 240 seconds]
<p1k>
so yeah is there a non locking resource I can use ?
djellemah_ is now known as djellemah
pawnbox has joined #ruby
SirCmpwn has joined #ruby
dionysus69 has joined #ruby
CrazyEddy has quit [Ping timeout: 272 seconds]
<djellemah>
p1k: how is wait(something) not non-locking?
Kallis has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 264 seconds]
<p1k>
djellemah: like python threading.event or pause/sigsuspend in glibc
nfsnobody has joined #ruby
jdelaney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
threading.event() uses a condition variable...
PedramT has joined #ruby
<p1k>
yeah but ConditionVariable requires a mutex from the docs?
Abrin has joined #ruby
<Ox0dea>
As does threading.event().
davedev24 has joined #ruby
glowcoil has joined #ruby
<p1k>
that's not the same interface, e.g. it would be initialized = thread.Event(); Thread(#do stuff); initialized.wait()
jsaak has quit [Ping timeout: 240 seconds]
<p1k>
but I can't do resource = ConditionVariable.new(); Thread.new {#do stuff}; resource.wait() because there should be a locked mutex in the wait call? Or am i missing something
firstdayonthejob has joined #ruby
pawnbox has joined #ruby
nofxx has quit [Ping timeout: 264 seconds]
betafive has quit [Ping timeout: 276 seconds]
kirillzh has joined #ruby
davedev24 has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
<Ox0dea>
p1k: I guess it's not exactly the same interface, but the premise remains: you lock around the Mutex, and #wait on the ConditionVariable from the main thread.
<djellemah>
q = Queue.new; Thread.new{sleep 3; q.close}; q.pop # for 2.3 only
<djellemah>
Ox0dea: yip, broadcast would be more general.
chouhoulis has joined #ruby
<djellemah>
You could also use a future/promise in blocking mode.
sneaksby has joined #ruby
<p1k>
djellemah: won't it race though, since the child thread needs to take the mutex for the parent to wait - but the parent calls wait as soon as the child thread is started?
jas02 has joined #ruby
srenatus has joined #ruby
andrew_ has quit [Remote host closed the connection]
PedramT has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 245 seconds]
andrew has joined #ruby
andrew has quit [Remote host closed the connection]
<djellemah>
If the child thread signals before the main thread is waiting (which can happen, the parent never wakes up.
arlek has quit [Ping timeout: 256 seconds]
<djellemah>
tsk , => ),
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tjohnson has quit [Quit: Connection closed for inactivity]
PedramT has joined #ruby
elifoster has quit [Ping timeout: 245 seconds]
roshanavand has joined #ruby
<p1k>
that definetly does not happen with python events, it doesn't' happen with c signals either if handled correctly
<apeiros>
all signal handlers are also handled in the main thread.
SCHAAP137 has joined #ruby
nfsnobody has joined #ruby
einarj has joined #ruby
<Ox0dea>
Threads sure look like children to the scheduler.
<apeiros>
Ox0dea: depends which aspect. not sure I have a single word. "one thread waits for 10 other threads"
yfeldblum has quit [Ping timeout: 240 seconds]
kirillzh has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
<Ox0dea>
Are you sure there's no hierarchical component to that relationship?
<apeiros>
Ox0dea: try to spawn another thread from a thread and tell me whether it'll be hierarchic or still all under main
<Ox0dea>
Well, fair enough. It's all a matter of perspective, really. :P
PedramT has quit [Remote host closed the connection]
kirillzh has quit [Max SendQ exceeded]
<apeiros>
no pstree on osx, as it seems. I wonder which tool it'd be there
kirillzh has joined #ruby
<apeiros>
Ox0dea: threads currently are all backed by os-level threads, and sure, if os level threads do have a parent/child relationship, then it'll be reflected as such by the os. but on ruby's level, there's no such thing.
<Ox0dea>
Right.
<Ox0dea>
"depends which aspect" == "Who's askin'?"
<apeiros>
p1k: main thread is also special in that it's the only thread which is copied to forks
* apeiros
wonders whether there have been other special aspects about main thread
PedramT has joined #ruby
sepp2k has joined #ruby
pawnbox has joined #ruby
Xeago has joined #ruby
krzkrz has quit [Read error: Connection reset by peer]
idefine has quit [Remote host closed the connection]
krzkrz has joined #ruby
<adaedra>
Hello
<Ox0dea>
Mornin', adaedra.
yfeldblum has joined #ruby
<apeiros>
moin!
Ishido has joined #ruby
<adaedra>
Ox0dea: Are you always here?
<Ox0dea>
adaedra: I'll check the logs.
<adaedra>
apeiros: moin, wie geht's?
<apeiros>
trés bien, et toi?
<apeiros>
oh damn, it's très, isn't it?
<adaedra>
yep
<adaedra>
and a space before the ?
<apeiros>
that one requires a sequence, é I can type directly :(
<adaedra>
otherwise, it's good :)
<apeiros>
adaedra: quarter-space actually (at least if you want to be typographically correct)
pawnbox has quit [Ping timeout: 252 seconds]
<apeiros>
and I have no idea how to generate a qs, short of searching it in the symbols table
dcunit3d has joined #ruby
pawnbox has joined #ruby
<adaedra>
we usually just use a non-breakable space.
Xeago has quit [Remote host closed the connection]
<apeiros>
that one I'd know how to generate
<apeiros>
opt-space :)
<apeiros>
oh. can't type that here as that switches channels :<
solars has joined #ruby
Gnut has joined #ruby
bluOxigen_ has joined #ruby
wolffles has quit [Quit: wolffles]
pawnbox has quit [Ping timeout: 240 seconds]
bluOxigen has quit [Ping timeout: 240 seconds]
lewis1711 has joined #ruby
chipotle has quit [Quit: cheerio]
<lewis1711>
if I do "m = [].map", m is the type enumerator. how do I call m with a block?
SOLDIERz has joined #ruby
Xeago has joined #ruby
shredding has joined #ruby
ur5us has quit [Remote host closed the connection]
roshanav_ has joined #ruby
floror has quit [Quit: floror]
sneaksby has quit [Ping timeout: 256 seconds]
<Ox0dea>
lewis1711: That you acquired the Enumerator by way of #map is lost to you at that point.
Zai00 has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
<lewis1711>
Ox0dea, but the docs give the example of .map.with_index
<Ox0dea>
lewis1711: Sure, and Enumerator#with_index makes plenty of sense.
<lewis1711>
then what the hell is the point of map being essentially "to_enum"
huyderman has joined #ruby
<Ox0dea>
lewis1711: You're generally supposed to call #map with a block.
azure32 has quit [Quit: leaving]
<Ox0dea>
Er, wait, I think I see how you mean, but MRI uses under-the-hood magic to remember which method gave birth to a given Enumerator.
<lewis1711>
but if there's no block, it's just 'to_enum'. i don't really understood
<Ox0dea>
rb_frame_this_func() is the magic to which I referred.
<Ox0dea>
I'm sure there's a way to get at it from Ruby, but you're not meant to.
colli5ion has joined #ruby
PedramT has quit [Remote host closed the connection]
hs366 has joined #ruby
chouhoulis has joined #ruby
Jassidae has joined #ruby
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
adgtl has quit [Remote host closed the connection]
blaxter has quit [Ping timeout: 252 seconds]
lipoqil has joined #ruby
Kryptonical has joined #ruby
Kryptonic has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 256 seconds]
Snowy has joined #ruby
mdw has joined #ruby
PedramT has joined #ruby
robbyoconnor has joined #ruby
Kryptonical has quit [Ping timeout: 240 seconds]
<p1k>
btw regarding the conditionvariables
<p1k>
is cv.wait unless initialized even safe? Could it evaluate the condition then be suspended by the other thread and receive the signal before wait is called (but after the unless has been evaluated) ?
adgtl has joined #ruby
<p1k>
oh I see, that's why it's mutex wrapped in your example, nvm
mark4 has joined #ruby
gaspaio has quit [Quit: leaving]
GinoManWorks has quit [Read error: Connection reset by peer]
roshanav_ has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
Kryptonical has joined #ruby
dmolina has quit [Quit: Leaving.]
floror has joined #ruby
acosonic has joined #ruby
<acosonic>
Hi all, is it possible to install rvm and ruby without sudo?
roshanavand has joined #ruby
nodejunkie has quit [Ping timeout: 252 seconds]
rodfersou has joined #ruby
joonty has joined #ruby
<adaedra>
Maybe, I don't remember
blaxter has joined #ruby
benlieb has joined #ruby
<adaedra>
I know for sure that it's possible for chruby and ruby-install tho ;)
blackmesa has joined #ruby
<acosonic>
because when I was trying sometimes, I was asked for root pwd...
floror has quit [Quit: floror]
roshanavand has quit [Ping timeout: 240 seconds]
Bloomer has joined #ruby
momo-reina has joined #ruby
DoubleMalt has joined #ruby
valera has joined #ruby
lsmola has quit [Ping timeout: 256 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
ocbtec has joined #ruby
betafive has joined #ruby
devbug has joined #ruby
dudedudeman has quit [Quit: dudedudeman]
Jassidae has quit [Ping timeout: 250 seconds]
PedramT has quit [Remote host closed the connection]
Abrin has quit [Ping timeout: 240 seconds]
Domaldel has quit [Quit: Leaving]
skweek has quit [Ping timeout: 250 seconds]
jottr has joined #ruby
kedare has joined #ruby
william3 has joined #ruby
devbug has quit [Ping timeout: 252 seconds]
duncannz has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
betafive has quit [Read error: Connection reset by peer]
floror has joined #ruby
skweek has joined #ruby
shredding has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
pihpah has joined #ruby
PedramT has joined #ruby
lsmola has joined #ruby
blackmesa has joined #ruby
dmolina has joined #ruby
aupadhye has quit [Ping timeout: 250 seconds]
nonexistent has joined #ruby
pandaant has joined #ruby
Timberwo|f has quit [Quit: Sleep.]
darkxploit has quit [Quit: Leaving]
karapetyan has quit [Remote host closed the connection]
anisha has joined #ruby
tvw has joined #ruby
jokke has joined #ruby
Coldblackice has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
andrew_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
nonexistent has quit [Ping timeout: 250 seconds]
einarj_ has joined #ruby
andrew__ has joined #ruby
einarj has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
karapetyan has joined #ruby
phatypus has joined #ruby
yfeldblum has joined #ruby
karapetyan has quit [Remote host closed the connection]
andrew_ has quit [Ping timeout: 252 seconds]
LoneHermit has joined #ruby
pawnbox has joined #ruby
FooMunki has joined #ruby
PedramT has quit [Remote host closed the connection]
karapetyan has joined #ruby
chouhoulis has joined #ruby
einarj has joined #ruby
einarj_ has quit [Ping timeout: 245 seconds]
LoneHermit has quit [Ping timeout: 250 seconds]
bruce__lee has joined #ruby
urtokk has joined #ruby
pawnbox has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 256 seconds]
sanjakbeg has joined #ruby
theRealAlexz has quit [Ping timeout: 248 seconds]
sergey_makagon has joined #ruby
PedramT has joined #ruby
bruce_lee has quit [Ping timeout: 260 seconds]
theRealAlexz has joined #ruby
ikonia has joined #ruby
karapetyan has quit [Remote host closed the connection]
pawnbox has joined #ruby
KnownSyntax has quit [Read error: Connection reset by peer]
PedramT has quit [Remote host closed the connection]
trinaldi has joined #ruby
sanjakbeg has quit [Ping timeout: 240 seconds]
PedramT has joined #ruby
ferr has quit [Ping timeout: 264 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
rdark has joined #ruby
einarj_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
einarj has quit [Ping timeout: 240 seconds]
phatypus has quit [Quit: .>]
f4cl3y has joined #ruby
william3 has quit [Remote host closed the connection]
karapetyan has joined #ruby
einarj_ has quit [Read error: Connection reset by peer]
momo-reina has quit [Remote host closed the connection]
einarj has joined #ruby
tvw has quit [Remote host closed the connection]
marr has joined #ruby
platzhirsch has joined #ruby
grippotoxin has joined #ruby
einarj_ has joined #ruby
einarj has quit [Ping timeout: 252 seconds]
Skelz0r has quit [Ping timeout: 250 seconds]
platzhirsch has left #ruby [#ruby]
atmosx has quit [Quit: WeeChat 1.4]
DoubleMalt has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
tvw has joined #ruby
karapetyan has joined #ruby
krzkrzkrz has joined #ruby
coffeejunk has joined #ruby
krzkrz has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
andrew__ has quit [Remote host closed the connection]
LoneHerm_ has quit [Ping timeout: 245 seconds]
einarj has quit [Ping timeout: 276 seconds]
<djellemah>
adaedra: !experiment ;-)
<Ox0dea>
At me?
chouhoulis has quit [Ping timeout: 250 seconds]
<Ox0dea>
I was showing you that you haven't had to require 'thread' for those since 2.0.
Snowy has quit [Remote host closed the connection]
<djellemah>
Ox0dea: Oh, OK. But Thread.new{} fails anyway.
<Ox0dea>
eval.in doesn't let you fork.
sergey_makagon has quit [Remote host closed the connection]
<schaary>
I want to install the gem pygments. When I search for it, it's found on rubygems. But when I want to install it, I get the error message, it can't be found :(
bweston92 has joined #ruby
<Ox0dea>
> This gem has been yanked, and it is not available for download directly or for other gems that may have depended on it.
einarj has joined #ruby
einarj_ has quit [Read error: Connection reset by peer]
<djellemah>
My point being that Queue is (counterintuitively) smaller and faster than Mutex + ConditionVariable. With the added bonus of being easier to think about.
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
roshanavand has joined #ruby
<yorickpeterse>
The ConditionVariable API is absolutely terrible
<yorickpeterse>
It's _really_ confusing to use
ReK2 has quit [Remote host closed the connection]
<djellemah>
yorickpeterse: as I ably demonstrated a little while ago ... :-|
<ruby[bot]>
norc: # => undefined method `each_slice' for main:Object (NoMethodError) ...check link for more (https://eval.in/516393)
<norc>
asm>> []..each_slice(2)
<ruby[bot]>
norc: I have disassembled your code, the result is at https://eval.in/516395
<norc>
Is this possibly a compiler bug?
aldarsior has quit [Quit: aldarsior]
ensyde_ has quit [Ping timeout: 252 seconds]
<norc>
asm>> 1..2
<ruby[bot]>
norc: I have disassembled your code, the result is at https://eval.in/516397
<norc>
Why would the compiler even try to putself here?
<norc>
(In the previous asm code)
<norc>
Ohh nevermind. It is clear to me now.
<norc>
The ast shows this clearly.
<norc>
i.e. this gets interpreted as []..(each_slice)
Mon_Ouie has quit [Ping timeout: 248 seconds]
chouhoulis has joined #ruby
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
the_drow has quit [Quit: This computer has gone to sleep]
jottr has quit [Ping timeout: 276 seconds]
kobain has joined #ruby
p1k has quit [Ping timeout: 264 seconds]
chouhoulis has quit [Ping timeout: 272 seconds]
ss_much has joined #ruby
floror has joined #ruby
sentinelship has quit [Ping timeout: 252 seconds]
berserk_ren has quit [Ping timeout: 252 seconds]
nekrodesk has quit [Max SendQ exceeded]
the_drow has joined #ruby
joonty has quit [Ping timeout: 248 seconds]
freerobby has quit [Quit: Leaving.]
symbol has joined #ruby
saneax is now known as saneax_AFK
kknight has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 256 seconds]
fourq is now known as fourq|away
fourq|away is now known as fourq
tvw has joined #ruby
fourq is now known as fourq|away
fourq|away is now known as fourq
synthroid has joined #ruby
pdoherty has joined #ruby
mikecmpbll has joined #ruby
unsortable has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
bluOxigen has joined #ruby
wethu has quit [Quit: This computer has gone to sleep]
berserk_ren has joined #ruby
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
joonty has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
blackmesa has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Grays0n has quit [Read error: Connection reset by peer]
einarj_ has joined #ruby
einarj has quit [Ping timeout: 250 seconds]
schickung has joined #ruby
theRealAlexz has quit [Ping timeout: 256 seconds]
theRealAlexz has joined #ruby
yardenbar has joined #ruby
emilkarl has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
baweaver has joined #ruby
carella has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
ropeney has joined #ruby
pawnbox has joined #ruby
PedramT has quit [Remote host closed the connection]
einarj_ has quit [Ping timeout: 276 seconds]
einarj__ has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
JDiPierro has joined #ruby
baweaver has quit [Ping timeout: 248 seconds]
adgtl has joined #ruby
scepticulous has quit [Ping timeout: 250 seconds]
einarj has quit [Ping timeout: 252 seconds]
freerobby has joined #ruby
atzorvas_ has quit [Quit: Page closed]
<flughafen>
does capybara find_button include text even if it's a span(within the button), or only in the attributes of the button
kichawa has joined #ruby
<kichawa>
what will be the better choice: standalone passenger with nginx and custom init_script for passenger per app
<kichawa>
or compile nginx with passenger module and create custom init_script for custom nginx?
<adaedra>
rails?
dlitvak has quit [Ping timeout: 264 seconds]
scepticulous has joined #ruby
<kichawa>
yes, rails
scepticulous has quit [Client Quit]
<adaedra>
Ask #RubyOnRails then, they're more knowledgable on this subject
<kichawa>
i think all of you use passenger
<adaedra>
nope.
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
not even all of us use rails.
skweek has quit [Ping timeout: 252 seconds]
dlitvak has joined #ruby
jas02_ has joined #ruby
PedramT has joined #ruby
Mia has joined #ruby
haylon has joined #ruby
scepticulous has joined #ruby
GinoManWorks has joined #ruby
jas02 has quit [Ping timeout: 252 seconds]
jas02_ is now known as jas02
Axy has quit [Ping timeout: 252 seconds]
PedramT has quit [Ping timeout: 248 seconds]
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PedramT has joined #ruby
bluOxigen_ has joined #ruby
Xeago has joined #ruby
lubekpl has joined #ruby
jxs_ has joined #ruby
M-Kodo has quit [Remote host closed the connection]
bluOxigen has quit [Read error: Connection reset by peer]
lurch_ has quit [Quit: lurch_]
bluOxigen has joined #ruby
Xeago has quit [Remote host closed the connection]
unsortable has quit [Ping timeout: 250 seconds]
Ishido has quit [Remote host closed the connection]
bluOxigen_ has quit [Ping timeout: 240 seconds]
<emilkarl>
I have a brain freeze... could anyone help me out with this one? I want an array of arrays to be a hash with first as key and second as value. http://pastie.org/10716417
<gestahlt>
Is there a way to stream the current desktop into a object?
<adaedra>
The current desktop?
<gestahlt>
Hmm maybe wrong explained..
<gestahlt>
Screengrabbing?
<gestahlt>
I know there are so many ways to do this
<gestahlt>
but i dont know how to do it in ruby
lurch_ has joined #ruby
ramortegui has joined #ruby
einarj has quit [Read error: Connection reset by peer]
<gestahlt>
I want to stream my desktop and record it.. or even manipulate it (for example drawing rectangles around icons and such)
<gestahlt>
I dont really know how to begin
einarj has joined #ruby
Xeago has quit [Remote host closed the connection]
idefine has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<adaedra>
It depends on your system, first, as all systems do it differently
dlitvak has quit [Remote host closed the connection]
M-Kodo has joined #ruby
Xeago has joined #ruby
JDiPierro has joined #ruby
JDiPierro has quit [Remote host closed the connection]
JDiPierr_ has joined #ruby
dlitvak has joined #ruby
<gestahlt>
lets say i want to do it for X (linux) first
<gestahlt>
For Windows i might need other sources (VNC or RDP)
<gestahlt>
But right now, Linux is my target
<adaedra>
VNC/RDP is something else already
<gestahlt>
As source?
mostlybadfly has quit [Quit: Connection closed for inactivity]
dmitch has joined #ruby
<adaedra>
This is something that's not so easy to do, and I'm not sure there's things in Ruby good for doing that
<gestahlt>
Since i also want to do it on a remote system later.. x can do it natively
sgambino has joined #ruby
PedramT_ has quit [Remote host closed the connection]
<gestahlt>
Why not?
<gestahlt>
What makes ruby bad for the task?
<adaedra>
Lack of tooling
<gestahlt>
Hm
<adaedra>
Slowness, too, for real-time processing
<gestahlt>
What would you recommend?
<gestahlt>
I like ruby as language
pdoherty has quit [Ping timeout: 245 seconds]
<gestahlt>
And i definatly want to stick to an interpreted language
<adaedra>
You can look at working with existing tools
<djellemah>
gestahlt: Maybe http://qt-apps.org/content/show.php/ScreenGrab?content=111648 You'd probably have to figure out the c/c++ sources. I think qt-bindings would not be much help. But those may be a good place to start beating your head ;-)
seitensei has quit [Remote host closed the connection]
<djellemah>
also, ImageMagick has ruby bindings. Not sure if they're still up to date.
PedramT has joined #ruby
<gestahlt>
Well.. as for existing tools, i would use ffmpeg / avconv to stream my desktop
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
babblebre has joined #ruby
<gestahlt>
and then maybe look at opencv or camelia for detection / manipulation
atomical has joined #ruby
roshanavand has joined #ruby
<gestahlt>
But it will never be "live" that way or close to it
<gestahlt>
There are quite a few java libs for that as well
<gestahlt>
python should also have everything
<gestahlt>
but i want to use ruby
<gestahlt>
Java i like to avoid because its bloated crap
idefine has quit [Remote host closed the connection]
roshanavand has quit [Remote host closed the connection]
<gestahlt>
and python.. meh i dont like it
<gestahlt>
Im not good with snakes
Snowy has quit [Remote host closed the connection]
roshanavand has joined #ruby
<djellemah>
jruby?
idefine has joined #ruby
<gestahlt>
Im not sure about jruby tho
roshanavand has quit [Remote host closed the connection]
<gestahlt>
It has java
<gestahlt>
and that is bad
roshanavand has joined #ruby
duckpuppy has joined #ruby
B1n4r10 has joined #ruby
scepticulous has quit [Ping timeout: 248 seconds]
mary5030 has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
ensyde__ has quit [Quit: Leaving]
lxsameer has quit [Quit: Leaving]
rodfersou has quit [Quit: leaving]
einarj has quit [Read error: Connection reset by peer]
<gestahlt>
The most stuff i find is based on selenium or even phantom.js... everything is so web-heavy.. its annoying
einarj_ has joined #ruby
<ddv>
gestahlt: jruby is awesome
<ddv>
because it runs on the jvm
<ddv>
the jvm is awesome
<haylon>
Not sure about that logic
<haylon>
but its definitely a method
blackmesa has joined #ruby
dragon9783 has joined #ruby
<haylon>
I like Jruby because it allows me to run my RubyGem web apps in a Tomcat container
<haylon>
but I'd rather run in native MRI
carella has quit [Remote host closed the connection]
jottr has joined #ruby
M-mistake has joined #ruby
einarj has joined #ruby
carella has joined #ruby
einarj_ has quit [Ping timeout: 248 seconds]
<gestahlt>
I think jruby might be the way of least resistance
<djellemah>
gestahlt: Seems like your options are: use java libs from jruby; or pick your c-libraries and learn to write ruby extensions.
<gestahlt>
jruby it is ;)
Trieste has quit [Ping timeout: 264 seconds]
mondok has joined #ruby
Xeago has quit [Remote host closed the connection]
<haylon>
I think Java has more readily available video manipulation libraries. I haven't seen too many in C
Trieste has joined #ruby
krobzaur_ has joined #ruby
M-shine has quit [Quit: node-irc says goodbye]
einarj_ has joined #ruby
CloCkWeRX has quit [Ping timeout: 256 seconds]
soc42 has quit [Remote host closed the connection]
einarj has quit [Ping timeout: 245 seconds]
Snowy has joined #ruby
TomPeed has joined #ruby
Xeago has joined #ruby
M-mistake has quit [Quit: node-irc says goodbye]
Xeago has quit [Remote host closed the connection]
floror has quit [Quit: floror]
gestahlt has quit [Quit: Leaving]
Joel has joined #ruby
<Joel>
with Thor is there a way to get it to print out ALL help? Like, options that are only available on subcommands?
<haylon>
Joel: I thought it was just commandname help subcommand
<ljarvis>
hs366: excon is used to make HTTP requests, it has nothing to do with REST
<Joel>
haylon, if you run a Thor program with no args it prints help
<Joel>
haylon, it prints all class_option, but not all option
<haylon>
Yup, but if you add the `help subcommand` then you can get the full details
adgtl has quit [Remote host closed the connection]
<haylon>
if you go through the whatisthor tutorial on their page, they show how to do that
<Joel>
haylon, so I have a program with 8 commands, are you saying I should type out help + all 8 subcommands to generate a full list of options?
<hs366>
ljarvis, can you please make it more clear?
<ljarvis>
hs366: excon has nothing to do with REST.
<hs366>
ok...
<haylon>
Joel, it would only do one subcommand, but you'd have to do it for each subcommand. I'm not sure if Thor has the ability to do ALL subcommands
<haylon>
like a man page
<Joel>
haylon, right, I'm after -all- options, think of generating a doc for a README.md
Pumukel has joined #ruby
<haylon>
Ah, no, I haven't seen that ability added in Thor
<Joel>
:\
sankaber has joined #ruby
idefine has joined #ruby
<hs366>
ljarvis, I used Excon to call a method in other application API.
howdoi has quit [Quit: Connection closed for inactivity]
<hs366>
so what can it be then ?
blackmesa has quit [Ping timeout: 252 seconds]
the_drow has joined #ruby
einarj_ has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
dlitvak has quit [Remote host closed the connection]
Timberwo|f has joined #ruby
aegis3121 has joined #ruby
jxs_ has quit [Remote host closed the connection]
<apeiros>
hs366: please explain the term "RESTful".
CloCkWeRX has joined #ruby
krobzaur_ has quit [Quit: WeeChat 1.2]
PedramT has quit [Remote host closed the connection]
davedev24 has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
troulouliou_div2 has joined #ruby
* havenwood
consults the hallowed Thesis
frem has joined #ruby
idefine has quit [Remote host closed the connection]
<apeiros>
the what?
CloCkWeRX has quit [Ping timeout: 245 seconds]
floatingpoint has joined #ruby
crime has joined #ruby
CloCkWeRX has joined #ruby
<hs366>
apeiros, RESTful systems typically, but not always, communicate over Hypertext Transfer Protocol (HTTP) with the same HTTP verbs (GET, POST, PUT, DELETE, etc.)
davedev24 has quit [Ping timeout: 252 seconds]
einarj_ has joined #ruby
einarj has quit [Ping timeout: 240 seconds]
<hs366>
I think Excon use the same HTTP methods GET,...
<apeiros>
so RESTful systems. is excon a system?
sankaber has quit [Remote host closed the connection]
<crime>
Are there ways for non-novices to encourage other non-novices to stop shitting on novices when they ask questions? Are there any offensive strategies for that rather than just telling the victims to tough up and google more? I mean surely that represents a certain toxicity in the conversation when someone is TRYING to get better and someone else gives them a hard time for it.
<apeiros>
interesting. no, it isn't a system. it's a library. you can *build a restful system* with it.
sankaber has joined #ruby
<hs366>
ok
Jardayn has joined #ruby
chouhoulis has joined #ruby
<apeiros>
i.e. as ljarvis already told you twice: no. it has just as much to do with rest as ruby has - nothing except that you can use it to build a restful system.
dstarh has joined #ruby
hexhaxtron_ has joined #ruby
Xat` has joined #ruby
<Xat`>
I guys, I am looking for some ruby help :)
<havenwood>
hs366: In many senses Excon is RESTful, using HTTP with proper verbs and all. It's an academic argument.
<Xat`>
I get this error ""NameError: uninitialized constant ActionView::Helpers::ActiveModelHelper" when building redmine
<havenwood>
crime: Asking in regard to something that happened specifically or just in general?
<crime>
havenwood: in general.
<crime>
newbies dont need to hear 'google first' more than once, I think the problem should be attacked at it's source
seitensei has joined #ruby
Xeago has joined #ruby
<Xat`>
I am using ruby 2.0.0p598 on CentOS 7.2
PedramT has joined #ruby
davedev2_ has joined #ruby
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev2_ has quit [Remote host closed the connection]
mondok has quit [Ping timeout: 272 seconds]
<crime>
Its really not even a MINASWAN issue either, just common sense. Like you wouldnt trashtalk someone in the gym who is out-of-shape because they're actually there getting better so I don't understand the motive behind telling a user asking for socratic dialogue to improve themselves to 'rtfm and gtfo' and things like tha
kappy has joined #ruby
davedev2_ has joined #ruby
platzhirsch has quit [Quit: Leaving.]
<crime>
it just promotes isolation of new users, and therefore new code, new ideas, new everything
<hs366>
I used Excon to pass/get respounce to/from Docker API
<djellemah>
hs366: REST is a set of ideas on how to structure http apis. Some systems call themselves RESTful when they (mostly) adhere to those ideas. Excon is a tool that could be used to interact with such a system.
chouhoulis has quit [Ping timeout: 248 seconds]
PedramT has quit [Remote host closed the connection]
davedev24 has quit [Ping timeout: 250 seconds]
<hs366>
i c
ss_much has quit [Quit: Connection closed for inactivity]
<djellemah>
hs366: excon can also be used to interact with non-REST http apis
<hs366>
ljarvis, apeiros havenwood djellemah Thanks a lot! know i think i get it !
Xeago has quit [Remote host closed the connection]
whippythellama has joined #ruby
aldarsior has joined #ruby
aldarsior has quit [Client Quit]
PedramT has joined #ruby
dlitvak has joined #ruby
wprice has joined #ruby
dopamean_ has quit [Ping timeout: 252 seconds]
<havenwood>
crime: The #ruby-community channel is a good place to talk about things we could do to make it more welcoming here. Or the ##new2ruby channel is friendly place as well.
anisha has quit [Quit: Leaving]
william3 has quit [Remote host closed the connection]
PedramT has quit [Read error: No route to host]
<crime>
havenwood: that's half the problem right there. I have read a LOT of #ruby, and I'm in here all the time and ##new2ruby is almost never mentioned, and new users come here first anyways to ask questions.
<codehotter>
what are file descriptors 3,4,5 and 6 for used in ruby?
Pumukel has quit [Ping timeout: 240 seconds]
<crime>
its practically rampant
<havenwood>
Xat`: Eek, looks like you've found a bug. The #rubyonrails channel might be the best place to ask since ActionView is involved.
codecop has quit [Remote host closed the connection]
unsortable has quit [Ping timeout: 256 seconds]
<chris2>
crime: apparently two pipes created at setup_communication_pipe in thread_pthread.c:1399
william3 has joined #ruby
<crime>
chris2: p sure that was meant for someone else
<chris2>
codehotter: ^
<chris2>
sorry :)
<chris2>
too many c* nicks :)
x77686d has joined #ruby
<apeiros>
crime: the best way aside of #ruby-community is to lead by example IMO
<apeiros>
if you want change, be the change.
<codehotter>
I have a ruby process stuck with two threads. One of the threads is waiting in poll() on FD 3 and 5, the other thread is stuck in a futex WAIT_PRIVATE
<codehotter>
the process is completely deadlocked
mhoungbo has quit [Ping timeout: 272 seconds]
<codehotter>
I want to debug this, but not sure how.
<chris2>
"communication pipe with timer thread and signal handler"
<chris2>
do you have a minimal test case to reproduce?
lxsameer has joined #ruby
hypermist has left #ruby ["Leaving"]
<codehotter>
no I do not. I recompiled ruby, and this happens during the test suite run
<codehotter>
in a sense the test case might be the minimal test case to reproduce
<codehotter>
the test is TestProcess#test_daemon_default, which spawns a child process, and the child process is the one that is deadlocked
william3 has quit [Ping timeout: 256 seconds]
tjohnson has joined #ruby
<chris2>
and which os?
<codehotter>
linux, centos 7
ramortegui has quit [Quit: Ex-Chat]
<codehotter>
The prebuilt binary from my distribution is fine, it might be something wrong with my build process
<codehotter>
but I would like to get to the bottom of this somehow.
<chris2>
aha...
B1n4r10 has joined #ruby
<chris2>
hm, how can i run that test standalone...
davedev2_ has quit [Remote host closed the connection]
TinkerTy_ has joined #ruby
adgtl has joined #ruby
sumark has quit [Remote host closed the connection]
william3 has quit [Remote host closed the connection]
<msg31>
Is it possible to break out of a bundle environment? I have a build script being called via 'bundle exec build-script' however this build script needs to install gems in a different ruby environment, it appears I'm being restricted by bundle
<msg31>
with that said '/opt/puppetlabs/puppet/lib/ruby/' is a brand new ruby install that was created in the buildscript
centrx has joined #ruby
<msg31>
havenwood, if I run the 'gem install' command outside of the build script, everything is successful, which makes me think bundler is getting in the way
floror has joined #ruby
<msg31>
packaging.git won't be checkedout in the /opt/puppetlabs/puppet/lib/ruby/ install. Nor do I want it to be.
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symbol has joined #ruby
pawnbox has joined #ruby
SenpaiSilver_ has quit [Quit: Leaving]
kf has joined #ruby
benhuda has joined #ruby
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
idefine has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
saneax_AFK is now known as saneax
rbennacer has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
william3 has quit [Remote host closed the connection]
rbennacer has joined #ruby
mary5030 has joined #ruby
symbol_ has joined #ruby
<havenwood>
msg31: Ah, so you're running a build command in the context of the bundle, and that command is installing a gem that then chokes on the bundle?
mary5030 has quit [Remote host closed the connection]
<msg31>
havenwood, exactly
sgambino has joined #ruby
mary5030 has joined #ruby
crime has quit [Ping timeout: 252 seconds]
<codehotter>
msg31: you could perhaps try to undo bundler's change to require?
<msg31>
codehotter, how would I do that? I'm pretty green when it comes to ruby
jottr has quit [Ping timeout: 240 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
<codehotter>
msg31: me too!
AlexRussia_ has joined #ruby
<codehotter>
when I look at bundler's source code, it seems it has a method reverse_rubygems_kernel_mixin
symbol has quit [Ping timeout: 256 seconds]
<codehotter>
msg31: perhaps you can just call Bundler::RubygemsIntegration#reverse_rubygems_kernel_mixin
<codehotter>
msg31: take this with a big grain of salt, I don't know much about ruby and I don't even fully understand what you are trying to do
<codehotter>
perhaps it's better if you wait for someone else eto comment
william3 has joined #ruby
jottr has joined #ruby
william3 has quit [Remote host closed the connection]
einarj has joined #ruby
einarj_ has quit [Read error: Connection reset by peer]
william3 has joined #ruby
idefine has joined #ruby
vagnerlandio has joined #ruby
<vagnerlandio>
hi
infra-re_ has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
colegatron has joined #ruby
bruce__lee has quit [Changing host]
bruce__lee has joined #ruby
bruce__lee is now known as bruce_lee
floror has quit [Quit: floror]
malconis has joined #ruby
cdg has joined #ruby
jgt4 has joined #ruby
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
seitensei has quit [Remote host closed the connection]
vagnerlandio has quit [Ping timeout: 252 seconds]
BaxterSpotlight has joined #ruby
BaxterSpotlight has left #ruby [#ruby]
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
mostlybadfly has joined #ruby
TinkerTyper has joined #ruby
konsolebox has joined #ruby
ss_much has joined #ruby
idefine has quit [Read error: Connection reset by peer]
gambl0re has quit [Ping timeout: 260 seconds]
idefine has joined #ruby
william3 has quit [Remote host closed the connection]
devbug has joined #ruby
<codehotter>
chris2: OK, I finally managed to figure out how to get ruby to start up outside of make (with RUBYLIB and LD_LIBRARY_PATH and so on)
adgtl has quit [Ping timeout: 245 seconds]
<codehotter>
chris2: I put what you pasted in a file and it works fine, it outputs "" and no deadlock
idefine has quit [Remote host closed the connection]
<chris2>
hm
<codehotter>
however the same test ran from make check reproducibly deadlocks
ElFerna has quit [Ping timeout: 240 seconds]
adgtl has joined #ruby
<codehotter>
(if I wait for it to get to that particular test)
<chris2>
then probably some earlier tests breaks something
karmatr0n has joined #ruby
moeabdol has quit [Ping timeout: 256 seconds]
TinkerTyper has quit [Quit: ZNC 1.6.2 - http://znc.in]
Shaboum has quit [Quit: WeeChat 1.4]
jas02 has quit [Quit: jas02]
Guest52031 has quit [Quit: leaving]
ljames has joined #ruby
<codehotter>
chris2: any chance I, with my limited gdb experience, can figure out WHAT the futex is waiting on?
<codehotter>
the futex is to wait for another thread, right?
TinkerTyper has joined #ruby
<chris2>
you can run in gdb with gdb --args ruby ...
<codehotter>
but how do you get in the situation where the ruby-timer-thread is stuck in a poll() and the other thread is stuck in a futex?
<chris2>
then start with run
<chris2>
then press C-c on lockup
<chris2>
and look at backtrace with bt
<codehotter>
ah
<chris2>
then you should see which futex is used
<codehotter>
it's in pthread_cond_wait
<codehotter>
according to gdb
<chris2>
and that is called from?
<codehotter>
but the backtrace is all ??
<codehotter>
?? ?? ?? ??
<chris2>
heh
idefine has joined #ruby
zacts has joined #ruby
<chris2>
luckily, pthread_cond_wait is only used once in the code base ;)
<chris2>
... in native_cond_wait. sigh :D
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
UtkarshRay has quit [Remote host closed the connection]
rbennace_ has joined #ruby
<codehotter>
right, but eventually I'm going to backtrace right into ruby code, right?
<codehotter>
I mean I can guess that the first frame on the stack is probably native_cond_wait
<chris2>
well
<chris2>
the last time i did this stuff seriously was with ruby 1.8 :P
mikecmpbll has quit [Ping timeout: 248 seconds]
Abrin has joined #ruby
<chris2>
there you could see the interpreter quite closely
<codehotter>
can GDB show me ruby code?
<codehotter>
why is this all question marks even though it was compiled with -g?
<chris2>
there is a .gdbinit in the source tree
dlitvak has quit [Ping timeout: 250 seconds]
<codehotter>
oh
kent\n has quit [Remote host closed the connection]
<chris2>
perhaps rb_backtrace will work
<chris2>
or rb_ps
rbennacer has quit [Ping timeout: 240 seconds]
<codehotter>
no symbol rb_vm_t in current context
<codehotter>
it also warns me it couldn't load symbols for 124 libraries
idefine has quit [Ping timeout: 260 seconds]
einarj has quit [Read error: Connection reset by peer]
<codehotter>
ok I did set solib-search-path and now it loaded the symbols
<codehotter>
?_?
Kryptonical has joined #ruby
<codehotter>
I didnt' even give an argument, just "set solib-search-path" and it loaded symbols for libruby
<chris2>
heh
einarj has joined #ruby
rbennace_ has quit [Remote host closed the connection]
dlitvak has joined #ruby
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
stardiviner has quit [Ping timeout: 260 seconds]
nekrodesk has joined #ruby
nekrodesk has quit [Max SendQ exceeded]
rbennacer has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
colli5ion has quit []
robbyoconnor has joined #ruby
swills has joined #ruby
dcunit3d has quit [Ping timeout: 264 seconds]
LoneHerm_ has joined #ruby
St1gma has joined #ruby
duckpuppy has quit [Quit: WeeChat 1.4]
duckpuppy has joined #ruby
<atomical>
so I need to pay $950/year for reliable sidekiq jobs, wtf
<atomical>
"If a Sidekiq process crashes while processing a job, that job is lost."
mikee_work has joined #ruby
hs366 has quit [Quit: Leaving]
<atomical>
"Sidekiq uses BRPOP to pop a job off the queue in Redis. This is very efficient and simple but it has one drawback: the job is now removed from Redis. If Sidekiq crashes while processing that job, it is lost forever. This is not a problem for many but some businesses need absolute reliability when processing jobs."
jdelaney has joined #ruby
<apeiros>
your outrage is what? that not everything is free?
<chris2>
if you need absolute reliability, why would you use cloud computing? :P
idefine has quit [Remote host closed the connection]
<yorickpeterse>
apeiros: yeah fuck that guy for trying to earn money with his software
<yorickpeterse>
we should ban currency and the banks and instead simply trade goods again
<yorickpeterse>
or use bitcoin
<ljarvis>
i will defend sidekiq to my death, that software has saved so much money
LoneHerm_ has quit [Ping timeout: 256 seconds]
TinkerTyper has quit [Ping timeout: 256 seconds]
davedev24 has joined #ruby
<Sou|cutter>
really aren't you paying for protection from your own poorly written jobs? (assuming the crash is your fault)
<yorickpeterse>
chris2: Yeah depending on the weather your cloud may be gone
<yorickpeterse>
ᕕ(ᐛ)ᕗ
<apeiros>
it's relatively simple - can you do it for less than 950$/year (by using a different solution or coding yourself)? if so, go that route.
adgtl has quit [Remote host closed the connection]
<yorickpeterse>
Lets do some math
<yorickpeterse>
$950 a year is $0.10 per hour
<Sou|cutter>
950/year is not much to a business
<yorickpeterse>
The average dev costs _way_ more than that
kies^ has joined #ruby
<yorickpeterse>
boom, justified paying for it
<apeiros>
yorickpeterse: 1 day in our company.
<ljarvis>
yeah sounds about right
Xeago has joined #ruby
<chris2>
2 nights when apeiros pays the hotel :P
<yorickpeterse>
apeiros: you work in Austria, your costs are also like 100x higher
<apeiros>
haha
dfinninger has joined #ruby
idefine has joined #ruby
<apeiros>
yorickpeterse: nooo, I'm not in austria.
<ljarvis>
that's a day freelancing
<chris2>
s/pays/books/
<yorickpeterse>
apeiros: wait I thought you were?
<yorickpeterse>
apeiros: are you in Germany insteaD?
* yorickpeterse
runs
<codehotter>
chris2: OK I am looking at a backtrace with full debugging symbols now
<codehotter>
now what
<yorickpeterse>
oh, Switzerland
<yorickpeterse>
close enough
tuelz has joined #ruby
<chris2>
codehotter: so, who calls the pthread_cond_wait?
<codehotter>
the function that goes into native_cond_wait is rb_thread_sleep_forever
<chris2>
ok
<tuelz>
is there a way to include on a subset of a modules methods?
<apeiros>
chris2: not my fault if our contacts fail to reply in a timely manner and I've to book a more expensive hotel :)
<havenwood>
atomical: Sidekiq had a lot of time and love go into it. The author couldn't justify all the time without getting paid, hence the enterprise features aren't free.
<tuelz>
s/on s/only a/
<chris2>
apeiros: i never had free booze on the room again :(
<yorickpeterse>
apeiros: what's the time to reply, 5 minutes?
<yorickpeterse>
Also re the enterprise stuff, we get that all the time with GitLab
<apeiros>
chris2: you are referring to amsterdam, right?
<chris2>
yea
symm- has joined #ruby
<yorickpeterse>
"Well I really like GitLab but EE isn't FOSS so fukit" like what the hell, it's 95% CE which is FOSS
<apeiros>
reminds me that I haven't gone to any conf in a long time :<
selfadhesivefilm has joined #ruby
<chris2>
me neither
<yorickpeterse>
chris2: you don't get anything for free here in .nl
<apeiros>
yorickpeterse: you bet. free whiskeys in our room. 3 bottles even.
<codehotter>
yorickpeterse: the only problem with EE vs CE is when someone in the community wants to work on EE features to go into CE, it's hard for the company to really get behind and support that 100%
<codehotter>
otherwise its a perfect model
<chris2>
codehotter: so what calls sleep then?
<yorickpeterse>
codehotter: not sure if I follow. You mean they add something to CE which then gets moved to EE?
duckpuppy has quit [Quit: WeeChat 1.4]
<atomical>
havenwood: I don't think reliable jobs is an enterprise feature
baweaver has joined #ruby
scepticulous has joined #ruby
decoponio has joined #ruby
duckpuppy has joined #ruby
nofxx has joined #ruby
urtokk has quit [Quit: WeeChat 1.4]
sergey_makagon has quit []
<codehotter>
yorickpeterse: well a FOSS project will generally support someone who wants to add features to it. But an EE vs CE project will not fully support the commmunity in implementing features in CE, if those features are already in EE.
<apeiros>
atomical: it's not as if the non-enterprise version was unreliable.
<yorickpeterse>
codehotter: This doesn't make CE any less FOSS
UtkarshRay has joined #ruby
dfinninger has quit [Remote host closed the connection]
<atomical>
it's unreliable enough to cause a problem
<yorickpeterse>
It's no different than a maintainer saying "We just don't want this"
<apeiros>
atomical: so you use EMP proved servers?
<codehotter>
yorickpeterse: it's not completely different, but there's a difference. overall, the benefits outweigh the drawbacks I would say.
<yorickpeterse>
Pretty much every queue is "unreliable" like this by default
<yorickpeterse>
pop a message off it, now you have to make sure it's either processed or put back in case of an erro
<darix>
codehotter: well people learned the hardware that this can also easily kill the project. see syslog-ng vs rsyslog
<yorickpeterse>
* error
<havenwood>
atomical: You're free to write the feature yourself and tack it on to the free Sidekiq. But... the author has done this for you, cheaper and better than you can do yourself.
saneax is now known as saneax_AFK
<atomical>
all our sidekiq jobs execute business logic. we at least need logging if something fails.
<darix>
yorickpeterse: sidekiq pro has this "we will use a special redis feature to pop the job from 'waiting' to 'processed' queue"
<darix>
then you can move all processed entries back to waiting in case of a restart
<ljarvis>
atomical: these jobs are important but you don't want to pay for them?
<atomical>
"If a Sidekiq process crashes while processing a job, that job is lost."
Couch has quit [Ping timeout: 272 seconds]
kingrs02 has joined #ruby
selfadhesivefilm has quit [Remote host closed the connection]
<havenwood>
atomical: So is it worth $950 a year to your company to have someone else handle this tough problem for you?
selfadhesivefilm has joined #ruby
<havenwood>
atomical: Your call!
<atomical>
It's probably worth it to the open source community.
<darix>
atomical: as i said ... see sidekiq pro vs normal.
dragon9783 has quit [Quit: Connection closed for inactivity]
william3 has joined #ruby
<apeiros>
atomical: then go do it.
dfinninger has joined #ruby
moeabdol has joined #ruby
<yorickpeterse>
This really is something you should worry about when it's actually a problem
Xiti` has quit [Quit: Xiti`]
<atomical>
It's a problem now. That's why I'm talking about it.
<yorickpeterse>
oh no but what happens if the lightning strikes the data centre and a giant whale simultanously eats all the backups??
adgtl has joined #ruby
skweek has joined #ruby
<havenwood>
atomical: Huh? Your company apparently needs this feature and uses Sidekiq. The open source community has a myriad of solutions, one of which is for you to write the code yourself.
TinkerTyper has joined #ruby
<atomical>
I'm objecting to paying for what should be a core feature of this open source software
<atomical>
Charge for support or other unique use cases
<havenwood>
atomical: The open source part of this software simply doesn't have the feature you're wanting. You're free to add it.
<yorickpeterse>
atomical: Your objecting purely based on a personal opinion
<havenwood>
atomical: The author gets to charge. You don't get a say in that.
<yorickpeterse>
others have different opinions
blackmesa has joined #ruby
<yorickpeterse>
The author apparently decided this is "another unique use case"
<yorickpeterse>
Complaining about it here won't get you anywhere
adgtl has quit [Remote host closed the connection]
<atomical>
heh
<havenwood>
atomical: You *do* have the freedom to implement it yourself.
<codehotter>
chris2: I honestly have no clue. I've been looking at this backtrace for a while, it's pages long
kies^ has quit [Ping timeout: 245 seconds]
dayjo has joined #ruby
<atomical>
yorickpeterse: did I say it would?
Gnut has joined #ruby
<atomical>
recurring billing for one feature that is core to a queue
<atomical>
not in the budget
moeabdol1 has joined #ruby
<darix>
atomical: they have the freedom to decide their business model just as you do
SOLDIERz has quit [Ping timeout: 240 seconds]
<darix>
would i love to have that feature in the opensource version
<darix>
sure
adgtl has joined #ruby
<atomical>
do i also have he right to complain about it?
<darix>
but can i see it was a strong selling point for the pro
<darix>
yes
huyderman has quit [Remote host closed the connection]
<darix>
atomical: will it change much
<darix>
probably not
chouhoulis has joined #ruby
<darix>
e.g. i would love to have the ldap group support in gitlab-ce
<darix>
:p
<havenwood>
atomical: You can gripe all you'd like but you can't enslave Mike Perham. That's illegal and morally wrong.
<codehotter>
I'm trying to figure out why this process deadlocks
SCHAAP137 has quit [Remote host closed the connection]
<atomical>
darix: wouldn't make sense for him from a business standpoint because we would release the software as open source and then the pro version would be useless
<codehotter>
one thread goes into 'sleep forever' and the other one goes into 'poll' and neither makes any progress
<darix>
codehotter: see other threads?
pihpah has quit [Ping timeout: 256 seconds]
<codehotter>
darix: the other one is the ruby timer thread, and it's stuck on poll() on fd 3 and fd 5
<darix>
codehotter: you might have some heavy computation running that doesnt free the gil
<codehotter>
that's the only two threads
infra-red has joined #ruby
flughafen_ has joined #ruby
idefine has joined #ruby
<darix>
atomical: well ... you know ... there is that license/contract thing
<darix>
and he will probably put in a clause that you arent allowed to do that
<darix>
:)
<darix>
at least I would
adgtl has joined #ruby
william3 has joined #ruby
lurch_ has quit [Quit: lurch_]
<havenwood>
atomical: Maybe you'd prefer Resque or one of the other background processing tools that don't have paid features: https://github.com/resque/resque#readme
Couch has joined #ruby
nofxx has quit [Read error: Connection timed out]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
adgtl_ has joined #ruby
mark4 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PONG :verne.freenode.net"]
adgtl has quit [Read error: No route to host]
<darix>
havenwood: but do they also have crash resistence?:p
Couch has quit [Max SendQ exceeded]
TinkerTyper has quit [Ping timeout: 256 seconds]
Couch has joined #ruby
<havenwood>
atomical: The folk who do pay for Sidekiq feature presumably appreciate the value they're getting and that these features wouldn't exist for Sidekiq if they weren't paying.
pdoherty has joined #ruby
jottr has quit [Read error: Connection reset by peer]
elifoster has joined #ruby
<havenwood>
darix: Maybe someone will implement it... for pay! :P
<darix>
:D
[Butch] has joined #ruby
damonkelley has joined #ruby
moncky has joined #ruby
kies^ has joined #ruby
<moncky>
hey all, I am having an issue installing the mysql2 gem, I get the following error: : mysql.h is missing. You may need to 'apt-get install libmysqlclient-dev' or 'yum install
<moncky>
I have mysql-community-devel installed, so this should be working right?
carella has quit [Read error: Connection timed out]
lipoqil has quit [Quit: Connection closed for inactivity]
carella has joined #ruby
devFrederick has joined #ruby
dcunit3d has joined #ruby
marxarelli has joined #ruby
<atomical>
we might be willing to pay for one version for $995, but not every year.
<ljarvis>
lol
<ljarvis>
trollol
marxarelli is now known as marxarelli|afk
dalek- has quit [Ping timeout: 245 seconds]
pawnbox has quit [Remote host closed the connection]
<havenwood>
moncky: What distro is that? Seems it can't find the dev package even though you have it installed.
ropeney has joined #ruby
<atomical>
that's kind of how our non-hosted software contracts work
<havenwood>
Okay, moved on from anger to bargaining.
pawnbox has joined #ruby
<darix>
atomical: a feature like that is not ready for $1k one shot
<darix>
especially as you want maintenance probably
<havenwood>
atomical: Write Mike an email and propose your deal.
<atomical>
i'm not bargaining. it's still complaining.
<atomical>
unless you can speak for Mike?
william3 has quit [Remote host closed the connection]
<darix>
atomical: i dont. i just find it amusing
dalek- has joined #ruby
marxarelli|afk is now known as marxarelli
chipotle has quit [Quit: cheerio]
nodejunkie has joined #ruby
symm- has quit [Quit: Leaving...]
kirillzh has joined #ruby
<havenwood>
atomical: The "bargaining" stage of grief rarely if ever has an agent authorized to make deals.
karapetyan has joined #ruby
<moncky>
havenwood: centos 6.7
yardenbar has quit [Ping timeout: 264 seconds]
<atomical>
who died?
<codehotter>
Is it possible for a ruby process to call IO.popen() and the child not ending up in the block but somewhere else in the process entirely?
<atomical>
you guys are so emotional
jtdoncas has joined #ruby
<ljarvis>
?guys
<ruby[bot]>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<atomical>
guys
<codehotter>
IO.popen("-") do |f| -> child ends up in some completely different place in the process
jsvgoncalves has joined #ruby
<jsvgoncalves>
how do I check if a param (key) exists even if it's nil? params.has_key?[:mykey] doesn't seem to work
<ljarvis>
jsvgoncalves: has_key?(:mykey)
<jsvgoncalves>
doesn't work if the key is nil, but yeah I made a typo with [ vs (
<allcentury>
hi all - Has anyone used AWS CloudSearch via the aws-sdk gem? I want to upload batches and thought the client would allow it. http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudSearchDomain/Client.html ; I recognize this is just an http endpoint but thought the client would support this.
adgtl_ has quit [Remote host closed the connection]
<jsvgoncalves>
darix: yep, will do that ;)
kam270 has quit [Ping timeout: 250 seconds]
idefine has quit [Ping timeout: 240 seconds]
kf has quit [Quit: kf]
baweaver has quit [Remote host closed the connection]
<allcentury>
ahhh nvm it's under CloudSearchDomain
mickey_mouse_2 has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
mickey_mouse has quit [Ping timeout: 240 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
Gnut_ has joined #ruby
adgtl has joined #ruby
zdman135_ has joined #ruby
PedramT has joined #ruby
zdman135_ has quit [Remote host closed the connection]
zdman135 has quit [Read error: Connection reset by peer]
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Gnut has quit [Ping timeout: 264 seconds]
zdman135 has joined #ruby
idefine has joined #ruby
benhuda has quit [Ping timeout: 264 seconds]
adgtl_ has joined #ruby
adgtl has quit [Read error: Connection reset by peer]
Snowy has quit []
zdman135 has quit [Remote host closed the connection]
zdman135 has joined #ruby
pandaant has quit [Remote host closed the connection]
lubekpl has joined #ruby
PedramT has quit [Ping timeout: 250 seconds]
mdw has joined #ruby
zdman135_ has joined #ruby
idefine_ has quit [Ping timeout: 240 seconds]
zdman135 has quit [Read error: Connection reset by peer]
<twistedpixels>
question for everyone here: looking for a portable ruby version to use at work (windows), I found allinoneruby but it's on version 1.8 and I'd like something more recent like 2.*, any other recommendations?
<valera>
twistedpixels: cant you go with virtualbox and/or docker-machine ?
<twistedpixels>
valera: as in running a vm just for ruby?
kirillzh has joined #ruby
lewis1711 has quit [Ping timeout: 240 seconds]
<havenwood>
twistedpixels: You want like a Ruby to ship your app with or Ruby to run on your dev machine?
guerrero has joined #ruby
<valera>
twistedpixels: yes, unless you have less than 2gb of ram on your desktop
jgt4 has joined #ruby
TinkerTyper has joined #ruby
<twistedpixels>
havenwood: it's just to run locally for me, programming isn't really my job, but I know ruby so I end up writing tools in it to make my life easier
guerrero has quit [Client Quit]
<darix>
twistedpixels: buy a rasperry pi
<havenwood>
twistedpixels: I think typically Windows folk use the RubyInstaller: http://rubyinstaller.org
guerrero has joined #ruby
SenpaiSilver has joined #ruby
zdman135_ has joined #ruby
guerrero has quit [Client Quit]
<twistedpixels>
I've been sshing into my VPS for a little bit now, but the whole remote part gets kinda annoying
<darix>
twistedpixels: vim + tmux^^
<twistedpixels>
I'll ask if I'm allowed to install ruby, not sure the rules here about installing things on the work computers
dajobat has joined #ruby
zdman135 has quit [Read error: Connection reset by peer]
bhaak has quit [Ping timeout: 250 seconds]
zdman135_ has quit [Read error: Connection reset by peer]
zdman135 has joined #ruby
kirillzh has quit [Ping timeout: 240 seconds]
dayjo has quit [Ping timeout: 240 seconds]
<twistedpixels>
my life would be so much easier if they weren't so windows oriented here
jottr has joined #ruby
James1 is now known as jtperreault
bhaak has joined #ruby
aegis3121 has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
kobain has quit [Ping timeout: 240 seconds]
joonty has quit [Ping timeout: 252 seconds]
finisherr has joined #ruby
mrfoto has joined #ruby
<havenwood>
twistedpixels: If you can install stuff maybe consider Vagrant.
jgt4 has quit [Ping timeout: 240 seconds]
finisherr has quit [Client Quit]
mickey_mouse_2 has quit [Ping timeout: 256 seconds]
tomchapin has joined #ruby
Shaboum has joined #ruby
gambl0re has joined #ruby
gambl0re has joined #ruby
SCHAAP137 has joined #ruby
bhaak has quit [Ping timeout: 250 seconds]
<twistedpixels>
havenwood: ooh, that seems interesting
skweek has quit [Remote host closed the connection]
skweek has joined #ruby
djbkd has joined #ruby
evidex has quit [Remote host closed the connection]
skweek has quit [Remote host closed the connection]
_djbkd has joined #ruby
mickey_mouse_2 has joined #ruby
lubekpl has quit [Ping timeout: 250 seconds]
chthon has quit [Ping timeout: 245 seconds]
infra-re_ has joined #ruby
zdman135 has quit [Read error: Connection reset by peer]
zdman135 has joined #ruby
<codehotter>
chris2: if you're still interested: I added some more memory to the box, and the problem disappeared
dmolina has quit [Quit: Leaving.]
<codehotter>
chris2: now what I want to know is, is it the test suite, that doesn't perform well under memory pressure? Or my build of the interpreter?
pdoherty has quit [Ping timeout: 252 seconds]
<codehotter>
If it starts to behave randomly when memory gets low, that's scary.
infra-red has quit [Ping timeout: 250 seconds]
<codehotter>
if the test suite just starts to behave randomly, that's OK.
TomyWork has quit [Ping timeout: 248 seconds]
<chris2>
codehotter: sounds quite crazy
<chris2>
codehotter: how much ram did you have before?
crowell has quit [Remote host closed the connection]
einarj has quit [Read error: Connection reset by peer]
crowell has joined #ruby
<codehotter>
chris2: 750MB
kirillzh has joined #ruby
zdman135_ has joined #ruby
<codehotter>
I'm recompiling it myself because I wanted to use jmalloc
mlehrer has joined #ruby
<codehotter>
jemalloc
<codehotter>
but not sure if that's a good idea still
dudedudeman has joined #ruby
einarj has joined #ruby
<yorickpeterse>
yeahmalloc
<yorickpeterse>
that's how I pronounce it
krobzaur has joined #ruby
<yorickpeterse>
tbh YEAHmalloc sounds even better
zdman135 has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
zdman135_ has quit [Read error: Connection reset by peer]
zdman135 has joined #ruby
<chris2>
750mb should be plenty!
mrfoto has quit []
JDiPierr_ has quit [Remote host closed the connection]
<codehotter>
chris2: I put it back and can reproduce the problem again, from clean build
mdw has quit [Quit: Sleeping Zzzzz]
<codehotter>
actually I didn't add memory, just created a 1GB swap file.
<codehotter>
if I remove the swap, so now we have 720 MB and no swap space, then I can reproduce the problem again
pihpah has quit [Ping timeout: 276 seconds]
kirillzh has quit [Client Quit]
<codehotter>
Does ruby expect to run with swap space? Swap space makes me afraid, I rather have my server crash (so loadbalancer notice and take it out of rotation) than become very slow
chipotle_ has joined #ruby
krobzaur has quit [Client Quit]
kirillzh has joined #ruby
<chris2>
ruby doesnt care about swap, your os provides it transparently
kirillzh has quit [Max SendQ exceeded]
ESpiney_ has joined #ruby
Coldblackice has joined #ruby
kirillzh has joined #ruby
<codehotter>
well, fork() without swap space is a problem because you need to have 2x the amount of memory your process is currently using
<codehotter>
with swap space, everything is fine, because the extra memory doesn't get used
<chris2>
usually overcommit is used
cschneid_ has joined #ruby
Sucks has quit [Read error: Connection reset by peer]
kent\n has joined #ruby
kent\n has joined #ruby
<codehotter>
I would really like to find out exactly what the problem is here... How will this ruby with jemalloc behave in production, if the test suite deadlocks with 750 MB and works with 750MB + 1GB swap?
<codehotter>
I need to figure out what the cause is here ...
chipotle has quit [Ping timeout: 252 seconds]
ESpiney has quit [Ping timeout: 276 seconds]
<codehotter>
The reason for deadlock seems to be that after IO.popen("-") do |f| ... the child process isn't in the block but completely different function in the process... some random memory corruption?
<codehotter>
that is consistently always the same
<codehotter>
somehow
<codehotter>
Its not random corruption it's deterministic corruption
<chris2>
how much free space do you have when deadlock occurs? free(1)?
<codehotter>
chris2: 300 MB
shadeslayer has quit [Ping timeout: 256 seconds]
<chris2>
and did ruby fork already?
rbennacer has quit [Remote host closed the connection]
ElFerna has joined #ruby
rdark has quit [Ping timeout: 245 seconds]
shadeslayer has joined #ruby
<codehotter>
yes, I see two ruby processes, the parent, patiently waiting for the child pipe to close, and the child which calls sleep (which is part of a completely different test)
Abrin2 is now known as abrin
<chris2>
oO
seitensei has joined #ruby
<chris2>
do the tests run in parallel?
colleen_ has joined #ruby
<codehotter>
I don't think so
<chris2>
how come the old child sticks around then?
<codehotter>
The parent is blocking in f.read, which will return once the child closes the pipe
<codehotter>
the child however has no intention of closing the pipe or exiting, because it is in sleep_forever
<codehotter>
The child is supposed to execute the block, but it ends up in a cmopletely different location instead, where it calls sleep
<chris2>
hm
bhaak has joined #ruby
<chris2>
try running ruby -d
jgpawletko has joined #ruby
speakingcode has quit [Ping timeout: 240 seconds]
<chris2>
hm, i guess requires building with THREAD_DEBUG too
colleen_ has quit [Client Quit]
blackmesa has quit [Ping timeout: 245 seconds]
<codehotter>
I can build with whatever you like, just say the word
<codehotter>
I can't guarantee it will fail in the same way, though. It seems some kind of memory corruption, except that it is deterministic, if built in the same way. I rebuilt ruby 4 times already and can reproduce it each time
<chris2>
i have no idea about that code really :)
benlieb has quit [Ping timeout: 240 seconds]
<chris2>
perhaps try an older ruby first
<codehotter>
It builds in a chroot()
<chris2>
2.2.x or something
<codehotter>
I'm running 2.2.4
<chris2>
oh, ok
<chris2>
try 2.3 ;)
speakingcode has joined #ruby
<codehotter>
I'm building my distribution's package inside mock
<codehotter>
the only think I changed is I added --with-jemalloc
roshanav_ has joined #ruby
<chris2>
so, when you remove that flag it works?
<codehotter>
yes
<chris2>
fun...
<codehotter>
and if I add swap space, it works too
Xeago has quit [Remote host closed the connection]
<codehotter>
I'm sccared that if I try 2.3, it will work too, but only because the memory allocation didn't happen in particular order to trigger the bug
<chris2>
you could build it with and without and compare strace -ff
<chris2>
and then figure out whats different
zdman135 has quit [Remote host closed the connection]
<codehotter>
my preferred solution would be to figure out exactly what is happening incorrectly
<codehotter>
so I can report a bug report get it fixed and be happy
zdman135 has joined #ruby
<codehotter>
cause until then I will always be worried... "OK, it works now, but it can randomly corrupt memory"
<codehotter>
after fork() how does ruby decide which line of ruby code to execute next?
karapetyan has quit [Remote host closed the connection]
<chris2>
it doesnt, fork simply "returns twice"
<chris2>
in two different processes
karapetyan has joined #ruby
<codehotter>
if I can find the memory location in gdb that is different in child and parent after fork() system call...
<codehotter>
maybe I can find the bug
roshanavand has quit [Ping timeout: 276 seconds]
<chris2>
you can set a breakpoint on fork
darkf has joined #ruby
<chris2>
and use gdb
<chris2>
set follow-fork-mode child
amorbix has joined #ruby
<chris2>
then you see where child ends up
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<codehotter>
oh that would be so cool if I can go step by step in the child
<codehotter>
see where it ends up
roshanav_ has quit [Ping timeout: 260 seconds]
Burgestrand has joined #ruby
<chris2>
sure
<codehotter>
but I can only see these stupid vm_exec and insxxxx
<chris2>
just step through it
<codehotter>
not the ruby code or the c code
DoubleMalt has quit [Remote host closed the connection]
<volty>
so? no source to try to reproduce it?
<codehotter>
I have all the debug symbols, I am just ignorant how to step through ruby instead of doing backtace with all the vm_exec
mhoungbo has quit [Quit: Quitte]
adgtl_ is now known as adgtl
adgtl has quit [Changing host]
adgtl has joined #ruby
<volty>
is it a standard ruby version? do/did others have the same problem?
<codehotter>
the source here is just mri ruby itself... compiled with --with-jemalloc and deadlock inside test suite with make check
<codehotter>
2.2.4 is version
UtkarshRay has quit [Ping timeout: 252 seconds]
<codehotter>
volty: problem is, if I add some swap space the problem disappears... it seems to trigger only in specific circumstances
<chris2>
do you see a mention of malloc in backtrace?
zdman135 has joined #ruby
<codehotter>
it only 'deadlocks' because it's actually ruby code that just calls sleep()
<codehotter>
no
<codehotter>
chris2: I made some progress with the backtrace you helped me get earlier today...
[Butch] has quit [Ping timeout: 245 seconds]
<chris2>
you'll need to figure out how you enter that sleep thing
<codehotter>
it's just another test in the same test suite that happens to call sleep (a timeout test)
<codehotter>
its supposed to sleep
<codehotter>
but the problem is it shouldn't be running that test at that moment, it shouldn't be there in the file at all, it should be in the block passed to IO.popen
astrobunny has quit [Read error: Connection reset by peer]
<chris2>
i thought you can reproduce with the small file?
astrobunny has joined #ruby
<codehotter>
no, with the small file it works, no 'lock'
<chris2>
hum
finisherr has joined #ruby
<chris2>
otoh the small file also uses far less memory i guess :)
mdw has joined #ruby
symbol_ has quit [Quit: WeeChat 1.1]
sts has joined #ruby
benlieb has joined #ruby
<sts>
hello. can anyone recommend any gems that provide a good application configuration object? I want default settings, settings from a config file and merge commander-rb invocation with the configuration object.
shock_one has joined #ruby
<codehotter>
chris2: release notes for 4.0.0 say - Fix an OOM-related regression in arena_tcache_fill_small(), which could cause cache corruption on OOM. This regression was present in all releases from 2.2.0 through 3.6.0.
<codehotter>
chris2: maybe I should try with recent jemalloc
yfeldblum has joined #ruby
seitensei has quit [Remote host closed the connection]
[Butch] has joined #ruby
dajobat has quit [Quit: Leaving]
shadoi has joined #ruby
karmatr0n has quit [Ping timeout: 256 seconds]
troulouliou_div2 has quit [Remote host closed the connection]
jud has joined #ruby
zdman135 has quit [Remote host closed the connection]
infra-red has joined #ruby
zdman135 has joined #ruby
<volty>
sts, imho that ocnfig seems too trivial for a gem. You have a hash of settings into an yaml (or else) file, a hash of default, and hash from command options, then you just merge the hashes at your will
joonty has joined #ruby
Shaboum has quit [Quit: WeeChat 1.4]
hamed_r has quit [Quit: Leaving]
infra-re_ has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
Mon_Ouie has joined #ruby
shock_one has quit []
Sucks has joined #ruby
Jardayn has quit [Quit: Leaving]
shock_one has joined #ruby
joonty has quit [Ping timeout: 240 seconds]
Jardayn has joined #ruby
einarj_ has joined #ruby
einarj has quit [Ping timeout: 240 seconds]
zdman135 has quit [Remote host closed the connection]
mauricio has quit [Read error: Connection reset by peer]
zdman135 has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
Shaboum has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
nunchuck has joined #ruby
zdman135_ has joined #ruby
mdw has quit [Ping timeout: 256 seconds]
rakm has joined #ruby
Alayde has joined #ruby
platzhirsch has left #ruby [#ruby]
dlitvak has quit [Remote host closed the connection]
[Butch] has joined #ruby
Alayde has left #ruby [#ruby]
zdman135 has quit [Ping timeout: 260 seconds]
JoshGlzBrk has joined #ruby
dfockler has joined #ruby
zdman135_ has quit [Ping timeout: 245 seconds]
rakm has quit [Ping timeout: 260 seconds]
rakm has joined #ruby
mdw has joined #ruby
<chris2>
codehotter: possible...
JohnBat26 has joined #ruby
zdman135 has joined #ruby
schickung has quit [Quit: schickung]
PedramT has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<procyon_ember>
If my question is unwelcome here, where might be a more appropriate place to ask?
infra-red has quit [Ping timeout: 272 seconds]
<apeiros>
procyon_ember: see topic. #ruby has rules. you can make your own opinion whether those fit MINSWAN
<procyon_ember>
I see. Thanks for the reply.
procyon_ember has left #ruby ["rcirc on GNU Emacs 24.5.1"]
<mg^>
I'm pretty sure we were all sitting there wondering what the endgame for that like of questioning was.
<mg^>
line of, rather
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mg^>
that was a rather appropriate response, though
<Canar>
lol no kidding
devbug has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
kirillzh has joined #ruby
zdman135 has quit [Ping timeout: 245 seconds]
diegoviola has quit [Read error: No route to host]
swivel1983 has joined #ruby
<swivel1983>
hi all
mdw has quit [Quit: Sleeping Zzzzz]
zdman135 has joined #ruby
jmdade has joined #ruby
firstdayonthejob has joined #ruby
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
Joel has left #ruby ["Leaving"]
seitensei has quit [Remote host closed the connection]
dalek- has quit [Ping timeout: 245 seconds]
<shevy>
mg^ dunno, I could not check in time but I assume that procyon_ember was one of those zero-stay webchatters, some questions seem to be randomly collected from reddit or stackoverflow
al2o3-cr has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
flughafen_ has quit [Ping timeout: 240 seconds]
firstdayonthejob has quit [Ping timeout: 272 seconds]
Bloomer has quit [Remote host closed the connection]
<manveru>
Ox0dea: i mean the neko programming language... didn't you get my memo?
tomchapin has joined #ruby
<manveru>
that's awfully tasty
idefine has quit [Remote host closed the connection]
blackgoat has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
<Ox0dea>
What, memorandi?
blandflakes has joined #ruby
blt has joined #ruby
idefine has joined #ruby
<manveru>
illumemo
x77686d has quit [Quit: x77686d]
crowell has quit [Ping timeout: 248 seconds]
blandflakes has quit [Client Quit]
tildes has joined #ruby
Conflict has joined #ruby
blandflakes has joined #ruby
lubekpl has joined #ruby
crowell has joined #ruby
crowell has quit [Changing host]
crowell has joined #ruby
dfinninger has quit [Remote host closed the connection]
d10n-work has joined #ruby
jds has joined #ruby
dfinninger has joined #ruby
dmitch has joined #ruby
tildes has quit [Ping timeout: 245 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
dionysus69 has quit [Ping timeout: 245 seconds]
idefine has quit [Remote host closed the connection]
Mon_Ouie has quit [Quit: WeeChat 1.3]
dcunit3d has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 245 seconds]
jgt4 has quit [Ping timeout: 250 seconds]
devbug has quit [Ping timeout: 260 seconds]
zdman135 has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
zdman135 has joined #ruby
symm- has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
kenpoint has quit []
mhoungbo has joined #ruby
Alak has joined #ruby
kobain has quit [Ping timeout: 240 seconds]
benlieb has quit [Quit: benlieb]
diegoviola has joined #ruby
dalek- has quit [Ping timeout: 245 seconds]
ltp has quit [Quit: leaving]
alexherbo2 has quit [Quit: WeeChat 1.4]
tvw has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
jud has quit [Ping timeout: 260 seconds]
chipotle has quit [Quit: cheerio]
benlieb has joined #ruby
ltp has joined #ruby
swills has quit [Remote host closed the connection]
<chris2>
i've never seen that in germany
<chris2>
will get one when i get to augsburg again
dlitvak has joined #ruby
dlitvak has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
dlitvak has joined #ruby
DmitryBochkarev has joined #ruby
nfk has joined #ruby
rodfersou has joined #ruby
ElFerna has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
lemur has joined #ruby
davedev24 has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DmitryBochkarev has quit [Client Quit]
davedev24 has joined #ruby
johnmilton has quit [Quit: Namaste]
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dalek- has joined #ruby
andrewvos has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
dexter-tzu has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 256 seconds]
aphprentice_ has joined #ruby
<andrewvos>
Heya, I'm working on a web app that allows users to input markdown and it gets rendered on the main site. At the moment I'm trying to allow users to render some active record objects in their own custom format, with markdown. I've looked at rendering the content twice, using liquid first and then processing it with markdown afterwards, but it's a bit gross and liquid has way to many features. I kind of want
<andrewvos>
something like mustache+markdown but mustache allows arbitrary code execution. Any ideas? At the moment I'm thinking add some sort of loop syntax to markdown before processing it with markdown gem. Seems like a lot of work though, and there's probably something easier I've overlooked?
zdman135_ has joined #ruby
kobain has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
dfinninger has quit [Remote host closed the connection]
dfinninger has joined #ruby
zdman135 has quit [Ping timeout: 240 seconds]
<mg^>
andrewvos: you could always use redcarpet and write a custom renderer
Synthead has joined #ruby
<andrewvos>
mg^: Yeah, but then it's gonna get real tricky... to support nested loops for example
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dexter-tzu has joined #ruby
blackmesa has joined #ruby
selfadhesivefilm has quit [Remote host closed the connection]
<volty>
enlighten the trolls. what about a gem that detects trolls ? «a gem that writes gems?» «a gem that buys icecream?» «a gem that can parse my name correctly?» enough for a partial classifying of trolls ? :)
toretore has joined #ruby
<volty>
andrewvos: you aren't nigger, are you ? :)
<Ox0dea>
...
<andrewvos>
sigh
ss_much has joined #ruby
hawaiideveloper has joined #ruby
dexter-tzu has quit [Ping timeout: 240 seconds]
B1n4r10 has quit [Ping timeout: 240 seconds]
<andrewvos>
wtf why can't I get into ruby-lang?
<andrewvos>
must be invited?
<centrx>
andrewvos, The channels were merged
mary5030 has quit [Remote host closed the connection]
<andrewvos>
for real?
<andrewvos>
that argument finally ended?
<hawaiideveloper>
Hello
<adaedra>
months ago?
<centrx>
it's virtual, but it's real
<adaedra>
hawaiideveloper: Aloa?
<havenwood>
andrewvos: Hey!
<havenwood>
hawaiideveloper: hi
<andrewvos>
havenwood: hey :)
<adaedra>
I may just have made a linguistic faux-pas
<havenwood>
adaedra: Aloha Ke Akua
<adaedra>
I did.
decoponyo has joined #ruby
* adaedra
hides
<centrx>
Now you're in it
carella_ has joined #ruby
<adaedra>
Merde.
<andrewvos>
so ruby-lang is closed or?
<havenwood>
andrewvos: Yup, totally merged to here!
hawaiideveloper has quit [Remote host closed the connection]
<adaedra>
It's #ruby and only #ruby now
<andrewvos>
were the ops merged?
<centrx>
It's a Freenode peculiarity that says a channel is invite only
<volty>
I need advice / considerations. Is sequel really worth learning / breaking in ? Especially for gui app?
<havenwood>
andrewvos: yup
processid_ has joined #ruby
<andrewvos>
hah wow
<havenwood>
volty: The Sequel gem is great.
<adaedra>
volty: no link with GUIs. Sequel itself is an awesome thing.
<centrx>
volty, If you're using a database, you'll want to use a SQL library or ORM of some kind
sami_ has joined #ruby
blandflakes has joined #ruby
<volty>
centrx: I arrived at that, long time ago, thx :)
BraddPit1 has joined #ruby
ELLIOTTCABLE_ has joined #ruby
antgel has joined #ruby
artmann_ has joined #ruby
y2mq37 has joined #ruby
creat has joined #ruby
<volty>
I wonder what / how much (time or else) sequel could save me. Today I was wondering what I gain from using sequel simple (without active-like stuff).
ruby-lang553 has joined #ruby
celly has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
Xeago_ has joined #ruby
gigetoo_ has joined #ruby
<andrewvos>
someone write a parser for me
<andrewvos>
I'll give you a tenner
tjohnson_ has joined #ruby
Cohedrin_ has joined #ruby
SilentEc1 has joined #ruby
pmarreck_ has joined #ruby
<ruby-lang553>
does anyone know of a good irc client I can build with ruby?
<volty>
Or take me away, in case I need something isn't there. To put it simple: what is the diff between plain sql and ruby-like methods if you just need to relate db's
grill has joined #ruby
edwardly_ has joined #ruby
edwardly_ has joined #ruby
edwardly_ has quit [Max SendQ exceeded]
processid has quit [Ping timeout: 240 seconds]
ELLIOTTCABLE has quit [Ping timeout: 240 seconds]
gambl0re has quit [Ping timeout: 240 seconds]
devFrederick has quit [Ping timeout: 240 seconds]
sami has quit [Ping timeout: 240 seconds]
bodgix has quit [Ping timeout: 240 seconds]
glowcoil has quit [Ping timeout: 240 seconds]
ponga has quit [Ping timeout: 240 seconds]
BraddPitt has quit [Ping timeout: 240 seconds]
creat_ has quit [Ping timeout: 240 seconds]
carella has quit [Ping timeout: 240 seconds]
arthropododo has quit [Ping timeout: 240 seconds]
shevy has quit [Ping timeout: 240 seconds]
SilentEcho has quit [Ping timeout: 240 seconds]
RushPL has quit [Ping timeout: 240 seconds]
artmann has quit [Ping timeout: 240 seconds]
decoponio has quit [Ping timeout: 240 seconds]
jsvgoncalves has quit [Ping timeout: 240 seconds]
mic_e has quit [Ping timeout: 240 seconds]
crayfishx_ has quit [Ping timeout: 240 seconds]
prefix has quit [Ping timeout: 240 seconds]
whippythellama has quit [Ping timeout: 240 seconds]
pookie_ has quit [Ping timeout: 240 seconds]
tjohnson has quit [Ping timeout: 240 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
aspiers has quit [Ping timeout: 240 seconds]
pmarreck has quit [Ping timeout: 240 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Ping timeout: 240 seconds]
olspookishmagus has joined #ruby
nunchuck has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 240 seconds]
crayfishx has joined #ruby
bodgix has joined #ruby
edwardly has quit [Ping timeout: 240 seconds]
shevy has joined #ruby
gigetoo_ is now known as gigetoo
s00pcan_ has joined #ruby
processid_ is now known as processid
<eam>
andrewvos: use something like treetop?
al2o3-cr has joined #ruby
olspookishmagus is now known as Guest52060
arthropododo has joined #ruby
Burgestrand has joined #ruby
<andrewvos>
eam: I suppose I could
edwardly has joined #ruby
edwardly has joined #ruby
whippythellama has joined #ruby
<eam>
if you're trying to extract well formed balanced labels it's pretty easy to just write
<andrewvos>
but I really want to parse just simple stuff
tjohnson_ is now known as tjohnson
<havenwood>
require 'parslet'; include Parslet; str('andrewvos').parse('andrewvos')
nunchuck has joined #ruby
gambl0re has joined #ruby
ponga has joined #ruby
<andrewvos>
havenwood: is parslet pure ruby? Am I gonna have troubles getting it running on heroku?
<andrewvos>
sweet I suppose I need to do some learning then :)
<andrewvos>
I'm getting nowhere with this loop
<Ox0dea>
Does Heroku balk at C extensions?
skweek has quit [Ping timeout: 250 seconds]
<andrewvos>
Ox0dea: not really no... I'm just negative proably
<andrewvos>
probably*
<Ox0dea>
Well, stop that.
jsvgoncalves has joined #ruby
chipotle has quit [Quit: cheerio]
<andrewvos>
k
<eam>
abs() that 'tude, dude
<Ox0dea>
<3
ElFerna has quit [Ping timeout: 240 seconds]
<Ox0dea>
Or -@ it.
roshanavand has joined #ruby
<eam>
but what if you're already positive
casadei has quit [Remote host closed the connection]
guacamole has joined #ruby
<Ox0dea>
We've established the antecedent.
jgt4 has quit [Ping timeout: 256 seconds]
roshanavand has quit [Remote host closed the connection]
<eam>
"probably"
<havenwood>
andrewvos: I've heard neg recommended before (since treetop, citrus and parslet have already been mentioned): https://github.com/jmettraux/neg
spider-mario has quit [Remote host closed the connection]
william3 has joined #ruby
joonty has quit [Ping timeout: 250 seconds]
sarbs has joined #ruby
<volty>
infinite? isn't a predicate
colleen_ has joined #ruby
<sarbs>
is there a way i can halt an in-process ruby script and dump its call stack, similar to jstack?
colleen_ has quit [Client Quit]
<sarbs>
s/halt/pause/
hawaiide_ has quit [Client Quit]
<adaedra>
sarbs: use pry!
guacamol1 has joined #ruby
jmdade has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
?pry
<ruby[bot]>
Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.
<shevy>
send segfaults to it!
Guest52060 is now known as olspookishmagus
wilbert has joined #ruby
<ruby[bot]>
org/ or get it now with: gem install pry pry-doc
celly has quit [Remote host closed the connection]
decoponyo has quit [Quit: Leaving...]
sepp2k has quit [Quit: Leaving.]
blackmesa has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
davedev24 has joined #ruby
zeroDivisible has joined #ruby
amoeba has joined #ruby
zenlot1 has joined #ruby
<Ox0dea>
volty: Pardon?
zenlot has quit [Ping timeout: 252 seconds]
sarbs has quit [Max SendQ exceeded]
flughafen has joined #ruby
jgt4 has joined #ruby
sarbs has joined #ruby
haylon has quit [Quit: WeeChat 1.3]
Eising_ is now known as Eising
<Ox0dea>
Asking some number whether it's Infinity is certainly predicative, but #infinite? returns -1, nil, or +1, and I can't argue against greater information density.
baweaver has joined #ruby
<sarbs>
so, i'm not seeing a way to have pry attach to an existing process.. it looks like it's more of a "start this script and THEN inspect it" type thing.. is that accurate?
<sarbs>
i did come across "ruby hijack" which is looking promising, if anyone's heard of that
marsjaninzmarsa has quit [Ping timeout: 240 seconds]
<volty>
Ox0dea: I do agree with you that all methods that finish with ? should return a boolean. I would have called it infinity_tension, returning -1, 0, 1
<shevy>
sarbs lol what a strange name
<shevy>
"Today in the news: ruby hijacks rubocop!"
<eam>
:"<infinity>"
chipotle has joined #ruby
<sarbs>
i think it's called hijack because it can insert itself into, and thus hijack, a running process
<epitron>
sarbs: you have to use pry-remote at the moment. it's possible to hijack in theory though
<epitron>
*pryjack :)
kriskropd_ has quit [Quit: WeeChat 0.4.2]
<sarbs>
oop, hijack looks like it got me in
kriskropd has joined #ruby
Freeaqingme has joined #ruby
<adaedra>
Hi, Jack.
baweaver has quit [Ping timeout: 250 seconds]
<sarbs>
i'll experiment with pry too tho, that looks cool
<adaedra>
It is!
<adaedra>
There's pry-byebug for step-by-step and other debugger things
LoneHermit has quit [Remote host closed the connection]
kam270 has joined #ruby
<adaedra>
pry.
<adaedra>
But if you really want to get out the big guns and need it to be graphical, take a look at RubyMine.
Alak has quit [Quit: Leaving.]
<mg^>
I use RubyMine for heavy work projects, for other stuff I use a regular text editor and pry
ICantCook has joined #ruby
malconis_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ICantCook has quit [Read error: Connection reset by peer]
<massimo>
mg^: thanks
<massimo>
adaedra: thanks
Spami has quit [Quit: This computer has gone to sleep]
floror has quit [Quit: floror]
sepp2k has joined #ruby
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Shaboum has quit [Quit: WeeChat 1.4]
symbol has joined #ruby
ICantCook has joined #ruby
johnny56_ has joined #ruby
azure32 has joined #ruby
_djbkd has quit [Remote host closed the connection]
trinaldi has quit [Ping timeout: 240 seconds]
johnny56 has quit [Ping timeout: 264 seconds]
kies^ has quit [Ping timeout: 256 seconds]
vF3hNGxc47h8 has joined #ruby
dfockler has joined #ruby
huub_ has quit [Quit: Konversation terminated!]
floror has joined #ruby
ixti has joined #ruby
ICantCook has quit [Ping timeout: 260 seconds]
ICantCook has joined #ruby
devbug has joined #ruby
<manveru>
damn, that site was old when i learned ruby...
andrewvos has quit [Quit: WeeChat 0.4.2]
<manveru>
now it's ancient history
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dasher00 has joined #ruby
<manveru>
and yet ruby hasn't changed much when it comes to first learning it :)
waka has quit [Remote host closed the connection]
tvw has joined #ruby
RegulationD has quit [Remote host closed the connection]
<dfockler>
After a while languages just become heaps of details
spider-mario has quit [Remote host closed the connection]
<manveru>
i just categorize them by semicolons now
trinaldi has joined #ruby
<dfockler>
haha
zdman135 has quit [Ping timeout: 272 seconds]
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<manveru>
if a language has semicolons, i assume the designer must be either maso or sadist :P
<manveru>
or tried to copy C, which never ends well
IamJoe has joined #ruby
<volty>
looking screenshots to me rubymine seems overbloated
<manveru>
welcome to the world of IDEs
william3 has quit [Remote host closed the connection]
carella has joined #ruby
<volty>
ide isn't a synonym for a chaos of icons :)
william3 has joined #ruby
karapetyan has joined #ruby
carella_ has quit [Read error: Connection reset by peer]
TomyLobo has quit [Ping timeout: 250 seconds]
<dfockler>
it really depends what your definition of integration is
chouhoulis has joined #ruby
<IamJoe>
Hi there, quick question. I have a class (class A) that loads a bunch of other classes (class B). Is there a way class B can access a class A instance variable without having to pass it while initializing class B?
<manveru>
IamJoe: does B have a reference to A?
<IamJoe>
no - it's just loaded in as a method in class A
<volty>
my idea of integration is about usefulness
<manveru>
so... which instance of A do you want to have the variable from?
<IamJoe>
like def b; B.new; end
chipotle has quit [Ping timeout: 272 seconds]
<manveru>
well, it's possible, just very bad
<IamJoe>
better to pass in while initializing?
<manveru>
yes
<manveru>
unless you have a very important reason not to :)
joonty has joined #ruby
<IamJoe>
not really
<IamJoe>
:D
<IamJoe>
out of interest
<IamJoe>
what would the method be?
<manveru>
you could use the binding_of_caller gem
<volty>
class A; class B; .... ; end; end; ?
william3 has quit [Ping timeout: 250 seconds]
<IamJoe>
ah yeah, came across that in the google search
karapetyan has quit [Ping timeout: 240 seconds]
<manveru>
another way would be like this
<IamJoe>
class A; def b; B.new; end ;end
<toretore>
IamJoe: do you have some code you can gist?
<dfockler>
volty: usefulness is pretty nebulous too, A Ruby IDE would really be useful for a huge codebase
arbys has joined #ruby
<dfockler>
otherwise it's probably overkill
<IamJoe>
It's basically a facade that loads a bunch of presenters. Just don't want to pass current_user into every new presenter
<IamJoe>
unless of course it's the right thing to do :D
astrobunny has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
shock_one has joined #ruby
<toretore>
IamJoe: it is absolutely the right thing to do
ocbtec has quit [Quit: leaving]
zeroDivisible has quit [Quit: WeeChat 1.3]
kirillzh has joined #ruby
<IamJoe>
cool - thanks, that's what I'm doing at the moment - was just wondering if there was another way
joonty has quit [Ping timeout: 240 seconds]
<IamJoe>
thank you very much for the help! :D
symm- has quit [Ping timeout: 272 seconds]
<volty>
dfockler: right, should be a long talk. I'll ask around what rubyists would like to have (apart graphical pry & common sense library indexing handling, searching etc etc)
<manveru>
>> class B; end; class A < Struct.new(:bar); def foo; this = self; B.new.tap{|b| b.define_singleton_method(:bar){ this.bar }}; end; end; A.new(42).foo.bar