<zachlatta>
Any advice for getting started writing a gem for the console? I can't seem to find any resources online.
lsegal has joined #ruby-lang
komagome has quit [Quit: Leaving]
ykk` has joined #ruby-lang
<rickhull>
are you comfortable with e.g. hello world as a gem?
<rickhull>
"gem for the console" is unclear. you just mean without a (G)UI?
<zachlatta>
yeah
<rickhull>
er, explicitly a CLI i guess
<zachlatta>
i've made a basic gem
<zachlatta>
the goal is for the user to do something like:
<zachlatta>
gitignorer create -Java -Maven
<zachlatta>
in bash or zsh or whatever
<zachlatta>
i know how to do the backend, i'm just not sure how to get and process user input
io_syl has quit [Remote host closed the connection]
<zachlatta>
*get userinput and respond to it
<rickhull>
ok, let's ignore the fact of a gem for now
<rickhull>
really you just want to write a command line program
<zachlatta>
yeah, i know i can use OptionParser to get the options from the user
<rickhull>
ARGV is where command line arguments end up
<rickhull>
OptionParser consumes ARGV
<zachlatta>
ah
<zachlatta>
thanks for the correction
<rickhull>
but you could consume ARGV yourself
<rickhull>
one sec, i'll throw up a basic script
GeissT has joined #ruby-lang
<zachlatta>
well, i guess my main question is how can i "install" the program with a gem so the user doesn't need to explicitly download and run the script. instead, i'm hoping for them to be able to just type the gem's name directly in their console to start the program.
<rickhull>
inside your gem, executables go inside bin/
<zachlatta>
ah
<rickhull>
and then you make add bin/ to the shell's PATH
<rickhull>
s/make//
<zachlatta>
so instead of putting the source files in lib i put them in bin?
<rickhull>
right, there is a distinction between executables and library files
<zachlatta>
and just say that's where the files are in the gemspec
<rickhull>
libraries should just declare classes and modules
io_syl has joined #ruby-lang
<rickhull>
and executables require the libs, and actually do stuff
Deece has joined #ruby-lang
<rickhull>
so you keep your class definitions inside lib/
<zachlatta>
lib = controller/model and bin = view?
<rickhull>
no
<rickhull>
that's rails stuff, which is sort of a different world than command line apps
<zachlatta>
i'm thinking more of the mvc paradigm in general
<zachlatta>
i like to use it whenever i can, i find i produce cleaner code when i do
<rickhull>
yeah that doesn't apply here
<rickhull>
for instance, you don't chmod 755 your rails files
<rickhull>
(chmod +x)
<zachlatta>
i see that there's a technical difference, but i'm speaking in conceptual terms
Nisstyre-laptop has joined #ruby-lang
<rickhull>
MVC makes sense for GUIs. I've not ever tried to use it outside of that realm
guns has joined #ruby-lang
<zachlatta>
i think i kind of understand what i need to do, thanks for making the distinction between bin and lib in gems for me! i'll come back here if i have any questions.
<rickhull>
now check. bin_doubler.rb really means bin/doubler.rb
headius has quit [Quit: headius]
<zachlatta>
Alright, thanks! Mind if I PM you with any more questions?
<zachlatta>
*if I have any more questions?
<rickhull>
one thing to be aware of: ARGV will be full of string representations. the library handles that, but you may want to coerce numbers-as-strings into numbers-as-numbers inside the bin script
<rickhull>
nah, just ask in here
<zachlatta>
Alright, thanks again!
mbj has quit [Read error: Operation timed out]
swav has quit [Remote host closed the connection]
swav has joined #ruby-lang
swav_ has joined #ruby-lang
swav has quit [Read error: Connection reset by peer]
buzzybron has joined #ruby-lang
hogeo has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
snarfmason has quit [Quit: Computer has gone to sleep.]
wallerdev has joined #ruby-lang
cjs226 has joined #ruby-lang
nathanstitt has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
dhruvasagar has joined #ruby-lang
cofin has joined #ruby-lang
rmascarenhas has joined #ruby-lang
GeissT has quit [Read error: Connection reset by peer]
yxhuvud has quit [Read error: Connection reset by peer]
ryez has joined #ruby-lang
apeiros has joined #ruby-lang
Kero has quit [Read error: Operation timed out]
yxhuvud has joined #ruby-lang
Kero has joined #ruby-lang
apeiros_ has quit [Read error: Connection reset by peer]
arooni-mobile__ has joined #ruby-lang
arooni-mobile has joined #ruby-lang
tenderlove has joined #ruby-lang
bentis has quit [Ping timeout: 248 seconds]
nathanstitt has quit [Quit: I growing sleepy]
torrieri has quit [Quit: Leaving...]
nathanstitt has joined #ruby-lang
teleological has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 252 seconds]
arooni-mobile__ has quit [Ping timeout: 252 seconds]
mikewintermute has quit [Quit: mikewintermute]
teleological has quit [Remote host closed the connection]
pr0ton has quit [Quit: pr0ton]
torrieri has joined #ruby-lang
torrieri has quit [Changing host]
torrieri has joined #ruby-lang
dingus_khan has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
krombr has quit [Remote host closed the connection]
swav_ has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
stoutMinder has joined #ruby-lang
torrieri has joined #ruby-lang
torrieri has quit [Changing host]
torrieri has joined #ruby-lang
hogeo_ has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
hogeo has quit [Ping timeout: 240 seconds]
ikrima has joined #ruby-lang
Stoutman has joined #ruby-lang
igaiga has joined #ruby-lang
igaiga has quit [Client Quit]
LinkedoT has quit [Quit: This computer has gone to sleep]
ruby-lang600 has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 252 seconds]
ruby-lang600 has quit [Client Quit]
arooni-mobile has joined #ruby-lang
arooni-mobile__ has joined #ruby-lang
bentis has joined #ruby-lang
hogeo_ has quit [Remote host closed the connection]
cofin has quit [Quit: cofin]
sush24 has quit [Quit: This computer has gone to sleep]
nathanstitt has quit [Quit: I growing sleepy]
nathanstitt has joined #ruby-lang
Johz has quit [Quit: AH HELP ITS ALL CRASHING AT ONCE I CANT STOP IT HELP HELP HELP <transmission ends>]
igaiga has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
amerine has quit [Ping timeout: 252 seconds]
igaiga has quit [Ping timeout: 252 seconds]
teleological has joined #ruby-lang
amerine has joined #ruby-lang
ryez has quit [Ping timeout: 250 seconds]
zukin has joined #ruby-lang
io_syl has quit [Read error: Operation timed out]
teleological has quit [Ping timeout: 248 seconds]
hogeo_ has joined #ruby-lang
hogeo_ has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
Glass_saga has quit [Remote host closed the connection]
Glass_saga has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 248 seconds]
hashkey has quit [Ping timeout: 264 seconds]
help has joined #ruby-lang
help is now known as Guest51310
Guest51310 is now known as hashkey
guns has quit [Quit: guns]
swav has joined #ruby-lang
torrieri has joined #ruby-lang
swav has quit [Ping timeout: 256 seconds]
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
jsullivandigs has quit [Ping timeout: 240 seconds]
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
Senjai has joined #ruby-lang
ohsix has quit [Read error: Connection reset by peer]
sush24 has quit [Ping timeout: 256 seconds]
ohsix has joined #ruby-lang
havenwood has joined #ruby-lang
sush24 has joined #ruby-lang
jsullivandigs has joined #ruby-lang
io_syl has joined #ruby-lang
igaiga has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 240 seconds]
torrieri has quit [Quit: Leaving...]
sush24 has quit [Quit: This computer has gone to sleep]
dingus_khan has quit [Remote host closed the connection]
Senjai has quit [Ping timeout: 256 seconds]
igaiga has quit [Ping timeout: 252 seconds]
nathanstitt has quit [Quit: I growing sleepy]
zukin has quit [Quit: irssi]
Stoutman has left #ruby-lang [#ruby-lang]
stoutMinder has quit [Quit: ChatZilla 0.9.90 [Firefox 21.0/20130511120803]]
<zachlatta>
I'm iterating over an array. I'd like an extra variable while iterating through the array (must be a Fixnum). Is there any way I can do something like array.each do |element, extra_var| ?
hogeo has joined #ruby-lang
<havenwood>
zachlatta: I wonder if you mean something like `array.each_with_object(0) do |e, the_fixnum|
<zachlatta>
I'm having a bit of trouble understanding the documentation for that one. So is obj in each_with_object(obj) the type of object I'm iterating over? Or is that my extra variable?
hogeo has quit [Remote host closed the connection]
infecto has joined #ruby-lang
<lianj>
>> [1,2,3].each.with_object(99){|i,e| p [i,e] }
<zachlatta>
Alright. Now is there a way for that object to not reset after each iteration? I'm currently doing array.each_with_object(0) do |word, i| {}
<infecto>
anyone have any decent light reading/illustrations on the benefits of meta-programming in ruby?
<judofyr>
whitequark: because Nokogiri is a pain to install
<whitequark>
no, seriously, why
<whitequark>
and $yourthing will be a pain to use
<judofyr>
why?
<whitequark>
slow
<injekt>
I've never had an issue installing nokogiri once all its deps are installed
<injekt>
that said, I'm debugging like 3 open issues that have installation problems
<judofyr>
whitequark: depends on the use-case. if you're parsing large data you'll have to use SAX anyway
teleological has joined #ruby-lang
<apeiros>
judofyr: REXML is pure ruby
<erikh>
rexml is horrible
<yorickpeterse>
well then, I think I just accidently deployed staging code to production
<yorickpeterse>
oops
<erikh>
with apologies to the authors
<erikh>
it's barely an xml parser.
<apeiros>
erikh: never used it, but before nokogiri it was touted as "the best html parser in the whole world!!!!"
kalleth has joined #ruby-lang
<whitequark>
erikh: judofyr: chances that REXML will be much ffaster than your thing
<erikh>
apeiros: exactly :P
<erikh>
hey, I didn't write anything
<apeiros>
probably because then's html/xml parsers for java/php were even more horrible. no idea.
igaiga has joined #ruby-lang
<erikh>
C#'s xml parser is so nice.
<whitequark>
'cause Ruby's regexp engine, while not being that fast on its own, it's far slower than just slicing the damn thing with regexeps
<erikh>
I keep telling myself I'll adapt it, but I just have no xml needs anymore
* apeiros
wrote a "sax" XML parser in php once
<apeiros>
that was actually fun
<erikh>
whitequark: xml is quite complicated
<erikh>
it's not a real "parser" if it just looks for angle brackets.
<lupine>
you can't sanely parse xml in regexps
<lupine>
ever
<erikh>
^
<apeiros>
hm? xml is rather easy to parse
<apeiros>
but yes, won't do with regexen
<whitequark>
erikh: exactly
<whitequark>
lupine: huh?
<lupine>
since you've got backreferences, it's just about possible
<erikh>
apeiros: how about namespaces and validating schemas and entities and CDATA and and and
<lupine>
but... no
<apeiros>
but with ruby, I'd say writing one using stringscanner should be easy to do
<whitequark>
I was talking about using regexps to make a lexer
<apeiros>
erikh: that's more than parsing ;-)
<erikh>
I disagree
<erikh>
it's not an xml parser unless it can do all that.
<apeiros>
xpath, css etc. are a lot more work than the parser
<erikh>
I'm not even talking about walking the nodes
<erikh>
I'm just talking about "here's a document that's valid xml -- ensure that"
<apeiros>
hen you're misusing the term "parser" :-p
<apeiros>
*then
<erikh>
eh
<whitequark>
xml library
<apeiros>
but agreed, providing a complete xml toolkit with parser, xpath, css, xsd, relax-ng and whatever that other schema thingy was is hard
yorickpeterse is now known as yorick-cowboy
<erikh>
yorick-cowboy: pink sombrero.
ikrima has quit [Quit: Computer has gone to sleep.]
<yorick-cowboy>
still need to order one
<erikh>
anyone play with docker.io yet?
<erikh>
I've been tinkering a bit, looks really nice.
dfdf has quit [Remote host closed the connection]
* whitequark
has figured out that KVM is utterly unsuitable for running windows vms
<whitequark>
HORRIBLE io perf
<whitequark>
like, my toaster could run that faster if it was native
<erikh>
hvm?
<erikh>
did you get full vt-x and vt-d?
<whitequark>
erikh: I'm fairly sure it used the intel-kvm module, so vt-x is in
<whitequark>
vt-d doesn't play here
<whitequark>
as no passthrough
ikrima has joined #ruby-lang
<erikh>
bummer
<whitequark>
ie. xen with qcow2 totally levels kvm with same qcow2
<whitequark>
they even have most parts same
<erikh>
oh
<erikh>
images
<erikh>
dude
<erikh>
use lvm.
<whitequark>
erikh: mmm
<lupine>
whitequark, wfm, etc
<erikh>
mmmmmmmmm
<whitequark>
erikh: qcow2 on a tmpfs?
<lupine>
getting virtio in helps
kleech has quit [Remote host closed the connection]
blaix has left #ruby-lang [#ruby-lang]
<erikh>
whitequark: dat smartos
<erikh>
:P
<whitequark>
lupine: wasn't able to get virtio working with this winxp setup
<whitequark>
maybe hands.sys
<lupine>
that's why it's slow, then ^^
* whitequark
shrugs
<whitequark>
it just worked(c) with xen
<erikh>
I think citrix is largely responsible for that
<whitequark>
(I wasn't able to get its virtio equivalent for block devices to work on this winxp setup, either)
<lupine>
try the q35 model, maybe. it emulates easier hardware than 'pc'
<whitequark>
(but that didn't slow it down much.)
<whitequark>
lupine: thanks, will try
<erikh>
q35?
<whitequark>
btw
<lupine>
but it's not surprising that xen would be faster than qemu without virtio
<whitequark>
is there a way to tell qemu to preserve the damn aspect ratio?
<whitequark>
lupine: qemu-kvm, mind you
<lupine>
same thing now
<whitequark>
they're supposed to work mostly the same, no?
teleological has quit [Remote host closed the connection]
<lupine>
erikh, -M q35 - it emulates an ahci interface and no isa
<lupine>
whitequark, no, they're actually the same thing now
<lupine>
qemu-kvm was merged into qemu mainline for qemu 1.3
<whitequark>
lupine: no, I meant xen and kvm from the pov of the virtualized machine
<lupine>
the only really noticeable change is that -enable-kvm is no longer the default
<erikh>
lupine: oh, nice
<lupine>
ah, I see. no, not the same
<whitequark>
as in, they both use vt-x for screwing around with memory and qemu hvm or whatnot for emulating devices
<lupine>
different emulated hardware, etc
<whitequark>
I see
<whitequark>
thanks
* lupine
has been living, sleeping, breathing qemu for the last month
<lupine>
can't recommend it ^^
<whitequark>
lol
<bougyman>
no?
<whitequark>
have no choice
<bougyman>
I really like it.
<lupine>
qemu is fine, dealing with it constantly is not
<bougyman>
We use lxc, too.
<bougyman>
I have dozens of qemu vms here.
<lupine>
been bringing up 700 or so VMs to use 1.5.0 instead of 0.15.0
<whitequark>
virtualbox mainly dereferences NULLs, xen cannot wake up from ACPI S3
<bougyman>
ah.
<bougyman>
yeah, that's a different scale.
<lupine>
caaaaaarefully
<bougyman>
using any cfgengine for it?
<lupine>
no, these are customer VMs
<lupine>
we don't have any real control over the guest OS
<bougyman>
frightening.
<yorick-cowboy>
brrrrr
<bougyman>
cold?
<yorick-cowboy>
nah, friday deployments
<yorick-cowboy>
best deployments
<lupine>
it's kind of fun, actually. we do all the management and supervision in ruby
<bougyman>
we did some last friday, they all went smooth.
<lupine>
and we never, ever deploy on a friday ^^
<bougyman>
we deploy to au and apac on fridays.
torrieri_ has quit [Quit: Leaving...]
<bougyman>
then UK and US on saturdays
poga has quit [Remote host closed the connection]
<bougyman>
really we just watch chef and tell QA when the new code is finished rolling out, unless there's some special upgrade or migration.
snarfmason has joined #ruby-lang
<yorick-cowboy>
lupine: I was supposed to deploy yesteday but didn't get to it
<yorick-cowboy>
* yesterday
<yorick-cowboy>
darn lag
nathanstitt has quit [Ping timeout: 252 seconds]
<yorick-cowboy>
and ugh, Capistrano is a fucking pain
<yorick-cowboy>
can't wait until we get rid of it
<gnufied>
yorick-cowboy: what are you getting it rid with?
<gnufied>
capistrano has gone stale kinda
Jinie has joined #ruby-lang
* apeiros
wanted to replace cap with a ~15 line shell script at work
<apeiros>
which I wrote in ~30min and probably could get nicely scripted in another 2h
<apeiros>
but well… 1w of work later by a coworker we're back at cap…
elia has quit [Ping timeout: 248 seconds]
<gnufied>
capi is pretty hard to test to begin with
<gnufied>
cap*
<gnufied>
as in not your deploy scripts, but capistrano itself.
<gnufied>
many critical areas don't have any kind of unit tests
<apeiros>
well, I'm not worried about that
<apeiros>
as we don't use cap unsupervised
weeb1e has joined #ruby-lang
<yorick-cowboy>
gnufied: a package based system
poga has joined #ruby-lang
igaiga has quit [Remote host closed the connection]
shaman42 has joined #ruby-lang
Rubennn_ has joined #ruby-lang
DefV_ has joined #ruby-lang
joast has quit [Ping timeout: 264 seconds]
shaman42_ has quit [Ping timeout: 264 seconds]
lupine has quit [Ping timeout: 264 seconds]
sluukkonen has quit [Ping timeout: 264 seconds]
Rubennn has quit [Ping timeout: 264 seconds]
weeb1e_ has quit [Ping timeout: 264 seconds]
DefV has quit [Ping timeout: 264 seconds]
lupine has joined #ruby-lang
lupine has joined #ruby-lang
<gnufied>
I am hearing rallying cry of package based system from network admins from time immemorial. So are we going to create deb. packages of rails apps? and how does it work with rubygems?
sluukkonen has joined #ruby-lang
<gnufied>
:-)
<gnufied>
there is just too much inertia I think
<apeiros>
pack your rails app into a gem
<yorick-cowboy>
that only solves a small part of the problem
<yorick-cowboy>
what we're doing is basically creating tarballs and extracting those on the server
adambeynon has joined #ruby-lang
<gnufied>
okay and how does migrations, data migrations, etc run?
headius has quit [Ping timeout: 248 seconds]
buzzybron has quit []
<gnufied>
or asset precompilation. shell scripts?
LinkedoT has quit [Ping timeout: 276 seconds]
<yorick-cowboy>
we run those locally
<yorick-cowboy>
though when building a package you can specify shell commands to run before building
<yorick-cowboy>
e.g. bundle install --deployment
LinkedoT has joined #ruby-lang
poga has quit [Remote host closed the connection]
elia has joined #ruby-lang
lupine has quit [Ping timeout: 264 seconds]
lupine has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
nathanstitt has joined #ruby-lang
mdedetrich has joined #ruby-lang
mdedetrich has quit [Client Quit]
ikrima has quit [Quit: Computer has gone to sleep.]
<injekt>
Perl, where you can parse anything but Perl
<bougyman>
judofyr: you can make a parser which utilizes regex, sure.
<bougyman>
in perl you could probably do it in one regex.
<bougyman>
since they allow full logic in their regex.
<lianj>
but is it a good idea?
<judofyr>
bougyman: "parsing with regexes" is very ambiguous.
<bougyman>
about as good an idea as sqlonrails
<lupine>
"it can't be done" is relevant only to FSMs, which modern regexen aren't. "it shouldn't be done" is relevant to regexes
<lianj>
close enough
<judofyr>
bougyman: and I think it's far from "parsing with regexes" to "construct a regex that extracts a tree when matched"
<judofyr>
sorry, just tired of hearing "OMG, you can't parse XML with regexes" all the time
<judofyr>
(with a link to stackoverflow.com)
<injekt>
I still love that answer
<injekt>
(the SO one)
<judofyr>
agreed
<judofyr>
but people misunderstood: he tried to say "you can't extract data from XML with a regex, you have to use a proper parser", but people read "you can't use regex to implement a XML parser"
<judofyr>
or, that's what I hear all the time
mytrile has quit [Remote host closed the connection]
areil has joined #ruby-lang
retro|cz has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
nathanstitt has quit [Quit: I growing sleepy]
postmodern has quit [Quit: Leaving]
priodev has quit [Ping timeout: 240 seconds]
priodev has joined #ruby-lang
dr_bob has joined #ruby-lang
MartynKeigher has joined #ruby-lang
priodev has quit [Ping timeout: 260 seconds]
mbj has joined #ruby-lang
dfdf has joined #ruby-lang
Jinie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<yorickpeterse>
question about testing: if I have app A that depends on Gems B and C, and I want to run the tests of all 3 together, what would be a good way to do this? [...]
<yorickpeterse>
I was thinking of just symlinking the test directories and running them
<yorickpeterse>
(this is a Rails app with engines btw)
<injekt>
im confused, are the gems not available?
<injekt>
oh
igaiga has joined #ruby-lang
<injekt>
I somehow missed 'all 3 together'
cjs226 has quit [Read error: Operation timed out]
igaiga has quit [Remote host closed the connection]
machuga|away has quit [Excess Flood]
machuga has joined #ruby-lang
barttenbrinke has joined #ruby-lang
<yorickpeterse>
They are
<yorickpeterse>
basically app X includes Gems Y and Z (Rails engines), these all have a spec/ directory with decent tests etc
<yorickpeterse>
I want to run them together to see if they don't shit each other up
GarethAdams has quit [Quit: Leaving...]
sush24 has quit [Quit: This computer has gone to sleep]
<yorickpeterse>
The dirty way would be to find these directories, symlink them as spec/some-engine and just run everything in spec
<yorickpeterse>
but that feels, well, dirty
ldnunes has joined #ruby-lang
jxie has quit [Quit: leaving]
henrikhodne has joined #ruby-lang
ykk` has quit [Quit: ykk`]
<erikh>
rubygems-test heh
<erikh>
gotta go
<yorickpeterse>
the thing is that I don't want to run these Gems isolated
<yorickpeterse>
I actually want to test them as if they were actually inside the container app
<PaulePanter>
Do I have to keep something in mind, wanting to print something from a class?
carloslopes has quit [Remote host closed the connection]
<yorickpeterse>
fuck, Gemfiles are loaded before my own code so I can't check for RAILS_ENV
<yorickpeterse>
hmpf
<yorickpeterse>
hm then again, I might not have to
<gnufied>
this is what comes to when you try, package deployment.
<gnufied>
:-)
<gnufied>
just curious, what are you trying?
<yorickpeterse>
This has absolutely nothing to do with that
<yorickpeterse>
I'm trying to install tests from external Gems (= Rails engines) into my container app so we can test to see if they fuck each other up
<ericwood>
(= smileyface
<yorickpeterse>
and god damn it, I'm not copying over the Gemfile
<yorickpeterse>
since I'm only copying over the spec/ directory
<yorickpeterse>
fffff
<yorickpeterse>
hm, I might be able to do some Bundler-inception
* yorickpeterse
puts on a rubber glove
torrieri has joined #ruby-lang
ia___ has quit [Remote host closed the connection]
<yorickpeterse>
Hmpf, something like `gem 'derp', :include_groups => [:development]` would solve my issue
torrieri has quit [Ping timeout: 252 seconds]
vbatts|work has joined #ruby-lang
<yorickpeterse>
oh shit, they have an IRC channel
<yorickpeterse>
OFF WE MUST!
GeissT has quit [Quit: MillBroChat AdIRC User]
sandbags2 has joined #ruby-lang
Jinie has joined #ruby-lang
<ericwood>
hey, anyone here know what the weather in Belgium is like in October?
Jinie has quit [Client Quit]
cofin has quit [Quit: cofin]
Jinie has joined #ruby-lang
<ericwood>
jk I figured it out
ryez has quit [Ping timeout: 250 seconds]
__carlos has quit [Quit: __carlos]
vlad_starkov has joined #ruby-lang
Cakey has joined #ruby-lang
brianpWins has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 240 seconds]
<yorickpeterse>
man, I feel like I'm using babies to beat a hammer in a wall here
judofyr has quit [Remote host closed the connection]
joast has joined #ruby-lang
cofin has joined #ruby-lang
sandbags2 has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 252 seconds]
arooni-mobile__ has quit [Ping timeout: 276 seconds]
<yorickpeterse>
bah fuck it, this is too much effort
<yorickpeterse>
because when you solve the Gemfile problem of course Rails goes all "OOOOHO SHIT WTF ARE YOU DOING"
<yorickpeterse>
omakase etc
<yorickpeterse>
basecamp
vlad_starkov has quit [Ping timeout: 256 seconds]
jsullivandigs has joined #ruby-lang
mytrile_ has joined #ruby-lang
cordax has joined #ruby-lang
zzak has quit [Quit: leaving]
rippa has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 240 seconds]
infecto has joined #ruby-lang
infecto1 has joined #ruby-lang
areil has quit [Remote host closed the connection]
mistym_meeting is now known as mistym
jsullivandigs has joined #ruby-lang
zzak has joined #ruby-lang
dr_bob has left #ruby-lang [#ruby-lang]
infecto has quit [Ping timeout: 260 seconds]
gnufied has quit [Quit: Leaving.]
barttenbrinke has quit [Remote host closed the connection]
io_syl has quit [Read error: Operation timed out]
cordax has quit [Quit: Computer has gone to sleep.]
tbuehlmann has quit [Remote host closed the connection]
mucker has quit [Quit: leaving]
infecto1 has quit [Quit: Leaving.]
kristofferrr has joined #ruby-lang
machuga is now known as machuga|away
mikewintermute has joined #ruby-lang
cordax has joined #ruby-lang
retro|cz has quit [Read error: Operation timed out]
Oloryn_lt21 has quit [Read error: Connection reset by peer]
ikrima has joined #ruby-lang
carloslopes has joined #ruby-lang
mbj has left #ruby-lang [#ruby-lang]
Cakey has quit [Ping timeout: 256 seconds]
nathanstitt has joined #ruby-lang
infecto has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
tbuehlmann has quit [Remote host closed the connection]
pkrnj has joined #ruby-lang
vbatts|work has joined #ruby-lang
teleological has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 252 seconds]
cofin has joined #ruby-lang
sabfer has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
tylersmith has joined #ruby-lang
pr0ton has joined #ruby-lang
<injekt>
zzak: ping
<injekt>
zzak: also go to sleep
<injekt>
but after you've ponged
<injekt>
ok i guess sleep has happened already
krohrbaugh has joined #ruby-lang
sabfer has quit [Quit: sabfer]
teleological has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby-lang
teleological has joined #ruby-lang
vbatts|work has quit [Quit: MeSoChatty 0.3.8]
mikewintermute has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 256 seconds]
mikewintermute has joined #ruby-lang
sabfer has joined #ruby-lang
sabfer has quit [Client Quit]
justinmb_ has joined #ruby-lang
teleological has quit [Ping timeout: 246 seconds]
infecto1 has quit [Quit: Leaving.]
mytrile_ has quit [Remote host closed the connection]
infecto has joined #ruby-lang
barttenbrinke has joined #ruby-lang
DomKM has joined #ruby-lang
DomKM has quit [Client Quit]
DomKM has joined #ruby-lang
fail_ has quit [Quit: fail_]
ia___ has quit [Quit: ia___]
ia___ has joined #ruby-lang
barttenbrinke has quit [Ping timeout: 256 seconds]
marr has quit [Ping timeout: 252 seconds]
rwilcox has joined #ruby-lang
cofin has quit [Quit: cofin]
justinmb_ has quit [Remote host closed the connection]
cordax has quit [Quit: Computer has gone to sleep.]
justinmb_ has joined #ruby-lang
JohnThePreacher has joined #ruby-lang
henrikhodne has quit [Quit: Computer has gone to sleep.]
<yorickpeterse>
hai
<yorickpeterse>
I'm home
<erikh>
congratulations
dhruvasagar has joined #ruby-lang
<yorickpeterse>
yeah it was quite the challenge
<yorickpeterse>
I had to cycle home in the sun
JohnThePreacher has quit [Read error: Connection reset by peer]
pr0ton has quit [Quit: pr0ton]
pr0ton has joined #ruby-lang
<rue>
NOT THE SUN
ikrima has joined #ruby-lang
<yxhuvud>
it is horrid warm out there.
infecto has quit [Read error: Connection reset by peer]
infecto has joined #ruby-lang
vlad_starkov has joined #ruby-lang
brianpWins has joined #ruby-lang
saarinen has joined #ruby-lang
cofin has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
<Aloysius1>
Hey, guys. I'm running into a situation where a line I execute in irb works but fails in a script.
<Aloysius1>
Not sure where to begin, past making sure the parameters all agree (they do).
gearaholic has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 256 seconds]
<Aloysius1>
The call is to "RestClient.post(aurl, somedata)
pr0ton has quit [Quit: pr0ton]
<Aloysius1>
Oh. Fuck me.
<Aloysius1>
never mind
<Aloysius1>
Thanks. ;-)
workmad3 has joined #ruby-lang
<rue>
Does irb still execute in eval context?
<Aloysius1>
OK, on a less stupid question, I notice that when I get an exception inside a code block that's being passed to another routine, even if I rescue, the block is never called again.
carloslopes has joined #ruby-lang
__carlos has quit [Quit: __carlos]
<Aloysius1>
In this particular case, I'm monitoring a message queue and making a RestClient call with whatever shows up in the message queue.
<TTilus>
weird encoding shit going on :-/
scampbell has quit [Remote host closed the connection]
<TTilus>
File.join(foo, bar) returns string w encoding ASCII-8BIT
<TTilus>
foo and bar both have encoding UTF-8
KillerFox has quit [Ping timeout: 248 seconds]
<TTilus>
and neither of them has any characters outside ASCII
KillerFox has joined #ruby-lang
<TTilus>
this is in production
dingus_khan has joined #ruby-lang
<TTilus>
in my dev machine all of those are utf-8
<TTilus>
both have 1.9.3
mytrile_ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
mytrile_ has quit [Ping timeout: 248 seconds]
rwilcox has quit [Ping timeout: 245 seconds]
marr has joined #ruby-lang
Senjai has joined #ruby-lang
Senjai has joined #ruby-lang
<cored>
hello
<cored>
is there something equivalent to rspec --init
<cored>
but for cucumber
<cored>
?
symm- has joined #ruby-lang
workmad3 has quit [Ping timeout: 248 seconds]
teleological has joined #ruby-lang
Criztian has quit [Read error: Connection reset by peer]
Criztian_ has joined #ruby-lang
ndrst has quit [Ping timeout: 256 seconds]
noop_ has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
<TTilus>
i always go look my old projects
<TTilus>
there are generators for rails projects in cucumber-rails
<rickhull>
this project i'm working on depends on json_select > treetop > polyglot
<rickhull>
and polyglot has taken over require functionality project-wide, which I'm trying to see if I can revert
<whitequark>
hmm
fbernier has joined #ruby-lang
<whitequark>
I don't think so
<whitequark>
well... class Kernel; alias require polyglot_original_require; end
swav has quit [Remote host closed the connection]
<rickhull>
is it it necessary for json_select or treetop to have auto-required polyglot in the first place?
<rickhull>
from the doc portion i pasted, i would think no. but maybe it's just a question of requiring polyglot first, even though it will be required anyway
infecto has quit [Quit: Leaving.]
<whitequark>
is polyglot a problem for you?
<rickhull>
it was a few weeks ago, trying to find the example
<rickhull>
but may have been environmental
<epus>
hey guys. I am just starting with RoR, can u suggest any learning materials when I am away from pc, like in train or bus?
<rickhull>
i.e. it seemed like it was
joast has joined #ruby-lang
<rickhull>
epus: rails pdf on kindle
<rickhull>
the rails way or something like that
Aloysius1 has quit [Remote host closed the connection]
ruurd has quit [Quit: Leaving...]
<epus>
i thought so, but it is hard to read the book about programming without trying by myself when i am in public transport
epus has left #ruby-lang [#ruby-lang]
<rickhull>
are you away from your pc or not?
marr has quit [Ping timeout: 245 seconds]
epus has joined #ruby-lang
<rickhull>
if you don't have an execution environment, you'll just have to make do
<epus>
thats the thing, here in london it is impossible to use laptop on a train in a peak time. need to figure out other options for studying. otherwise it is a waste of time 2-3hours a day in a train
<rickhull>
whitequark: i got a require failure from polyglot for a (confirmed) valid path. though it was on a CI server that may have been in a bad state. not something i can easily reproduce at the moment
lsegal has joined #ruby-lang
<rickhull>
epus: you could try a tablet or phone, but i'm pretty wedded to a physical keyboard for such things
<rickhull>
whitequark: do you think that doc is out of date? it sure looks to me like treetop now enables Polyglot dynamic loading be default
<rickhull>
in lib/treetop/polyglot.rb, which is required by lib/treetop.rb
solars has quit [Read error: Operation timed out]
<whitequark>
seems so
kuja_ is now known as kuja
<rickhull>
i'd prefer the documented behavior obviously
<rickhull>
messing with Kernel#require by default just seems sketchy
benanne has joined #ruby-lang
<epus>
i definitely need a physical keyboard. other question I have finished ruby course on code academy and started straight away with hartl's RoR tutorial. now i am on chapter 4 and it is going pretty well, but maybe i need to learn more ruby itself? sorry for this kind of questions, just don't want learn to code in a bad way
<rickhull>
rails uses a lot of magic and shortcuts, which are very useful for experienced programmers. but i think it can be very confusing and misleading for new ruby programmers
<rickhull>
so, if possible, i'd suggest working with ruby for a few weeks before getting heavy into rails
pr0ton has quit [Ping timeout: 256 seconds]
<rickhull>
if all you want to do, ever, is rails, then maybe not necessary
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
Senjai has joined #ruby-lang
<epus>
currently i am a second year student (software engineering course), have a bit of experience in java / c++ / php, but nothing very serious. when i tried ruby on code academy i got hooked by ruby and i believe it is a language on which i want to concentrate the most
epus_ has quit [Quit: Page closed]
<rickhull>
sounds like a good plan to me. find things to use ruby on, even if just exercises
Olipro has quit [Ping timeout: 246 seconds]
krombr has joined #ruby-lang
<rickhull>
and if you have a need for rails, do that too
davidh_ has joined #ruby-lang
<epus>
any suggestions for a good materials to dive into ruby?