<pushnell>
Hey folks … noob question. I’m setting up a ruby/rails environment for the first time on Ubuntu. I see that `ri Hash` returns “Nothing known about Hash”. How can I install the rdocs for ruby 1.9.3?
grokdancer has joined #ruby
<pushnell>
This is Ubuntu 14.04
<multi_io>
the 0.9.2.2 is installed in ~/.rbenv/versions/1.9.3-p547/lib/ruby/1.9.1/rake/
<pushnell>
(I promise to RTFM thoroughly!)
<multi_io>
the 10.3.2 is installed in ~/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/rake-10.3.2/
<multi_io>
the latter doesn't seem to be in $:
<multi_io>
strange
fgo has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
grokdancer has quit [Client Quit]
teddyp1cker has quit [Ping timeout: 272 seconds]
whitewalrus has joined #ruby
<shevy>
pushnell ubuntu must have put them somewhere
tvw has quit []
binaryhat_ has quit [Quit: Leaving]
binaryhat has joined #ruby
<shevy>
multi_io when something is installed in gems/ directory then it means that it was installed as an add-on through rubygems.org (almost always)
kaspergrubbe has quit [Remote host closed the connection]
<pushnell>
shevy: yeah, Ubuntu has 1083 packages which match “ruby” … trying to find what I need. Also not sure if best done through a package or if I need a gem of some sort.
<shevy>
pushnell there is no gem that has the ruby docu as far as I know
<pushnell>
shevy: k, thanks, that helps :)
<shevy>
in normal compilation from source, there is this step:
tlarevo_ has quit [Remote host closed the connection]
Rollabunna has quit [Read error: Connection reset by peer]
benzrf has joined #ruby
thomaslnx has left #ruby ["Saindo"]
tlarevo has joined #ruby
chihhsin_ has quit [Quit: leaving]
catbusters_ has joined #ruby
chihhsin has joined #ruby
<multi_io>
shevy: my $: is ["/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/site_ruby/1.9.1", "/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/site_ruby/1.9.1/x86_64-linux", "/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/site_ruby", "/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/vendor_ruby/1.9.1", "/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/vendor_ruby/1.9.1/x86_64-linux", "/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/vendor_ruby", "/home/olaf/.rbe
<multi_io>
so there are all kinds of directories from the rbenv-managed ruby installation in there
bruno- has joined #ruby
zeroNones has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<multi_io>
but not the one where the gem-installed rake is located, which is ~/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/
zeroNones has joined #ruby
<multi_io>
isn't that strange?
grenierm has quit [Quit: grenierm]
catbusters_ has quit [Client Quit]
tlarevo has quit [Ping timeout: 272 seconds]
cirn0 has joined #ruby
catbusters_ has joined #ruby
teamplayer has joined #ruby
catbusters_ has quit [Client Quit]
Cecen_ has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
KnownSyntax_ is now known as KnownSyntax
<Cecen_>
Does anyone have any suggestions on something I can read quickly to brush up on Ruby well enough to make an interviewer think I know what I'm talking about?
<Cecen_>
I have a few books, but it's too much/too in-depth for skimming :[
<sevenseacat>
thats a scary idea
teamplayer has quit [Remote host closed the connection]
catbusters_ has joined #ruby
greenride has joined #ruby
cirn0 has quit [Ping timeout: 272 seconds]
HelperW___ has joined #ruby
catbusters_ has quit [Client Quit]
bmurt has joined #ruby
KnownSyntax has quit []
KnownSyntax has joined #ruby
freerobby has quit [Quit: Leaving.]
<sevenseacat>
i would suggest actually learning what you're talking about
HelperW___ has quit [Ping timeout: 272 seconds]
amystephen has quit [Quit: amystephen]
_shrine has quit [Ping timeout: 250 seconds]
_lexjm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
emocakes has joined #ruby
qualiabyte has joined #ruby
freerobby has joined #ruby
charliesome has joined #ruby
manzo has quit [Ping timeout: 272 seconds]
davasaurous has quit [Remote host closed the connection]
<sevenseacat>
i honestly dont know what that is trying to do
<awkwords>
i got a a handle on repo with goes through a page and needs to grab the #{name} as the key and make the #{value} clone_url
w09x has quit [Ping timeout: 260 seconds]
machete has quit [Ping timeout: 245 seconds]
j_mcnally has joined #ruby
pu22l3r has quit [Ping timeout: 258 seconds]
machete has joined #ruby
<fennec>
okay so
<fennec>
do you want a list of hashes, each of which contains name => string and somethingelse => string?
<fennec>
or do you want a hash of names to URLs?
<fennec>
or what?
bmurt has quit []
<awkwords>
names to urls
davasaurous has joined #ruby
pu22l3r has joined #ruby
<fennec>
i would personally suggest not calling it a list if it's a hash. people will expect an Array, not a Hash, if it's called that.
<fennec>
as for the hash, it's just {repo[:name] => repo[:url]}
<fennec>
or {repo['name'] => repo['clone_url']} or whatever the field is
HelperW___ has joined #ruby
davasaur_ has joined #ruby
<fennec>
brace. key, rocket, value. key, rocket, value. close brace. nothing more than that. no need to go into string-interpolation mode or anything.
<awkwords>
oic
fgo has joined #ruby
<awkwords>
works like a champ fennec thanks
davasaurous has quit [Ping timeout: 260 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
davasaur_ has quit [Ping timeout: 260 seconds]
HelperW___ has quit [Ping timeout: 272 seconds]
machete has quit [Ping timeout: 258 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Scotteh has quit [Ping timeout: 250 seconds]
saarinen has joined #ruby
machete has joined #ruby
saarinen has quit [Client Quit]
saarinen has joined #ruby
KLVTZ has quit [Ping timeout: 258 seconds]
fabrice31 has joined #ruby
Alx08-ru is now known as AlexRussia
stnly has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
fabrice31 has quit [Ping timeout: 250 seconds]
davasaurous has joined #ruby
flagg0204 has joined #ruby
moritzschaefer has quit [Ping timeout: 272 seconds]
braincra- has quit [Quit: bye bye]
Cheezebox has joined #ruby
<multi_io>
what does require 'foo' actually do?
<multi_io>
I thought it scans all directories in $: for foo.rb and loads the first one it finds.
teddyp1cker has joined #ruby
<multi_io>
apparently not.
fgo has quit [Remote host closed the connection]
<sevenseacat>
why apparently not?
braincrash has joined #ruby
<multi_io>
my $: is: ["/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/bundler-1.7.3/lib", "/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/site_ruby/1.9.1", "/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/site_ruby/1.9.1/x86_64-linux", "/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/site_ruby", "/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/vendor_ruby/1.9.1", "/home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/vendor_ruby/1.9.1/x86_64-linux",
<sevenseacat>
!gist because that's too long for a single message
<helpa>
http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
<sevenseacat>
also a lot easier to read
<multi_io>
when I run require 'bundler', it loads it from /home/olaf/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/bundler-1.7.3/lib/bundler.rb
<sevenseacat>
seems legit, thats the first thing in your load path
josh has joined #ruby
josh is now known as Guest33041
<multi_io>
(according to Bundler.method(:bundle_path).source_location)
<multi_io>
hm, what the hell
<multi_io>
you're right :P
<multi_io>
so installing that gem extended $: ?
<multi_io>
is that a common technique?
skip_freely has quit [Quit: skip_freely]
teddyp1cker has quit [Ping timeout: 260 seconds]
<sevenseacat>
i suspect it was something in rbenv that did it.
<multi_io>
haaa
<sevenseacat>
its shims or whatever it calls them
<multi_io>
wait, that first element in $: only gets added by the require 'bundler' call itself
RustyShackleford has quit [Ping timeout: 272 seconds]
freerobby has quit [Quit: Leaving.]
greenride has joined #ruby
greenride has joined #ruby
pu22l3r has joined #ruby
davasaurous has quit [Remote host closed the connection]
gaboesquivel has joined #ruby
davasaurous has joined #ruby
bruno- has joined #ruby
davasaurous has quit [Remote host closed the connection]
pu22l3r has quit [Ping timeout: 272 seconds]
easier has quit [Ping timeout: 250 seconds]
davasaurous has joined #ruby
InhalingPixels has quit [Remote host closed the connection]
dingus_khan has joined #ruby
bruno- has quit [Ping timeout: 258 seconds]
emmesswhy has quit [Quit: Leaving]
dkphenom has joined #ruby
ta has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
klmlfl has quit [Remote host closed the connection]
Alina-malina has joined #ruby
<dkphenom>
im new to ruby, and can't figure this out, maybe someone can help, I need to create an array with n copies of seperate objects passed to it...
mostlybadfly has quit [Quit: Connection closed for inactivity]
sigurding has joined #ruby
qohelet_ has joined #ruby
qohelet_ has quit [Client Quit]
maestrojed has quit [Quit: Computer has gone to sleep.]
yeticry has quit [Read error: Connection reset by peer]
i0n has joined #ruby
<i0n>
so i have a class with a instance variable i need to access in another class... i do require_relative 'myfile.rb'
<i0n>
set a attr_accessor :instance_variable
teddyp1cker has joined #ruby
<i0n>
and attr_reader in the other class
<i0n>
is this the right way to pass variables between classes?
yeticry has joined #ruby
rkalfane_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nobitanobi has quit [Remote host closed the connection]
mocfive_ has quit [Remote host closed the connection]
<dkphenom>
@hanmac, not quite, something like Array.new(n) { |x| x << obj }
<dkphenom>
but my condition inside { } is wrong :/
<dkphenom>
i want them to be separate objects, not coipes to the same obj
<dkphenom>
if that makes sense...
<Hanmac>
did you try that? Array.new(n) { obj.dup }
mocfive has quit [Ping timeout: 260 seconds]
HelperW___ has joined #ruby
sinkensabe has joined #ruby
<dkphenom>
oh man
<dkphenom>
im so dumb!
<dkphenom>
thanks hanmac
<dkphenom>
im a ruby newb :/
qohelet_ has joined #ruby
W0rmDr1nk has joined #ruby
rkalfane has joined #ruby
sinkensabe has quit [Remote host closed the connection]
MasterPiece has quit [Quit: Leaving]
HelperW___ has quit [Ping timeout: 272 seconds]
MasterPiece has joined #ruby
MasterPiece has quit [Remote host closed the connection]
MasterPiece_ has joined #ruby
AlexRussia_ has joined #ruby
mocfive has joined #ruby
AlexRussia has quit [Remote host closed the connection]
<Hanmac>
damm i need to find a gems constellation where Gem A does need gem B and gem B does also need gem A but both as runtime dependency
<apeiros>
Hanmac: force the situation and create those two gems?
<Hanmac>
hm yeah ok that would be possible too, but i wanted to see if there is already something like that ...
mofai has joined #ruby
oleo__ has quit [Quit: Verlassend]
<Hanmac>
for sample "test-unit" <> "power_assert" have a one with different types ... like "test-unit" does runtime depend of "power_assert" and "power_asset" does development depend on "test-unit"
<Hanmac>
"hoe" and "minitest" does have one with each other as development dependency
<Hanmac>
and "hoe-gemspec2" is the funniest because it does have itself as development dependency ;D
MasterPiece_ has quit [Changing host]
MasterPiece_ has joined #ruby
MasterPiece_ is now known as MasterPiece
chipotle has quit [Quit: cya]
GriffinHeart has joined #ruby
decoponio has joined #ruby
starkhallo has quit [Ping timeout: 246 seconds]
qohelet_ has quit [Quit: qohelet_]
iam3fun has joined #ruby
Channel6 has quit [Quit: Leaving]
qohelet_ has joined #ruby
binaryhat has quit [Ping timeout: 250 seconds]
fgo has joined #ruby
tagrudev has joined #ruby
GriffinHeart has quit [Ping timeout: 258 seconds]
Juzdan has joined #ruby
binaryhat has joined #ruby
apeiros has quit [Remote host closed the connection]
<_lazarevsky>
I wanna send an http GET request and would like to extract a parameter called "balls" from it
txdv has joined #ruby
FracV_ has joined #ruby
ramfjord has joined #ruby
dopiee has joined #ruby
fbernier has joined #ruby
ARCADIVS has joined #ruby
jbueza has joined #ruby
felixjet has joined #ruby
WildBamboo-Josh has joined #ruby
Nahra has joined #ruby
20WABIUE7 has joined #ruby
20WABI930 has joined #ruby
mbwe1 has joined #ruby
tanath has joined #ruby
fold has joined #ruby
hfp has joined #ruby
Jamo has joined #ruby
BraddBitt has joined #ruby
DrCode has joined #ruby
pandaant has joined #ruby
end_guy has joined #ruby
Pulpie has joined #ruby
hfp has quit [Max SendQ exceeded]
Nahra has quit [Max SendQ exceeded]
fold has quit [Max SendQ exceeded]
terlar has quit [Quit: WeeChat 1.0]
DrCode has quit [Max SendQ exceeded]
tanath has quit [Max SendQ exceeded]
Nahra has joined #ruby
hfp has joined #ruby
GriffinHeart has quit [Ping timeout: 255 seconds]
DrCode has joined #ruby
Spami_ has quit [Quit: This computer has gone to sleep]
zettam_ has joined #ruby
fold has joined #ruby
armyriad has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
armyriad has joined #ruby
MiracleBlue has quit [Changing host]
MiracleBlue has joined #ruby
terlar has joined #ruby
user111 has quit [Quit: Page closed]
ionelmc has quit [Ping timeout: 272 seconds]
bedouin_ has quit [Ping timeout: 272 seconds]
dukedave has quit [Ping timeout: 272 seconds]
ceej has quit [Ping timeout: 272 seconds]
evrei has joined #ruby
nifty__ has quit [Changing host]
nifty__ has joined #ruby
FracV_ is now known as FracV
jpinnix___ has quit [Changing host]
jpinnix___ has joined #ruby
ggherdov__ has quit [Changing host]
ggherdov__ has joined #ruby
paolooo has joined #ruby
cbetta_ has quit [Changing host]
cbetta_ has joined #ruby
bcavileer has quit [Changing host]
bcavileer has joined #ruby
bjeanes has quit [Changing host]
bjeanes has joined #ruby
tadejm___ has joined #ruby
tadejm___ has quit [Changing host]
lectrick has quit [Changing host]
lectrick has joined #ruby
thesheff17 has quit [Changing host]
thesheff17 has joined #ruby
kyote has quit [Changing host]
kyote has joined #ruby
rfv has quit [Changing host]
rfv has joined #ruby
ramblinpeck_ has quit [Changing host]
ramblinpeck_ has joined #ruby
natewalck has joined #ruby
natewalck has quit [Changing host]
olleromo__ has joined #ruby
olleromo__ has quit [Changing host]
troter has quit [Changing host]
troter has joined #ruby
Tranquility_ has quit [Changing host]
Tranquility_ has joined #ruby
comma8 has quit [Changing host]
comma8 has joined #ruby
ballPointPenguin has quit [Changing host]
ballPointPenguin has joined #ruby
halfdan has quit [Changing host]
halfdan has joined #ruby
jeregrine has joined #ruby
yo61 has quit [Changing host]
yo61 has joined #ruby
jeregrine has quit [Changing host]
rkjaer has quit [Changing host]
rkjaer has joined #ruby
HashNuke has joined #ruby
CJD14______ has joined #ruby
HashNuke has quit [Changing host]
CJD14______ has quit [Changing host]
Guest85414______ has quit [Changing host]
Guest85414______ has joined #ruby
vcoinminer______ has quit [Changing host]
vcoinminer______ has joined #ruby
whitewalrus has quit [Changing host]
whitewalrus has joined #ruby
pusewicz_ has quit [Changing host]
pusewicz_ has joined #ruby
andrewcarter_ has quit [Changing host]
andrewcarter_ has joined #ruby
amitchellbullard has quit [Changing host]
amitchellbullard has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
joshingly has quit [Changing host]
joshingly has joined #ruby
ionelmc has joined #ruby
zettam has quit [Ping timeout: 258 seconds]
_tpavel has quit [Ping timeout: 258 seconds]
mikecmpbll has joined #ruby
yottanami has left #ruby [#ruby]
tectonic has quit []
dukedave has joined #ruby
maasha has quit [Changing host]
maasha has joined #ruby
cougarten_ has joined #ruby
Heartbroken has quit [Changing host]
Heartbroken has joined #ruby
anarang has quit [Changing host]
anarang has joined #ruby
_lazarevsky has quit [Changing host]
Juanchito has quit [Changing host]
_lazarevsky has joined #ruby
Juanchito has joined #ruby
paolooo has quit [Changing host]
paolooo has joined #ruby
ionelmc has quit [Changing host]
ionelmc has joined #ruby
dukedave has quit [Changing host]
dukedave has joined #ruby
bedouin_ has joined #ruby
sigurding has quit [Quit: sigurding]
_tpavel has joined #ruby
ceej has joined #ruby
Takle has joined #ruby
arup_r has joined #ruby
rdark has joined #ruby
paolooo has quit [Ping timeout: 246 seconds]
eugenk has joined #ruby
ashleah_ is now known as ashleah
elaptics`away is now known as elaptics
fgo has joined #ruby
Jake232 has joined #ruby
eugenk has left #ruby [#ruby]
N1cXP8ChUBFe3 has quit [Quit: Leaving]
melik_ has quit [Quit: Computer has gone to sleep.]
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
rikai has joined #ruby
chth0n has joined #ruby
fgo has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
kedare has joined #ruby
Xeago has joined #ruby
elfo222 has joined #ruby
Morkel has joined #ruby
awestroke has joined #ruby
realDAB has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sigurding has joined #ruby
einarj has joined #ruby
cougarten_ has quit [Ping timeout: 255 seconds]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
thomasxie has joined #ruby
matadon has joined #ruby
<matadon>
Anybody know how to get the argument list for the current method *without* using the splat operator?
<matadon>
Not the names of the args, but the set of arguments passed to a method.
<j416>
matadon: what is the problem you are trying to solve?
<matadon>
Either that, or a tracer that can dump "class.method (args)" for a subset of classes? :)
thomasxie has left #ruby [#ruby]
cougarten_ has joined #ruby
ephemerian has joined #ruby
realDAB has quit [Quit: realDAB]
BlkDynmt has joined #ruby
marr has joined #ruby
shredding has quit [Quit: shredding]
marr is now known as Guest4960
Seraff has joined #ruby
atomi has quit [Quit: Changing server]
cougarten has joined #ruby
timgauthier has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
<apeiros>
matadon: there is no way. you could use Method#parameters + Kernel#local_variable_get to get the current values of arguments of the current method. but that's about it.
<apeiros>
matadon: also generally if you're interested in answers, it's good etiquette to respond to follow up questions.
mike32 has joined #ruby
cougarten_ has quit [Ping timeout: 258 seconds]
Waheedi has joined #ruby
adironduck has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
abuzze has quit [Ping timeout: 272 seconds]
AndChat| has quit [Ping timeout: 246 seconds]
fgo has joined #ruby
krisquigley has joined #ruby
<_lazarevsky>
hey guys
<_lazarevsky>
I was wondering if I could get some help real quick?
cougarten has quit [Ping timeout: 250 seconds]
arup_r has quit [Remote host closed the connection]
bruno- has joined #ruby
abuzze has joined #ruby
<_lazarevsky>
uri = URI('http://localhost:3000') -> Net::HTTP.get(uri) <- I run these two commands and am forwarded to Processing by Rails::WelcomeController#index as */* (WHICH DOES NOT EVEN EXIST!!!!)
<_lazarevsky>
however, when I try the same uri from a browser, my request is forwarded to the appropriate controller
<_lazarevsky>
what's up with that?
ptrrr has quit [Quit: ptrrr]
tkuchiki has joined #ruby
<apeiros>
_lazarevsky: you may want to ask that in #rubyonrails
<_lazarevsky>
there's no activity thgere
<_lazarevsky>
but ok thanks
Wolland_ has joined #ruby
<apeiros>
oh so you're a cross-poster. nice.
fgo has quit [Ping timeout: 245 seconds]
<_lazarevsky>
:P
<_lazarevsky>
that made my chuckle
<_lazarevsky>
kudos
<matadon>
apeiros: Sorry, stepped away for a bit. Hmm… that's a pity. Feels like an odd thing to be missing — will see if the core team would mind a patch (or if it was deliberately left out of set_trace_func for a reason).
<apeiros>
I'm tempted to /kick _lazarevsky :-P
Spami has joined #ruby
wolf__ has joined #ruby
bruno- has quit [Ping timeout: 258 seconds]
Wolland has quit [Ping timeout: 272 seconds]
<_lazarevsky>
apeiros: may I ask you a real quick question though
<apeiros>
people who cross post without informing that they're cross-posting generally land on my mental ignore
<apeiros>
but sure, you can ask. maybe I even answer.
<_lazarevsky>
apeiros: Why is uri = URI('http://localhost/ping:3000') not valid? (getting Errno::ECONNREFUSED: Connection refused - connect(2)) but uri = URI('http://localhost:3000') works just fine?
<_lazarevsky>
can you spot the error?
nichtdiebohne has joined #ruby
<_lazarevsky>
i'm trying to programatically access my website from a cron script..
<_lazarevsky>
thanks, and I do apologise for cross posting
<_lazarevsky>
or rather for not letting you know. lesson learned
Spami_ has joined #ruby
Spami has quit [Ping timeout: 250 seconds]
<_lazarevsky>
apeiros: think I found it
<_lazarevsky>
apeiros: I believe there's a port attribute that I can use
Xeago has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
matadon has quit [Quit: Leaving.]
<apeiros>
port should be after server/host. not at the end.
<apeiros>
otherwise port 80 is used and the :3000 is part of PATH_INFO
SouL has joined #ruby
AlSquire has joined #ruby
arup_r has joined #ruby
joined has joined #ruby
Tomme has quit [Ping timeout: 250 seconds]
wolf__ has quit [Quit: Leaving]
gvenkat has joined #ruby
GriffinHeart has quit [Ping timeout: 258 seconds]
<_lazarevsky>
apeiros: what do you mean after server/host?
<DaniG2k>
guys is there a way to curl a page from ruby that requires ssl auth?
<DaniG2k>
can I pass it an id_rsa file or something?
snath has quit [Ping timeout: 250 seconds]
linojon has quit [Ping timeout: 246 seconds]
Advocation has joined #ruby
<txdv>
yes you can
manzo has joined #ruby
<DaniG2k>
txdv: how would you suggest I do so?
sigurding has quit [Quit: sigurding]
<txdv>
now thats the difficult part
linojon has joined #ruby
mostlybadfly has joined #ruby
<jhass>
id_rsa sounds like SSH, not SSL
mofai has quit [Ping timeout: 272 seconds]
<DaniG2k>
right sorry
<jhass>
so SSH or client certs?
<DaniG2k>
i need to curl some pages that require my id_rsa.pub key
<jhass>
that makes no sense
<jhass>
curl is a http tool, id_rsa.pub should be your public ssh key
Takle has quit [Remote host closed the connection]
<DaniG2k>
hmm
<DaniG2k>
I can curl from a bash shell
<jhass>
show
<DaniG2k>
I want to basically be able to do it from a rails script
<siwica>
I am using grape to develop a REST API and need to store some objects on the server. Is there some database I easily dump objects in and read them in the next request without having to much to worry about database design?
Wolland_ has quit [Remote host closed the connection]
jhass|off is now known as jhass
Wolland has joined #ruby
adironduck has joined #ruby
linojon has quit [Quit: linojon]
<siwica>
I am building a REST API with grape and want to share a bunch of objects between the individual requests. What is the easiest way to achieve this?
joonty has joined #ruby
Hobogrammer has quit [Ping timeout: 255 seconds]
timonv_ has joined #ruby
Takle has joined #ruby
jhass is now known as jhass|off
emocakes__ has joined #ruby
dennus has joined #ruby
jhass|off is now known as jhass
emocakes has quit [Ping timeout: 246 seconds]
Wolland has quit [Ping timeout: 255 seconds]
timonv_ has quit [Remote host closed the connection]
dblessing has joined #ruby
dblessing has quit [Client Quit]
siwica has quit [Ping timeout: 255 seconds]
endash has joined #ruby
chipotle has joined #ruby
oivoodoo_ has quit [Remote host closed the connection]
marr has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
marr is now known as Guest25615
Guest25615 has quit [Client Quit]
timonv_ has joined #ruby
phoo1234567 has joined #ruby
phoo1234567 has quit [Max SendQ exceeded]
timonv_ has quit [Read error: Connection reset by peer]
ta has joined #ruby
phoo1234567 has joined #ruby
tadejm___ has quit [Quit: Connection closed for inactivity]
fabrice31 has joined #ruby
InhalingPixels has joined #ruby
Takle has quit [Remote host closed the connection]
bruno- has joined #ruby
timonv_ has joined #ruby
oivoodoo has joined #ruby
bruno- has quit [Ping timeout: 258 seconds]
vesuvious has joined #ruby
<Hanmac>
shevy did you see another new options for gemtree ;P
ixti has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
agjacome has quit [Quit: leaving]
yfeldblum has quit [Ping timeout: 272 seconds]
sprihodko has joined #ruby
jottr_ has joined #ruby
bogeyd6_ has quit [Ping timeout: 246 seconds]
LiohAu_ has joined #ruby
sigurding has joined #ruby
krisquigley has quit [Remote host closed the connection]
Ironhetch has joined #ruby
fsapo has joined #ruby
20WABI930 is now known as noopq
Tomme has quit [Ping timeout: 272 seconds]
ndrei has quit [Ping timeout: 255 seconds]
<Ironhetch>
How does this help?
a__ has quit [Ping timeout: 250 seconds]
* wasamasa
is confused
a__ has joined #ruby
<Ironhetch>
Wasamasa what's on mind?
rimenes has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wasamasa>
you've joined just a minute ago and the very first thing you write is "How does this help?"
ndrei has joined #ruby
<Ironhetch>
I meant what's the advantage of ruby?
<Hanmac>
the language syntax ... imo its much more nicer than php or C++ in most of the cases
catphish has joined #ruby
Aaaal has quit [Quit: Aaaal]
<wasamasa>
you can write pretty nice code with it
<shevy>
Ironhetch you don't code in ruby, you write poetry and it does stuff afterwards
ldnunes has joined #ruby
<Hanmac>
shevy hm for poetry you could also use the language "Shakespeare" for that ;P
chipotle has quit [Read error: Connection reset by peer]
chipotle_ has quit [Client Quit]
SouL has quit [Ping timeout: 250 seconds]
GriffinHeart has quit [Ping timeout: 250 seconds]
<shevy>
Hanmac I need a minimal IRB
<shevy>
something you can quickly embed into a larger program
yfeldblum has joined #ruby
Takle has joined #ruby
<catphish>
i'm trying to execute this code on thin, but thin seems to want to buffer everything: http://paste.codebasehq.com/pastes/8r99qahxjb5k0ldv15 other webservers seem happy to stream, but i also need multithreading
marr has joined #ruby
aclearman037 has joined #ruby
pu22l3r has joined #ruby
a__ has quit [Ping timeout: 245 seconds]
lolmaus has joined #ruby
chipotle has joined #ruby
chipotle has quit [Max SendQ exceeded]
dingus_khan has joined #ruby
chipotle has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
chipotle has quit [Max SendQ exceeded]
fennec has quit [Quit: This computer has gone to sleep]
xwrt777 has joined #ruby
pu22l3r has quit [Ping timeout: 246 seconds]
chipotle has joined #ruby
<shevy>
Hanmac I just wrote a silly script called open.rb - now I will simply call "open bla.xls" and it will open it in .xls... if it is a .cgi file then it will load open firefox... and so forth
Takle has quit [Remote host closed the connection]
dingus_khan has quit [Ping timeout: 246 seconds]
Takle has joined #ruby
KingOfKarlsruhe has quit [Quit: ZNC - http://znc.in]
krisquigley has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
lolmaus has joined #ruby
fgo has joined #ruby
shock_one has quit [Quit: Computer has gone to sleep.]
<jhass>
shevy: it contains exec(['xdg-open']+ARGV) ?
<shevy>
nope
<shevy>
can't rely on system tools
DaniG2k has quit [Quit: leaving]
<jhass>
?
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cya]
Takle has quit [Ping timeout: 272 seconds]
xwrt777 has quit [Ping timeout: 255 seconds]
klaut has joined #ruby
no-ob has joined #ruby
paulfm has joined #ruby
sk87 has joined #ruby
Morkel has quit [Quit: Morkel]
britneywright has joined #ruby
Klumben has joined #ruby
lolmaus has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Juzdan has joined #ruby
oivoodoo has quit [Remote host closed the connection]
UKn0Meh has joined #ruby
fgo has quit [Remote host closed the connection]
endash has quit [Quit: endash]
LekeFly has joined #ruby
johnhamelink has joined #ruby
sigurding has quit [Ping timeout: 246 seconds]
pasv_ has quit [Ping timeout: 255 seconds]
Xeago_ has joined #ruby
Takle has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
no-ob has quit [Remote host closed the connection]
pasv has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
pasv is now known as Guest77659
shock_one has joined #ruby
aspires has joined #ruby
timonv_ has quit [Remote host closed the connection]
endash has joined #ruby
fennec has joined #ruby
doritostains has joined #ruby
Cheezebox has joined #ruby
dangerousdave has joined #ruby
pu22l3r has joined #ruby
shredding has joined #ruby
gaussblurinc1 has joined #ruby
no-ob_ has joined #ruby
dangerousdave has quit [Client Quit]
lolmaus_ has joined #ruby
Mon_Ouie has quit [Ping timeout: 255 seconds]
Tomme has joined #ruby
lolmaus has quit [Ping timeout: 272 seconds]
sumark has quit [Remote host closed the connection]
MasterPiece has quit [Changing host]
MasterPiece has joined #ruby
lolmaus_ has quit [Client Quit]
cmxu has joined #ruby
sumark has joined #ruby
Advocation has quit [Quit: Advocation]
oivoodoo has joined #ruby
<Hanmac>
shevy did you see at my gemtree what the newest option can do?
lolmaus has joined #ruby
jaygen_ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sevenseacat has joined #ruby
g0bl1n has joined #ruby
oivoodoo has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
Rollabunna has joined #ruby
Juzdan has quit [Read error: Connection reset by peer]
Juzdan has joined #ruby
charliesome has joined #ruby
Cheezebox has quit [Ping timeout: 258 seconds]
GriffinHeart has quit [Ping timeout: 255 seconds]
mercwithamouth has joined #ruby
mercwith1mouth has joined #ruby
tlarevo_ has quit [Remote host closed the connection]
blackjid has joined #ruby
a__ has joined #ruby
timonv_ has quit [Remote host closed the connection]
lolmaus has quit [Read error: Connection reset by peer]
centrx has joined #ruby
weems|mac has joined #ruby
weems|mac has joined #ruby
gaussblurinc1 has quit [Quit: Leaving.]
centrx is now known as Guest73100
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
ixti has joined #ruby
lolmaus has joined #ruby
orolo has joined #ruby
erGoline has joined #ruby
hellangel7 has joined #ruby
douglasssssss has joined #ruby
dblessing has quit [Quit: dblessing]
<erGoline>
hi :) I'm struggling with a problem using prawn gem, anyone has used it before and has a little time to help me? It's about conditional repetear
ptrrr has quit [Quit: ptrrr]
Hanmac has quit [Ping timeout: 272 seconds]
mercwith1mouth has quit [Ping timeout: 250 seconds]
mercwithamouth has quit [Ping timeout: 250 seconds]
arup_r has joined #ruby
Guest73100 has quit [Quit: The plan is programmed into every one of my one thousand robots]
sambao21 has quit [Quit: Computer has gone to sleep.]
cntrx has joined #ruby
cmxu has joined #ruby
cntrx has quit [Client Quit]
HelperW has quit [Ping timeout: 255 seconds]
<shevy>
dont know if many have advanced knowledge of prawn
cntrx has joined #ruby
Advocation has joined #ruby
<shevy>
I have never heard the term "conditional repeater" before
HelperW has joined #ruby
sambao21 has joined #ruby
<shevy>
the best you can do is to simply ask the question and hope for the best (that is, that someone knows prawn sufficiently well to be able to answer your question)
oo_ has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
cntrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Hanmac has joined #ruby
spastorino has joined #ruby
cntrx has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
cntrx has quit [Client Quit]
joast has quit [Quit: Leaving.]
centrx has joined #ruby
oleo has joined #ruby
yfeldblum has joined #ruby
teamplayer has joined #ruby
bruno-_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
sylvanica has joined #ruby
_tpavel has quit [Quit: Leaving]
sylvanica is now known as slester
yfeldblum has quit [Ping timeout: 246 seconds]
fennec has quit [Quit: This computer has gone to sleep]
RaCx has quit [Quit: Computer has gone to sleep.]
silkfox has joined #ruby
ptrrr has joined #ruby
bruno-_ has quit [Ping timeout: 258 seconds]
teamplayer has quit [Remote host closed the connection]
jerius has joined #ruby
arup_r has quit [Remote host closed the connection]
terlar has quit [Quit: WeeChat 1.0]
Channel6 has joined #ruby
starkhallo has joined #ruby
<multi_io>
why is there a "gem build" command when you could also do it with a Rakefile?
<multi_io>
i.e. you can build the gem in a Rakefile task, using a gemspec defined in the Rakefile, right?
timonv_ has joined #ruby
<multi_io>
is that frowned upon?
klaut has quit [Remote host closed the connection]
djstorm has quit [Ping timeout: 240 seconds]
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
fennec has joined #ruby
fennec has quit [Changing host]
fennec has joined #ruby
workmad3 has joined #ruby
<shevy>
multi_io I can use gem without rake
RaCx has joined #ruby
gregf has quit [Ping timeout: 260 seconds]
<jhass>
multi_io: really just different frontends to the same library call
Ankhers has joined #ruby
<multi_io>
but if you're using gem build, it seems like gem is doing things that rake should do?
<multi_io>
i.e. the responsibilities aren't clear
<waxjar>
it's the other way round i think
<jhass>
rake really just calls rubygems here
<waxjar>
gem is the package manager, rake is.. idk what rake is really
<wasamasa>
a build tool
<centrx>
it's for cleaning your lawn
<multi_io>
jhass: that's what I mean, so why even provide the gem build command-line frontend
<wasamasa>
so, a more ruby-like make
<shevy>
multi_io because gem does not want to depend on rake
<jhass>
multi_io: as shevy said, so you can build gems without rake or manually calling the library
<multi_io>
what if some of the files references in the gemspec aren't checked in, but must be created dynamically first?
i0n has quit [Quit: leaving]
<shevy>
what do you mean "aren't checked in"?
<multi_io>
then you'd have to do it all in rake
<shevy>
what are you talking about
<shevy>
a .gemspec is almost always like 10-20 lines
<shevy>
it is also valid ruby code there
<multi_io>
*files referenced
<shevy>
Dir[]
<shevy>
there you go.
<multi_io>
I mean, what if some of those files have to be created dynamically
<shevy>
you only need to tell gem what files you need to put it into your .gem archive
<Hanmac>
i will make my own programming language and i will call it "OR" ... because it will be very difficult to google after that ;P
<jhass>
multi_io: that doesn't invalidate the general case. You can always find a special case where one tool makes sense where the other doesn't
BlkDynmt has quit [Ping timeout: 260 seconds]
<multi_io>
i.e. they're not there immediately after checking out the project, so "gem build" would fail then.
<shevy>
multi_io look, all files that have to be part of the gem, must be published into the .gem file ok?
<jhass>
Hanmac: name it \()/ then
BlkDynmt_ has joined #ruby
<shevy>
so when you push that .gem file, it must contain whatever you wish to distribute
<Hanmac>
jhass: hm that might be even better ... ;P
<shevy>
gem build will not fail
<multi_io>
if its files array references a non=existing file?
<shevy>
then you forgot to generate them
<shevy>
so you failed as a gem author
<multi_io>
yeah, I have a rake task that generates them.
<wasamasa>
lol
maasha has quit [Ping timeout: 246 seconds]
<shevy>
good
<shevy>
then invoke that task before
<waxjar>
i'd have a pre-commit hook i think, something like that
<multi_io>
so you'll have to run gem build through rake, not directly
<shevy>
I don't have to use rake
<waxjar>
that generates the files and checks them into the git repository
<waxjar>
then Dir[] can do it's makes, or `git files` or whatever
<shevy>
waxjar where do you use that pre-commit hook thing? is that part of ruby or git?
<multi_io>
waxjar: that sucks
Takle has quit [Remote host closed the connection]
<waxjar>
shevy: git
<multi_io>
sort of
tvw has quit []
<waxjar>
why?
realDAB has joined #ruby
<multi_io>
because checking in redundant stuff is a bad idea in general
<multi_io>
confuses users, who might be inclined to edit that file after checkout
mleone has joined #ruby
andrewcarter_ is now known as andrewcarter
mike32 has quit [Quit: Leaving]
<waxjar>
generated_files/*.rb would fix that, i think
<jhass>
multi_io: what's your problem here really? you can't seriously expect a tool drops functionality because it might interfere with your single usecase. If you want to prevent gem build for _your_ project, simply check for the files existence in your .gemspec
ta has quit [Remote host closed the connection]
<jhass>
it's just ruby code after all
anarang has quit [Quit: Leaving]
<multi_io>
I'm just wondering about design rationales here
<jhass>
I think they have been explained
<jhass>
if you can't grasp them that's not our issue
<multi_io>
my use specific case is dynamically generated documentation (md) files
rgsteele has joined #ruby
<shevy>
multi_io I have one ruby project where I need to check in several yaml files that reside on another part of the filesystem, before I can run gem build. My current solution is that I do not call gem directly but instead I wrote a wrapper script over gem, that will have all my special hooks (in this case, it simply copies the yaml files before running gem build & gem push)
easier has quit [Quit: easier]
<waxjar>
multi_io: gem generates its own documentation when installed on the users end
Xeago_ has quit [Remote host closed the connection]
zeroNones has joined #ruby
Xeago has joined #ruby
<multi_io>
waxjar: it's more complicated, I have a manually written readme as part of the documentation, and it includes code snippets and their output.
Xeago has quit [Remote host closed the connection]
<multi_io>
which should be generated
<waxjar>
i see
teamplayer has joined #ruby
Xeago has joined #ruby
<multi_io>
I already did this several years ago and it worked, with a gemspec defined inside the Rakefile
teamplayer has quit [Client Quit]
<multi_io>
I'm just trying to get up to speed on how this is supposed to be done these days in Ruby :)
bruno-_ has joined #ruby
<shevy>
so your end users require to have rake available
<multi_io>
no, not the consumers of the gem
AxonetBE has quit [Quit: AxonetBE]
freerobby has joined #ruby
Xeago has quit [Remote host closed the connection]
<multi_io>
just anyone who wants to create the gem. he'd checkout, say "rake gem", and that creates the output readme from the manually written part and the included code samples (which it runs dynamically), and includes that in the gemspec.
GodPuppet has joined #ruby
poikon has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
Takle has joined #ruby
mleone has quit [Read error: Connection reset by peer]
GriffinHeart has joined #ruby
doritostains has quit [Quit: doritostains]
<multi_io>
I've been away from Ruby (at least larger-scale Ruby build systems) for some time, and I'm trying to wrap my head around how the workflows are supposed to be these days
bruno-_ has quit [Ping timeout: 245 seconds]
realDAB has quit [Quit: realDAB]
wpp has quit [Ping timeout: 258 seconds]
<jhass>
you're overthinking this
<jhass>
do what works for you
<multi_io>
yeah, ok
<workmad3>
multi_io: I'd suggest you make sure you list rake as a development dependency in the gemspec though
RaCx has quit [Read error: Connection reset by peer]
timonv_ has quit [Read error: Connection reset by peer]
keen_ has joined #ruby
RaCx has joined #ruby
RaCx has quit [Client Quit]
sambao21 has quit [Quit: Computer has gone to sleep.]
GriffinHeart has quit [Ping timeout: 246 seconds]
ARCADIVS has quit [Quit: WeeChat 0.4.3]
GodPuppet has quit [Remote host closed the connection]
mleone has joined #ruby
<shevy>
multi_io oh, if I want to create a .gem, then I want a .gemspec
mleone has quit [Read error: Connection reset by peer]
threesixes has joined #ruby
Macaveli has quit [Ping timeout: 255 seconds]
joast has joined #ruby
fsapo has quit [Ping timeout: 245 seconds]
dumdedum has quit [Ping timeout: 272 seconds]
mleone has joined #ruby
<multi_io>
I was just a bit confused by the plethora of tools.
<shevy>
there is only gem
<shevy>
but if you want to get fancy, you can also include bundler
ffranz has joined #ruby
<jhass>
shevy: one sentence. What does bundler do?
albedoa has joined #ruby
shredding has quit [Quit: shredding]
<multi_io>
I've been doing Java stuff mostly in recent years, and there you don't have separate commandline frontends for "getting all the dependencies" or "building the jar". It would all be done via tasks in Gradle (Java build tool, Groovy-based, similar to rake)
<shevy>
jhass it does an array of different things, from generating gemspec files to installing or uninstalling a bunch of different gems
<shevy>
including the use of github based projects
terlar has joined #ruby
shredding has joined #ruby
gregf has joined #ruby
<jhass>
it doesn't really generate gemspecs, it just has a command to spit out template for a gem
rafacv has joined #ruby
<workmad3>
shevy: strictly speaking, bundler doesn't handle the gem install or uninstall either... it uses rubygems for that
<workmad3>
shevy: bundler just takes over the dependency resolution
<multi_io>
there was no bundler when I last looked at Ruby build systems. There was gem though, and rake.
jottr_ has quit [Ping timeout: 272 seconds]
<jhass>
multi_io: bundlers primary focus is to ensure a consistent environment for an application, rendering things like gemsets obsolete
autochthon has joined #ruby
sambao21 has joined #ruby
<shevy>
it seems to even have rake-like capabilities: bundle exec
jespada has joined #ruby
<workmad3>
multi_io: bundler came into existence about 4 years ago now to handle the issues around resolving transitive dependencies for a stable environment
<jhass>
everything beyond is just helpers nobody found another place for
ndrei has joined #ruby
<workmad3>
shevy: that's not rake-like capabilities
tkuchiki has joined #ruby
<workmad3>
shevy: that's purely a wrapper around setting RUBY_OPTS to automatically load bundler
<jhass>
shevy: not at all. I suggest educating yourself more about bundler before speaking of it
Xeago has joined #ruby
<shevy>
Here is the official documentation: "Execute a script in the context of the current bundle"
bruno-_ has joined #ruby
Smujo has joined #ruby
fgo has quit [Remote host closed the connection]
<shevy>
so what is a script :>
<jhass>
yes, what does that have to do with rake
<workmad3>
shevy: any command
<shevy>
jhass you call a script
rafacv has left #ruby [#ruby]
axsuul has joined #ruby
<workmad3>
shevy: you can do 'bundle exec echo "shevy doesn't know what this does" ' if you want :P
<shevy>
jhass rake is like a collection of scripts that may have interdependencies
<shevy>
workmad3 where is the script?
<jhass>
shevy: sounds like you didn't understand rake either
<workmad3>
shevy: 'script' is a misnomer... it just takes an arbitrary shell command
<workmad3>
shevy: or shell script
<workmad3>
shevy: or any valid thing you could type into your command line
oivoodoo has quit [Remote host closed the connection]
yfeldblum has joined #ruby
a__ has quit [Ping timeout: 272 seconds]
saarinen has quit [Quit: saarinen]
maletor_ has joined #ruby
renderful has quit [Remote host closed the connection]
qmfnp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle has quit [Remote host closed the connection]
kenneth has joined #ruby
andrewjanssen has joined #ruby
glacius has quit [Quit: WeeChat 0.3.8]
ffranz has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
<Hanmac>
toretore: as you can see the bot is threadsafe ... means "safe from threads" ;D
einarj has quit [Ping timeout: 260 seconds]
qmfnp has joined #ruby
adironduck has quit [Quit: adironduck]
adironduck has joined #ruby
<centrx>
"safe because it never uses threads"
adironduck has quit [Client Quit]
kaspergrubbe has quit [Read error: Connection reset by peer]
<catphish>
toretore: i have a rack app, when a web request comes in, it creates a fiber, inside that fiber it makes another outbound http request, an instance of a class is returned to rack which resumes that fiber in order to stream the data from the http request out through rack
starless has joined #ruby
dingus_khan has joined #ruby
kaspergrubbe has joined #ruby
RaCx has joined #ruby
Takle has joined #ruby
mityaz has quit [Quit: Leaving]
kobain has joined #ruby
<catphish>
so far this has been a very effective way to create a streaming rack proxy, but when i run it with a threaded web server, it seems that the thread that streams the data out to users is not the same as the thread that called my rack app
einarj has joined #ruby
mr-foobar has joined #ruby
maestrojed has joined #ruby
kobain has quit [Max SendQ exceeded]
jeremy04 has joined #ruby
<catphish>
might try an evented rather than threaded web server model to overcome this for now
gsd has joined #ruby
zeroNones has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krisquigley has quit [Remote host closed the connection]
krisquigley has joined #ruby
noopq has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 250 seconds]
kobain has joined #ruby
<jhass>
Hanmac: well, you still can wrap a non thread safe library in a thread safe way and even make it thread safe that way. You probably just wouldn't gain any performance from that ;P
Advocation has quit [Quit: Advocation]
dingus_khan has quit [Ping timeout: 272 seconds]
<Hanmac>
jhass: if you want to do it with my stuff (i mean the c++ one) be my guest and make a pull request from it ;P
vesuvious has quit [Ping timeout: 250 seconds]
<jhass>
Hanmac: I already told you your C++ proactively prevents contributions ;)
Jinkins has joined #ruby
Jinkins_1 has joined #ruby
zeroNones has joined #ruby
h4b0 has joined #ruby
<h4b0>
Guys I have problem with one test(capybara).I made autocomplete directive in angular with jquery-ui and it working fine on website, but i have problem with pass integration test(capybara). I use poltergeist as driver with phantomjs. Probably problem is that, i use watch(angular) function for input(model), which giving permission to autocomplete after written sign hash '#'.And this is funny cuz
<h4b0>
when I break test with binding.pry and i manually write instructions that working fine :) In autocomplete i use source from json(ajax).. problem can be here too ;/ Problem is that capybara didn't see suggests ;/ http:/http://pastebin.com/ssvrP9iM - Test http://pastebin.com/DqQnvANa - watch function
<h4b0>
dumdedum has quit [Ping timeout: 255 seconds]
mjwhitta has joined #ruby
roolo has joined #ruby
krisquigley has quit [Ping timeout: 260 seconds]
aspiers has quit [Ping timeout: 245 seconds]
mjwhitta has quit [Client Quit]
<yo61>
Can anyone tell me how to tell YAML output to use folded blocks instead of literal blocks?
LekeFly has joined #ruby
<shevy>
yaml output?
<shevy>
I only use YAML.dump
<yo61>
some_has.to_yaml
<yo61>
Or indeed, YAML.dump
<shevy>
what is a folded block compared to a literal block?
ryanleesipes has joined #ruby
dhmbdq has quit [Remote host closed the connection]
<mikecmpbll>
what's the most sensible way to initialize a hash with a bunch of keys, from an array of said keys?
<toretore>
catphish: have you tried the one where you return a [-1 headers, readable] response?
<mikecmpbll>
values to nil
<toretore>
can't recall which one it is, think it's em based
moted has quit []
<mikecmpbll>
actually nvm i don't need to do that.
<mikecmpbll>
not my day today.
<catphish>
toretore: i don't think so
moted has joined #ruby
shock_one has quit [Quit: Computer has gone to sleep.]
renderful has joined #ruby
<jhass>
mikecmpbll: for completeness: keys.zip([]).to_h
robbyoconnor has joined #ruby
shock_one has joined #ruby
<Hanmac>
jhass so what do you have against my c++ code? (because its a ruby binding) or do you think that its making it more thread safe is not worth the problems?
andrewjanssen has quit [Quit: Leaving...]
kaspergrubbe has quit [Read error: Connection reset by peer]
<mikecmpbll>
jhass: ;)
maletor_ has quit [Quit: Computer has gone to sleep.]
<jhass>
Hanmac: it's Hanmac code! j/k, I really don't have the time and motivation to dive deep into C++, wxWidgets and thread safety in those ;)
<Hanmac>
jhass: hm imostly would use rubys thread functions ... because wx does have its own ... but i dont think its worth to port them to ruby
Advocation has joined #ruby
bdnelson has joined #ruby
jeremy04 has quit [Remote host closed the connection]
sailias1 has joined #ruby
sailias has quit [Quit: Leaving.]
nobitanobi has joined #ruby
<toretore>
catphish: fyi that's not going to be any more efficient than without fibers
<toretore>
you're still blocking on each fiber.resume
<shevy>
Hanmac have you released wxwidget bindings as a gem yet?
<Hanmac>
shevy no but i am still developing
sevenseacat has quit [Quit: Leaving.]
<shevy>
only gem releases count!
<catphish>
toretore: actually, i could pass the whole code block into the Stream class!
<shevy>
just push it
<catphish>
and just execute is there
<shevy>
and lemme test it
orolo has quit [Quit: This computer has gone to sleep]
<toretore>
catphish: you still won't get any concurrency unless you use the webserver's own concurrency primitives
rippa has joined #ruby
<toretore>
you need to yield back to the server at some point
flowerhack has joined #ruby
<catphish>
toretore: the point of this code isn't to achieve concurrency, its to be able to stream data to the client instead of buffering it
<toretore>
well then you need support for that in the server too :)
<catphish>
toretore: yes :)
Sou|cutter has quit [Quit: WeeChat 0.4.3]
threesixes has quit [Remote host closed the connection]
Sou|cutter has joined #ruby
<toretore>
which means you're going to have to use threads, callbacks or fibers depending on the implementation of the server
sailias1 has quit [Client Quit]
sailias has joined #ruby
mocchi has quit [Ping timeout: 245 seconds]
orolo has joined #ruby
renderful has quit [Remote host closed the connection]
<catphish>
toretore: what just occurred to me though is that rather than passing fiber back to rack, i can pass some params and let all the code execute in the Stream#each
Juzdan has joined #ruby
<catphish>
this avoids fibers and my original problem (i think)
<toretore>
sure, it would be the same
<catphish>
oh, actually it doesn't because by that point is would be too late to change the headers and response code :(
<toretore>
the fiber here is not adding anything
<shevy>
I suddenly read steroids rather than fiber
andrewjanssen has joined #ruby
Xaitec has joined #ruby
<toretore>
what matters is what you'll replace `sleep 1` with
mocchi has joined #ruby
<catphish>
in my real implementation, the fiber does an http request
<toretore>
using?
grokdancer has joined #ruby
<catphish>
net/http
shredding has quit [Quit: shredding]
<catphish>
let me paste code, this is silly :)
<toretore>
which will still block the server calling thread
arup_r has joined #ruby
Sou|cutter has quit [Client Quit]
GriffinHeart has joined #ruby
mattmcclure has joined #ruby
Sou|cutter has joined #ruby
<catphish>
that's not a problem afaik
<toretore>
but it defeats the purpose
<toretore>
you're not gaining anything at all
<catphish>
the purpose is to stream the response as it happens
<toretore>
the fiber doesn't add that capability
kaspergrubbe has joined #ruby
Lewix has joined #ruby
Juzdan has quit [Ping timeout: 272 seconds]
<catphish>
there must be a reason i did it this way :| i wish i remembered what it was
sepp2k has quit [Quit: Leaving.]
tlarevo has joined #ruby
momomomomo has joined #ruby
<toretore>
your fiber at this point is just a function call as far as concurrency is concerned
choke has joined #ruby
<catphish>
well i'll try moving the whole logic that generates the output into "each" method
Eiam has joined #ruby
Takle has quit [Remote host closed the connection]
sepp2k has joined #ruby
Juzdan has joined #ruby
fennec has quit [Quit: Leaving]
<catphish>
yes, i just remembered why i do it this way!
GriffinHeart has quit [Ping timeout: 258 seconds]
<catphish>
the only way to stream a response from net/http is to use a block form of http#request
cndiv has joined #ruby
bricker`work has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
<catphish>
so i'm certain i need fibers
kireevco has joined #ruby
g0bl1n has quit [Quit: g0bl1n]
oponder has quit [Remote host closed the connection]
<toretore>
you still don't, but ok ;)
<catphish>
i'd love to know another way
<catphish>
the requirement is that i need to 1) make an http request 2) return its headers to rack 3) stream its data to rack
<toretore>
define stream
<catphish>
i need each chunk of data received by net/http to be yielded to rack
Kricir has joined #ruby
<catphish>
currently i do: response.read_body { |chunk| Fiber.yield(chunk) }
juco has joined #ruby
yfeldblum has joined #ruby
joonty has quit [Quit: Leaving]
<toretore>
class Streamer; def each; req{|res| res.read_body{|c| yield c } } end end
troyready has joined #ruby
<toretore>
just do the request inside the streaming each
<toretore>
it will have the same effect
Takle has joined #ruby
pushnell has joined #ruby
jaygen has joined #ruby
lsone has quit [Ping timeout: 255 seconds]
<toretore>
but, you could of course use a fiber
GeorgesLeYeti has quit [Quit: Quitte]
icarus has joined #ruby
<toretore>
class Streamer; def each; f=Fiber.new{ req{|res| res.read_body{|c| Fiber.yield c } } }; while d=f.resume; yield d end; end end
<toretore>
same thing
<toretore>
just more complex
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
lemur has joined #ruby
h4b0 has quit []
yfeldblum has quit [Ping timeout: 258 seconds]
rippa has joined #ruby
malcolmva has quit [Ping timeout: 245 seconds]
aspiers has joined #ruby
AndChat| has quit [Ping timeout: 258 seconds]
<catphish>
toretore: i can't do the request inside the streaming each, because it's too late to give the headers to rack at that point :(
jaygen_ has quit [Ping timeout: 258 seconds]
linojon has quit [Quit: linojon]
Synthead has joined #ruby
ryanleesipes has quit [Ping timeout: 272 seconds]
<toretore>
sure you can, it's exactly the same
<catphish>
rack needs to be given the final headers along with the instance of the enumerable
<toretore>
[200, headers, Stream.new]
BTRE has quit [Ping timeout: 240 seconds]
<catphish>
ok... and where would the request get run?
waheguru has joined #ruby
<catphish>
sorry if i'm being dim here!
<toretore>
inside Stream#each
<toretore>
of course, if you need to wait for a response before you can pass the headers to rack, that's different
<catphish>
but then it can't provide "headers" and 200 that you just used previously
mercwithamouth has joined #ruby
mercwith1mouth has joined #ruby
<toretore>
but the problem still does not inherently need a fiber
linojon has joined #ruby
<toretore>
there is no concurrency happening
HelperW has joined #ruby
shock_one has quit [Quit: Computer has gone to sleep.]
maloik_ has quit [Ping timeout: 250 seconds]
endash has quit [Quit: endash]
<toretore>
the key point to realize is that the fiber in this case is nothing more than a function call
<toretore>
replace "fiber" with "generator" and it's clearer
<catphish>
toretore: i understand that in theory there's no concurrency, but because of the net/http and rack APIs, its a necessary hack :(
<toretore>
or "iterator"
<toretore>
nope, still not necessary ;(
Xaitec has quit [Remote host closed the connection]
<toretore>
;) i mean
<toretore>
;D ;D ;D ;D !!!!
RustyShackleford has quit [Ping timeout: 255 seconds]
Takle has quit [Remote host closed the connection]
diegoviola has joined #ruby
<catphish>
is there an actual practical way i can avoid it?
<toretore>
i just showed you
kaspergrubbe has quit [Read error: Connection reset by peer]
lemur has quit [Ping timeout: 260 seconds]
maloik has joined #ruby
<toretore>
class Streamer; def each; req{|res| res.read_body{|c| yield c } }; end; end
<catphish>
you said "of course, if you need to wait for a response before you can pass the headers to rack, that's different"
<catphish>
which is exactly my problem
deric_skibotn has joined #ruby
<catphish>
i need to pass the headers from the http response to rack
kaspergrubbe has joined #ruby
starless has quit [Quit: WeeChat 1.0]
thagomizer has joined #ruby
<waxjar>
does #read_body return an enumerator when you do not give it a block?
tobago has joined #ruby
<waxjar>
if so, could just do [req.code, req.headers, req.read_body]
ephemerian has left #ruby [#ruby]
roolo has quit [Quit: Leaving...]
<catphish>
waxjar: i hope not, or i'm going to feel really stupid, i think because it's inside a "http.request do" block, that will not work, but i'll try it
<toretore>
catphish: i am going to assume that by "wait for a response" here means "wait only for the headers to return"
garbanotas has quit [Read error: Connection reset by peer]
<catphish>
toretore: precisely
garbanotas has joined #ruby
SDr has quit [Read error: Connection reset by peer]
sk87_ has joined #ruby
SDr has joined #ruby
SDr has quit [Changing host]
SDr has joined #ruby
bricker`work has quit [Read error: Connection reset by peer]
chth0n has quit [Ping timeout: 246 seconds]
<catphish>
thanks for all the suggestions by the way
bricker`work has joined #ruby
sk87 has quit [Read error: Connection reset by peer]
<catphish>
its helping me re-understand the problem, which i solved in this fiber manner way a long time ago
<nobitanobi>
morning
RaCx has quit [Ping timeout: 258 seconds]
<waheguru>
HI
<joelanders>
driveby question: does 10.times {puts ("" + Random.new.bytes(1)).encoding} work as you expect?
<eval-in_____>
eam => incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError) ... (https://eval.in/193720)
MissionCritical has joined #ruby
kaspergrubbe_ has joined #ruby
<eam>
because you can't have those two bytes in a valid utf8 string
<catphish>
joelanders: as far as i can tell, ruby is trying its best to undo your mess, but you should make sure all strings are the right encoding to begin with
benzrf|offline is now known as benzrf
lsone has joined #ruby
<eam>
joelanders: if you want to add together random byte sequences you can't have it encoded
<catphish>
if you're making a binary string, define it as such, "" is not binary
<eam>
because an encoding is, by definition, not encoded
<eam>
er, a random string is
<toretore>
catphish: to be fair, using a fiber to block the thread in this case is not a bad idea at all
robbyoconnor has quit [Ping timeout: 260 seconds]
<eam>
and an encoded string is by definition not random
nettoweb has joined #ruby
<toretore>
catphish: i.e. your original reasoning was sound
nettoweb has quit [Max SendQ exceeded]
musl has quit [Client Quit]
fgo has joined #ruby
<catphish>
toretore: thanks, thats what i thought, until my webserver exploded it :(
g0bl1n has joined #ruby
musl has joined #ruby
robbyoconnor has joined #ruby
<joelanders>
eam: ah ok
<catphish>
joelanders: just make sure all strings are the right encoding at the start of their life and you'll be fine
saarinen has joined #ruby
<eam>
life was better when languages simply dealt in byte arrays
<toretore>
NO
<catphish>
i also disagree
<toretore>
URE WRONG
square-r00t has joined #ruby
<eam>
#goisright
<catphish>
besides, ruby strings are just byte strings with a tag on them
square-r00t has left #ruby ["i don’t know why i think pressing ctrl-c harder will help."]
<toretore>
UTF-8 IS THE SAVIOR OF MANKIND
kaspergrubbe has quit [Ping timeout: 260 seconds]
<eam>
catphish: no they're a lot more as evidenced by the above
lolmaus_ has joined #ruby
<catphish>
eam: not at all, its only the methods that are advanced, the storage is very simple
<eam>
"they're just this, except for the other stuff"
<catphish>
you can just tell it everything is binary if you want and the methods will treat them as such
<eam>
I think you just agreed with me ;-)
M-Technic has joined #ruby
<joelanders>
like when I have a constant "\x00\x00\x04\x17\x27\x10\x19\x80", I actually need to say "\x00\x00\x04\x17\x27\x10\x19\x80".force_encoding('BINARY')?
<catphish>
perhaps :)
Tomme has joined #ruby
<toretore>
CHARACTERS NOT BYTES!!!!!
<catphish>
joelanders: yes
lsone has quit [Ping timeout: 246 seconds]
bennylope has joined #ruby
<momomomomo>
serialize everything
<toretore>
i mean codepoints
<eam>
toretore: characters are for interaction with humans and I don't want to do that
<shevy>
you don't want to interact with humans
<shevy>
you are so evil
<shevy>
perl has made you that way I bet eam
<eam>
wtf
<toretore>
not for interaction, but for human communication which you inevitable will have to deal with ;)
nettoweb has joined #ruby
<catphish>
i wish ruby had a better way to define a binary string
d2dchat has quit [Remote host closed the connection]
ramfjord has joined #ruby
<eam>
shevy: perl has had better unicode support for a decade btw :)
<joelanders>
doesn't python do something like u'blah'
<shevy>
I liked ruby 1.8.x more too
<shevy>
all those annoying encoding errors that we now have
stunder has quit [Remote host closed the connection]
LiohAu_ has joined #ruby
cirn0 has joined #ruby
enriclluelles has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
Juzdan has joined #ruby
failshel_ has joined #ruby
patric100e99 has quit [Quit: leaving]
lsone has joined #ruby
patrick99e99 has joined #ruby
Takle has joined #ruby
RaCx has quit [Ping timeout: 245 seconds]
alex88 has quit [Quit: Leaving...]
orolo has joined #ruby
teddyp1c_ has joined #ruby
RaCx has joined #ruby
failshel_ has quit [Read error: Connection reset by peer]
zorak8 has joined #ruby
failshel_ has joined #ruby
RaCx has quit [Client Quit]
failshell has quit [Ping timeout: 258 seconds]
cirn0 has quit [Ping timeout: 272 seconds]
qhartman has joined #ruby
teddyp1cker has quit [Ping timeout: 258 seconds]
<joelanders>
ok one more thing, when I force_encoding one string to UTF-8 and another string to ASCII-8BIT, then try to concatenate them, I get Encoding::CompatibilityError
RaCx has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
GriffinHeart has joined #ruby
wallerdev has joined #ruby
<freeone3000>
joelanders: UTF-8 does not allow every ASCII-8BIT character.
Takle has quit [Remote host closed the connection]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<joelanders>
\x00 + \x00 should be alright?
agjacome has joined #ruby
rgsteele has joined #ruby
<joelanders>
ok that works...
oivoodoo has joined #ruby
lkba has joined #ruby
fabrice31 has joined #ruby
<joelanders>
freeone3000: yeah this is probably it, thanks
d2dchat has joined #ruby
jay has joined #ruby
jay is now known as rubyonrailed
pandaant has quit [Quit: Lost terminal]
kaspergrubbe_ has quit [Read error: Connection reset by peer]
<joelanders>
freeone3000: does ASCII-8BIT allow every UTF-8 character?
<freeone3000>
joelanders: Yes.
yfeldblum has joined #ruby
pandaant has joined #ruby
<joelanders>
so a+b or b+a should work?
qba73 has quit []
<joelanders>
freeone3000: one of them, i mean
<freeone3000>
I'm not sure what the resulting encoding of the string would be.
wald0 has quit [Quit: Lost terminal]
melik_ has joined #ruby
<joelanders>
freeone3000: that makes me feel better
<joelanders>
freeone3000: :)
GriffinHeart has quit [Ping timeout: 258 seconds]
<jhass>
joelanders: use pack to construct byte sequences, not +
<joelanders>
freeone3000: I have an example where (b+a) and (a+b) both raise
kaspergrubbe has joined #ruby
siwica has joined #ruby
stunder has joined #ruby
<joelanders>
freeone3000: I'm just being pedantic at this point, after spending this long trying to understand it
lsone has quit [Ping timeout: 245 seconds]
doritostains has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fabrice31 has quit [Ping timeout: 246 seconds]
Cheezebox has joined #ruby
marlonandrade has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
sleepee has quit [Quit: Leaving]
lsone has joined #ruby
<freeone3000>
joelanders: It's possible the resulting string is UTF-8, which would cause an illegal sequence to be generated both ways. Which is why you should use pack.
claymore has quit [Quit: Leaving]
rbenv has joined #ruby
claymore has joined #ruby
noopq has joined #ruby
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<maasha>
Guys, I have a problem. My app is too slow :o(. On the test data run time is ~1.5min for the non-forked version and 5-6 min for the forked version, where I would have expected ~45 secs.
sdegutis has joined #ruby
narph has quit [Quit: Connection closed for inactivity]
<maasha>
test data, test script and profiles are here: ftp://ftp_20140915_588:R4r-EtqQejbG@ftp.dna.ku.dk
autochthon has quit [Quit: autochthon]
<sdegutis>
How do you create a Ruby string from a C string?
douglasssssss has joined #ruby
<maasha>
sdegutis: did you check README.EXT?
<sdegutis>
Oh! Thanks I will.
<maasha>
rb_str_new
Cheezebox has quit [Ping timeout: 260 seconds]
<sdegutis>
rb_str_new_cstr()
<sdegutis>
But thanks :)
<maasha>
sdegutis: yeah, there are different useful flavors.
<sdegutis>
+1
<sdegutis>
i wrote my first singleton ruby method in C! woot.
<sdegutis>
ok time to do it in python now
<maasha>
.oO(nerd)
mocfive has quit [Remote host closed the connection]
<maasha>
:o)
shosti has joined #ruby
<sdegutis>
hmm
mocfive has joined #ruby
djbkd has joined #ruby
<sdegutis>
I don't see a way to get the C string back out.
rippa has joined #ruby
<sdegutis>
Oh, StringValue
<maasha>
thats t
<maasha>
*thats it
<maasha>
Or StringValuePtr
<maasha>
Or StringValueCStr
<sdegutis>
StringValueCStr
<sdegutis>
yeah that one is better for me
<sdegutis>
but its really just rb_string_value_cstr
claymore has quit [Ping timeout: 272 seconds]
Takle has joined #ruby
jeremy04 has joined #ruby
HelperW has quit [Quit: Computer has gone to sleep.]
claymore has joined #ruby
techsethi has quit [Quit: techsethi]
HelperW has joined #ruby
tkuchiki has joined #ruby
catphish has quit [Quit: Leaving]
cina has quit [Ping timeout: 245 seconds]
AlSquirrel has quit [Quit: This computer has gone to sleep]
<sdegutis>
woot, Core::Keycodes.getkey(3)
<sdegutis>
so exciting!
mocfive has quit [Ping timeout: 255 seconds]
codecop has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
shackleford has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 245 seconds]
mercwith1mouth has quit [Ping timeout: 245 seconds]
stunder has quit [Quit: Screw you guys I'm going home]
lkba has joined #ruby
jottr_ has joined #ruby
tkuchiki has quit [Ping timeout: 255 seconds]
IceDragon has quit [Ping timeout: 255 seconds]
HelperW has quit [Ping timeout: 272 seconds]
<centrx>
Overriding new, good idea or great idea?
IceDragon has joined #ruby
<jhass>
strong reason needed idea
aspires has quit []
<jhass>
but not insane since we got Object#allocate
jbueza has joined #ruby
doritostains has quit [Quit: doritostains]
claymore has quit [Quit: Leaving]
claymore has joined #ruby
poguez_ has joined #ruby
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
yacks has quit [Ping timeout: 272 seconds]
apeiros has joined #ruby
b00stfr3ak has quit [Ping timeout: 272 seconds]
benlieb has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
fgo has joined #ruby
m8 has joined #ruby
djbkd has quit [Remote host closed the connection]
b00stfr3ak has joined #ruby
Takle has quit [Ping timeout: 246 seconds]
yacks has joined #ruby
jrhe_ has joined #ruby
iceden has joined #ruby
m8 has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
elstif has quit [Quit: Leaving.]
St_Marx has quit [Quit: Ex-Chat]
benlieb has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
bennylope has quit [Quit: My Tandy 1000 has gone to sleep. ZZZzzz…]
<benzrf>
jhass: you mean Class#allocate
<jhass>
eh, yes
zwischenzug has joined #ruby
<zwischenzug>
kinda new to ruby, but wondering if there is a recipe for creating an object from a hash
agent_white has joined #ruby
<jhass>
zwischenzug: kinda vague question
<Hanmac>
zwischenzug: you are looking for OpenStruct
<eam>
it's not documented that the second arg can be an integer
<eam>
IO docs on the method all use "w", "r" etc
tvw has quit []
<RickyGreen>
Been a long time since i've use IRC, Started to read Ruby on Rails 3 Tutorial by Michael Hartl, I've got to the github part but i'm struggling to set sublime text editor to my default editor. i'm running OSX 10.8.
<eam>
my flags are coming in from json, which can't do octal constants
<eam>
so I used a string for mode
<apeiros>
eam: my docs do
benlieb has joined #ruby
<RickyGreen>
If anyone could give me a pointer, that would be great, i'm a web designer so hopefully i should pick it up without a problem, i say that.. :P
<apeiros>
eam: the structure is as direct as can be.
<agent_white>
RickyGreen: This is it? :)
<apeiros>
you call File.open, you look up File.open.
<apeiros>
if it is inherited, you get the superclass' definition.
tomgavin has joined #ruby
TheNet has joined #ruby
<apeiros>
and yes, there should be as many docs on open as there are classes implementing it. that's OO.
momomomomo has joined #ruby
<RickyGreen>
Agent_white, i need some help setting my editor up in terminal, could you help, i've not dealt with terminal before so i need to get into it :)
<agent_white>
RickyGreen: What editor? And that's a bit more broad than just Ruby (more a question for your OS)... but I may be able to help?
d2dchat has quit [Remote host closed the connection]
bennylope has joined #ruby
sambao21 has joined #ruby
endash has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
treehug88 has quit [Ping timeout: 260 seconds]
<agent_white>
RickyGreen: Feel free to PM me.
danijoo has joined #ruby
<RickyGreen>
True, Sorry for the assumption, I'm on OS 10.8 and i use Sublime Text editor, i'm open to applications that would help me program ruby, i use sublime text editor to code HTML / CSS so i figured it's a decent place to start.
kaspergrubbe has quit [Read error: Connection reset by peer]
<RickyGreen>
Well, i don't mind PM, thanks for your hospitality. :)
GriffinHeart has quit [Ping timeout: 272 seconds]
d2dchat has joined #ruby
Cheezebox has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
endash has quit [Client Quit]
reset has joined #ruby
shackleford has joined #ruby
mary5030 has quit [Remote host closed the connection]
Aaaal has quit [Quit: Aaaal]
troulouliou_dev has joined #ruby
mikeg has joined #ruby
Juzdan has quit [Remote host closed the connection]
Juzdan has joined #ruby
linojon has quit [Quit: linojon]
sambao21 has quit [Quit: Computer has gone to sleep.]
hellangel7 has quit [Remote host closed the connection]
b00stfr3ak has quit [Quit: leaving]
|splat| has left #ruby [#ruby]
b00stfr3ak has joined #ruby
cougarten has joined #ruby
sambao21 has joined #ruby
<shevy>
so many mac users
diegoviola has joined #ruby
awestroke has quit [Remote host closed the connection]
<agent_white>
SOH manee.
<shevy>
pipework, look man looook! "<apeiros> na, rubys docs are not always as good as they should be"
<shevy>
when I said that to pipework he would not want to believe me :(
dingus_khan has joined #ruby
nobitanobi has quit [Ping timeout: 258 seconds]
<pipework>
shevy: They usually work fine for me. If they don't, source is open.
<shevy>
that's why I keep on people to ask you for the docs - you always have the link ready :>
<apeiros>
shevy: of course not. he's a ghost. we don't believe in ghosts, ghosts don't believe you.
<pipework>
I think I get to benefit from being a native English speaker though, so I can bridge gaps in documentation easier than others.
Hobogrammer has joined #ruby
<apeiros>
pipework: no amount of nativeness ever gaps "ri Kernel#select: see Kernel#select" :-p
<shevy>
are you saying that the japanese are bad at writing english documentation
nfk has joined #ruby
Mars___ has joined #ruby
<shevy>
you simply have to read it out aloud while wearing a japanese thinking hat
<agent_white>
"What Would Matz Think"
<shevy>
"file katana katana! -> chop off file -> remove file -> File.delete"
<shevy>
precisely agent_white!
g0bl1n has quit [Quit: g0bl1n]
<shevy>
when you think like matz
<shevy>
you won't need any documentation at all
mary5030 has joined #ruby
m8 has joined #ruby
<eam>
apeiros: not nearly as direct as it could be - each re-definition of open() could have no docs other than "go here"
jeremy04 has joined #ruby
<shevy>
circular documentation pointers are a lot of fun
<eam>
instead of a bunch of repetative fluff and then one line of "oh yeah look here"
<eam>
parts of the docs are spread all over
<apeiros>
eam: you misunderstand. there is no redefinition of open.
<apeiros>
File.open *is* IO.open.
<shevy>
but it looks like a File!
<pipework>
apeiros: Without having used it, the documentation seems not optimal but would be enough for me, knowing how `man` works and what select(2) is.
<apeiros>
and ruby docs used to not have docs of inherited methods. people were even more confused.
<shevy>
eam you should have been there when ruby docu has used multiple html frames
<apeiros>
pipework: that was part of your english discourse? fascinating :-p
dingus_khan has quit [Ping timeout: 272 seconds]
<pipework>
apeiros: I don't know what you mean.
<eam>
apeiros: I know. There's repetition in the docs
<eam>
and it obscures wtf is going on
<eam>
btw I'm pretty sure there's no way to get at mode constants in ruby
<eam>
like at all
<eam>
like S_IWUSR = 0200
<apeiros>
eam: IMO perl docs are overall very good. but I don't agree with the issue you are having. but I doubt that any of us will change stance on this :)
<eam>
I'm just complaining
<eam>
if I was going to fix it I could totally document it
Tricon has quit [Quit: Leaving...]
fgo has joined #ruby
zoo-zed has joined #ruby
<apeiros>
some of them are there. but I don't see anything which could be S_IWUSR.
yxhuvud has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
<apeiros>
maybe it's not a portable flag? no idea. don't know S_IWUSR :-/
<agent_white>
I think Ruby docs are awesome... least I haven't had any issues with them so far.
<agent_white>
The examples are fantastic.
<eam>
it's the user writable permissions bit
<eam>
apeiros: compare open() in ruby doc to the perl one
<eam>
er sorry agent_white
<apeiros>
eam: ah, does are not defined indeed.
<shevy>
agent_white especially the parts that are not documented
<apeiros>
s/does/those/
MaciejCzyzewski has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<agent_white>
eam: Oh wow... I take back what I said.
<apeiros>
eam: anyway, if you want to contribute - zzak is awesome at pushing doc patches
<eam>
yeah he rules, if I have time I will
rafacv has joined #ruby
<eam>
super trivial patch
mary5030 has quit [Ping timeout: 272 seconds]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MaciejCzyzewski has quit [Client Quit]
<apeiros>
just time consuming :)
<agent_white>
shevy: Yeah I've run into a few of those... not sure what the person who wrote the function was thinking.
* apeiros
hates trivial but time consuming tasks :-(
<shevy>
I guess it is old code
<shevy>
those things in stdlib tend to be underdocumented
<agent_white>
It's not required to document stdlib stuff?
<shevy>
in 2000 I don't think it was!
dda has joined #ruby
jack_rabbit has joined #ruby
<agent_white>
._.
<eam>
in ruby the docs are fine for like "eh good enough to make it run" but you'll stab yourself in the face trying to prove specific particular behavior
fgo has quit [Ping timeout: 246 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
<eam>
eg "just open a file" vs "open this file with exactly these parameters and behaviors"
HelperW has quit [Quit: Computer has gone to sleep.]
<pipework>
apeiros: What did you mean earlier?
<shevy>
is this again about the ruby parser
HelperW has joined #ruby
<agent_white>
Hm. It would be good fun to contribute to the docs.
<shevy>
that
jheg has joined #ruby
<shevy>
or document your own stuff more
<shevy>
so that when you contribute it, it'll be perfect
<apeiros>
pipework: that knowledge about man is unrelated to being an english native speaker
a_ has joined #ruby
<agent_white>
shevy: "How this function works: tears, hope, and magic."
fgo has joined #ruby
<shevy>
and a lot of blood
<agent_white>
LOTS
<shevy>
and some occasional screaming
<agent_white>
And possibly a few sacrificial goats.
<pipework>
apeiros: Well it's tangentially related, to me. Because I can bridge the gaps on the admittedly not user-friendly documentation.
<pipework>
It's not a judgement about your grasp of the language.
diegoviola has quit [Quit: WeeChat 1.0]
rgsteele has quit [Ping timeout: 250 seconds]
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
dc___ has quit [Remote host closed the connection]
jerius has joined #ruby
chrishough has quit [Ping timeout: 272 seconds]
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
Tomme has quit [Ping timeout: 245 seconds]
fgo has quit [Ping timeout: 250 seconds]
kaspertidemann has quit []
<eam>
fun trivia: how do you guarantee that a shell is / and isn't, invoked in exec()
rgsteele has joined #ruby
qonufx has quit [Remote host closed the connection]
kaspertidemann has joined #ruby
mikeg has quit [Remote host closed the connection]
MaciejCzyzewski has quit [Ping timeout: 260 seconds]
<eam>
there's so much ugly magic baked into that method
p0sixpscl has quit [Read error: Connection reset by peer]
p0sixpsc_ has joined #ruby
p0sixpsc_ has quit [Max SendQ exceeded]
<apeiros>
pipework: precisely
<shevy>
pipework can even make up his own documentation in his mind
p0sixpscl has joined #ruby
<apeiros>
eam: I'm actually curious to hear the answer to that
<pipework>
shevy: Well, I understand context and what the method does.
lampd1 has quit [Remote host closed the connection]
jarto has joined #ruby
cocotton has joined #ruby
workmad3 has joined #ruby
gsd has joined #ruby
ephemerian has joined #ruby
<bricker`work>
Agree/disagree: Private methods in modules should or should not be accessible from base modules when included
tlarevo has quit [Remote host closed the connection]
<apeiros>
bricker`work: ¿que?
<pipework>
disagree: Don't use base modules.
ephemerian has quit [Client Quit]
<bricker`work>
er... confusing way to ask but you get it
<centrx>
private methods, what a n00b
<apeiros>
what's a "base module"?
<bricker`work>
apeiros: self.included(base)
<pipework>
apeiros: Probably the main mixin to get all the mixins.
<shevy>
I guess he included a module
diegoviola has joined #ruby
fabrice31 has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
<eam>
the only way to guarantee a shell is avoided, given cmd = %w{stuff to run} is: if cmd.length == 1 Kernel.exec([cmd[0], cmd[0]]) else Kernel.exec([cmd[0], cmd[0]], *cmd[1..-1])
LangeOortjes has quit [Remote host closed the connection]
tobago has quit [Remote host closed the connection]
wallerdev has joined #ruby
thumpba has joined #ruby
__arnold has joined #ruby
rezzack has joined #ruby
__arnold has left #ruby [#ruby]
rimenes has joined #ruby
<Hanmac>
RickyGreen: you are missing gcc
agjacome has quit [Quit: leaving]
kenneth has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
jimms has joined #ruby
kyb3r_ has quit [Ping timeout: 246 seconds]
<centrx>
RickyGreen, also gcc-4.2 is extremely old
<Hanmac>
iSee you are on a Mac ... hm yeah thats does make everything more complicated
dennus has quit []
cocotton has quit [Read error: Connection reset by peer]
cocotton has joined #ruby
snath has quit [Ping timeout: 246 seconds]
<RickyGreen>
Okay, Sorry for newbie questions, i've just basically gone through every tutorial i found and ran the terminal commands, do you think it would be better to uninstall and start again, is that possible?
<Hanmac>
centrx: its Mac stuff ... he should be happy that he got installed rvm ... hm monent !!! he got install ruby with rvm but then gcc got missing? ;D
sprihodko has quit [Quit: Computer has gone to sleep.]
spider-mario has quit [Read error: Connection reset by peer]
<Hanmac>
hm it seems somewhere after installing ruby with rvm and trying to install the json gem he did deinstall some stuff again ...
lemur has joined #ruby
drusepth is now known as dru
<Hanmac>
RickyGreen: you did de-install some stuff right?
marlonandrade has quit [Ping timeout: 245 seconds]
nobitano_ has quit [Remote host closed the connection]
<RickyGreen>
Yes, i uninstall mysql.
ndrei has quit [Ping timeout: 272 seconds]
<RickyGreen>
Because that was giving me an error, i googled that, possibly where i've made my boo-boo :(
<Hanmac>
hm yeah somewhere you did uninstall gcc stuff and now ruby does not find the compiler it was compiled with (ruby does that to have consistency)
Splintor has quit [Quit: Leaving]
yalue has quit [Quit: Leaving]
ndrei has joined #ruby
<RickyGreen>
Okay, What's my options? :P
oivoodoo has joined #ruby
<Hanmac>
hm my opinon ... install newest compiler and other libs and install newer version of ruby with rvm
<RickyGreen>
Would you suggest to use VMware fusion and use windows for programming?
saarinen has quit [Quit: saarinen]
jaygen_ has joined #ruby
bMalum has quit [Ping timeout: 260 seconds]
fmcgeough has quit [Ping timeout: 255 seconds]
rimenes_ has joined #ruby
rimenes has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 260 seconds]
evenix has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<evenix>
Hi all
evenix has quit []
nobitanobi has joined #ruby
awestroke has quit [Remote host closed the connection]
yfeldblu_ has quit [Ping timeout: 272 seconds]
MeltedLux has quit [Ping timeout: 272 seconds]
jaygen has quit [Ping timeout: 272 seconds]
<Hanmac>
Windows ... for .... programming ... thats even worse ,P
MeltedLux has joined #ruby
<RickyGreen>
I'm open to suggestions, Linux?
cocotton has quit [Remote host closed the connection]
<djbkd>
if your system is up for it and you have patience to install them, VirtualBox + Vagrant + http://www.vagrantbox.es/ is quite pleasant to dev against
tectonic has joined #ruby
<Hanmac>
Linux is the most best way ... hm i did get a working ruby installation with rvm running last time on OSX but that is nearly years ago ... hm but i can say i did use macports to install newer gcc compiler
<djbkd>
pretty nice to be able to trash the entire system comfortably
maasha has quit [Ping timeout: 246 seconds]
saarinen has joined #ruby
saarinen has quit [Client Quit]
doritostains has quit [Quit: doritostains]
Asher has quit [Quit: Leaving.]
<RickyGreen>
I had it working on this the other day.
<thagomizer>
You can get the basic syntax from Learn Ruby The Hard Way or Try Ruby or something
<phao>
ok
<thagomizer>
The language itself isn't that hard for most folks but learning the library takes a while
GriffinHeart has joined #ruby
<thagomizer>
And I know that ruby web development does not have to equal rails but I'd bet the majority of folks using Ruby for Web Development are doing Rails.
shosti has joined #ruby
emocakes has joined #ruby
<wallerdev>
yeah i dont think anything has near the support as rails
<wallerdev>
unless you want to build a small site with a couple pages haha
livingstn has quit []
robbyoconnor has quit [Max SendQ exceeded]
Ankhers has quit [Ping timeout: 264 seconds]
robbyoconnor has joined #ruby
mary5030_ has quit [Ping timeout: 250 seconds]
anaeem1_ has quit [Remote host closed the connection]
shackleford has quit [Remote host closed the connection]
jimms has quit [Remote host closed the connection]
rgsteele has joined #ruby
emocakes__ has quit [Ping timeout: 246 seconds]
parduse has quit [Ping timeout: 245 seconds]
<shevy>
like a blog
parduse has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
<shevy>
.cgi forever!
<shevy>
oldschool in the house
GriffinHeart has quit [Ping timeout: 272 seconds]
parduse has quit [Client Quit]
mferrier has quit []
<ericwood>
require 'cgi'
parduse has joined #ruby
<ericwood>
boom, you're all set
oivoodoo has joined #ruby
shackleford has joined #ruby
oivoodoo has quit [Remote host closed the connection]
icarus has quit [Remote host closed the connection]
kireevco1 has quit [Max SendQ exceeded]
kireevco1 has joined #ruby
kireevco1 has quit [Max SendQ exceeded]
<shevy>
I am back on i686
kireevco1 has joined #ruby
kireevco1 has quit [Max SendQ exceeded]
kireevco has quit [Read error: Connection reset by peer]
freerobby has quit [Client Quit]
narcan has joined #ruby
<benzrf>
grose
<benzrf>
i should come to a ruby con just to shill haskell
djstorm has quit [Ping timeout: 246 seconds]
GriffinHeart has quit [Ping timeout: 272 seconds]
<hydrajump>
hi I'm trying to install a gem on ubuntu 14.04 called riemann-tools and I've installed ruby and ruby-dev via apt. I keep getting this error and I don't know why "ERROR: Failed to build gem native extension." Am i missing some dependency or is it because I have ruby 1.9 and not 2.x installed via apt-get?
cougarten_ has joined #ruby
Wolland has quit []
mary5030 has quit [Remote host closed the connection]
<ericwood>
hydrajump: it's a missing dep that the gem is trying to compile against
<ericwood>
do you have the full error message? it'll tell you what you need
<shevy>
but in the long run, switch to a better distribution
<agent_white>
shevy: BABY STEPS
<shevy>
also ubuntu tends to modify their ruby, for instance mkmf is usually not distributed
<hydrajump>
thank you both. haha no love for ubuntu
saarinen has joined #ruby
skammer has joined #ruby
jaygen_ has quit [Ping timeout: 245 seconds]
<shevy>
the problem is that some distributions cause extra work for other people
<ericwood>
meh don't hate on the distro
<shevy>
like - why does ubuntu not have dev tools installed by default and header files "because we are a server OS" or "because our users won't need that"
<ericwood>
you'd have to do that with most
<shevy>
not on slackware
<hydrajump>
shevy: what dist do you suggest
<ericwood>
probably arch
<shevy>
hydrajump if gobolinux were still alive then I'd suggest gobolinux
<mozzarella>
on most distributions it's not installed by default…
<shevy>
appdirs beat default FHS layout any day
<havenwood>
Fedora, openSUSE, Arch
<ericwood>
yeah most don't include it by default tbh
<ericwood>
the idea is you don't need them unless you're a dev
<ericwood>
not everyone is a dev
<mozzarella>
^
peta_ has joined #ruby
<shevy>
precisely this is the philosophy
<mozzarella>
there's no problem with ubuntu
<ericwood>
if you're a dev you install build-essential or whatevver and it's all good
<ericwood>
so I wouldn't hold it against any distro for that
<shevy>
what about removing mkmf from default ruby erichmenge
<shevy>
*ericwood
<ericwood>
oh I think their default ruby is silly
<ericwood>
but if you're doing much serious ruby work you use ruby-install or the like to do it yourself
<momomomomo>
default ruby isn’t silly, but you should manage your own if you need a different version; and definitely if you’re installing / updating gems
peta_ has quit [Remote host closed the connection]