jonr22 has quit [Read error: Connection reset by peer]
sent1nel has joined #ruby
DadoCe has joined #ruby
tohuw has quit [Client Quit]
jonr22 has joined #ruby
uptownhr has quit [Quit: uptownhr]
<havenwood>
rooby: I'd really recommend studying up on #each and #map until you really get the difference and when you'd want to use one or the other. They're important!
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skj3gg has joined #ruby
<rooby>
that gives me "in `streams': undefined method `join' for #<Hash:0xb9720f24> (NoMethodError)"
roolo has quit [Ping timeout: 264 seconds]
<steeve149>
Hey guys, I'm trying to stream data into my database in rails but whenever I try to put values into the class.new(params) field in thecontroller I get an error tellingme I need to submit a hash,any idea whats going on?
<havenwood>
rooby: Because it's returning a nice Hash, with `stream[0]` and the key and `stream[1]` as the value, sorted by value.
<havenwood>
rooby: When you're expecting a String.
sent1nel_ has quit [Ping timeout: 272 seconds]
phutchins has quit [Ping timeout: 252 seconds]
tokik has joined #ruby
sent1nel has joined #ruby
nettoweb has joined #ruby
<havenwood>
steeve149: #RubyOnRails is the best place for Rails stuff.
<havenwood>
rooby: You could turn that Hash into the String you want before returning from the method. I think you need to learn the basics so you can navigate what you're doing.
uptownhr has joined #ruby
pontiki has joined #ruby
ta has joined #ruby
definiv has joined #ruby
plutonic has quit [Quit: plutonic]
tcrypt has quit []
wallerdev_ has quit [Quit: wallerdev_]
Cadillactica has quit [Quit: Cadillactica]
baweaver has quit [Remote host closed the connection]
definiv has quit [Client Quit]
nykc has joined #ruby
ismaelga has quit [Remote host closed the connection]
nykc has quit [Client Quit]
jottr has quit [Ping timeout: 265 seconds]
roolo has joined #ruby
ta has quit [Ping timeout: 265 seconds]
fuhgeddaboudit has joined #ruby
<havenwood>
rooby: Anyways, learn Ruby! But here's my last free hint for what mapping to a String might look like: results.sort_by { |result| result[1] }.map { |result| "#{result[0]} (#{result[1]})" }
<ravenzz>
it doesn't seem like I have access to $stdout there!?
j_mcnally has quit [Remote host closed the connection]
roolo has quit [Read error: Connection reset by peer]
roolo has joined #ruby
jbw__ has joined #ruby
<ravenzz>
I mean StringIO.new is a new io object I guess and at that point the output was already sent
Ivision_ has quit [Read error: No route to host]
<shevy>
ravenzz I am a test noob :)
<shevy>
but $ is a global object
<shevy>
you always have access to these
<ravenzz>
oh well, nice to meet you dude
<ravenzz>
:D
Pharaoh2 has joined #ruby
Pharaoh2 has quit [Max SendQ exceeded]
Pharaoh2 has joined #ruby
roolo_ has joined #ruby
roolo has quit [Read error: Connection reset by peer]
Ivision has joined #ruby
jbw_ has quit [Ping timeout: 265 seconds]
roolo_ has quit [Read error: Connection reset by peer]
Channel6 has quit [Quit: Leaving]
roolo has joined #ruby
jpweiser has left #ruby [#ruby]
roolo_ has joined #ruby
Parker0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roolo has quit [Read error: Connection reset by peer]
luriv has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
plutonic has joined #ruby
roolo has joined #ruby
roolo_ has quit [Read error: Connection reset by peer]
ta has joined #ruby
roolo has quit [Read error: Connection reset by peer]
roolo_ has joined #ruby
ponga has joined #ruby
_djbkd has joined #ruby
roolo_ has quit [Read error: Connection reset by peer]
roolo has joined #ruby
mhenrixon|afk is now known as mhenrixon
Hijiri has joined #ruby
ponga has quit [Read error: Connection reset by peer]
panga has joined #ruby
ta has quit [Ping timeout: 246 seconds]
roolo_ has joined #ruby
roolo has quit [Read error: Connection reset by peer]
roolo_ has quit [Read error: Connection reset by peer]
roolo has joined #ruby
seitensei has quit [Ping timeout: 256 seconds]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
roolo has quit [Read error: Connection reset by peer]
roolo has joined #ruby
roolo has quit [Read error: Connection reset by peer]
Morkel has joined #ruby
roolo has joined #ruby
roolo has quit [Read error: Connection reset by peer]
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
mikepack has quit [Remote host closed the connection]
helpa has quit [Remote host closed the connection]
roolo has joined #ruby
lxsameer has joined #ruby
sigurding has joined #ruby
avril14th has quit [Ping timeout: 264 seconds]
arup_r has joined #ruby
helpa has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mhenrixon is now known as mhenrixon|afk
roolo_ has joined #ruby
roolo has quit [Read error: Connection reset by peer]
rhg135 is now known as rhg135|zzz
meschi has quit [Ping timeout: 252 seconds]
roolo has joined #ruby
havenn has quit []
roolo__ has joined #ruby
roolo_ has quit [Ping timeout: 245 seconds]
roolo_ has joined #ruby
timonv has joined #ruby
roolo__ has quit [Read error: Connection reset by peer]
<arup_r>
moin
roolo has quit [Ping timeout: 250 seconds]
lolmaus has joined #ruby
roolo_ has quit [Read error: Connection reset by peer]
roolo has joined #ruby
yfeldblum has joined #ruby
lampd1_ has joined #ruby
yfeldblu_ has joined #ruby
Synthbread has quit [Read error: Connection reset by peer]
<panga>
arup_r oink
<arup_r>
panga: o/
roolo has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Ping timeout: 256 seconds]
lampd1 has quit [Ping timeout: 256 seconds]
Ivision has quit [Remote host closed the connection]
lampd1_ is now known as lampd1
roolo has joined #ruby
jobewan has quit [Quit: Leaving]
ismaelga has joined #ruby
roolo has quit [Ping timeout: 252 seconds]
pwnz0r_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
speaking1ode has quit [Ping timeout: 252 seconds]
speaking1ode has joined #ruby
agrinb has quit [Remote host closed the connection]
tagrudev has joined #ruby
ismaelga has quit [Ping timeout: 256 seconds]
speakingcode has quit [Ping timeout: 240 seconds]
agrinb has joined #ruby
fgo has quit [Ping timeout: 246 seconds]
agrinb has quit [Remote host closed the connection]
speakingcode has joined #ruby
agrinb has joined #ruby
fabrice31 has quit [Ping timeout: 255 seconds]
mikecmpbll has quit [Quit: ciao.]
<arup_r>
I am reading one PPT, where (s)he said -- Kernel#srand sets the seed for Kernel#rand. This can be used to generate a reproducible sequence of numbers. This might be handy if you are trying to isolate / reproduce a bug. My question is -- what is `seed` ?
<Mon_Ouie>
The seed of the pseudo random number generator is the value it uses to start its sequence of random numbers. Every time you use the same seed, you will get the same sequence back.
Ivision has joined #ruby
<arup_r>
Mon_Ouie: Hi.. How are you?
<Mon_Ouie>
I'm fine
<arup_r>
Mon_Ouie: Still.. I'm not able to understand the diff between #rand and #srand
hvxgr has quit [Ping timeout: 265 seconds]
<Mon_Ouie>
#rand returns the next random number, #srand configures the generator which will affect the calls to #rand that will follow.
roolo has joined #ruby
<arup_r>
Mon_Ouie: Would you mind one example to show the how #srand affects or work with in cooperation with the #rand ?
<Mon_Ouie>
>> x = []; srand(3); x << rand(10) << rand(10); srand(3); x << rand(10) << rand(10); x
neanderslob_ has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
neanderslob has joined #ruby
roolo has joined #ruby
Synthbread has joined #ruby
sarahbunny is now known as sarahbunny|carro
roolo has quit [Ping timeout: 264 seconds]
sarahbunny|carro is now known as sarahbunny
polysics has quit [Remote host closed the connection]
Hijiri has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
<panga>
shevy: arup_r is there a gem that lets me to use methods like .update .remove .create instead of sending raw queries via .execute for sqlite3
<panga>
i saw how its done like that in rails, wondering same exists for ruby
polysics has joined #ruby
<sevenseacat>
you might be looking for the sequel gem
Hijiri has joined #ruby
anaeem1 has joined #ruby
yfeldblu_ has quit [Ping timeout: 245 seconds]
<panga>
sevenseacat: thanks, looking at it
anaeem1 has quit [Remote host closed the connection]
jimms has joined #ruby
lemur has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
wottam has joined #ruby
roolo has joined #ruby
despai has joined #ruby
lemur has joined #ruby
ta has joined #ruby
polysics has quit [Ping timeout: 264 seconds]
despai has quit [Client Quit]
pontiki has quit [Quit: g'nite]
terlar has joined #ruby
terlar has quit [Client Quit]
despai has joined #ruby
FooMunki_ is now known as FooMunki
ringaring has joined #ruby
ringarin has joined #ruby
ta has quit [Ping timeout: 252 seconds]
lemur has quit [Ping timeout: 265 seconds]
roolo has quit [Ping timeout: 265 seconds]
roolo has joined #ruby
ringaring has quit [Read error: Connection reset by peer]
djbkd_ has joined #ruby
ringarin has quit [Read error: Connection reset by peer]
ringaring has joined #ruby
ringaroses2 has joined #ruby
Rollabunna has quit [Remote host closed the connection]
ringaring has quit [Client Quit]
ringaroses2 has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
andikr has joined #ruby
fabrice31_ has joined #ruby
agrinb has joined #ruby
terlar has joined #ruby
fgo has joined #ruby
krz has quit [Read error: Connection reset by peer]
roolo has quit [Ping timeout: 264 seconds]
fabrice31 has quit [Ping timeout: 265 seconds]
krz has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
terlar has quit [Client Quit]
agrinb has quit [Ping timeout: 256 seconds]
fgo has quit [Ping timeout: 256 seconds]
despai has joined #ruby
bayed has joined #ruby
duncannz has quit [Remote host closed the connection]
mroach has quit [Quit: mroach]
djbkd_ has quit [Remote host closed the connection]
terlar has joined #ruby
despai has quit [Client Quit]
ki0 has joined #ruby
roolo has joined #ruby
adamjleonard has quit [Quit: Leaving...]
ta has joined #ruby
Rhainur1 has quit [Quit: Leaving.]
paolooo has quit [Ping timeout: 246 seconds]
systemd0wn has quit [Read error: Connection reset by peer]
lidaaa has quit [Ping timeout: 244 seconds]
<certainty>
moin ok i seem to be dump today. Given a range i want to enumerate all subranges such that they're each 1 element shorter. Example: (1..5) #=> [(1..5),(2..5),(3..5),(4..5),(5..5)]
sent1nel has joined #ruby
<certainty>
there must be a simple way, no?
systemd0wn has joined #ruby
<certainty>
i have the feeling that i could zip it
Takle has quit [Remote host closed the connection]
Lorn3r has joined #ruby
mroach has joined #ruby
<certainty>
zip [1..4] (repeat 5) ... is not much shorter to be fair
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<certainty>
w00ps wrong window :)
roolo_ has quit [Ping timeout: 256 seconds]
<atom3>
I am looking at local development in a nginx enviornment, and have successfully set up a passenger environment. I am wondering whats the general opinion around passenger and unicorn. does one have a clear advantage over the other, etc...
adamjleonard has quit [Quit: Leaving...]
aswen has joined #ruby
aapole has joined #ruby
psy_ has joined #ruby
roolo has joined #ruby
psy_ has quit [Max SendQ exceeded]
ismaelga has quit [Ping timeout: 272 seconds]
fabrice31_ has quit [Remote host closed the connection]
psy_ has joined #ruby
fabrice31 has joined #ruby
<kifla>
guys please help
enterprisedc has quit [Quit: enterprisedc]
kalusn has joined #ruby
anaeem1_ has quit [Quit: Leaving...]
Rollabunna has quit [Remote host closed the connection]
anaeem1 has joined #ruby
kalusn has quit [Remote host closed the connection]
kalusn has joined #ruby
Rollabunna has joined #ruby
fgo has joined #ruby
roolo has quit [Ping timeout: 265 seconds]
jimms has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
<panga>
hi atom3
<panga>
long time no see
oo_ has quit [Remote host closed the connection]
antgel has joined #ruby
jimms has joined #ruby
oo_ has joined #ruby
arup_r has joined #ruby
amacou has joined #ruby
michael_mbp has quit [Excess Flood]
oo_ has quit [Remote host closed the connection]
Hobogrammer has quit [Ping timeout: 246 seconds]
decoponyo has joined #ruby
huddy has joined #ruby
keen__________72 has quit [Read error: Connection reset by peer]
michael_mbp has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
oo_ has joined #ruby
agrinb has joined #ruby
keen__________72 has joined #ruby
decoponio has quit [Ping timeout: 264 seconds]
ki0 has quit [Remote host closed the connection]
ki0 has joined #ruby
watmm1 has left #ruby [#ruby]
craigp has joined #ruby
Morkel has joined #ruby
jonr22 has joined #ruby
agrinb has quit [Ping timeout: 265 seconds]
mikecmpbll has joined #ruby
Guest123 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Advocation has joined #ruby
michael_mbp has quit [Excess Flood]
ta has joined #ruby
marr has joined #ruby
phansch has joined #ruby
michael_mbp has joined #ruby
jonr22 has quit [Ping timeout: 250 seconds]
Cust0sL1men has joined #ruby
swartwulf has quit [Remote host closed the connection]
ghr has joined #ruby
vtunka has joined #ruby
joonty has joined #ruby
blandflakes has quit [*.net *.split]
shepherd has quit [*.net *.split]
m8 has joined #ruby
RegulationD has joined #ruby
michael_mbp has quit [Excess Flood]
rkgudboy has joined #ruby
mikepack has joined #ruby
michael_mbp has joined #ruby
nii236 has quit [Ping timeout: 265 seconds]
djbkd_ has joined #ruby
rohit has joined #ruby
roolo has joined #ruby
rohit is now known as Guest85525
rkgudboy has quit [Read error: Connection reset by peer]
sigurding has quit [Quit: sigurding]
RegulationD has quit [Ping timeout: 246 seconds]
sigurding has joined #ruby
dumdedum has joined #ruby
elaptics_away is now known as elaptics
kapil___ has quit [Quit: Connection closed for inactivity]
chipotle has quit [Remote host closed the connection]
sevenseacat has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 272 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest85525 has quit [Read error: Connection reset by peer]
kartouch is now known as kartouch|afk
rkgudboy has joined #ruby
kartouch|afk is now known as kartouch
roolo has quit [Ping timeout: 272 seconds]
dumdedum has quit [Ping timeout: 246 seconds]
michael_mbp has quit [Excess Flood]
fabrice31_ has joined #ruby
ta has quit [Remote host closed the connection]
michael_mbp has joined #ruby
Takle has joined #ruby
kyb3r_ has quit [Quit: Leaving]
fabrice31_ has quit [Remote host closed the connection]
doodlehaus has joined #ruby
fabrice31 has quit [Ping timeout: 245 seconds]
olivier_bK has joined #ruby
fabrice31 has joined #ruby
lkba_ has quit [Ping timeout: 264 seconds]
rkmylo has joined #ruby
dumdedum has joined #ruby
doodlehaus has quit [Ping timeout: 265 seconds]
amacou has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
rkgudboy has quit [Read error: Connection reset by peer]
ismaelga has joined #ruby
jimms has quit [Remote host closed the connection]
<atom3>
panga: i think you confuse me with someone?
<aep>
is there an event based http server framework that can coexist with long-running connections (specifically mqtt)
selu has joined #ruby
djellemah has joined #ruby
<toretore>
thin is em based
ravenzz has quit [Quit: Connection closed for inactivity]
ptrrr has joined #ruby
Grumelo has joined #ruby
Pumukel has quit [Ping timeout: 256 seconds]
<shmoon_>
I've seen some people do require 'rubygems'; require 'bundler'; is there a special reason ? i dont see them using anything out of them then, could also be wrong for sure
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
_ixti_ has joined #ruby
serivich has joined #ruby
sandelius has joined #ruby
nfk has quit [Quit: yawn]
ptrrr has quit [Quit: ptrrr]
Lucky___ has joined #ruby
rkgudboy has quit [Read error: Connection reset by peer]
zorak8 has quit [Ping timeout: 264 seconds]
rkgudboy has joined #ruby
<toretore>
require 'rubygems'; was for earlier ruby versions
agrinb has joined #ruby
<toretore>
require 'bundler' i guess is when you need to use it for something?
Grumelo has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
agrinb_ has joined #ruby
yxejamir has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
jimms has joined #ruby
serivich has quit [Ping timeout: 265 seconds]
agrinb has quit [Ping timeout: 250 seconds]
agrinb_ has quit [Ping timeout: 272 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
jespada has joined #ruby
leafybasil has quit [Remote host closed the connection]
fabrice31_ has joined #ruby
<shmoon_>
toretore: earlier ruby versions why ?
<shmoon_>
i mean gem is installed, lookup your load path for requiring other gems, just wondering why
rkgudboy has quit [Read error: Connection reset by peer]
rkgudboy has joined #ruby
fabrice31 has quit [Ping timeout: 246 seconds]
Pharaoh2_ has joined #ruby
serivich has joined #ruby
Takle has quit [Remote host closed the connection]
hmsimha has quit [Quit: Leaving]
n008f4g_ has joined #ruby
Pharaoh2 has quit [Ping timeout: 264 seconds]
<arup_r>
Hi.. Any body ever read Sandi Metz's rule TRUE ?
Pumukel has quit [Remote host closed the connection]
<Fluent>
They don't have the same address
<panga>
k
<workmad3>
object_id != address
<panga>
how about active records
vtunka has joined #ruby
mkaesz has quit [Remote host closed the connection]
mkaesz has joined #ruby
<Fluent>
How are you able to get the address of the variable?
<Fluent>
Because I thought that wasn't possible.
<canton7>
it's certainly not something you should ever want to do
<panga>
this is sqlite3 table and two variables have different ID yet if i change one , another one gets changed too
mostlybadfly has quit [Quit: Connection closed for inactivity]
<apeiros_>
you don't get addresses in ruby anyway
<panga>
i think its the sqlite thing then
<panga>
:(
<apeiros_>
ruby doesn't have pointers in the sense C has them
<Fluent>
Yes, they do that by default
<Fluent>
They get assigned object id's
mkaesz has quit [Remote host closed the connection]
<panga>
Fluent: what i was trying to do, is to make a variable on RAM and dup table into it, so everytime i modify table it wouldn't write to disk
<Fluent>
panga: Your issue is with sqlite3
<panga>
and i failed
<panga>
:(
<panga>
yop
<panga>
its sqlite3 thing
<panga>
but any workaround to achieve that?
mkaesz has joined #ruby
<panga>
i wouldn't want to modify mastercopy/ write disk everytime
<panga>
but rather want it on RAM first
rkgudboy has quit [Read error: Connection reset by peer]
ismaelga has joined #ruby
bruno- has joined #ruby
<Fluent>
I don't know how you would make a table in sqlite3 in only RAM, sorry.
rkgudboy has joined #ruby
<panga>
its ok..
<rooby>
I have this script that pulls streams from twitch.tv api and then lists them on a channel in the syntax "http://www.twitch.tv/streamerjack (444)" where "444" is the viewer number, and I tried doing this to get the streams sorted by the viewer number in the parenthesis but it's only sorting them by the second to last character, how can I do it to get it sorted by the entire number from the
<panga>
canton7: so memory first, and import file onto it?
<canton7>
trying to remember how I did it
mkaesz has quit [Ping timeout: 245 seconds]
<canton7>
essentially, yes. create an in-memory DB and copy a file-based DB into it
<canton7>
now... you probably don't actually want that
<canton7>
you probably want to muck about with the WAL/etc settings
<panga>
canton7: why not? i don't want to modify master copy everytime
<panga>
uh
<panga>
i see
<panga>
so i'd just adjust commit frequency
ismaelga has quit [Ping timeout: 246 seconds]
<panga>
rather
<canton7>
ah, you're not doing it for speed? you're doing it so you can rollback?
<panga>
not for speed at all
<Fluent>
rooby: You can't push all the numbers into a list, then just call.sort on the list?
<panga>
to be safe around master copy
<canton7>
dunno what would be best then
bruno- has quit [Ping timeout: 252 seconds]
<Fluent>
I guess you would actually want to use a hash for this
<canton7>
last time I loaded an existing sqlite database into memory was for speed. I did that from C#, but I remember creating the in-memory db then loading into it
<panga>
ok i will work around and look at that too
<rooby>
Fluent: it's someone else's bot, I barely know the basics :/
<Fluent>
Well, you should post the source code in a secret gist at least. Otherwise no one can really help you. That is if you don't know how to program.
<panga>
canton7: thank you
<Fluent>
s/don't know/barely know/
roolo has joined #ruby
rocknrollmarc has joined #ruby
wallerdev has quit [Quit: wallerdev]
<canton7>
panga, dunno how that'll translate into ruby, but that's the API I used :P
<panga>
canton7: it was actually got to do with the gem('sequel') im using for sqlite3
agrinb has joined #ruby
<panga>
and it has many options about auto-commit, manuel commit etc
<panga>
guess this is how i should work around
<panga>
but thanks for all help
<canton7>
dunno what sequel uses for sqlite underneath
thsig has joined #ruby
sarahbunny has quit [Quit: synapse]
gregf_ has joined #ruby
rocknrollmarc has quit [Ping timeout: 255 seconds]
<Fluent>
rooby: I think it's because of the way the data is being parsed. s[1] which is where the code is implying the number of viewers is at, is only the 2nd digit in the number
psy_ has quit [Read error: No route to host]
tvw has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 246 seconds]
<Fluent>
Can you give me an example output of s[0] and s[1] from the get_streams_url_and_views method
fabrice31 has joined #ruby
Obfuscate has quit [Ping timeout: 256 seconds]
hanmac has quit [Ping timeout: 250 seconds]
<olivier_bK>
arup_r, lol..
<arup_r>
I did _tweak_
<arup_r>
:p
<olivier_bK>
arup_r, almost i dont get the value of my method but he call it
<nini1294>
Hey. I have an idea to make a sort of helper bot that is basically a ruby program that waits for some message to be sent to it does some processing and then replies back. What would be a good starting point I'm completely lost
djbkd_ has quit [Read error: Connection reset by peer]
<havenwood>
nini1294: I vote make a simple "Hello World" Roda app to start.
djbkd_ has joined #ruby
molavy has quit [Ping timeout: 264 seconds]
commmmodo has joined #ruby
vtunka has joined #ruby
andikr has quit [Remote host closed the connection]
claw___ has quit [Ping timeout: 250 seconds]
<havenwood>
nini1294: You may have an easier time finding Sinatra tutorials though. It's not hard to port a small app from Sinatra to Roda though.
<nini1294>
havenwood: Thanks for that I'll look into it. How exactly could I host the Roda app.
Timgauthier has quit [Quit: done]
codeurge has joined #ruby
<havenwood>
nini1294: Roda is one of many Rack adapters, a very nice one at that.
claw has joined #ruby
<havenwood>
nini1294: Rails and Sinatra are the two most popular Rack adapters.
pengin has joined #ruby
allcentury has joined #ruby
rocknrollmarc has quit [Read error: Connection reset by peer]
djbkd_ has quit [Ping timeout: 245 seconds]
<havenwood>
nini1294: There're a number of hosting options like Heroku, with a free tier and one line deploy. Or you can run a Rack app on your own server.
ta has quit [Remote host closed the connection]
jlast has joined #ruby
<havenwood>
nini1294: There're a number of nice Rack web servers to run your Rack app, like Puma, Unicorn, Passenger or Thin.
ismaelga has quit [Remote host closed the connection]
<nini1294>
havenwood: I have used rails before but I can't say that I understood too much of the backend and how it worked.
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sinkensa_ has quit [Remote host closed the connection]
felltir has quit []
<havenwood>
nini1294: Roda is hugely simpler than Rails. I'd suggest even reading through the codebase, see what you can glean.
raluxgaza has joined #ruby
pengin has quit [Ping timeout: 264 seconds]
pengin_ has joined #ruby
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
serivich has quit [Ping timeout: 272 seconds]
<havenwood>
nini1294: There're #roda and #sinatra channels too.
Pharaoh2_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
StoneCypher has joined #ruby
rdark has joined #ruby
rubie has joined #ruby
<workmad3>
havenwood: I like a pure-rack hello world :) "->(env){[200, {}, ["Hello, world!"]]}'
Spami has joined #ruby
<nini1294>
havenwood: Thanks a lot. I guess I have a lot of reading and testing to do :)
jimms has joined #ruby
<havenwood>
workmad3: indeed!
<rubie>
hi all: i was working on a branch in git, then messed up the code, i then checked out the master branch to start over, but the changes i made on the branch were on the master as well, any ideas?
<havenwood>
nini1294: no prob, yell if you get stuck! many of us do Rack apps of one variety or another.
msgodf has quit [Ping timeout: 256 seconds]
<workmad3>
rubie: sounds like you didn't commit the changes
Pharaoh2 has joined #ruby
<workmad3>
rubie: so all you had was dirty files in the working tree, which get preserved between branch changes (assuming a branch wouldn't delete them or overwrite them... at which point the checkout fails)
<rubie>
do you have to commit dirty changes on a branch before switching over to the master?
kham has joined #ruby
<workmad3>
rubie: yes, or reset them
davispuh has joined #ruby
<rubie>
aww man i didnt' know that
<workmad3>
rubie: otherwise they just remain uncommitted
<rubie>
can i switch back to the branch, commit changes
<workmad3>
rubie: it's ok... you haven't actually committed any changes to any branch from the sounds of it
<rubie>
then swtich back to master for the clean code?
<rubie>
correct
Soda has joined #ruby
<workmad3>
yup... or you can do 'git stash' to stash them, or you could do 'git reset HEAD --hard' on the master branch to clean it out
alex88 has quit []
<rubie>
i'll try the commit first
<rubie>
thanks so much for your help
<rubie>
really saved me
<workmad3>
(I'd probably advise against that last one though, if you're unsure, do a git stash for now and then throw away the stash later when you don't need it)
<workmad3>
rubie: it's rare to end up in an unrecoverable situation with git, unless you do something really dumb (like rm -rf .git)
<rubie>
ya i need to spend a weekend learning more than the absolute basics
plashchynski has quit [Quit: plashchynski]
<workmad3>
rubie: you can get a long way just by learning the difference between the working directory, the repository and the staging index ;)
b4rbz has joined #ruby
R1chK has quit [Quit: Connection closed for inactivity]
<rubie>
i'll look into those thank you again. and it worked like a charm :)
tmtwd has joined #ruby
sinkensabe has joined #ruby
mengu has quit []
<workmad3>
rubie: also, 'git stash' is *really* useful ;)
crueber has joined #ruby
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
confucius has left #ruby [#ruby]
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Crisix has joined #ruby
rkgudboy has quit [Ping timeout: 240 seconds]
olivier_bK has quit [Ping timeout: 245 seconds]
Crisix has quit [Max SendQ exceeded]
slawrenc_ has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
slawrenc_ has quit [Client Quit]
Pharaoh2 has joined #ruby
plashchynski has joined #ruby
rdark has quit [Ping timeout: 250 seconds]
iamjarvo has joined #ruby
Pharaoh2 has quit [Max SendQ exceeded]
ta has quit [Remote host closed the connection]
Pharaoh2 has joined #ruby
maximski has joined #ruby
rdark has joined #ruby
Hobogrammer has joined #ruby
<shevy>
puts "\e[38;2;0;100;0mok\e[39;49m"
banister has joined #ruby
RDash has quit [Ping timeout: 246 seconds]
banister has quit [Max SendQ exceeded]
<shevy>
this works in kde-konsole and puts "ok" in green colour
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
does one of you have gnome-terminal and can test this? mine does not work right now; the above does not work on xterm it seems :(
sambao21 has quit [Quit: Computer has gone to sleep.]
RDash has joined #ruby
vtunka has quit [Quit: Leaving]
RDash has quit [Changing host]
RDash has joined #ruby
Pharaoh2 has quit [Client Quit]
sinkensabe has quit [Remote host closed the connection]
riotjones has joined #ruby
<cristi>
havenwood, shevy: I think I sorted it out using the SCL repo
<shevy>
\o/
Takle_ has quit [Read error: Connection reset by peer]
Takle has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fuhgeddaboudit has quit [Read error: Connection reset by peer]
zemlya has joined #ruby
joonty has quit [Quit: joonty]
rkgudboy has joined #ruby
Synthbread has quit [Ping timeout: 252 seconds]
b4rbz has quit [Ping timeout: 252 seconds]
antgel has joined #ruby
kalusn has quit [Remote host closed the connection]
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkgudboy has quit [Max SendQ exceeded]
rdark has quit [Quit: leaving]
ki0 has quit []
rubytor has joined #ruby
pontiki has joined #ruby
rkgudboy has joined #ruby
bricker has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_honning_ has quit [Ping timeout: 240 seconds]
rkgudboy has quit [Max SendQ exceeded]
kham has quit [Ping timeout: 240 seconds]
rkgudboy has joined #ruby
rkmylo has quit []
rkgudboy has quit [Max SendQ exceeded]
krz has quit [Quit: WeeChat 1.0.1]
phansch has quit [Ping timeout: 265 seconds]
craigp has quit [Remote host closed the connection]
aclearman037 has joined #ruby
joshhartigan has quit [Remote host closed the connection]
wottam has joined #ruby
<shevy>
if I have a class method; module Foo; def self.bla; puts 'hi'; end; end... is there another way to call it from inside module Foo, other than .send? (I don't know the name of the method beforehand, hence why I needed to use .send)
craigp has joined #ruby
Advocation has quit [Quit: Advocation]
<shevy>
e. g. I also need a method call bla that just invokes Foo.bla, inside module Foo
wottam has quit [Client Quit]
stunder has joined #ruby
xploshioon has joined #ruby
wald0 has joined #ruby
rbennacer has quit [Remote host closed the connection]
einarj has quit [Read error: Connection reset by peer]
<arup_r>
how would I get the values for move right
jimms has joined #ruby
<arup_r>
shevy: I have to buy my own ship
RegulationD has joined #ruby
einarj has joined #ruby
jheg has joined #ruby
<shevy>
lol
Rollabunna has quit [Read error: Connection reset by peer]
Rollabun_ has joined #ruby
huddy has quit [Quit: Connection closed for inactivity]
fantazo has quit [Quit: Verlassend]
n1lo has quit [Remote host closed the connection]
maximski has quit [Ping timeout: 245 seconds]
despai has quit [Quit: This computer has gone to sleep]
chinmay_dd has quit [Quit: Connection closed for inactivity]
RegulationD has quit [Ping timeout: 246 seconds]
gfawcettpq has quit [Quit: Leaving.]
wottam has joined #ruby
despai has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<oddmunds>
arup_r: i love how that page starts with "It seems a little overkill to have a gem for this but I figured I would mention it." and then follows with that mess.
<Senjai>
Specifically, I dont need to display feet if there wasn't a whole foot in the first place
shadoi1 has joined #ruby
jonr22 has quit [Ping timeout: 250 seconds]
<jhass>
Senjai: you mean you don't like the output or the code?
wallerdev has quit [Quit: wallerdev]
<Senjai>
jhass: The code
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<Senjai>
Displays like: 1.0' 6.0" x 6.72"
<Senjai>
which is fine
<arup_r>
oddmunds: in the same line
<arup_r>
From Number 1...TO Number 2
ferr has quit [Quit: WeeChat 1.1.1]
wallerdev has joined #ruby
shadoi has quit [Ping timeout: 264 seconds]
<jhass>
Senjai: having to initialize to an empty string is a bit odd, but I think it's okay
<jhass>
Senjai: maybe use %() literals so you don't have to escape the "
<Senjai>
jhass: Aye, it was nice and interpreted before, with %Q{}
<Senjai>
but because of this condition its kinda pukish
einarj_ has joined #ruby
<jhass>
Senjai: btw, inform both channels of the crosspost and inform both channels of provided solutions
Spami has joined #ruby
nettoweb has joined #ruby
willharrison has joined #ruby
<Senjai>
jhass: I informed the other channel of the xpost, but not this one
<jhass>
I know
<Senjai>
I did xpost this to #ruby-lang
<Senjai>
for anyone who didn't know
<oddmunds>
arup_r: make it go both up and forward. like this print "\033[1A\033[14C...TO Number"
reinaldob has quit [Read error: Connection reset by peer]
reinaldo_ has joined #ruby
allcentury has quit [Ping timeout: 264 seconds]
<arup_r>
oddmunds: WooW
<arup_r>
why 14 ?
marr has joined #ruby
<arup_r>
oddmunds: ^
allcentury has joined #ruby
<oddmunds>
i guessed. i couldn't bother to count the letters
einarj has quit [Ping timeout: 264 seconds]
<arup_r>
humm
<jhass>
Senjai: the way to write it in "one" literal would be something like "#{"#{width_feet}' " if width_feet > 0}...", but that won't really end up nicer
<arup_r>
got it
einarj has joined #ruby
jenrzzz has joined #ruby
FooMunki has quit [Quit: FooMunki]
<oddmunds>
arup_r: if you want it to be precise you count the letters in num1 before you convert it to a number and at that to the number of leading letters
<arup_r>
yes
<arup_r>
got it
fuhgeddaboudit has joined #ruby
einarj_ has quit [Ping timeout: 245 seconds]
einarj_ has joined #ruby
pwh has joined #ruby
last_staff has joined #ruby
alex88 has quit [Remote host closed the connection]
reinaldo_ has quit [Remote host closed the connection]
Zesty has joined #ruby
despai has joined #ruby
despai has quit [Remote host closed the connection]
ismaelga has joined #ruby
PaulCapestany has joined #ruby
anarang has quit [Quit: Leaving]
ghr has joined #ruby
cristi has quit [Ping timeout: 265 seconds]
sinkensabe has joined #ruby
bhaveshletter has joined #ruby
bhaveshletter has left #ruby [#ruby]
msmith has quit []
olivier_bK has quit [Ping timeout: 272 seconds]
danzilio has quit [Quit: Baiii!]
MirenaT has joined #ruby
<MirenaT>
Hi
<MirenaT>
I need Ruby Developer
JDiPierro has quit [Remote host closed the connection]
<MirenaT>
for a start-up
ghr has quit [Ping timeout: 252 seconds]
tunaCanBruh has quit [Ping timeout: 264 seconds]
<MirenaT>
if he/she is willing to become a co-founder, this would be ideal
<MirenaT>
anyone interested to work for my project is welcome to send me a message
<MirenaT>
or write me here: mirena.taskova@gmail.com
beneggett has joined #ruby
<Radar>
MirenaT: My fee is 1 million dollars a month
<Radar>
Interested/
amacou has joined #ruby
davedev2_ has quit [Read error: Connection reset by peer]
<MirenaT>
:) If u can arrange 10 mil for me;) u can start
davedev24_ has joined #ruby
<Radar>
Oh I see how it is. I do all the work and you get all the money
<Radar>
I'm already in a relationship like that.
<MirenaT>
Oh gosh, I am actually serious
fmcgeough has quit [Quit: fmcgeough]
<Radar>
You've given no details at all
<Radar>
Where is the pull?
<MirenaT>
I was hoping that someone here is a Ruby pro and can help for work
b4rbz has joined #ruby
elaptics_away is now known as elaptics
tcrypt has joined #ruby
<Radar>
What kind of start-up? What are the hours? What are the benefits of working there? How much can I expect to be paid?
davedev24_ has quit [Read error: Connection reset by peer]
<MirenaT>
I give details in a personal correspondence
<Radar>
Your post is extremely lazy.
<Radar>
Your work ethic is probably the same.
<MirenaT>
ok. It seems u want to chat :)
<Radar>
No pull.
davedev24_ has joined #ruby
<MirenaT>
and I would like to work
<MirenaT>
I am sorry
<Radar>
Why should I come work with you over the 100s of other people who have the EXACT SAME PITCH as you?
<Radar>
"I need a Ruby developer"
<Radar>
Great, now that we're done talking about your needs, let's talk about mine
<pontiki>
that's not a pitch
<MirenaT>
U should not Radar
<MirenaT>
u don't need to work with me
<Radar>
I need a decent wage to support my family.
<MirenaT>
if u don't want to
<Radar>
I need a computer to work from.
<Radar>
MirenaT: My point is: other people want this information.
<sivsushruth>
+1
<Radar>
By not providing any kind of distinctive, useful information to convice people to come work for you, you will have a ridiculously hard time finding a developer.
<Radar>
Find some way to make your job pitch more interesting than all the others.
amacou has quit [Read error: No route to host]
davedev2_ has joined #ruby
davedev24_ has quit [Read error: Connection reset by peer]
<Radar>
Turn your ugly duckling into the most beautiful, badass swan.
<pontiki>
♫ let it go / let it go ♫
<Radar>
Damn it gets on my nerves when nobody puts any effort into recruiting. It's such an important thing to do and so many people fail terribly at it.
<pontiki>
it's a skill that can be learned
blazes816 has quit [Ping timeout: 272 seconds]
<Radar>
Every monkey wants a technical co-founder. Tell me why I should be yours.
<Radar>
</rant>
<shevy>
free sex
tvon has joined #ruby
elaptics is now known as elaptics_away
<shevy>
and free monkeys
<shevy>
but fear the day when they can program
jonr22 has joined #ruby
davedev2_ has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
<MirenaT>
Radar: some of ur points are great
<Radar>
Thanks.
<MirenaT>
but i do not think that your approach is good
The_Phoenix has joined #ruby
monod has quit [Ping timeout: 264 seconds]
_djbkd has quit [Remote host closed the connection]
ptrrr has quit [Quit: ptrrr]
The_Phoenix has quit [Max SendQ exceeded]
leafybasil has quit [Remote host closed the connection]
theberlin has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
sargas has quit [Quit: This computer has gone to sleep]
toretore has joined #ruby
<apeiros_>
MirenaT: somehow I think the part about "I don't think your approach is good" is precisely the point he made about you :)
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
triple_b has quit [Ping timeout: 246 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros_>
and I share his view. with such a weak pitch, you'll not get top notch people interested.
Dmr has quit [Ping timeout: 246 seconds]
The_Phoenix has joined #ruby
Aswebb_ has quit []
The_Phoenix has quit [Max SendQ exceeded]
mistermocha has quit [Remote host closed the connection]
<Radar>
MirenaT: Please elaborate.
The_Phoenix has joined #ruby
<apeiros_>
Radar: howdy
The_Phoenix has quit [Max SendQ exceeded]
<Radar>
apeiros_: good $LOCAL_TIME_OF_DAY, sir
<apeiros_>
I'm surprised that you invest so much time in this :)
* apeiros_
hands Radar a ctcp time
<Radar>
apeiros_: I invest because I care.
<Radar>
I want people to put effort into their jobs.
<apeiros_>
yeah, the world would be a much better place if people did
<MirenaT>
Ok. this conversation becomes useless, so I will indeed elaborate:
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
hiyosi has joined #ruby
Renich has quit [Quit: leaving]
<MirenaT>
1. You are rushing with your conclusions; 2. You are judging without knowing; 3. I am here not to look for investor but to request for support, and therefore whoever is interested to know more - he/she will write me a personal message
mistermocha has joined #ruby
<MirenaT>
I don't discuss my project in details not because i don't care but because I don't want to discuss it with the world
<MirenaT>
but to discuss it with someone who will pay attention
sambao21 has joined #ruby
<Radar>
Why should I, or anyone here, expend effort into writing you when your pitch is so bland?
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Radar>
Not even a single iota of useful differentiating information about you or your company from the 100s of others out there.
jheg has joined #ruby
Renich has joined #ruby
<apeiros_>
MirenaT: let's assume I'm a top notch coder. why would I want to do the effort of contacting you? if I'm a top notch coder, I already have a good job.
SouL has quit [Ping timeout: 252 seconds]
justin_pdx has joined #ruby
<Radar>
"I want a Ruby programmer who is also a co-founder" is essentially your entire pitch
<shevy>
are you two the target audience
<bricker>
Radar: sounds like a solid career path.
<Radar>
shevy: Potentially.
SouL has joined #ruby
<shevy>
nah come on guys ;)
<bricker>
"What do you do?" "I'm a co-founder."
bkulbida has quit [Ping timeout: 272 seconds]
owen1 has joined #ruby
<owen1>
i have a rest endpoint /login. when the user was found i return 200. what should be the status code if the user was found but not active? 200 with a message or 404?
anaeem1_ has quit [Remote host closed the connection]
plutonic has joined #ruby
<MirenaT>
Sorry for not being precise Radar
<shevy>
isn't 404 only when a page does not exist?
<owen1>
maybe i should return 409 ?
<Radar>
MirenaT: I accept your apology.
<Radar>
owen1: 404 is fine
plashchynski has quit [Quit: plashchynski]
robbyoconnor has quit [Ping timeout: 245 seconds]
juanpaucar has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
Yzguy has joined #ruby
stunder has joined #ruby
Musashi007 has quit [Client Quit]
pwh has quit []
kaiZen has joined #ruby
jimms has joined #ruby
scripore has joined #ruby
devbug has joined #ruby
stunder has quit [Read error: Connection reset by peer]
pwh has joined #ruby
<scripore>
I have a #<Date: 2015-01-04 ((2457027j,0s,0n),+0s,2299161j)> object. anyone know how I can convert it to seconds since epoch?
jimms_ has joined #ruby
jimms has quit [Read error: Connection reset by peer]
brb3 has quit [Quit: ZZZzzz…]
lidaaa has quit [Ping timeout: 244 seconds]
<scripore>
nvm. I think I got it, .strftime('%s')
pwh has quit [Client Quit]
stunder has joined #ruby
sambao21 has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Renich has quit [Quit: leaving]
aef has joined #ruby
jonr22 has joined #ruby
leafybasil has joined #ruby
rekky has joined #ruby
jheg has quit [Quit: jheg]
Cust0sL1men has quit [Ping timeout: 240 seconds]
spyderman4g63 has quit [Remote host closed the connection]
sinkensabe has quit [Ping timeout: 272 seconds]
ghr has joined #ruby
Cust0sL1men has joined #ruby
dcarmich has joined #ruby
rekky has quit [Client Quit]
art-solopov has quit [Quit: Konversation terminated!]
sinkensabe has joined #ruby
Spooner has joined #ruby
lordkryss has joined #ruby
uptownhr has quit [Quit: uptownhr]
RegulationD has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
sent1nel has quit [Remote host closed the connection]
riotjones has joined #ruby
it0a has quit [Quit: WeeChat 1.1.1]
pontiki has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sent1nel has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sambao21 has quit [Quit: Computer has gone to sleep.]
lanemeyer has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
jen_ has left #ruby [#ruby]
uptownhr has joined #ruby
jimms has joined #ruby
jamgood9_ has joined #ruby
jimms_ has quit [Read error: Connection reset by peer]
riotjones has quit [Ping timeout: 250 seconds]
sambao21 has joined #ruby
olivier_bK has joined #ruby
AlphaTech has joined #ruby
Yzguy has quit [Quit: I'm sleeping, go away.]
Limix has quit [Quit: Limix]
jamgood9_ has quit [Ping timeout: 265 seconds]
kaiZen has quit [Quit: Computer has gone to sleep.]
sjuxax has joined #ruby
allcentury has quit [Ping timeout: 246 seconds]
brb3 has joined #ruby
<sjuxax>
Hello. I'm calling pid = Process.spawn command; Process.wait pid in a thread. The main process execution seems to stop here and wait for the process to end even though I just want the thread to wait. How can I fix this?
<apeiros_>
sjuxax: use non-blocking wait
wicope has quit [Read error: Connection reset by peer]
<workmad3>
wait: waits for a child process to exit...
<apeiros_>
Process::WNOHANG
<workmad3>
first line of the docs for Process.wait...
<apeiros_>
I think that's the flag
rooby has quit []
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sjuxax>
"The flags argument may be a logical or of the flag values Process::WNOHANG (do not block if no child available)"
<sjuxax>
from the docs
<sjuxax>
Sounds like it's just a way to return Process.wait() if there are no children?
<apeiros_>
available means exited
uptownhr has quit [Quit: uptownhr]
<sjuxax>
workmad3: Yes, I want the thread to wait for the process to exit, not the whole program.
<apeiros_>
sjuxax: try it
<sjuxax>
apeiros_: OK, good clarification. I'll try it now. Thanks.
<apeiros_>
you'll have to loop in your thread
<apeiros_>
don't forget to sleep, even if only e.g. sleep(0.01)
<apeiros_>
(10ms is an eternity for a computer)
OrbitalKitten has joined #ruby
baweaver has quit [Remote host closed the connection]