nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
clemens3 has quit [Ping timeout: 252 seconds]
AJA4350 has quit [Quit: AJA4350]
stove has quit [Quit: stove]
nobitanobi has quit [Ping timeout: 265 seconds]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__main__ has joined #ruby
zwliew has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
al2o3-cr has quit [Quit: 你变得越安静,你就越能听到]
tvw has quit []
marius has quit [Quit: marius]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vipaca has joined #ruby
dima_ has quit [Quit: This computer has gone to sleep]
marius has joined #ruby
marius has quit [Client Quit]
alfiemax has joined #ruby
QCF has joined #ruby
QCF has quit [Client Quit]
alfiemax has quit [Ping timeout: 264 seconds]
marius has joined #ruby
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marius has quit [Client Quit]
marius has joined #ruby
marius has quit [Client Quit]
dima_ has joined #ruby
kies has joined #ruby
roshanavand has quit [Quit: Leaving]
cloaked1 has quit [Quit: Leaving]
jxv has joined #ruby
alfiemax has joined #ruby
ledestin has joined #ruby
al2o3-cr has joined #ruby
apeiros has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
elphe has quit [Ping timeout: 248 seconds]
apeiros has quit [Ping timeout: 252 seconds]
elphe has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
shakes has joined #ruby
apeiros has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
bkxd has joined #ruby
naprimer has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 248 seconds]
Vapez has quit [Remote host closed the connection]
dima_ has quit [Quit: This computer has gone to sleep]
marr has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby
elphe has quit [Ping timeout: 268 seconds]
chocoelho has joined #ruby
chrisseaton has quit [Read error: Connection reset by peer]
ewilliam has quit [Ping timeout: 252 seconds]
chrisseaton has joined #ruby
charles81_ has quit [Read error: Connection reset by peer]
Travis-42 has quit [Read error: Connection reset by peer]
schaary has quit [Read error: Connection reset by peer]
skawa has quit [Ping timeout: 240 seconds]
mtkd has quit [Ping timeout: 240 seconds]
ewilliam has joined #ruby
Travis-42 has joined #ruby
charles81_ has joined #ruby
schaary has joined #ruby
skawa has joined #ruby
mtkd has joined #ruby
apeiros has quit [Ping timeout: 260 seconds]
amatas has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has joined #ruby
bkxd has quit []
TomyLobo has quit [Ping timeout: 272 seconds]
Dimik has quit [Ping timeout: 260 seconds]
orbyt_ has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
pilne has quit [Quit: Quitting!]
discopatrick has quit [Quit: Connection closed for inactivity]
current_user has quit [Quit: Leaving]
alfiemax has joined #ruby
ResidentBiscuit has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
kapil___ has joined #ruby
gizmore|2 has joined #ruby
gizmore has quit [Ping timeout: 272 seconds]
zwliew has quit [Quit: Connection closed for inactivity]
stove has joined #ruby
jxv has quit [Quit: zzz…]
cdg has joined #ruby
John___ has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
chocoelho has quit [Ping timeout: 272 seconds]
alfiemax has joined #ruby
ResidentBiscuit has quit [Ping timeout: 265 seconds]
apeiros has quit [Ping timeout: 256 seconds]
alfiemax has quit [Ping timeout: 256 seconds]
ResidentBiscuit has joined #ruby
apeiros has joined #ruby
jxv has joined #ruby
troys_ is now known as troys
apeiros has quit [Ping timeout: 240 seconds]
cadillac_ has quit [Quit: I quit]
jxv has quit [Client Quit]
apeiros has joined #ruby
dn` has quit [Read error: Connection reset by peer]
jxv has joined #ruby
dn` has joined #ruby
alfiemax has joined #ruby
apeiros has quit [Ping timeout: 272 seconds]
cahoots has joined #ruby
iMadper has joined #ruby
alfiemax has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby
Rich_Morin has joined #ruby
apeiros has quit [Ping timeout: 248 seconds]
<Rich_Morin>
I'd like to start up a Unix process and communicate with it interactively via its STDIN and STDOUT. Suggestions?
alfiemax has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
apeiros has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
marius has joined #ruby
bkxd has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
webguynow has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
webguynow has joined #ruby
alfiemax has joined #ruby
vipaca has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
bkxd has quit []
apeiros has joined #ruby
elphe has quit [Ping timeout: 240 seconds]
ResidentBiscuit has quit []
lalomergo has joined #ruby
<raynold>
hehe
apeiros has quit [Ping timeout: 268 seconds]
anisha has joined #ruby
npgm has quit [Quit: Connection closed for inactivity]
nadir has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
c0ncealed has quit [Remote host closed the connection]
c0ncealed has joined #ruby
Musashi007 has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
alfiemax has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
tfitts has quit [Quit: Connection closed for inactivity]
elphe has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
apeiros has quit [Ping timeout: 260 seconds]
ur5us has quit [Remote host closed the connection]
alfiemax has joined #ruby
orbyt_ has joined #ruby
marius has quit [Quit: marius]
apeiros has joined #ruby
dviola has quit [Quit: WeeChat 2.0.1]
apeiros has quit [Ping timeout: 264 seconds]
Musashi007 has quit [Quit: Musashi007]
rrutkowski has quit [Quit: rrutkowski]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guardianx has joined #ruby
bkxd has joined #ruby
webguynow has quit [Ping timeout: 260 seconds]
guardianx has quit [Ping timeout: 252 seconds]
webguynow has joined #ruby
apeiros has joined #ruby
apeiros has quit [Ping timeout: 265 seconds]
nso95 has joined #ruby
nso95 has quit [Changing host]
nso95 has joined #ruby
stove has quit [Quit: stove]
jenrzzz has quit [Ping timeout: 260 seconds]
cahoots has quit [Ping timeout: 248 seconds]
shakes has quit [Quit: Leaving]
jxv has quit [Quit: zzz…]
justicefries has joined #ruby
apeiros has joined #ruby
lalomergo has quit [Quit: Leaving]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has quit [Ping timeout: 264 seconds]
jxv has joined #ruby
c0ncealed has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
c0ncealed has joined #ruby
<jidar>
sounds like a use for a unix socket
cdg has quit [Ping timeout: 265 seconds]
DmitryBochkarev has joined #ruby
nofxx has joined #ruby
nofxx has quit [Client Quit]
aupadhye has joined #ruby
stove has joined #ruby
_whitelogger has joined #ruby
jxv has quit [Quit: zzz…]
LocaMocha has joined #ruby
lostandfound has quit [Ping timeout: 248 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has joined #ruby
ur5us has joined #ruby
DmitryBochkarev has quit [Ping timeout: 248 seconds]
Xiti has quit [Ping timeout: 268 seconds]
iamarun has joined #ruby
Xiti has joined #ruby
iamarun has quit [Client Quit]
halt- has quit [Ping timeout: 252 seconds]
ur5us has quit [Ping timeout: 268 seconds]
DmitryBochkarev has joined #ruby
alfiemax has quit [Remote host closed the connection]
dima_ has joined #ruby
elphe has quit [Quit: Lost terminal]
DmitryBochkarev has quit [Ping timeout: 264 seconds]
jxv has joined #ruby
darkhanb has joined #ruby
jxv has quit [Client Quit]
darkhanb has quit [Client Quit]
darkhanb has joined #ruby
troys is now known as troys_
Flonk has quit [Ping timeout: 246 seconds]
amosbird has left #ruby ["WeeChat 2.0.1"]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ShekharReddy has quit [Quit: Connection closed for inactivity]
rippa has joined #ruby
lostandfound has joined #ruby
troys_ is now known as troys
lostandfound has quit [Ping timeout: 248 seconds]
troys has quit [Quit: Bye]
justicefries has joined #ruby
lostandfound has joined #ruby
dima_ has quit [Quit: This computer has gone to sleep]
justicefries has quit [Client Quit]
lostandfound has quit [Ping timeout: 240 seconds]
mikhael_k33hl has joined #ruby
<mikhael_k33hl>
I have a class that depends on the 'sqlite3' gem. Upon instantiation, it creates or opens a connection to the database, how do I make sure that that connection is closed though after it gets destroyed?
<mikhael_k33hl>
Should I create an instance variable for the db connection or should I open the connection for everytime it needs to do some transaction?
KeyJoo has joined #ruby
alex`` has joined #ruby
dima_ has joined #ruby
alex`` is now known as alexherbo2
alexherbo2 is now known as alex``
maloik has quit [Remote host closed the connection]
alfiemax has joined #ruby
lostandfound has joined #ruby
darkhanb has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RovingWriter has joined #ruby
<mikhael_k33hl>
Anyone using sqlite3? I seem to need to always open a connection even if I have stored a db object on an instance variable
talntid has quit [Ping timeout: 260 seconds]
<akkad>
nobody. use leveldb heh
<mikhael_k33hl>
akkad: can't, working on an existing code
djbkd has joined #ruby
djbkd has quit [Client Quit]
ur5us has joined #ruby
dionysus69 has joined #ruby
ur5us has quit [Ping timeout: 272 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
<akkad>
always on connection?
duderonomy has joined #ruby
<akkad>
sqlite3 is just a file based db
ur5us has joined #ruby
claudiuinberlin has joined #ruby
t0adst00l has joined #ruby
Xiti` has joined #ruby
<mikhael_k33hl>
I always see this SQLite3::Database.open on blogs but I can't seem to find it in ruby-docs though
Xiti has quit [Ping timeout: 240 seconds]
amatas has joined #ruby
ShekharReddy has joined #ruby
Xiti` has quit [Client Quit]
Xiti has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
amatas has quit [Quit: amatas]
pwnd_nsfw` is now known as pwnd_nsfw
<mikhael_k33hl>
is there an assertion in minitest that tests a hash contains a certain element?
alfiemax has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
mtkd has joined #ruby
marr has joined #ruby
ur5us has quit [Remote host closed the connection]
lostandfound has quit [Ping timeout: 248 seconds]
nso95 has quit [Ping timeout: 265 seconds]
ur5us has joined #ruby
Dimik has joined #ruby
howdoi has joined #ruby
lostandfound has joined #ruby
rabajaj has joined #ruby
reber has joined #ruby
mark_66 has joined #ruby
<pwnd_nsfw>
mikhael_k33hl, I don't use minitest much, but in rspec you can just take boolean functions and use them in your tests.. Like if you have a function in your model called "cool?" in rspec you can use be_cool
<pwnd_nsfw>
Does minitest do things like that?
<mikhael_k33hl>
pwnd_nsfw: pretty new to minitest, haven't stumbled upon something like that though
<pwnd_nsfw>
mikhael_k33hl, also are you seeing if a key returns an element?
<pwnd_nsfw>
or, regardless of key, if it contains a value?
iMadper has quit [Remote host closed the connection]
<pwnd_nsfw>
assert your_hash.has_key?("the key") or assert your_hash.has_value("your value")
<pwnd_nsfw>
Any errors that don't have application specific data in them, you can just google them
<mikhael_k33hl>
pwnd_nsfw: Yeah, it really doesn't answer the question as the only answer was pertaining to closing the statement hehe
dinfuehr has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
<pwnd_nsfw>
mikhael_k33hl, apparently you don't have to worry about it
dinfuehr has joined #ruby
quobo has joined #ruby
quobo has quit [Client Quit]
<pwnd_nsfw>
mikhael_k33hl, I'm still looking though because I didn't like the answer
<mikhael_k33hl>
pwnd_nsfw: yeah, me too, I want to find somewhere that tells me/confirms we don't need to close it hehe
<pwnd_nsfw>
mikhael_k33hl, make sure you call finalize on your prepared statements
<pwnd_nsfw>
"When you create statements with Database#prepare(), you have to call .finalize() on them; otherwise, sqlite will keep them around infinitely and won't allow closing the database."
<pwnd_nsfw>
That answer actually came from someone using node
<pwnd_nsfw>
not finding finalize for statements in the docs, lemme look further
Riddell has quit [Ping timeout: 248 seconds]
rrutkowski has quit [Quit: rrutkowski]
Riddell has joined #ruby
<pwnd_nsfw>
mikhael_k33hl, try calling close on the result set you get from execute?
<mikhael_k33hl>
pwnd_nsfw: yep, scouring through the ruby-docs for finalize method
<mikhael_k33hl>
pwnd_nsfw: didin't find a close method for Statements, butu I tried it and it seems to work, leaving me the feeling of "why is it working?" nyahahaha
<pwnd_nsfw>
the method is in resultset
<pwnd_nsfw>
which closes the statement that produced the ResultSet
* pwnd_nsfw
shrugs
<pwnd_nsfw>
No more error though?
<mikhael_k33hl>
pwnd_nsfw: yeah, thanks for that, but the object is a statement object though so why call a method for resultset
<mikhael_k33hl>
hehe
<pwnd_nsfw>
Because the ResultSet is the reason you can't close it
<mikhael_k33hl>
pwnd_nsfw: so I have this statement pst = DB_CONNECTION.prepare "SELECT * FROM mirror";assert_equal(required_database_columns, pst.columns);pst.close
<mikhael_k33hl>
pwnd_nsfw: I tried pringting pst via 'p pst' and it outputs <SQLite3::Statement:0x0000000001cc2f08 . . . which indicates it is a Statement object right?
<pwnd_nsfw>
right
<pwnd_nsfw>
You have to call execute on it for it to do anything
<pwnd_nsfw>
but... that worked?
Serpent7776 has joined #ruby
<mikhael_k33hl>
pwnd_nsfw: yep, no more warnings of the like hehe
<pwnd_nsfw>
Weird
<mikhael_k33hl>
pwnd_nsfw: The ResultSet object encapsulates the enumerability of a query's output. It is a simple cursor over the data that the query returns. It will very rarely (if ever) be instantiated directly. Instead, clients should obtain a ResultSet instance via Statement#execute.
<mikhael_k33hl>
pwnd_nsfw: #close ⇒ Object Closes the statement that spawned this result set.
<mikhael_k33hl>
pwnd_nsfw: Though I find it confusing how I was able to invoke the method via pst.close when pst is a Statement object :D
lostandfound has joined #ruby
SqREL has quit [Ping timeout: 260 seconds]
SqREL has joined #ruby
stove has quit [Quit: stove]
lostandfound has quit [Ping timeout: 240 seconds]
<pwnd_nsfw>
mikhael_k33hl, right? That is weird. call "methods" on the statement and see if close is in there "for the lulz"
ur5us has joined #ruby
bkxd has quit []
<mikhael_k33hl>
pwnd_nsfw: it doesn't
<pwnd_nsfw>
Super weird, ...
<pwnd_nsfw>
mikhael_k33hl, it's the same code you sent me earlier, aside from the one close line, right?
nadir has joined #ruby
bkxd has joined #ruby
lostandfound has joined #ruby
<mikhael_k33hl>
pwnd_nsfw: yep
nerium has joined #ruby
bkxd has quit []
bkxd has joined #ruby
alfiemax has quit [Remote host closed the connection]
despai has joined #ruby
lostandfound has quit [Ping timeout: 264 seconds]
clemens3 has joined #ruby
t0adst00l has quit [Ping timeout: 272 seconds]
clemens3 has quit [Client Quit]
SqREL_ has joined #ruby
clemens3 has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nerium has quit [Ping timeout: 240 seconds]
SqREL has quit [Ping timeout: 272 seconds]
lostandfound has joined #ruby
jnyw has quit [Quit: WeeChat 2.0.1]
KeyJoo has quit [Ping timeout: 240 seconds]
jnyw has joined #ruby
rrutkowski has joined #ruby
lostandfound has quit [Ping timeout: 264 seconds]
Riddell has quit [Ping timeout: 248 seconds]
Riddell has joined #ruby
AJA4350 has joined #ruby
nerium has joined #ruby
bkxd has quit []
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Koshian has quit [Quit: Tiarra 0.1+svn-39209: SIGTERM received; exit]
TomyLobo has joined #ruby
amatas has joined #ruby
Koshian has joined #ruby
despai has quit [Quit: ...]
lostandfound has joined #ruby
naprimer has joined #ruby
jnyw has quit [Quit: WeeChat 2.0.1]
Riddell has quit [Ping timeout: 256 seconds]
Riddell has joined #ruby
lostandfound has quit [Ping timeout: 252 seconds]
raynold has quit [Quit: Connection closed for inactivity]
nerium has quit [Read error: Connection reset by peer]
dima_ has quit [Quit: This computer has gone to sleep]
nerium has joined #ruby
alfiemax has joined #ruby
mikhael_k33hl has quit [Ping timeout: 260 seconds]
NightMonkey has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 246 seconds]
aupadhye has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
nerium has quit [Ping timeout: 240 seconds]
drewmcmillan has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
NightMonkey has joined #ruby
amelliaa has joined #ruby
chocoelho has joined #ruby
alfiemax has joined #ruby
minimalism has quit [Quit: minimalism]
despai has joined #ruby
lostandfound has joined #ruby
mikecmpbll has joined #ruby
jnollette has quit [Ping timeout: 272 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
lostandfound has quit [Ping timeout: 255 seconds]
jnollette has joined #ruby
|ifei5g00d has quit [Ping timeout: 260 seconds]
alfiemax has quit [Remote host closed the connection]
|ifei5g00d has joined #ruby
SqREL has joined #ruby
SqREL_ has quit [Ping timeout: 256 seconds]
amelliaa has quit [Quit: -]
repys has joined #ruby
<repys>
hi how can I install ruby last version in my debian 8?
d^sh has quit [Ping timeout: 240 seconds]
biberu has joined #ruby
d^sh has joined #ruby
yabbes has joined #ruby
jeffreylevesque has quit [Ping timeout: 240 seconds]
<Veejay>
Hello, is there a canonical to have nice output when you're doing some work in different threads and they all use some variant of print/puts/etc.?
<Veejay>
I usually get "jagged" output (newlines not taken into account)
KeyJoo has joined #ruby
<marahin>
Veejay I WOULD have a thread that has a log stack that other threads push their log messages to.
<marahin>
And then one by one just print those messages.
<Veejay>
Do I have to push the messages coming from the threads into a queue?
<marahin>
But then, I'm just having too much fun with golang lately :)
webguynow has quit [Ping timeout: 256 seconds]
<Veejay>
OK, so that's the general idea, the different threads would send their output to some shared data structure that another thread would consume?
<Veejay>
I'll look into that, thanks
<marahin>
I think that's the easiest and the safest one
webguynow has joined #ruby
kies has quit [Ping timeout: 265 seconds]
mikecmpbll has joined #ruby
alfiemax has joined #ruby
lostandfound has joined #ruby
DLSteve has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
aScottishBoat has quit [Ping timeout: 240 seconds]
mikkelsen has quit [Client Quit]
bmurt has joined #ruby
nahra has joined #ruby
cahoots has joined #ruby
orbyt_ has joined #ruby
<havenwood>
Veejay: If you add an explicit newline to the String, it'll stay with the rest of the String.
hotpancakes has joined #ruby
<havenwood>
Veejay: The one #puts implicitly adds gets off kilter.
<havenwood>
Veejay: `puts "coffee\n"` instead of `puts "coffee"`
nobitano_ has joined #ruby
nobitanobi has quit [Ping timeout: 248 seconds]
chocoelho has quit [Quit: chocoelho]
lostandfound has joined #ruby
Serpent7776 has quit [Quit: Leaving]
polishdub has quit [Quit: leaving]
cahoots has quit [Quit: leaving]
KeyJoo has joined #ruby
jeffreylevesque has joined #ruby
TheRock2 has joined #ruby
nobitano_ has quit [Ping timeout: 246 seconds]
stove has joined #ruby
Azure has joined #ruby
<TheRock2>
Hi guys. My ruby code does not work, where is the error? I put this in a .rb file to ping a host: auto f = [](){ return Net::Ping::External.new(host).ping; };
cloaked1 has joined #ruby
cloaked1 has joined #ruby
yabbes has quit [Quit: lu]
polishdub has joined #ruby
duderonomy has quit [Ping timeout: 260 seconds]
nobitanobi has joined #ruby
Ltem has quit [Quit: bbl]
lostandfound has quit [Ping timeout: 272 seconds]
mtkd has quit [Ping timeout: 264 seconds]
mtkd has joined #ruby
cdg has quit [Remote host closed the connection]
sanscoeur has joined #ruby
nobitano_ has joined #ruby
nobitanobi has quit [Ping timeout: 248 seconds]
armyriad has quit [Quit: Leaving]
despai has joined #ruby
<havenwood>
TheRock2: That doesn't make much sense in isolation. Gist the whole file?
Quentinius has joined #ruby
aScottishBoat has joined #ruby
<TheRock2>
I wrote the code in c++ and want to execute it in ruby