cocalero has quit [Quit: Going offline, see ya! (www.adiirc.com)]
taiju has joined #ruby
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp- is now known as Sankalp
jpn has joined #ruby
aeris has quit [Remote host closed the connection]
jpn has quit [Ping timeout: 240 seconds]
nirvdrum has joined #ruby
aeris has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
Rounin has quit [Ping timeout: 244 seconds]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
nirvdrum has joined #ruby
jl- has quit [Ping timeout: 268 seconds]
John_Ivan has quit [Ping timeout: 260 seconds]
<tweaks>
i am considering upgrading a rails app from 4.2 to the latest and greatest. wondering which approach will be better: 1. go in order one at a time, 4.2->5, 5->6 etc. or 2. start with an empty rails7 project and paste code in and fix errors while referencing release docs.
arg_ has joined #ruby
<tweaks>
or just continue patch 4.2 for eternity :)
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
szkl has joined #ruby
<weaksauce>
tweaks you could try them both but start with the rails 7 and see how far off you are
<weaksauce>
probably easier to just do it incrementally and heed the deprecation warnings
caleb has quit [Remote host closed the connection]
tsujp has quit [Remote host closed the connection]
patrick has quit [Remote host closed the connection]
alexisg has quit [Remote host closed the connection]
graemefawcett has quit [Remote host closed the connection]
g_sg has quit [Write error: Broken pipe]
hwrd has quit [Remote host closed the connection]
matta has quit [Remote host closed the connection]
srushe has quit [Write error: Broken pipe]
Bounga has quit [Write error: Broken pipe]
KOTP has quit [Remote host closed the connection]
rwaweber has quit [Remote host closed the connection]
patrick has joined #ruby
graemefawcett has joined #ruby
Bounga has joined #ruby
srushe has joined #ruby
KOTP has joined #ruby
matta has joined #ruby
rwaweber has joined #ruby
alexisg has joined #ruby
hwrd has joined #ruby
tsujp has joined #ruby
caleb has joined #ruby
g_sg has joined #ruby
typeof[panda] has quit [Quit: Client closed]
Laplace has quit [Quit: Connection closed for inactivity]
Na_Klar has joined #ruby
<Na_Klar>
I have a function foo() which is loaded in the main script. The main script forkes a Thread.new() and within this thread foo() is called. My question is: will foo() run in the child or parent thread?
<Zerock>
child
<Na_Klar>
so if foo() sleeps for 10 sec. the child thread will be halted for 10 sec. but not the main thread?
<Zerock>
correct
<Na_Klar>
ok
<Na_Klar>
thx
<Zerock>
you could always test
<Na_Klar>
sure, just to be sure.
<Na_Klar>
(sometimes you misconcept things in your head)
<Zerock>
but it would make no sense if function call threads depended on when they were defined
<Zerock>
it matters when the call is made
<Na_Klar>
that was what I would have expected. I just have a weird issue in my script which looks like the child wouldn't halt on the function. but that must be a misinterpretation.
<Zerock>
I had a race condition recently because of a scoping problem. In the main thread, the value of a variable changed before the child thread got to read from that variable, so it caused some weird behavior
<Zerock>
I fixed it by moving the thread fork into another function, so that the scope of that variable name was limited to the new thread, and the main thread was free to redefine it
<Na_Klar>
I see. In my case the child writes text to the console and for debuggin purpose I slowed down the child, but the text is already there before the child writes it (again) .. very strange
<Zerock>
can I see this part of your code? maybe there's something you're not seeing
<Na_Klar>
puh, let's see .. maybe I could collect the relevant parts. it's quite spreaded code. wait a moment ..
<Zerock>
my guess is you are somehow inadvertently calling the function twice
<Na_Klar>
that's possible, indeed
jl- has joined #ruby
<Na_Klar>
hehe, funny, while assembling the relevant parts for you, Zerock, I found the error.
<Na_Klar>
if I then slow down refresh() the input is stil written to the screen and then slowly overwritten by refresh() .. very strange
<Zerock>
so which line is your debug line?
<Na_Klar>
it's just sleep(1) in the refresh() def
<Zerock>
so refresh is what's running twice?
<Na_Klar>
the user inputs e.g. "asdf" quickly. my expected behavior would be "a" one sec "as" one sec "asd" etc. .. but there is the "asdf" seen instantly, and then the cursor runs slowly over it an writes a s d f again.
ur5us has quit [Ping timeout: 272 seconds]
<Na_Klar>
ahhh ..
<Na_Klar>
omg
<Na_Klar>
that terminal behaves differently, than the one I developed the script at. On my development terminal ioc.getch would block the terminal from showing the input "on itself". on that production terminal it shows the input nevertheless .. that I didn't expect :S
<Zerock>
that'll do it
<Na_Klar>
or no .. no, you were right Zerock. Somehow that refresh() method must be called twice ..
<Zerock>
Na_Klar: try raising an exception in refresh() and look at the traceback
<Na_Klar>
ah, that's an idea
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
thefuture__ has quit [Quit: Leaving]
<Na_Klar>
Okay, the terminal is defintely acting weird. It seems to me like when it's input isn't processed within a timeout or something, it decides to just write the input to the output .. very weird. I counter checked with the development terminal, and that does never show this behavior.
<Zerock>
annoying
<adam12>
Has anybody delayed Array style pattern matching? I'd like to make a custom assertion but I can't seem to delay the Array style matcher correctly.