binaryplease has quit [Read error: Operation timed out]
larissa has joined #ruby
EstanislaoStan has quit []
cesurasean has joined #ruby
<cesurasean>
I require some help to get an app running on my machine. I'm having problems with gems not uninstalling like they should. - will_paginate 3.0 is not compatible with Rails 2.3 or older
<cesurasean>
how do i fix this error code? - will_paginate 3.0 is not compatible with Rails 2.3 or older
<cesurasean>
when I try to update rails, it fails.
<blazes816>
or a simple game. I find games to be the funnest, and often most challenging puzzles.
<cesurasean>
anyone?
digitalcakestudi has joined #ruby
<blazes816>
cesurasean: Add "gem 'rspec'" to your Gemfile and run "bundle"
cdepue has quit [Remote host closed the connection]
<cesurasean>
blazes816, where is the gem file located at?
<cesurasean>
and how do i run bundle?
<blazes816>
cesurasean: are you using a framework? or just building your own project from scratch?
<cesurasean>
using a framework
<blazes816>
which one?
<cesurasean>
trying to get it installed
mafs has quit [Read error: No route to host]
<cesurasean>
not sure. it's some script i found on the net awhile ago.
<cesurasean>
no documentation with it, but I know it works.
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<blazes816>
okay, well you can just create a file called "Gemfile" in the root of your project. Then do "gem install bundler" to make sure bundler is installed, and then "bundle install" in your project root.
<iToast>
blazes816:
<iToast>
I have a idea for a hash that can only be created once.
<blazes816>
Google "bundler Gemfile" and read about how it works, but it's the best way to manage dependencies
ibash has quit [Quit: ibash]
<iToast>
blazes816: Im curious about MD5 Hashes
<blazes816>
lol
<blazes816>
I thought you mean the data structure
<iToast>
When a flile is signed with a md5 hash, can't somone replay the hash onto a different file?
<iToast>
Or are md5 hashes on files created using their bytecode
<iToast>
so it wont match
<cesurasean>
blazes816, bundle says command not found
<cesurasean>
I installed bundler.
iocor has quit [Quit: Computer has gone to sleep.]
<blazes816>
iToast: a hash is made using the bytes making up the file. Files are made of "bytecode" unless they're like a java .class file or something.
<iToast>
ok.
mockra has joined #ruby
<iToast>
So its impossible to create a new one for a file thats the same as another?
<blazes816>
but if you change even a single byte in the file, the entire hash will be different
<iToast>
blazes816: I have a idea for a hash thats always random.
<iToast>
It's impossible to recreate
<iToast>
Use the machines delta time divided by a random number from 1 - 20
<blazes816>
theoretically, it is possible to create another file that has the exact same md5 hash as another. that's called a collision, and it's bad
<blazes816>
which is why md5 is obsolete.
<cesurasean>
blazes816, yeh but when i run bundle it doesn't work.
<iToast>
Once that final numer is found divide it by 2
<iToast>
thats were it will be put into the hash
cbuxton has joined #ruby
<blazes816>
What would be the use case? if you can't recreate the hash, what's it useful for?
<iToast>
Then the numer generated by 1 - 20 + delta time will be inserted there.
<iToast>
This can be added onto any HASH to make it impossible to collide.
<iToast>
Its basically a secure salt for any type of hash.
<blazes816>
iToast: That could work like a salt
<blazes816>
ah
<iToast>
it makes it impossible for a hash to become collided.
<blazes816>
cesurasean: sounds like some kind of gems issue.
<blazes816>
cesurasean: does "gem list" show any gems?
<iToast>
blazes816: Its a much more secure hash once salted with it.
cbuxton has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
cbuxton has joined #ruby
artOfWar has quit [Remote host closed the connection]
<iToast>
blazes816: The great thing about this hash is it can't be forced.
artOfWar has joined #ruby
<iToast>
Even rainbow tables wouldn't be effective against it.
cbuxton has quit [Remote host closed the connection]
liluo has quit [Remote host closed the connection]
Guest24792 has joined #ruby
<iToast>
Every time the hash is salted, it becomes unique to that instance in time.
<blazes816>
iToast: So you could never reproduce it? a = hash('a'); b = hash('a'); are a and be different?
<iToast>
yes
<iToast>
it can be secured even harder.
<iToast>
Once you pass anything through this hash its gone.
<Goles>
Guys does += -= *= work in ruby ? How can I search for them in the docs ? ( searching for *= using google is not very helpful … )
<iToast>
Goles: It does if im correct
<iToast>
Just test!
<blazes816>
how would you use that?
<iToast>
blazes816: Password hashing.
<Goles>
iToast hahahha ok :)
<iToast>
:)
<Goles>
pry ftw
<Goles>
xD
<iToast>
blazes816: Think of it like this.
<iToast>
Your DNA could be repeated faster then this hash.
<blazes816>
Goles: they are methods on the e.g. Integer class
<Goles>
blazes816 cool , :) , thanks
<iToast>
Goles: Try this in a ruby shell
<iToast>
i = 0
<iToast>
i += 1
<iToast>
puts i
<iToast>
;)
<Goles>
yep
<cesurasean>
blazes816, ok, i ran that command, and now it's still saying cannot find rspec.
<Goles>
works
<iToast>
blazes816: You like my hash?
<iToast>
idea
<iToast>
I can impliment it in php.
<Goles>
still if you do 4 += 1 it errors
<iToast>
Goles: you're not assigning it to a variable.
<iToast>
Goles: Also, it'd be 4 + 1
<blazes816>
cesurasean: do did you install rubygems?
<Goles>
yes
<Goles>
hahaha
<Goles>
I know
<iToast>
You want to hear my hasing idea?
<Goles>
iToast was just playing around … thanks for the help
<iToast>
hashing*
brendan` has quit [Remote host closed the connection]
<blazes816>
4 is a singleton object that can't be mutated!
<Goles>
iToast me ? hashing ?
<iToast>
Its more of a salt...
<Goles>
blazes816 hahahaha really ?
<cesurasean>
blazes816, yes i have gem installed
<iToast>
Goles: Think of time as a static liniar object.
<Goles>
xD
<blazes816>
Goles: yep
kstephens has quit [Quit: PredictTheFuture]
<iToast>
Goles: Lets say we can take its current value
<Goles>
blazes816 well that's actually interesting
<iToast>
Goles: Now you can't go back and get that value again.
<iToast>
it's staticly written into time.
<blazes816>
cesurasean: but how did you do it? RVM? apt-get? yum?
darthdeus has quit [Quit: Leaving...]
<iToast>
Lets use it in salting
<iToast>
Now you got a static salt that's always changing with time
<blazes816>
iToast: but if you hash a password using it, how can you later allow a user to log in? they'd have to log in at a time now longer existant.
<cesurasean>
apt-get
<iToast>
blazes816: True. :s
<iToast>
It's more of securing a file's contents.
mwilson_ has quit [Excess Flood]
<blazes816>
cesurasean: try using rvm, rbenv, or rbfoo. https://rvm.io//
mwilson_ has joined #ruby
<blazes816>
cesurasean: ruby related deb packages are almost always broken.
<iToast>
blazes816: The whole idea of this salt is to prevent people from throwing things at it.
<blazes816>
iToast: but in that case hashes are used to check for integrity, but in this case being valid is only possible at one instance in time.
<iToast>
blazes816: Ok, think of it like this
<iToast>
Its a hash that you can continuesly brute force
<iToast>
but you can't get the value to
<blazes816>
Canonical builds Ubuntu, put up the hash of the valid iso. then you downloaded and hash it again. even if the iso is fine, the hash is different.
_adeponte has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
<blazes816>
no, you couldn't brute force it, in the same way that the user couldn't use it either.
mikeric has quit [Quit: mikeric]
<iToast>
blazes816: 2 way chat key.
kstephens has joined #ruby
<iToast>
Every message sent is sent with a hash at the end
<iToast>
you can confirm it to the original sender with the original hash
<cesurasean>
blazes816, what's the best way you suggest to fix this so it can find that gem?
<blazes816>
the point being to ensure the message has not been tampered with?
<iToast>
yes
<iToast>
Somone tampers? trys to put the same hash
AlbireoX`Laptop has joined #ruby
<iToast>
its impossible.
<blazes816>
but that only works given that the message is received at the same time it was hashed correct?
<iToast>
no
ramblex has quit [Quit: ramblex]
<iToast>
As long as the hash is there on the message
<iToast>
you can go Hey *sender* this is the hash i got
<iToast>
The message can't be sent without a fresh hash.
<iToast>
so its constantly a new hash :)
<blazes816>
iToast, that does make sense
<iToast>
blazes816: its basically SSH
<iToast>
The hash exists and can't be recreated.
<blazes816>
i hadn't considered that type of case. very interesting.
<iToast>
the user can confirm it with the server
<iToast>
blazes816: want me to whip up a php script that spits out random salts
<iToast>
to add to a hash
<blazes816>
cesurasean: after rvm is installed, and will handle it all for you.
<blazes816>
iToast: I would never wish such a thing upon you
<iToast>
why?
<iToast>
its about 20 lines of code.
<blazes816>
I just can't stand writing php ever since I left
<iToast>
lol
<iToast>
Im fine with php
<blazes816>
but if you like, cool
<iToast>
:)
<cesurasean>
blazes816, after i run that command it should be fixed, yeh?
<blazes816>
I used to be back in the day
<iToast>
Think of it like this
graft has joined #ruby
<iToast>
blazes816: Lets assume you have the hash 999x94
hemanth has quit [Read error: Connection reset by peer]
<iToast>
Now lets say we want to know what made it.
<blazes816>
cesurasean: yeah, if you follow the instructions on screen you should have a working gems.
<iToast>
Now a machine is generating hashes at 20k/s
<blazes816>
you can try to reinstall rspec and whatnot
hemanth has joined #ruby
<iToast>
Every hash is new.
<iToast>
can't be brought bac
<iToast>
So you're just throwing crap at the wall hoping something sticks.
<iToast>
Nothing will ever stick
<blazes816>
iToast: yeah, that's interesting. You could also take the message, append the timestamp, and hash that.
<blazes816>
but the collision rate would only be as good as the hashing algos
<iToast>
blazes816: This hash can be used in any way.
<iToast>
its impossible to repeat.
<iToast>
You need to be the same date
<iToast>
same time
<iToast>
same delta time
<iToast>
and the same original file / message
dbgster has quit [Quit: dbgster]
<blazes816>
theoretically, but all hash algorithms have some flaws.
<iToast>
This one has 1 flaw.
hemanth has quit [Read error: Connection reset by peer]
<blazes816>
you could possibly collide with it given a completely different input, that may be near impossible to find.
<blazes816>
that's the best we get
<iToast>
What every hash you salt with it will tell you how long until it can be recreated
hemanth has joined #ruby
<iToast>
The more complex, the better.
iori has joined #ruby
<iToast>
blazes816: Lets call this the 3rr0r Salt
<iToast>
The more time goes by, the harder it is to recover the original message.
<iToast>
Like bcrypt
<iToast>
but a different method
<jtallant>
Can someone explain this code to me? https://gist.github.com/3030295 specifically how the + is working as opposed to << …please just comment on the gist if you can provide any explanation. Thank you.
Goles_ has joined #ruby
Goles has quit [Read error: Connection reset by peer]
<iToast>
blazes816: wan't a simple live php scropt
<iToast>
?
<iToast>
The more variables you throw in the more violent the return is.
<cesurasean>
yes, i ran bundle install, and that worked.
<iToast>
and a explination that tells you how it works
<cesurasean>
but when i run rake it says it can't find rspec
CheeToS has joined #ruby
<rking>
cesurasean: Then use bundle exec rake
<cesurasean>
now it's giving me this; /var/lib/gems/1.8/gems/bundler-1.1.4/lib/bundler/rubygems_integration.rb:147:in `gem': rake is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
<rking>
Peregrinu5: I was about to congratulate you on somehow managing to be even more off-topic than iToast and me.
<Peregrinu5>
lol
<iToast>
want more off topic?
liuchong has joined #ruby
jtallant has quit [Quit: Computer has gone to sleep.]
<iToast>
Cat's are a type of quadorped that can run at high speed and allow their muscles to stretch farther then they normally wood in a time of being stressed out allowing a cat to be more flexible when it's needed.
<iToast>
That good.
aantix has quit [Client Quit]
<rking>
iToast: I'm not sure where you're going with the recent line of statements.
thebope has joined #ruby
<iToast>
Neither am i.
<iToast>
welcome to my world.
<iToast>
:)
TheHairyWoodsman has joined #ruby
nai has quit [Remote host closed the connection]
<TheHairyWoodsman>
when making a gem, and using gemspec to control your depenedncies, what is the syntax to indicate you want the dependency to be a local :path => style reference? In the gemfile, it's straightforward… gem 'blah', :path => '../blah'
<TheHairyWoodsman>
but I can't figure it out for a .gemspec (i.e, I'm developing a gem)
<TheHairyWoodsman>
been reading the docs that I can find, and they don't address it that i can ese
<TheHairyWoodsman>
see*
cdepue has joined #ruby
Hanmac has quit [Read error: Operation timed out]
mockra has joined #ruby
perryh is now known as perry
<cesurasean>
guys, im now getting this error, which i think should be the final one. - http://pastebin.com/G8DU8rqk
<cesurasean>
can someone please help me to fix this?
hunglin has quit [Quit: Leaving.]
<banisterfiend>
cesurasean: that's not an error you're getting, you're pregnant and about to give birth! quick get to the hospital! u need an urgent cesurasean section!
<blazes816>
line 55 of config/boot.rb is trying to require 'initializer', which doesn't appear to exist.
<blazes816>
do you have a file called initializer.rb somewhere?
<cesurasean>
no, but there is a directory with that name.
<rking>
cesurasean: BTW you shouldn't be screwing around as root.
<blazes816>
rking: didn't even notice that lol
<cesurasean>
lol
dbgster has joined #ruby
<cesurasean>
line 55 reads as such; require 'initializer'
<cesurasean>
what is initalizer? a gem?
<blazes816>
a file
ironmagma has joined #ruby
<blazes816>
or, rather, it should be
<rking>
cesurasean: grep -ri initializer .
<blazes816>
cesurasean, if it's not too overwheling, pastebin a "ls -R' of the NEW directory
<ironmagma>
Hi all, I'm attempting to `gem install bdb` (berkeley database adaptor) but seem to be held up by an error with "lipo: can't open input file".. http://sprunge.us/ZMLj
<cesurasean>
blazes816, i ran rm -rf vendor/rails in the main directory and nothing happen, same error.
thebope has quit [Read error: Connection reset by peer]
pygospa has quit [Quit: leaving]
austinbv1 has quit [Ping timeout: 246 seconds]
pygospa has joined #ruby
mockra has quit [Remote host closed the connection]
<blazes816>
cesurasean: I really don't know. Try in #rails or #rubyonrails
<offby1>
banisterfiend: that happens to me every time I take the car through the car was
Tricks_ has quit [Read error: Connection reset by peer]
<offby1>
h
Tricks has joined #ruby
remmy444 has joined #ruby
Guest67948 has quit [Ping timeout: 265 seconds]
paradisaeidae has joined #ruby
nai has joined #ruby
n1tsua has joined #ruby
n1tsua has quit [Client Quit]
savage- has joined #ruby
Yugo has joined #ruby
zodiac1111 has quit [Quit: 离开]
araujo has quit [Read error: Connection reset by peer]
TheHairyWoodsman has quit [Quit: Leaving.]
Goles has quit [Quit: Computer has gone to sleep.]
paradisaeidae has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
iToast has quit [Ping timeout: 245 seconds]
artOfWar has quit [Ping timeout: 246 seconds]
zodiac1111 has joined #ruby
chinz_ has joined #ruby
chinz has joined #ruby
chinz has quit [Read error: Connection reset by peer]
Progster has joined #ruby
dcampano has quit [Quit: dcampano]
banisterfiend has quit [Remote host closed the connection]
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
<bnagy>
nice :)
<offby1>
banisterfiend: I'm anti-theme
<banisterfiend>
offby1: you just haven't met the right one yet
EzeQL has quit [Ping timeout: 265 seconds]
<banisterfiend>
offby1: try zenburn
dsa has quit [Client Quit]
<banisterfiend>
zenburn is like peaches and cream
EzeQL has joined #ruby
<dekz>
If I'm returning a base64 string in the body of a message, which will then later be used in a URI, should the original body be urlsafe base64 or should I just return base64?
<bnagy>
ok well it helps when you don't just make up the error message
<austinbv>
sorry cannot load
<banisterfiend>
Hanmac: join #gosu
<bnagy>
is it a ruby file?
<bnagy>
(no)
<austinbv>
yup
<austinbv>
does it have to end in .rb
<austinbv>
oh I know
* austinbv
facepalms
Goles has joined #ruby
<austinbv>
topped the file with a shebang
tewecske has quit [Quit: Leaving.]
<austinbv>
and it doenst have .rb
<Hanmac>
austinbv its the file-extendion
<austinbv>
ty
<Hanmac>
require wants a *.rb or *.so file
<austinbv>
yeah
<banisterfiend>
Hanmac: which get precedence when doing a require, a .so or a .rb ?
mockra has quit [Remote host closed the connection]
<Hanmac>
*.rb gets more precedence
<bnagy>
if you don't want to change the filename, which is reasonable, load is fine
_adeponte has quit [Ping timeout: 250 seconds]
saschagehlich has joined #ruby
<banisterfiend>
Hanmac: yeah, when i learned tht i stopped giving my c extensions weird names :) as i knew the .rb in lib/ would be loaded before teh .so
<banisterfiend>
Hanmac: it was a good feeling
tees is now known as elliottcable
<banisterfiend>
Hanmac: was it a good feeling when you discovered it too? or did you feel nothing at all, as it was so natural that it just worked as you expected?
<Hanmac>
when you make a c extension, hy do you mixed it? i mean an pure c extension has no problems, but when you mixed it with extra rb files you could get a problem (gosu is a mixed gem too)
mockra has joined #ruby
<fowl>
nopdfs
<banisterfiend>
Hanmac: well, my c extensions for gosu were 'fat gems', so i had both 1.8 and 1.9 binaries
<banisterfiend>
Hanmac: so i had a .rb file in lib/ which was responsible for deciding which of the .so files to load whether it was lib/1.8/a.so or lib/1.9/a.so
itnomad has quit [Remote host closed the connection]
tonini has joined #ruby
mockra has quit [Remote host closed the connection]
igotnolegs has quit [Quit: Computer has gone to sleep.]
<shevy>
"One of our explicit coding conventions is that non-static functions must be prefixed with the module name they belong to. This keeps us sane and helps prevent name collisions."
<vectorshelve>
banisterfiend`: the climate is refreshing then :)
<banisterfiend`>
vectorshelve: i thought you had lakes and rivers like most countries
jamesaxl has quit [Read error: Operation timed out]
<hemanth>
banisterfiend`, we do!
nemesit has joined #ruby
<hemanth>
India is a subcontinent
pipopopo has quit [Excess Flood]
<vectorshelve>
banisterfiend`: so where does the water in lakes and river get refilled once they dry out in evaporation during summer... ? :D
pipopopo has joined #ruby
jamesaxl has joined #ruby
nai has quit [Remote host closed the connection]
<vectorshelve>
banisterfiend`: u need to brush up your basic enviroment and eco system basics and not just ruby... ruby will not fetch u a glass of water :P
<banisterfiend`>
vectorshelve: well it rains during summer/spring here too, in fact it almost rains as much then as in winter
fearoffish has quit [Client Quit]
fearoffish has joined #ruby
ssa has quit [Quit: Page closed]
pjupju has joined #ruby
<vectorshelve>
banisterfiend`: thats coz u probably dont have a monsoon.. we do have it n thats when the major part of water is accumilated.. for agriculture and electricity and all
<Hanmac>
banisterfiend` did you try my libarchive-ruby gem?
<banisterfiend`>
Hanmac: compilation errors
frishi has joined #ruby
<Hanmac>
... yeah its a bit outdated ...
<vectorshelve>
Hanmac: he is now more interested in India than gems ... :)
<banisterfiend`>
Hanmac: what does it do?
<Hanmac>
it can read/write archives ... zip, tar,gz, xz, ... and many
<Gurparatp>
Why does yard not collect information from class X with filename "x.rb" when there is also a directory named "X" with modules for that class?
<Gurparatp>
My doc generated for that class only includes the documentation from the modules in the directory X, and nothing from the file x.rb.
<Gurparatp>
Anyone on this?
davidcramer_ has joined #ruby
<davidcramer_>
yo dudes -- how do I install a development version of a package
<davidcramer_>
e.g. i have it locally, and i want to debug some problems, so how can i symlink it into the ruby env?
<davidcramer_>
the equiv of pip install -e in python
<Gurparatp>
see bundler
Gurparatp is now known as Gurpartap
<davidcramer_>
is that my answer?
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
<Gurpartap>
yes
<davidcramer_>
you are not very helpful
<ij>
I saw an svg, which showed the way ruby looks up methods(which objects first, which later and so on) By searching what, could I find it?
theRoUS has joined #ruby
<Gurpartap>
davidcramer_: cd projectx; mate Gemfile; bundle install --path .bundle; bundle exec <anything for this env>
<Gurpartap>
bundle exec gem list
<Gurpartap>
would be different from
<Gurpartap>
gem lsit
<Gurpartap>
s/lsit/list/
<Gurpartap>
davidcramer_: does that help?
krusty_ar has joined #ruby
<davidcramer_>
gimme a sec
<davidcramer_>
i should tell you i dont know anything about ruby
davidpk has quit [Quit: Computer has gone to sleep.]
<davidcramer_>
wait
<davidcramer_>
how does that help me?
<Gurpartap>
using a package has nothing to do with knowing ruby language ;)
<davidcramer_>
i literally just want to symlink foo as a gem for this project
<davidcramer_>
why is this so hard :(
<davidcramer_>
should I not be doing this?
<Gurpartap>
davidcramer_: there's no symlinking in ruby world
<davidcramer_>
so how do you generally develop a package
<davidcramer_>
or debug, rather
<Gurpartap>
davidcramer_: if your particular project requires a gem, it's best to have it it's own gem folder
<Gurpartap>
davidcramer_: debug? you want to access source code?
<davidcramer_>
well it requires the gem, and it pulls it down from git
<davidcramer_>
but i basically want to run the local copy of that gem
<Gurpartap>
bundle show <gemname>
<davidcramer_>
so i can throw in some debug info
<Gurpartap>
just edit the gem itself
<Gurpartap>
see `bundle show <gemname>` for it's path in your system
<davidcramer_>
ya i was hoping to just re-use the repo
davidcelis has joined #ruby
<Gurpartap>
or gem which <gemname>
<davidcramer_>
man
<davidcramer_>
this is so much better in Python :)
cakehero has joined #ruby
<banisterfiend>
davidcramer_: what do u do in python?
<Gurpartap>
davidcramer_: not really. you're just more familiar with it
<Gurpartap>
:)
<davidcramer_>
you can literally symlink the package
<davidcramer_>
pip is ~= gem in python
<davidcramer_>
and it has a '-e' flag which means 'editable'
<davidcramer_>
and itll symlink things
<Gurpartap>
davidcramer_: gem doesn't require that symlink step
<davidcramer_>
so for me its like "pip install -e ." will symlink the current dir's lib into whatever environment is active
budha has quit []
<Gurpartap>
you're already set to edit for debugging :)
enroxorz has joined #ruby
<Gurpartap>
davidcramer_: well, you should read about bundle
<rking>
If you disable the bundler plugin things should start to work better, and if you disable all of OMZ everything will start to work better.
<rking>
OMZ is valuable as a thing to look at for ideas, but not to actually run.
Jackneill has joined #ruby
<mneorr>
ohh... i see rking you're a genius :D I've enabled exactly bundler and 2-3 plugins before a couple of days
<rking>
No, I'm on OMZenius. Seriously, ask around #zsh to see what they think of it. =)
<rking>
I don't know why, fundamentally, it's so problematic. It might be that they're biting off more than anyone could reasonably chew (due to OS differences, zsh version differences, etc.)
digitalcakestudi has joined #ruby
gtuckerkellogg has joined #ruby
lxsameer has joined #ruby
schovi has quit [Remote host closed the connection]
billiamii has joined #ruby
minijupe has joined #ruby
<mneorr>
rking: got it
<mneorr>
rking: btw, what's the bundler plugin about?
<mneorr>
i've enabled it just because i could :D
Vert has joined #ruby
<mneorr>
andddd.. the problem was rbenv plugin for OMZ
zodiac1111 has joined #ruby
enroxorz has quit [Quit: Ex-Chat]
<rking>
My assumption is that it looks for the presence of a Gemfile and runs ruby-related commands prefixed with "bundle exec", but I'm only guessing.
carlyle has quit [Ping timeout: 246 seconds]
cjlicata has joined #ruby
<rking>
Also creates shell aliases so you don't have to type "bundle exec" before most common ruby commands when you are in a directory with a Gemfile. Here is a list of commands it does this for: annotate cap capify cucumber ey foreman guard heroku middleman nanoc rackup rainbows rails rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails
<rking>
^ From the docs.
<mneorr>
thx
<mneorr>
I guess that's a bit too much info for now :)
axl_ has joined #ruby
xiphiasx_ has joined #ruby
<xiphiasx_>
i doubt it
<xiphiasx_>
but can rake be used for projects in different languages
<xiphiasx_>
i.e. C++
<mneorr>
rking: I'm a iOS /OBJc dev, and a wannabe Ruby dev
chson has joined #ruby
<rking>
xiphiasx_: Yeah but it checks for Gemfile first.
<xiphiasx_>
figures
<rking>
It's not a bad set of aliases, maybe.
<xiphiasx_>
i don't like cmake and i most certainly don't like autotools
<xiphiasx_>
heh
schovi has joined #ruby
fbernier has quit [Ping timeout: 264 seconds]
<rking>
By "it" I mean the alias. If you were using rake to build something totally unrelated to Ruby, you wouldn't have a Gemfile
<xiphiasx_>
ah
mneorr has quit [Quit: WeeChat 0.3.5]
mayankkohaley has joined #ruby
Jackneill has quit [Ping timeout: 246 seconds]
zastaph has joined #ruby
hoelzro is now known as hoelzro|away
Araxia has quit [Quit: Araxia]
mneorr has joined #ruby
Jackneill has joined #ruby
zommi has quit [Remote host closed the connection]
joshman_ has joined #ruby
wvms has quit [Quit: wvms]
mickn has joined #ruby
burgestrand has quit [Quit: Leaving.]
umttumt has joined #ruby
atmosx has joined #ruby
yonggu_ has quit [Ping timeout: 240 seconds]
Vert has quit [Ping timeout: 252 seconds]
schovi has quit [Remote host closed the connection]
nari has quit [Ping timeout: 240 seconds]
yonggu has joined #ruby
plastics has joined #ruby
nu7hatch has quit [Quit: Bye bye!]
tonini has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
<dekroning>
does MiniTest/spec also have contexts blocks? I can't get it to work, I do remember reading something about it, however can't seem to find it anymore
monkegjinni has quit [Remote host closed the connection]
ph^ has joined #ruby
CheeToS has joined #ruby
<Gurpartap>
Can a Struct have keys with a question mark?
<Gurpartap>
X = Struct.new(:a, :b?); X.new(1,true) => #<struct X a=1, :b?=true>
<Gurpartap>
`a` becomes accessible, however, `b?` doesn't
ph^_ has joined #ruby
TheHairyWoodsman has joined #ruby
snearch has quit [Quit: Verlassend]
<apeiros_>
Gurpartap: sounds like you answered your own question
ph^ has quit [Ping timeout: 246 seconds]
<apeiros_>
you can do Struct.new(:a, :b) do alias b? b end
headius has joined #ruby
jonathanwallace has joined #ruby
schovi has joined #ruby
<Gurpartap>
apeiros_: thank you! :)
iori has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
Kesava has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
Kesava has joined #ruby
slyv has joined #ruby
carlyle has joined #ruby
cjlicata has quit [Ping timeout: 246 seconds]
dcampano has quit [Quit: dcampano]
sailias has joined #ruby
td123 has joined #ruby
jgrevich has joined #ruby
zodiac1111 has quit [Ping timeout: 264 seconds]
akem has quit [Ping timeout: 240 seconds]
wvms has joined #ruby
cantonic_ has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
dv310p3r has joined #ruby
jfoley has joined #ruby
cantonic has quit [Ping timeout: 246 seconds]
cantonic_ is now known as cantonic
seoaqua has quit [Quit: Leaving]
<lectrick>
whoa, haskell and erlang people really don't like ruby, eh?
dhruvasagar has joined #ruby
* lectrick
loves ruby, and unfortunately it may have to be pried from his cold dead fingers
<xclite>
letrick: They're jealous of our amazing String manipulation tools.
<lectrick>
type checking to reduce runtime errors even more than thorough testing can do? sigh.
TheHairyWoodsman has quit [Ping timeout: 240 seconds]
eywu has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
eywu has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 246 seconds]
<hoelzro>
lectrick: what makes you say that?
eywu has joined #ruby
carlyle has quit [Ping timeout: 246 seconds]
<hoelzro>
lectrick: what do you mean by "strings aren't safe?"
neku has joined #ruby
<lectrick>
hoelzro: just having heated discussions with a couple of coworkers who think they are "beyond" ruby and argue that complex systems need more type checking to stay runtime error tolerant. There's actually a paper out there on it which unfortunately makes some good points
<lectrick>
hoelzro: I was joking that if Elm can't even deal with auto conversion of javascript strings to elm strings, it's already too much work for me lol
berserkr has quit [Read error: Connection reset by peer]
<hoelzro>
hmm
<hoelzro>
I'm just curious because I happen to find languages like Haskell fascinating =)
<lectrick>
He used Haskell and translated actual code bases from Python to Haskell (and their unit tests) and discovered a number of edge cases that the unit tests would fail to discover
sailias has quit [Quit: Leaving.]
mdszy has joined #ruby
<lectrick>
For me it is something noteworthy but I'm not about to jump ship
<hoelzro>
I don't think the important thing is "jumping ship"
erichmenge has joined #ruby
gilead has quit [Quit: This computer has gone to sleep]
<lectrick>
well, apply the right tool to the job then I guess
tcopp has joined #ruby
<hoelzro>
I think the important thing about Haskell and its ilk is to introduce yourself to a new way of thinking about problems, as well as to add a new tool to your toolbox
<hoelzro>
exactly
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
bradhe has quit [Remote host closed the connection]
cantonic has quit [Ping timeout: 244 seconds]
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
<lectrick>
that's arguably the most important thing about any language. the interaction between the language and the way you think about things to solve using that language. Actually, that's a limitation of human language, too
jprovazn is now known as jprovazn_away
Quetza has joined #ruby
ananthakumaran has joined #ruby
mtm3 has joined #ruby
wallerdev has joined #ruby
<lectrick>
i heard an interesting radiolab the other day, about a progressive degeneration of the frontal cortex language center and it resulted in an explosion of creativity (before eventual death). Another odd side effect of it is a compulsive repetition. They actually think Ravel was suffering from it when he wrote Bolero
<lectrick>
Made me really worry about how always having to think within the tools we have available can put a box around our... oh crap i'm restating "think outside the box"
<timeout>
but actually, I should be using utf8 by default, so that's strange.
<hoelzro>
granted, I *think* this should work
<hoelzro>
I haven't done any work with Unicode and Ruby yet.
<aszurom>
if I have an array set up like this: array[index]["ID","Name","Age"] and I want to know the index values of all elements where "Age" == 30, is there an easier way to do that than mapping over the whole array and building a new array on an if-then condition?
<timeout>
hoelzro: you are the King!! Thanks a lot.
<timeout>
All is good in the world :D
<hoelzro>
timeout: no, I'm the Newb.
<hoelzro>
=)
kenperkins has quit [Quit: Computer has gone to sleep.]
<timeout>
hoelzro: well, that makes two of us. Great find, though.
<hoelzro>
timeout: I learned it from "The Ruby Programming Language"
strnx has quit [Excess Flood]
chienpo has joined #ruby
<hoelzro>
which I constantly plug for being a great and extremely thorough overview of Ruby 1.8 and 1.9
imami|afk is now known as banseljaj
<hoelzro>
aszurom: so it's an array of hashes?
<hoelzro>
or an array of arrays?
robotmay has quit [Remote host closed the connection]
<aszurom>
array of arrays, as read in by a csv
burgestrand has joined #ruby
<hoelzro>
aszurom: ok, so the third element in each second level array is [ $id, $name, $age ]?
strnx has joined #ruby
schovi has quit [Remote host closed the connection]
eywu has quit [Quit: Leaving.]
tewecske has joined #ruby
dankest has joined #ruby
<aszurom>
yeah, so I want to say "return a list of the first dimension where the 3rd element in the 2nd dimension = "30"
bluenemo has quit [Ping timeout: 252 seconds]
<aszurom>
[0][443,Joe,30]
<aszurom>
so that's true, and 0 would be in the list returned
jxpx777 has joined #ruby
<Quetza>
Tasser: there seems to be a bunch of binary gems too, and if they exist then they get fetched instead of the source. Such as libv8-3.3.10.4-x86-darwin-10. I don't want the pre-built darwin one, I want the source and to have it compiled
RainbowDashh has quit [Read error: Connection reset by peer]
<aszurom>
I feel like this has to be a built in method
orlandodelaguila has quit [Ping timeout: 248 seconds]
dkissell has quit [Ping timeout: 245 seconds]
dkissell_ is now known as dkissell
<ij>
Oooh, nice.
<ij>
Damn neat.
c0rn_ has joined #ruby
<burgestrand>
ij: keep in mind, it’s not the same method as: alien - cow
<ij>
Yeah, got that. :]
<burgestrand>
:)
* ij
bows.
<jslvk>
bricker88: does .gsub(/\\\\/, "") work for you, have you tried it?
<burgestrand>
ij: also, if you name the method using symbols you get this, :-@
<burgestrand>
ij: it’s what you’ll look like if you abuse this too much
<burgestrand>
D:
<ij>
;-D
darthdeus has joined #ruby
williamcotton has quit [Quit: williamcotton]
<bricker88>
jslvk: Give me an example string and I'll try it out
orlandodelaguila has joined #ruby
elhu has quit [Ping timeout: 246 seconds]
williamcotton has joined #ruby
axl__ has joined #ruby
tatsuya_o has joined #ruby
<jslvk>
bricker88: it looks like an escaped quotation mark inside the string so something like "Johnny \"Bubba\" Jones"
tatsuya_o has quit [Remote host closed the connection]
mohits has quit [Ping timeout: 246 seconds]
<jslvk>
or if i could remove the whole \" expression
cakehero has quit [Quit: Computer has gone to sleep.]
<bricker88>
jslvk: Are you trying to remove two slashes in a row, or just one?
axl_ has quit [Ping timeout: 250 seconds]
axl__ is now known as axl_
cakehero has joined #ruby
mnaser has quit [Ping timeout: 265 seconds]
chrismcg is now known as zz_chrismcg
mnaser has joined #ruby
schickung has quit [Quit: schickung]
xrl has joined #ruby
ghanima has quit [Quit: Leaving.]
sameerynho has quit [Quit: Leaving]
<jslvk>
just one slash
<jslvk>
bricker88: they are escape characters embedded in a string
<bricker88>
jslvk: I see the problem, the escape is not actually part of the string I think. What if you just do `print s`, do you still see the backslashes?
kevinbond has left #ruby [#ruby]
<jslvk>
print s evaluates as nil
<jslvk>
bricker88:
RainbowDashh is now known as RainbowD_
RainbowD_ is now known as RainbowDashh
<bricker88>
I mean print whatever your string is
<jslvk>
oh yeah
<Tasser>
anyone got flushing n shit working with IO.popen?
<jslvk>
bricker88: it's a double quote "
<jslvk>
so perhaps just
<jslvk>
replace quotations
atmosx has joined #ruby
<jslvk>
and hope i don't break anything else
bashdy has quit [Quit: bashdy]
cakehero has quit [Quit: Computer has gone to sleep.]
RainbowDashh has quit [Disconnected by services]
RainbowD_ has joined #ruby
RainbowD_ is now known as RainbowDashh
artOfWar has joined #ruby
ringotwo has joined #ruby
strife25 has joined #ruby
artOfWar_ has quit [Remote host closed the connection]
nachtwandler has quit [Ping timeout: 244 seconds]
neku|away is now known as neku
Cicloid has joined #ruby
nachtwandler has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
codective has joined #ruby
monkegjinni has joined #ruby
jonathanwallace has joined #ruby
shevy has joined #ruby
apok has quit [Remote host closed the connection]
apok has joined #ruby
Quetza has left #ruby [#ruby]
enroxorz has quit [Quit: Ex-Chat]
voodoofish430 has joined #ruby
ksinkar has joined #ruby
stephenjudkins has joined #ruby
shevy has left #ruby [#ruby]
t0mmyvyo has joined #ruby
mnaser has quit [Quit: Computer has gone to sleep.]
<ij>
I made a Thread.new, but it looks like it's running only when I try to poke it in irb or I .join it, why's that?
flagg0204 has joined #ruby
twinturbo has quit [Quit: twinturbo]
TPFC-SYSTEM has joined #ruby
<Mon_Ouie>
Ruby has a GIL, even its native threads aren't actually run in parallel — So, most likely your thread is pretty much always blocked by the main thread in IRB
alfism has joined #ruby
<shevy>
I am on weechat! you all have different colours.... Mon_Ouie is green... ij is pinkish-violet...
<shevy>
ij threads are lazy, with .join they become less lazy :P
<ij>
Mon_Ouie: Oh, right.
monkegji_ has joined #ruby
mdszy has joined #ruby
<ij>
I thought it'd at least stop my thread while after a while.
monkegjinni has quit [Read error: Connection reset by peer]
<ij>
So gaay.
<ij>
Fucking MRI.
<ij>
How can I do magic now?
<Mon_Ouie>
With a wand?
tommyvyo has quit [Quit: Computer has gone to sleep.]
t0mmyvyo is now known as tommyvyo
jeff_sebring has joined #ruby
<ij>
My lappy is my wand.
<shevy>
magic lies in the eye of the beholder
seyyed has joined #ruby
<ij>
True that.
<shevy>
you can kill a thread though, via Thread.kill I think
jslvk has quit [Quit: Page closed]
<ij>
YAY! At least I can kill it properly.
<ij>
What a blessing ruby has Thread.kill
<shevy>
hmm or perhaps Thread.stop and Thread.exit
<ij>
kill, kill
<ij>
I checked.
<shevy>
dunno... I think I used it only once or twice
<shevy>
I use .join almost always when I use threads however
<Mon_Ouie>
Use IO.select to know when there's something to read and do everything in a single thread
Targen has quit [Ping timeout: 265 seconds]
<ij>
Is pry doing that?
dbgster has quit [Quit: dbgster]
<shevy>
hmm
<Mon_Ouie>
No, Pry is pretty much IO-agnostic
<Mon_Ouie>
It just has an arbitrary input object and calls readline/gets on it
<ij>
Is the pry creator here?
<Mon_Ouie>
banisterfiend: ^
RainbowDashh has joined #ruby
<Mon_Ouie>
I did write some code in Pry too ;)
bashdy has joined #ruby
<ij>
Would it be hard to make it io.select?
akem has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
schickung has joined #ruby
<Mon_Ouie>
Depends on what you're trying to accomplish in the end, but it might be as easy as defining an Input#readline method that uses IO.select to read from stdin and other IOs at the same time
<ij>
Hmm, that would work.
jfoley has quit [Quit: jfoley]
mpereira_ has joined #ruby
mockra has quit [Remote host closed the connection]
berkes has quit [Ping timeout: 240 seconds]
jimeh3 has joined #ruby
mnaser has joined #ruby
jimeh2 has quit [Ping timeout: 244 seconds]
tommyvyo has joined #ruby
akem has quit [Read error: Operation timed out]
mpereira_ has quit [Client Quit]
clockwize has joined #ruby
klip has quit [Read error: Operation timed out]
klip has joined #ruby
nacengineer has joined #ruby
cjk101011 has joined #ruby
mohits has joined #ruby
monkegji_ has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
bikr has joined #ruby
cjk101011 has quit [Client Quit]
cjk101010 has quit [Quit: Lost terminal]
<bikr>
Anyone in here familiar with the AWS SDK?? Tried joining #aws but got namespaced erg..
cjk101010 has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
Nisstyre has quit [Ping timeout: 246 seconds]
banghouse has quit [Remote host closed the connection]
dv310p3r has quit [Quit: Leaving]
federic has quit [Remote host closed the connection]
bashdy has quit [Quit: bashdy]
vitoravelino`afk is now known as vitoravelino
dv310p3r has joined #ruby
manizzle has joined #ruby
myth17 has joined #ruby
stephenjudkins has joined #ruby
bashdy has joined #ruby
luckyruby has joined #ruby
minijupe has joined #ruby
timeout has quit [Quit: leaving]
<Tasser>
gets blocks until a \n is found - can I specify which char to look for?
RainbowDashh has quit [Read error: Connection reset by peer]
mayankkohaley has quit [Remote host closed the connection]
clockwize has quit [Quit: clockwize]
mrsolo has joined #ruby
<shevy>
hmm that would be cool to have Tasser
<shevy>
but I dont think with plain gets one can redefine what char to look... lemme look at the source
<shevy>
The optional argument specifies the record separator.
<mdszy>
Tasser: I think you can. It's one of those funky Ruby short variables. I'll check.
<mdszy>
if you change the value of $/ it'll do the same as if you supplied an argument to gets.
Habib has quit [Remote host closed the connection]
fermion has quit [Quit: P]
<shevy>
ok odd
<Tasser>
cool
<shevy>
it just seems to chop away the character assigned to $/
<shevy>
first occurence of said character found is used, rest of the input discarded
<Tasser>
looking for the \x0 so that won't matter
dv310p3r has quit [Quit: Leaving]
cherrypeel has joined #ruby
hukl has joined #ruby
qwerxy has quit [Ping timeout: 244 seconds]
blacktulip has joined #ruby
graft is now known as Guest48673
Nisstyre has joined #ruby
dv310p3r has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Remote host closed the connection]
cjs226 has joined #ruby
francisfish has joined #ruby
myth17 has quit [Ping timeout: 252 seconds]
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
jimeh3 has quit [Ping timeout: 252 seconds]
francisfish has quit [Remote host closed the connection]
xaq has quit [Read error: Connection reset by peer]
xaq has joined #ruby
stkowski has joined #ruby
dsa has joined #ruby
myth17 has joined #ruby
dbgster has joined #ruby
TheRealPygo is now known as pygospa
EzeQL has quit [Ping timeout: 260 seconds]
mucker has quit [Quit: leaving]
RainbowDashh has joined #ruby
myth17 has quit [Client Quit]
cantonic has quit [Ping timeout: 248 seconds]
Eldariof-ru has joined #ruby
sailias has joined #ruby
prtksxna has joined #ruby
prtksxna has quit [Remote host closed the connection]
mnaser has quit [Quit: Computer has gone to sleep.]
allan_hills has joined #ruby
<allan_hills>
let's say i'm writing a unit test for a module all of whose methods are private or protected. is there some way i can avoid calling send() for everything i want to test?
Niamkik has joined #ruby
sailias has quit [Client Quit]
apeiros_ has joined #ruby
neku is now known as neku|away
prtksxna has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
andrewhl has joined #ruby
twinturbo has joined #ruby
saschagehlich has quit [Ping timeout: 246 seconds]
Maniacal has joined #ruby
mjb2k has joined #ruby
Gneiss has joined #ruby
wilmoore has joined #ruby
d3vic3 has joined #ruby
ryanf has joined #ruby
<Spooner>
You could instance_eval it?
dsa has quit []
<fowl>
allan_hills, you could also call the methods with obj.method(:meth).call but that is dumb and inadvisable
Progster has joined #ruby
EzeQL has joined #ruby
<fowl>
i find your question interesting, you are looking for a way to send messages to a caller, but you don't like typing the word 'send'
ianbrandt has joined #ruby
<allan_hills>
i thoguht about instance_eval, Spooner, but i'm not sure that would be any easier without writing one giant spec with lots of expectations
<fowl>
quite the predicament
<Spooner>
allan hills, I suppose not.
tiripamwe has quit [Ping timeout: 240 seconds]
<allan_hills>
as an aside, how do i mute someone? `/ignore nick` ?
dankest has joined #ruby
<mdszy>
allan_hills: yep
<allan_hills>
cool ty
billy_ran_away has quit []
<mdszy>
I tend to avoid it, though. One-sided conversations in channels are horribly annoying.
nebiros has quit [Remote host closed the connection]
enroxorz has quit [Quit: Ex-Chat]
<Jackneill>
how can i get the memory usage? is there a built-in func for that? in google i only found links with memory leaks and etc.
<apeiros_>
I use ps for that
<apeiros_>
got a little method that makes it nicer… moment…
<Jackneill>
yeah but it's not a built-in func, and works in linux mac, but not in win
<Jackneill>
ok thx
<Tasser>
Jackneill, generally, I use htop ;-)
bosphorus has quit [Remote host closed the connection]
<Tasser>
Jackneill, just profile it
<Jackneill>
i dont know what you mean tasser: im just getting started with ruby i only know the basics sorry :(
<stephenjudkins>
Gurpartap: JRuby has a lot of advantages. it's probably the fastest now (and will be even faster with JRuby 1.7 / JVM 7 soon)
mjb2k has joined #ruby
<Gurpartap>
o_O
<stephenjudkins>
it offers very good interoperability with java libraries. (which is much safer and easier than dealing with C libraries, because they are both garbage-collected languages without many undefined behaviors)
<stephenjudkins>
it is the only ruby implementation where it's possible to utilize threads across multiple cores, since all others have GIL
Markvilla has quit [Quit: Markvilla]
<stephenjudkins>
anyways: JRuby = a unicorn
stephenjudkins has quit [Quit: stephenjudkins]
Markvilla has joined #ruby
<Gurpartap>
how about objective-c (i know it's just a wrapper around C)?
* Hanmac
prefers his gems in c++
<Gurpartap>
it provides garbage collection and all that
<Gurpartap>
i think the biggest deal breaker in adopting objective c outside apple world is Cocoa.framework/GNUStep
<Gurpartap>
unless apple made that opensource, there isn't much trust in the communities to adopt GNUStep
cakehero has joined #ruby
<Gurpartap>
anyways
<Gneiss>
Who the hell is going to use GNUStep?
<Gneiss>
seriously guys.
Eldariof-ru has quit []
<fowl>
Gurpartap, you're forgetting about the majority of pc owners who dont have a mac
<Gurpartap>
fowl: objective c is a language
<Gurpartap>
fowl: GNUStep is based on it, and hence platform independent
TheHairyWoodsman has quit [Quit: Leaving.]
<fowl>
oh because obj c is really popular amongst linux devs
<fowl>
right?
<Gneiss>
LOL, the problem is, no one uses objc outside of apple
<Gurpartap>
gcc has objective c built in
<Gneiss>
No absolutely not
<Gneiss>
It's been a standard for a LONG time.
<Gurpartap>
it was never the point :)
joel has joined #ruby
<Gneiss>
But people tend to use GTK/Qt or something of the sort
<Gurpartap>
ah you mean for the UI etc
<joel>
It seems like when I call thread.current['brown'] = {'crayon' => 'crayola' } I don't get the hash back, thoughts? can I only return a value?
<Gurpartap>
that's not what i meant
<Gurpartap>
GNUStep also provides basic data type objects like NSArray, NSDictionary
<Tasser>
joel, huh?
<Gurpartap>
which isn't built-in into objective-c
<fowl>
yes, apple and their National Socialist classes
<joel>
Tasser: ?
<fowl>
NSAryan, etc
<Tasser>
joel, example script plz
wobr has quit [Quit: Leaving.]
<joel>
Tasser: docs seem to indicate any object is fine :\
<Tasser>
huh
<Gurpartap>
fowl: it works
<teratoma>
im not sure why you would go through the misery of objective c if you werent developing ios stuff
<otters>
objective-C is really nice though
<teratoma>
i guess
<Gurpartap>
teratoma: it's a useful declarative syntax
<Gurpartap>
i really like it
<Gurpartap>
very explicit
<teratoma>
and you use this to develop non IOS stuff?
jeff_sebring has quit [Quit: Leaving]
<Gurpartap>
and after all, it's all c too
Markvilla has quit [Quit: Markvilla]
<Gurpartap>
teratoma: definitely possible but there isn't much interest as apparent
<mjb2k>
teratoma: why not use Obj-C for Mac OS X stuff?
<fowl>
Minus, This is an INSTANCE method! Plus, this is my CLASS method! I"M GOIN COOCOO FOR OBJ-C PUFFS!
<teratoma>
you should totally use obj-c for mac osx/ios stuff!
<mjb2k>
oh I thought you were just saying iOS
<fowl>
@interface MyButt : YourButt
<fowl>
@end
<teratoma>
mac osx and ios will be the same thing some day
<shevy>
obj-c is damn verbose
<fowl>
os x is the same thing as a broken TV
<otters>
that's the point
atmosx has joined #ruby
jgrevich has quit [Quit: jgrevich]
<mjb2k>
NO! well yeah probably, but I dread the day
<Gurpartap>
what shevy and otters said.
<teratoma>
what do you mean probably
<shevy>
I hated writing interface or implementation stuff or whatever was the name
<fowl>
but nobody will admit it, because they all paid too much for it and feel like a fool
<teratoma>
everything they're doing points to that direction
<otters>
Lion was only $30
<teratoma>
it is nice they share the LLVM development
<shevy>
otters: what about hardware :)
<fowl>
hi i just spent $2,000 on a tower because it was called "THE PRO"
<fowl>
what games can i play on it? uh.. none?
<fowl>
I got kewl screensavers
<shevy>
teratoma: yeah... until they TAKE OVER AND SEIZE CONTROL
<shevy>
iWorldRUs
jeff_sebring has joined #ruby
<otters>
I thought we were talking about OSX vs iOS
<otters>
not the computer hardware
<teratoma>
that would be funny
<dcope>
fowl: "os x is a broken tv" ?
<teratoma>
licensed LLVM
<Gurpartap>
i thought we were talking about objcruby
<fowl>
dcope, u heard
<teratoma>
linux will be illegal
<Gurpartap>
vs jruby
Spooner_ has joined #ruby
<daed>
objcruby is a thing?
<dcope>
fowl: wat.
<anothervenue>
fowl: No one buys macs for gaming.
<mjb2k>
fowl: do you actually have any valid criticisms, or just an emotional rant?
<shevy>
teratoma: dont think so, got too much traction already
<Gurpartap>
daed: i pitched the wish
<otters>
making fun of mac users for not having games is like making fun of hairstylists for not having hazmat suits
<teratoma>
microsoft will declare linux to be malware, and linux wont boot on anything using secureboot
<shevy>
pinched the bish???
<otters>
you're looking in the wrong place
Drewch has quit [Ping timeout: 246 seconds]
<anothervenue>
otters: lol
<dcope>
fowl: what do you mean a broken tv
mikeyward has joined #ruby
<shevy>
teratoma: nah, they tried that many years ago with palladio or whatever was the name already
<fowl>
anothervenue, obviously, that was an answer to a question that was omitted from the hypothetical conversation, it was implied, try to re-read it and stop being so n-dimensional
<shevy>
but they tried that many years ago too. it's like throwing a red herring and hoping that someone catches it
Spooner_ is now known as Spooner
mikeric has quit [Quit: mikeric]
<Gurpartap>
otters: i have mixed reactions to that question, but i have been playing since 2007 now
<otters>
counts for something
<anothervenue>
I don't think OSX and iOS will be the same thing, they are just moving some of the conventions of interface over to OSX, which makes total sense, seeing as how Apple has been developing the Desktop Metaphor since 1985.
<Gurpartap>
i do take a few months off occasionally though
Aaton_off is now known as Aaton
<anothervenue>
Touch screen stuff lends itself to that abstraction much more than the mouse.
<Gurpartap>
around a little over 600 hours of game play right now
<fowl>
who cares? none of you will make it past december 21st
Drewch has joined #ruby
<teratoma>
mac and tablet and iphone will just be giant App Store portals
randoma__ has joined #ruby
chrisja has quit [Remote host closed the connection]
<anothervenue>
so? Thats the "digital distribution revolution"
hemanth has quit [Read error: Connection reset by peer]
<teratoma>
i rebel
<shevy>
the whole app store model seems like a big scam idea
<shevy>
with the main drug dealer being whoever controls it
hemanth has joined #ruby
<anothervenue>
Thats pretty much every commercial platform ever.
<anothervenue>
Same thing, new form.
<shevy>
dunno, it seems MUCH more controlled by just a few companies than before
<dcope>
shevy: please wait whie i put on my tinfoil hat
randomautomator has quit [Ping timeout: 244 seconds]
<shevy>
dcope: wont help you
<dcope>
shevy: how is it scam?
<dcope>
it's a centralized distribution place?
<shevy>
and you pay for the apps
<dcope>
it makes it easier for tards to find and manage software
<dcope>
shevy: there are free apps...
<shevy>
how can you choose outside from it?
Niamkik has quit [Remote host closed the connection]
<anothervenue>
Open your browser and look for software?
randomau_ has quit [Ping timeout: 244 seconds]
apeiros_ has quit [Remote host closed the connection]
myth17 has joined #ruby
<anothervenue>
brew install foo?
<dcope>
what anothervenue said
<dcope>
other package managers and distribution places
<shevy>
because average joe will do that :P
<dcope>
shevy: uh
apeiros_ has joined #ruby
<dcope>
the average joe uses the app store because that's all they know how to
xaq has quit [Read error: Connection reset by peer]
<anothervenue>
Also, its easy.
<shevy>
yeah
<shevy>
yeah
<dcope>
i don't see the scam in this?
minijupe has quit [Quit: minijupe]
<anothervenue>
serious
xaq has joined #ruby
<mjb2k>
the App Store is really just a commercialized version of every Linux distros' package repository
dnyy has joined #ruby
Jackneill has quit [Remote host closed the connection]
saschagehlich has joined #ruby
<shevy>
oh dont get me started on those linux distributions...
<Tasser>
mjb2k, and without dependency resolution ^^
<anothervenue>
Tasser: because the dependency is Cocoa, and you already have them all.
ramblex has joined #ruby
<mjb2k>
the apps are standalone, no dependency resolution needed
<anothervenue>
You don't need dependency resolution if you aren't depending on it. QtKit? Nah, Cocoa.
<dcope>
lol
<shevy>
now that would be cool - have an app in app store to replace the OS with another one, on click event
markab1 has joined #ruby
apok has joined #ruby
Drewch has quit [Ping timeout: 246 seconds]
markab has quit [Ping timeout: 248 seconds]
ringotwo has quit [Remote host closed the connection]
<anothervenue>
Why would you do that?
<anothervenue>
Seems overtly obtuse.
wobr has joined #ruby
<Gurpartap>
bluepill or god?
Gneiss has quit [Quit: Gneiss]
<shevy>
freedom or slavery?
<anothervenue>
Drama queen.
Drewch has joined #ruby
<shevy>
Slave worker.
<dcope>
can't tell if shevy is this stupid or if shevy is a troll
<anothervenue>
lulz
schovi has joined #ruby
dankest has quit [Quit: Leaving...]
* dcope
hopes it's just a troll
<anothervenue>
I dunno, I'm thinking a combo
<shevy>
I just adjust to you guys.
<Hanmac>
dcope you will notic a troll when you see them ... banister is some kind of it :P
<shevy>
Can't help to downgrade. :(
davidcelis has joined #ruby
<shevy>
banister just posts those awful links
algldl has joined #ruby
<shevy>
when you ignore these, it's ok
<shevy>
and never click on them!
<anothervenue>
I'm sending Apple drones to turn your BSD box into a Hackintosh.
<davidcelis>
banister likes to post a lot of links about something called pry
<Hanmac>
shevy it like he has a teaching factor ... he teach you "dont click on untrusted links"
<algldl>
anyone know why `Thread.new { sleep 60 }.join` takes 50% cpu on ubuntu 12.04 but none on a macos box?
tzvi has joined #ruby
<algldl>
with ruby 1.8
<algldl>
mri
<aszurom>
so if I don't want to drop $100 on Rubymine and I want a noob friendly editor I can use across OSX, Win, and Linux which hopefully has highighting, some autosense, and can execute the script in a debug window... what choices have I got?
<Gurpartap>
across?
<Gurpartap>
why?
<aszurom>
and VIM ain't it
<Gurpartap>
choose the best for each platform
<Gurpartap>
try sublime text 2
<Gurpartap>
it didnt cut over textmate for though
<anothervenue>
Vim
<davidcelis>
Azure: Sublime Text 2
<Gurpartap>
not even chocolat
<aszurom>
yeah, I use a mac at work, I have windows in my office, and linux in the living room
<davidcelis>
aszurom: Sublime Text 2. In vim-mode
<Azure>
lol
<aszurom>
does Sublime have any autosense about methods and stuff?
<Gurpartap>
yes
<davidcelis>
yes
schovi has quit [Remote host closed the connection]
<aszurom>
well then that's that
<aszurom>
so what's vim-mode make it do?
<davidcelis>
act like vim
<Gurpartap>
lol
qwerxy has quit [Quit: offski]
<Gurpartap>
aszurom: you dont need that if you dont know vim much
<aszurom>
I know it enough to run from it
<aszurom>
:-)
<davidcelis>
you sure you don't just wanna learn vim?
<Gurpartap>
or if you want to eventually learn it..
<shevy>
aszurom: hmm that's quite a lot of features... try sublime though. or geany and bluefish, but I dont think they have all the features you want
<aszurom>
I think while I'm trying to learn a language, trying to learn a whole new editor that in weird is going to suck
<aszurom>
but I've messed with Sublime enough to see it's sorta like Textmate
<shevy>
no worries. only one thing is sure in the eternal battle vim vs. emacs
<shevy>
there will be two losers
<Gurpartap>
i would just use gedit on ubuntu, textmate on mac
<Gurpartap>
and just write code
<anothervenue>
In the long run its easier to use vim.
<shevy>
hmm gedit lacks a lot of features IMO
<davidcelis>
then do sublime text 2
<Gurpartap>
and vim in terminal
qwerxy has joined #ruby
<shevy>
sublime I liked the most so far
kirun has joined #ruby
<davidcelis>
ST2 works on all the operating systems
<shevy>
and vim for fallback :P
<davidcelis>
out of the editors that aren't vim, ST2 is definitely the best
<Gurpartap>
it's all about writing basic code when you're just learning the language
<Gurpartap>
IDE requirements grow with your knowledge
eywu has joined #ruby
<shevy>
my ruby code is still very basic
<Gurpartap>
and you eventually come up with your preferences over time
<Gurpartap>
ST2 is python, jfyi
<davidcelis>
shevy: you're in here all the time, you should be a pro by now
<shevy>
davidcelis: dunno. I am very lazy...
<davidcelis>
lol
<shevy>
I want to reach the point where robots code for me
rambda has joined #ruby
<Gurpartap>
ask siri
<Gurpartap>
lol
<shevy>
or at least a brain interface, typing is annoying when it is hot outside
<aszurom>
instead of picking a nice ease-into-it project I decided to cut my ruby teeth on some csv and array-heavy transformations of data. Perhaps a bad idea
<shevy>
yeah. csv isn't a lot of fun
<shevy>
only XML is worse
<shevy>
but working with arrays is a good idea
snearch has joined #ruby
jxpx777 is now known as jxpx777|afk
<shevy>
aszurom: you used another language before ruby?
<rambda>
hey guys, having trouble with TCPSocket, keep getting an error with this code: http://pastebin.com/dYk7pXqF
jxpx777|afk is now known as jxpx777
<aszurom>
basic!
algldl has quit [Quit: leaving]
<aszurom>
well, I know a touch of perl, powershell, and not as much bash as I should
<aszurom>
but Ruby is my first OOP focused attempt
baphled has joined #ruby
<rambda>
I'm pulling in csv and taking an ip and port, trying to connect to that ip and port with TCPSocket...keeps saying sw.rb:14:in `initialize': getaddrinfo: Name or service not known (SocketError)
<aszurom>
I'm having more process than syntax issues
<baphled>
leave
<RubyPanther>
arrays are easy in Ruby, all you have to worry about is your math
baphled has left #ruby [#ruby]
davidw has joined #ruby
baphled has joined #ruby
baphled has left #ruby [#ruby]
davidw is now known as Guest23349
josefig has joined #ruby
josefig has quit [Changing host]
josefig has joined #ruby
baphled has joined #ruby
<Gurpartap>
aszurom: sinatra could be interesting start for you, perhaps?
<mjb2k>
nested threads sounds like huge nightmare potential
<ged>
Gurpartap: What do you mean by "nested threads"?
<mjb2k>
or more specifically, like more trouble than worth
itnomad has quit [Quit: Leaving]
<mjb2k>
(I'm assuming child threads that create more child threads)
t3hk0d3 has quit [Ping timeout: 246 seconds]
<apeiros_>
there's no such thing
<aszurom>
what I'm running into is what I wish they'd taught more of in comp sci classes in college... not how to code, but how to design and solve common data manipulations
<apeiros_>
there's no hierarchy in threads
<Gurpartap>
x = Thread.new { y= Thread.new { } /*sleep until timeout*/ Thread.kill}
cirwin has joined #ruby
stephenjudkins has joined #ruby
enroxorz has joined #ruby
<shevy>
aszurom: well it will come eventually when your brain has this "click" moment and everything makes sense, then your brain can try to "think in ruby", like you think in a foreign language when talking it well
runeb- has joined #ruby
<Gurpartap>
ged: ^
<shevy>
and I think only practicing by writing code on your own can help here
davidcelis has quit [Ping timeout: 244 seconds]
runeb- has quit [Client Quit]
itnomad has joined #ruby
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
runeb has joined #ruby
runeb has quit [Client Quit]
runeb has joined #ruby
runeb has quit [Client Quit]
c0rn_ has quit [Quit: Computer has gone to sleep.]
<mjb2k>
even if there is no actual hierarchy to threads, I'm talking about what is creating them. I don't think you should "recursively" create threads. When managing multiple threads, it should be done from a centralized place
monkegjinni has joined #ruby
<rambda>
let me ask a different question: does Net::Telnet require a prompt? The super-secret equipment I'm connecting to doesn't respond in any way once a successful connection is made.
ringotwo has joined #ruby
<apeiros_>
mjb2k: if you've a proper thread management facility, it doesn't matter whether you "recursively" create threads or not.
<apeiros_>
a new thread will just be a new thread. its origin won't matter.
ringotwo has quit [Remote host closed the connection]
ringotwo has joined #ruby
robert_ has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Remote host closed the connection]
iamlacroix has quit [Remote host closed the connection]
jfoley has quit [Quit: jfoley]
baphled has joined #ruby
jodell has quit [Quit: leaving]
<Gurpartap>
mjb2k, apeiros_: i see. while it works well for now, i have put a todo in this gem.
<mjb2k>
just the same as keeping all your database connection code in one place, I believe you should keep thread creation in one place, make maintenance easier, of course it depends on the specifics. Maybe there is an argument for apps which have a heavy use of threads
workmad3 has joined #ruby
jodell has joined #ruby
karlheinz1995_ has joined #ruby
<karlheinz1995_>
Hi. Is there a limit to the length of file-paths Dir.glob returns?
<mjb2k>
I haven't done anything with very heavy thread usage, so maybe that's just my limited view on the subject
enroxorz has quit [Quit: Ex-Chat]
<karlheinz1995_>
Because: I've got a path that is longer than 339 chars, and the end looks like this: "[...] zur Ent#3A70CB.mp4"
thomas is now known as Thomas
<karlheinz1995_>
If I shorten the filename (to 339 chars), I get: "[...] zur Entdeckungs.mp4"
<karlheinz1995_>
OS X, Ruby 1.8.7 & 1.9.3
Hanmac has quit [Ping timeout: 264 seconds]
<shevy>
odd karlheinz1995_
cjs226 has quit []
<shevy>
karlheinz1995_: can you test if the same happens if your path has no ' ' in it? in the file name
<Gurpartap>
how important is it to support 1.8.7 in a gem today? i know eventually everything moves to newer version, but is there an aspect keeping people to adopt 1.8.7 for new projects?
workmad3 has quit [Ping timeout: 245 seconds]
<eam>
karlheinz1995_: I'd suspect an encoding bug first. Perhaps by editing the filename you changed the encoding?
<shevy>
could also be an encoding problem perhaps karlheinz1995_
<shevy>
Gurpartap: a few people are still on 1.8.x. I think if it is possible to support 1.8.x then that should be done. if it is too much work, then it should be dropped
orlandodelaguila has quit [Quit: Saliendo]
<eam>
Gurpartap: I'd say super important. 1.8 is probably the most widely used ruby version
Bosma has quit [Quit: leaving]
minijupe has joined #ruby
<ged>
Gurpartap: I think it depends on if you anticipate your gem being used with existing code, or if people will likely be starting from scratch.
<rambda>
Anyone know how to set up a Net::Telnet connection where the host you're connecting to doesn't issue a prompt on connection?
udante has joined #ruby
<ged>
rambda: Did you turn off 'telnetmode'? If it's just a raw socket, it might be trying to do telnet protocol negotiation.
sepp2k has quit [Ping timeout: 246 seconds]
<rambda>
ged: I'm not familiar with telnetmode (kinda new to Ruby)...the equipment I'm connecting to does telnet protocol negotiation, but on a non-standard port and only responds once "spoken" to
<Gurpartap>
eam: i see
mohits has quit [Read error: Connection reset by peer]
timonv has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
<Xethron>
ok.... now to do something I've NEVER done before in Ruby....
DDAZZA has joined #ruby
* Xethron
Googles Ruby XML Parser
ringotwo has joined #ruby
<rambda>
ged: should I be setting telnetmode = false?
nachtwandler has quit [Quit: leaving]
nlew has joined #ruby
<Gurpartap>
ged: this one wouldn't be included in people's "apps". i'm writing a god/bluepill alternative while also learning various ruby aspects.
<nlew>
Does anyone have a good solution for stripping invalid characters from a UTF-8 string?
<eam>
nlew: how would you know which characters are invalid?
<nlew>
eam: I don't, but obviously Ruby does, if it can tell me the string is invalid.
<aszurom>
1.8.7 is the version that ships with OSX 10.7. I kept running into things I wish it did that 1.9.3 just does
<cirwin>
nlew: if your string is utf-8 it will convert it to urtf-8 bytes
<karlheinz1995_>
crashes
workmad3 has joined #ruby
<cirwin>
oh
<karlheinz1995_>
but with *255 it creates the file
<cirwin>
I'm wrong
<eam>
nlew: telling that a string is invalid is easy -- determining which parts are illegal is more difficult
* cirwin
goes to find the actual code he's sing
rbanffy has quit [Quit: Ex-Chat]
sepp2k has joined #ruby
kevinbond has joined #ruby
c0rn_ has joined #ruby
<nlew>
eam: Something like str.each_char.map { |c| c.valid_encoding? ? c : "\xEF\xBF\xBD"}.join
DDAZZA has quit [Quit: Leaving]
<nlew>
But with the non-UTF-8 Ruby 1.9 path, and then Ruby 1.8 path, I end up having three different sets of code. /sigh
<Xethron>
Which gem is the best for parsing XML documents?
wobr has quit [Quit: Leaving.]
<Xethron>
I want to get simple text output from Wolfram
jxpx777 is now known as jxpx777|afk
carlyle has joined #ruby
josefig has quit [Quit: Computer has gone to sleep.]
jeff_sebring has quit [Quit: Leaving]
qwerxy has quit [Quit: offski]
<Xethron>
so its not complex.... but nou ja... There seems to be quite a selection of XML gems out there
<eam>
nlew: how do you split by character if you don't know the encoding :)
<ramblex>
Xethron: nokogiri is decent
workmad3 has quit [Ping timeout: 246 seconds]
jfoley has joined #ruby
<nlew>
eam: I do know the encoding. It's UTF-8. It's just invalid. And Ruby understands the encoding. each_char will yield the individual bytes if they're not valid characters.
cjlicata has quit [Ping timeout: 246 seconds]
plastics has quit [Ping timeout: 240 seconds]
xiphiasx_ has quit [Changing host]
xiphiasx_ has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
RainbowDashh has joined #ruby
<rambda>
so this line is generating a NameError for me: host = Net::Telnet::new("Host" => ip,
<rambda>
uninitialized constant Net (NameError)
<Tasser>
rambda, require 'net/telnet'
<eam>
nlew: my concern would be whether the unmappable code points / invalid encoding might contain data which should be part of another valid encoding
Guest48673 has quit [Ping timeout: 246 seconds]
<rambda>
Tasser: thanks, I'll try that
IrishGringo has joined #ruby
<eam>
of course you could just delete it all
qwerxy has joined #ruby
QKO has joined #ruby
<nlew>
eam: Yeah this is only for strings which are claiming to be UTF-8. They probably really aren't, but if we don't know any better about what they actually are, all we can do is replace the bad characters.
<Tasser>
nlew, input from?...
<nlew>
This is to prepare the strings for JSONing
baphled has quit [Quit: leaving]
<nlew>
From a system that doesn't yet understand character encodings very well
<nlew>
Only just now supporting Ruby 1.9 even :/
<nlew>
So there are some places we read files, but don't actually know what encoding they are. So for now, just assume they're UTF-8, because that's as good as anything.
josefig has joined #ruby
QKO_ has quit [Ping timeout: 264 seconds]
anothervenue has quit [Quit: WeeChat 0.3.7]
<Tasser>
nlew, there are some libs that can guess the encoding... but they're not 100%
<nlew>
Tasser: Yeah, and it's also possible it could legitimately be an invalid string. So we have to handle the case regardless.
josefig has quit [Client Quit]
<nlew>
Tried using iconv, but it apparently doesn't handle 5- or 6-byte UTF-8 characters correctly. Which is to say, it considers them valid.
mads- has joined #ruby
<Tasser>
they are?
<nlew>
They were part of the initial specification, but removed
<Tasser>
nlew, UTF-8 chars can be up to 6 bytes
<mads->
I remember reading a ruby tutorial which within the first chapters covered some twitter stuff. It was very example based. Anyone know what this site was called?
<Tasser>
nlew, hups, didn't know that
<nlew>
Ruby properly considers strings with 5- or 6-byte characters to be invalid UTF-8
<Tasser>
mads-, doesn't matter, grab another ;-)
olrrai has joined #ruby
<eam>
nlew: is it that you really have utf8, or that you want to pass binary strings through JSON?
davidcelis has joined #ruby
<Gurpartap>
can you make yardoc respect the order of documented methods/attributes?
<Gurpartap>
currently it seems to have it's own random sort algo
<nlew>
eam: Really both. We do need a better solution for this eventually, but trying to avoid having to use a format more complex than JSON. Might be better to just suck it up and deal with it now though.
<eam>
base64 imo
<Gurpartap>
(it's alphabetical i guess)
t3hk0d3|2 has quit [Ping timeout: 246 seconds]
<rambda>
Tasser: thanks for your help. Do you know if Net::Telnet Hosts and Ports can be variables that were previously defined?
<Gurpartap>
i think yard enforces alphabetical sort
<Tasser>
rambda, who the heck still uses telnet? ^^
<nlew>
Hmm but we don't actually know the intended encodings, and there's some Java on the other end. So even if we base64 encode them, when we decode them, they're going to be the default UTF-16, and have the invalid characters elided anyway. :/
internet_user has quit [Remote host closed the connection]
<joel>
anyone know what this means in english? /Users/joels/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- action_view/test_case/test_helper (LoadError)
urbann has joined #ruby
Kesava has quit [Read error: Connection reset by peer]
urbann has left #ruby [#ruby]
<joel>
I'm calling ruby test_helper.rb inside my test directory
<mjb2k>
cannot load such file
Kesava has joined #ruby
<Tasser>
joel, no in the $LOAD_PATH
qwerxy has quit [Quit: offski]
philips has quit [Excess Flood]
<joel>
Tasser: new to ruby, not sure what I need to add to the load path, test_helper.rb ?
<joel>
I have that, I'm not sure what else Iw ould need?
ryanf has quit [Quit: leaving]
<ged>
It's just requiring something else that has a missing dependency.
<joel>
ruby 1.9.3, rails 2.3.11, I know both arn't up to date, sadly I'm trying to mimic an older project.
blacktulip has quit [Remote host closed the connection]
ben_alman has quit [Excess Flood]
<ged>
joel: test_help is depending on something else that's missing. Maybe the rails channel would recognize that, but I haven't used Rails since 2006.
<shevy>
so many layers on layers
robotmay has quit [Remote host closed the connection]
<joel>
ged: gotchya, will try rails, thanks man.
<ged>
Heh, that backtrace is a pretty concise example of why I gave up using Rails.
<rambda>
ok, so now my problem with Net::Telnet is that the equipment does not send any sort of prompt upon connection...so my script just hangs waiting for the prompt
<rambda>
any way to set it to not expect anything back?
<Synthead>
is there a way in ruby that I can define a hash (h = Hash.new), then add elements to it without having to state h[:this] =, h[:that] = ... could I just do h += { ... } or something?
<ged>
rambda: can you just send an EOL when you first connect?
Tearan has joined #ruby
mdszy has joined #ruby
<joel>
ged: yeah, I'm from a perl world, my head is spinning at that.
<ged>
rambda: If you don't need the expectation stuff, is there still a reason to use Net::Telnet?
<joel>
Synthead: you want to add one, or many keys to an existing hahs?
jfoley has quit [Quit: jfoley]
<joel>
Synthead: you probably want merge
<rambda>
ged: I'm a novice scripter and had done this with perl and expect in the past, just trying to do it with ruby this time to learn something new...I do need to be able to expect responses to commands and parse them
<ged>
Synthead: hash.merge!({ ... }) perhaps?
tiripamwe has quit [Quit: Leaving]
<ged>
Oh, joel already said that. :P
<Synthead>
ged, joel: nice, good idea
<Synthead>
thanks :)
bashdy has quit [Quit: bashdy]
jstew has quit [Quit: leaving]
monkegjinni has quit [Remote host closed the connection]
strife25 has quit [Read error: Operation timed out]
davidpk has joined #ruby
voodoofish430 has left #ruby [#ruby]
stephenjudkins has joined #ruby
<rambda>
ged: do you know of any way to set its prompt expectation to nil?
invsblduck has joined #ruby
<ged>
rambda: I don't, but maybe try writing directly to the telnet object's #sock when it first connects?
tewecske has quit [Quit: Leaving.]
mdszy has quit [Quit: bye for now]
ben_alman has joined #ruby
qwerxy has joined #ruby
<ged>
rambda: The problem is that you need to write something before your first expectation, right?
<rambda>
ged: yes, that's correct
qwerxy has quit [Client Quit]
<rambda>
ged: #sock, how's that work?
mnaser has quit [Ping timeout: 248 seconds]
Prudhvi_ has quit [Quit: leaving]
nilg has quit [Remote host closed the connection]
<ged>
rambda: Then maybe something like: t = Net::Telnet.new( ... ); t.sock.print( "first command\r\n" ); t.waitfor( ... )
<stephenjudkins>
joel: if no one has fixed your problem for you yet, the next thing you need to do--with all due respect--is to learn how to ask questions more constructively in IRC
<ged>
rambda: It's the underlying TCPSocket object.
nlew has left #ruby [#ruby]
<stephenjudkins>
people are really helpful if you offer all the relevant context you can. what are you trying to load? how is your system configured? when do you get this LoadError?
ttilley is now known as ttilley_off
anothervenue has joined #ruby
<joel>
stephenjudkins: I provided all that detail, including a stack trace, but I got it solves over in rails, thanks anyways.
ken_barber has quit [Remote host closed the connection]
<stephenjudkins>
joel: guess I missed that. sorry.
<rambda>
ged: thanks, I'll give that a shot
ttilley_off is now known as ttilley
mnaser has joined #ruby
wvms has joined #ruby
ken_barber has joined #ruby
<joel>
stephenjudkins: yeah, I appreciate the lecture though.
ph^ has joined #ruby
qwerxy has joined #ruby
vitoravelino is now known as vitoravelino`afk
ken_barber has quit [Remote host closed the connection]
<stephenjudkins>
joel: yeah, if you provided that don't take it personally, all I saw was somebody who was clearly floundering but not offering enough detail for me to offer any help. if people online made it easier for others to help each other out, it'd be a much more productive place.
<rambda>
ged: is t then whatever name I gave my connection, such as host, host.sock.print?
<joel>
stephenjudkins: I agree, people asking better questions, and providing better help, not lectures, is very important.
carloslopes has quit [Quit: Leaving.]
<stephenjudkins>
ok, sorry to try to help you.
tommyvyo has joined #ruby
Gurpartap has quit [Quit: Page closed]
<ged>
To be fair, he was just getting some vague general suggestions to what I thought was a pretty clear question.
<ged>
I don't know the rails stack very well anymore, or I'd have tried to help earlier.
<ged>
rambda: It's the Net::Telnet object.
<rambda>
ged: ah, ok...threw an error: undefined local variable or method `t' for main:Object (NameError)
<ged>
rambda: Did you paste code before? Sorry, I thought you had, but I can't find it now.
erichmenge has left #ruby [#ruby]
<ged>
rambda: Yeah, sorry, was just an example.
brngardner has joined #ruby
brngardner has quit [Remote host closed the connection]
t3hk0d3 has joined #ruby
<rambda>
ged: yeah, let me try to find it again
baphled has left #ruby [#ruby]
jxpx777|afk has quit [Quit: Mac is sleeping…]
<ged>
Heh, sorry.
mdszy has joined #ruby
<rambda>
ged: after reading about Net::Telnet, I had tried to do this with TCPSocket first because I thought Prompt would give me trouble: http://pastebin.com/dYk7pXqF
ctevie has joined #ruby
mikeric has joined #ruby
<ged>
rambda: Ah, okay, but you've since converted that to use Net::Telnet?
<Eiam>
typically I see hashes like { "name" =>"team a", "property"=>"100" } but I keep wanting to make hashes like {"team a" => "100"} because the rest seems superfluous, esp if its just a single key:value
<rambda>
ged: yeah, maybe I'll have to go back to raw socket though, considering I can't seem to get Net::Telnet to work without a prompt
t3hk0d3|2 has quit [Ping timeout: 240 seconds]
<Eiam>
however, this leads to cases where I have to say in an .each {|item| item.keys.first or item.values.first} to get the data out
joel has quit [Read error: Connection reset by peer]
<Eiam>
is there some reason i shouldn't make hashes like that esp if its a single pair, and is there a better way to access the attributes?
vlad_starkov has joined #ruby
myth17 has quit [Quit: Leaving]
jfoley has joined #ruby
qwerxy has quit [Quit: offski]
<ged>
rambda: Well you can mix them both if you're careful. When you create a Net::Telnet object, you can access the TCPSocket under it via the .sock method.
jgarvey has quit [Quit: Leaving]
<rambda>
ged: but the problem is still actually establishing that Net::Telnet connection, since it requires a prompt of some sort
<rambda>
ged: the equipment I'm connecting to doesn't seem to send anything at all back, not even a space or new line
<ged>
rambda: Right. One sec and I'll post a little example of what I mean.
<rambda>
ged: ok, thanks for taking the time to help me out, man...much appreciated
<shevy>
Eiam depends whether you need the information or not
<shevy>
Eiam when you dont need the information, keeping a hash as simple as possible is the better thing
<Eiam>
need in what sense
<Eiam>
its just transitory data that I'm mutating again later to yet another format
Markvilla has quit [Quit: Markvilla]
iocor has joined #ruby
<Eiam>
it just seems easier to consume in a basic hash like that, where both fields are important
ryanf has joined #ruby
<Eiam>
rather than "descriptor" => "important info"
<shevy>
in your example you had more information in the original hash. in the second hash, information was lost ("name") is gone
<Eiam>
right
jonathanwallace has quit [Remote host closed the connection]
<invsblduck>
sigh, the confusion of threads. i have some threading code that worked great with 1.8; seems to be giving me a lot of problems with 1.9. i know there was a change to 'native os threads' with 1.9, but i'm not sure what to do.
<Eiam>
it seems self obvious to me, the name is the key. so why bother with the other part
<Eiam>
shevy: okay, so next part, easier way to access those fields aside from .keys.first and values.first?
<Eiam>
as I do feel a bit silly doing that
<stephenjudkins>
invsblduck: what exactly is the issue?
<invsblduck>
what's the word on the street around here w/r/t ruby threads? thanks if you have any opinions
<shevy>
Eiam .keys will give you all keys of your hash, in array form
<Eiam>
shevy: right
<shevy>
you can iterate over a hash via .each_pair { |key, value]
beneggett has joined #ruby
<Eiam>
ahh
<shevy>
I am not sure what easier way you want to have, if you need all keys anyway
<Eiam>
okay right
<Eiam>
well its only a single key
<invsblduck>
stephenjudkins: i'm not exactly sure, but things seem to be happening "out of order". previously, synching everything within a mutex was doing what i expected, but now things are completely broken. not sure how to debug it
<Eiam>
maybe .each {|k,v| k.first, v.first
monkegjinni has joined #ruby
<stephenjudkins>
invsblduck: well, first off.. it's usually a bad idea to share mutable state between threads.
tzvi has quit [Read error: Connection reset by peer]
<Eiam>
shevy: its always [ { 'team a' => '100'},{'team b'=>'200'}]
<shevy>
so it is an array of hashes?
<rambda>
ged: I'll be back in a few, transitioning to the house from work...need to disconnect so I can screen this session for when I get home
rambda has quit [Quit: leaving]
<invsblduck>
stephenjudkins: this code wraps net::ssh. i spun the threading code myself instead of using net::ssh::multi because i think the latter wasn't flexible enough or something, don't recall.
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy>
I thought it was a plain hash ;)
tiripamwe has quit [Ping timeout: 248 seconds]
rambda has joined #ruby
Bosma has joined #ruby
<rambda>
ok, be back in a few..
lindenle_ has joined #ruby
<invsblduck>
stephenjudkins: i was mostly looking for an obvious "don't use threads," or "do this with fibers this way," etc. there's no hope for me to easily debug the real issue here :)
carlyle has quit [Remote host closed the connection]
<stephenjudkins>
between 1.8 and 1.9, the behavior of ruby threading has changed. in 1.8 the interpreter itself runs in a single OS thread, and preempts ruby "green threads" at its will. in 1.9, each ruby thread is mapped to an OS thread, which decides to preempt the other threads whenever it feels like it. There exists something called the "global VM lock" that ruby threads acquire before doing almost anything, which is necessary because so many C structs used by ruby
<stephenjudkins>
objects are non-threadsafe
brendan` has quit [Remote host closed the connection]
<stephenjudkins>
invsblduck: my advice is that you should not use threads.
fantazo has joined #ruby
<stephenjudkins>
what problem are you trying to solve?
<invsblduck>
stephenjudkins: ssh to 50+ machines in parallel. worked great in 1.8.7.
Progster has quit [Ping timeout: 248 seconds]
chson has quit [Remote host closed the connection]
<stephenjudkins>
invsblduck: ahh. so, what state is shared between these threads?
voodoofish430 has joined #ruby
<invsblduck>
stephenjudkins: well, net::ssh doesn't even function anymore--i can't even connect to a single machine. there's not really shared state between them, but the main thread collects statistics and does the logic (who's failed, how many are left, etc.)
<invsblduck>
if i 'require "net/ssh"' in irb and connect to a single host, it works. as soon as i run that same command inside the threader it don't work... Again, i don't need you to help me figure out why, just wanted the big picture on threading around here :)
<ged>
rambda: The 'dump.log' will contain a log of the conversation so you can see what was written/read, and maybe track down where it's hanging.
<invsblduck>
stephenjudkins: ohh, but i don't have multiple threads hitting *one* ssh session--each thread has its own independent connection/session/channel. thanks for the link
synthemesk has joined #ruby
neku|away is now known as neku
mnaser has joined #ruby
<stephenjudkins>
invsblduck: yeah, that was the impression I had of what you're doing. and if it starts breaking in that instance, I still think it's really unfortunate. and an example of why using any sort of global state is usually a mistake.
seitensei has joined #ruby
mneorr has quit [Quit: Leaving.]
<synthemesk>
let's say i have a class that has included a module...is there a way i can dynamically include another module into the first module such that the class will pick that functionality up?
mikeric has quit [Quit: mikeric]
<invsblduck>
stephenjudkins: right. i had actually bundled net::ssh with my program, so the version was effectively frozen; the fact it ran beautifully on 1.8.7 and then croaks on 1.9 obviously points to the interpreter changing drastically, not the library. hehe :)
hakunin has quit [Remote host closed the connection]
<invsblduck>
stephenjudkins: however, i did rip out the bundled one and try the latest gem, which doesn't work either...
<invsblduck>
stephenjudkins: thanks again for your help!
dcampano_ has joined #ruby
balki_ has joined #ruby
balki has quit [Read error: Connection reset by peer]
krnlsndrs has joined #ruby
dcampano has quit [Read error: Connection reset by peer]
uris has joined #ruby
mikeric has joined #ruby
<krnlsndrs>
#rvm is the right room for rvm help, right?
jsime has quit [Quit: Leaving]
slyv has quit [Quit: Cya!]
Agis__ has joined #ruby
qwerxy has joined #ruby
dcampano_ has quit [Client Quit]
unixman has left #ruby ["Leaving"]
Progster has joined #ruby
mneorr has joined #ruby
<stephenjudkins>
invsblduck: no problem. if you use em-ssh successfully and i'm around, let me know how it worked out
karlheinz1995_ has left #ruby [#ruby]
<invsblduck>
stephenjudkins: interesting, i may very well give that a shot
<blazes816>
Paradox: Does changing "Helpers" to "::Helpers" work?
Spooner_ has joined #ruby
<blazes816>
or Ttfm::Helpers
<Paradox>
ill test
<Paradox>
its puzzling
<Paradox>
this worked before
<epochwolf>
Paradox: this code is from 2007.
Nika_ has joined #ruby
<blazes816>
Paradox: If you just say Helpers, it tries looking in the current namespace (Ttfm::Api).
<blazes816>
I assume Ttfm::Api::Helpers doesn't exist (if it doesn't it isn't loaded)
<blazes816>
in the other example, I believe you're including Snoo::Account, etc
ramblex has joined #ruby
<epochwolf>
Paradox: this library also assumes you're working with already clean html. This will not work.
<Nika_>
Hello, I am new to Ruby, I would like to know how can I create an executable file from a ruby script ... Thanks
<Paradox>
blazes816, both are doing the same thing
Markvilla has joined #ruby
<Paradox>
Snoo::Client is including Snoo::Account and Snoo::Posts and similar
<Paradox>
this is attempting to include Ttfm::Helpers from Ttfm::Client
<Paradox>
:/
DrShoggoth has quit [Quit: Leaving]
<blazes816>
not sure why then
Spooner has quit [Ping timeout: 246 seconds]
<Paradox>
yeah its really perplexing
Spooner_ is now known as Spooner
<blazes816>
I suspect changing Helpers to Ttfm::Helpers would fix it
<epochwolf>
Let me rephrase the question, I am working on a fork for epubbery. I already have an html sanitzer, I now need a way to convert html which may still be invalid into xhtml 1.1 which will validate.
<ksergio>
blazes816: yes, but for some reason apt doesnt seem to find it in the default 12.04 repos..
<ksergio>
oh well
<ksergio>
thanks
<shevy>
ubuntu package
chimkan has quit [Client Quit]
<shevy>
one day we will overcome this
<mjb2k>
shevy: what do you have against packages and repositories?
<xiphiasx_>
one day I won't be stick with C/C++ forever and ever
<xiphiasx_>
stuck
baroquebobcat has quit [Client Quit]
ramblex has quit [Ping timeout: 248 seconds]
jonathanwallace has joined #ruby
bikr has quit [Ping timeout: 265 seconds]
<ksergio>
what's wrong with ubuntu packages?
fbernier has joined #ruby
bikr_ has quit [Ping timeout: 244 seconds]
<davidcelis>
the convenience comes at a price
<ksergio>
like everything in life :P
zeroXten has quit [Remote host closed the connection]
<anothervenue>
haha
saschagehlich has quit [Quit: saschagehlich]
vlad_starkov has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
<ksergio>
well, crap, I guess I'll install it manually
<epochwolf>
ksergio: ubuntu packages are out of date and don't play nice with gems
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<ksergio>
epochwolf: thanks. I was just reading I shouldnt really use rails with anything but the latest ruby version...
<ksergio>
<- newbie
gtuckerkellogg has joined #ruby
<epochwolf>
<- expert
bosphorus has quit [Ping timeout: 252 seconds]
bglusman has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
bglusman has joined #ruby
<anothervenue>
ksergio: The correct term is Nuby.
<ksergio>
haha, ok
<anothervenue>
No, I have no idea.
<eam>
epochwolf: I think I'd phrase it more like gems don't play nice with established packaging systems
mikepack has joined #ruby
<eam>
except they do, for the most part
kpshek has quit []
<eam>
why every language under the sun feels as if they should invent their own slightly naive and problematic packaging system is beyond me
<ged>
eam: Which packaging system should languages use instead?
<anothervenue>
eam: because language designers think they have a better way. Which is why they started the language in the first place.
<eam>
anothervenue: unfortunately (and empirically) aptitude at developing a language does not typically extend to aptitude at designing a packaging system
<cirwin>
javascript have it best
<cirwin>
probably because their package management system was designed most recently
bglusman has quit [Ping timeout: 246 seconds]
<eam>
npm addresses a different set of problems
<anothervenue>
eam: True
vlad_starkov has quit [Ping timeout: 244 seconds]
<epochwolf>
eam: because ruby runs on more than just apt-based systems
qwerxy has quit [Quit: offski]
fridim_ has quit [Ping timeout: 264 seconds]
<eam>
epochwolf: so does every other distribution-packaged component
<Xethron>
REXML or Nokogiri for Parsing XML documents?
<cirwin>
Xethron: nokogiri
mikepack has quit [Remote host closed the connection]
<Xethron>
cirwin: why?
pk1001100011 has quit [Ping timeout: 255 seconds]
<cirwin>
it's faster, more reliable and has a richer API
havenn has quit [Remote host closed the connection]
<epochwolf>
Xethron: nokogiri is written in C and does all kinds of useful things. REXML is a last resort written in ruby so you at least can parse xml if you've been shafted badly enough you can't install gems.
dnyy has quit [Remote host closed the connection]
<epochwolf>
REXML has no validation and will parse horribly invalid xml without warnings.
<Xethron>
ah, I see.....
<Xethron>
Nokogiri it is!
<epochwolf>
nokogiri can also handle html documents
<cirwin>
but not yet HTML 5
<boobah>
nokogiri is the bee's knees
<epochwolf>
though it does tend to mangle script tags.
mads- has quit [Quit: Leaving]
<ryanf>
the idea that ruby libraries should be distributed via systems like apt baffles me
<ryanf>
for all the extra manpower involved, what exactly is the benefit supposed to be?
<Agis__>
guys, I've installed ruby on my windows system, how can I edit some gem's dependencies? where are the installed gems located?
<epochwolf>
ryanf: one command install and setup of things like redmine
<epochwolf>
ryanf: and one command security updates
<mjb2k>
is nokogiri going to add HTML 5 support?
<ksergio>
ryanf: one single package manager instead of one for each programming language
<ryanf>
ok but you'd better hope you're only trying to install redmine and not any other packaged rails apps
<ryanf>
since they'll depend on completely different versions of everything
<mjb2k>
(seems odd to since HTML 5 is not XML)
mikeric has quit [Quit: mikeric]
<epochwolf>
ryanf: yup, that's why apt doesn't work too well in practice for such applications.
minijupe has quit [Quit: minijupe]
ph^ has quit [Remote host closed the connection]
rking has joined #ruby
<ryanf>
also there are a million tiny niche rubygems that nobody is going to bother maintaining apt, rpm, etc packages for
<ryanf>
so if you supposed to use apt for the popular stuff, what are you supposed to do for everything else?
<ryanf>
*you're
<okguy>
wa?
pk1001100011 has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
rking has quit [Client Quit]
rking has joined #ruby
Progster has quit [Ping timeout: 260 seconds]
mmun has quit [Quit: Computer has gone to sleep.]
uris has quit [Quit: leaving]
<cirwin>
mjb2k: there was a post on the libxml2 mailing list about adding html5 (which is what powers nokogiri on c-ruby). They're going to wait for the spec to settle a bit more ;)
rking has quit [Client Quit]
rking has joined #ruby
ksergio has quit [Quit: Leaving]
bfig has joined #ruby
mneorr has quit [Quit: Leaving.]
andrewhl has joined #ruby
beneggett has quit [Remote host closed the connection]
nari has joined #ruby
tcopp has left #ruby [#ruby]
Skaboy has quit [Quit: Never put off till tomorrow, what you can do the day after tomorrow]
joshman_ has joined #ruby
<bfig>
hello. working on a ruby interp and i have some questions regarding default behaviors of some things. for what i experimented with the interpreter, array indexing works by two operations, in c++ notation: operator[], operator[]=. for the first (operator[]) you get back a ruby object, and take in an int as a parameter. for the second (operator[]=) you take an int for the indexing, and also a computable expression (or an object ref
<bfig>
erence) and you assign through whatever underlying object you have, the expression to the indexee
monkegji_ has quit [Remote host closed the connection]
udante_ has joined #ruby
udante has quit [Disconnected by services]
<bfig>
in this case you are applying operator[]=. the distinction is important because unlike c++ (and at least in the interp i'm building) i have no concept of object reference (i have the concept of variable in the heap/stack, which points to an underlying object, but not anonymous references)
Nika_ has quit [Quit: Page closed]
<cirwin>
bfig: your parser should distinguish the two uses of []
<cirwin>
so that you know which function is being called
ryanf has quit [Quit: leaving]
<bfig>
cirwin, you mean a[] and a[]= ?
<cirwin>
yeah
<bfig>
the idea was to do it, yes.
<bfig>
i was wondering in any case, what is the default behavior of indexing or index-assigning ?
<cirwin>
it's the same as obj.send(:'[]=', *args) or obj.send(:'[]', *args) i think
<bfig>
what's does .send do?
fbernier has quit [Ping timeout: 245 seconds]
<cirwin>
calls a method on an object by nae
dbgster has joined #ruby
<cirwin>
*name
<cirwin>
i.e. it's the object's responsibility to implement []=
<cirwin>
so it's different for Array's and Hashes for example
dankest has joined #ruby
<bfig>
ok, but there is default error behavior, for some things returning a Nil object is fine
<bfig>
for example, indexing an array out of bounds returns Nil, and if assigned out of bounds, the array is resized appropriately
<cirwin>
yea
cpruitt has joined #ruby
<cirwin>
you could look up the rbx source code
<cirwin>
it might have ruby implementations of Array etc.
<cirwin>
not sure
dankest has quit [Client Quit]
philoserf_ has quit [Quit: zzzzzzzz]
minijupe has joined #ruby
krusty_ar has quit [Remote host closed the connection]
cherrypeel has quit [Ping timeout: 248 seconds]
yonggu has joined #ruby
cherrypeel has joined #ruby
bricker88 has quit [Quit: Leaving.]
jimeh3 has quit [Ping timeout: 246 seconds]
mdhopkins has joined #ruby
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
<eam>
16:06 < ryanf> the idea that ruby libraries should be distributed via systems like apt baffles me
macmartine has quit [Quit: macmartine]
<eam>
there's no additional manpower (on the contrary, the overhead of maintaining the gems format vanishes), and the gain is obvious: Ruby libraries often depend on other system functionality (C shared objects) and unless they work within the distribution's packaging framework they cannot properly express their depenedencies
<eam>
frankly, it's an absurdly poor user experience to say "sure we have a packaging system called gem, just run some list of commands in conjunction depending on your underlying system"
<eam>
"and if you don't, stuff will break weirdly"
Spooner_ has joined #ruby
okguy has quit []
gtuckerkellogg has joined #ruby
ianbrandt has quit [Quit: ianbrandt]
<eam>
the entire point of a packaging system is to encapsulate all the necessary steps to bring a system into a particular installed state -- gem can't do that
<eam>
rpm or apt can
hunglin has joined #ruby
<eam>
thankfully it's fairly trivial to adapt gem (or cpan, or any other format) to any particular distro's packaging scheme
Spooner has quit [Ping timeout: 246 seconds]
<eam>
but to the extent that it's troublesome, the fault lies with the custom one-off packaging scheme, which shouldn't exist if not for a typical and unfortunate NIH bias
the_jeebster has quit [Quit: Leaving.]
schickung has quit [Quit: schickung]
andrewhl has quit [Remote host closed the connection]
nari has quit [Ping timeout: 240 seconds]
luckyruby has quit [Remote host closed the connection]
pac1 has joined #ruby
<ged>
But if not a custom one-off packaging scheme, which existing scheme do you choose? Especially which one that works on every platform Ruby supports?
tiripamwe has joined #ruby
Spooner_ is now known as Spooner
chson has joined #ruby
jfoley has quit [Quit: jfoley]
<cirwin>
distros shouldn't package ruby libraries; but they should package ruby apps. Maybe "bundle package" should be used instead.
<eam>
ged: there's no need to chose. There's a clear interface between a build system and arbitrary packaging platforms
smw_ has joined #ruby
<ged>
eam: I don't follow. You mean you could build any arbitrary package format using a Rakefile or something?
<smw_>
What does p194 mean? Is there a large difference between p194 and p0?
<eam>
ged: correct
minijupe has quit [Quit: minijupe]
oooPaul has quit [Quit: Ciao for now!]
<eam>
ged: see, for example, fpm
<ged>
eam: Is there an example of such a thing for other languages?
<cirwin>
eam: the reason that will never happen is because each existing package management system has its own quirks; so the upfront drudgery to make that happen does not seem worth it
<eam>
or any of the other format:format or build:format bridges
Ethan has quit [Ping timeout: 248 seconds]
dnyy has joined #ruby
<eam>
cirwin: yes that's why I suggest it is a mistake to invent a useless new platform in the first place
<eam>
a mistake not unique to ruby, mind you
cousine has quit [Remote host closed the connection]
<Tasser>
cirwin, ohh, dependency resolution :D
<Tasser>
cirwin, and updates of one part ;-)
<ged>
Hmmm... neat! "gem (even autodownloaded for you)"
<Tasser>
ged, I'm pretty sure there's a gem2deb
pac1 has quit [Quit: I got it one line of code at a time]
sharenothing has joined #ruby
<Tasser>
archlinux has a PKGBUILD-rubygem.proto
<Tasser>
but that doesn't map dependencies
<ged>
Tasser: Cool, but I would find it surprising if it worked on extensions.
<ged>
E.g., can it auto-detect that the 'pg' gem requires the 'libpq-dev' package?
JustinCampbell has joined #ruby
dankest has joined #ruby
mdszy_ has joined #ruby
<Tasser>
ged, hell no ^^
<Tasser>
ged, -dev packages are a debian speciality btw
<eam>
Tasser: that's not necessarily true
<Tasser>
ged, and .deb packages wouldn't need libpq-dev in the end
<Tasser>
eam, name one of the bigger distributions that use dev packages as well
minijupe has joined #ruby
<eam>
many packaging toolchains can do dependency detection by (for example) walking the objects and looking at SONAMEs
<eam>
Tasser: well, RHEL uses -devel, which is essentially the same
<ged>
But that's my point. Until there's some sort of consistency in naming convention, you need some intermediate format to package a ruby library.
<eam>
ged: nah
<Tasser>
eam, oh, duh
<Tasser>
eam, never cared about any *.rpm :-)
<eam>
because for example, an rpm can express a dependency on more than just a package name or version
<Tasser>
eam, how good are they?
<eam>
you can say "I require libxml2.so.1"
<eam>
and then packages can express that they supply this shared object
<eam>
and you can do a bit of magic at build time to discover this too
<eam>
Tasser: eh, they're ok
<Tasser>
sounds... complicated
<eam>
I'm not in love with apt or rpm, but they're much better than any language specific packaging attempt
<ged>
eam: How would you specify dependencies if not in an intermediate format?
mdszy has quit [Ping timeout: 264 seconds]
mdszy_ is now known as mdszy
<RubyPanther>
it is not realistic to develop new software using only distro tools and dependencies because the software that goes into distros has mostly been tested for a few years ("stable")
<cantonic>
hey there. i want to have an application for my personal needs. nothing specific, but automating some of my daily tasks and having everything organized… i wanted to use Rails, but now i consider using Padrino since it is more lightweight. any other suggestions for what i try to do?
<eam>
RubyPanther: erm, there are stable and unstable distros
minijupe has quit [Client Quit]
<eam>
RHEL vs Fedora, for example
<RubyPanther>
I'm not sure that is a valid example, I've been using RH/Fedora since the 90s
<eam>
enterprise will always use stable (old) software, but that's independent of any packaging concern
<eam>
RubyPanther: then you should know how trivial it is to build bleeding edge packages as rpms?