<yorickpeterse>
That was for catching STDOUT and such, and it doesn't hack "should/it"
<whitequark>
yorickpeterse: but bacon stores the backtraces in a var and outputs them before exiting
<yorickpeterse>
it was the closest I could get to without messing everything up
emocakes has quit [Ping timeout: 272 seconds]
<whitequark>
and I'm actually fine with stdout/stderr output being printed verbatim
<whitequark>
I'm not starting these tests in parallel
<yorickpeterse>
Well, if you fork things you'll have to call exit! at the end
<yorickpeterse>
Otherwise you'll get the summary multiple times
<whitequark>
obviously
<judofyr>
yorickpeterse: you don't need to rewind StringIO's. just use #string
<judofyr>
yorickpeterse: just FYI :)
nevill has quit [Quit: nevill]
<injekt>
fuck I hate rvm
<judofyr>
injekt: chruby dude
<judofyr>
it's the new rbenv
<injekt>
heh
<injekt>
I'm pretty happy with rbenv
<injekt>
only one of my devs is using rvm and it's being a pita
<yorickpeterse>
judofyr: Well, I eventually just removed the code alltogether
<yorickpeterse>
It was only used to test a very small portion anyway
<yorickpeterse>
injekt: the rehashing pissed me off. chruby is very barebones but it gets the job done
<judofyr>
oh yes. rehashing is a PITA :/
<yorickpeterse>
plus postmodern is a cool guy
<yorickpeterse>
ssteph? Well, lets just say that he fits the 37signals attitude
<yorickpeterse>
(don't know him well otherwise)
<injekt>
meh, sam writes very good software
<injekt>
maybe I'll play with chruby
<whitequark>
iirc he was the original author of "you are not your code" essay
richardburton has joined #ruby-lang
<injekt>
well sure, that was pretty much written because of rbenv
<yorickpeterse>
Oh I don't dislike the guy or anything, it's just that I get a bit uncomfortable whenever somebody from 37signals voices his opinion on Twitter as they can be quite controversial
<whitequark>
injekt: in fact because of prototype
<whitequark>
it was before the rbenv drama™
<injekt>
right
<whitequark>
and before the thing was abused by Brian...
<judofyr>
thing? abused?
<whitequark>
judofyr: that essay.
<whitequark>
and by "abused" I mean that what he says and how he acts is quite different. If something, I prefer the former.
imajes has quit [Excess Flood]
anannie has joined #ruby-lang
leopard_me has quit [Quit: Computer has gone to sleep.]
<judofyr>
anannie: heya
<anannie>
hey judofyr!
<judofyr>
how's it going?
imajes has joined #ruby-lang
<anannie>
It's going reasonably well. I'm learning a lot of new things and I'm trying to do interesting things with it
<judofyr>
nice
leopard_me has joined #ruby-lang
<injekt>
~% chruby 1.9.3-p362
<injekt>
<internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)
<injekt>
great start
<yorickpeterse>
lawl
rue has quit [Remote host closed the connection]
<yorickpeterse>
Oh wait, are you migrating from rbenv?
<injekt>
yus
<anannie>
I'm still not at the level of grasping your code review (which is why I haven't replied, I couldn't formulate a decent non-time wasting reply), but I have done a few projects since then and I am teaching myself things from the pragmatic programmers guide one chapter at a time
<yorickpeterse>
Because I couldn't get that to work, I just re-installed it
<yorickpeterse>
I recall it was having some issues due to the shebangs or w/e
rue has joined #ruby-lang
<judofyr>
yorickpeterse: worked fine here
<yorickpeterse>
hm, odd
<whitequark>
anannie, judofyr: what's the code in question, if not a secret?
<injekt>
I nuked rbenv so it shouldn't be hitting it anyway
<yorickpeterse>
I figured I'd just clean things up, no point in keeping it in ~/.rbenv/versions
gnufied1 has quit [Quit: Leaving.]
gnufied has joined #ruby-lang
<anannie>
Sure whitequark, a while ago I wrote a blackjack program to learn ruby...
<judofyr>
anannie: giving feedback is surprisingly hard. I hope that you'll get something out of it :)
<injekt>
I'm not really sure why I still use version managers, i rarely switch the version anyway
<yorickpeterse>
I stopped using them a long time ago on $PROD
<injekt>
yeah me too
<yorickpeterse>
It all runs MRI 1.9.3 anyway, no point in keeping things in <insert version manager here>
<injekt>
although all my prod happens on heroku now anyway
<whitequark>
injekt: you sure have a lot of money
<judofyr>
injekt: or small projects
<whitequark>
yeah
<anannie>
judofyr: I did! I realised how much I didn't know and I learned a few specific lessons from it. It helped me a lot in my next challenge, writing a game of life; https://www.dropbox.com/s/iurhq1g8iot3f0d/gameoflife.rb
<injekt>
my company website is hosted on heroku, it's not *that* expensive and means I dont have to employ (or do it myself) someone for sysadmin
<yorickpeterse>
anannie: hey, that actually doesn't look that bad
nevill has joined #ruby-lang
<whitequark>
anannie: yeah, the code is pretty good for a novice programmer
<anannie>
yorickpeterse: Thanks, I had help :)
richardburton has quit [Quit: Leaving.]
<whitequark>
I think you could find attr_accessor (and its siblings) useful
<yorickpeterse>
The double hashes however are not needed for comments
<yorickpeterse>
So just "# Comment goes here" is fine
<anannie>
Ah about attr_accessor, I realise that this strays deep into OO concept land, but I don't grok it properly
<injekt>
yorickpeterse: they obviously know that judging by.. most of the document
<yorickpeterse>
injekt: they?
<yorickpeterse>
anannie: it's just a shortcut for creating a getter and setter method
<whitequark>
anannie: it is very simple actually. `attr_reader :foo' is completely equivalent to `def foo; @foo; end' for any `foo'
<anannie>
yorickpeterse, yes but why roll it in
<whitequark>
same for attr_writer. it's just a shortcut to avoid writing that code by yourself
<anannie>
whitequark: Isn't there more to it than that? I got that impression whilst reading the pragmatic programmers guide...
<whitequark>
anannie: ruby has lots of useful shortcuts which together make your life a little happier
<injekt>
yorickpeterse: 'he' is a little assumptious :)
<yorickpeterse>
injekt: I'm sorry, is this related to that piece of code or did I miss something?
<injekt>
:/
dankest has joined #ruby-lang
<yorickpeterse>
(not angry or anything, just confused)
<whitequark>
anannie: well, you can specify several attributes like `attr_reader :foo, :bar', but that's it
<injekt>
yorickpeterse: I was replying to your comment about comments not needing "##" saying that anannie obviously knows that because most of the document uses single # and that it was probably just for style reasons
<whitequark>
anannie: ruby is often very, very simple from inside. not always, but often.
<yorickpeterse>
injekt: aah
steph021 has quit [Quit: Computer has gone to sleep.]
<anannie>
whitequark: So there isn't any deeper meaning over here? I was banging my head against the wall trying to grok what I perceived to be a deep truth of the language. I got that impression because you can actually have virtual attributes themselves which don't directly expose instance variables and this aspect of thelanguage, the mutation between instance variables and functions led to interesting behaviour as an interface to that class
<anannie>
. Nope I have no idea what I'm saying.
<anannie>
yorickpeterse: Yeah they were essentially stylistic. I like to make things prettier basically.
<whitequark>
anannie: no, it's just a shortcut for defining a method
<whitequark>
anannie: what you're referring to is probably that there is no way to directly refer to an instance variable of another object
<whitequark>
the only way you could interact with objects is by calling methods
<whitequark>
on them
karasawa has joined #ruby-lang
<anannie>
whitequark: Hrm let me quote the specific paragraph, can you please excuse me?
LKiS has quit [Read error: Connection reset by peer]
babinho_ has left #ruby-lang [#ruby-lang]
<yorickpeterse>
ohgod, camelCamse in Ruby
<yorickpeterse>
* Case
nevill has quit [Quit: nevill]
<yorickpeterse>
Fuck my English is exceptionally shit today
<whitequark>
anannie: past some OOP buzzwords there is a simple idea: if the outside world can never see what happens inside an object, we can freely change how it works without fearing to break anything, *if the interface is kept the same*
<whitequark>
anannie: it has nothing to do with attr_* methods btw
<anannie>
whitequark: Oh I see, so there isn't any special logic going on over here?
<whitequark>
anannie: no
<postmodern>
injekt, yo
<anannie>
Ah.
<anannie>
Thank you for teaching me that whitequark
<whitequark>
you're welcome
<anannie>
I would have wasted a lot of time and a ridiculous amount of thought to get over it...
nevill has joined #ruby-lang
stonerfish has quit [Quit: Leaving.]
<injekt>
postmodern: was having some issues with chruby but looks like it's all working now cheers
<postmodern>
injekt, word
<postmodern>
injekt, anything due to my misconceptions?
<injekt>
postmodern: nope, it was my fault :-)
<postmodern>
injekt, word
richardburton has joined #ruby-lang
<postmodern>
injekt, just ran into issues with OSX and ~/.bash_profile
richardburton1 has joined #ruby-lang
richardburton has quit [Ping timeout: 240 seconds]
<peterhellberg>
whitequark: Also, it is a pretty bad idea to run general purpose operating systems from a sd card, horrible performance, file system corruption, and so on
jacktrick has joined #ruby-lang
<ggreer>
emocakes: maybe look at beagleboard or pandaboard?
<whitequark>
peterhellberg: unless broadcom fucked up MMC too hard you can get better performance with a more expensive SD card (something along 64x or so, IIRC)
<whitequark>
and FS corruption shouldn't manifest itself at all
jacktrick is now known as Guest25746
<injekt>
anannie: what type of IO? File? then Ruby has a built in File class
<emocakes>
ggreer, was liking pandaboard
<peterhellberg>
whitequark: Well, it does… even with a CLASS 10 card
<anannie>
I've been looking into termios and ncurses, but they are a bit beyond me. I was thinking about outputting to the terminal, but then I can find a library that seems to allow me to do what I want. Not without some hassle.
<whitequark>
peterhellberg: I'm not surprised. It's a device whose USB controller loses keypresses even with 0% auxiliary CPU load.
blacktulip has quit [Ping timeout: 272 seconds]
blacktulip has joined #ruby-lang
karasawa has joined #ruby-lang
<whitequark>
emocakes: +++ for beagle/pandaboards. they're quite nice.
<anannie>
injekt: I want to print ascii art representing the game board in the game of life as it evolves over each iteration
<emocakes>
rpi looks alright, but might be a tad weak for certain things
<ggreer>
I have a beagleboard. it works ok but I didn't do anything useful with it
<whitequark>
emocakes: and they actually have an open ecosystem rather than locking you in between of proprietary blobs and shitty peripherals
<peterhellberg>
anannie: Do you find it too slow to wipe the entire terminal between generations?
<rue>
There was some ASCII library
<ggreer>
it's way easier to just use an old laptop
<anannie>
injekt: Writing it to a file would be suboptimal as there's no way someone would scroll through all of that. Right now I just do a puts and then I do a hack to clear the screen, but it's quite ugly
<anannie>
peterhellberg: I haven't hit against any limits so far, the terminal refresh rate is quite high
<whitequark>
ggreer: old laptops have at least an order of magnitude higher power consumption
<whitequark>
that is, if you don't use sleep capabilities of arms on *boards
<ggreer>
electricity is cheap. my time isn't
<whitequark>
if you do, it can be anywhere from 1 to 3 orders of magnitude
<whitequark>
ggreer: it is not when you're running on batteries
<whitequark>
depends on your use case, of course.
<rue>
anannie: There’s ruby-toolbox that you could try to search in—or in this case, $ gem search -r ascii # or ansi gives some results too
<whitequark>
gem ansi is okay for this
francisfish has joined #ruby-lang
jxie has joined #ruby-lang
<ggreer>
I used a lead-acid battery and got about 24 hours out of it. the main problem is that I couldn't integrate it with the beagleboard. I couldn't tell how much battery was left without checking a multimeter
<anannie>
Ah I didn't realise I could do that (and that was what I was searching for) rue!
<ggreer>
consumption was 1-2 watts but that was without a screen
<ggreer>
most of that 1-2 watts was probably the usb wifi card
karasawa has quit [Read error: Connection reset by peer]
<whitequark>
might've been
<whitequark>
vendors often skip implementing sleep modes properly, and this sucks
<peterhellberg>
anannie: Are you currently using the print "\e[2J\e[f" hack to clear the screen?
<ggreer>
oh yeah. that was another thing. by default it ran at 1.2Ghz no matter what
<anannie>
peterhellberg: Oh wow, how did you make that? Can you take input while it's running?
<anannie>
peterhellberg: Yes
<ggreer>
I forget howI managed to get cpufreq working
<ggreer>
*how
<whitequark>
ggreer: well, if there's working cpuidle you might even not need cpufreq
<whitequark>
unless you do long computations
<ggreer>
it wasn't working. once I got cpufreq working the board ran much cooler
<peterhellberg>
anannie: Same here :) And no, it was just a simple GoL implementation that I used to se how well the terminal could write emoji (Also calling GC.disable)
<anannie>
peterhellberg: Well I want to refine it and turn it into a terminal application or any other application with proper IO
<anannie>
I plan on using Gosper's HashLife algorithm and making it much more refined so that you can explore GoL
<peterhellberg>
anannie: Neat :) Do you have any thoughts on how to actually perform the input?
<anannie>
I'll randomly seed it, or pick up patterns from file and allow them to embed it in
<anannie>
It's more interesting to seed the world randomly and then see how life evolves from that point
<anannie>
I'll also experiment with doing a floating point based life and zooming out the terminal until it becomes more apparent.... (if that is indeed possible at all)
<whitequark>
anannie: floating point based life sounds like a cool idea
<whitequark>
through I'm afraid you'll hit some performance problems there
<anannie>
whitequark: How so? It's just the same evaluation scheme, the ranges are just more diverse because the numbers aren't integers
<whitequark>
anannie: integers are discrete, floats form a continuum
<whitequark>
to check neighbors in integer, you need to perform 9 operations, that's O(1)
<anannie>
whitequark: Well if you're doing a check of the sort if x > 3.2 && x <4.5 then true
<peterhellberg>
anannie: Something like SmoothLife/SmoothLifeL?
<anannie>
peterhellberg: Yes
<whitequark>
to check neighbors in floats, you need to check if the point falls inside a range, that's O(n) for n=count of points
<peterhellberg>
anannie: Cool, but probably easier in a framebuffer rather than a character display/terminal
<anannie>
whitequark: Ah I see. I didn't realise that. I thought the range checking was a heuristic
* anannie
googles framebuffer
voker57 has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
<peterhellberg>
anannie: Eg: "surface where you can draw pixels"
<whitequark>
anannie: framebuffer is basically a rectangle with pixels where you can draw anything you want
<anannie>
Ah I see... I don't know much about programming peterhellberg
<whitequark>
anannie: check out ruby sdl bindings for that, they're pretty simple
<peterhellberg>
anannie: You’ll get there :)
<anannie>
Thanks peterhellberg
<peterhellberg>
Well, time for lunch here in Stockholm
<judofyr>
peterhellberg: I hope it's soon lunch here in Oslo too
<anannie>
whitequark: I thought it checked up to X binary digits and then stopped, making it the same as an integer, but I guess it must be actually quite harder as it doesn't have discrete states
<anannie>
peterhellberg: Have a nice one!
dhruvasagar has quit [Ping timeout: 252 seconds]
<whitequark>
anannie: of course not
<whitequark>
comparing two floating point values is an operation similar to comparing two integer ones
<whitequark>
you see, basically you have an array of points with coordinates, whether that's integers or floats
<whitequark>
but in case of integers, you can make a nice and powerful optimization: store them in a 2-dimensional array with indexes identical to coordinates
leopard_me has quit [Quit: Computer has gone to sleep.]
<whitequark>
with floats, you don't have such an option
dhruvasagar has joined #ruby-lang
<whitequark>
anannie: besides, all binary digits are compared in parallel. it would be no good if 10<10 and 0.01<0.01 took different time to finish :)
dankest has quit [Quit: Leaving...]
<anannie>
I'm sorry if I'm being thick over here, but does this not contradict what you said about an O(n) run time for comparisons in a float based system?
<whitequark>
anannie: a single integer and floating point comparison take roughly the same time on your PC
<whitequark>
the O(n) complexity is for searching neighbors
leopard_me has joined #ruby-lang
zmack has quit [Remote host closed the connection]
<anannie>
whitequark: Ah but a floating point GoL implementation would basically be stored in an array except that the values of individual cells are floats and are somewhere between the state of being alive and dead (at least that's how I envision mine)
<anannie>
whitequark: So searching for neighbours should still be a trivial process, unless you turn it into a circle or something
karasawa has joined #ruby-lang
<whitequark>
anannie: ahhh, so that's not like SmoothLife
<whitequark>
well yeah, that's much simpler
<anannie>
whitequark: Yeah.
dhruvasagar has quit [Ping timeout: 240 seconds]
GarethAdams has joined #ruby-lang
leopard_me has quit [Quit: Computer has gone to sleep.]
krohrbaugh1 has joined #ruby-lang
<charliesome>
whitequark: i have an idea to bounce off you
blacktul_ has joined #ruby-lang
<whitequark>
charliesome: shoot
blacktulip has quit [Ping timeout: 248 seconds]
<charliesome>
how feasible do you think it would be to modify ruby so that all global variables were actually thread locals
<charliesome>
as in, global variables on the c level
<charliesome>
so you could host multiple ruby vms in one process
karasawa has quit [Quit: Lost terminal]
<judofyr>
charliesome: all constants need to be per VM too, right?
krohrbaugh has quit [Ping timeout: 252 seconds]
<charliesome>
oh yeah fuck
<charliesome>
that throws a spanner in the works
<charliesome>
i guess there would be no point hosting multiple vms in a process then because you couldn't share memory...
<whitequark>
charliesome: correct
karasawa has joined #ruby-lang
karasawa has quit [Client Quit]
<whitequark>
multivm was actually considered by ruby-core folks
<whitequark>
but ruby uses C globals all over the place
<charliesome>
and they decided it was not worth it?
<whitequark>
yes, the changes would be very extensive
<whitequark>
and the benefit is not immediately clear, especially for *nix
<charliesome>
yeah
<charliesome>
it helps for ruby embedders
karasawa has joined #ruby-lang
<whitequark>
charliesome: embedding ruby is already ugh
<whitequark>
it does weird shit with stack, for example
<whitequark>
and threads. and signals
<charliesome>
mruby looks cool but it's annoying that it isn't full ruby
<whitequark>
you don't really *want* to embed full ruby
<charliesome>
how come?
<whitequark>
stuff like ARGV makes no sense, to begin with
<judofyr>
whitequark: btw, have you heard about Cheney on the M.T.A?
<whitequark>
charliesome: you don't do these kinds of checks, you check for nil || false
<whitequark>
being purely arithmetic that is somewhat faster
<whitequark>
one and, one branch
<whitequark>
zero memory accesses
<charliesome>
hm
<charliesome>
is it really so significant?
larrylv has quit [Ping timeout: 272 seconds]
<whitequark>
there is a whole lot of these checks, so maybe. but the real reason is elisp heritage.
<whitequark>
charliesome: besides, if you have tagged numbers you do need to have those checks anyway
<whitequark>
might as well just add true/false/nil to the mix
<whitequark>
judofyr: btw, why did you suddenly decide to show the Charlie on M.T.A article to me?
<whitequark>
*Cheney
<charliesome>
lol
<judofyr>
whitequark: I just recently discovered it. seemed like a neat trick (although I'm not sure if it's any use for you now)
richardburton1 has quit [Quit: Leaving.]
<whitequark>
judofyr: the trick indeed is, the article I've read some time ago
<whitequark>
I'm extending the trick somewhat through
<anannie>
rue: I went through the search results and there doesn't seem to be a gem that does the type of terminal UI I want other than ncurses and ncursesw. Both are too advanced for me... Maybe I should look at some other form of display? I would really appreciate it if you could provide any suggestions
<whitequark>
judofyr: I've no idea what he meant by "CONS Should Not CONS Its Arguments", through
<whitequark>
that reference is completely opaque to me
<apeiros_>
andrewvos: you're not natively german speaking?
anannie has quit [Remote host closed the connection]
lele|w has joined #ruby-lang
rsl has joined #ruby-lang
<andrewvos>
apeiros_: Not that I'm aware of.
<andrewvos>
apeiros_: Why do you ask?
<apeiros_>
because my only suggestion is german only :)
sepp2k has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
francisfish has joined #ruby-lang
<andrewvos>
apeiros_: You wanted to suggest another book?
Haribhau has joined #ruby-lang
<apeiros_>
yes
<andrewvos>
What is everone using for git push.default?
<apeiros_>
the default
<apeiros_>
I think
<andrewvos>
apeiros_: Oh okay. No I can understand Afrikaans, but that's about as close as I get to German.
<apeiros_>
:D
<andrewvos>
apeiros_: push.default behaviour is changing in 2.0 though, and was wondering what everyone thinks about a sane default.
<andrewvos>
"nothing" might be the best :/
meatballhat has quit [Ping timeout: 240 seconds]
<judofyr>
andrewvos: I use upstream
<Haribhau>
hi Guys- I need help. I am trying to install ruby-oci8 gem wth ruby 1.9.3. It install gem successfully but when say require 'oci8' it gives OCIError: OCI Library Initialization Error
<andrewvos>
judofyr: How is that different from "current"?
<judofyr>
andrewvos: don't remember now
<andrewvos>
haribhau: You probably need to install Oracle?
<Haribhau>
I have instant client
<apeiros_>
aahahaha, oracle… have fun haribhau
<Haribhau>
on solaris
solars has quit [Ping timeout: 240 seconds]
<Haribhau>
I am trying to solve this problem since 3 days but no luck
<andrewvos>
haribhau: Installed on the same machine you're trying to require ruby-oci8?
<apeiros_>
(sorry, if I had useful help, I'd provide it - I just happen to know that oracle client is a bitch, at least on osx)
<Haribhau>
yes
<andrewvos>
haribhau: Okay, well I'm no expert. Can't help you sorry.
<Haribhau>
ok
<apeiros_>
haribhau: one bit of advise, though - make sure you follow the directions on the ruby-oci8 website by the letter
<Haribhau>
any pointer would have been helpful though
<Haribhau>
I tried all
Future[Chimp] has quit [Quit: This computer has gone to sleep]
<apeiros_>
the last times I had trouble with oci8, it was either one of two reasons: a) I failed to follow it correctly, or b) oracle simply didn't support what I did (like osx 10.8…)
<Haribhau>
ok. could that be any of the missing libarary in instant client
<Haribhau>
?
<apeiros_>
no idea
<Haribhau>
ok
goshakkk has quit [Quit: Computer has gone to sleep.]
dc5ala has quit [Quit: Ex-Chat]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
solars has joined #ruby-lang
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
davidbalber|away is now known as davidbalbert
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
goshakkk has joined #ruby-lang
rcvalle has joined #ruby-lang
workmad3 has joined #ruby-lang
marr has quit [Ping timeout: 255 seconds]
jxie has joined #ruby-lang
meatballhat has joined #ruby-lang
meatballhat has quit [Changing host]
meatballhat has joined #ruby-lang
havenn has joined #ruby-lang
havenn has quit [Remote host closed the connection]
amaya_the has quit [Ping timeout: 240 seconds]
imajes has quit [Excess Flood]
krohrbaugh1 has quit [Ping timeout: 252 seconds]
krohrbaugh has joined #ruby-lang
krohrbaugh has quit [Client Quit]
meatballhat has quit [Ping timeout: 255 seconds]
francisfish has quit [Ping timeout: 265 seconds]
imajes has joined #ruby-lang
francisfish has joined #ruby-lang
krohrbaugh has joined #ruby-lang
jxie has quit [Quit: leaving]
slyphon has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
meatballhat has joined #ruby-lang
meatballhat has quit [Changing host]
meatballhat has joined #ruby-lang
dhruvasagar has joined #ruby-lang
breakingthings has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
slyphon has joined #ruby-lang
sailias has joined #ruby-lang
sailias has quit [Client Quit]
postmodern has quit [Quit: Leaving]
meatballhat has quit [Ping timeout: 240 seconds]
francisfish has quit [Ping timeout: 264 seconds]
Uranio has joined #ruby-lang
francisfish has joined #ruby-lang
workmad3 has quit [Read error: Operation timed out]
jtoy has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
marr has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
davidbalbert is now known as davidbalber|away
slyphon has joined #ruby-lang
unlikely_monkey has joined #ruby-lang
mytrile has joined #ruby-lang
sailias has joined #ruby-lang
blacktul_ has left #ruby-lang [#ruby-lang]
blacktulip has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
slyphon has quit [Ping timeout: 245 seconds]
karasawa has joined #ruby-lang
outoftime has joined #ruby-lang
gja has quit [Quit: This computer has gone to sleep]
peterhellberg has left #ruby-lang [#ruby-lang]
megharsh has quit [Quit: WeeChat 0.3.9.2]
krohrbaugh has joined #ruby-lang
larrylv_ has quit [Remote host closed the connection]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
jxie has joined #ruby-lang
thone_ has joined #ruby-lang
davidbalber|away is now known as davidbalbert
unlikely_monkey has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
mpan has joined #ruby-lang
havenn has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
havenn has quit [Read error: No route to host]
havenn has joined #ruby-lang
hahuang65 has joined #ruby-lang
blahwoop has joined #ruby-lang
srbaker has joined #ruby-lang
srbaker has quit [Client Quit]
jonahR has joined #ruby-lang
mercwithamouth has joined #ruby-lang
breakingthings has joined #ruby-lang
gregmore_ has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 252 seconds]
drbrain has quit [Read error: Connection reset by peer]
gregmoreno has joined #ruby-lang
jammi has joined #ruby-lang
drbrain has joined #ruby-lang
stonerfish has quit [Quit: Leaving.]
<dRbiG>
is there a way to have a per-thread stdin, stdout and stderr?
vlad_starkov has quit [Remote host closed the connection]
stonerfish has joined #ruby-lang
<dRbiG>
hmm, or I'll try forking first
jtoy has quit [Ping timeout: 265 seconds]
<drbrain>
dRbiG: there isn't, but you can have per-thread IO objects
schaerli has quit [Remote host closed the connection]
Spaceghostc2c has quit [Excess Flood]
sepp2k has joined #ruby-lang
Spaceghostc2c has joined #ruby-lang
elux has quit [Quit: Bye!]
dvorak has quit [Remote host closed the connection]
davidbalber|away is now known as davidbalbert
kentos has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 276 seconds]
jtoy has joined #ruby-lang
llaskin1 has joined #ruby-lang
wallerdev has joined #ruby-lang
llaskin1 has quit [Changing host]
llaskin1 has joined #ruby-lang
llaskin1 is now known as llaskin
<llaskin>
so I run the following command a = system "ssh SERVER \"svn info /svn/ |grep '^URL:' | sed -e 's/^URL: //'\"" how can I get a to be equal to the URL, and not to "true"?
dvorak has joined #ruby-lang
Will has joined #ruby-lang
Will is now known as Guest69771
jonahR has quit [Quit: jonahR]
jonahR has joined #ruby-lang
<Smol>
use backticks
srbaker has joined #ruby-lang
<Smol>
a = `ssh ...`
<llaskin>
aha backticks
<llaskin>
ty
<Smol>
also look at the Process module if you need anything fancier
dvorak has quit [Quit: leaving]
enebo has joined #ruby-lang
dvorak has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
drbrain has quit [Remote host closed the connection]
drbrain has joined #ruby-lang
drbrain has quit [Ping timeout: 276 seconds]
tonni has joined #ruby-lang
mutenewt has joined #ruby-lang
karasawa has joined #ruby-lang
scampbell has joined #ruby-lang
scampbell has quit [Max SendQ exceeded]
scampbell has joined #ruby-lang
karasawa has quit [Ping timeout: 260 seconds]
dvorak has quit [Remote host closed the connection]
Gues_____ has joined #ruby-lang
ebouchut has joined #ruby-lang
zmack has joined #ruby-lang
setmeaway has quit [Quit: Leaving]
dvorak has joined #ruby-lang
Gues_____ has quit [Read error: Connection reset by peer]
zmack has quit [Remote host closed the connection]
<dRbiG>
zzak: the master/slave distinction is unclear in practice, i found i need to reopen std* as one, and do IO.select on the other to get any data flowing - which i chose for which doesn't matter
<injekt>
I really need to get around to 1.0 of Chronic...
<injekt>
blah
outoftime has quit [Remote host closed the connection]
outoftime has joined #ruby-lang
<dRbiG>
zzak: now i'm trying to figure out how to actually setup the pty so that when you telnet in you get a terminal and not a raw line-mode (i'm thinking i need to output some magic to the telnet to let it know i'm a terminal)
diegoviola has joined #ruby-lang
benanne has joined #ruby-lang
<blazes816>
like I said, not sure of the specifics on how it works, but Chronic.parse('12 months from now') != Time.now + (30 * 24 * 60 * 60 * 12)
<hagabaka>
is it more correct if you let Chronic figure out what "12 months" means, instead of specifying yourself what it means?
mjio has joined #ruby-lang
<blazes816>
hagabaka: if 'specifying yourself' means writing code that correctly handles all of the intricacies of time manipulation then no
<blazes816>
or does so better than chronic, I should say
Guest has joined #ruby-lang
atmosx has joined #ruby-lang
<atmosx>
hello
dankest|away is now known as dankest
<injekt>
hallo
<hagabaka>
"month" is a vague term, and that's what makes chronic's definition different, not "intricacies of time manipulation"
<injekt>
Chronic relies on the user to specify extra information when it calculates month information, it's a hard thing to figure out
<hagabaka>
it doesn't seem to offer a way to calculate "3 months from x" instead of "from now" anyway, and I wonder what it would do with "3 months from november 30"
srbaker has joined #ruby-lang
<blazes816>
it does offer that
jbsan has joined #ruby-lang
<injekt>
yeah that'll parse
<hagabaka>
how, and what's the result?
<injekt>
it calculates the months as a set unit, so probably february 2nd or 3rd
<hagabaka>
oh 2014-02-02 06:00:00 -0500
<injekt>
:)
<blazes816>
hagabaka: Chronic.parse('3 months from now', :now => Chronic.parse('november 30'))
<hagabaka>
so, 3 months from november 30 is exactly the same as 3 months from november 1
<blazes816>
2014-02-28 12:00:00 -0800
lightcap has joined #ruby-lang
<injekt>
hagabaka: right, chronic expects you to be more specific
<hagabaka>
well we must have different versions of the gem
krohrbaugh has quit [Quit: Leaving.]
<injekt>
mine is the same as your ouptput
<hagabaka>
but my point stands, it's a matter of definition, as opposed to correctness
<injekt>
output*
<blazes816>
definition of what?
<hagabaka>
definition of "WTF do you mean by 3 months, every month has a different length"
<injekt>
hagabaka: if I asked you "3 months from the 30th of november" you would reply "30th of february?"?
mercwithamouth has joined #ruby-lang
<blazes816>
yes. an my point this entire time, is that it's easier to use chronic, which handles that shit already, instead of doing it yourself
<hagabaka>
I wouldn't, but I don't think there is one single correct answer for that
<injekt>
exactly
<hagabaka>
so I would say adding 90 days is perfectly acceptable
<blazes816>
that depends on if you need your data to be accurate or not
<blazes816>
when I'm writing software that bills people monthly, I don't just call every 30 days good
<hagabaka>
my point is that if you don't need the natural language parsing which is the focus of chronic, then it's better to just roll your own simplistic solution
<hagabaka>
how can you say chronic is accurate when you don't even know how it handles this?
<blazes816>
good call
<blazes816>
hagabaka: because I use it often
<hagabaka>
heh
<blazes816>
and every time I do it's correct
<hagabaka>
guess what chronic uses? Date.time and addition of numbers
<hagabaka>
*DateTime
<blazes816>
yes. and it does so correctly. guess what rails uses? strings and symbols and shit. why would you not just write your own http parser and stuff?
jbsan has quit [Quit: jbsan]
<blazes816>
because somebody already did and many people use it and iron out the kinks and bugs
goshakkk has quit [Quit: Computer has gone to sleep.]
jonahR has joined #ruby-lang
<khaase>
injekt: you around?
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
<khaase>
injekt: you still using slop?
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
cirenyc has quit [Quit: Leaving...]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
jonahR has quit [Client Quit]
goshakkk has joined #ruby-lang
goshakkk has quit [Excess Flood]
<injekt>
khaase: just saw your email, yeah the commands need a lot of work, they were broken in 2 and lack a lot of features (plus a sane api) in 3. I haven't really had the need to use them but i do want to improve them some time