<shevy>
yeah if I could find out where smokeqtopengl is
<advorak>
hi there - let's say I have created a few classes: One, One::Two, and One::Two::Three; From within class One::Two::Three, how can I refer to One::Two?
mcclurmc has quit [Ping timeout: 252 seconds]
<shevy>
advorak often you can try leading :: such as ::One::Two
<zenspider>
shevy: a method?
bruno-_ has quit [Ping timeout: 276 seconds]
<shevy>
moment... need to find out what smokeqtopengl is
robustus|Off has joined #ruby
<zenspider>
advorak: depending on the code structure (nesting vs not) you can just refer to `Two` or `One::Two`. You almost never need a leading "::" unless you're shadowing something
robustus|Off is now known as robustus
<zenspider>
shevy: sorry. looks like it is a lib based on your error above?
<zenspider>
cannot find -lsmokeqtopengl ?
failshell has joined #ruby
<volty>
what advorak means by «refer»?
bjornar has quit [Ping timeout: 265 seconds]
<zenspider>
volty: refer: verb: mention or allude to
<volty>
you cannot access the instance variables, for example
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
<zenspider>
shevy: should be libsmokeqtopengl* somewhere in your lib path
<zenspider>
volty: since when can you not access instance variables?
Rollabunna has joined #ruby
oo_ has joined #ruby
<zenspider>
pretty sure it was obvious he was referring to constants just by the scoping and casing
<advorak>
shevy, Thank you. I am actually realizing that I need to play with my code a little more, as I'm realizing that I probably don't want to do what I was thinking I wanted to do :-)
<shevy>
zenspider btw could debride be coupled with rubocop? e. g. when one would want to run a larger analysis of ruby code
bmurt has joined #ruby
<volty>
zenspider: it was not obvious to me :)
scottstamp has quit [Ping timeout: 265 seconds]
<volty>
(and that's why I just asked)
scottstamp has joined #ruby
bjornar has joined #ruby
<zenspider>
shevy: don't see why not, but they're very different beasts. I think you'd want to look at them at different times
failshell has quit [Ping timeout: 240 seconds]
Spami has quit [Quit: This computer has gone to sleep]
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
apoplexy has quit [Ping timeout: 256 seconds]
Marsupermammal has joined #ruby
hyperjuice has quit [Ping timeout: 276 seconds]
michaeldeol has joined #ruby
konieczkow has joined #ruby
Limix has quit [Quit: Limix]
freerobby has quit [Quit: Leaving.]
<El3ktra>
So, I want to show the "many" side of a relationship as a comma-deliminated list. I do this using: movie.keywords.map(&:name).join(",")
ayonkhan has joined #ruby
weszlem has quit [Ping timeout: 256 seconds]
<El3ktra>
It works well, but I have another object that has a name that I compile in the method file. (The name has a firstname and lastname, and I have a methid that returns a string of the two names combined)
<El3ktra>
the problem is that map doesn't work with fields that aren't fields in the database
<El3ktra>
sorry if I am not explaining this well
Marsupermammal has quit [Client Quit]
mrmargolis has quit [Remote host closed the connection]
<Aeyrix>
You're not, honestly.
<Aeyrix>
Firstly, this sounds like a Rails issue, yeah?
<Aeyrix>
Secondly, am I understanding this right? :
<El3ktra>
yes, a rails issue. Is there a better room?
<Aeyrix>
#RubyonRails
<starfox_sf>
I have been working on a toy web crawler with ruby and I am looking to make it multi-threaded. I have played with threads a few times using ruby. Are there any good resources/tutorials/gems I should look into for using threads in this project?
jenrzzz has joined #ruby
CustosLimen has quit [Max SendQ exceeded]
FernandoBasso has quit [Quit: WeeChat 1.2]
bkxd has joined #ruby
Musashi007 has quit [Quit: Musashi007]
CustosLimen has joined #ruby
mleung has joined #ruby
advorak has quit [Quit: This computer has gone to sleep]
<zenspider>
El3ktra: "map doesn't work with fields that aren't fields in the database" ... map is just a method. It does what you tell it to do
bmurt has quit []
Dreamer3 has joined #ruby
simplyianm has quit [Remote host closed the connection]
charliesome has joined #ruby
mleung has quit [Client Quit]
Cache_Money has joined #ruby
michael_mbp has quit [Excess Flood]
chouhoulis has joined #ruby
workmad3 has joined #ruby
mrmargolis has joined #ruby
michael_mbp has joined #ruby
simplyianm has joined #ruby
sdothum has quit [Ping timeout: 256 seconds]
<volty>
Ruby is just a lang. It does what you tell it to do. Pretty clear. Clearer than the thorns of a cactus. :)
chouhoulis has quit [Ping timeout: 245 seconds]
pontiki has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
<volty>
I guess that Python community has less pedantic and more friendly people (though the difference is not so big, plenty of nice ruby ppl around)
simplyianm has quit [Ping timeout: 246 seconds]
<pontiki>
:'(
<noethics>
as a pedant and a pythonist i resent that
bronson has joined #ruby
<volty>
that's why are you here :)
<volty>
(joking, of course)
<weaksauce>
noethics get out there and pedant
bronson has quit [Remote host closed the connection]
centrx has joined #ruby
<noethics>
one does not simply pedant
<noethics>
it comes naturally in any conversation
<weaksauce>
volty ruby has many ways of doing things. python tries to have one path so it either works or it doesn't
<volty>
haskellers are quite pedant, but they are at the same time very very friendly — at the end you get nothing (in code), but remain pleased :)
<Aeyrix>
Lol haskell
<Aeyrix>
also python
<Aeyrix>
>base a language syntax off whitespace
<Aeyrix>
how did it succeed as much as it did
<noethics>
pedant is a noun, you just used it as an adjective. i believe the word you were looking for was pedantic
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<toretore>
lol
<volty>
weaksauce: the mine are about ppl, not about the langs. I already know (and agree about) the diffs
weemsledeux has joined #ruby
nofxx has quit [Remote host closed the connection]
<noethics>
actually i dislike using python
<noethics>
ruby is nicer to use but i can never find an excuse to use it
ta has joined #ruby
millerti has joined #ruby
lapidary has joined #ruby
<noethics>
Aeyrix, you still off the dota 2 m9
<noethics>
did you see the update
<eam>
I mean, ruby has whitespace significance too
<eam>
it's what people like
<shevy>
ruby may warn when the indent is not propr, e. g. "wrong 'end' indent" or something like that
<noethics>
i guess there's only so much of peruvian-american servers one can take
<Aeyrix>
HoTS has Aussie servs.
<noethics>
i remember trenching it up and my whole team and everyone on the other team were peruvian
<Aeyrix>
kek
<noethics>
im like m9 i thought i was on an american server
<weaksauce>
volty now you are being pedantic :P
<Aeyrix>
noethics: The problem is
RegulationD has joined #ruby
<Aeyrix>
the "foreign" servers are sparsely populated
<weaksauce>
but my point stands that python leave less room for pedantry
<Aeyrix>
So those individuals shift across to the English speaking servers for faster queue times.
<weaksauce>
same with go
<noethics>
less room for pedantry
peteykun has joined #ruby
<shevy>
python educates well-behaving citizens
ta has quit [Ping timeout: 276 seconds]
<noethics>
true Aeyrix
mdz_ has joined #ruby
<Aeyrix>
Ox0dea: half time
<Aeyrix>
50 : 51
<Aeyrix>
oh baby
<volty>
weaksauce: not at all, au contraire — i want to be able to put it all in a single method, and maybe later break / refactor it — the dirty approach, opposite of pedantic
<noethics>
i do that when i have no idea what im doing sometimes
<noethics>
300 lines of code in 1 method then refactor it
longfeet has joined #ruby
<volty>
it all depends on what are you doing
<weaksauce>
volty I didn't read what you said after you addressed me
<noethics>
no one was the wiser
<weaksauce>
I was talking about the lang vs. people comment
<weaksauce>
and for the record I like python
<noethics>
you know what i think
<volty>
ah, ok, @ weaksauce
<noethics>
people are equally dumb in all languages except functional languages
<noethics>
like the law of large numbers or some shit
<volty>
ah ah
<weaksauce>
> people are equally dumb in all languages except functional languages
<weaksauce>
and then they are not productive <3 noethics
<Aeyrix>
Functional languages are pretty awesome because they're mathematically provable.
<Aeyrix>
But they're also really complex because of it.
<volty>
the smart functional with no fruits
bruno- has joined #ruby
CloCkWeRX has left #ruby [#ruby]
<Aeyrix>
The XKCD comic says it best:
<noethics>
weaksauce, idk if thats a bait
<noethics>
i think it is
<weaksauce>
really though. as long as it's not javascript I am ok
<weaksauce>
it's bait noethics... monad your way out of a paperbag and then yell at me on irc
<noethics>
wanna fight
RegulationD has quit [Ping timeout: 265 seconds]
mcclurmc_ has quit [Read error: Connection reset by peer]
<weaksauce>
I don't know how you can find me with the paper bag still blocking your vision :P
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
mdz_ has quit [Ping timeout: 252 seconds]
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
<volty>
the smarties, terrible, posing all the time. hours on composing something cryptic, then hours to show that unintelligible masterpiece to others
senayar has joined #ruby
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
<noethics>
volty, you're at least 40 years old right
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
<volty>
I remember when I was reading (around, internet), about monads. Awful. The art of over-complicating simple concepts.
<volty>
noethics: :)
<noethics>
i can tell
<noethics>
you're likely ~49-55
<noethics>
male, have worked the same asp.net job for ~20 years
Agoldfish378 has quit [Quit: G'Bye]
DynamicMetaFlow has joined #ruby
<noethics>
etc
DynamicMetaFlow has quit [Max SendQ exceeded]
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
bruno- has quit [Ping timeout: 256 seconds]
x0f has joined #ruby
<volty>
while you were jumping from «goto» to «case»
<volty>
that doc is pretty long, where's the point of your concern ?
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
tkuchiki has joined #ruby
<weaksauce>
haha. talking of bait noethics
DynamicMetaFlow has joined #ruby
skippy_77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DynamicMetaFlow has quit [Max SendQ exceeded]
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
mdz_ has joined #ruby
<weaksauce>
some of us don't want to learn the lang du jour just to learn someting new
<weaksauce>
something*
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
<noethics>
nah im not some language hipster :D
DynamicMetaFlow has joined #ruby
<noethics>
i don't actually care what you use
<noethics>
or what anyone uses
<noethics>
unless it's java
<noethics>
jk i love java
<Aeyrix>
Ffs
<Aeyrix>
I'm not gonna get any work done today
<Aeyrix>
because of this finals
<weaksauce>
now I know you are trolling... no one loves java noethics
<volty>
I was really impressed by haskell. And I lost time to understand that it heads towards void. But now have to do (just to do, not really learn) with java
<noethics>
weaksauce, i do
<noethics>
legitimately
<Aeyrix>
volty: The haskell website looks like a Silicon Valley startup.
<volty>
I agree with weaksauce
<weaksauce>
it was built by people that didn't want to trust people
oo_ has quit [Remote host closed the connection]
<noethics>
java is basically the language everyone wants but no one wants to admit they want
<weaksauce>
c# is actually an excellent language
<volty>
working with java, after c++, is like making love with a woman without hole
<weaksauce>
a little verbose but gets right what java gets really wrong.
<weaksauce>
which one is that Aeyrix the newline with only a { on it?
lapidary has left #ruby [#ruby]
<weaksauce>
actually, swift is really interesting. seems like it took a lot of the good things from ruby
<Aeyrix>
weaksauce: Yes.
Xiti has joined #ruby
<weaksauce>
yeah that's gross Aeyrix
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<noethics>
swift looks like junk
<noethics>
it's unoriginal
Rickmasta has joined #ruby
<noethics>
the only good thing about it is that it's open source
<weaksauce>
well it's not either of those things.
<weaksauce>
it will be os some time later. probably
<noethics>
it's going to be opoen source
fujimura has joined #ruby
<volty>
I would just appreciate ruby written in c++ - so that it can be linked "naturally" with qt
<noethics>
weaksauce, at the end of 2015
<noethics>
it was announced like 3 days ago, jesus, are you not up to date
<noethics>
thought you were a hipster
<weaksauce>
so was the facetime protocol noethics
<weaksauce>
unless it's out there it's not there
<weaksauce>
that was promised on a big stage as well
<noethics>
that guy with cancer died though
<noethics>
things change
slawrence00 has quit [Ping timeout: 246 seconds]
<weaksauce>
I think hipsters are weak for the most part. it's a lot harder to say "yeah I like this" than it is to say everything sucks
<noethics>
i dont think im a hipster
<noethics>
if thats what youre implying
<noethics>
hipsters dont like java
<noethics>
plus, swift actually does suck
<weaksauce>
i'm not
<weaksauce>
unlike you I am not presuming anything about you
<noethics>
what am i presuming about me
<weaksauce>
> thought you were a hipster
<weaksauce>
that's a presumption about me.
<noethics>
that was a joke
<noethics>
calm down
<volty>
hipster once, hipster forever :)
<weaksauce>
:)
<dorei>
rails will hipsterize you, beware :D
<volty>
just like hippies, counter-culture conformists
<weaksauce>
shit. I drank that koolaide a while ago
<noethics>
people still use rails?
<noethics>
i thought everyone moved to nodejs
<dorei>
nodejs or iojs? :p
<weaksauce>
node people just love to hate themselves
<noethics>
oh right iojs
jhooker has joined #ruby
<centrx>
nodejs is so silly
<noethics>
i love me some react+angular+nodejs action
<noethics>
know what i mean
<noethics>
iojs*
<centrx>
even the faddish hipsters have moved onto Goo etc.
dopie has joined #ruby
<noethics>
whats goo
<weaksauce>
if javascript was the pinnacle of language design then why did the creator purposely name it after the language du jour in order to gain marketshare?
<volty>
the java family is killing the intelligence and the fantasy
<dorei>
weaksauce: javascript is the pinnacle of backward compatible stupidity :D
oo_ has joined #ruby
zotherstupidguy has quit [Ping timeout: 244 seconds]
<noethics>
idk i have it from good authority from ##javascript that js is the future and people who aren't on board are gonna get left behind
<volty>
ho ho
<weaksauce>
if you take out backward compatible i'd agree dorei
<weaksauce>
;)
<noethics>
plus they said ruby is going to get outclassed by ecma6
<volty>
ho, ho, we have fjiyama and his "the end of history" here :)
datanoise has joined #ruby
zotherstupidguy has joined #ruby
<weaksauce>
javascript is the way forward if you are looking to leak memory in a closure
<volty>
now that microsoft has nokia, they should rewrite ruby in c++, pack it with qt, and you'll see the breeze of fast app dev
<dorei>
weaksauce: i'm pretty sure there 'll be someone that will add more memory to the cluster :D
<noethics>
mm i love me some clojure
drocsid has joined #ruby
<noethics>
you guys ever heard of clojure
perturbation has joined #ruby
<volty>
i just read something
arescorpio has joined #ruby
<volty>
another one of «functional» — much of a muchness
<volty>
no, confused
Ox0dea has left #ruby ["WeeChat 1.3-dev"]
<volty>
«immutable data structures» — shot 'u, with «purity»
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<noethics>
what even is state
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* noethics
headswipes
bogdanteleaga has quit [Ping timeout: 240 seconds]
<volty>
gn
volty has quit [Quit: Konversation terminated!]
JDiPierro has quit [Remote host closed the connection]
darkf has joined #ruby
<shevy>
well
<shevy>
javascript is growing
saadq has joined #ruby
<saadq>
Any suggestions on resources for learning Ruby for someone who has some programming experience?
perturbation has quit [Quit: Leaving]
krisquigley has joined #ruby
x0f has quit [Ping timeout: 276 seconds]
<pabs>
saadq: the book "programming ruby" by dave thomas is a pretty good resource
cytoskeletor has joined #ruby
<saadq>
Thanks pabs. Is it plain Ruby or is it for Rails?
<RickHull>
Hi, i'm running into a dependency conflict that I'm wondering if/how I can workaround. specifically i want to use privately authored gem A, which depends on Slop v4. but now I can't use it with chef gem or anything that depends on pry, which mandates slop no higher than 3
qubits has joined #ruby
scripore has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RickHull>
gem A uses slop only for the executable portions, not the lib stuff
<qubits>
Greetings all, I am fairly new to ruby but this little hangup has a several hour job ground to a halt
<qubits>
Bundler::InvalidOption: The gemspec at /var/lib/gems/2.1.0/bundler/gems/snorby_cas_authenticatable-281a58b36368/devise_cas_authenticatable.gemspec is not valid. The validation error was 'duplicate dependency on devise (>= 1.0.6), (>= 0) use: add_runtime_dependency 'devise', '>= 1.0.6', '>= 0'
<shevy>
yeah that sucks RickHull
swgillespie has joined #ruby
<drocsid>
I'm trying to open an external program from ruby using popen3. When I start the program from the command line, I see stuff printed to my terminal. I assume this is stdout. But when I try to print standard out from ruby, I don't see anything: http://pastie.org/10240656 . What do I need to do?
<RickHull>
I'm wondering if there's anythign i can do with gem activation
<shevy>
RickHull you can always open up a gem, modify the .gemspec and get rid of the hardcoded block there
<RickHull>
shevy: or, i'm thinking of undeclaring hte dependency on slop in the gemspec
<shevy>
yes that can also work
<shevy>
and you handle the dependency internally to
Scroff has quit [Ping timeout: 265 seconds]
<RickHull>
well, it does seem stupid for chef to depend on pry as runtime dependency
<RickHull>
i have no idea why they would do that
<shevy>
remember, gem does nothing special; everything is just plain ruby files, and you can always modify these .rb files as well
<shevy>
no idea either
<shevy>
for my gems, I got rid of mandatory versioned-loading
<shevy>
because it kept on blocking me :\
<drocsid>
oh mighty rubyists, do you have any idea on what I'm doing wrong?
<RickHull>
note that i'm using select to decide what has stuff ready for me to read, and then doing read_nonblock
dented42 has joined #ruby
<RickHull>
you probably want to avoid gets outside of interactive input
<RickHull>
shevy: what do you mean "got rid of mandatory versioned-loading"?
simplyianm has quit [Remote host closed the connection]
<drocsid>
RickHull: I will try to modify your example, and see if I have any luck. Thanks.
davedev2_ has joined #ruby
skippy_77 has joined #ruby
<RickHull>
drocsid: you might just copy/paste and see if it works for you
oo_ has quit [Remote host closed the connection]
skippy_77 has quit [Client Quit]
krisquigley has joined #ruby
tsou has joined #ruby
davedev24_ has quit [Ping timeout: 265 seconds]
oo_ has joined #ruby
veinofstars has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang65 has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
Kricir has joined #ruby
skade has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
<drocsid>
RickHull: I tried your example, and the same. Nothing output to the terminal. http://pastie.org/10240671
skade has quit [Client Quit]
simplyianm has joined #ruby
<drocsid>
asking around in #logstash too
<RickHull>
looks like bytes is unset
<RickHull>
also, just try it with `ls` and such first
<RickHull>
you have two simultaneous issues: 1. is my command outputting what i think it is? and 2. is my code doing what i think it is?
Kricir has quit [Ping timeout: 256 seconds]
<RickHull>
try to isolate them and work on them independently
<RickHull>
rather trial and error with 2 unknowns
<RickHull>
*rather than
zotherstupidguy has quit [Quit: WeeChat 1.2]
gianlucadv has joined #ruby
zotherstupidguy has joined #ruby
revath has quit [Ping timeout: 246 seconds]
failshell has joined #ruby
tsou has quit [Quit: off]
datanoise has joined #ruby
mattarse has quit [Ping timeout: 272 seconds]
ogpastaling has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
failshell has quit [Ping timeout: 252 seconds]
x1337807x has joined #ruby
Kricir has joined #ruby
mdz_ has joined #ruby
<drocsid>
RickHull: I tried simpler commands earlier with my example, and it output. I will try to set bytes for your example.
Kricir has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
datanoise has quit [Ping timeout: 256 seconds]
Kricir has quit [Remote host closed the connection]
ogpastaling has quit [Ping timeout: 265 seconds]
Kricir has joined #ruby
Cache_Money has joined #ruby
kies has joined #ruby
mdz_ has quit [Ping timeout: 245 seconds]
arescorpio has quit [Quit: Leaving.]
Channel6 has quit [Quit: Leaving]
Kricir has quit [Read error: Connection reset by peer]
<drocsid>
RickHull: http://pastie.org/10240690, I set bytes. Your example works with ping, but not with this other command
Kricir has joined #ruby
Kricir has quit [Remote host closed the connection]
<drocsid>
similar to the example I presented in the begining
<RickHull>
ok, so you'll have to demonstrate working versus not working
<RickHull>
either show the same command executed both ways, one working one not
<RickHull>
s/either//
<drocsid>
yeah so if you look at the paste above ^^ with the ping command, it works. With the other it doesn't. Maybe it has to do with the command that I'm running
<drocsid>
which looks to be a wrapper starting a ruby process itself
<RickHull>
i don't know what works vs doesn't work means
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RickHull>
you'll literally have to demonstrate the same command "working" one way
<drocsid>
and switch to the other command, the terminal just sits there after execution
swgillespie has joined #ruby
<drocsid>
but when I run the other command from a shell, I see output on the terminal
<drocsid>
anyhow, like I said earlier, maybe it has to do with the command I'm running
weemsledeux has quit [Remote host closed the connection]
<drocsid>
which seems to be a wrapper that launches a ruby program itself
<RickHull>
my last piece of advice:
<RickHull>
1. find a command that "works" on the command line / shell
<RickHull>
execute it, copy the output, paste it to pastebin. demonstrate the working case
<RickHull>
copy the invocation, not just the output
<RickHull>
2. execute it via ruby code, show the invocation and what went into it, and hte output or lack thereof
mrmargolis has quit [Ping timeout: 250 seconds]
ta has quit [Ping timeout: 256 seconds]
<RickHull>
ideally, you would execute #2 via a tiny wrapper script. e.g. #!/usr/bin/env ruby which accepts `cmd` as a cmdline arg, and then executes it, passing through STDERR and STDOUT
<drocsid>
RickHull: I think I know what's going on, and that will take 15 more minutes. I believe I clearly showed you enough above.
<RickHull>
drocsid: you haven't shown a single example of working vs not working
<RickHull>
on a paste link
<drocsid>
I showed you the program I ran, two ways. I pasted the example of it working here. There isn't much to see really
<RickHull>
multiline pastes here are usually ignored
<RickHull>
IRC is a bad medium for reading code and output
<drocsid>
Ok, I will paste this for you, but I think the issue is the program I'm running isn't a simple shell command, and is launching it's own subshells
<RickHull>
the code says, if the process gave me something on stderr, print it on my own stderr
<RickHull>
likewise for stdout
<drocsid>
ok
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
wildroman2 has joined #ruby
<RickHull>
just FYI, I don't want to get into the specifics of whatever command you're running. the logstash thing. but that it was what i'm referencing by `blah_blah_foo_cmd`
<RickHull>
if blah_blah_foo_cmd is misbehaving, ok, take it up with blahblahfoo
<Scub_>
whats the best way to go about printing all of an objects variables?
<RickHull>
but popen3 and this code should be doing the right thing
<RickHull>
Scub_: instance vars?
<Scub_>
I believe - you'll have to forgive my ignorance on jargon
<RickHull>
let's get the question right first
<RickHull>
what is it you want to know?
<RickHull>
any given object is an instance of a class
<RickHull>
and it has some data stored in instance variables
<Scub_>
I would like to obtain the data from all instance variables :D
RegulationD has joined #ruby
j4cknewt has quit [Remote host closed the connection]
<drocsid>
RickHull: Thanks for trying to help
<RickHull>
one way is `pry` purely for exploration
scripore has quit [Quit: This computer has gone to sleep]
<drocsid>
I guess our conclusion is that logstash is misbehaving
<RickHull>
another way is Object#inspect, which usually displays ivar values
<RickHull>
drocsid: yeah, i mean the way to do that is to cut the popen stuff out, and make sure it does what you expect on cmdline
<RickHull>
once it does that, the popen stuff should be transparent
<drocsid>
from my terminal I launch it, and I see the lines pasted
<drocsid>
that I pasted
<drocsid>
from popen, I do not
<RickHull>
from popen's perspective, things are pretty simple
pragmatism has joined #ruby
<Scub_>
RickHull: is there an inline way to drop into pry similar to 'require "debug"'
<RickHull>
your program is either outputting stuff on STDERR, STDOUT, or it is done executing and has yielded a process status
<RickHull>
Scub_: pry is used several ways. 1. as a REPL (like irb)
<RickHull>
2. Pry.binding
Akagi201 has joined #ruby
<RickHull>
for exploring object space, it's a good one in REPL mode
<pontiki>
(binding.pry)
<RickHull>
pontiki: thanks!
<RickHull>
for debugging a particular app, binding.pry (or w/e) is maybe more useful
<pontiki>
(you might guess i use it a *lot*)
RegulationD has quit [Ping timeout: 255 seconds]
HotCoder has quit [Quit: Leaving]
oo_ has quit [Remote host closed the connection]
<RickHull>
drocsid: so if you suspect popen is misbehaving, you should be able to make a sample program that prompts the misbehavior
<RickHull>
e.g. obviously write to STDERR and show that popen isn't recognizing it
<RickHull>
drocsid: myself, i'm pretty sure popen is being transparent, and you're invoking something wrong, or the logstash thing is misbehaving
<pontiki>
that seems highly unliikely
<RickHull>
drocsid: i tried my best to tease that out, but yeah, i'm backing out of this one
<RickHull>
good luck, and let us know if you can trace any misbehavior back to popen
<drocsid>
RickHull: Looks like I'm not patient enough. It launches quick from the terminal, but it takes a few minutes to launch using popen
simplyianm has quit [Remote host closed the connection]
<RickHull>
drocsid: interesting
<drocsid>
RickHull: my bad
<RickHull>
heh, no worries
<RickHull>
there actually may be some issue you can fix
<RickHull>
try the close_write again
<RickHull>
just for troubleshooting / data gathering / behavior observation
<RickHull>
if you don't close_write on the input, it may be blocked waiting for input
<RickHull>
which is why the big stall
<drocsid>
ok, my whole intention is to try to send this process standard in, so I will try that also
<RickHull>
IO is hard, let's go shopping (no joke)
Torrieri has joined #ruby
yeticry has quit [Ping timeout: 255 seconds]
<RickHull>
if you want to try something instead of close_write, you could do e.g. sin.write("hi mom")
<RickHull>
that might actually trigger the process to yield output
<RickHull>
or maybe "hi mom\n"
yeticry has joined #ruby
krz has quit [Read error: Connection reset by peer]
krz has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamninja has joined #ruby
<flughafen>
hey guys
<flughafen>
shevy: certainty
swgillespie has joined #ruby
wildroman2 has quit [Remote host closed the connection]
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
kies has quit [Ping timeout: 252 seconds]
j_mcnall_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mike___1234 has joined #ruby
mike___1234 has quit [Remote host closed the connection]
ta has joined #ruby
patrickanth0ny has joined #ruby
joaomdmoura has joined #ruby
bootstrappm has quit [Remote host closed the connection]
riotjones has joined #ruby
Torrieri has quit [Quit: Be back later ...]
tagrudev has joined #ruby
ta has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby
minmax has joined #ruby
veinofstars has quit [Quit: veinofstars]
mike___1234 has joined #ruby
spider-mario has quit [Ping timeout: 272 seconds]
datanoise has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
MatthewsFace has quit [Remote host closed the connection]
sarlalian has quit [Quit: WeeChat 0.4.2]
pyon is now known as lptm
sarlalian has joined #ruby
MatthewsFace has joined #ruby
Miphix has joined #ruby
failshell has quit [Ping timeout: 245 seconds]
duncannz has joined #ruby
ebbflowgo has quit [Ping timeout: 265 seconds]
Xeago has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
nobitanobi has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
MatthewsFace has quit [Ping timeout: 264 seconds]
hahuang65 has quit [Ping timeout: 264 seconds]
<RickHull>
drocsid: any new findings?
Xeago has quit [Ping timeout: 256 seconds]
hyperjuice has quit [Remote host closed the connection]
Cache_Money has quit [Quit: Cache_Money]
michael_mbp has quit [Excess Flood]
hyperjuice has joined #ruby
hyperjuice has quit [Client Quit]
keen_______ has joined #ruby
ScriptGeek has joined #ruby
vdamewood has joined #ruby
drocsid has quit [Quit: zzZZzz]
keen______ has quit [Ping timeout: 276 seconds]
michael_mbp has joined #ruby
michael_mbp has quit [Excess Flood]
n008f4g_ has joined #ruby
mrmargolis has joined #ruby
michael_mbp has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
revath has quit [Quit: Leaving.]
apoplexy has quit [Ping timeout: 245 seconds]
revath has joined #ruby
francois_ has joined #ruby
mrmargolis has quit [Ping timeout: 252 seconds]
krowv has joined #ruby
francois_ has quit [Ping timeout: 264 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
railsraider has joined #ruby
emilkarl has joined #ruby
skade has joined #ruby
datanoise has quit [Ping timeout: 240 seconds]
<krowv>
Hi channel. I'm trying to learn some ruby gtk programming on Ubuntu. If I apt-get install the ruby-gtk3 package I would expect things to work but they don't. If I do sudo gem install gtk3 things work though. Wondering what the point of the ruby-gtk3 package is though?
<krowv>
I'm using Ubuntu 15.04
Renich has quit [Quit: leaving]
pabloh has quit [Remote host closed the connection]
_ht has joined #ruby
revath has quit [Ping timeout: 265 seconds]
towski_ has joined #ruby
ohaibbq has joined #ruby
wildroman2 has joined #ruby
towski_ has quit [Remote host closed the connection]
<krowv>
ls
bigkevmcd has joined #ruby
armyriad has joined #ruby
aapole has quit [Ping timeout: 272 seconds]
revath has joined #ruby
baweaver has quit [Remote host closed the connection]
workmad3 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
GnuYawk has quit [Ping timeout: 256 seconds]
Rollabunna has joined #ruby
<vdamewood>
krowv: Describing something at not working seldom provides information needed to help. It would probably work better if you described what you tried to do, what you expected, and what happened instead.
Xeago has joined #ruby
codecop has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
<krowv>
vdamewood, ok. I'll try to rephrase
<RickHull>
krowv: sudo vs not has nothing to do with the (remote) package itself
<RickHull>
sudo only affects your local machine and its permissions
<RickHull>
yeah, you gotta show the code, and then the invocation that produces the error
<RickHull>
one or the other on its own isn't enough to troubleshoot
<RickHull>
if you want support from here, use your distro's `ruby` and `gem` at most, and do e.g. `gem update --system` and install gems via gem
<RickHull>
or if you want support from your distro, install all gems via distro pkg mgr
<RickHull>
good luck with distro pkg mgr keeping up with `all gems`
hazelux has quit []
casadei has quit [Remote host closed the connection]
<vdamewood>
Most distros seem to have the 80/20 sebset of gems (or python modules, or CPAN modules, or whatever). The 20% that 80% of people use.
_seanc_ has quit [Quit: _seanc_]
<vdamewood>
sebset --> subset
<RickHull>
vdamewood: which is fine if that's ~all~ you need
<RickHull>
problems happen when 90% of what you want is available at distro
casadei has joined #ruby
<RickHull>
then what do you do for the last 10%
<vdamewood>
Personally, I build ruby from source and install it to /usr/local, then gem install everything.
<shevy>
the problem is that some distributions modify things
<shevy>
like debian + ruby + rubygems
<RickHull>
right, so i would hesitate to advocate for going the distro route
<shevy>
if they would support 100% then people could be sent to #debian or #ubuntu rather than ask here for problems deriving out of those modifications
<RickHull>
as vdamewood seemed to
<vdamewood>
Oh, I'm not advocating either way.
fabrice31 has joined #ruby
<RickHull>
cool, well i agree with your 80/20 statement
<krowv>
Nod. Was just wondering if there was an easy way to stick with just the Ubuntu package. But I'll try and track down the Ubuntu people that put the package together and ask them
<RickHull>
for newbies it can be tough to decide which route to take
<shevy>
yeah
<shevy>
they get present n different options to pick from
Xeago has quit [Read error: Connection reset by peer]
<shevy>
I like that vdamewood compiles from source, I click the like button!
<krowv>
I'm familiar with the ubuntu packaging process so thats my comfort zone. Going "outside" the distro typically scares me.
RegulationD has joined #ruby
<RickHull>
yep, here are 5 critical options. they will affect everything you do from here. please choose 1 wisely
<RickHull>
noob: WTFOMGBBQ
Xeago has joined #ruby
<krowv>
for example, I don't know the "rules" for when gems update, if they would work across different versions of the distributions, etc.
<shevy>
if ubuntu can answer all of that then this is great :)
roolo has joined #ruby
sandstrom has joined #ruby
<RickHull>
krowv: ruby people will say to use rubygems
<RickHull>
debian people will say use dpkg
casadei has quit [Remote host closed the connection]
<RickHull>
ubuntu people will say use
<RickHull>
snappy?
Asher has quit [Remote host closed the connection]
<shevy>
now, for some strange reason, many years ago, I started to keep archives like that locally, in a schemata such as:
railsraider_ has joined #ruby
<shevy>
/Some/Path/LIBX11/libX11-1.6.3.tar.bz2
dumdedum has joined #ruby
<shevy>
but nobody likes upcased directory names right?
terlar has joined #ruby
<shevy>
so two alternatives to that: lowercased directory names; or same-cased directory name. Which one to pursue?
intinig has joined #ruby
lavros has joined #ruby
railsraider has quit [Ping timeout: 252 seconds]
railsraider_ is now known as railsraider
alex88 has joined #ruby
sandstrom has joined #ruby
Xeago has joined #ruby
dhjondoh has joined #ruby
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
datanoise has joined #ruby
Forgetful_Lion has joined #ruby
ndrei has joined #ruby
vdamewood has joined #ruby
revath has quit [Read error: Connection reset by peer]
revath has joined #ruby
gluten_hell_ has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
mattarse has quit [Ping timeout: 255 seconds]
chussenot has joined #ruby
datanoise has quit [Ping timeout: 256 seconds]
sinkensabe has joined #ruby
Xeago has quit [Remote host closed the connection]
bigkevmcd has quit [Read error: Connection reset by peer]
mattarse has joined #ruby
bigkevmcd has joined #ruby
jph98_ has joined #ruby
djbkd has quit []
GPrime has joined #ruby
jph98 has quit [Ping timeout: 264 seconds]
<flughafen>
how was your weekend shevy
<shevy>
I was rewriting a big project
<shevy>
that was not a lot of fun
<shevy>
still have some side effects because of it img.rb:58:in `img': undefined method `name_of_img_dir?' for Bla:Module (NoMethodError)
bronson has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 244 seconds]
krisquigley has joined #ruby
<flughafen>
that's cool
<shevy>
I hear you still got problems in Berlin too
<flughafen>
yeah
<flughafen>
i did go to the airport
<shevy>
lol
<flughafen>
my brother came in from out of town
<shevy>
I just hope it will be the best flughafen in all of europe one day
<shevy>
huh, via plane?
<flughafen>
yeah
livathinos has joined #ruby
<krowv>
for posterity I did figure out how to run my Simple GTK app with packages. apt-get install ruby-gtk3 ruby-atk ruby-gdk-pixbuf2 ruby-pango ruby-gdk3 will do the trick
msgodf has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<shevy>
\o/
<vdamewood>
Why the heck didn't they make those dependencies?
<krowv>
vdamewood, thats exactly the question I'm asking myself at the moment
AlexRussia has quit [Quit: WeeChat 1.2-dev]
<vdamewood>
There's also brain-damaged stuff like this in distro repos.
aapole has quit [Ping timeout: 252 seconds]
AlexRussia has joined #ruby
<krowv>
unfortunately everyone in #debian-ruby on OFTC seems to be asleep at the moment
ruby-lang628 has joined #ruby
<vdamewood>
Hmm... must be America-centric or something.
grzywacz has joined #ruby
krisquigley has quit [Ping timeout: 245 seconds]
shinnya has joined #ruby
bigkevmcd has quit [Quit: Outta here...]
ta has joined #ruby
<shevy>
:D
chussenot has quit [Quit: chussenot]
oo_ has quit [Remote host closed the connection]
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
<shevy>
but you probably don't need that now that you got the packages
<flughafen>
shevy: we switched from selenium to phantomjs and our testsuite is 50% faster
codecop has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 276 seconds]
<shevy>
yeah
<shevy>
you reduced the amount of tests
<shevy>
!!!
<flughafen>
ha.
<flughafen>
yah
auzty has joined #ruby
<flughafen>
we don't need this installation, we don't need users, we don't need packages.
<apeiros>
we don't need no education
chussenot has joined #ruby
<apeiros>
and you're just another brick in the wall!
ohaibbq has quit [Quit: Leaving...]
ndrei has joined #ruby
Scroff has joined #ruby
fabrice31 has quit [Remote host closed the connection]
<shevy>
I feel rick rolled
fabrice31 has joined #ruby
solars has joined #ruby
conta has joined #ruby
<flughafen>
yes, removing features/education.feature really saved us a lot of money.
djellemah has joined #ruby
<apeiros>
shevy: but you've been pink floyded!
<flughafen>
aawww snap
failshell has joined #ruby
fsvehla has joined #ruby
hotpancakes has joined #ruby
oo_ has joined #ruby
<hotpancakes>
Hi everyone. I'm looking for the best way to truly understand a gem's code and structure. Some have recommended pry. How is pry better than just reading the source on github?
Spami has quit [Quit: This computer has gone to sleep]
bkxd has joined #ruby
failshell has quit [Ping timeout: 252 seconds]
<shevy>
hotpancakes reading the source is nice; modifying the source is even better though
<hotpancakes>
shevy: care to elaborate?
semajs has quit [Quit: semajs]
CloCkWeRX has joined #ruby
<flughafen>
shevy: ask hotpancakes if any planes are taking off
emilkarl has left #ruby [#ruby]
intinig has quit [Remote host closed the connection]
tesuji has joined #ruby
<shevy>
lol
<shevy>
hotpancakes you need to activate your brain
intinig has joined #ruby
<shevy>
into getting it to understand what the hell the guy was smoking who wrote that code
CloCkWeRX1 has joined #ruby
<shevy>
that's how I was able to make the first modification to ruby-cgi in stdlib. it was a nightmare
CustosLimen has quit [Ping timeout: 244 seconds]
tomphp has joined #ruby
<shevy>
def unescapeHTML()
* apeiros
has got some doubts about the usefulness of shevy's advice…
<shevy>
def CGI::parse
<shevy>
oh that reminds me
<shevy>
if foo then
bruno- has joined #ruby
<shevy>
apeiros' style
<shevy>
:D
blueOxigen has joined #ruby
<shevy>
actually, let me try to remember the atrocities I discovered in ruby-cgi ...
JimBurns83 has quit [Ping timeout: 252 seconds]
<shevy>
if words.find {|x| /=/n.match(x) }
<shevy>
that took my brain a while to find out what that was
<shevy>
oh yeah
<shevy>
string = string.join("") if string.kind_of?(Array)
<shevy>
I decided I hate .kind_of?
swerter has joined #ruby
<shevy>
and why is there a () anyway
Musashi007 has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
CloCkWeRX has quit [Ping timeout: 272 seconds]
yoongkang has quit [Remote host closed the connection]
<shevy>
I guess matz really wanted to make ruby terse
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
mrmargolis has joined #ruby
iwishiwerearobot has joined #ruby
<hotpancakes>
shevy: umm, now i feel inadequate as a programmer. understanding is hard :/
<shevy>
nonono
<shevy>
hotpancakes in ruby there are lots of different styles
<shevy>
hotpancakes I don't think I have ever used: end.something
<shevy>
I like code to be extremely simple and linear, where my brain does not have to think
<shevy>
hotpancakes but remember, you asked "best way to truly understand a gem's code and structure" and that can be very difficult depending on who wrote something
<certainty>
shevy: xD
<shevy>
ideally you would pick something written by a genius who writes simple but efficient code
<shevy>
ask havenwood
k3asd` has joined #ruby
<hotpancakes>
who's havenwood?
arturmartins has joined #ruby
intinig has quit [Remote host closed the connection]
<shevy>
a genius
<shevy>
he also studied lots of code written by other people
intinig has joined #ruby
mrmargolis has quit [Ping timeout: 264 seconds]
troulouliou_dev has joined #ruby
<hotpancakes>
ha, noted
RTG` has quit [Ping timeout: 272 seconds]
<hotpancakes>
My issue is that reading most lines of code is a cakewalk, but I'm not sure how, let's say a gem, functions as a whole.
<hotpancakes>
I guess I need to get more comfortable with blackboxing.
RTG` has joined #ruby
chthon has joined #ruby
intinig has quit [Ping timeout: 256 seconds]
spider-mario has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
noname2 has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
hahuang65 has joined #ruby
revath has quit [Ping timeout: 255 seconds]
stan has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
noname2 has quit [Ping timeout: 276 seconds]
dionysus69 has joined #ruby
qwebirc2445 has joined #ruby
workmad3 has joined #ruby
ahmetkapikiran has joined #ruby
konsolebox has quit [Quit: Leaving]
hahuang65 has quit [Ping timeout: 265 seconds]
micmus has joined #ruby
<qwebirc2445>
any way of running WATIR without a gui
Soda has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 240 seconds]
weszlem has quit [Ping timeout: 256 seconds]
bayed has joined #ruby
houhoulis has quit [Remote host closed the connection]
maxshelley has joined #ruby
jenrzzz has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
futilegames has joined #ruby
yoongkang has quit [Remote host closed the connection]
livathinos has joined #ruby
JimBurns83 has joined #ruby
Missphoenix has joined #ruby
dANO has joined #ruby
tedstriker has joined #ruby
bronson has joined #ruby
chthon has quit [Quit: Ex-Chat]
platzhirsch has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<certainty>
shevy: you can speak for me if you like
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<yorickpeterse>
morning
failshell has quit [Ping timeout: 264 seconds]
allomov has joined #ruby
krz has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
<apeiros>
jhass gets my rubyhero nomination for this single ruboto plugin. seriously :D
dhjondoh has joined #ruby
wjlroe has joined #ruby
Oxelist has joined #ruby
wildroman2 has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 256 seconds]
micmus has quit [Quit: Leaving]
<jhass>
heh
wildroman2 has joined #ruby
<jhass>
?rails babykosh
<ruboto>
babykosh, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
leafybasil has quit [Remote host closed the connection]
allomov has quit [Read error: Connection reset by peer]
allomov has joined #ruby
terlar has quit [Ping timeout: 265 seconds]
<flughafen>
sup jhass
<jhass>
not much
wildroman2 has quit [Ping timeout: 245 seconds]
codecop has joined #ruby
codecop_ has joined #ruby
hotpancakes has joined #ruby
tcarter1719 has quit [Quit: tcarter1719]
bruno- has joined #ruby
codecop has quit [Client Quit]
quimrstorres has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
Zai00 has joined #ruby
zipace has joined #ruby
lavros has quit [Ping timeout: 252 seconds]
Zai00 has quit [Read error: Connection reset by peer]
mrmargolis has joined #ruby
lavros has joined #ruby
Zai00 has joined #ruby
bruno- has quit [Ping timeout: 276 seconds]
autrilla has joined #ruby
lkba_ has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
pinecone has joined #ruby
mrmargolis has quit [Ping timeout: 264 seconds]
lkba has quit [Ping timeout: 252 seconds]
hotpancakes has quit [Ping timeout: 245 seconds]
postmodern has quit [Quit: Leaving]
ndrei has joined #ruby
pinecone has quit [Quit: pinecone]
Akagi201 has quit [Remote host closed the connection]
fabrice31_ has joined #ruby
Oxelist has quit [Ping timeout: 265 seconds]
pinecone has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
stamina has joined #ruby
sarkyniin has joined #ruby
duncannz has quit [Remote host closed the connection]
yoongkang has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 246 seconds]
leafybasil has joined #ruby
Rollabunna has joined #ruby
michael_mbp has quit [Excess Flood]
hahuang65 has joined #ruby
denver has joined #ruby
majoh has quit [Remote host closed the connection]
bosma is now known as FakOlly
<ljarvis>
moin
michael_mbp has joined #ruby
ndrei has quit [Remote host closed the connection]
ndrei has joined #ruby
drew00 has quit [Quit: drew00]
yfeldblum has joined #ruby
<adaedra>
salut ljarvis
<Darkwater>
moan
pinecone has quit [Quit: Leaving]
hahuang65 has quit [Ping timeout: 252 seconds]
FakOlly is now known as TEAMJON
lavros has quit [Ping timeout: 255 seconds]
sigurding has joined #ruby
lavros has joined #ruby
segy has joined #ruby
drew00 has joined #ruby
Rickmasta has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drew00 has quit [Client Quit]
Oxelist has joined #ruby
senayar has quit [Remote host closed the connection]
pepperbreath has joined #ruby
AlexRussia has quit [Ping timeout: 256 seconds]
jmignault has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
quimrstorres has joined #ruby
oo_ has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
Musashi007 has quit [Quit: Musashi007]
senayar has joined #ruby
Musashi007 has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
oo_ has joined #ruby
grzywacz has quit [Ping timeout: 265 seconds]
ex0ns has quit [Quit: leaving]
ex0ns has joined #ruby
revath has joined #ruby
mdw has joined #ruby
[gmi] has quit [Read error: Connection reset by peer]
senayar has quit [Remote host closed the connection]
Scrofff has quit []
RegulationD has joined #ruby
Scroff has joined #ruby
dionysus69 has joined #ruby
tvw has joined #ruby
fujimura has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
kwd has quit [Quit: kwd]
sdothum has joined #ruby
sigurding has quit [Read error: Connection reset by peer]
quimrstorres has quit [Ping timeout: 252 seconds]
sdothum has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
bruno- has joined #ruby
lavros has quit [Ping timeout: 256 seconds]
ByronJohnson has quit [Ping timeout: 265 seconds]
drzel has quit [Ping timeout: 265 seconds]
__main__ has quit [Ping timeout: 265 seconds]
krz has quit [Ping timeout: 265 seconds]
lavros has joined #ruby
drzel has joined #ruby
krz has joined #ruby
Musashi007 has quit [Quit: Musashi007]
TEAMJON is now known as TEAMVARYSTYRION
ByronJohnson has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
x44x45x41x4E has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
__main__ has joined #ruby
bruno- has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
cubny has joined #ruby
chinmay_dd has joined #ruby
ndrei has joined #ruby
intinig has joined #ruby
mengu__ has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
bruno- has joined #ruby
revath has quit [Quit: Leaving.]
mattarse has quit [Ping timeout: 276 seconds]
bigkevmcd has joined #ruby
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
granthatcher has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
revath has joined #ruby
rodfersou has joined #ruby
bruno- has joined #ruby
GPrime has joined #ruby
iamninja has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
revath has quit [Quit: Leaving.]
revath has joined #ruby
grzywacz has joined #ruby
cubny has quit [Quit: leaving]
Pupeno has joined #ruby
ndrei has quit [Ping timeout: 276 seconds]
aspiers has joined #ruby
bruno- has joined #ruby
brahman has joined #ruby
lavros has quit [Ping timeout: 256 seconds]
hotpancakes has quit [Ping timeout: 276 seconds]
fabrice31 has quit [Remote host closed the connection]
lavros has joined #ruby
mattarse has joined #ruby
emilkarl has joined #ruby
fabrice31 has joined #ruby
joonty has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<brahman>
HI, am trying to use the tmtm ruby module and do not see an easy way to iterate over a prepared statement result. Is the prefered way to use the non prepared statement using the query method?
oo_ has quit [Remote host closed the connection]
revath has quit [Quit: Leaving.]
<brahman>
coming from a Perl background prepared statements tend to be the recommended way to interact with dbs.
francois_ has quit [Remote host closed the connection]
revath has joined #ruby
lessless has joined #ruby
ylla has quit [Ping timeout: 272 seconds]
terlar has joined #ruby
chussenot has quit [Quit: chussenot]
<jhass>
talking about the tmtm-ruby-mysql gem?
oo_ has joined #ruby
allcentury has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<jhass>
the most popular mysql client gem is mysql2
justintv90 has quit [Remote host closed the connection]
<brahman>
jhass: Hi yes, but AFAIK mysql2 doesn't have prepared statements. Is that not an issue?
yoongkang has joined #ruby
gluten_hell_ has joined #ruby
CloCkWeRX has quit [Ping timeout: 264 seconds]
jph98_ has quit [Ping timeout: 240 seconds]
bruno- has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
bruno- has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
<brahman>
jhass: I suppose I can use a for loop with the num_rows and process the results like that. but it doesn't seem clean
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
<jhass>
I don't see anything in the code that would indicate that
senayar has joined #ruby
<brahman>
jhass: undefined method `each_hash' for #<Mysql::Stmt:0x007f899a926d70> (NoMethodError)
<jhass>
uh, you have to execute a prepared statement
<jhass>
see my second link
<workmad3>
brahman: that looks like you're trying to iterate over the prepared statement, not the result of executi... as jhass said
senayar has quit [Remote host closed the connection]
<brahman>
yes, my statement is being executed AFAIK
JDiPierro has joined #ruby
<jhass>
no
<brahman>
will double check
<brahman>
brb
<jhass>
or you don't call it on the result of the execute call
serivich has joined #ruby
<workmad3>
brahman: the results are returned from `execute`, calling `execute` doesn't morph the statement into a result set
lavros has quit [Quit: leaving]
diegoviola has joined #ruby
CloCkWeRX has joined #ruby
CloCkWeRX has left #ruby [#ruby]
weszlem has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
Xeago has quit [Remote host closed the connection]
strixd has quit [Quit: 500]
auzty has quit [Quit: Leaving]
senayar has joined #ruby
senayar has joined #ruby
hahuang65 has joined #ruby
failshell has joined #ruby
Xeago has joined #ruby
<brahman>
workmad3: jhass: still not getting the each_hash when calling the execute method on my statement. itnerestingly I am not getting a resultset from the execute
k3asd` has quit [Ping timeout: 276 seconds]
mengu__ has quit [Remote host closed the connection]
<jhass>
what do you get instead?
<jhass>
nil?
aapole has joined #ruby
quazimodo has quit [Ping timeout: 265 seconds]
<brahman>
a Mysql::Stmt:0x007fa1fb746540 object
JDiPierro has quit [Remote host closed the connection]
<brahman>
but if I call fetch on the statement object I get a result.
<jhass>
I don't think you look at the return value of execute
<jhass>
13:11 <jhass> looks like they'll be added in 0.4
<brahman>
the initial question mentions tmtm ruby module
<jhass>
13:06 <jhass> talking about the tmtm-ruby-mysql gem?
<jhass>
are you unable to read or something?
<ljarvis>
you're talking about 3 different libraries :|
roolo_ has joined #ruby
<brahman>
[12:04] <brahman> HI, am trying to use the tmtm ruby module and do not see an easy way to iterate over a prepared statement result. Is the prefered way to use the non prepared statement using the query method?
<ljarvis>
07:34 < brahman> this is the gem am using
bronson has quit [Ping timeout: 264 seconds]
<apeiros>
we all can read the backlog brahman
lxsameer_ has quit [Ping timeout: 252 seconds]
<jhass>
I have no fucking clue what tmtm is, hence I asked for clarification
<brahman>
Seriously?
<jhass>
and you said yes
<apeiros>
and ljarvis and jhass
<apeiros>
brahman: get your act together and clarify which gems you're using.
<jhass>
yeah sorry
<jhass>
I'll /ignore
dfockler has joined #ruby
cubny has joined #ruby
<apeiros>
I concur with jhass that the current information you gave is conflicting.
Dwarf has quit [Ping timeout: 265 seconds]
Paradox has quit [Ping timeout: 265 seconds]
AlexRussia has quit [Quit: WeeChat 1.2-dev]
<brahman>
seriously let's not get into a bitch fight. There was a misunderstanding. I did not add mysql to the tmtm module string in my original question.
roolo__ has joined #ruby
roolo has quit [Ping timeout: 246 seconds]
AlexRussia has joined #ruby
cubny has quit [Client Quit]
<ljarvis>
brahman: please just clarify by asking your question again with all information included
roolo_ has quit [Read error: Connection reset by peer]
Paradox has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
rindolf has joined #ruby
<rindolf>
Hi all.
sdothum has joined #ruby
<apeiros>
brahman: terms like "bitch fight" which just derogate half of earths population are not welcome. please mind your language.
mrmargolis has joined #ruby
<brahman>
HI, am trying to use the tmtm-mysql ruby module and do not see an easy way to iterate over a prepared statement result. Is the prefered way to use the non prepared statement using the query method?
LMity has joined #ruby
Dwarf has joined #ruby
<ljarvis>
brahman: is there a particular reason you're using this library over one of the more popular mysql solutions?
dfockler has quit [Ping timeout: 255 seconds]
minmax has quit [Quit: WeeChat 0.4.3]
ndrei has quit [Remote host closed the connection]
ndrei has joined #ruby
j4cknewt has joined #ruby
<brahman>
ljarvis: none. I just looked up the libraries with prepared statements. mysql has them mysql2 doesn't.
oo_ has quit [Remote host closed the connection]
<brahman>
Am open to alternatives. I just need a nice interface with mysql.
<apeiros>
brahman: your information is still conflicting. you did not resolve the unclarity.
<brahman>
no need for an orm
<ljarvis>
brahman: looks like Stmt.execute returns the original statement, and that includes a `fetch` method
<apeiros>
brahman: tmtm-mysql != mysql
<ljarvis>
you could also do `stmt.execute("...").each do |row|`
hightower4 has quit [Remote host closed the connection]
<brahman>
ljarvis: yeah and the fetch method returns the latest row, there are also ways to seek in the result set. Just not as easy as the each_hash or fetch_hash methods that the non-prepared statements provide.
jgpawletko has joined #ruby
<workmad3>
oh, sorry.. it's on rubygems as tmtm-ruby-mysql
<brahman>
apeiros: are you bringing anything positive to the discussion?
yqt has joined #ruby
<workmad3>
heh, or both :)
psyprus has joined #ruby
<ljarvis>
brahman: it has a fetch_hash method too
<jhass>
yeah, 3.0 branch seems to be tmtm-ruby-mysql
<apeiros>
brahman: seriously?
<brahman>
yeah but it seems only for non prepared statements.
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3>
brahman: yeah, the mysql gem
sarkyniin has quit [Ping timeout: 250 seconds]
<workmad3>
brahman: tmtm mysql is ruby-mysql or tmtm-ruby-mysql
<brahman>
Tomita Mashahiro seems to be the author?
<brahman>
fuck me sideways
<brahman>
now am really confused
<brahman>
you guys must be even more so
CloCkWeRX1 has quit [Ping timeout: 265 seconds]
aapole has quit [Ping timeout: 264 seconds]
francois_ has joined #ruby
ahmetkapikiran has joined #ruby
<workmad3>
haha :) I'm grabbing lunch and leaving the confusion now ;)
<apeiros>
brahman: maybe you do something positive for your own case and finally figure which gems you really use…
ldnunes has joined #ruby
<apeiros>
instead of continuing to waste good people's time even after being told to do so…
<brahman>
apeiros: Are you in need of some attention?
<apeiros>
brahman: are you in need of help?
Scrofff has joined #ruby
scripore has joined #ruby
hotpancakes has joined #ruby
<brahman>
yes, I am. I have come here asked for help. realised I have made a mistake with the help of workmad3, ljarvis, jhass. You on the other hand...
<apeiros>
I on the other hand am close to kick you.
iwishiwerearobot has quit [Quit: Be back later ...]
Scroff has quit [Ping timeout: 240 seconds]
<brahman>
apeiros: for what?
hoov has joined #ruby
<brahman>
workmad3, looking at the homepage of the gem I linked to. it seems to be "wrap unmodified tmtm's mysql-ruby extension into a proper gem."
gagrio has quit [Ping timeout: 240 seconds]
jmignault has joined #ruby
<brahman>
ljarvis: looking at the homepage of the gem am using it seems like it's unmaintained and also that Tomita Mashahiro is no longer maintaining the mysql-ruby gem.
babykosh has quit [Quit: babykosh]
<brahman>
ljarvis: What gem do you use for mysql interactions?
hotpancakes has quit [Ping timeout: 255 seconds]
chinmay_dd has quit [Remote host closed the connection]
dstarh has joined #ruby
millerti has joined #ruby
<brahman>
apeiros: what for?
ylla has joined #ruby
phutchins has joined #ruby
<apeiros>
brahman: lesser assholery.
leafybas_ has joined #ruby
<brahman>
apeiros: you are a funny fella that's for sure
<brahman>
Definitely good to have a sense of humour with you around!
iwishiwerearobot has joined #ruby
<gregf_>
brahman: just as in Perl you can use 'DBI' in ruby can use 'dbi' as well in ruby. but theres afaict theres nothing complicated in that mysql2 gem :/
CloCkWeRX has joined #ruby
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
railsraider has quit [Quit: railsraider]
hedgecore has quit [Ping timeout: 250 seconds]
<apeiros>
brahman: you're on thin ice already. I suggest you drop it and get your act together as suggested before. I have no patience for people who don't care for the time they waste on others.
ebbflowgo has joined #ruby
<brahman>
apeiros: you are absolutely right about the comment I made.It was disrespectful. For that I apologies.
<apeiros>
ok, that's a good start. lets hope it continues.
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 252 seconds]
ebbflowgo has left #ruby [#ruby]
<gregf_>
brahman: in Perl you'd do: use DBI; my $conn = DBI->conn("dbi:Oracle:mydb", "", "", {}) or die $!; my $dbh = $conn->prepare("select foo from bar"); my $str $dbh->execute();while ( my $data =$sth->fetch() ){ #whatever } <== that should be just the same using ruby
leafybasil has quit [Ping timeout: 240 seconds]
wildroman2 has quit [Remote host closed the connection]
<brahman>
gregf_: will give that a go.
<brahman>
Thanks for this.
banister has joined #ruby
platzhirsch has quit [Ping timeout: 264 seconds]
k3asd` has joined #ruby
platzhirsch has joined #ruby
<djellemah>
brahman: http://sequel.jeremyevans.net/ It's not only an ORM. Always my first stop for anything SQL related.
<brahman>
gregf_: that's sorted it.
<brahman>
Thanks for your help.
<brahman>
djellemah: Will look into this.
chussenot has joined #ruby
<brahman>
Not sure I need an orm for this particular task though
LMity has quit [Read error: Connection reset by peer]
zz_barkerd427 is now known as barkerd427
maxshelley has joined #ruby
j4cknewt has quit [Remote host closed the connection]
platzhirsch has quit [Read error: Connection reset by peer]
<brahman>
Is Sequel the more commonly used way to interface with mysql from ruby
qwebirc98257 has joined #ruby
ndrei has joined #ruby
AugustoCesar has joined #ruby
gagrio has joined #ruby
mdw has joined #ruby
platzhirsch has joined #ruby
chipotle has joined #ruby
coderhs has joined #ruby
chinmay_dd has joined #ruby
RegulationD has joined #ruby
ixti has joined #ruby
AugustoCesar has left #ruby [#ruby]
but3k4 has joined #ruby
<apeiros>
sequel is a popular way to connect to databases. even if just used as DBI.
<apeiros>
for some reason other DBI solutions in ruby haven't caught on :-/
Forgetful_Lion has quit [Remote host closed the connection]
<canton7>
that's because Sequel rules them all :P
<yorickpeterse>
Sequel > everything
<apeiros>
sure. but even before sequel.
tcarter1719 has joined #ruby
platzhirsch1 has joined #ruby
hsps_ has joined #ruby
mengu__ has joined #ruby
schy has joined #ruby
hsps_ has quit [Client Quit]
chinmay_dd has quit [Ping timeout: 240 seconds]
coderhs has quit [Read error: Connection reset by peer]
cytoskeletor has joined #ruby
platzhirsch has quit [Ping timeout: 256 seconds]
<canton7>
we had ActiveRecord, DataMapper, whatever that other one was
j4cknewt has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 264 seconds]
Oxelist_ has joined #ruby
<apeiros>
iirc AR was rather difficult to get out of rails back then. and DM wasn't even started.
<brahman>
Sequel seems to do exactly what I need it to. especially when just used with SQL directly.
Oxelist has quit [Read error: Connection reset by peer]
<apeiros>
and AR was also only really usable as ORM. quite unlike sequel.
qwebirc98257 has quit [Quit: Page closed]
fujimura has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
<maloik>
Does anyone know if it's possible to automatically run a bunch of (rspec) shared examples for each model that has a certain module included? meta-programming-wise
caseypatrickdris has joined #ruby
<apeiros>
aynway. we have sequel now. maybe one day we also will have competition in DBI libs for ruby.
<yorickpeterse>
Well, there's that ROM Thing
aryaching has joined #ruby
<yorickpeterse>
not sure if it's actually usable nowadays
<apeiros>
yorickpeterse: does that also have a separate DBI part?
<yorickpeterse>
No idea, I only saw some blogs about their relational algebra stuff
<al2o3-cr>
why isn't this post request to github not working :(
<jhass>
al2o3-cr: initheader = is useless btw, just assigns that local variable
<yorickpeterse>
or with headers:
<al2o3-cr>
yorickpeterse: thanks will have a look
<al2o3-cr>
jhass: ok
<yorickpeterse>
response = HTTPClient.post('url here', :body => JSON.dump(.....), :header => {'Content-Type' => 'application/json'}) (not sure if it was :header or :headers)
quimrstorres has quit [Remote host closed the connection]
<al2o3-cr>
thanks yorickpeterse
<jhass>
al2o3-cr: I think you'll need http.use_ssl = true explicitly
<al2o3-cr>
ah, of course jhass
<al2o3-cr>
jhass: yep, that was thank you :)
<al2o3-cr>
*it
allcentury has quit [Ping timeout: 265 seconds]
Akagi201 has quit [Ping timeout: 272 seconds]
ndrei has quit [Ping timeout: 276 seconds]
griffindy has joined #ruby
bruno-_ has joined #ruby
allcentury has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
Miphix has joined #ruby
j4cknewt has joined #ruby
railsraider has quit [Quit: railsraider]
Zai00 has joined #ruby
charliesome has quit [Quit: zzz]
sdothum has quit [Ping timeout: 264 seconds]
imperator has joined #ruby
startupality has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 252 seconds]
sdothum has joined #ruby
<al2o3-cr>
well, that works, but it's raw :(
ahmetkapikiran has quit [Quit: ahmetkapikiran]
msgodf has quit [Ping timeout: 276 seconds]
Rapier- has joined #ruby
msgodf has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
<al2o3-cr>
nvm, found it under html_url :)
charliesome has joined #ruby
jordanm has joined #ruby
revath has quit [Ping timeout: 272 seconds]
jcoe has joined #ruby
psyprus has quit [Ping timeout: 248 seconds]
cytoskeletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
jcoe has quit [Client Quit]
j4cknewt has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
jcaho has quit [Read error: Connection reset by peer]
psyprus has joined #ruby
<sarkyniin>
if you want to create a class method that modifies an instance variable
jcaho has joined #ruby
<sarkyniin>
should you just use @variable or use the instance variables's attr_accessor method?
sdothum has quit [Read error: Connection reset by peer]
shum has joined #ruby
CloCkWeRX has joined #ruby
<masone>
I'm working on an APRS parser, wrapping libfap in ruby with ffi. The c struct has nested structs. The inner struct does not seem to get values populated and I always get a FFI::NullPointerError when accessing fields in it. Any ideas?
<masone>
The base struct is: Package
zipace has quit [Read error: Connection reset by peer]
<apeiros>
sarkyniin: how do you do it in instance methods? (it's the same question there really)
ionull has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
joonty has quit [Quit: joonty]
<apeiros>
sarkyniin: personally I prefer manipulating @ivars directly in methods. but there some argue that you should always go via accessors.
chinmay_dd has quit [Client Quit]
scripore has joined #ruby
<sarkyniin>
apeiros: I guess accessor feels more ordered
<apeiros>
IMO it's more cognitive overhead when reading code. means you always have to check whether that accessor does additional stuff.
<apeiros>
iow, more abstraction = heavier
<canton7>
I think accessing the ivars directly is easier to reason about. I only use the accessors when they do additional stuff, so the fact that the accessor is used is a red flag to go check *why*
<jhass>
thatkid: head to rubular.com, add a list of example inputs (not just one) and what your regex is so far
<jhass>
click permalink and post it
Rickmasta has joined #ruby
malconis has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
malconis has quit [Remote host closed the connection]
Rickmasta has joined #ruby
futilegames has quit [Quit: futilegames]
Rickmasta has quit [Max SendQ exceeded]
mdw has joined #ruby
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
CloCkWeRX has quit [Ping timeout: 252 seconds]
kfpratt has joined #ruby
ylla has quit [Ping timeout: 244 seconds]
Rickmasta has joined #ruby
<djellemah>
masone: coincidentally, one of my current projects it about to use dumbed-down variant of NMEA. I can't look right now though. Maybe in the next few days.
startupality has quit [Quit: startupality]
bkxd has quit [Ping timeout: 250 seconds]
<djellemah>
s/it about/is about/
yfeldblum has joined #ruby
CloCkWeRX has joined #ruby
<imperator>
is there a way to define an alias on an instance variable? I've got a @var that's an openstruct instance, and i want to create some aliases after the initial creation
<masone>
@djellemah Cool, let me know if you have time
failshell has quit []
JEG2 has joined #ruby
hahuang65 has joined #ruby
mdz_ has joined #ruby
startupality has joined #ruby
malconis has joined #ruby
<imperator>
instance_eval? is that the way to go?
<djellemah>
imperator: use the "class << @var" singleton syntax
<imperator>
djellemah, tried that, was hitting a scoping issue
hinbody has joined #ruby
<shevy>
imperator you can alias a method through that
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
self.instance_eval { alias base_directory server_base_directory? }
<imperator>
shevy, yeah, seems to work, thanks
<shevy>
\o/
<shevy>
I like your nick
<shevy>
it inspires awe
startupality has quit [Client Quit]
<shevy>
certainty I can't even speak for myself, I just got home again... it's raining... and it is hot... which is a strange combination.
<imperator>
did i mention the delegation? well, there's delegation
CloCkWeRX has quit [Ping timeout: 272 seconds]
segfalt has joined #ruby
acovrig has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
horsecowdog has joined #ruby
joonty has joined #ruby
<acovrig>
Is it possible to calculate the difference between 2 dates, only counting M-Th?
Xeago has quit [Remote host closed the connection]
<adaedra>
M-Th?
<adaedra>
ah
<acovrig>
so, weekdays, randomly pushing Friday in to the ‘weekend’ territory
weszlem has joined #ruby
<maloik>
you mean count the number of weekdays in between two dates?
AlphaAtom has joined #ruby
<acovrig>
maloik: yes, but counting Friday as not a weekday.
<adaedra>
count the number of weeks and multiply by 4?
leafybasil has joined #ruby
<apeiros>
M-Th = monday - thursday?
<acovrig>
apeiros: yes
<maloik>
`(date1..date2).to_a.reject { |d| d.cwday > X }` will work but might not be the most performant solution... not sure what X should be here but you get the idea
lessless has quit [Ping timeout: 252 seconds]
revath has quit [Quit: Leaving.]
<apeiros>
so the diff between today (monday) and yesterday would be 0?
<acovrig>
adaedra: not quite, if a Monday is selected, then a Wednesday is selected 2 weeks later, it would be 2weeks + 2 days
revath has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<apeiros>
and the diff between today and last thursday would be 1?
fabrice31_ has joined #ruby
<acovrig>
apeiros: example: datediff between today and the 24th of this month would be 7 days.
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
the answer to my questions would interest me more…
fabrice31 has quit [Ping timeout: 264 seconds]
fabrice31_ has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
veinofstars has quit [Quit: veinofstars]
sinkensabe has quit [Remote host closed the connection]
Xeago has joined #ruby
<imperator>
ah, crud, this isn't working with deeply nested ostructs
weszlem has quit [Ping timeout: 272 seconds]
<acovrig>
apeiros: those should throw an error because the start is > the end, but if using abs() then yes
<apeiros>
ok
Voker57 has quit [Read error: Connection reset by peer]
<apeiros>
easy but slow solution: (from..to).select { |d| d.wday.between?(1,4) }.size
<apeiros>
assuming you use Date for from/to
NeverDie has joined #ruby
mister_s_ has joined #ruby
mister_solo has quit [Ping timeout: 250 seconds]
skade has joined #ruby
<acovrig>
apeiros: that seems like it could work; currenlty I’m using PHP but plan to switch to ruby/rails.
RegulationD has joined #ruby
<apeiros>
faster solution: use arithmetics. Date#- gives number of days. divide by 7 to get the number of weeks. now you "just" have to adjust for the start/end of the range.
masone has quit [Ping timeout: 250 seconds]
maxshelley has joined #ruby
j4cknewt has joined #ruby
yqt has quit [Ping timeout: 265 seconds]
aapole has joined #ruby
maxshelley has quit [Client Quit]
mikecmpbll has joined #ruby
masone has joined #ruby
yoongkang has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 246 seconds]
fsvehla has quit [Ping timeout: 276 seconds]
JoshL has joined #ruby
renanoronfle has joined #ruby
<apeiros>
rare to see the return value of ! methods actually being used…
renanoronfle has quit [Client Quit]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Parker0 has joined #ruby
yoongkang has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
langlands has joined #ruby
valkyrka has joined #ruby
<acovrig>
apeiros: sadly since I need to also make this work in PHP, I think I’m gonna have to use a switch statement to see if it is between Monday&Thursday *sigh*
quimrsto_ has joined #ruby
Xeago has quit [Remote host closed the connection]
atomical has joined #ruby
ylla has joined #ruby
_joes_ has quit [Remote host closed the connection]
<valkyrka>
hi guys, I’m having issues with rake trying to load the nokogiri gem
<valkyrka>
I’m trying to set up redmine and when running rake -T I see this
<yorickpeterse>
Hm, interesting seeing Oga apparently being less than 1% of one of my app's runtime
<diegoviola>
my boss is an idiot, he requested I do some research on NLP but then he ask me to perform some database lookups and then return json for other apps to use it, then he goes away, what the f*ck I'm supposed to do now with that info?
<yorickpeterse>
I guess caching the heck out of things actually worked
<yorickpeterse>
diegoviola: do more research on it ofc
<imperator>
jhass, sorry, what?
<jhass>
yorickpeterse: how much of the memory consumption is it then? :P
<jhass>
imperator: why use send and not public_send?
<yorickpeterse>
jhass: not sure, New Relic doesn't let me break down memory usage
Papierkorb has joined #ruby
<yorickpeterse>
can't really do that properly anyway
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<yorickpeterse>
getting memory usage out on Linux is still very hard in 2015
<yorickpeterse>
(other than the total process' memory usage)
<imperator>
jhass, hm, does it matter here? i guess i don't understand
<jhass>
yeah, cgroups help a bit but that's just the external view
endash has joined #ruby
pandaant has joined #ruby
Rickmasta has joined #ruby
jpfuentes2 has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
<al2o3-cr>
apeiros: what was that link you posted yesterday about morning/night?
<jhass>
imperator: probably not, pushing public_send is just on my secret agenda. personally I use public_send for "invoking methods in a dynamic way" and send for "hacking around limitations of a library"
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
<jhass>
I think that gives a nice hidden intent
treehug88 has joined #ruby
<imperator>
jhass, ah, ok, i've never looked at it
Xeago has joined #ruby
<imperator>
though, i'm not even sure if this is the best approach
revath has quit [Ping timeout: 264 seconds]
Rickmasta has joined #ruby
<imperator>
dunno of another way without reopening ostruct
<BlueProtoman>
Given a Hash whose keys are all Strings, how do I return the same Hash, except with all the keys as symbols?
senayar has joined #ruby
<jhass>
BlueProtoman: using Rails/ActiveSupport?
TheHodge has joined #ruby
<chette>
hsh.each_key{|e| e.to_sym}
<BlueProtoman>
jhass: No, I'm using Jekyll
<jhass>
I'd keep them as strings personally
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BlueProtoman>
jhass: How come?
<jhass>
but you might consider pulling HashWithIndifferentAccess out of ActiveSupport
<acovrig>
chette: to_sym! (so it changes the hash after that loop)?
<chette>
no
<jhass>
because whatever defines it has a good reason to use strings over symbols
rippa has joined #ruby
<chette>
you might could define a new hash
someword has quit [Quit: Leaving.]
<chette>
and then {|e| newhash[e.to_sym] = oldhash[e]}
<havenwood>
BlueProtoman: Why do you care if it's a String or a Symbol?
<BlueProtoman>
jhass: Problem is, I can't seem to get format "%<named_arguments>s" working properly, as Jekyll seems to read in YAML with keys as strings
scripore has quit [Quit: This computer has gone to sleep]
haxrbyt__ has quit [Read error: Connection reset by peer]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<DefV>
chette: but, not to be dicks
Papierkorb has quit [Ping timeout: 264 seconds]
rdar has joined #ruby
zz_barkerd427 is now known as barkerd427
<DefV>
chette: class Fixnum; def +(other); super(other.to_i); end end
<DefV>
might work
<yorickpeterse>
I was going to suggest that, but then I realized they'd probably end up in hell for doing it
denver has quit [Remote host closed the connection]
<DefV>
I never tested it and I won't ever admit to telling you how to do it
someword has joined #ruby
<yorickpeterse>
plus you might actually break other code with that
<ljarvis>
please dont do that
<yorickpeterse>
clearly they need refinements here
<yorickpeterse>
:D
blackmesa has quit [Ping timeout: 276 seconds]
<chette>
needs more magic!
<yorickpeterse>
using classes is too mainstream though, this at least needs a DSL
krisquigley has joined #ruby
<chette>
DefV, I like where you're leading. . . . where are those binary operators defined so I can possibly redefine them as close to source as possible?
<chette>
class Numeric doesn't have +(a)
unshadow has quit [Quit: leaving]
tennis_ has quit [Remote host closed the connection]
<jhass>
chette: just abandon that path already
gambl0re has joined #ruby
<chette>
lol
<jhass>
it's of academical interest, but nothing practical
nonparfumee has quit [Ping timeout: 256 seconds]
<jhass>
fix your code so it doesn't need it
tesuji has quit [Ping timeout: 255 seconds]
<jhass>
if you want help with that show it or an equivalent example
skade has quit [Quit: Computer has gone to sleep.]
Originerd has joined #ruby
Originerd has left #ruby [#ruby]
<chette>
sometimes i need eigen vectors, but vectors aren't always the same length
pyo_ has quit []
<apeiros>
def Object#to_int and have fun watching the world burn
chipotle has quit [Quit: cheerio]
Torrieri has quit [Quit: Be back later ...]
kappy has joined #ruby
j_mcnally has joined #ruby
<jhass>
jeez, you encourage them
Torrieri has joined #ruby
edwinvdgraaf has quit []
<yorickpeterse>
Object? How about Kernel?
<chette>
for example: Array.new(0,3)[0,6] => [0,0,0,nil,nil,nil]
sharpmachine has quit [Remote host closed the connection]
<tcarter1719>
module Kernel; def require(derp); puts 'lolololol'; end end
ogpastaling has quit [Read error: Connection reset by peer]
krisquigley has quit [Ping timeout: 256 seconds]
<jhass>
chette: and why is it impossible to make that 3 a 6 ?
j_mcnally has quit [Client Quit]
ogpastaling has joined #ruby
Cust0sLim3n has quit [Ping timeout: 240 seconds]
edwinvdgraaf has joined #ruby
<chette>
no, because the size of the array is often described dynamically.
Igorshp has joined #ruby
<yorickpeterse>
oh nice, apparently alias_method doesn't even work in a refinement
<DefV>
ahahahah tcarter1719
Xeago has quit [Remote host closed the connection]
<BlueProtoman>
Gr....I really, really freakin' want named arguments to format strings in Jekyll
<jhass>
chette: [a, b].max
j_mcnally has joined #ruby
<DefV>
chette: put your problem-code up on gist and we'll fix it for you
<DefV>
because allowing you to redefine Numeric#+ and Numeric#- is a path to damnation
fabrice31 has quit [Read error: No route to host]
<chette>
where is gist? Imma noo
<jhass>
?gist
<ruboto>
https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
Outlastsheep is now known as zz_Outlastsheep
Papierkorb_ has quit [Read error: Connection reset by peer]
<apeiros>
I'm resurrecting butler. it's plugin system was IMO quite fine.
<apeiros>
probably adding on() to register handlers, though
<apeiros>
brb
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tcarter1719 has joined #ruby
yqt has joined #ruby
<ljarvis>
heh
<jhass>
eduardodev: that please join #rubyonrails was for you btw ;)
rcvalle has joined #ruby
<eduardodev>
thanks
emilkarl has quit [Quit: emilkarl]
dhjondoh has quit [Remote host closed the connection]
anisha has quit [Quit: Leaving]
eduardodev has left #ruby [#ruby]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
ReK2 has joined #ruby
grzywacz has quit [Quit: :wq]
tcarter1719 has quit [Client Quit]
weszlem has quit [Ping timeout: 256 seconds]
flori has quit [Ping timeout: 272 seconds]
sharpmachine has quit [Remote host closed the connection]
thatkid has quit [Quit: Page closed]
freerobby has joined #ruby
startupality has quit [Quit: startupality]
ringarin has quit [Ping timeout: 265 seconds]
Zesk has joined #ruby
gamename has joined #ruby
flori has joined #ruby
gamename has quit [Remote host closed the connection]
<Zesk>
Hello, I'm behind a proxy but "rake" seems to don't take my env variable in account, so it's fail to download (jruby for instance). What can I do?
spyderman4g63 has joined #ruby
sharpmachine has joined #ruby
<adaedra>
rake doesn't download something itself
blackmesa has joined #ruby
gamename has joined #ruby
<adaedra>
are you talking about installing rake through gem?
jhooker has quit [Ping timeout: 252 seconds]
<phat4life>
is it noraml for companies to sell things they haven't built yet
chipotle has joined #ruby
<adaedra>
what's the point of DateTime vs Time
gamename has quit [Client Quit]
<yorickpeterse>
phat4life: yes
<yorickpeterse>
we do it all the time
<yorickpeterse>
I'm not even joking
<yorickpeterse>
adaedra: DateTime for one lets you set offsets
<yorickpeterse>
but really DateTime and Time should've been the same class
<phat4life>
yorickpeterse: do you think its bad practice, or is that just how it goes
cndiv has joined #ruby
<yorickpeterse>
phat4life: it's bad
<adaedra>
yorickpeterse: offset as in timezone, or something else?
<yorickpeterse>
because it leads to stress and all that
<yorickpeterse>
adaedra: No, a time offset
quimrsto_ has joined #ruby
<yorickpeterse>
timezone != time offset
<adaedra>
oh
<yorickpeterse>
errr zone offset even if I'm not mistaken
allomov has quit [Remote host closed the connection]
iwishiwerearobot has quit [Quit: Be back later ...]
EllisTAA has joined #ruby
caseypatrickdris has quit [Remote host closed the connection]
<chette>
yes, but does it support gravitational dilation of time!? how are andromedaens suppose to sync with my app!?
sharpmachine has quit [Remote host closed the connection]
<yorickpeterse>
haha
pdoherty has joined #ruby
<EllisTAA>
morning
<EllisTAA>
i just deployed to heroku, then i ran heroku run db:migrate and when i check my site the database is empty … can explain why it doesnt have any data and how i can get my database full of data up to heroku
Marsupermammal has joined #ruby
<yorickpeterse>
For that you need ActiveSupport::TimeWithDilation
<phat4life>
i wonder if space travel becomes a thing, all peoples time stuff will be jacked
alanjf has quit [Read error: Connection reset by peer]
<chette>
jacked, quite
<chette>
only those in space
rgs has quit [Quit: leaving]
<yorickpeterse>
Imagine having to deal with galactic timezone differences
blackmesa has quit [Ping timeout: 264 seconds]
<chette>
yorick, I suppose it's up to one of us to write that class
<yorickpeterse>
if our current system is any indication that would be a total nightmare
<phat4life>
have any of you worked on rails or other ruby frameworks at scale? Im talking like, 1million+ requests a day
<yorickpeterse>
"Hi my name is George, I'm based on Mars in timezone Universal Mars Time + 4,5"
<yorickpeterse>
"How much is that in UTC?"
<yorickpeterse>
"UTC?"
rgs has joined #ruby
Scrofff has joined #ruby
<yorickpeterse>
phat4life: not 1 million, but we're currently sitting around 110K per day for a Sinatra API
<yorickpeterse>
which is working fine so far
<ljarvis>
phat4life: I've done 2m+ on sinatra
EllisTAA has quit [Quit: EllisTAA]
xlptmrcrj has quit [Ping timeout: 245 seconds]
<phat4life>
yorickpeterse: the stack we have is: ha proxy, with 2 passanger instances, on the same server, we have a seperate db server, mysql, and a redis server
baweaver has quit [Remote host closed the connection]
<yorickpeterse>
phat4life: that means nothing
<yorickpeterse>
you can have 12938123819023 servers but without knowing the load it's impossible to say if it will work
<phat4life>
though we probably have 100+ users though because its an interal application only
jcaho has quit [Read error: No route to host]
tenderlo_ has quit [Quit: Leaving...]
<phat4life>
yeah i haven't benched it, im trying to figure out how i want to build my own app
<schy>
lol Kudeshi
edwinvdgraaf has quit [Ping timeout: 264 seconds]
premera has quit [Remote host closed the connection]
jcaho has joined #ruby
Scroff has quit [Ping timeout: 245 seconds]
<phat4life>
wether its work using heroku, or trying to provision everything in aws
<phat4life>
*worth
<chette>
this line: ohmegg[k] = (kkk.inject(Vector.elements(Array.new(kkk[0].size,0))){|m,o| m.+o}).to_a.collect{|e| e / ohmegg[k][1]}
wldcordeiro_ has joined #ruby
<ljarvis>
my eyes
<phat4life>
yorickpeterse: how do you do deployments? right now we are using ansible to both provisoin, and deploy everything
veinofstars has quit [Quit: veinofstars]
<chette>
my attempt to write a question in gist has just caused me to re-write a bunch
<phat4life>
yorickpeterse: we do blue/green by draining connections to ha proxy
<chette>
so question no longer valid
<yorickpeterse>
We use Jenkins to build a tarball, dump that on S3 then have that downloaded to a server. For web apps we still use Capistrano to trigger the actual reloading of an app, but that will soon go
<yorickpeterse>
For all our background processing apps we just reboot the server
<yorickpeterse>
since a deployment happens automatically upon boot
<phat4life>
do you use beanstalk or any sort of auto scale?
jhooker has joined #ruby
psyprus has quit [Changing host]
psyprus has joined #ruby
Zimsky_ has quit [Ping timeout: 272 seconds]
<yorickpeterse>
No, we have our own secret sauce
mrmargolis has quit [Read error: Connection reset by peer]
<Zesk>
adaedra, I tried to run latest version of logstash and its asked to run "rake bootstrap" so I install ruby, install rake through gem. Then tried to "rake boostrap".
mrmargol_ has joined #ruby
<phat4life>
we had our own secret sauce, it was a nightmare to scale
<yorickpeterse>
but that literally just involves: 1) tarball a directory 2) upload to S3 3) download to server 3) /etc/init.d/some-app reload
jenrzzz has joined #ruby
dented42 has quit [Read error: Connection reset by peer]
<Zesk>
When I do this the first line is downloading jruby
<adaedra>
Zesk: then it's the code inside this rake task which fails
<yorickpeterse>
I can comfortably run our setup on hundreds/thousands of servers, at least for background apps
<yorickpeterse>
(and we've done so in the past)
<bougyman>
phat4life: we're all chef here for cfg management and most deployments.
EllisTAA has joined #ruby
<bougyman>
though we're moving to buildbot for some deployments now.
<bougyman>
just to remove the human.
<yorickpeterse>
The setup we'll be moving to most likely is having Jenkins SSH into an instance and trigger the downloading of a package
<phat4life>
yorickpeterse: we had just a few servers, over a thousand elbs, let that sink in for a bit
Torrieri has joined #ruby
<Zesk>
I have "getaddrinfo: name or service not found"
<yorickpeterse>
It's not ideal, but everything else sucks more
<bougyman>
our staging stuff all autodeploys based on git changes.
<bougyman>
but in prod we still need someone on the keyboard.
dented42 has joined #ruby
<yorickpeterse>
phat4life: a thousand ELBs? what the
<yorickpeterse>
how slow is that app?
Igorshp has quit [Remote host closed the connection]
<phat4life>
elbs were for ssl
<bougyman>
only takes about 10 minutes each release, and we release every other monday, here.
kahunaio has joined #ruby
<phat4life>
yorickpeterse: 3 elbs per client
xlptmrcrj has joined #ruby
<phat4life>
every client got their own ssl domain
<yorickpeterse>
oh, you run everything on different domains?
tenderlove has joined #ruby
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse>
ah
<phat4life>
ya
bronson has joined #ruby
<yorickpeterse>
Yeah we don't do client work so we don't have that problem
mauris has left #ruby ["Leaving"]
<phat4life>
so we have to write code to attach all the elbs to just a few instances
<phat4life>
which is basically just fighting aws
<bougyman>
that code's already written.
mleung has joined #ruby
ndrei has joined #ruby
<bougyman>
in chef/fog and in puppet and probably ansible, too.
<ljarvis>
im so used to deploying 10s of times a day
rbennacer has joined #ruby
<yorickpeterse>
You can attach them to autoscaling groups, which you can set up pretty easily
<bougyman>
ljarvis: we deploy dozens of times a day.
<bougyman>
but that's all automated.
<ljarvis>
ah right
kahunaio has quit [Client Quit]
EllisTAA has quit [Client Quit]
<phat4life>
i see, luckily we are ditching that architecture, because elbs are really expensive
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bougyman>
we still do one big production push every 2 weeks, though.
<bougyman>
one week dev sprint, one week qa sprint, release, repeat.
Igorshp has joined #ruby
<phat4life>
force push master, deploy to prod, yolo.
dfockler has joined #ruby
atomical has joined #ruby
<bougyman>
we run a modified git-flow. topic branches are cut from (and merged back to) master, master merges into staging, from staging we cut release/ branches and those are deployed to qa. once they're signed off on we merge the release/ branch into production.
jenrzzz has quit [Ping timeout: 252 seconds]
Zimsky_ has joined #ruby
Igorshp has quit [Remote host closed the connection]
<phat4life>
we just to feature/branches, which we have a pull requst, then a merge
<phat4life>
rebasing were it makes sense
premera has joined #ruby
premera has quit [Excess Flood]
<bougyman>
we rebase the topic branch before pushing to master.
volty has joined #ruby
<phat4life>
makes sense
aapole has joined #ruby
<bougyman>
nowhere else should rebasing be needed, unless someone really screws up.
bronson has quit [Ping timeout: 264 seconds]
premera has joined #ruby
<phat4life>
bougyman: do you do full on task estimation for your sprints
<bougyman>
phat4life: for our contract dev team we do.
_seanc_ has joined #ruby
<bougyman>
because that's what the compensation is based on.
jschoolcraft has joined #ruby
<phat4life>
task estimation has never worked for us
<bougyman>
for the internal team we don't measure velocity by estimated number and bother with the backlog.
<bougyman>
seems like just a big time waster.
<bougyman>
there's no one here coasting.
<volty>
hi, how can I enclose rb_eval_string (from c++) so that I can get the error (without faultseg) ?
<bougyman>
which is kind of what those velocity numbers highlight.
rkazak has quit [Ping timeout: 256 seconds]
diegoviola has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
<yorickpeterse>
volty: IIRC you can't
strixd has quit [Quit: 500]
<yorickpeterse>
because the C API has no such thing as exceptions that you can catch
roshanavand has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
<volty>
yorickpeterse: good to know, thx
Lucky__ has joined #ruby
GPrime has quit [Remote host closed the connection]
c_nick has joined #ruby
sharpmachine has joined #ruby
<volty>
so, I guess that if I want to mix c++ (qt) and ruby, i have to start the app on the ruby side ?
unshadow has joined #ruby
<c_nick>
"ABC12.3 12.4" I need a regex which will parse this and get me only 12.4 and not 12.3
<bougyman>
c_nick: boy I hope you know your data.
chrisja has quit [Quit: leaving]
<volty>
use /....$/
<jhass>
c_nick: this looks like fake data, please provide real samples
<bougyman>
/^[a-zA-Z]([\S]*)/
<bougyman>
a naive one is /^[a-zA-Z]([\S]*)/
andikr has quit [Remote host closed the connection]
<bougyman>
without knowing more of your data.
<chette>
is there a better way to write this?: [ary1,ary2].sort{|a,b|a.size <=> b.size}[-1].size
<c_nick>
real data :- File12.1 5623.197585674
<bougyman>
my naive one still works on that.
<apeiros>
chette: min_by
<apeiros>
or actually max_by
<volty>
"ABC12.3 12.4" =~ /(\d*\.\d+)$/
<Senjai>
chette: [one, two].sort_by(&:size).last or what apeiros mentioned
<volty>
(or like that)
<apeiros>
min/max is O(n), sort is O(nlogn) :)
<chette>
max_by, thanks
hotpancakes has joined #ruby
<Senjai>
apeiros: I pride myself on being ignorant to that :)
<apeiros>
I'm not sure that's something to be proud of
<Senjai>
By pride I mean sadden
<jhass>
c_nick: .split.last
pepperbreath has quit [Ping timeout: 255 seconds]
<apeiros>
Senjai: it's reasonably easy to learn IMO
<c_nick>
jhass: no i cannot use split because this data is in a file and that file can be a CSV or a TAB spaced
<c_nick>
jhass: its pretty fucked up
<Senjai>
apeiros: I never went to uni, so figuring out big O is not super easy
<zach_>
I thought that was the right way of doing named params, but I'm getting all these warnings since upgrading to ruby 2.2.2
<volty>
at most two digits
masone has quit [Quit: masone]
senayar has quit []
<c_nick>
havenwood: thats god like :P
<havenwood>
and zero digits after a period doesn't make sense
<havenwood>
\d{,2}
<c_nick>
>> File12.7566732,674.121123454,return value is 12.734356".scan /\d*\.\d{0,2}/
<ruboto>
c_nick # => /tmp/execpad-3bb159d8e150/source-3bb159d8e150:2: no .<digit> floating literal anymore; put 0 before ...check link for more (https://eval.in/381933)
<volty>
0 included if 3. (single dot behind) could happen, otherwise {1,2}
tomphp has quit [Ping timeout: 256 seconds]
last_staff has quit [Quit: last_staff]
<havenwood>
mm
<volty>
you miss the beginning "
hotpancakes has quit [Remote host closed the connection]
last_staff has joined #ruby
<c_nick>
>>" File12.7566732,674.121123454,return value is 12.734356".scan /\d*\.\d{0,2}/
bronson has quit [Remote host closed the connection]
<pipework>
havenwood: vim at least is easier. nocompatible ftw
timonv has quit [Read error: Connection reset by peer]
<boomls>
I will check out atom
<tcarter1719>
Atom is pretty awesome, it's a fairly new project but it's already got a huge library of packages.
<havenwood>
pipework: vim vim vooom!
<eam>
boomls: emacs
<pipework>
havenwood: I'm watching tmnt from the first show.
<tcarter1719>
You should learn vim anyway, comes in handy when you just need to make quick edits or change system configs without having to launch a GUI with sudo.
doodleha_ has joined #ruby
nobitanobi has quit []
<havenwood>
pipework: Cowabunga?
<pipework>
havenwood: pizza!
<boomls>
I've heard of sublime text - is that not worth considering?
bronson has joined #ruby
imperator has left #ruby ["Leaving"]
<pizzaops>
You called?
<tcarter1719>
It's overpriced and atom is FOSS and very similar.
<umgrosscol>
boomls: My colleague uses sublime text. He likes it.
mrmargol_ has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
Cust0sLim3n has quit [Ping timeout: 250 seconds]
<pizzaops>
Sublime is excellent but so is atom, it's basically a sublime clone, and it's free, like tcarter1719 said.
podman has joined #ruby
<chette>
ActiveSupport::TimeWithDialation needs a VectorSpace to describe background gravitational potential, and also the dt/dv of accelleration/speed of light. are there any good Cosmologic libraries out there?
unshadow has quit [Quit: leaving]
francois_ has quit []
mrmargol_ has joined #ruby
<dudedudeman>
VIM is free, too!
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hanmac>
shevy the ruby % in rwx did increase! its now 0.1% more at 4.1% ;P
axl__ has joined #ruby
kahunaio has quit [Quit: leaving]
<c_nick>
havenwood: if u otta replace 45.67899 after rounding in the same string how can u achieve that
Kricir has quit [Remote host closed the connection]
<c_nick>
yes map will perform an operation on the elements of the array
<boomls>
final question - is there a website (or maybe built into text editor?) where I can search for a ruby function/method etc. Something like the codeacademy Ruby glossary http://www.codecademy.com/glossary/ruby but with a search function
NeverDie has joined #ruby
<boomls>
?
<tcarter1719>
I use ruby-doc.org
<tcarter1719>
or ri
<boomls>
ri?
<havenwood>
?pry boomls
<ruboto>
boomls, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ’binding.pry’ directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
<ruboto>
c_nick # => /tmp/execpad-bb8bb1eb53f0/source-bb8bb1eb53f0:6:in `raise': exception object expected (TypeError) ...check link for more (https://eval.in/381964)
<ruboto>
c_nick # => /tmp/execpad-30f7c99b70ef/source-30f7c99b70ef:6:in `raise': exception object expected (TypeError) ...check link for more (https://eval.in/381972)
<umgrosscol>
boomls: Using pry's show-source comes in handy. Unless it's one of those functions that rails generates on the fly for you
davedev2_ has quit [Ping timeout: 245 seconds]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<c_nick>
havenwood: This will return the array rounded. what if u need that same string with modified values like File12.3 45.67 67.88, 78.9,89.22 67.80
Asher has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
nonparfumee has joined #ruby
<baweaver>
In on this late, but why is the data formatted like that?
shock_one has quit [Remote host closed the connection]
<hanmac>
umgrosscol: hm show-source might also not work for third-party compiled functions ... for sample one of my bindings does have macro generated methods (where show-source doesnt know what to do)
<hanmac>
c_nick: you are looking for gsub
gianlucadv has joined #ruby
<baweaver>
If possible, always fix the data first before making a hack to parse it
ascarter has joined #ruby
shock_one has joined #ruby
<umgrosscol>
hanmac: If they're not generated on the fly, show-source should be able to find them in the gem. Anything that's generated on the fly is inaccessible to show-source.
JDiPierro has quit []
<baweaver>
that, and you have a command line + repl for a reason. It's advisable to not use the channels REPL until you have something already figured out.
<apeiros>
havenwood: noooo! did you miss that it's about money?!?
jds has joined #ruby
<havenwood>
c_nick: like baweaver said, try it out locally with pry/irb and just use ruboto to demonstrate
<apeiros>
ah well, .to_s
<apeiros>
nothing can go wrong :)
<hanmac>
umgrosscol: hm like i said it might not work with compiled stuff ... and i can say that MY methods dont have a source body which can be parsed ... like one of my macros macro_attr(attr) does make _get_attr and _set_attr functions ... when rdoc, yard or pry are looking for _get_attr in the source they will not find them
jwilson has quit [Read error: Connection reset by peer]
<havenwood>
apeiros: I gave the floating point currency caveat but was rebuffed. ;)
baweaver has quit [Remote host closed the connection]
<crankharder>
but also, 'bundle install' I wouldn't think should change anything
<diegoviola>
"So for example, let's go back to one of the things where I think the designers of subversion were complete morons. Strong opinions, that's me, right? There are a few of them in the room today, I suspect. You are stupid." -- Linus Torvalds
Narzew has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
swerter has joined #ruby
<eam>
truth hurts
A205B064 has joined #ruby
<dfockler>
truth hurts worse when a successful person calls you stupid
<Authenticator>
chette: Are you referring to the ENV variables in the shell, or local variables for a method as in 'binding.pry'?
ylla has quit [Ping timeout: 250 seconds]
iinzg has joined #ruby
iinzg has quit [Read error: Connection reset by peer]
<eam>
chette: you're going to have trouble working with BCT on any unix system
kahunaio has quit [Quit: leaving]
mister_s_ has quit [Ping timeout: 250 seconds]
<eam>
if you need any kind of precision at all you'll likely need to implement your own interfaces (and hardware)
caseypatrickdris has quit [Remote host closed the connection]
<eam>
POSIX time is defined as UTC. Mapping UTC to TAI is pretty straightforward as it's just a matter of tracking leap seconds, but converting to BCT with precision would be difficult
<chette>
I can handle the conversion
<chette>
it's just the emplementation
simplyia_ has quit [Ping timeout: 264 seconds]
<eam>
all unix timezones are based on UTC
<eam>
ruby just hooks into the posix time functions
simplyianm has joined #ruby
DLSteve has joined #ruby
kahunaio has joined #ruby
tskogberg has quit [Ping timeout: 265 seconds]
pengin has joined #ruby
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sohrab has quit []
dorei has quit [Remote host closed the connection]
dumdedum has quit [Quit: foo]
ta has joined #ruby
baweaver has quit [Remote host closed the connection]
acke has joined #ruby
mrmargol_ has quit [Remote host closed the connection]
kahunaio has quit [Client Quit]
arturhoo has joined #ruby
hakunin has joined #ruby
mrmargolis has joined #ruby
dagda1 has joined #ruby
edwinvdgraaf has joined #ruby
kahunaio has joined #ruby
pdoherty has quit [Quit: Leaving]
evanjs has quit [Remote host closed the connection]
bgmarx has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
snockerton has quit [Quit: Leaving.]
tskogberg has joined #ruby
evanjs has joined #ruby
bgmarx has joined #ruby
<dudedudeman>
how hard would it be to set up a web app to take drag and dropped file, and then spit that file through an already built and working bash script?
Kruppe has joined #ruby
<dudedudeman>
go to like, draggedfile.com, drag your file in to a specified area, and then just sit back and wait for the script to work it's magic
<eam>
very easy
<jhass>
5.7 points hard
edwinvdgraaf has joined #ruby
<postmodern>
is there info on the Module.new pattern somewhere?
<Senjai>
dudedudeman: Google it :P
allomov has joined #ruby
<Senjai>
dudedudeman: It's kind of a common thing
<Senjai>
postmodern: It's not a pattern, I dont understand what you're trying to do
quimrsto_ has quit [Remote host closed the connection]
<Authenticator>
dudedudeman: The "drag and drop" is more HTML/etc than webapp. Pretty easy though.
<bootstrappm>
dudedudeman: I'd say just be careful on how long that bash script will run
<dudedudeman>
Senjai: i figured it would be. i'm clearly googling the wrong things, as per usual lol
<postmodern>
Senjai, sigh, it is, where you define a class MyModule < Module, and do include MyModule.new(state_goes_here)
<bootstrappm>
you might need a worker
<dudedudeman>
let's say i have workers available
simplyianm has quit [Remote host closed the connection]
art-solopov has joined #ruby
<dudedudeman>
the script itself is already build and deployed on a machine, but you currently have to navigate to a specific folder location on our network that's kind of hidden and obscure
acke has quit [Remote host closed the connection]
Carnage\ has joined #ruby
bigkevmcd has quit [Ping timeout: 252 seconds]
<dudedudeman>
the script starts working once it sees a file in a specific folder. it checks that folder every 60 seconds
skysploit has joined #ruby
skysploit has joined #ruby
<Senjai>
postmodern: What fancy sort of metaprogramming are you trying to do there?
acke has joined #ruby
hakunin has quit [Remote host closed the connection]
<bootstrappm>
other than that yeah, just google the different components. two i can think of: drag and drop javascript, execute external command ruby
<Authenticator>
dudedudeman: Look into Sinatra for a simple Ruby webapp. It's very easy, but there are optimizations when you start dealing with large files, etc, so as to not just buffer the files in memory.
<dudedudeman>
bootstrappm: that last query, that gives me some good reading. thanks
<Senjai>
I tend to avoid anonymous classes though, I would suggest against it unless there is an actual reason you have to build classes dynamically.
GnuYawk has joined #ruby
<Senjai>
s/classes/modules
Kruppe has quit [Ping timeout: 255 seconds]
BanzaiJoe has joined #ruby
Scroff has joined #ruby
<postmodern>
Senjai, i know of the method, was looking for info on the pattern
bruno- has joined #ruby
<Senjai>
Structs?
platzhirsch has joined #ruby
acke_ has joined #ruby
<Senjai>
I have no idea man.
AlphaAtom has joined #ruby
<gambl0re>
are rails gems just added features you can use in your app?
acke__ has joined #ruby
<Authenticator>
postmodern: I've never heard of that *by name*. What are you trying to do? What is the pattern supposed to offer?
snockerton has joined #ruby
Guest22612 has quit [Ping timeout: 276 seconds]
<Senjai>
gambl0re: Rails consists of a number of gems. They're all pulled in togerther with an Engine
<Senjai>
postmodern: what Authenticator said
edwinvdgraaf has quit [Remote host closed the connection]
Wintooshock has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
psy_ has quit [Quit: Leaving]
troulouliou_dev has quit [Remote host closed the connection]
krisquigley has joined #ruby
DroidBur_ has joined #ruby
acke has quit [Ping timeout: 276 seconds]
bruno-_ has joined #ruby
acke_ has quit [Ping timeout: 276 seconds]
codecop has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
mfranzwa_ has quit [Quit: mfranzwa_]
<BanzaiJoe>
Senjai rubytapas has a free video on Struct syntax, Structs are also part of the library and there are Rubydocs on them ( http://ruby-doc.org/core-2.2.2/Struct.html )
DroidBurgundy has quit [Ping timeout: 264 seconds]
tskogberg has quit [Ping timeout: 240 seconds]
krisquigley has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
<Senjai>
what
Voker57 has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<Senjai>
BanzaiJoe: ik, was that meant to be send to postmodern ?
<dstarh>
Senjai i've used string_io.read, i've used string_io.write as well as puts and didn't make a difference
poguez_ has joined #ruby
caseypatrickdris has joined #ruby
acke has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
<Senjai>
Then its probably that generated_sql isn't a correct value
<dstarh>
string_io.string will give you the underlying string
<Senjai>
dstarh: Yeah, dont use that
<Authenticator>
Senjai: What would the difference be? (Write as if it were an actual file...)
<Senjai>
dstarh: Otherwise there is no point in using StringIO
acke has joined #ruby
<ljarvis>
using that is fine..
<Senjai>
Authenticator: I had thought puts wasn't a member of IO, but it is
droidburgundy has joined #ruby
droidburgundy has quit [Client Quit]
droidburgundy has joined #ruby
baweaver has quit [Remote host closed the connection]
mesamoo has joined #ruby
<dstarh>
Senjai I don't think thats the issue, as i'm running the method twice once with the file.open block and once with the string_io and with the file wrapper it actually writes something to the file
Scroff has quit [Remote host closed the connection]
<ljarvis>
dstarh: what if you set it to $stdout ?
<Senjai>
ljarvis: NO
<Senjai>
dstarh: Pretend you didn't hear that
<Senjai>
:P
<ljarvis>
dstarh: ignore Senjai. Tell me if that works?
<dstarh>
lol
<Authenticator>
dstarh: This works for me. def test(str, fh) ; fh.puts str ; fh ; end ; fh = t('kittens', StringIO.new) ; fh.rewind ; fh.read
<Authenticator>
The difference is the rewind.
<Senjai>
Authenticator: that makes sense
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pragmati_ has joined #ruby
<ljarvis>
ugh.. that makes no difference to their code. the #string method returns the underlying string buffer without doing read/writes
<Senjai>
But I dont ever remember having to rewind a StringIO to call read
<ljarvis>
so what they want *should* work
<Senjai>
ljarvis: Its probably an issue in the code thats not being shown
<dstarh>
ljarvis works just fine with $stdout
<ljarvis>
that's what I'm thinking
pragmatism has quit [Read error: Connection reset by peer]
<Senjai>
LOL
<Senjai>
dstarh: You are doing something very wrong :P
<ljarvis>
right, then there's something else wrong
lkba_ has quit [Remote host closed the connection]
leafybasil has quit [Ping timeout: 276 seconds]
<ljarvis>
you realise none of this code calls any of those procs right? so with this, all of those buffers will be empty so it's completely useless in terms of us helping
<ljarvis>
presumably they're call in process_table. I think you need to create a small reproduction of this
n008f4g_ has joined #ruby
<dstarh>
ljarvis ok i'll work on a small reproducable example
caseypatrickdris has quit [Read error: Connection reset by peer]
caseypatrickdris has joined #ruby
ludico8 has joined #ruby
<ludico8>
Hi everyone!
<jhass>
hi
scripore has joined #ruby
symm- has joined #ruby
<ludico8>
I have an issue when Iam using rufus-scheduler and passenger
<ludico8>
seems that everything works well in dev
<ljarvis>
?ask
<ruboto>
Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<ludico8>
but once it is on prod, my task is not running
<ludico8>
:/
finisherr has quit [Quit: finisherr]
baweaver has joined #ruby
<ludico8>
seems like the scheduled task is not running on prod
otherj has quit [Ping timeout: 264 seconds]
<ljarvis>
ludico8: do you have logs you can check?
<ludico8>
yes
quimrstorres has quit [Remote host closed the connection]
<ludico8>
but there is anything on the log
<ljarvis>
"seems like" doesn't seem confident
<ludico8>
the log keeps empty in prod
<ljarvis>
is the process started (i'm not sure how rufus-scheduler works)
aninaki has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<ludico8>
well, Im not pretty sure if is running, indeed, I think is not running
<ludico8>
seems like ruffus & passanger arent compatibles
bgmarx has quit [Remote host closed the connection]
mfranzwa has quit [Quit: mfranzwa]
AlphaAtom has joined #ruby
<ljarvis>
i would argue that they don't have anything to do with each other. How is the scheduler started? from a rake task? an initializer? other tooling?
Musashi007 has quit [Read error: No route to host]
<ludico8>
but in prod seems that something don't allow to work in the same way
EllisTAA has joined #ruby
phutchins has quit [Ping timeout: 246 seconds]
lkba has joined #ruby
simplyianm has joined #ruby
pluxev has joined #ruby
NeverDie has joined #ruby
quimrstorres has joined #ruby
lkba has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
<ludico8>
:ljarvis let me check it
kadoppe has quit [Ping timeout: 252 seconds]
jackjackdripper has joined #ruby
kirun has joined #ruby
rdar has quit [Quit: Leaving]
kadoppe has joined #ruby
Torrieri has joined #ruby
Torrieri has joined #ruby
adac has joined #ruby
dcarmich has joined #ruby
Lingo__ has joined #ruby
dorei has quit []
jenrzzz has quit [Ping timeout: 264 seconds]
<adac>
For a has this works just fine for outputting th value of a key: hash['key'] however when I do key[object.first] (which also is a string of an existing key) it doesn't work and I get a nil value. Any ideas?
<volty>
it's my nose. weird questions, in perfect perplex style. having good time. etc etc. but never mind,just ask your questions.
<ljarvis>
jhass: noice
<jhass>
apoplexy: great, see you in #ruby-offtopic then, this channel is for ruby questions
dfockler has quit [Remote host closed the connection]
<baweaver>
CPE2cd05a1a8339-CMbc1401279700.cpe.net.cable.rogers.com , but I digress
t0rrieri has quit [Ping timeout: 264 seconds]
hazelux has quit [Remote host closed the connection]
<dudedudeman>
what a string
<jhass>
a sequence of characters
* baweaver
high fives jhass
<jhass>
:P
<eam>
not always characters
zenguy_pc has joined #ruby
<dudedudeman>
a sequence of stuff?
RobertBirnie has joined #ruby
<ljarvis>
not always a sequence
<dudedudeman>
stuff
<ljarvis>
precisely
* dudedudeman
is learning stuff
hazelux has joined #ruby
<eam>
hm in which cases would a string not be a sequence? The empty string?
<volty>
when it is supposed to be something else than sequence ?
baweaver has quit [Remote host closed the connection]
<dudedudeman>
oh god what have i done
bturker has joined #ruby
<ljarvis>
^
<eam>
most systems define the empty sequence as a sequence
<ljarvis>
hmm, most you say?
<eam>
I'm not aware of any that don't?
<ljarvis>
so you can't say for certain?
<eam>
well, wikipedia says most so I can refer to the reference ;-)
Musashi007 has joined #ruby
x1337807x has joined #ruby
JoshL has joined #ruby
<volty>
the sequence means in order, «empty sequence» is a convenience of the language expression. an empty set is still a set because it's there to hold elements of a set
<ljarvis>
:D
Xiti has quit [Quit: Xiti]
<ljarvis>
i'm glad i have exercised minds
<dudedudeman>
huh.
pandaant has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<ljarvis>
volty: but if a set exists when nobody is around to see it, does it really exist?
<dudedudeman>
so, a set of numbers could be empty, or it could be 43251. but a sequence of numbers would be 12345?
<Senjai>
ljarvis: The garbage collector, right before it deletes it
<Senjai>
Or ObjectSpace
<Senjai>
zing
<volty>
no. only things that «interact» exist
simplyianm has quit [Remote host closed the connection]
<Senjai>
volty: Of course, duh. Calling it will make it exist, even though you don't use it
Scroff has quit [Remote host closed the connection]
barkerd427 is now known as zz_barkerd427
flughafen_ has joined #ruby
flughafe1 has quit [Ping timeout: 264 seconds]
konieczkow has quit [Ping timeout: 276 seconds]
<eam>
The simulacrum is never that which conceals the truth - it is the truth which conceals that there is none.
allomov has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 256 seconds]
<volty>
the existence concerns the interaction too. it could not exist, even if «created», if you do not interact with it. in Occam's razor exists here too. Though it's called «abstraction».
mrmargolis has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
simplyianm has quit [Read error: Connection reset by peer]
<phat4life>
if you were interviewing someone for a ruby position, what questions would you ask?
<eam>
phat4life: I'd sit down with them on a computer and solve a small problem
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Senjai>
phat4life: Are you an academic? Yes? Sorry, this position's been filled.
<Senjai>
xD
<dudedudeman>
phat4life: i know the fizzbuzz question is a ringer
simplyianm has joined #ruby
AlphaAtom has joined #ruby
<havenwood>
phat4life: What kind of Ruby position? What will they be doing?
<Senjai>
phat4life: You have to work through code. Alternatively, describe hard problems you've solved at your firm recently, ask them how they would model out a solution
Scroff has joined #ruby
<apeiros>
phat4life: most useful question to us has been: bring code (any lang) you're proud of and show it to us in 5-15min.
<phat4life>
i asked this canidate to read code, it was a dp implementation of the fib sequence, they couldn't tell me what the code did :|
<havenwood>
phat4life: ^ I like apeiros'
<eam>
reverse a binary tree
<Senjai>
apeiros: I disagree, 99% of my code is NDA.
<apeiros>
asking questions like why they're proud of it, what they'd do differently. what they learned.
<eam>
Senjai: so sign an NDA
msnyon has quit [Read error: Connection reset by peer]
msnyon_ has joined #ruby
<phat4life>
havenwood: rails, sinatra
<Senjai>
eam: What, I cannot sign an NDA on behalf of a previous employer or client
<Senjai>
I cannot act as their agent
<eam>
Senjai: the applicant can
baweaver has joined #ruby
<eam>
that's what most folks do
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<Senjai>
Sorry, I'm talking about referencing code done for other clients, when negotiating with a new one
<eam>
ah
<Senjai>
Which is why I disagree with apeiros, I cant show new clients/employers my best code
<dorei>
i'd only ask one lame question, how many unsingned numbers can be represented with 11 bits :)
Yiota has joined #ruby
<eam>
most people have something OSS to share, no?
<Senjai>
dorei: How is that useful?
<havenwood>
Senjai: But do you have any code you're proud of at all that you could show?
<Senjai>
dorei: That's like, a textbook question
<Senjai>
havenwood: Nope. I always think the code I wrote last month is shit this month.
<eam>
trivia generally doesn't select for attributes that make a good developer
<dudedudeman>
Senjai: that has to suck. :( we're behind pretty strict NDA's, too, and i'm wondering how much of teh small amount of code i've written could be taken elsewhere and shown
<volty>
2^11
<dorei>
Senjai: well, if one cant give a textbook answer to this, one could code a small script to calculate it
<dudedudeman>
Senjai: what industry if you don't mind me asking?
sdothum has quit [Read error: Connection reset by peer]
<havenwood>
Senjai: I guess you're improving quickly. :)
<Senjai>
dudedudeman: Get written permission, and scrub the code of any specific references
<havenwood>
Senjai: But I implemented Elixir's unfold in Ruby, so uncheating!
<Senjai>
havenwood: That's a pretty unique solution
<Senjai>
havenwood: We had someone do Fib in Sass at our office
msnyon_ has quit [Ping timeout: 264 seconds]
<havenwood>
:O
<ljarvis>
needs some .lazy
<phat4life>
havenwood: is that a dp solutoin though
Xiti has joined #ruby
<Senjai>
havenwood: I typically just do the modulo approach.
<dudedudeman>
did they get hired doing that?
<Senjai>
I've never used Enumerator.unfold
<phat4life>
i can only think algorithimically in c++
<crankharder>
jhass: thanks for the link to that issue. have you found a working workflow? we started working on getting our entire org to update bundler, but devs*apps*gemsets == large number of bundler installs.
<crankharder>
havenwood: not all of them, i think this applies to anything using bundler though?
Ilyes512 has joined #ruby
<havenwood>
crankharder: If not Rails, just use a recent RubyGems and `gem i -g` (or the long form `gem install --file`) to resolve deps and create a Gemfile.lock.
decoponyo has quit [Quit: Leaving...]
hardlin3r has joined #ruby
<crankharder>
dont think we're talking about the same time
<jhass>
crankharder: until the commit by indirect referencing the issue at the end is released, no. And even then it'll mean updating everybody to bundler 1.10.4 or later
<crankharder>
*thing
<havenwood>
ah
bturker has quit [Remote host closed the connection]
<crankharder>
jhass: yea, a bunch of meh :/
<phat4life>
havenwood: i don't think that is a dynamic programming solution is it?
solars has joined #ruby
<volty>
could be nice something like, x bits, at most/least n successive 0 o 1's. so you can judge how much analytical and how much iterative skills the candidates posses
last_staff has quit [Quit: last_staff]
<crankharder>
jhass: seems kinda weird that the bundler directive was implemented differently than the ruby directive
mengu has quit []
<crankharder>
which is optional and doesn't magically update itself
<crankharder>
I feel like the bundler directive could've gone the same route
haxrbyte has quit [Ping timeout: 264 seconds]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crankharder>
...got a problem with version x.y.z of bundler? add a diretive and force an update on your app/team... otherwise? leave it alone.
J4R0D has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
<jhass>
crankharder: eh, I think you can read my opinion out of that thread pretty clearly, I feel little demand to discuss it further tbh ;)
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crankharder>
well, you didn't quit ruby over it ;)
simplyianm has joined #ruby
<jhass>
nah, that would've been unreasonable
haxrbyte has joined #ruby
wallerdev has joined #ruby
<jhass>
I might have forked bundler over it though
ScriptGeek has quit [Quit: Leaving.]
wildroman2 has joined #ruby
<havenwood>
I'm glad RubyGems has working dependency resolution. I've been happy using it.
vickleton has joined #ruby
<jhass>
I doubt it'll ever integrate all of bundlers usecases though
haxrbyte_ has joined #ruby
<havenwood>
phat4life: I don't think I understand the question regarding dynamic programming.
<havenwood>
phat4life: Someone else could probably answer that better.
<gambl0re>
im getting an error msg: NameError in AuthorSessionsController#create
<_blizzy_>
if I named a fiber 'life', would it be a life fiber
<gambl0re>
highlighting this line in my code " if login(params[:email], params[:password])"
<yorickpeterse>
?rails
<ruboto>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<gambl0re>
where is the name error?
<jhass>
?crosspost gambl0re
<ruboto>
gambl0re, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<gambl0re>
im using sorcery gem for authorization/authentication
<_blizzy_>
so, how does he post it to rails
<_blizzy_>
if he's posted it heres
<jhass>
_blizzy_: two minutes earlier
<ljarvis>
yorickpeterse: it's not
<_blizzy_>
jhass, oh
<havenwood>
_blizzy_: Time travel.
<yorickpeterse>
ljarvis: heh
<gambl0re>
help guys, thanks
<ljarvis>
yorickpeterse: yours?
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse>
ljarvis: pretty smooth actually
<yorickpeterse>
I hope to be writing a GC in it in the next few weeks
<_blizzy_>
hmm, I want to build something in ruby
<yorickpeterse>
:D
<_blizzy_>
I could work on my rails project, but I want something smaller atm
<yorickpeterse>
I actually have multi-threading in my VM now
simplyianm has quit [Read error: Connection reset by peer]
acovrig has quit [Ping timeout: 252 seconds]
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simplyianm has joined #ruby
shock_one has quit [Remote host closed the connection]
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
mike___1234 has joined #ruby
gianlucadv has quit [Ping timeout: 264 seconds]
stevednd has joined #ruby
chette has joined #ruby
DynamicMetaFlow has joined #ruby
DynamicMetaFlow has quit [Max SendQ exceeded]
quimrstorres has quit [Remote host closed the connection]
DynamicMetaFlow has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
Marsupermammal has joined #ruby
hazelux has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
joaomdmoura has joined #ruby
quimrstorres has joined #ruby
umgrosscol has quit [Remote host closed the connection]
freerobby has joined #ruby
gix has quit [Ping timeout: 272 seconds]
leafybasil has quit []
baweaver has quit [Remote host closed the connection]
DynamicMetaFlow has quit [Remote host closed the connection]
pragmatism has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
simplyianm has joined #ruby
yaw has joined #ruby
mdz_ has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 265 seconds]
yaw has quit [Max SendQ exceeded]
zacts|skool has joined #ruby
Musashi007 has joined #ruby
pragmatism has quit [Client Quit]
rombou has joined #ruby
quimrstorres has quit [Ping timeout: 265 seconds]
jcaho has quit [Read error: Connection reset by peer]
gix has joined #ruby
eneon has joined #ruby
eneon has left #ruby [#ruby]
aaeron has quit [Quit: Leaving.]
jcaho has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
simplyianm has quit [Read error: Connection reset by peer]
pragmatism has joined #ruby
yfeldblum has joined #ruby
postmodern has joined #ruby
simplyianm has joined #ruby
aaeron has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
ScriptGeek has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
EllisTAA has joined #ruby
jackjackdripper has joined #ruby
shock_one has joined #ruby
Alayde_ has quit [Ping timeout: 240 seconds]
gaboesquivel has joined #ruby
michaeldeol has quit [Ping timeout: 276 seconds]
dagda1 has joined #ruby
rodfersou has quit [Quit: leaving]
skade has joined #ruby
Pwnna has quit [Quit: mrrow~]
Alayde_ has joined #ruby
allomov has joined #ruby
aryaching has quit [Ping timeout: 256 seconds]
allomov has quit [Remote host closed the connection]
EllisTAA has quit [Quit: EllisTAA]
nisstyre has quit [Read error: Connection reset by peer]
EllisTAA has joined #ruby
jjasonclark has joined #ruby
EllisTAA has quit [Client Quit]
stephenh has quit [Ping timeout: 252 seconds]
mister_solo has joined #ruby
bronson has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
damir_ has quit [Ping timeout: 255 seconds]
shock_one has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.2]
pengin has joined #ruby
stephenh has joined #ruby
scripore has joined #ruby
ldnunes has quit [Quit: Leaving]
hedgecore has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has joined #ruby
EagleDelta has quit [Read error: Connection reset by peer]
<chette>
call me curious - does anyone here use ruby/sdl?
<Senjai>
?use
<ruboto>
Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
startupality has joined #ruby
<chette>
utilize?
jhooker has quit [Ping timeout: 264 seconds]
dopie has joined #ruby
crowell has quit [Quit: No Ping reply in 180 seconds.]
<jhass>
?anyone
<ruboto>
Just ask your question, if anyone has or can, they will respond.
<Senjai>
jhass: <3
<jhass>
worth a shot :P
nisstyre has joined #ruby
crowell has joined #ruby
crowell has quit [Changing host]
crowell has joined #ruby
freerobby has quit [Quit: Leaving.]
Musashi007 has quit [Quit: Musashi007]
<Senjai>
chette: At the very least I would assume that at least the author of the library uses it
<Senjai>
chette: But due to the computationally intensive nature of graphics development, ruby is generally a poor choice.
<jhass>
crystal has a nice sfml binding already
revath has quit [Ping timeout: 245 seconds]
<Senjai>
I like crystal, but I can't recommend it to anyone just yet.
<jhass>
well, it's a good time if you ever wanted to contribute to a developing ecosystem
<chette>
I know it's a 'poor choice', but I find that, if i'm not concerned with framerate and sweet AAA graphiXXX than, it's not hard to get the hang of
cvtsx has quit [Read error: Connection reset by peer]
ceigel has joined #ruby
niemc2 has quit [Quit: Leaving]
TheHodge has joined #ruby
axsuul has joined #ruby
<Senjai>
chette: Use pygame.
rbennacer has quit [Ping timeout: 252 seconds]
<chette>
plus, ruby will just get beter with age, right? I mean, I'm sure computers in the near futre are going to be so blazzing fast anyway
<Senjai>
chette: Ruby is fairly old already. Rails is new ish, but ruby has been around a while
<Senjai>
It's just not developed with that use case in mind
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
ruby is well 20 years old, soo...
<Senjai>
chette: If you want to use a high level language for graphics, again, I'd suggest python
<chette>
I use opengl for math . . . not really for game making.or high level graphics. just feedback
<Senjai>
Huh?
<jhass>
is python really still better in raw execution speed, taking possibly better bindings out of the factor?
<Senjai>
pygospa: I thought you didn't care about speed?
pragmatism has joined #ruby
<Senjai>
derp
<Senjai>
misping
<Senjai>
sorry
<Senjai>
jhass: It's mostly because pygame is excellent as a library
<Senjai>
jhass: I have no idea about speed
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<chette>
I don't care about speed, what I like is interoperability
<jhass>
I had a feeling that the difference isn't big anymore, but never checked
<Senjai>
jhass: ditto. I use either one for different problems
<chette>
I still use ruby sdl for raster manipulation
<Senjai>
:P
hinbody has quit [Quit: leaving]
kirun has quit [Quit: Client exiting]
<Senjai>
chette: I would just have a binary responsible for that, and shell out to it from ruby
<Senjai>
If you need the two to work together
acke has quit [Remote host closed the connection]
<Senjai>
zenspider: An... online workshop?
<Senjai>
would take
<chette>
yeah, Senjai, that's a good theory I've been working on
<Senjai>
for curiosity more than anything
<Senjai>
chette: Alternatively you could go the other way around, create a binary which runs ruby :P
<Senjai>
chette: But at that point, its better to use lua
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<chette>
but I don't know lua as well as I know ruby. plus I'm LAZY
doertedev has quit [Ping timeout: 265 seconds]
aaeron has quit [Quit: Leaving.]
Igorshp has joined #ruby
<zenspider>
chette: so... no?
<chette>
zenspider: do you find much interest in ruby+sdl?
Igorshp has quit [Remote host closed the connection]
<jhass>
in all seriousness though, if all you do is some basic arithmetic crystal should be good enough already, provide you with a familiar syntax and give you close to C speed
Igorshp has joined #ruby
<chette>
oh the code . . . I haven't posted it anywhere
pragmatism has joined #ruby
Igorshp has quit [Remote host closed the connection]
AndroUser has joined #ruby
<chette>
I could make it available but I should make it work with the latest versions first :)
<zenspider>
so, no. k
<Senjai>
chette: Just post it who cares about its condition
<chette>
thanks jhass
<Senjai>
90% of open source code is crappy :P
pragmatism has quit [Client Quit]
<jhass>
and 98% of all closed source? :P
AndroUser has quit [Client Quit]
<Senjai>
Crappier
<Senjai>
:p
Cache_Money has joined #ruby
aaeron has joined #ruby
<chette>
send me your email, zenspider, and I'll tell you when I've posted the code
x1337807x has joined #ruby
<jhass>
/msg MemoServ help
<zenspider>
chette: my username at gmail
JoshL has quit []
<zenspider>
thanks
<chette>
sure think
<zenspider>
ok. I need to go beat stuff up and get beat up. later.
startupality has quit [Quit: startupality]
ogpastal_ has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
ogpastaling has joined #ruby
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vickleton has quit [Quit: Ex-Chat]
mary5030 has quit [Remote host closed the connection]
DEA7TH has quit [Ping timeout: 240 seconds]
michaeldeol has joined #ruby
startupality has joined #ruby
msgodf has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enebo has quit [Quit: enebo]
zenguy_pc has quit [Ping timeout: 272 seconds]
mrmargol_ has quit [Remote host closed the connection]
msgodf has quit [Max SendQ exceeded]
michaeldeol has quit [Client Quit]
ogpastaling has quit [Ping timeout: 256 seconds]
nonparfumee has joined #ruby
yfeldblum has quit [Remote host closed the connection]
duderonomy has joined #ruby
failshell has quit []
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
zenguy_pc has joined #ruby
Notte has joined #ruby
Scroff has quit [Remote host closed the connection]
drocsid has joined #ruby
jaycee has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drocsid has quit [Changing host]
drocsid has joined #ruby
pragmatism has joined #ruby
patrickanth0ny has quit [Read error: Connection reset by peer]
finisherr has quit [Quit: finisherr]
michaeldeol has joined #ruby
patrickanth0ny has joined #ruby
saadq has joined #ruby
finisherr has joined #ruby
bosnia is now known as MAKOHYPE
Carnage\ has quit []
yfeldblum has joined #ruby
Wintooshock has quit [Ping timeout: 240 seconds]
Narzew has quit [Remote host closed the connection]
jaycee has joined #ruby
Wintooshock has joined #ruby
gluten_hell_ has joined #ruby
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
art-solopov has quit [Quit: Konversation terminated!]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<leafybas1l>
clear
nofxx has joined #ruby
havenwood has joined #ruby
blackmesa has joined #ruby
drewo has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
pullphinger has quit []
michaeldeol has quit [Ping timeout: 276 seconds]
kuribas has joined #ruby
musgravejw has joined #ruby
unshadow_ has joined #ruby
kuribas has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
simplyianm has quit [Read error: Connection reset by peer]
unshadow has quit [Ping timeout: 272 seconds]
simplyianm has joined #ruby
Rollabunna has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
doublemalt_ has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_blizzy_ has joined #ruby
Guest6 has joined #ruby
Guest6 is now known as Casty
platzhirsch has joined #ruby
phutchins has joined #ruby
startupality has quit [Quit: startupality]
ScriptGeek has left #ruby [#ruby]
_blizzy_ has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
_blizzy_ has joined #ruby
musgravejw has quit [Ping timeout: 245 seconds]
<shevy>
rescue
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<al2o3-cr>
rescue what?
<drocsid>
I have a program that I execute and it starts up and puts some output to STDOUT or STDERR, and after that accepts input from STDIN. I'd like to wait for some particular output from STDOUT, and then try to direct input to STDIN, and continue to capture output to STDOUT. I have a few methods which return the STDOUT, but I'm having issues getting past this point. Can someone help me reach my goal?
dgutierrez1287 has joined #ruby
Rollabunna has quit [Ping timeout: 245 seconds]
jjasonclark has joined #ruby
<shevy>
al2o3-cr rescue World; end
* platzhirsch
pokes shevy
<al2o3-cr>
shevy: come join #ruby-offtopic :)
mcclurmc has quit [Remote host closed the connection]
konieczkow has joined #ruby
<shevy>
no
<shevy>
I can have it here
<shevy>
:)
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
<jhass>
drocsid: used $stdout and $stdin, reset them to StringIO and simply read and write to them
<shevy>
I have a bad time schedule, I just woke up...
<al2o3-cr>
shevy: :)
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RandyT has joined #ruby
<jhass>
shevy: well, we do actually want to move the majority of the OT over there ;)
pdoherty has quit [Ping timeout: 250 seconds]
AlphaAtom has joined #ruby
<shevy>
ruby
shock_one has quit [Ping timeout: 276 seconds]
asteros has joined #ruby
krisquigley has joined #ruby
weszlem has quit [Ping timeout: 256 seconds]
<platzhirsch>
You just woke up
<drocsid>
jhass: do you hace a sample? Here's the code that I'm currently messing with:http://pastie.org/10242048
aapole has quit [Ping timeout: 246 seconds]
<drocsid>
The example that uses popen3 was written by somebody else. Not sure what's going on with (f == sout ? $stdout : $stderr).print f.read_nonblock(1024)
GPrime has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<drocsid>
I also was messing around with the popen4 example
RandyT has quit [Ping timeout: 255 seconds]
<shevy>
platzhirsch yeah; sorta feels weird... it's dark outside but I am already hacking away at ruby code \o/
simplyianm has quit [Read error: Connection reset by peer]
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<platzhirsch>
that's the way
<platzhirsch>
what are you working on
mdz_ has joined #ruby
krisquigley has quit [Ping timeout: 240 seconds]
quimrstorres has joined #ruby
<jhass>
drocsid: yeah that seems redundant, checking it for stdout/err vs stdin makes sense to decide to write or read
unshadow_ has quit [Read error: Connection reset by peer]
<shevy>
right now I work on the ruby code that governs installing/compiling stuff from source again
simplyianm has joined #ruby
unshadow has joined #ruby
<jhass>
drocsid: so basically you'd add stdin to the IO.select call (the wait for write ready param) and just write your stuff to it when ready
matp_ has quit [Quit: Bye!]
ec is now known as Elliott
<al2o3-cr>
shevy: managed Qt?
RandyT has joined #ruby
<shevy>
I was replacing in legacy code, things such as: if foo[-1,1] == '/' with foo.end_with? '/' ... somehow I find .start_with? and .end_with? more readable these days, dunno if that is common
<jhass>
only checking the first item in ready seems flawed too
veinofstars has quit [Quit: veinofstars]
<shevy>
al2o3-cr nope :( I got stuck with that smokeqt thing
Elliott is now known as Guest91772
<al2o3-cr>
shevy: :(
<volty>
shevy: what platform you are on?
Guest91772 is now known as ELLIOTTCABLE
aryaching has joined #ruby
<shevy>
al2o3-cr it is strange because I compiled all of kde from source here and it works
workmad3 has quit [Ping timeout: 252 seconds]
<shevy>
volty moment I put it on a pastie soon
<al2o3-cr>
shevy: strange indeed
<drocsid>
I mean here (f == sout ? $stdout : $stderr).print f.read_nonblock(1024) I don't really understand if I can check f.read_nonblock(1024) and write stdin, because I'm not familiar with these methods
rombou has quit [Quit: Leaving.]
matp has joined #ruby
nisstyre has quit [Changing host]
nisstyre has joined #ruby
<drocsid>
jhass: do you suggest I continue with the open3 example, or the open4 one?
<volty>
meanwhile: I can't load gems from inside c++ (using rb_eval etc etc) , the $LOAD_PATH is the same, any ideas ?
<shevy>
volty when it comes to C++ and ruby, hanmac is the man; he maintains the ruby bindings to wxwidgets
<drocsid>
I'm going to head off without internet pretty soon, just trying to get advice on how go about this and try to work on it while offline
<jhass>
drocsid: open3 gives you more control
bgmarx_ has joined #ruby
<jhass>
I think I gave my advice
<centrx>
There's an open4 now!?
<jhass>
nah, just a silly name
<jhass>
it's Kernel.spawn
<jhass>
drocsid: get the docs for open3 and IO.select
spyderman4g63 has quit [Ping timeout: 256 seconds]
<volty>
shevy: I got it working. have to require some stuff to check cross access. what could be manual initialization of gem handling? require 'gems' does not work
<jhass>
especially the open3 docs have quite a few samples
<drocsid>
jhass: thanks, I will do that, and consider your advice
Notte has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
<shevy>
centrx the number indicates improvement
quimrstorres has quit [Ping timeout: 265 seconds]
<shevy>
open5 will be the new generation
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<volty>
but forget if your is already shared, I'm bit tired
<shevy>
ah
<shevy>
no you may be right
<shevy>
I only seem to have libruby-static.a
mister_s_ has quit [Ping timeout: 272 seconds]
<volty>
yap
<shevy>
weird
<al2o3-cr>
why is that weird?
<volty>
he states there that he had to add that option (for rbenv, e.g.)
kahunaio has quit [Quit: Lost terminal]
<shevy>
al2o3-cr that I don't have a .so :)
<shevy>
recompiling ruby right now
devdazed has quit [Ping timeout: 252 seconds]
<al2o3-cr>
seems sane
northfurr has joined #ruby
<al2o3-cr>
shevy: you on debian?
drocsid has quit [Ping timeout: 245 seconds]
<shevy>
hmm linuxmint
mister_solo has joined #ruby
<al2o3-cr>
same
<baweaver>
Depends if it's the Ubuntu variant or not
jpfuentes2 has quit [Ping timeout: 264 seconds]
<al2o3-cr>
i mean same as debian as much
nym has quit [Quit: Connection closed for inactivity]
<volty>
how the new gem autoload system works ? I remember in the old versions I had to require gems (or similar) for them to start handling all of it. Any idea why gem feature doesn' t get loaded here (from c++) ?
finisherr has quit [Quit: finisherr]
<al2o3-cr>
simple is better
<volty>
working is better :)
<shevy>
hehe
<al2o3-cr>
that too :)
<jhass>
in 1.8 require "rubygems" was explicit, since ruby 1.9 that (exactly that, require "rubygems") is done on bootup by Ruby unless you specify --disable-gems
<jhass>
that's all
saadq has quit [Remote host closed the connection]
<Senjai>
If I want to return more than just the enumerable in a #detect
<Senjai>
what would be the best way to do that
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
<Senjai>
e.g. [1,2,3].detect {|n| n % 2 == 0; andlikeastringorsomething }
<Senjai>
crappy example
<volty>
jhass: a lot of thanks, I just required rubygems and it works. Later I am going to see why/what isn't initialized.
<Senjai>
but beyond reaching into variables outside the scope
<shevy>
ok now I have lots of ruby*.so files
deric_skibotn has joined #ruby
<volty>
Now I get «The exception was: '#<NameError: uninitialized constant Encoding::UTF_7>», but going forward. If you have hints, again, pls hint at me :)
<dfockler>
but I guess those are problems I'm facing today
<Ox0dea>
avdi: Really?
<baweaver>
all types of semantical hand waving and technicalities abound. There be dragons there.
<avdi>
Ox0dea: like I said: short answer.
<phat4life>
jhass: looks right
<Ox0dea>
avdi: Sure, but I'd expect the short answer to be "yes".
_seanc_ has joined #ruby
pragmatism has quit [Client Quit]
<baweaver>
Succinctly you can program in a functional manner in ruby and do a lot of functional things, but it's not a functional language by core.
<baweaver>
just heavily inspired by them
<jhass>
phat4life: btw you know the fibonacci hash? :P
<avdi>
Ox0dea: Ruby is OO through and through. It happens to have a surprising amount of functional sugar on top where it makes sense.
mdz_ has quit [Remote host closed the connection]
alphaatom|pc has quit [Ping timeout: 252 seconds]
<baweaver>
jhass: oi, be nice, that stuff is scary
<phat4life>
jhass: apparently not
<Senjai>
avdi: As in Avdi Grimm? (I think)
scripore has quit [Quit: This computer has gone to sleep]
<volty>
look, before reading anything about advanced techniques (I prefer this one), one should think by himself. Otherwise it is just filling with notions that you don't understand and can't find & implement real use cases.
<phat4life>
jhass: i can only think algorithmically in c
attlasbot has joined #ruby
Scroff has quit [Ping timeout: 245 seconds]
Igorshp has joined #ruby
<baweaver>
phat4life: probably fine for now, though you may try a hand at one of: Haskell, Scala, Clojure, Elixir
<avdi>
Ox0dea: although the funny thing is that a lot of the "functional stuff" (read: decent tools for manipulating collections by passing bits of code around) it inherits from Smalltalk, which is generally considered to be the quintessential OO language.
<al2o3-cr>
phat4life: if you can think like that, it should be a breeze in ruby
<volty>
and the example I found there (can't remember which book exactly) was quite idiot — handling of coctails
<phat4life>
baweaver: ive done ocaml
finisherr has quit [Quit: finisherr]
<avdi>
Senjai: yes, I am that Avdi
<dfockler>
like most of the Enumerable functions
<volty>
can' t find a more idiot idea when talking about OO