aighearach_ has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
<D_A_N_>
it resides in the browser, it's unable to manipulate the file system, cannot render a desktop gui, perform database queries, is easily viewable by the end user just pressing ctrl + u
<D_A_N_>
a server-side language, (as the name entails) is executed by the server
some14u has joined #ruby
<D_A_N_>
google's Chrome V8 engine allows javascript to be executed by the server but that's Node
some14u has quit [Ping timeout: 264 seconds]
grokify has joined #ruby
tirnanog has quit [Quit: = ""]
grokify has quit [Ping timeout: 265 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
Linux_Kerio has joined #ruby
Guest9979 has joined #ruby
Guest9979 has quit [Client Quit]
white_magic has joined #ruby
grokify has joined #ruby
grokify_ has joined #ruby
grokify has quit [Read error: Connection reset by peer]
grokify_ has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp- is now known as Sankalp
mahlon has quit [Remote host closed the connection]
crax23 has joined #ruby
finsternis has quit [Read error: Connection reset by peer]
Y05hito__ has quit [Ping timeout: 256 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 265 seconds]
Y05hito__ has joined #ruby
rx has joined #ruby
crax23 has quit [Ping timeout: 264 seconds]
reset has quit [Quit: reset]
cartdrige has joined #ruby
white_magic has quit [Quit: Client closed]
Y05hito__ has quit [Ping timeout: 265 seconds]
crax23 has joined #ruby
Y05hito__ has joined #ruby
cartdrige has quit [Ping timeout: 268 seconds]
Guest74 has joined #ruby
crax23 has quit [Ping timeout: 265 seconds]
lutrinus has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
walez has joined #ruby
walez has quit [Client Quit]
aeris has quit [Ping timeout: 255 seconds]
aeris has joined #ruby
crax23 has joined #ruby
otisolsen70 has joined #ruby
Y05hito__ has quit [Ping timeout: 260 seconds]
Aminda has quit [Remote host closed the connection]
crax23 has quit [Ping timeout: 265 seconds]
Aminda has joined #ruby
grokify has joined #ruby
teclator has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
cryptkeeper has quit [Quit: Connection closed for inactivity]
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
cryptkeeper has joined #ruby
teclator has quit [Ping timeout: 260 seconds]
teclator has joined #ruby
Linux_Kerio has quit [Ping timeout: 264 seconds]
Linux_Kerio has joined #ruby
D_A_N_ has quit [Quit: leaving]
Linux_Kerio has quit [Client Quit]
Linux_Kerio has joined #ruby
Rounin has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
Linux_Kerio has quit [Ping timeout: 265 seconds]
grokify has quit [Ping timeout: 265 seconds]
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
Linux_Kerio has joined #ruby
Guest7368 has joined #ruby
_aeris_ has joined #ruby
<Guest7368>
Hello Team, may I know the meaning of below line, I am writing unit tests using existing code as reference, I want to understand below line.
<ox1eef_>
Guest7368: That line of code sets up an expectation (assertion) that 'get_url' with be called on '@subject', with two arguments: @client, @db, and a block that returns @uri. The expecation is expected to be met by code that's run after it.
Guest74 has quit [Quit: Client closed]
<ox1eef_>
I'm not too sure about the block part, though. I never seen it used in the real world. Apart from that, I think the above is accurate description of that line.
<Guest7368>
ox1eef_, Thank you its clean now, I am able to connect the dots, BTW can you refer me any resources please to understand Rspec syntax better ?
<Guest7368>
ox1eef_, Thank you. it's clear now. I am able to connect the dots, BTW can you refer me to any resources please to understand Rspec syntax better?
<ox1eef_>
https://relishapp.com/rspec .. it might help. i have found practice to be the best teacher when it comes to rspec.
grokify has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
kinduff has quit [Remote host closed the connection]
<Guest7368>
Thank you ox1eef_
kinduff has joined #ruby
Guest7368 has quit [Quit: Client closed]
___nick___ has joined #ruby
hightower3 has quit [Ping timeout: 265 seconds]
grokify has joined #ruby
aeris has quit [Remote host closed the connection]
grokify has quit [Ping timeout: 260 seconds]
aeris has joined #ruby
some14u has joined #ruby
cartdrige has joined #ruby
dionysus69 has joined #ruby
grokify has joined #ruby
cryptkeeper has quit [Quit: Connection closed for inactivity]
grokify has quit [Ping timeout: 260 seconds]
markong has joined #ruby
weaksauce has joined #ruby
grokify has joined #ruby
weaksauc_ has quit [Ping timeout: 260 seconds]
grokify has quit [Ping timeout: 265 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
otisolsen70 has quit [Quit: Leaving]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
dionysus70 is now known as dionysus69
grokify has joined #ruby
cartdrige has quit [Ping timeout: 268 seconds]
grokify has quit [Ping timeout: 260 seconds]
TomyWork has joined #ruby
cartdrige has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 265 seconds]
markong has quit [Read error: Connection reset by peer]
<ruby[bot]>
yourfriend: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<yourfriend>
alright I was guessing that people won't like pastebin
<yourfriend>
io::buffer is so enticing.. I'm thinking of switching away from it however because of this, and I'm not even sure if will work if I switch away from it
dionysus69 has quit [Ping timeout: 264 seconds]
lutrinus has quit [Ping timeout: 264 seconds]
<adam12>
yourfriend: If you can make a reproducable example, it might be worth tagging Samuel (ioquatix)
<yourfriend>
reproducable memory leak?
<adam12>
yourfriend: Yes.
rx has quit [Ping timeout: 268 seconds]
Laplace has quit [Quit: Connection closed for inactivity]
kinduff has quit [Remote host closed the connection]
kinduff has joined #ruby
tirnanog has joined #ruby
grokify has joined #ruby
kinduff has quit [Remote host closed the connection]
desnudopenguino has joined #ruby
kinduff has joined #ruby
grokify has quit [Remote host closed the connection]
kinduff has quit [Remote host closed the connection]
kinduff has joined #ruby
polishdub has quit [Quit: leaving]
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Ping timeout: 265 seconds]
<yourfriend>
adam12: is it bad that this is happening that?
<yourfriend>
that it's not kicking in yet
<adam12>
yourfriend: Nah. GC is expensive so it's not normal to be called frequently.
<yourfriend>
so this isn't a memory leak then?
<adam12>
yourfriend: I'd graph it running for a long time. If it's saw-like, when the GC kicks in, then there is no leak.
<yourfriend>
what do you mean by saw-like?
<adam12>
yourfriend: Increases gradually, then GC kicks in, so it drops a bunch, then increases back up again.
<adam12>
So it's like saw-tooth patterend.
<yourfriend>
Right now it looks more like it's constantly growing a lot, and then GC drops it entierly
<adam12>
Every buffer object is an allocation, so that does make sense.
polishdub has joined #ruby
zoknert has joined #ruby
<yourfriend>
cool! learnt something about ruby today
<yourfriend>
originally I was researching why my stuff memory leaked
<yourfriend>
because I was getting weird and obscure GC errors
_73 has joined #ruby
Guest8222 is now known as gr33n7007h
moldorcoder7 has quit [Ping timeout: 264 seconds]
moldorcoder7 has joined #ruby
cryptkeeper has joined #ruby
some14u has joined #ruby
Linux_Kerio has joined #ruby
Vonter_ has quit [Quit: WeeChat 3.7.1]
_ht has joined #ruby
cartdrige has joined #ruby
FullMetalStacker has quit [Read error: Connection reset by peer]
grokify has joined #ruby
zoknert has quit [Ping timeout: 260 seconds]
grokify has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
dionysus69 has joined #ruby
grokify has quit [Ping timeout: 256 seconds]
hightower3 has quit [Remote host closed the connection]
___nick___ has quit [Ping timeout: 264 seconds]
grokify has joined #ruby
_ht has quit [Quit: _ht]
grokify has quit [Ping timeout: 256 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 256 seconds]
Linux_Kerio has quit [Ping timeout: 265 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
idkwtf has quit [Quit: Lost terminal]
sagax has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 264 seconds]
dionysus69 has joined #ruby
hightower2 has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
<isene>
Using STDIN.getch, how do I disregard control character inputs (like C-L, PgUP etc?
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
<ox1eef_>
isene: do you know what you can accept ? it is probably easier to use an allow list.
<isene>
ox1eef_: How? (I would accept a-zA-z0-9\" )
<isene>
Or actually any single word character
<ox1eef_>
something like:
<ox1eef_>
def getch
<ox1eef_>
c = STDIN.getch
<ox1eef_>
getch unless c =~ /[a-zA-Z]+/
<ox1eef_>
end
<ox1eef_>
prayer time. bbiab.
<ox1eef_>
oh it's one character. probably don't need a regexp at all but an array of what's allowed, then 'getch unless allowed.include?(c)'
<ox1eef_>
you will also probably want to return c just below the 'unless', then you can call that method, and be sure when it finally exits that you have something in 'allwed'.
<isene>
Problem seems to be that PgUP or other control character sequence leaves several characters in STDIN. How do I get rid of those? STDIN.flush or STDIN.iflush doesnæt clear those
<ox1eef_>
How do I reproduce that?
<ox1eef_>
I guess that could happen if more than one byte is written to STDIN by pgup
<isene>
in irb;
<isene>
a = STDIN.getch
<isene>
then press C-LEFT
<isene>
then do a = STDIN.getch again to see remaining chars to flush
<isene>
then do another a = STDIN.getch
<isene>
again press C-LEFT
<ox1eef_>
ctrl-left is a no-op for me. still though, with a recursive method, it would empty stdin until it is something in the allowed list.
<isene>
do STDIN.iflush
<ox1eef_>
the getch method above, under those circumstances, would call itself however many times until something 'allowed' is returned from stdin.
<isene>
OK, trying
<ox1eef_>
i will be back in 15min or so
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<isene>
ox1eef_: That recursive function either returns nil or waits indefinitely...