liluo has quit [Read error: Connection reset by peer]
kjellski has quit [Ping timeout: 244 seconds]
JetAway has joined #ruby
cantonic has quit [Ping timeout: 240 seconds]
cantonic_ is now known as cantonic
jhunter has quit [Ping timeout: 264 seconds]
CaptainJet has quit [Disconnected by services]
JetAway is now known as CaptainJet
jhunter has joined #ruby
rodj has quit [Quit: rodj]
radic has quit [Excess Flood]
bier has quit [Ping timeout: 264 seconds]
s0ber has joined #ruby
aantix_ has joined #ruby
radic has joined #ruby
bier has joined #ruby
phanousit has joined #ruby
banseljaj has joined #ruby
banisterfiend has quit [Remote host closed the connection]
adamkittelson has quit [Ping timeout: 248 seconds]
mikepack has quit [Remote host closed the connection]
Crisewng has left #ruby [#ruby]
aantix has quit [Ping timeout: 244 seconds]
ringotwo has quit [Remote host closed the connection]
emmanuelux has quit [Ping timeout: 240 seconds]
carlyle has joined #ruby
aantix_ has quit [Ping timeout: 246 seconds]
mfridh has quit [Ping timeout: 255 seconds]
Abbas| has quit [Ping timeout: 246 seconds]
chessguy has joined #ruby
raphie_ has quit [Remote host closed the connection]
Supaku has joined #ruby
Banistergalaxy has joined #ruby
justsee is now known as justsee|away
<Banistergalaxy>
Hey guys
justsee|away is now known as justsee
TheTFEF has quit [Read error: Connection reset by peer]
centipedefarmer has joined #ruby
TheTFEF has joined #ruby
pskosinski 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]
hadees has joined #ruby
hadees has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 248 seconds]
Hanmac has joined #ruby
randomautomator has quit [Remote host closed the connection]
nateberkopec has joined #ruby
hunglin has joined #ruby
monkegjinni has quit [Remote host closed the connection]
hunglin has quit [Client Quit]
liluo has joined #ruby
<fowl>
TRANSLATION: "Let's go pay some hookers to knock our junk around!"
phoe6 has quit [Quit: phoe6]
tobym_ has joined #ruby
riginding has quit [Remote host closed the connection]
xorgnak has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Chryson has joined #ruby
williamcotton has quit [Ping timeout: 240 seconds]
savage- has quit [Remote host closed the connection]
apok_ has joined #ruby
drupin has left #ruby ["Leaving"]
Supaku has quit [Quit: Leaving.]
uris has joined #ruby
jjbohn has joined #ruby
apok_ has quit [Client Quit]
williamherry has joined #ruby
williamcotton has joined #ruby
KindOne has quit [Ping timeout: 264 seconds]
sebicas has joined #ruby
apok has quit [Ping timeout: 244 seconds]
theRoUS has quit [Ping timeout: 240 seconds]
chessguy has quit [Remote host closed the connection]
khakimov has quit [Quit: Computer has gone to sleep.]
krusty_ar has quit [Read error: Connection reset by peer]
resure has quit [Remote host closed the connection]
krusty_ar has joined #ruby
lunitikcalm has quit [Remote host closed the connection]
<SeanLazer>
can somebody give me a hand with an inheritance issue? i'm calling a class method on a parent class but i want a subclass to be able to change its options, as seen here: https://gist.github.com/3232551
<SeanLazer>
this doesn't work, it calls with the parent class' options
<SeanLazer>
what's the best way to handle a situation like this?
messi has joined #ruby
<messi>
ciao
<messi>
list
khakimov has quit [Quit: Computer has gone to sleep.]
messi has quit [Client Quit]
macer1 has quit [Remote host closed the connection]
yugui_zzz is now known as yugui
maletor has joined #ruby
jrajav has joined #ruby
jxf has joined #ruby
radic has quit [Disconnected by services]
SCommette has joined #ruby
radic_ has joined #ruby
<phanousit>
can anyone explain to me what the method "method" does?
Gab0 has quit [Read error: Connection reset by peer]
radic_ is now known as radic
minijupe has joined #ruby
cj3kim has joined #ruby
yugui is now known as yugui_zzz
<heftig>
phanousit: method(:puts) gets you an object embodying the "puts" method
<heftig>
that includes the receiver
tcopp has joined #ruby
bricker88 has quit [Quit: Leaving.]
richardr has quit [Ping timeout: 244 seconds]
CaptainJet has quit [Ping timeout: 240 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
cj3kim has quit [Quit: This computer has gone to sleep]
robert45 has quit [Quit: • IRcap • 8.6 •]
CaptainJet has joined #ruby
KindTwo has joined #ruby
SCommette has quit [Quit: SCommette]
idflyfish has joined #ruby
hekin has joined #ruby
<idflyfish>
hello
justsee has quit [Ping timeout: 256 seconds]
<idflyfish>
I'm looking to learn a new language and it is between ruby and python
tcopp has quit [Quit: leaving]
<idflyfish>
any thoughts as too why I should choose ruby?
koshii has quit [Ping timeout: 244 seconds]
<hekin>
apeiros_: hi, there?
<idflyfish>
hello ap
busybox42 has quit [Remote host closed the connection]
<phanousit>
heftig: thanks
davidcelis has joined #ruby
<idflyfish>
is this where the hardcore rubyists hang out?
<fowl>
no this is where we idle
<idflyfish>
hah
<idflyfish>
I was wondering when someone was going to speak up
<idflyfish>
well...leaning towards ruby...thinking about python also
<idflyfish>
thanks
bluenemo has quit [Remote host closed the connection]
williamcotton has quit [Ping timeout: 252 seconds]
krusty_ar has quit [Remote host closed the connection]
centipedefarmer has quit [Ping timeout: 255 seconds]
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<fowl>
idflyfish: ruby is better than python (imo)
williamcotton has joined #ruby
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
<fowl>
one thing is, in python the lambda is limited to one line which is really limiting
<heftig>
i prefer python's importing to ruby's requiring
<fowl>
repeating self all the time is annoying
stephenjudkins has joined #ruby
<heftig>
python's explicit "self" is ugly
<fowl>
class X: def foo(self, ..):
<Chryson>
idflyfish: have your cake and eat it too. My experience of both: Python is explicit, and Ruby is implicit. It seems a lot easier to hide behavior in Ruby so that you can write short, pretty, declarative code (ie, mixins, code blocks). Python is great for its simplicity and ease-of-use. Python is essentially "executable pseudo-code." Anyway, that's my subjective two cents.
phoe6 has quit [Quit: phoe6]
koshii has joined #ruby
chimkan has quit [Read error: Connection reset by peer]
chimkan has joined #ruby
verbad has joined #ruby
SCommette has joined #ruby
ianbrandt has joined #ruby
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
havenn has joined #ruby
jonathanwallace has joined #ruby
stefanp_ has quit [Ping timeout: 265 seconds]
denysonique has quit [Max SendQ exceeded]
NimeshNeema has quit [Excess Flood]
BrianE has quit [Read error: Operation timed out]
ladder4 has quit [Max SendQ exceeded]
phoe6 has joined #ruby
jonathanwallace has quit [Ping timeout: 240 seconds]
Synthead has joined #ruby
KindTwo has quit [Changing host]
KindTwo has joined #ruby
rodj has joined #ruby
KindTwo is now known as KindOne
MetaCosm has quit [Max SendQ exceeded]
SeanLazer has quit [Quit: SeanLazer]
dv310p3r has quit [Ping timeout: 240 seconds]
lectrick has quit [Max SendQ exceeded]
moeSeth has quit [Ping timeout: 246 seconds]
fcoury has quit [Ping timeout: 252 seconds]
regedarek has quit [Ping timeout: 248 seconds]
SeanTAllen has quit [Ping timeout: 248 seconds]
[diecast] has quit [Ping timeout: 246 seconds]
chimkan has quit [Quit: chimkan]
notbrent has quit [Ping timeout: 252 seconds]
iori has joined #ruby
pvh has quit [Ping timeout: 248 seconds]
anildigital_work has quit [Ping timeout: 276 seconds]
skryking has quit [Quit: Konversation terminated!]
Spaceghostc2c has quit [Ping timeout: 260 seconds]
locriani has quit [Remote host closed the connection]
relix has quit [Ping timeout: 244 seconds]
_marvin has quit [Ping timeout: 264 seconds]
kapowaz has quit [Ping timeout: 260 seconds]
mroth has quit [Ping timeout: 246 seconds]
savage- has joined #ruby
NimeshNeema has joined #ruby
dnyy has quit [Ping timeout: 246 seconds]
baroquebobcat has joined #ruby
dkannan has quit [Ping timeout: 248 seconds]
dotemacs has quit [Ping timeout: 245 seconds]
tsguy52 has joined #ruby
kaichanvong has quit [Max SendQ exceeded]
SCommette has quit [Quit: SCommette]
stephenjudkins has quit [Quit: stephenjudkins]
davidboy has quit [Max SendQ exceeded]
NimeshNeema has quit [Max SendQ exceeded]
<aclocal>
I am wondering I have heared of ruby and say some code , though curious is rails just a web server because I always here ruby on rails ?
hekin_ has joined #ruby
<aclocal>
say = saw
maletor has quit [Quit: Computer has gone to sleep.]
<havenn>
aclocal: but no, Rails isn't a web server
moshee has quit [Ping timeout: 252 seconds]
Progster has quit [Ping timeout: 244 seconds]
<tsguy52>
aclocal: Ruby on Rails is a web framework, which uses Ruby as the programming language. A web server for Ruby on Rails is a completely different component of the website altogether. Some popular web server setups include NGINX + Passenger and Apache + Passenger. Google is your friend :D
<havenn>
aclocal: ^ Rails is a web framework that uses Rack. Rack connect Rails and other Ruby frameworks to web servers that support Ruby.
pvh has joined #ruby
<havenn>
aclocal: Ruby web servers would be like WebRick, Unicorn, Rainbows!, Thin
<havenn>
aclocal: usually with Nginx, Apache, or Lighttpd in front
phoe6 has quit [Quit: phoe6]
<havenn>
aclocal: Oops, forgot a major Ruby web server... Phusion Passenger
<williamherry>
what `handle` is when registry on rubygems.org?
<tsguy52>
aclocal: Basically you should know that, Ruby on Rails is amazing…
krz has quit [Quit: krz]
Taichou_ has joined #ruby
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347]]
<aclocal>
so is there any uses to ruby out side of rails ?
<havenn>
aclocal: Yes.
sent-hil has joined #ruby
anildigital_work has joined #ruby
<havenn>
aclocal: Ruby is useful for much more, but another awesome Ruby web framework is Sinatra: http://www.sinatrarb.com
<aclocal>
and what exactly is more in a web framework then an actual webserver that host ruby programs ?
SCommette has joined #ruby
SCommette has quit [Client Quit]
kaichanvong has joined #ruby
<rking>
aclocal: It's just stacks of patterns.
<aclocal>
Are you talking just about there being more libs to uses like server faces , messaging , ejb ,... webservices etc stuff \
<rking>
aclocal: Whenever you do a thing a bunch of times, it's helpful to stop and think, "Can the computer do this instead of me?" And a web framework aims to answer that question for a bunch of the minutia that you'd otherwise have to do.
happydpc has joined #ruby
<aclocal>
or is webframe work different term then the one in other languages like java
phoe6 has joined #ruby
dnyy has joined #ruby
<rking>
aclocal: I'm not sure what the Java terminology is. I spent about a week in 2002 where I looked into such things, and pretty much haven't looked back. They're wack.
relix has joined #ruby
<rking>
aclocal: But whatever it is, in Ruby, it's going to be more programmer-friendly than 99% of the things you're used to in Java.
rd34 has quit [Quit: rd34]
<oxide3>
aclocal: Rails provides a structured way to create web sites using ruby, a webserver, and a database. It provides code generation to create lots of boilerplate code and gently forces you into a model-view-controller pattern
<havenn>
aclocal: A web framework like Ruby provides opinionated conventions around routes, views, and models etc. Rails like most Ruby web framework uses Rack (a hugely popular webserver interface). You can serve up your Rack app however you want, with whatever webserver you want that works with Rack.
<havenn>
aclocal: Err, that first 'Ruby' was meant to be 'Rails'
<oxide3>
you could go and reinvent the wheel and figure out how to combine the serving of pages, generation of dynamic content, and persistence of stuff to a database
moshee has joined #ruby
<oxide3>
but that would be useless unless you really wanted to make a better wheel
<rking>
aclocal: Yeah, that's a decent description, sure.
<havenn>
aclocal: ya, Rail is MVC web app framework
kapowaz has joined #ruby
jmil has quit [Ping timeout: 244 seconds]
<aclocal>
like spring , structs , velocity ,...etc stuff ya
mk03 has quit [Remote host closed the connection]
<oxide3>
spring is a monster, way more than just that, but yes it includes a web app framework
<aclocal>
"but that would be useless unless you really wanted to make a better wheel" well agreed provided you have done the grunt work and understand how to do it the hard way . after that sit back it push buttons
<aclocal>
it = and
<aclocal>
virtually no creativity left :( just screwing with configuration files :)
verbad has quit []
<oxide3>
Well, if one was comfortable with spending... i don't know, 3-5 or more years thinking, writing, promoting, and maintainting it
baroquebobcat has quit [Quit: baroquebobcat]
Jay_Levitt has quit [Read error: Operation timed out]
rodj has quit [Quit: rodj]
jmil has joined #ruby
<aclocal>
so how is joomla or drupal or other things of that nature not just an web framework
<aclocal>
they basically do all the shit for you
adeponte has joined #ruby
rodj has joined #ruby
<aclocal>
and you just have to learn the tool not how to program and deep concepts
<aclocal>
pointless because the deep concepts are the most important ways of thought
<fowl>
joomla/drupal is the next step
idflyfish has quit [Ping timeout: 246 seconds]
<fowl>
rails isnt a blog, its a framework for building things such as blogs
uris has quit [Quit: leaving]
<aclocal>
ok cool so it like can generate a joomla / drupal site :)
jrajav has quit [Quit: The best darkness is strange and surprising]
idflyfish has joined #ruby
<oxide3>
One day we wil have a web framework generator that builds web frameworks like ROR so people can build things like Can I haz Cheeseburger
<tsguy52>
aclocal: think of building a house…. all of the building materials are there and you have all the creativity in the world to build your house like you would want… so yes - lots of creativity..
<fowl>
aclocal: can't tell if trolling or not
eko has joined #ruby
eko has quit [Changing host]
eko has joined #ruby
<aclocal>
I guess whats next something maybe that can generate the a webserver of many joomla's then maybe the internet :)
<tsguy52>
aclocal: sure… a joomla farm.. I could totally see that happening
quest88 has joined #ruby
<aclocal>
"think of building a house" its like a modular home built mostly by a computer . No mistakes :)
<fowl>
...in a future where humans breed and enslave Apps to do their chores...
baroquebobcat has joined #ruby
<aclocal>
Ok I retract my negative comment there is lots of creativity just in different places and thru different means ...
<aclocal>
But if you like the low level stuff it is dieing in web development :(
KindOne has quit [Ping timeout: 240 seconds]
<aclocal>
really there isn't much coding of anything when you have a web frame work ;)
mockra has quit [Remote host closed the connection]
Tomasso has quit [Ping timeout: 255 seconds]
<aclocal>
more just connecting which isn't that bad
<oxide3>
I'm waiting for an x86 asm web framework.
<aclocal>
connecting creative pieces
<oxide3>
until then it's all too abstracted
phoe6 has quit [Quit: phoe6]
happydpc has quit [Remote host closed the connection]
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<rking>
MOV [$C4RT,%US3R], PRDCT
<rking>
Could work.
jonathanwallace has joined #ruby
ViperMaul has quit [Ping timeout: 240 seconds]
phoe6 has joined #ruby
luckyruby has joined #ruby
phoe6 has quit [Client Quit]
KindOne has joined #ruby
adeponte has quit [Remote host closed the connection]
<oxide3>
on a serious note, are there any ruby web frameworks other than ROR worth looking into?
Boohbah has quit [Ping timeout: 248 seconds]
adeponte has joined #ruby
Rizzle has joined #ruby
dhruvasagar has joined #ruby
Boohbah has joined #ruby
<fowl>
there are many
Boohbah is now known as Guest20023
<fowl>
there are many
Rizzle is now known as ViperMaul
ViperMaul has quit [Client Quit]
<oxide3>
I should say, does anyone here -recommend- any of them from personal experience
Rizzle has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
<oxide3>
sinatra / padrino, seems nice, I'll give it a whirl. I'm trying to port an "applicaton" that was basically a sql db with a bunch of stored procs and a UI of... excel to something a little sweeter
<fowl>
webrick is nice if you aren't a newb (rking)
<heftig>
webrick is just a server
<fowl>
yeah thats not enough for some folks
headius has quit [Quit: headius]
idflyfish has quit [Ping timeout: 246 seconds]
<oxide3>
i think we have a failure to communicate here
ananthakumaran has quit [Ping timeout: 240 seconds]
phoe6 has quit [Quit: Bye, leaving for the day.]
<burgestrand>
oxide3: I did padrino for a few months about a year ago. I found it too little added over sinatra to be worth the overall unstable feeling of the framework. I had my application break several times because the structure of applications was changed between every padrino release. It’s probably better now, but a word of caution there.
minijupe has quit [Quit: minijupe]
mockra has joined #ruby
chimkan_ has joined #ruby
<burgestrand>
As for sinatra, I like the framework but whenever you do something remotely complex you end up needing to set up things, which often ends up being set up the exact same way as all your other sinatra applications. It never feels nice to duplicate that functionality (say, serving assets, common application helpers). That said, it’s either rails or sinatra for me.
ananthakumaran has joined #ruby
<oxide3>
thank you burgestrand
<rking>
burgestrand: No Padrino?
richardcreme has joined #ruby
<burgestrand>
rking: bad experiences to little gain, I rather stick to just sinatra. sorry.
dankest has joined #ruby
<burgestrand>
I used to think it was some middleground between rails and sinatra, but when used it felt just as heavy as rails but nowhere near as comfortable.
igotnolegs has joined #ruby
<burgestrand>
I know this is some very vague critique, but as I said it’s been a little less than a year.
mattp_ has quit [Read error: Connection reset by peer]
td123 has joined #ruby
aantix has joined #ruby
Mon_Ouie has quit [Read error: Connection reset by peer]
eregon has quit [Read error: Connection reset by peer]
eregon_ has joined #ruby
n_blownapart has joined #ruby
johnduhart has quit [Read error: Connection reset by peer]
johnduhart has joined #ruby
caveat- has quit [Ping timeout: 264 seconds]
Eiam has quit [Ping timeout: 264 seconds]
welterde has quit [Ping timeout: 264 seconds]
taec has quit [Ping timeout: 264 seconds]
jxf has quit [Ping timeout: 240 seconds]
<rking>
burgestrand: Nah, that's cool. I've done non-frameworked stuff plenty, and I'm really liking the Rails experience so far, but I, too, wondered about a middle ground.
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
mattp_ has joined #ruby
darkc0met has quit [Ping timeout: 264 seconds]
sixteneighty has quit [Ping timeout: 264 seconds]
sixteneighty has joined #ruby
<rking>
I definitely have use cases for little things that don't justify having all of Rails (though I haven't experimented with shaving it down, i.e. going without ActiveRecord, etc.)
mohits has joined #ruby
taec has joined #ruby
<davidcelis>
rails-api
taec is now known as Guest61436
<n_blownapart>
hi all. anyone willing to help with noob question: what does this sentence mean beginning with Hash.new ...thanks
<n_blownapart>
Hashes, in contrast, are different. While the array constructor Array.new takes an initial value for the array, Hash.new takes a default value for the hash, which is the value of the hash for a nonexistent key ^^
<sent-hil>
davidcelis: i came across rails-api today, couldn't find examples of anyone using it except to play around
<burgestrand>
n_blownapart: Hash.new refers to the method new on the Hash class.
<sent-hil>
have you used it in prod/do you know anyone who has?
<burgestrand>
n_blownapart: hashes are collections that map a key to a value.
CaptainJet has quit [Read error: Connection reset by peer]
<davidcelis>
sent-hil: It was made and is maintained by Rails core, bro...
<burgestrand>
n_blownapart: so, you could have a hash mapping people to phone numbers. You could put phone numbers and the person they belong to in this hash, and then look it up later.
<burgestrand>
n_blownapart: the default value is what is returned when you try to look up something in a hash that does not exist in it.
<burgestrand>
n_blownapart: for example, if you try to look up the phone number of somebody you do not have the phone number to.
Fretta has quit [Quit: Fretta]
williamherry has quit [Ping timeout: 240 seconds]
<sent-hil>
davidcelis: i thought it was just a side project by one of the guys
td123 has quit [Ping timeout: 240 seconds]
noyb has joined #ruby
headius has joined #ruby
<n_blownapart>
burgestrand: thanks, Yes and the example has Hash.new(0) to return zero instead of nil. I was just having trouble with the English syntax I think. In other words you don't need to have any values to construct a hash, as opposed to an array.
<burgestrand>
n_blownapart: I don’t understand your last sentence. You can create empty arrays, just as you can create empty hashes.
<n_blownapart>
burgestrand: ok so line 1 would return a sort of message as opposed to a value if the key doesn't exist. It could be not available or nil or zero. thnx.
locriani has joined #ruby
<burgestrand>
:)
<n_blownapart>
burgestrand: gratzie
<burgestrand>
n_blownapart: prego
jarred has quit [Quit: jarred]
td123 has quit [Quit: WeeChat 0.3.8]
fugit has quit [Ping timeout: 246 seconds]
td123 has joined #ruby
jorge has joined #ruby
chimkan_ has quit [Quit: chimkan_]
<davidcelis>
howdy burgestrand
<burgestrand>
davidcelis: good mornin' \o.
<davidcelis>
burgestrand: i was taking a look at hallon last night
<burgestrand>
oh :)
<davidcelis>
good stuff, dude
<davidcelis>
good code, good gem; thanks for providing that
fugit has joined #ruby
<burgestrand>
thanks, a lot of things are changing with hallon/spotify now, got new focus, new things to try :)
<davidcelis>
:D
<burgestrand>
(hallon didn’t really have any focus at all before, which is why it can be a bit too low level for many things)
dhruvasagar has quit [Ping timeout: 248 seconds]
raid has joined #ruby
<raid>
hi, do i really need the ruby source to install the linecache gem?
fugit_ has quit [Ping timeout: 248 seconds]
<raid>
i dont use rvm and it always fails when building a native extension because a vm_core.h is missing
baroquebobcat has quit [Quit: baroquebobcat]
<davidcelis>
why dont you use rvm
<davidcelis>
(or rbenv)
<davidcelis>
system ruby == lame
<davidcelis>
in multiple ways
<raid>
davidcelis: its just supposed to work for now. i may use rvm if i get deeper into ruby development
<raid>
davidcelis: gentoo has a nice solution for the problem with multiple versions of languages
dhruvasagar has joined #ruby
moshee has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
<raid>
davidcelis: only installed ruby itself and gems via portage. I know that i should put everything in my ~
td123 has quit [Ping timeout: 240 seconds]
<raid>
unpacked ruby source now. "checking for vm_core.h... yes"
td123 has joined #ruby
<raid>
"Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers."
<raid>
How do I find out what is missing?
<davidcelis>
you chould check the output of the make
<raid>
this is located in ~/.gem/ruby/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out
locriani has quit [Remote host closed the connection]
<davidcelis>
undefined reference to `ruby_current_thread'
<davidcelis>
wut
<davidcelis>
no idea, sorry
<raid>
beats me
<burgestrand>
Hm, I’ve seen this before.
moshee has quit [Ping timeout: 244 seconds]
<fowl>
raid you'll never hear someone advocate for system ruby
<fowl>
install rbenv and dont look back
dhruvasagar has joined #ruby
<burgestrand>
I have a theory that this would happen if you try to compile a C extension for 1.9 with ruby 1.8.7, there has been many changes in the thread department between 1.8 and 1.9.
<burgestrand>
Trying to verify.
SCommette has joined #ruby
jonathanwallace has quit [Ping timeout: 240 seconds]
a_a_g has joined #ruby
<burgestrand>
Yeah, appears like that’d be the main guess. Ruby 1.8 does not have ruby_current_thread in its C API, while 1.9 does.
jasonLaster has quit [Remote host closed the connection]
rking has quit [Remote host closed the connection]
jasonLaster has joined #ruby
<burgestrand>
raid: I would guess it’s just linking against the wrong ruby library.
<raid>
hmm
<burgestrand>
raid: there might be a flag that says "—with-ruby-lib" or something that you could use to get around it.
<burgestrand>
(just guessing at that name)
baroquebobcat has joined #ruby
mwilson_ has quit [Excess Flood]
baroquebobcat has quit [Client Quit]
mwilson_ has joined #ruby
td123 has quit [Ping timeout: 248 seconds]
roadze has joined #ruby
roadze has quit [Remote host closed the connection]
roadze has joined #ruby
<phanousit>
when should i use the "method" method. and is it always used with call?
jasonLaster has quit [Ping timeout: 252 seconds]
td123 has joined #ruby
<burgestrand>
Frankly, it’s rarely used. Sometimes you can use it when you want to pass a callback block to a method, but you want to pass a method instead if a block.
<burgestrand>
You could also use it to do some funky metaprogramming, and call methods of your superclass’ superclass without going through your superclass.
<burgestrand>
I’m sure there are many other creative uses for it.
weasels has joined #ruby
otters has quit [Read error: Connection reset by peer]
<phanousit>
thanks
rking has joined #ruby
ukd1 has joined #ruby
rutkla has quit [Ping timeout: 255 seconds]
SCommette has quit [Quit: SCommette]
jgrevich has quit [Quit: jgrevich]
sent-hil has quit [Remote host closed the connection]
mohits has quit [Ping timeout: 240 seconds]
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
banisterfiend has joined #ruby
baroquebobcat has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
havenn has quit [Remote host closed the connection]
baroquebobcat has quit [Client Quit]
igotnolegs has quit [Quit: Computer has gone to sleep.]
jorge has quit [Remote host closed the connection]
roadze has quit [Remote host closed the connection]
moshee has joined #ruby
frogstarr78 has quit [Quit: Leaving]
darren has quit [Remote host closed the connection]
td123 has quit [Ping timeout: 246 seconds]
aclocal is now known as brcfg
cbuxton has quit [Quit: Leaving.]
jeff_sebring has quit [Quit: Leaving]
chimkan_ has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
td123 has joined #ruby
zeromodulus has quit [Remote host closed the connection]
arkiver has joined #ruby
Renrea has quit [Remote host closed the connection]
oxide3 has quit []
mrdodo has joined #ruby
KindTwo has joined #ruby
techsurvivor has quit [Read error: Connection reset by peer]
td123 has quit [Ping timeout: 255 seconds]
havenn has joined #ruby
td123 has joined #ruby
arkiver has quit [Quit: Leaving]
jarred has joined #ruby
hemanth has quit [Ping timeout: 272 seconds]
kjellski_ has quit [Quit: This computer has gone to sleep]
ringotwo has joined #ruby
iamjarvo has quit [Quit: Leaving...]
beandip has quit [Ping timeout: 248 seconds]
havenn has quit [Remote host closed the connection]
yugui_zzz is now known as yugui
banghouse has quit [Ping timeout: 244 seconds]
jonathanwallace has joined #ruby
fantazo has quit [Remote host closed the connection]
n_blownapart has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
ukd1 has quit [Quit: leaving]
banghouse has joined #ruby
td123 has quit [Ping timeout: 248 seconds]
savage- has quit [Remote host closed the connection]
<aces23up>
I have that which works but its just returning the good attribute, I want to actually get the send(attr) value to be loaded from the find method
dankest has quit [Quit: Leaving...]
<aces23up>
how would I structure that?
Banistergalaxy has joined #ruby
dankest has joined #ruby
jarred has quit [Ping timeout: 240 seconds]
td123 has quit [Read error: Operation timed out]
ryanf has joined #ruby
ryanf has quit [Client Quit]
td123 has joined #ruby
shadoi1 has quit [Quit: Leaving.]
reuf has joined #ruby
ananthakumaran has quit [Ping timeout: 240 seconds]
ananthakumaran has joined #ruby
SegFaultAX|work2 has quit [Ping timeout: 260 seconds]
jprovazn has joined #ruby
darkc0met has quit [Ping timeout: 240 seconds]
arturaz has joined #ruby
jarred has joined #ruby
td123 has quit [Ping timeout: 240 seconds]
gmci has quit [Quit: Computer has gone to sleep.]
mxweas has joined #ruby
havenn has joined #ruby
td123 has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
goganchic has joined #ruby
jorge has joined #ruby
chimkan__ has joined #ruby
Morkel has joined #ruby
<fowl>
aces23up: i'd have to see the context but at a glance i'd say that you should a variable that will be an id, a name or a text.. i dont understand what its for though
goganchic has quit [Client Quit]
friskd has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
chimkan has quit [Ping timeout: 255 seconds]
chimkan__ is now known as chimkan
und3f has joined #ruby
jorge has quit [Ping timeout: 240 seconds]
SegFaultAX|work2 has joined #ruby
manizzle has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
maesbn has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
Eldariof-ru has quit []
yugui is now known as yugui_zzz
tsguy52 has quit [Quit: tsguy52]
MissionCritical has quit [Ping timeout: 240 seconds]
<alecs>
lol ... i guess it is a dns problem ... thanks
zeromodulus has joined #ruby
ABK has quit [Ping timeout: 248 seconds]
elhu has joined #ruby
jonathanwallace has quit [Ping timeout: 248 seconds]
Mission-Critical is now known as MissionCritical
abionic has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
techsurvivor has joined #ruby
KindTwo has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
jhunter has quit [Ping timeout: 244 seconds]
ssspiff has quit [Ping timeout: 240 seconds]
jhunter has joined #ruby
mrdodo has quit [Remote host closed the connection]
KindTwo has quit [Ping timeout: 246 seconds]
m4rtijn has joined #ruby
<m4rtijn>
hi
<m4rtijn>
i just started with cucumber and step defs - is it possible to create a step def. which captures both "and my name is earl" and "then my name is earl"
<aces23up>
what is the way in which you can do an equal comparison on a string wether the comparison either by include? exact or regex?
zeromodulus has quit [Remote host closed the connection]
bjhaid has left #ruby [#ruby]
jonathanwallace has joined #ruby
apacala_ has joined #ruby
Wizek has quit [Ping timeout: 246 seconds]
zeromodulus has joined #ruby
zeromodulus has quit [Remote host closed the connection]
zeromodulus has joined #ruby
friskd has quit [Quit: friskd]
sspiff has joined #ruby
sspiff has joined #ruby
apacala has quit [Ping timeout: 252 seconds]
jonathanwallace has quit [Ping timeout: 240 seconds]
Markvilla has joined #ruby
apeiros_ has joined #ruby
s1n4 has quit [Ping timeout: 248 seconds]
<banisterfiend>
apacala_: sup apeiro-dogg
<banisterfiend>
apeiros_* ^
<raid>
is there a guide on the internet that just lists the most common development tools for ruby (like gem, rake, rdoc and so on)
iamlacroix has joined #ruby
piotr_ has joined #ruby
Rochefort has joined #ruby
arkiver has quit [Remote host closed the connection]
ph^ has joined #ruby
denysonique has joined #ruby
burgestrand has joined #ruby
friskd has joined #ruby
s1n4 has joined #ruby
reuf has quit [Remote host closed the connection]
lldong has joined #ruby
burgestrand has quit [Quit: Leaving.]
mneorr has quit [Quit: Leaving.]
robotmay has joined #ruby
emiltin has joined #ruby
cantonic_ has joined #ruby
yugui_zzz is now known as yugui
tatsuya_o has joined #ruby
Liothen has quit [Remote host closed the connection]
flype has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
Liothen has quit [Remote host closed the connection]
tiripamwe has quit [Quit: Leaving]
jarred has quit [Quit: jarred]
cantonic has quit [Ping timeout: 244 seconds]
cantonic_ is now known as cantonic
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
burgestrand has joined #ruby
mucker has quit [Read error: Operation timed out]
runeb has joined #ruby
runeb has quit [Remote host closed the connection]
cezar has joined #ruby
bullicon has joined #ruby
jorum has joined #ruby
cezar has quit [Client Quit]
mneorr has joined #ruby
ephemerian has joined #ruby
stephenjudkins has joined #ruby
Wizek has joined #ruby
stnly has joined #ruby
justsee has joined #ruby
havenn has quit [Remote host closed the connection]
mxweas has quit [Ping timeout: 240 seconds]
andrewh has joined #ruby
jmil has joined #ruby
beneggett has quit [Ping timeout: 240 seconds]
senny has joined #ruby
friskd has quit [Quit: friskd]
manolo has joined #ruby
workmad3 has joined #ruby
beneggett has joined #ruby
burgestrand has quit [Read error: Connection reset by peer]
burgestrand has joined #ruby
mockra has joined #ruby
peterhellberg has joined #ruby
mockra has quit [Ping timeout: 245 seconds]
juha_ has quit [Ping timeout: 244 seconds]
jonathanwallace has joined #ruby
emiltin has quit [Quit: emiltin]
qwerxy has joined #ruby
juha_ has joined #ruby
fermion has joined #ruby
<tommylommykins>
Is there any way to easy fully correctly serialize ruby's printing of warnings an error messages?
* tommylommykins
is running a single threaded program, and the messages are always a little bit out of place wrt. where they chould be in the output stream
<_br_>
tommylommykins: You could capture it in an begin/rescue/end and make sure to map it to the format you want
<_br_>
tommylommykins: Otherwise, I am not aware that the ruby interpreter spits out a "proper" machine readable format.
<tommylommykins>
:s
nari has quit [Ping timeout: 248 seconds]
<tommylommykins>
I guess it's slightly unreasonable to expect stdout and stderr to correctly serialize with each other
jorum has quit [Ping timeout: 265 seconds]
yugui has quit [Ping timeout: 265 seconds]
<tommylommykins>
well, correctly serialize my program's output
aces1up has joined #ruby
aces23up has quit [Ping timeout: 252 seconds]
poppiez has joined #ruby
<poppiez>
can anyone see why line 55 fails? https://gist.github.com/305778 pear.rb:55: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' when /^INSTALLED/: return nil
<poppiez>
ruby 1.9.3p194
Morkel has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<Hanmac>
poppiez ruby 1.9 dont support oneline when anymore ... you need two lines or ;
<poppiez>
Hanmac: to be clear: semicolon at the end of the line?
arkiver has joined #ruby
<poppiez>
or instead of the colon
yugui has joined #ruby
<fowl>
semicolon at the end of the line will always result in an error
pskosinski has joined #ruby
<fowl>
when 4; blah or when 4 (newline) blah
<Hanmac>
change it to this: when /^INSTALLED/,/^=/,/^PACKAGE/,/^$/,/^\(no packages installed\)$/; return nil
<poppiez>
thx guys. much appreciated
jmil has quit [Quit: jmil]
schwap_ has quit [Ping timeout: 252 seconds]
jonathanwallace has quit [*.net *.split]
beneggett has quit [*.net *.split]
workmad3 has quit [*.net *.split]
s1n4 has quit [*.net *.split]
apeiros_ has quit [*.net *.split]
Eldariof-ru has quit [*.net *.split]
gmci has quit [*.net *.split]
elhu has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
maesbn has quit [*.net *.split]
noyb has quit [*.net *.split]
eregon_ has quit [*.net *.split]
Spaceghostc2c has quit [*.net *.split]
NimeshNeema has quit [*.net *.split]
noganex has quit [*.net *.split]
liluo has quit [*.net *.split]
phanousit has quit [*.net *.split]
x0F has quit [*.net *.split]
oddmunds has quit [*.net *.split]
akem has quit [*.net *.split]
philips_ has quit [*.net *.split]
strife25 has quit [*.net *.split]
Bofu2U has quit [*.net *.split]
dekroning has quit [*.net *.split]
kalleth has quit [*.net *.split]
TomRone has quit [*.net *.split]
kennyvb has quit [*.net *.split]
ForSpareParts has quit [*.net *.split]
laen_ has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
foolove has quit [*.net *.split]
mikalv has quit [*.net *.split]
Kwpolska has quit [*.net *.split]
mksm has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
crodas has quit [*.net *.split]
any-key has quit [*.net *.split]
jmcphers has quit [*.net *.split]
wang has quit [*.net *.split]
Poapfel has quit [*.net *.split]
bnagy has quit [*.net *.split]
Gm4n_ has quit [*.net *.split]
goraxe has quit [*.net *.split]
Cork has quit [*.net *.split]
musl has quit [*.net *.split]
danheberden has quit [*.net *.split]
nahhh has quit [*.net *.split]
<Hanmac>
poppiez: or there is an unioned regexp: /(?-mix:^INSTALLED)|(?-mix:^=)|(?-mix:^PACKAGE)|(?-mix:^$)|(?-mix:^\(no packages installed\)$)/
mxweas has joined #ruby
mfridh has joined #ruby
beneggett has joined #ruby
workmad3 has joined #ruby
apeiros_ has joined #ruby
gmci has joined #ruby
s1n4 has joined #ruby
Eldariof-ru has joined #ruby
maesbn has joined #ruby
elhu has joined #ruby
noyb has joined #ruby
eregon_ has joined #ruby
Spaceghostc2c has joined #ruby
NimeshNeema has joined #ruby
noganex has joined #ruby
phanousit has joined #ruby
liluo has joined #ruby
x0F has joined #ruby
oddmunds has joined #ruby
akem has joined #ruby
strife25 has joined #ruby
philips_ has joined #ruby
Bofu2U has joined #ruby
dekroning has joined #ruby
kalleth has joined #ruby
TomRone has joined #ruby
kennyvb has joined #ruby
ForSpareParts has joined #ruby
laen_ has joined #ruby
Sou|cutter has joined #ruby
foolove has joined #ruby
mikalv has joined #ruby
Kwpolska has joined #ruby
mksm has joined #ruby
crodas has joined #ruby
TheMoonMaster has joined #ruby
any-key has joined #ruby
jmcphers has joined #ruby
wang has joined #ruby
Poapfel has joined #ruby
bnagy has joined #ruby
Gm4n_ has joined #ruby
musl has joined #ruby
goraxe has joined #ruby
Cork has joined #ruby
danheberden has joined #ruby
nahhh has joined #ruby
rutkla has quit [Excess Flood]
aef has quit [Excess Flood]
aef has joined #ruby
berserkr has joined #ruby
rutkla has joined #ruby
arkiver has quit [Quit: Leaving]
Vert has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
Rajesh__ has joined #ruby
zeromodulus has quit [Remote host closed the connection]
emmanuelux has joined #ruby
MissionCritical has joined #ruby
Rochefort has quit [Remote host closed the connection]
zz_chrismcg is now known as chrismcg
lkba has quit [Quit: Bye]
mwilson_ has quit [Excess Flood]
nari has joined #ruby
mwilson_ has joined #ruby
vijay_ has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
aibo has joined #ruby
vijay_ is now known as vijay
vijay is now known as munsdr62
elhu has quit [Ping timeout: 255 seconds]
<aibo>
hey, getting this error: " RubyGem version error: addressable(2.3.2 not ~> 2.2.6) (Gem::LoadError)" how can 2.3.2 version be lower that 2.2.6 ?
workmad3 has joined #ruby
munsdr62 has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713224758]]
<Hanmac>
aibo "~>" has a special meaning in a gem-version
<aibo>
so what does it means?
<Hanmac>
"~> 2.2.6" means "> 2.2.6" && "< 2.3"
<aibo>
how can I install needed gems to met all dependencies?
<Hanmac>
normaly when you install your gem, it should download the currect deps when available
leoncamel has joined #ruby
lldong has quit [Remote host closed the connection]
<shevy>
aibo, default "gem install NAME_HERE" takes care of the dependencies as well
Rajesh has joined #ruby
uris has joined #ruby
Rajesh has quit [Max SendQ exceeded]
Rajesh__ has quit [Quit: Leaving to Quit]
<shevy>
aibo, some gems change and become incompatible, so gem authors specify certain versions, while not wanting to include incompatible versions
leoncamel has quit [Client Quit]
<aibo>
ok, thx
Rajesh has joined #ruby
leoncamel has joined #ruby
Rajesh is now known as Guest98241
<shevy>
you can keep a collection of the different .gem versions of addressable, a copy will reside in RUBY_PREFIX/lib/ruby/gems/1.9.1/cache/ i.e. on a sane ruby install, it would be exactly at /usr/lib/ruby/gems/1.9.1/cache/
<shevy>
I copy all .gems I keep on using on my backups
mockra has joined #ruby
Rajesh_ has joined #ruby
RichieEvan has quit [Quit: RichieEvan]
mohits has quit [Ping timeout: 240 seconds]
<shevy>
anyone of you knows
<shevy>
why don't the linux distributions recommend to compile a program into a versioned, standalone directory?
<hoelzro>
shevy: you mean like /libs/libffi/3.0.11/?
<JonnieCache>
because unix is a total mess and nobody wants to talk about it
<JonnieCache>
thats how it seems to me anyway
TPFC-SYSTEM has joined #ruby
reuf has joined #ruby
<hoelzro>
I think it's probably for legacy reasons
<hoelzro>
GoboLinux tries to change things it that direction, I think
mockra has quit [Ping timeout: 246 seconds]
peterhellberg has quit [Remote host closed the connection]
<shevy>
hoelzro somewhat like that, except that rather than /libs it would be $BASE_DIR like /pkg/libffi/3.0.11
<shevy>
well
<hoelzro>
ok
<hoelzro>
it's an interesting idea
<shevy>
I can understand that distributions evolve only very slowly, but I am thinking there must be some technical reason why they don't want to switch
<hoelzro>
there's no reason you couldn't do that, I think
<shevy>
and I have not found out what that reason is :(
<hoelzro>
you just need a package manager to handle things that way
<hoelzro>
and an army of package maintainers =)
<hoelzro>
it also may spell trouble for configure scripts
<hoelzro>
because they're used to finding things a certain way
<hoelzro>
but you could leverage pkg-config for it
<workmad3>
shevy: I don't like complexity for the sake of complexity... and templates can actually make some horrendously complicated things quite simple
<shevy>
to me it seems the only design goal is "throw in what could be useful, one day"
<_br_>
Templates are awesome. They are so awesome that people invented tools to actually understand debugging output. Oh, but now they are "fixed" in C++11 ^^ (lol)
<workmad3>
_br_: I did say the error output is awful :D
BlackShadow has joined #ruby
<workmad3>
_br_: and yes, that should be extended to debugging output too
<shevy>
hehe cool, didnt know this phrase exists in english as well
<_br_>
zii: Ditto, C is not beautiful, but works fine. At least you can understand what is happening under the hood.
<workmad3>
shevy: to 'attempt to square the circle' is more an old mathematical idiom
<workmad3>
shevy: going back to greek geometry :)
<shevy>
yeah _br_ - worse is better, it seems to be a very practical term. perhaps it is not as clean and pure, but it kinda works
<workmad3>
shevy: squaring the circle is provably impossible using just a straight-edge and compass
<shevy>
workmad3, hmm never heard that in geometry. we had unamusing teachers, they only used 1:1 copies of the textbooks
<workmad3>
shevy: by which they mean constructing a square with the same area as a given circle
<Hanmac>
Muz array.map(&:class).uniq.size == 1
<shevy>
aha
<shevy>
cool link _br_
<shevy>
"The New Jersey guy said that the Unix solution was right because the design philosophy of Unix was simplicity and that the right thing was too complex."
<_br_>
shevy: Yeah, jwz is a really interesting guy.
<shevy>
lol "The MIT guy then muttered that sometimes it takes a tough man to make a tender chicken"
<workmad3>
shevy: so attempting to square the circle is sometimes (although not commonly nowadays I believe) an idiom for a futile endeavour :)
<_br_>
ah s/jwz/richard gabriel/
<_br_>
<- brain slow
<shevy>
yeah workmad3 ... didn't know about the part squaring a circle with compass and straight-edge... for some reason we never had to try this. we always used a compass when trying to draw a circle... hehehe
<workmad3>
shevy: yeah... as I said, it's provably impossible ;)
<shevy>
and a ruler for rectangles
<shevy>
but nowadays, I would rather try to use computers to draw for me
<Mon_Ouie>
provably looks way to much like probably to my mental parser
kpshek has joined #ruby
<shevy>
when I finished drawing something after 1 hour, I never was 100% accurate
<shevy>
in "descriptive geometry". I hated it
g_rotbart has joined #ruby
<shevy>
"Unix and C are the ultimate computer viruses."
<workmad3>
shevy: yeah... this is more geometric proofs... so things like using a ruler and a compass to create angles and triangles
<shevy>
he uses nice slogans :)
IPGlider has joined #ruby
emiltin has quit [Quit: emiltin]
<workmad3>
shevy: you can construct a proof of pythagoras using just compass and ruler I believe :)
<workmad3>
shevy: although I'll be very happy if you don't ask me to do it personally...
<zii>
ha
embraceyourlove has joined #ruby
<shevy>
pythagoras seems simple compared to many other things
burgestrand has quit [Ping timeout: 252 seconds]
<workmad3>
yeah, it is... however, I was drawing an example of what can be done with geometric proofs (rather than just drawing geometric shapes :) )
tndrbt has quit [Quit: tndrbt]
<embraceyourlove>
guys, i need to install 2 ruby versions on my PC, what shall i do?
<zii>
rvm
Guest91275 is now known as Jackneill
<embraceyourlove>
it requires cygwin?
<_br_>
embraceyourlove: what zii said or rbenv
Jackneill has quit [Changing host]
Jackneill has joined #ruby
<embraceyourlove>
ok, thx
<Hanmac>
embranceyourlove so your os is windows?
<embraceyourlove>
yes
redpanda has quit [Ping timeout: 248 seconds]
Berglund has joined #ruby
<zii>
I don't really know how to use ruby on windows.
<shevy>
embraceyourlove I compile into versioned directories
<Hanmac>
then rvm should the best ... maybe comined with cygwin
<shevy>
like /Programs/Ruby/{1.8.7,1.9.3}
<Mon_Ouie>
There's Pik
<embraceyourlove>
shevy, and what about Command line? shall i replace PATH?
<xorigin>
rvm doesn't work on windows, the rvm faq suggests pik
<Mon_Ouie>
(part of the rubyinstaller project)
<shevy>
embraceyourlove in my variant I dont need to because only one ruby is "active" in $PATH at any given time, I just switch the versions when I have to use the other one
<shevy>
embraceyourlove though I am on linux so that probably wont work for you :\
* m4rtijn
loves rvm
<embraceyourlove>
sry mb i missed something, but how you change versions?
<hoelzro>
DISPLAY should be inherited from Nautilus, though
<galymzhan>
like `export DISPLAY=0` before `zenity` ?
<zii>
or in rb
<hoelzro>
galymzhan: ENV['DISPLAY'] = ':0'
`brendan has joined #ruby
mockra has quit [Ping timeout: 255 seconds]
<galymzhan>
Still doesn't work. Tried DISPLAY and & trick. When I choose "Run in Terminal" , terminal window flashes for a moment, there isn't any output
jonathanwallace has joined #ruby
<shevy>
ok
<shevy>
so something happens
<hoelzro>
galymzhan: but doing the same thing in a bash script works?
a_a_g has quit [Quit: Leaving.]
<shevy>
we are debugging here :-)
<galymzhan>
yes when I use bash it works
tvw has joined #ruby
<galymzhan>
both from terminal and from nautilus
<hoelzro>
and running the Ruby script from the terminal works?
<hoelzro>
ok
<galymzhan>
yes, Ruby from terminal works too
<galymzhan>
seems like it's inheriting something from bash
<hoelzro>
try system instead of ``, maybe
<hoelzro>
just for the hell of it
Progster has joined #ruby
<galymzhan>
system() behaves similarly. I also tried everything like `bash -c zenity` and the like
iamtakingiteasy has joined #ruby
tommyvyo has joined #ruby
<shevy>
ok
<shevy>
can you try this with perl or python instead?
<galymzhan>
what exactly happens when `thing` is called?
<shevy>
I think it asks the shell to run that command
<shevy>
possibly /bin/sh
<shevy>
or
<shevy>
it uses a syscall directly... I am not sure
sendoushi has quit [Read error: Connection reset by peer]
sendoushi has joined #ruby
tommyvyo has joined #ruby
<shevy>
sounds scary
<embraceyourlove>
what?
<shevy>
Does RVM work on windows? Will it in the future?
<shevy>
NO. If you would like to manage multiple versions of ruby on windows please use pik which is an excellent tool by Gordon Thiesfeld. You can find it on GitHub.
<shevy>
and pik does not work
heftig has quit [Ping timeout: 248 seconds]
<shevy>
embraceyourlove, using cygwin + rvm on windows
<shevy>
one day you may join us all and use either mac or linux :>
<shevy>
when I stopped using windows because of games, there was no real reason not to switch
<embraceyourlove>
i think that mac is better alternative
dhruvasagar has quit [Ping timeout: 248 seconds]
jgarvey has joined #ruby
<shevy>
dunno. possibly better than windows. better than a well adapted linux? not convinced really
<hoelzro>
after a few years using a Mac, I'm convinced I'd rather do my work on Linux
<zii>
Why so?
jrajav has joined #ruby
<zii>
You can do almost exactly the same thing on a mac.
<hoelzro>
</2¢>
dhruvasagar has joined #ruby
<hoelzro>
zii: I'm frustrated, because there is software I want to use that doesn't want to compile on a Mac
<hoelzro>
particularly on later versions of OS X
<zii>
Oh, okay. Such as?
<hoelzro>
mplayer
<hoelzro>
qemu (compiles, doesn't work)
<hoelzro>
rakudo
<hoelzro>
there is no package manager integrated with the system
<zii>
Hmm, valid reasons. :] Fortunately I haven't had to use those.
<hoelzro>
(save the App Store)
<zii>
Well there's homebrew.
<hoelzro>
yes, and I use it and enjoy it
<hoelzro>
but
<hoelzro>
it's not integrated =)
<zii>
Yeah, that sucks.
<hoelzro>
I still don't have a freaking clue which compilers are actually used for what on my system
<hoelzro>
I think I have GCC, but then some programs complain that I don't?
<hoelzro>
and Clang is quite nice (and a really cool project!), but there are some programs that still won't compile with it
uris has quit [Quit: leaving]
<hoelzro>
and trying to convince to compile with GCC is tedious, and sometimes configure reports "WTF GCC NOT FOUND"
<zii>
Magical ways of mac are sometimes magical.
<embraceyourlove>
my latest Linux Ubuntu 9 was such a frustration
<hoelzro>
zii: Magical ways of mac get in my way =P
<embraceyourlove>
for a simple program, it required 300mb other packages
<shevy>
embraceyourlove there are lots of shit distributions out there
<hoelzro>
I also like a system where I can (conceptually) modify pretty much anything
<zii>
Ubuntu's ways are magical and not dev-friendly as well.
<shevy>
ubuntu is one of those shit distributions. but it kinda made things easy and dumb for people, so they use it, sheep as they are
paolooo has joined #ruby
<hoelzro>
zii: yeah, I'm seeing that now
* hoelzro
was trying 12.04 this morning
<shevy>
I think in the long run, there simply is no real substitute for user-knowledge
<zii>
shevy, Where are you from?
<hoelzro>
I'll probably just put Arch on it
<shevy>
zii Europe, Austria, Vienna
<embraceyourlove>
and what are good linux distributions?
<zii>
Yes, arch is the way!
<shevy>
arch is acceptable
<shevy>
gentoo is acceptable in the sense that gentoo-users, like rking here, really know a LOT
Criztian has joined #ruby
<hoelzro>
shevy: I used to use Gentoo; taught me a lot
<shevy>
:)
<hoelzro>
and before the crash, the Gentoo wiki was the best
<zii>
Arch taught me a lot.
<shevy>
yeah they had a good wiki
<zii>
*had*?
<hoelzro>
Arch is also good at teaching, and its wiki is superb
<hoelzro>
zii: it died =(
<zii>
What happened?
<zii>
It's gone?
<shevy>
ubuntu has a good wiki too
<hoelzro>
zii: HDD failure, I think
<hoelzro>
not sure
<zii>
What about the info?
ken_barber has joined #ruby
<hoelzro>
zii: someone could have mirrored it; not sure
<embraceyourlove>
i am extremely spoiled by these mac style apps, one click-installs, iphones, is there a way to get into Linux now?
<zii>
Use arch or gentoo for a year.
<zii>
Arch is less painful.
<zii>
IMO
Synthead has quit [Quit: sqooq]
<hoelzro>
well, arch/gentoo is not going to expose you to one click installs
<hoelzro>
but it will teach you a *lot*
subbyyy has joined #ruby
<hoelzro>
about Linux, and about your computer
subbyyy has quit [Client Quit]
Taichou has quit [Remote host closed the connection]
<zii>
You will start to hate things you've never thought possible. or something like that
dv310p3r has joined #ruby
<hoelzro>
if a problem occurs on a Mac or a Windows machine, I'm seldom sure on how to solve it (aside from common ones)
<hoelzro>
if a problem occurs on my Linux machine, I almost always know
<zii>
Myeah, that's true.
<hoelzro>
because of what I've learned
banseljaj is now known as imami|afk
<embraceyourlove>
But, what these knowledge gives to you?
<hoelzro>
I'd rather use a car with some assembly required than a car with the hood welded shut
<embraceyourlove>
this*
<hoelzro>
embraceyourlove: satisfaction, fun, the ability to understand how things work, the ability to fix things
<kalleth>
hoelzro: if a problem happens on a windows machine, i can always solve it without any prior knowledge by fucking about with menus
<zii>
General know-how, fun if you're into that.
pu22l3r has joined #ruby
mockra has joined #ruby
<kalleth>
hoelzro: if, on the other hand, a problem happens on a windows machine, goddamnit i have no clue about anything or which dodgy file somewhere to fix it
<kalleth>
and spend 4 hours on google and eight boxing with a config file
<hoelzro>
and I like to think it helps me know to write programs
<kalleth>
just sayin', that argument has multiple sides ;)
<zii>
Linux is for nerds, let's face it.
<hoelzro>
kalleth: no matter what, it comes down to experience
linoj has joined #ruby
Renrea has joined #ruby
_adeponte has quit [Remote host closed the connection]
<kalleth>
hoelzro: i can generally find whichever option is in whichever menu by playing around with it on windows... on linux i have no hope, no matter how many esoteric man pages i stare at
<kalleth>
;p
<kalleth>
but yeah
<kalleth>
i prefer neither OS
adeponte has joined #ruby
<hoelzro>
with Linux, though, *everything* is open to you
<kalleth>
though when windows 8 comes out i will change my mind
<shevy>
Linux is semi for nerds, the problem is that developers are often either idiots or lazy and don't want to polish things to perfection
<hoelzro>
if you really want, you can dig into the kernel/init system/whatever and figure out what happens where
<kalleth>
hoelzro: open, as in "if i am an excellent C developer i have a chance at changing this with some compileflags etc"
<kalleth>
not "I JUST WANT TO CLICK SOMETHIGN AND HAVE IT WORK
<kalleth>
i have no axe to grind either way, though ;p
<hoelzro>
kalleth: yes
<kalleth>
linux is only free if your time has no value
<kalleth>
^ one of my favorite sayings
<shevy>
I am not defending distributions at all. I think they should all die
<hoelzro>
kalleth: well, what do you do when your machine blue screens for no reason?
<hoelzro>
what menus do you click then?
<hoelzro>
my time has value
<shevy>
the restart button
<shevy>
:D
<embraceyourlove>
*linux is only free if your time has no value* dat
<hoelzro>
I just prefer to translate it into knowledge
<hoelzro>
and knowledge is power =)
<kalleth>
hoelzro: that hasn't happened in literally 5 years
<shevy>
real knowledge yeah
<zii>
kalleth, You do everything on a abacus, do you?
<hoelzro>
kalleth: I'm just saying, it could happen
<zii>
an*
<kalleth>
hoelzro: what has happened though is my linux machines have hard locked several times due to kernel incompatibilities or upgrades not being compat with my gfx card etc ;p
<zii>
That happens.
mockra has quit [Ping timeout: 245 seconds]
<hoelzro>
kalleth: so the graphics card was incompatible with a particular kernel version?
<kalleth>
which had automatically installed itself anyway due to distro automatic updates
<shevy>
no
<kalleth>
guess how many times a windows update that happens automatically has fucked my PC
<shevy>
that sounds like a shit distribution
<kalleth>
*shrug*
<kalleth>
largest distro ever, it was ubuntu
<shevy>
what was it :)
<shevy>
yes
<shevy>
largest shit ever too
<kalleth>
don't care
<zii>
kalleth, Try to develop something on a windows.
<kalleth>
zii: i 'develop' stuff on windows all the damn time
<kalleth>
not rails though, i locally edit but remotely run for that
adeponte has quit [Ping timeout: 240 seconds]
<shevy>
what editor do you use on windows?
<hoelzro>
kalleth: I had a kernel problem with my laptop a few months ago
<kalleth>
that's down to ruby/rails windows support being cack for native extensions though
<zii>
Well I consider an it awful. painful and terrifying experience.
<kalleth>
shevy: gvim
<embraceyourlove>
ok i got it, i better go and install arch linux or something on the virtual machine and code there
<kalleth>
zii: use it for the same amount of time as you do windows, its really not that bad
<hoelzro>
so I downgraded and told my package manager to not upgrade until the problem was fixed
<shevy>
kalleth do you use cygwin or msys?
<hoelzro>
linux isn't easier to use
<kalleth>
shevy: i use the gvim distribution native to windows
<hoelzro>
I won't argue that
<shevy>
hoelzro what package manager. debian again? :D
<hoelzro>
shevy: pacman
<zii>
hoelzro, Depends highly.
<shevy>
ah ok
<hoelzro>
what linux gives you is the power to do pretty much anything with your computer
yoklov has joined #ruby
<hoelzro>
if you're willing to take the time to learn
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
<kalleth>
and the disadvantage of that is that for anyone who isn't a supernerd, its still annoying as hell to do the most basic tasks
<kalleth>
i'm fine with it, but for 99% of people, its not usable
<hoelzro>
fair enough
<chiel>
i wanted to use linux for my htpc, but there wasn't a good graphics driver at the time for my chipset. :(
<kalleth>
^
<kalleth>
that too
<hoelzro>
I like Linux and I'm willing to learn everything I can about it because I am passionate about learning about computers
sailias has joined #ruby
<hoelzro>
not everyone is
<hoelzro>
and that's ok
<kalleth>
i have never once got any linux installation anywhere ever to support my graphics card and monitor setup
pu22l3r has quit [Remote host closed the connection]
<kalleth>
whearas windows supports it perfectly
<kalleth>
out of the box
<kalleth>
quad monitor across dual graphics cards
<chiel>
i had an amd e-450 apu
<kalleth>
gg kthx cu later
<chiel>
it was just out
<hoelzro>
this is mincing words, but it's more like the device manufacturer supports Windows perfectly =)
pu22l3r has joined #ruby
<kalleth>
"oh, you wanted to DRAG WINDOWS BETWEEN THESE SCREENS? sry, can't do that for you"
<chiel>
but now it's been out a while, so might be able to install linux on it now
m4rtijn has quit [Remote host closed the connection]
<kalleth>
hoelzro: i get that, but from my perspective, windows does what i want, linux doesn't.
kpshek has quit []
<hoelzro>
fair enough
krusty_ar has joined #ruby
<kalleth>
from a desktop machine, that is
<kalleth>
all my servers run linux ;p
<chiel>
if your server does not run some kind of *nix you should be shot :p
<chiel>
windows servers *shudders*
noyb has quit [Quit: Leaving.]
<kalleth>
chiel: mate of mine has a home server that is literally 2k8
<kalleth>
i want to cringe every time i go round his for beer
<chiel>
haha
<kalleth>
considering spilling a pint "accidentally" on it
<chiel>
haha :p
<chiel>
i don't have an actual server machine
<kalleth>
right, fag, then back to "work"
abra has joined #ruby
<chiel>
but i have a htpc with a nas on it
<kalleth>
chiel: i have 5 machines running in my flat
<chiel>
hah :)
<kalleth>
dmz/server/gaming/htpc/laptop
<chiel>
i have a pc, mbp 13" and htpc
<chiel>
and well, a nas
<kalleth>
i have 3 different network ranges too, static/dhcp/wifi ip ranges
<kalleth>
all with dyndns ;)
<chiel>
yeah I am not THAT great at that stuff
depy has quit [Quit: Leaving]
<chiel>
I do everything but gaming on my pc
<chiel>
all dev etc on my mbp
<kalleth>
i'll be getting a macbook soon
<chiel>
since I have a big monitor
<kalleth>
when i move jobs
<kalleth>
(notice periods fucking suck)
<chiel>
27" 2560x1440 omnom :
<kalleth>
fu
<kalleth>
i want one
<chiel>
yeah, I had to leave my 15" mbp at my previous job
<kalleth>
although, chiel
<kalleth>
my home setup is
<chiel>
at my new job I got a 27" imac... so i bought my own mbp
<kalleth>
[24"1920x1200]
<jrajav>
Anyone have any suggestions for eval'ing arbitrary Ruby code in a safe sandbox?
<kalleth>
[19][24][19]
<jrajav>
I'm trying to get a Ruby bot set up for this chan :3
<chiel>
kalleth: yeah, I'm just not that fond of multiple monitors
<kalleth>
..
<kalleth>
they help SO MUCH
<chiel>
so I opted for one, but with a high resolution
<jrajav>
I'm checking out freaky-freaky but I'm not sure if it's what I need
<jrajav>
Or even how to use it
<jrajav>
lol
pete_ has joined #ruby
<kalleth>
going from 1 screen to 2 is insanely better for me
pete_ is now known as Guest64333
alienaut has quit [Quit: Leaving.]
<kalleth>
2-3/3-4 is negligible
<kalleth>
doesn't matter about res because i don't use a tiling WM
<chiel>
I've never had two *proper* screens though, I must admit
<SeanLazer>
hi guys, i'm having an inheritance issue, probably because i'm doing something wrong: https://gist.github.com/3232551
freeayu has quit [Read error: Connection reset by peer]
<SeanLazer>
the method on ParentController gets called before ChildController has a chance to set its options
<SeanLazer>
so there's no way to override the options that i can see
<hoelzro>
SeanLazer: that's probably because you're calling it on line 5
<hoelzro>
before the child class is even born!
hynkle has joined #ruby
<SeanLazer>
right!
tobym_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<SeanLazer>
so what's the correct way to implement this?
<hoelzro>
hmm
nari has joined #ruby
<hoelzro>
well, when do you need these options to be processed?
<hoelzro>
when a controller object is created?
<hoelzro>
or another time?
TheTFEF has quit [Ping timeout: 240 seconds]
ThaDick has joined #ruby
<hoelzro>
embraceyourlove: this is why I typically recommend people to start with something like Ubuntu =)
<hoelzro>
I tend to recommend Arch to more experienced users who want a little more control
<chiel>
i use debian squeeze myself
<jrajav>
No one has experience with any Ruby sandboxers? :/
<chiel>
mainly cause it was used at my previous job though
<mneorr>
anyone using a 'whois' gem ?
<hoelzro>
debian is a fine distro
<chiel>
at my current job we use centos
erichmenge has joined #ruby
<hoelzro>
jrajav: sorry, I didn't see your question about them!
<chiel>
or well.. some aws version of centos
<workmad3>
jrajav: safe code eval?
<jrajav>
Yup
<hoelzro>
jrajav: implementing a sandbox in the same process seems challenging
carloslopes has joined #ruby
<hoelzro>
(at least it did when I looked at it)
<workmad3>
jrajav: and what sort of sandbox are you thinking? so it can't affect a larger ruby system? or can't affect the operating environment?
<hoelzro>
I was thinking about making a binding for mRuby so that you can have a tightly controlled sandbox
<jrajav>
Just the operating environment
<jrajav>
No Kernel.exec, etc.
<workmad3>
jrajav: hmm... why not chroot it instead? :)
<jrajav>
Spawning a new Ruby interpreter for each eval would be preferrable to make it robustish
<hoelzro>
jrajav: you probably should run it in a separate process
<hoelzro>
so you can set CPU limits and such
<workmad3>
jrajav: create a separate folder for each 'script', and run a chrooted ruby interpreter inside it
<jrajav>
workmad3: I'm not very familiar with chroots, except what they are. Can you run a ruby interpreter that lies outside the chroot jail?
<workmad3>
jrajav: you could hard-link the interpreter into the jail
<jrajav>
Also, I'd like to set this up quickly if possible; it would be nice to use something already made rather than write this all myself
<workmad3>
jrajav: and permission it appropriately
<jrajav>
workmad3: An in-Ruby sandbox would still be good to avoid things like infinite forking
infinitiguy has joined #ruby
joshman_ has joined #ruby
jasonLaster has joined #ruby
Markvilla_ has joined #ruby
<Spooner>
jrajav : There are a number of gems that provide (for better or worse) sandboxing. Don't think you want to roll your own if you want it even vaguely robust.
<jrajav>
I'm checking out Sandrbox right now
freeayu has joined #ruby
heftig has joined #ruby
internet_user has joined #ruby
<Spooner>
Check which one something like TheRubyGame uses.
<SeanLazer>
hoelzro: sorry i was called away from my desk. i guess i need that code to be run when a controller is instantiated? but i need to be able to override the options
<jrajav>
I think I'll use Jerk (dead simple node.js IRC bot) to spawn one-off Ruby instances that just do require 'sandrbox'; Sandrbox.perform(['code to eval']).output
Markvilla has quit [Ping timeout: 252 seconds]
Markvilla_ is now known as Markvilla
<SeanLazer>
hoelzro: i tried putting it in self.inherited but the class still hasn't been born at that point
<jrajav>
Think I should still run the bot/interpreter in a chroot?
<Spooner>
SeanLazer : But the thing you are trying to override is a class method, run at the time the class is defined.
phanousit has joined #ruby
<hoelzro>
SeanLazer: you could define initialize to look at the options of the class object
<hoelzro>
ex. def initialize puts self.class.options end
<SeanLazer>
hmm
vaks has quit [Ping timeout: 245 seconds]
jasonLaster has quit [Remote host closed the connection]
levieraf has joined #ruby
jasonLaster has joined #ruby
levieraf has quit [Client Quit]
levieraf has joined #ruby
levieraf has quit [Client Quit]
levieraf has joined #ruby
levieraf has quit [Client Quit]
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
uris has joined #ruby
levieraf has joined #ruby
flype has joined #ruby
mohits has quit [Ping timeout: 252 seconds]
<SeanLazer>
hoelzro: that may have done it!
burgestrand has joined #ruby
jasonLaster has quit [Ping timeout: 248 seconds]
infinitiguy has quit [Quit: Leaving.]
velikasha has joined #ruby
velikasha has quit [Client Quit]
<SeanLazer>
hoelzro: looks like it did… i have no idea why i didn't think to override initialize, sometimes when i'm working with rails i totally forget that it's just ruby
tatsuya_o has quit [Remote host closed the connection]
Morkel has joined #ruby
tatsuya_o has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
monkegjinni has quit [Remote host closed the connection]
mengu has joined #ruby
yoklov has quit [Quit: computer sleeping]
elhu has quit [Quit: Computer has gone to sleep.]
bothra has joined #ruby
<shevy>
SeanLazer hehehe
<embraceyourlove>
I am actually trying to install RVM through cygwin on Windows, will see how it works out
<shevy>
good luck embraceyourlove
nacengineer has quit [Remote host closed the connection]
<embraceyourlove>
thank you
br4ndon has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
jearvondharrie has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
Rochefort has quit [Remote host closed the connection]
infinitiguy has joined #ruby
zodiak has quit [Ping timeout: 272 seconds]
johnlcox has joined #ruby
cantbecool has joined #ruby
<jrajav>
Someone pick a name for the new Ruby bot
<jrajav>
QUICK
<jrajav>
GO
banisterfiend has joined #ruby
rippa has joined #ruby
jjbohn has joined #ruby
monkegjinni has joined #ruby
LBRapid has joined #ruby
<zii>
jrajav, stick
Jay_Levitt has joined #ruby
<GeekOnCoffee>
jrajav: QUICK
<jrajav>
stick.
jearvondharrie has quit [Read error: Connection reset by peer]
<jrajav>
Why stick lol
<pipopopo>
Hi *
chimkan has joined #ruby
sailias has quit [Ping timeout: 252 seconds]
<zii>
jrajav, Rhymes.
sailias has joined #ruby
vaks has joined #ruby
strife25 has quit [Quit: Computer has gone to sleep.]
chylli has quit [Remote host closed the connection]
zodiak has joined #ruby
Rochefort has joined #ruby
stefanp_ has joined #ruby
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
Abbas- is now known as Abbas5
Stalkr_ has quit [Quit: Leaving...]
heftig has quit [Ping timeout: 248 seconds]
awarner has joined #ruby
g_rotbart has quit [Remote host closed the connection]
stefanp has quit [Ping timeout: 265 seconds]
Abbas| has quit [Ping timeout: 256 seconds]
mockra has joined #ruby
<rking>
embraceyourlove: Should work fine.
stopbit has joined #ruby
bj0ern has joined #ruby
<rking>
embraceyourlove: How's it going so far?
joesavage has joined #ruby
jprovazn has quit [Quit: Leaving]
<joesavage>
How can I get the full name of a file in Ruby when I only know the path and a unique identifier to the file? i.e. dynamic/category_one/1 needs to go to dynamic/category_one/1--Some-name.html
elhu has joined #ruby
<lectrick>
Anyone know how I run just 2 tests of my suite, consecutively, in the same memory space (without reloading the rails stack for example)? Usually I design my tests to run purely with "ruby /path/to/test.rb" (which gives me the excuse to ask the question here I guess lol)
Abbas5 is now known as Abbas|
<rking>
lectrick: Hrm. Well, you could probably come up with something involving DRb directly, but I wonder if you maybe really want Guard + Spork + DRb ?
justsee has quit [Quit: Leaving...]
<lectrick>
rking: I could use Guard/Spork/what have you, but I was wondering if there was a pure-Ruby way to just run 2 Ruby files consecutively
<lectrick>
like could I do ruby /path/to/file/1.rb /path/to/file/2.rb ?
crankycoder has joined #ruby
thisirs has joined #ruby
mockra has quit [Ping timeout: 248 seconds]
<lectrick>
(without it aborting the memory space in between I mean)
centipedefarmer has joined #ruby
heftig has joined #ruby
cakehero has joined #ruby
rutkla has quit [Ping timeout: 246 seconds]
<rking>
lectrick: This is a little wonky, but how about: ruby < /path/to/file/1.rb < /path/to/file/2.rb
<rking>
(Making a single stream of their text)
<lectrick>
nice
v0n has joined #ruby
ken_barber1 has joined #ruby
EPIK has quit [Ping timeout: 264 seconds]
s1n4 has joined #ruby
chimkan has quit [Quit: chimkan]
v0n has quit [Client Quit]
<embraceyourlove>
omg blast it. Tomorrow I am installing hackintosh.
<lectrick>
rking: I was also thinking just telling ruby to -r (require) the first files first, then the last parameter is the last file
<rking>
lectrick: That would work.
senny has quit [Remote host closed the connection]
davidpk has quit [Quit: Computer has gone to sleep.]
jprovazn has joined #ruby
ken_barber has quit [Ping timeout: 246 seconds]
ken_barber1 is now known as ken_barber
<rking>
lectrick: But you'll have to mess with the require path stuff.
<lectrick>
rking: I can't just give the full path to the file?
strife25 has joined #ruby
davidpk has joined #ruby
adeponte has joined #ruby
theRoUS has joined #ruby
<rking>
lectrick: Well, you can in your case, I bet.
<rking>
If it was working as: ruby < test/foo.rb < test/bar.rb , it will work (and probably better, because you'll retain filenames) with: ruby -r test/foo test/bar.rb
nari has quit [Ping timeout: 252 seconds]
<joesavage>
How can I get the full name of a file in Ruby when I only know the path and a unique identifier to the file? i.e. dynamic/category_one/1 needs to go to dynamic/category_one/1--Some-name.html
<rking>
joesavage: It'll always return an array (even if there's only 1 result, or even if 0)
sebastorama has joined #ruby
liluo has joined #ruby
al2o3cr has joined #ruby
<jrajav>
al2o3cr: ping
<al2o3cr>
jrajav: pong
<jrajav>
IT LIIIIIIVES
<jrajav>
Now for the true test
<jrajav>
>> 1 + 2
<al2o3cr>
3
<jrajav>
ZOMGAFDASFD
<joesavage>
rking: Works great, thanks!
<lectrick>
rking: joesavage: yeah, something like what rking said will get you an array of 1 file, typically... but not sure what you mean by "unique identifier to the file". Also rking you need the -- as part of that string
<jrajav>
Well, al2o3cr is our new utterly bland, utterly featureless Ruby bot.
<jrajav>
I'm out for half an hour; everyone feel free to play around with it. Please try to break it
al2o3cr has quit [Remote host closed the connection]
<jrajav>
Heh
<jrajav>
welp
<jrajav>
bbl
NimeshNeema has quit [Max SendQ exceeded]
<rking>
shevy: Looks like they're minor. For example, FileUtils.rm has a force: true parameter that will cause it to not raise an exception on failure.
denysonique has quit [Excess Flood]
<shevy>
hmmm
<shevy>
decisions decisions ...
nateberkopec has joined #ruby
<lectrick>
rking: Consider a file starting with 1--filename and one starting with 100--filename. So you actually need Dir['dynamic/category_one/1--*']
<shevy>
rking, if you want to delete files, what would you use? File.delete or FileUtils.rm
<lectrick>
If you want the 1--filename and not the 100--filename
<shevy>
for 100 .rb scripts
<shevy>
:)
<rking>
lectrick: I see what you mean. Yes, if that's what he means (and maybe he does). I was being more literal with the question.
<lectrick>
shevy: I think the only diff is that FileUtils gives you a unix-y API to the filesystem and File.whatever is just your standard file I/O api
mockra has quit [Remote host closed the connection]
emmanuelux has joined #ruby
Spaceghostc2c has quit [Max SendQ exceeded]
MetaCosm has quit [Max SendQ exceeded]
<rking>
shevy: It'd depend on which I'd used more recently, I guess, File or FileUtils (like in the context of the method), but otherwise I'd go with File.delete
_marvin has quit [Max SendQ exceeded]
<shevy>
yeah ok
<shevy>
I like the name File. more
Guest98241 has quit [Quit: Leaving to Quit]
Rajesh_ has quit [Quit: Leaving to Quit]
relix has quit [Max SendQ exceeded]
locriani has quit [Remote host closed the connection]
BrianE has quit [Max SendQ exceeded]
Rochefort has quit [Remote host closed the connection]
lectrick has quit [Max SendQ exceeded]
SeanTAllen has quit [Max SendQ exceeded]
dkannan has quit [Max SendQ exceeded]
Rochefort has joined #ruby
dekz has quit [Ping timeout: 248 seconds]
Criztian has quit []
SCommette has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
anildigital_work has quit [Max SendQ exceeded]
mneorr has quit [Quit: Leaving.]
burgestrand has quit [Quit: Leaving.]
dnyy has quit [Max SendQ exceeded]
[diecast] has quit [Ping timeout: 252 seconds]
andrew___ has joined #ruby
mockra has joined #ruby
jjbohn has quit [Remote host closed the connection]
elhu has quit [Ping timeout: 255 seconds]
kaichanvong has quit [Max SendQ exceeded]
mockra has quit [Remote host closed the connection]
jjbohn has joined #ruby
_bart has quit [Read error: Operation timed out]
shell0x has quit [Read error: Operation timed out]
dotemacs has quit [Max SendQ exceeded]
moeSeth has quit [Ping timeout: 240 seconds]
lorandi has joined #ruby
elhu has joined #ruby
<Spooner>
shevy So just "include FileUtils" and you don't have to look at it :D
franckverrot has quit [Max SendQ exceeded]
<shevy>
hmm
mucker has joined #ruby
<shevy>
then I'd have to use rm() or?
<Spooner>
Yes, just "rm file"
franckverrot has joined #ruby
ryh has joined #ruby
<Spooner>
Really though, File is fine unless you need something extra that FileUtils offers (like rm_rf).
davidboy has quit [Ping timeout: 252 seconds]
notbrent has quit [Max SendQ exceeded]
Morkel has quit [Quit: Morkel]
jhowarth has quit [Max SendQ exceeded]
pvh has quit [Max SendQ exceeded]
elhu has quit [Client Quit]
Foxandxss|2 has joined #ruby
philcrissman has quit [Max SendQ exceeded]
Foxandxss has quit [Read error: Connection reset by peer]
<shevy>
I like rm_rf :)
randym has quit [Max SendQ exceeded]
br4ndon has quit [Read error: Operation timed out]
liluo has quit [Remote host closed the connection]
vmatiyko has joined #ruby
Jortiny has joined #ruby
jrajav has joined #ruby
<Spooner>
Has someone tried 100000000.times.map {"x" * 1000} ? I don't want to kill the channel if it works :D
<jrajav>
al2o3cr: ping
<al2o3cr>
jrajav: pong
<jrajav>
Yay it's not dead yet
<Jortiny>
howdy. i suppose this isn't strictly a ruby question, but is there an easy way to specify a regexp that escapes punctuation, except for '*'? i'm using word.gsub!(/[[:punct:]]/, ' ')
<jrajav>
Spooner: It should run in its own process
<Hanmac>
jrajav: try >> `ruby -v` :P
<jrajav>
Won't work
<jrajav>
` is ignored
<jrajav>
>> `ruby -v`
<al2o3cr>
jrajav: ... Wha?
<jrajav>
See
<Hanmac>
:P
mahmoudimus has joined #ruby
<jrajav>
I don't do that because of eval; I do that because I use %` … ` as the string to contain the script
v0n has quit [Ping timeout: 246 seconds]
<Spooner>
jrajav : I don't mean breaking the system, but I don't want to get that much string written to #ruby if it does let me do that.
Taichou has quit [Ping timeout: 248 seconds]
<jrajav>
Spooner: Yeah, I didn't think of that. I don't print out any stdout the script generates, but I didn't restrict the 'p result' string at all. It could be an arbitrary length
<Spooner>
Presumably it has a timeout to stop infinite stuff?
robotmay has quit [Remote host closed the connection]
<jrajav>
Spooner: Yes
<jrajav>
Haven't tested it though
<Spooner>
>> sleep 10000000
<al2o3cr>
["Timeout::Error: execution expired"]
<Spooner>
Yep, times out :)
<jrajav>
Woot
centipedefarmer has quit [Quit: Leaving]
geekbri has quit [Remote host closed the connection]
<jrajav>
It should also be able to run multiple scripts simultaneously, just in case
davidcelis has joined #ruby
<Spooner>
Just need to limit the output string that it sends to #ruby then, to eating the channel :)
xorigin has quit [Quit: leaving]
Taichou has joined #ruby
<jrajav>
Is there no string length limit for IRC/Freenode in general?
<al2o3cr>
["NameError: uninitialized constant File", "NoMethodError: private method `readlines' called for nil:NilClass"]
<jrajav>
That reminds me; I forgot to chroot the bot
<Muz>
:)
<jrajav>
If the sandboxing works it shouldn't matter, but still
<Hanmac>
jrajav ... did you change something between 18:19:37 and 18:21:36 ?
bj0ern has quit [Quit: bj0ern]
<jrajav>
No
aantix has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<jrajav>
Any changes would result in the bot leaving and rejoining
Xethron has quit [Ping timeout: 272 seconds]
adeponte has joined #ruby
<jrajav>
Why?
apok has quit [Quit: apok]
lunitikcalm has joined #ruby
<Hanmac>
i try to play with remove_const ...
_bart has joined #ruby
dv310p3r has quit [Ping timeout: 252 seconds]
<jrajav>
And?
<jrajav>
I forgot to mention the bot works fine in pm too; I'm sure you found that out already
ixx is now known as _hal9000
<Hanmac>
jrajav: look at this:
<Hanmac>
>> Object.send(:remove_const,:Array)
<Hanmac>
>> Object.send(:remove_const,:Object)
<Hanmac>
>> Object.constants.include?(:Array)
<al2o3cr>
[Array]
<al2o3cr>
asdf
<al2o3cr>
[true]
_hal9000 is now known as _jim
_jim is now known as ixx
<jrajav>
Each of those are going to be completely separate instances of Ruby, running their own sandbox, on a separate input file representing the snippet
Morkel has joined #ruby
<jrajav>
asynchronously
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<Hanmac>
why did Object.send(:remove_const,:Object) returns asdf?
Xethron has joined #ruby
<jrajav>
That means that Ruby errored out
<jrajav>
Again, I should probably make it more informative; probably with the actual error message
ryh has quit [Remote host closed the connection]
vmatiyko has quit [Quit: Leaving.]
ennui has joined #ruby
<Hanmac>
hm it may be a problem with the each ...
<jrajav>
Huh; that runs fine in irb
<ennui>
i have a weird url like "www.%C2%ADfreetype.%C2%ADorg/%C2%ADfreetype2". what's the ruby way to decode it?
<jrajav>
Maybe the sandbox is doing something to prevent it. That should never cause Ruby to return an error code though
<Muz>
ennui: where did you get that string from?
<Muz>
That'd probably hint as to what the encoding method is first.
<al2o3cr>
r1.rb:2: unterminated string meets end of file
<jrajav>
Eep
Abbas| has quit [Ping timeout: 248 seconds]
cakehero has joined #ruby
al2o3cr has quit [Remote host closed the connection]
bbttxu has joined #ruby
<Hanmac>
:( where is the funny bot :(
<jrajav>
:P
<jrajav>
I thought of a compromise that will also solve that spam without sacrificing info
bglusman_ has joined #ruby
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
bricker88 has joined #ruby
Abbas- is now known as Abbas5
al2o3cr has joined #ruby
<jrajav>
What's a one-liner that will generate >150 chars of output for 'p result'?
ringotwo has joined #ruby
al2o3cr has quit [Remote host closed the connection]
<jrajav>
result being the evalutation result of the one liner
<Hanmac>
"Object.constants" is big
codespectator has joined #ruby
<SeanLazer>
does anyone know how i can use .dup on an rspec mock and get the mock AND its methods back?
<SeanLazer>
i want the mock to act the same way an AR object will
<jrajav>
Hanmac: You killed it
<jrajav>
Nice job
<jrajav>
:P
\13k has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
<jrajav>
I suppose I need to add remove_const to the list of unallowed methods
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
<jrajav>
And lament that Sandrbox is not perfect ;(
ringotwo has quit [Remote host closed the connection]
RichieEvan has joined #ruby
ringotwo has joined #ruby
<Hanmac>
jrajav realy? yeah
* Hanmac
+1 kills
<jrajav>
haha
<jrajav>
I would add a kill counter but I'd have to hook into the exit method of the bot framework, too lazy
<Spooner>
jrajav : Wouldn't it be safer with a whitelist than a blacklist?
<shevy>
only a dead bot is a good bot
* Hanmac
: the "Bot-slayer"
<_bart>
Hanmac: cool, but I used the module to wrap some methods and include those later in a big class, and by making them module_functions will not allow them to use methods of the super/parent class
crankycoder has quit [Remote host closed the connection]
Stalkr_ has joined #ruby
andrewh has quit [Ping timeout: 240 seconds]
<jrajav>
Spooner: Probably, but it's also a lot more work :P
<jrajav>
The sandbox I'm using is already set up to work this way
crankycoder has joined #ruby
Abbas5 is now known as Abbas|
<jrajav>
Security isn't ESSENTIAL to me. The absolute worst-case scenario is my linux vm gets trashed, and this is all that's running on it
adeponte has quit [Remote host closed the connection]
umttumt has quit [Remote host closed the connection]
<jrajav>
Launching untested code into production ho!
al2o3cr has joined #ruby
<jrajav>
al2o3cr: ping
<al2o3cr>
jrajav: pong
<jrajav>
Hanmac: Try it again
<jrajav>
:)
chichou_ has quit [Remote host closed the connection]
<jrajav>
I hope there's not a practical use for remove_const
adamkittelson has joined #ruby
<jrajav>
(In the context of running small code snippets on IRC)
<_bart>
Hanmac, you still there?
<jrajav>
Hanmac: Erm
<Hanmac>
>> p 12
<al2o3cr>
Hanmac: ["NameError: wrong constant name remove_const"]
<jrajav>
>_
<Hanmac>
XD
<jrajav>
>_>
<rcassidy>
>> 1 + 2
<al2o3cr>
rcassidy: ["NameError: wrong constant name remove_const"]
al2o3cr has quit [Remote host closed the connection]
<jrajav>
Yeah so um
<jrajav>
Ha
jonathanwallace has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
<rcassidy>
lol.
<Hanmac>
the bot may be thread-safe but he isnt hanmac-safe :P
<jrajav>
No, I just configured the sandbox wrong
<jrajav>
That error was from my code, nothing to do with the snippets
sebastorama has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
jonathanwallace has joined #ruby
apok has quit [Remote host closed the connection]
<Synthead>
With an Array, is there a way I can select indexes 1 to the last index without knowing how many elements are in it?
apok has joined #ruby
<Mon_Ouie>
index -1 refers to the last element
<Mon_Ouie>
(and -2 to the one before that)
<Synthead>
Mon_Ouie: oooooh, brilliant! so [1..-1] will work?
KindTwo has joined #ruby
<Mon_Ouie>
Yes
<Synthead>
Mon_Ouie: nice, thank you! I'll be using this in the future for sure
khakimov has joined #ruby
KindTwo has quit [Changing host]
KindTwo has joined #ruby
SQLStud has joined #ruby
apeiros_ has joined #ruby
<_bart>
Okay let's say I wrap some methods in a module A, and that module in another module B which I then include in a class (include B). Now how do I call that method in module A? B::A::method_name does not work. And the method in B::A should also be able to call the other class methods in the main/parent class.
sailias1 has joined #ruby
Eldariof-ru has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
<shevy>
ok guys
nateberkopec has quit [Quit: Leaving...]
<shevy>
is luis lavena on IRC
_bart has quit [Quit: _bart]
qwerxy has quit [Quit: offski]
ennui has quit [Ping timeout: 240 seconds]
KindTwo is now known as KindOne
Wizek has quit [Ping timeout: 246 seconds]
ringotwo has quit [Remote host closed the connection]
Taichou has quit [Remote host closed the connection]
i0n has joined #ruby
vaks has joined #ruby
cakehero has joined #ruby
v0n has quit [Ping timeout: 240 seconds]
<Hanmac>
jrajav can you let the bot out? his friend whats to play
iDulys has joined #ruby
<iDulys>
hello
<jrajav>
I'm trying to make it so that whatever the heck you're doing to Ruby, it doesn't cause the bot to die
<iDulys>
HELLO!
<jrajav>
Because it shouldn't be, and it's probably something to do with me being stupid
<iDulys>
jrajav
iDulys has left #ruby [#ruby]
<Petit_Dejeuner>
Use a sandbox?
<jrajav>
I am
<jrajav>
lol
<jrajav>
He's breaking the *sandbox*, which proceeds to break ruby
<jrajav>
Hanmac's a beast
ThaDick has quit [Quit: zzzZZZ ...]
* Hanmac
the great Destroyer
<shevy>
hehe
<badfish129>
I'm starting a process with pid = fork { exec "process" } and then killing it with Process.kill. However, right now when i run this script, i get all the output from the process. How can I start it silently?
vaks has quit [Ping timeout: 260 seconds]
<Hanmac>
shevy i tested ... the autorespond does work :P
<jrajav>
That makes this testing easy :P
strife25 has quit [Quit: Computer has gone to sleep.]
<jrajav>
HA!
<jrajav>
Yeah it was just me being stupid
<Hanmac>
what was the problem?
<badfish129>
anyone?
<apeiros_>
badfish129: shameless plug: take a look at the fork gem
mneorr has quit [Quit: Leaving.]
Guest20023 has quit [Ping timeout: 240 seconds]
<shevy>
written by?
<jrajav>
I'm using child_process.exec, and apparently passing the 'error' object of the callback to my IRC bot's "say" function causes the say function to go haywire on .match
<apeiros_>
badfish129: with exec process it might be difficult. I'd probably double fork
<Mon_Ouie>
shevy: apeiros_ I assume
<jrajav>
Even though this is in the 'else' block of (error === null)
<apeiros_>
badfish129: change $stdout in the first fork and capture the output from the second fork's exec
<shevy>
heeh
<apeiros_>
badfish129: alternatively don't use exec but `process`
<jrajav>
So either the string coercion of error is messing up or the IRC bot framework
<jrajav>
I honestly can't tell
<badfish129>
apeiros_: so I could do something like pid = fork { Process.start "ls" }
xyzodiac has joined #ruby
<jrajav>
I'm too lazy to try and figure it out, so I'm just going to go back to printing a constant message when Ruby errors out
mucker has quit [Remote host closed the connection]
<apeiros_>
badfish129: ?
xyzodiac has quit [Client Quit]
<rcassidy>
badfish: if you use Process::spawn you can pass in a hash as a second argument i.e. :out=>/dev/null
<apeiros_>
badfish129: look into `` (Kernel#`), Process::spawn and popen
<apeiros_>
spawn is probably your best bet
wallerdev has joined #ruby
<Hanmac>
rcassidy, i prefer File::NULL over the path
<rcassidy>
ty Hanmac - as i said, i'm still learning a lot about ruby, didn't know that one
<Hanmac>
shevy: no require or load are not accessable ...
<Hanmac>
jrajav: i tryed, but i only get "nonzero status" error :P
Abbas5 is now known as Abbas|
<jrajav>
Yay
<jrajav>
:D
nacengineer has quit [Ping timeout: 252 seconds]
<jrajav>
Also, you *can* still kill it by printing out a crapton of lines to stdout. I'm aware of that and it's on the todo list
<Mon_Ouie>
Can we talk to it in a private query?
<jrajav>
Yes.
<jrajav>
I'm not sure why it's saying it can't message you Mon_Ouie
<jrajav>
It says it has to be registered
<jrajav>
Possibly a mode you have set?
<jrajav>
(I haven't registered the bot with nickserv; too lazy to configure that)
manizzle has joined #ruby
<Mon_Ouie>
Oh, that's because it was required indeed
<Hanmac>
>> a = "a" ; (200 ** 200).times {|i| a << i.to_s }
<al2o3cr>
Hanmac: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<shevy>
lol
<shevy>
HAHAHA
xyzodiac has joined #ruby
<shevy>
>> a = "a" ; (200 ** 200**195595).times {|i| a << i.to_s }
<al2o3cr>
shevy: ["a", "NoMethodError: undefined method `times' for Infinity:Float"]
<shevy>
cool
<shevy>
I reached the Float section of Infinity
brianpWins has quit [Quit: brianpWins]
<Hanmac>
>> a = "a" ; (0..(200 ** 200**195595)).each {|i| a << i.to_s }
<al2o3cr>
Hanmac: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<jrajav>
shevy: Sounds trippy
<shevy>
hey
<shevy>
does the bot eval Hanmac's code differently?
<shevy>
is there a bias?!?!
<Hanmac>
>> a = "a" ; (0..(200 ** 200**195595)).each {|i| p a << i.to_s }
<shevy>
>> a = "a" ; (0..(200 ** 200**195595)).each {|i| a << i.to_s }
<al2o3cr>
Hanmac: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<al2o3cr>
shevy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<shevy>
hah
<jrajav>
The downside of this is that now even I can't see the actual error message Ruby is giving
<shevy>
>> a = "a" ; (0..(200 ** 50)).each {|i| a << i.to_s }
<al2o3cr>
shevy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<shevy>
>> a = "a" ; (0..(100 ** 10)).each {|i| a << i.to_s }
<jrajav>
So if you want to know why it's bugging out, you gotta run it yourself in irb or something
<al2o3cr>
shevy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<jrajav>
I'll probably add that to the todo list too
<shevy>
>> a = "a" ; (0..(5 ** 4)).each {|i| a << i.to_s }
<shevy>
hey
<shevy>
perhaps we can stall it
elhu has quit [Quit: Computer has gone to sleep.]
<shevy>
>> puts 'hi'
<al2o3cr>
shevy: [nil]
<shevy>
>> a = "a" ; (0..(5 ** 4)).each {|i| p a << i.to_s }
<al2o3cr>
shevy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<shevy>
lol
<shevy>
Hanmac, can you stall the bot?
qualiabyte has joined #ruby
<jrajav>
It has a timeout
<shevy>
Hanmac, can you work around the timeout and stall the bot?
<jrajav>
And the interpreter runs in a separate process from the bot
<shevy>
Hanmac, can you work around the timeout, stall the bot and break out of the separate process?
<jrajav>
XD
<shevy>
ack
<shevy>
the bot just messaged me with the result
<jrajav>
Yup haha
<shevy>
if I could just break it ...
<jrajav>
I set it to PM if the result is greater than 150 chars, but I didn't set any limit for the pm
savage-_ has joined #ruby
chrxn_ has joined #ruby
<shevy>
hehe
<shevy>
5 years later ...
<jrajav>
Freenode flooding might kick in if you make it big enough
sgronblom has quit [Ping timeout: 252 seconds]
<jrajav>
Please don't try :(
<jrajav>
(Added that to the todo list too)
<shevy>
I only want to break it
<apeiros_>
shevy: go to pm with the bot
<apeiros_>
and break it there
<jrajav>
Good call, that
<rcassidy>
that's what i'm doing
<rcassidy>
lol
<shevy>
\o/
<shevy>
we should even donate for a prize money
<shevy>
or free beer
maletor has joined #ruby
<jrajav>
You're basically saying that you'd really like Hanmac to have some beer
* Hanmac
dont drink beer or coffee
<jrajav>
:O
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
<jrajav>
You're missing out man
savage- has quit [Ping timeout: 246 seconds]
billiam|| has quit [Read error: Connection reset by peer]
ennui has joined #ruby
<jrajav>
Mon_Ouie: I can see you're playing around with ObjectSpace, let me know if you can actually pull off one of the exploits that you thought would be possible
strife25 has joined #ruby
<Hanmac>
coffee should increase your imagination (or something similar) ... on me it should be like blowing oxygen into an fireball
<jrajav>
I only drink for the taste
strife25 has quit [Read error: Connection reset by peer]
<jrajav>
I have decaf even in the morning
adeponte has quit [Remote host closed the connection]
phinfonet has joined #ruby
abra has quit [Ping timeout: 276 seconds]
Lachryma` has quit [Quit: Leaving]
<Mon_Ouie>
Yay! exited with a non-zero status error.
lunitikcalm has quit [Remote host closed the connection]
<jrajav>
Mon_Ouie: Hmm. I really need to log the errors. I can't tell if it's actually unsafe or if you just crashed it somehow
abra has joined #ruby
<Hanmac>
Mon_Ouie what did you do?
fbernier has joined #ruby
<Mon_Ouie>
I just overrode a method in Sandrbox::Response
<Hanmac>
XD
<rcassidy>
>> clone
<al2o3cr>
rcassidy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<Hanmac>
XD
<jrajav>
Mon_Ouie: That's not that worrying, it'll just crash that instance. The only real problem is if you manage to access a constant or method that Sandrbox has disallowed
<Mon_Ouie>
You can access any constant you want with ObjectSpace
ryh has quit [Remote host closed the connection]
<jrajav>
Example?
<jrajav>
Try listing the directory the bot is in, through ObjectSpace
<shevy>
a ruby project that scans a given source code for some kind of potential abuses or vulnerabilities or something like that
kjellski has joined #ruby
bglusma__ has joined #ruby
tatsuya_o has quit [Ping timeout: 252 seconds]
<Mon_Ouie>
It doesn't exist (partly) because it totally depends on the intent of the programmer
bglusm___ has joined #ruby
<Mon_Ouie>
For instance, one can run system("rm -rf .") in Pry — yeah, but it's supposed to evaluate any code you give it
bglusman_ has quit [Ping timeout: 252 seconds]
bglusman has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
elhu has quit [Quit: Computer has gone to sleep.]
TorpedoSkyline has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
Stalkr_ has joined #ruby
_bart has joined #ruby
axl_ has joined #ruby
<Hanmac>
i think you could count this bot as safe ... i only get nonzero, no direct crashing
BrokenCog has quit [Quit: leaving]
<Mon_Ouie>
Yeah, looks pretty hard to break now
nacengineer has joined #ruby
lorandi has quit [Quit: Leaving]
elhu has joined #ruby
<shevy>
damn
<shevy>
Hanmac trained it
<rontec76>
Wondering if anyone has ever seen this error in a Sinatra app: "Unexpected error while processing request: you need to set up a session middleware *before* Rack::Protection::FormToken"
<rontec76>
I'm getting that when posting to my callback route in a custom omniauth strategy
bluenemo has quit [Ping timeout: 252 seconds]
Supaku has joined #ruby
scant has joined #ruby
<Hanmac>
rontec76 look into #sinatra
<scant>
i want to print out all of the files within a directory, but not any of the subdirectories. how can i do this?
<robert_>
I need to invent a reversible token-y text format, not all too dissimilar from C++'s name mangling.. though I have no idea where to begin. :p
<Petit_Dejeuner>
>> def foo; next; end; foo()
i0n has quit [Quit: Lost terminal]
<banisterfiend>
Petit_Dejeuner: that will just result in exception
<banisterfiend>
nothing very special
Eldariof-ru has quit []
tfitts has quit [Ping timeout: 246 seconds]
Goles has quit [Quit: Computer has gone to sleep.]
<Petit_Dejeuner>
:<
stephenjudkins has quit [Quit: stephenjudkins]
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
Abbas- is now known as Abbas5
<Petit_Dejeuner>
>> fiber.New{|x| x}.resume(2)
<al2o3cr>
Petit_Dejeuner: ["NameError: undefined local variable or method `fiber' for main:Object"]
strife25 has quit [Quit: Computer has gone to sleep.]
<rcassidy>
Petit_Dejeuner: it also responds via PM if you want to hack at it
<swankier>
Hi there. I am not a ruby developer, but I am having a problem with ruby code (in puppet). The puppet channel is a little more focused on the puppet DSL than ruby, so I was wondering if someone in here could offer some assistance. The problem code in question and the output is here: http://pastebin.com/Gzq7qX1k
<Petit_Dejeuner>
>> %x{ rm * }
<al2o3cr>
Petit_Dejeuner: ["NameError: undefined local variable or method ``' for Kernel:Module"]
<jrajav>
You could keep breaking it the same way over and over again if you want; but I (and everyone) would probably prefer it if you just remember what went wrong and tell me when I get back
mneorr has quit [Quit: Leaving.]
Taichou has quit [Ping timeout: 246 seconds]
<jrajav>
Of course, this is assuming you manage to break it, I doubt you can
<shevy>
swankier that is very puppet specific code
<shevy>
people who wont know puppet wont really be able to know what this does
cantonic has quit [Client Quit]
<kwerle>
I would like to execute a method when a class is first loaded - preferably at the end. Is there a mechanism to do that kind of thing? Maybe I just want to subclass from some parent and do something clever with inherited?
<shevy>
all we know is that a rescue clause is triggered
<swankier>
okay, but the chmod command is not. and chmod is returning that it cannot convert a string to integer. is that not general enough?
<shevy>
and the cant convert string into integer means
<shevy>
a "foo".to_i failed or something like that
Abbas5 is now known as Abbas|
<shevy>
swankier, well
<shevy>
.chmod in pure ruby code can be used like this:
<shevy>
File.chmod('a+wt','sources')
<shevy>
File.chmod(01666,'test.txt')
zleslie has left #ruby ["WeeChat 0.3.7"]
<shevy>
you can try to see what the variables are
bglusm___ has quit [Remote host closed the connection]
cjs226 has quit []
<shevy>
or change:
<shevy>
file.chmod(mode)
<shevy>
to
<swankier>
5 digit permissions?
<shevy>
File.chmod(mode,file)
<jrajav>
Bot down to transition to forever
al2o3cr has quit [Remote host closed the connection]
<Petit_Dejeuner>
>> Dir.getdir()
<shevy>
swankier, it will work
<Petit_Dejeuner>
the fuck?
<jrajav>
Haha great timing, huh?
<shevy>
if you have ruby, try it in irb swankier
<jrajav>
:P
<shevy>
Petit_Dejeuner, could be it PRIVMSG you
<Petit_Dejeuner>
Was that you or me jrajav?
<banisterfiend>
jrajav: it died?
<jrajav>
Me
<jrajav>
<jrajav> Bot down to transition to forever
<jrajav>
Doesn't anybody read
<shevy>
ohhhh
<shevy>
:(
<Petit_Dejeuner>
shevy, it was
<shevy>
and I was so happy
<banisterfiend>
jrajav: what does "transition to forever" mean?
<Petit_Dejeuner>
jrajav <-- stick in the mood
<Petit_Dejeuner>
and by mood I mean mud
<shevy>
lol
<jrajav>
I prefer stick in the mood
<jrajav>
It's more hipster
<shevy>
I am going to kill you
<shevy>
and by kill I mean kiss
elux has quit [Quit: Bye!]
berserkr has quit [Quit: Leaving.]
<shevy>
rod in the mood?
<jrajav>
banisterfiend: forever is a node.js module to … run scripts forever
<Petit_Dejeuner>
I am going to code this script. And by code I mean break.
<shevy>
I dont like hipsters, they dont seem to be doing anything useful
chson has joined #ruby
<rerntzdb>
is there a way to get an expression in ruby which evaluates to a function that is called using regular syntax, rather than via "<expr>.call(foo,bar,baz)"?
<Petit_Dejeuner>
They weren't doing anything useful before everyone else was.
<banisterfiend>
jrajav: interesting, why use node for this?
<Petit_Dejeuner>
I think some kind of proc can be called with []
<jrajav>
It's not important that it's node
stephenjudkins has joined #ruby
<Mon_Ouie>
All Procs can be called with #[]; also foo.(bar) is another syntax for calling #call
<Hanmac>
whevy: "And you look at Romney, and I’m sure he’s a nice guy, but I think he’s like the Thing. He only imitates human behavior. He’s not actually human himself."
<Hanmac>
i mean shevy
Berglund has quit [Quit: Computer died.]
rippa has quit [Ping timeout: 240 seconds]
sent-hil has quit [Remote host closed the connection]
awarner has joined #ruby
<jrajav>
So, from now on, if the bot itself dies (which shouldn't happen), it will restart and rejoin after a short delay
awarner has quit [Remote host closed the connection]
<shevy>
so you say
<qakka>
hey, is it possible to make ruby lazy?
<shevy>
but Hanmac will come up with a counter
<shevy>
qakka, yes. Stop. Writing. Code.
<jrajav>
I think he means in the sense of functional programming :P
erichmenge has quit [Quit: Be back later]
<shevy>
they are all lazy
<banisterfiend>
qakka: just pass lambdas everywhere :)
<shevy>
qakka, try things like .tap {} and so forth
<qakka>
:) yeah I mean lazy evaluation
erichmenge has joined #ruby
<shevy>
banister is the master of lazy
bigdc1 has joined #ruby
<banisterfiend>
shevy: no..i actually finish projects. what about u? :)
<jrajav>
Mon_Ouie is doing scary things with global_variables
<jrajav>
I think he's determined to wrest Hanmac's crown
<banisterfiend>
jrajav: you still keep RubyVM exposed, i wonder if something could be done with that
<Hanmac>
qakka, you mean something like this? : [4,3,2,1].each_with_index.with_object({}) {|(i,idx),o| o[idx]=i}
erichmenge has quit [Client Quit]
<banisterfiend>
>> Object.constants
<jrajav>
banisterfiend: Feel free to try
<qakka>
hmm how could I create a lambda to return an infinite sequence?
<Petit_Dejeuner>
>> $myValue = 10
<al2o3cr>
Petit_Dejeuner: [10]
<Petit_Dejeuner>
>> $myValue
<al2o3cr>
Petit_Dejeuner: [nil]
<banisterfiend>
qakka: oh that's easy
<Petit_Dejeuner>
:\
<shevy>
banisterfiend so pry is finished?
<qakka>
scratch that actually...
<qakka>
its obvious..
<jrajav>
I would love it if anyone could actually get through to process or filesystem calls; it would expose another hole in the sandbox
minijupe has quit [Quit: minijupe]
<jrajav>
Just please exercise good taste in not actually *using* that for anything that's not demonstrative :P
<jrajav>
And hopefully noe more such holes are found
<banisterfiend>
qakka: e = Enumerator.new { |y| (1..Float::INFINITY).each { |v| y << v } }
<banisterfiend>
qakka: e.next; e.next; e.next
<shevy>
jrajav, you kinda removed everything cool with the bot :(
stopbit has quit [Read error: Connection reset by peer]
mengu has quit [Ping timeout: 252 seconds]
ThaDick has quit [Quit: I'm outta here!]
<banisterfiend>
shevy: it's released and stable :) It's still having features added it to for future versions, but the versions released are stable
hynkle has quit [Quit: Computer has gone to sleep.]
<qakka>
@banisterfiend: ah simpler that I thought
<jrajav>
Petit_Dejeuner: Were you expecting that to work?
<Petit_Dejeuner>
jrajav, Right, well my BLT drive on my computer just went AWOL, and I've got this big project due tomorrow for Mr. Kawasaki, and if I don't get it in, he's gonna ask me to commit Hari Kari...
<jrajav>
?
<Petit_Dejeuner>
jrajav, Could you, uh, read me the number on the modem?
<jrajav>
...
<Petit_Dejeuner>
:D
<shevy>
lol
<rcassidy>
jrajav: did you see the output from what i just tried, there?
lunitikcalm has joined #ruby
<jrajav>
rcassidy: Do it again
<shevy>
there must be some way to sneakily replace some component of the bot at runtime
<al2o3cr>
Petit_Dejeuner: ["NameError: undefined local variable or method `require' for Kernel:Module", "NameError: undefined local variable or method `open' for main:Object"]
<al2o3cr>
fowl: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<Mon_Ouie>
jrajav: I suggest you hide Object#class and Class#superclass (and related) altogether
<workmad3>
>> STDIN.send('cl''ass')
<al2o3cr>
workmad3: [IO]
<fowl>
ez
<shevy>
noooo Mon_Ouie don't give him hints! :(
<jrajav>
Mon_Ouie: Thanks, I'll put that on the todo list
<shevy>
noooooooooo
<robert_>
shevy, workmad3: I'm looking to transform something like "_Z12MyModuleName10MethodCallE" into something like, [{ :type => :ClassNameIdentifier, :id => :MyModuleName }, { :type => :MethodIdentifier, :id => :MethodCall }]
jrajav has quit [Quit: The best darkness is strange and surprising]
kyrylo has left #ruby ["WeeChat 0.3.8"]
<shevy>
ewww
<shevy>
that's an ugly name
ryh has quit [Remote host closed the connection]
<shevy>
ok so it is some code you use
<workmad3>
robert_: ah, you kind of want to undo an exported, mangled symbol
<Mon_Ouie>
Simple example of how to ge access to Object:
<Mon_Ouie>
>> send("cl" "ass")
<al2o3cr>
Mon_Ouie: [Object]
<workmad3>
>> __send__('cl' 'ass')
<al2o3cr>
workmad3: [Object]
<workmad3>
>> __send__('require','pp')
<al2o3cr>
workmad3: ["NameError: undefined local variable or method `require' for main:Object"]
<robert_>
workmad3: yeah. I picked C++ because it serves both my requirements; I can check to see if it's valid (because it demangles) and I can extract information from it.
<fowl>
>> def method_missing(*) "<>< "*80 end
<al2o3cr>
fowl: []
<workmad3>
robert_: bear in mind that name mangling is not consistent across compilers
<robert_>
yeah, I actually don't care about that; I'm just borrowing the format for something.
johnlcox has quit [Ping timeout: 248 seconds]
<workmad3>
robert_: right, well you'll need to make some assumptions about format then
<robert_>
so in essence, it will ALWAYS be in that format
<robert_>
yeah
<cantonic>
hmm… i need to run a specific task for 50 000 records in my database. each one takes around 10 seconds… what is the best way to run multiple threads of that task at the same time? else it would take tooo long
<robert_>
I'm just not sure where to start.
<workmad3>
robert_: well, start by pulling it apart
<robert_>
oh, so don't try to parse it as I pull it apart
<fowl>
>> ksfdj
al2o3cr has quit [Excess Flood]
<aempirei>
whats the best memoization technique or LRU datastructure in ruby right now?
<robert_>
parse it later?
mramaizng has joined #ruby
<workmad3>
robert_: I'd do it that way, yeah
al2o3cr has joined #ruby
<robert_>
alrighty.
<workmad3>
robert_: keeps the concerns separate and simpler ;)
<robert_>
yeah. :p
<workmad3>
robert_: and also means you can check if the entire thing is valid before attempting to do stuff with it
khakimov has quit [Quit: Computer has gone to sleep.]
<voodoofish430>
yeah, I tried that, but it doesn't return the value.
ennui has quit [Ping timeout: 240 seconds]
<voodoofish430>
or at least I wasn't getting it to work as I would have expected.
erichmenge has joined #ruby
<delinquentme>
is something like wrest a better option for authenticated JSON APIs than nokogiri?
<voodoofish430>
not sure what I can do with an enum.
cpruitt has quit [Quit: cpruitt]
<virunga>
voodoofish: do you want each symbol of the string converted in byte?
verto|off is now known as verto
justsee has joined #ruby
tcopp has left #ruby [#ruby]
jorge has quit [Remote host closed the connection]
<voodoofish430>
I want the decimal value of each char.
<voodoofish430>
if the char is A, I want 65
w400z_ has quit [Quit: Computer has gone to sleep.]
<virunga>
>> a = []; "Ruby".each_char { |c| a << c.to_i }
<al2o3cr>
virunga: [[0, 0, 0, 0], "Ruby"]
<workmad3>
voodoofish430: "a".ord
<workmad3>
>> "Ruby".each_char.map {|c| c.ord }
<al2o3cr>
workmad3: [[82, 117, 98, 121]]
<voodoofish430>
will that work with backspace as well?
<workmad3>
should do
<workmad3>
just hard to demonstrate a non-printable character here :)
jorge has joined #ruby
<voodoofish430>
hmmm...okay.
<shevy>
I HATE YOU ALL!!!!
<shevy>
oops
<shevy>
wrong channel
phinfonet has quit [Remote host closed the connection]
<workmad3>
it's hard to demonstrate backspace in particular, as it's frequently interpreted by whatever is processing the input...
wallerdev has quit [Quit: wallerdev]
<workmad3>
shevy: yeah... I don't believe you :P
eywu has joined #ruby
eywu has quit [Client Quit]
<shevy>
hehe
<voodoofish430>
workmad3: well, for a little context, I'm pulling data from uProc basically adc readings and sending it serially. I'm sending that as chars and having ruby read this serial data(via ruby serial gem) and saving it to a file. That file I then parse, but I run into issues when hitting the backspace char...and other chars I think...so I've been using the bytes method, but that became a problem as I had other stuff that was processing the data after
chichou has joined #ruby
<workmad3>
voodoofish430: yeah... just send bytes
<voodoofish430>
so yeah....thats what I was trying to do....and ord worked great for a while...
chrxn_ has joined #ruby
<voodoofish430>
I only have the option to send chars, technically they are bytes....just depends on how they are interpreted I guess...
SQLStud has quit [Read error: Connection reset by peer]
kpshek has quit []
cakehero has quit [Quit: Leaving...]
KindTwo has quit [Changing host]
KindTwo has joined #ruby
KindTwo is now known as KindOne
SCommette has quit [Quit: SCommette]
uris has quit [Quit: leaving]
justsee is now known as justsee|away
piotr_ has quit [Ping timeout: 252 seconds]
justsee|away is now known as justsee
chrxn_ has quit [Ping timeout: 244 seconds]
nari has joined #ruby
emmanuelux has joined #ruby
darren has joined #ruby
lledet has quit [Quit: lledet]
<otters>
>> "Ruby".bytes
<al2o3cr>
otters: [#<Enumerator: "Ruby":bytes>]
<otters>
>> "ಠ_ಠ".bytes
<al2o3cr>
otters: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<otters>
aw
phinfonet has joined #ruby
<Petit_Dejeuner>
>> "Ruby".bytes.to_a
<al2o3cr>
Petit_Dejeuner: [[82, 117, 98, 121]]
<otters>
That looks like a nested array, but it isn't.
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
infinitiguy has quit [Ping timeout: 246 seconds]
justsee is now known as justsee|away
jasonLaster has joined #ruby
seanstickle has joined #ruby
jimeh has joined #ruby
yakko has quit [Remote host closed the connection]
<crazed>
here's one that i can't seem to crack, at least easily, i have a module (module Foo; extends Bar; end), how can i show the list of modules that Foo extends