<|jemc|>
so eval bot is actually showing the double quote as a little faster
DonRichie has joined #ruby
<|jemc|>
but that's only for a simple assignment
kvirani has quit [Ping timeout: 276 seconds]
<|jemc|>
there are other things to take into account, as referenced on that stack overflow post
kil0byte has quit [Remote host closed the connection]
<sevenseacat>
benchmarking in ruby is awesome
<|jemc|>
but yeah, get friendly with the benchmarking lib
havenwood has joined #ruby
<Suit_Of_Sables>
the pickaxe book says the performace hit comes when constructing the string literal. It says that using "" requires ruby to check through the string for substitutions where as, most of the time, using '' does not
<Suit_Of_Sables>
I'll do some benchmarking :P
freerobby has quit [Quit: Leaving.]
<|jemc|>
well, the eval bot says the performance hit doesn't come until you actually have a subsitution inside
DonRichie has quit [Max SendQ exceeded]
<havenwood>
Suit_Of_Sables: I personally like the convention of '' unless interpolating. Performance doesn't come into my reasoning though. :P
<|jemc|>
it's possible the implementation has changed since the time of the book's publishing
<|jemc|>
in fact, it's quite likely
<Suit_Of_Sables>
|jemc|: I hope not, it came out like 3 months ago :o
DonRichie has joined #ruby
<Suit_Of_Sables>
it's the edition for 2.0
<sevenseacat>
+1 havenwood
<Suit_Of_Sables>
havenwood: I also like the look of single quotes
<|jemc|>
well, the benchmarking isn't going to lie, either way
<|jemc|>
but yeah, I tend to use the same stylistic convention
Targen has quit [Ping timeout: 245 seconds]
tjad has joined #ruby
<ehaliewicz>
so mri's getting a generational garbage collector?
<sevenseacat>
i may be ignorant in this, but i thought one of the biggest features of ruby 2 was a much-improved GC, and now they're rebuilding it again for 2.1?
<ehaliewicz>
sevenseacat: they used generational marking in 2.0 iirc
<havenwood>
sevenseacat: 2.0 added CoW friendliness to the existing mark-and-sweep. 2.1 proposes a major overhaul to generational.
<ehaliewicz>
this is full-blown generational collection as well
<ehaliewicz>
as far as i can tell
Bira has joined #ruby
brain_shim has joined #ruby
<havenwood>
sevenseacat: CoW being Copy-on-Write, memory friendly pre-fork.
<sevenseacat>
ah okay, cool, that gives me stuff to look into :P
DonRichie has quit [Quit: Verlassend]
<ehaliewicz>
yeah, garbage collection is pretty interesting
<havenwood>
indeed!
<|jemc|>
I wonder how much this is going to affect my ruby work on single core arm boards...
<|jemc|>
I've been hoping for another performance boost like I got with 2
<ehaliewicz>
i wouldn't even try to use ruby for something like that hha
<sevenseacat>
i havent done a lot of testing yet, but i found recently when upgrading an app from ree to 1.9.3 that the app actually got noticeably slower :/
soba has joined #ruby
<havenwood>
I'm pretty excited about 2.1 GC changes, but don't understand a lot of it yet.
Aryasam has quit [Ping timeout: 248 seconds]
BillCriswell has quit [Remote host closed the connection]
<|jemc|>
thanks for the link, btw, havenwood
<|jemc|>
hm. feature freeze this month according to one timeline in that pdf
<havenwood>
|jemc|: yup, but i think the term is used loosely based on the past
<havenwood>
|jemc|: major idea freeze*
axl_ has quit [Quit: axl_]
Aryasam has joined #ruby
<havenwood>
refinements to features still welcome, speaking of which i don't understand the new `using` in main with refinements not working
<sevenseacat>
i find the english slides done by someone not completely proficient in english to be endearing
<|jemc|>
I love it when foreign idioms get directly translated into to english instead of choosing a familiar idiom to english speakers. so cute.
<havenwood>
|jemc|: It does actually come out on Christmas, I didn't just mean it's an expected present. :O
<|jemc|>
are those dates more concrete, then?
dmiller has quit [Remote host closed the connection]
<havenwood>
|jemc|: Yup.
<sevenseacat>
the title collector vs the patch monster
Guest85570 has joined #ruby
jkline has joined #ruby
d34th4ck3r has quit [Quit: d34th4ck3r]
m00nlight has quit [Quit: Konversation terminated!]
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
chord_ has joined #ruby
chord_ has left #ruby [#ruby]
d34th4ck3r has joined #ruby
tkuchiki has joined #ruby
T_T has joined #ruby
bobinator60_ has quit [Quit: bobinator60_]
forced_request has quit [Read error: Connection reset by peer]
carlyle has joined #ruby
baroquebobcat has joined #ruby
NealJ has quit [Quit: :c]
brain_shim has quit [Ping timeout: 248 seconds]
<|jemc|>
ha. the 'shady' objects
rezzack has quit [Ping timeout: 260 seconds]
Urizen has joined #ruby
<Suit_Of_Sables>
do you guys perfer stabby lambdas or do you usually just us 'lambda' -> is nice but I like how what follows lambda looks like (at least to me) what I expect a block to look like
<sevenseacat>
i find the stabby syntax horrible
<ehaliewicz>
stabby is alright
zephdev has joined #ruby
Liothen has quit [Ping timeout: 276 seconds]
<ehaliewicz>
i prefer (lambda (args) body)
<ehaliewicz>
but i can live with ruby syntax
<Suit_Of_Sables>
sevenseacat: it's a shame you can't do something like: my_lambda = -> { |x| puts x }
iamjarvo has joined #ruby
<havenwood>
Suit_Of_Sables: I like stabby.
nignaztic has quit [Ping timeout: 260 seconds]
<Suit_Of_Sables>
ehaliewicz: Do you usually use the optional () when you code in ruby?
<ehaliewicz>
Suit_Of_Sables: for function calls?
<Suit_Of_Sables>
havenwood: I may have to use it just so I have an excuse to say "stabby lambda" more often
<ehaliewicz>
method calls
<ehaliewicz>
or method calls*
saarinen has quit [Quit: saarinen]
Targen has joined #ruby
<havenwood>
Suit_Of_Sables: Never using parens unless it breaks VM is typically called "Seattle style" as it's the convention used by Seattle Ruby Brigade.
jkline has quit [Quit: jkline]
funburn has quit [Ping timeout: 268 seconds]
<Suit_Of_Sables>
havenwood: Are they like a scary biker-gang of Rubyists?
<havenwood>
Suit_Of_Sables: Yes.
<ehaliewicz>
I skip the parens for anything that's like a getter, otherwise I usually use them
<ehaliewicz>
and parens for boolean expressions often
<ehaliewicz>
and i use return inside methods/functions quite a bit
carlyle has quit [Ping timeout: 245 seconds]
<Suit_Of_Sables>
ehaliewicz: &gasp8!
ananthakumaran has joined #ruby
<havenwood>
Suit_Of_Sables: They maintain certain fiefdoms of Rubyland, particularly RubyGems and Minitest.
<havenwood>
Suit_Of_Sables: (That are included in Ruby itself.)
<|jemc|>
23:04:30 ehaliewicz | i wonder how they're doing it with c extensions ...
<ehaliewicz>
Suit_Of_Sables: if it's not clear, i'll use a return
<Suit_Of_Sables>
ehaliewicz: I do agree an explicit return statement can make code easier to interperet at first glance
saarinen has joined #ruby
flaccid has joined #ruby
<ehaliewicz>
sometimes the syntax and everything that's implicit makes things unclear
<flaccid>
hmm is there a way to do puts 'yes' unless foo = (false||'false')
<|jemc|>
ehaliewicz: it looks like they're keeping backwards compatibility by allowing old style of garbage collection for 'shady' objects
jkline has joined #ruby
<flaccid>
oh woops, need == hehe
<havenwood>
ehaliewicz: in ruby the last line of a method being a return is never unclear
<ehaliewicz>
|jemc|: yeah that's what it looks like
<ehaliewicz>
havenwood: it can be easier to see at a glance with a return in front
<havenwood>
ehaliewicz: ew
<ehaliewicz>
havenwood: well, if you want nice syntax, you gotta use lisp :)
<Suit_Of_Sables>
my clinging to return is just something I got from other languages that I'll have to shake
<havenwood>
ehaliewicz: Ruby is a List for those who don't like so many parens.
<havenwood>
Lisp*
<ehaliewicz>
havenwood: it's missing some stuff
<ehaliewicz>
not a bad try though ;)
<havenwood>
ehaliewicz: Use Clojure when it isn't like-enough with JRuby. :P
<havenwood>
ehaliewicz: Macros...
Urizen has quit [Read error: Connection reset by peer]
<ehaliewicz>
haven't really used clojure but i probably should try it out at some point.
Urizen has joined #ruby
<ehaliewicz>
havenwood: and some other things, but that's a big one
<havenwood>
ehaliewicz: I'm about a week in, but really enjoying. Going through Project Euler. The ability to interact between JRuby and Clojure is awesome.
baroquebobcat has quit [Quit: baroquebobcat]
<|jemc|>
ooh Ruby 2.1 will also have inline Proc.call invocation
<|jemc|>
that happens to be big for me
<havenwood>
ehaliewicz: Can certainly get away with less efficient algos in Euler with Clojure than Ruby. Fast, fast.:P
<havenwood>
|jemc|: Inline? Whatcha mean?
sergicles has joined #ruby
<Suit_Of_Sables>
Has anyone here played with the Elixer languge? I was told it is a language I should look into if I like ruby and want to try an function language
<ehaliewicz>
clojure is cool, but i really like how close to the metal you can get with a good common lisp though. not as low as something like forth, but gotos and such are awesome with generated code
Spami has joined #ruby
zeade has joined #ruby
sergicles has quit [Client Quit]
<havenwood>
Suit_Of_Sables: Yeah, Clojure or Elixir are the two I'd consider for sure!
<havenwood>
Suit_Of_Sables: Or Haskell...
Spami has quit [Max SendQ exceeded]
dhruvasagar has quit [Ping timeout: 268 seconds]
Spami has joined #ruby
Spami has joined #ruby
<havenwood>
ehaliewicz: I hear ya with close-to-metal, but maybe access to JVM libs is more important for most cases.
carlyle has joined #ruby
<havenwood>
JVM/CLR/whatev
<Suit_Of_Sables>
havenwood: Leaning towards haskell, I'd like to be able to customize xmonad but I guess that isn't the best reason to choose a language before working with it a bit! >.<
<|jemc|>
havenwood: that's pretty much a direct quote from near the end of that pdf. I'm assuming it'll bring a performance boost for the proc#call operation
burlyscudd has joined #ruby
lfox has quit [Quit: ZZZzzz…]
<havenwood>
Suit_Of_Sables: Elixir was created by a Rubyist (Jose Valim) and is on the venerable Erlang VM. Really seems pretty sweet.
<ehaliewicz>
havenwood: for real-word stuff yeah, but for fun, bare metal coding is the best :)
postmodern has quit [Quit: Leaving]
<havenwood>
Suit_Of_Sables: Fast, Erlang concurrency model, as fast as Erlang and works with its libs.
<havenwood>
Suit_Of_Sables: If you're looking to implement another language or something low level it seems Haskell would be hard to beat. But Clojure and Elixir sure have some huge wins.
funburn has joined #ruby
baroquebobcat has joined #ruby
<ehaliewicz>
havenwood: armed bear common lisp runs on the jvm, never used it though
<havenwood>
<3 Ruby though most of all!!
bobinator60_ has joined #ruby
<havenwood>
ehaliewicz: interesting how JVM attracted so many Lisp dialects
deception_ has joined #ruby
zephdev has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 268 seconds]
zephdev has joined #ruby
mlpinit has joined #ruby
machuga is now known as machuga|away
<havenwood>
Clojure, Armed Bear, or the Schemes, Kawa and SISC
<Suit_Of_Sables>
havenwood: thanks for the advice!
<ehaliewicz>
yeah
nanoxd has joined #ruby
carlyle has quit [Remote host closed the connection]
browndawg has joined #ruby
brain_shim has joined #ruby
d34th4ck3r has quit [Quit: d34th4ck3r]
coderhs has joined #ruby
mlpinit has quit [Ping timeout: 264 seconds]
vxxr has quit [Quit: leaving]
cutmail has joined #ruby
Aryasam has quit [Ping timeout: 240 seconds]
bobinator60_ has quit [Quit: bobinator60_]
Aryasam has joined #ruby
devoldmx27 has quit [Ping timeout: 245 seconds]
nmabry has quit [Quit: nmabry]
kobain has quit []
deception_ has quit [Quit: Goodbye]
KobraKao has joined #ruby
deception has quit [Quit: Goodbye]
sayan has joined #ruby
Fezzler has joined #ruby
aeontech has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
Nogbit has joined #ruby
snovak has joined #ruby
devoldmx has joined #ruby
bricker`LA has quit [Ping timeout: 245 seconds]
parzo has joined #ruby
bricker`LA has joined #ruby
havenwood has quit [Ping timeout: 268 seconds]
snovak has quit [Ping timeout: 268 seconds]
bradhe has joined #ruby
cj3kim_ has joined #ruby
chopmo has joined #ruby
chopmo_ has quit [Read error: Connection reset by peer]
brunoro has quit [Quit: WeeChat 0.3.8]
Nisstyre-laptop has quit [Quit: Leaving]
mercwithamouth has joined #ruby
polaco is now known as polaco_zZz
Fezzler has quit [Quit: Leaving]
bradhe has quit [Ping timeout: 245 seconds]
Nisstyre-laptop has joined #ruby
Urizen has quit [Ping timeout: 268 seconds]
beneggett has joined #ruby
Fezzler has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
jkline has quit [Quit: jkline]
devoldmx3 has joined #ruby
kofno has quit [Ping timeout: 245 seconds]
thecodethinker has joined #ruby
<Suit_Of_Sables>
would someone care to comment on the depth of my folly and ignorance for thinking that a class's initialize method might just as well have been called 'new' instead as it is called with .new?
saarinen has quit [Quit: saarinen]
rins has quit [Ping timeout: 245 seconds]
<sevenseacat>
i did see a rubytapas episode on just that
devoldmx has quit [Ping timeout: 268 seconds]
aeontech has quit [Quit: aeontech]
Lewix has joined #ruby
baroquebobcat has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
<Suit_Of_Sables>
sevenseacat: Thanks, I'll try and track that down
kofno has joined #ruby
yacks has quit [Quit: Leaving]
<ehaliewicz>
Suit_Of_Sables: i always thought it was weird too
thecodethinker has quit [Ping timeout: 240 seconds]
<Suit_Of_Sables>
what do you folks use for making GUIs in ruby?
Bira has quit [Remote host closed the connection]
<jrobeson>
Suit_Of_Sables, a web browser
<jrobeson>
or at least at web browser component .. like qtwebkit
Clooth has quit [Ping timeout: 245 seconds]
kil0byte has joined #ruby
devoldmx has joined #ruby
fridim__ has quit [Ping timeout: 248 seconds]
mmitchell has quit [Remote host closed the connection]
devoldmx3 has quit [Ping timeout: 260 seconds]
aeontech has joined #ruby
Bira has joined #ruby
echevemaster has joined #ruby
devoldmx3 has joined #ruby
havenwood has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
d2dchat has quit [Remote host closed the connection]
dmiller has joined #ruby
ghr has joined #ruby
dmiller has quit [Remote host closed the connection]
Urizen has joined #ruby
bricker`LA has quit [Ping timeout: 268 seconds]
bricker`LA has joined #ruby
Fezzler has quit [Quit: Leaving]
Ubercow has joined #ruby
<Suit_Of_Sables>
jrobeson: I assume on can use qt or gtk or whatever libs they want but it will effect what platform your GUI will work with right?
aagdbl has joined #ruby
<jrobeson>
Suit_Of_Sables, for example?
<jrobeson>
i can't speak for the quality of the ruby bindings for gtk or qt
burlyscudd has joined #ruby
<jrobeson>
i don't use any apps built with them.. while i have more than a few built with the python bindings
<Suit_Of_Sables>
jrobeson: I just mean that if you make your GUI using qt it will have qt as requirments.
<jrobeson>
well yeah..
<Suit_Of_Sables>
as opposed to say gtk
<jrobeson>
qt and the bindings
<Suit_Of_Sables>
just not sure which platforms can/do handle which ones better O_o
Monie has joined #ruby
<jrobeson>
qt is likely better than gtk
<Boohbah>
s/likely //
pothibo has quit [Quit: pothibo]
<jrobeson>
well if your goal is integration with gnome stuffs it isn't
<jrobeson>
or other gtk programs
<jrobeson>
or if you're already familiar with C and glib
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
<Boohbah>
if your goal is portability it is
<jrobeson>
but that has not yet been stated
<jrobeson>
and also portability to what..
burlyscudd has quit [Ping timeout: 248 seconds]
<jrobeson>
gtk works fine on the major platforms
<jrobeson>
but it is more cumbersome to write imo
<Boohbah>
and if your goal is programmer pleasure?
<jrobeson>
Boohbah, once again.. not stated
<Boohbah>
hmm... guess we'll have to wait for Suit_Of_Sables
<jrobeson>
if the bindings were written well.. you might not even notice the difference
<jrobeson>
pleasurewise
<Boohbah>
this is true
<jrobeson>
Boohbah, i do agree that if one wasn't trying to do those thinsg is uggested.. or don't care about C vs C++ to be able to write extensions as needed.. then i would choose Qt
<Suit_Of_Sables>
Yeah, I guess i just have to explore the bindings I guess
<jrobeson>
Suit_Of_Sables, that's not as important as deciding where you want the app to live
<jrobeson>
on what platforms
<jrobeson>
really though.. i personally woudln't use ruby either..
<Boohbah>
web is the most portable platform
<jrobeson>
Boohbah, that's why i initially said.. i use a web browser as my GUI
<jrobeson>
and then after that suggested qtwebkit
krz has joined #ruby
krz has joined #ruby
krz has quit [Changing host]
<jrobeson>
which is what adium does for various parts of its interface
<jrobeson>
webkit i mean
<jrobeson>
not qtwebkit specfiically
atno has quit [Ping timeout: 248 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
<jrobeson>
there are still things that are hard to do with a web browser and http
<Boohbah>
this is true too
<jrobeson>
that list gets shorter.. since things like notification and hardware access are available
<Boohbah>
you can't write an operating system kernel in javascript... (maybe a really slow one)
<jrobeson>
sure you can
ssvo has joined #ruby
<jrobeson>
you'd have to develop alot of libraries though :)
<jrobeson>
Suit_Of_Sables, you really have to think about what the app is going to do.. and how it integrates in the OS before deciding between the two
<jrobeson>
and.. i still think using ruby is not the best idea..
<jrobeson>
the bindings don't have nearly the wide amount of usage compared to the python ones
pothibo has joined #ruby
krz has quit [Client Quit]
<Boohbah>
Suit_Of_Sables: what kind of app is it and who are the users?
atno has joined #ruby
<Suit_Of_Sables>
Boohbah: I just have some random ideas, nothing serious, nothing relating to a job. I just wanted to experiment with building GUIs
postmodern has joined #ruby
butblack has quit [Quit: butblack]
<Suit_Of_Sables>
I suppose linux based systems is where I'd like my apps to live. Though OSX would be nice too
baroquebobcat has quit [Quit: baroquebobcat]
<Boohbah>
what about android and ios?
d34th4ck3r has joined #ruby
vramana has joined #ruby
AdmiraI has joined #ruby
hardbit has joined #ruby
baroquebobcat has joined #ruby
pothibo has quit [Quit: pothibo]
baroquebobcat has quit [Client Quit]
butblack has joined #ruby
aeontech has quit [Quit: aeontech]
schaerli has joined #ruby
RichardBaker has joined #ruby
apeiros has quit [Remote host closed the connection]
coderhs has quit [Quit: Leaving]
jkline has joined #ruby
Splourian has quit [Quit: Leaving]
browndawg has left #ruby [#ruby]
snovak has joined #ruby
Teddy2steper has joined #ruby
<jrobeson>
Suit_Of_Sables, just wondering why you don't go straight for the web app then?
baroquebobcat has joined #ruby
schaerli has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
saarinen has joined #ruby
hamakn has quit [Remote host closed the connection]
mary5030 has joined #ruby
hamakn has joined #ruby
<Suit_Of_Sables>
jrobeson: Guess I've got some soul searchin' to do
io_syl has joined #ruby
jkline has quit [Quit: jkline]
<jrobeson>
not that there aren't valid cases in which to use qt/gtk and such..
dhruvasagar has joined #ruby
snovak has quit [Ping timeout: 259 seconds]
Teddy2steper has quit [Remote host closed the connection]
codecop has joined #ruby
twoism has joined #ruby
hamakn has quit [Ping timeout: 240 seconds]
twoism has quit [Remote host closed the connection]
tomsthumb_ has quit [Ping timeout: 264 seconds]
twoism has joined #ruby
ewnd9 has joined #ruby
mary5030_ has joined #ruby
mary5030 has quit [Read error: No route to host]
<Suit_Of_Sables>
ok, well here is an equally idiotic question: When implementing the <=> method in a class that includes Comparable, you might write: def <=>(other); self.inst_var <=> other.inst_var; end; my question is, is the <=> call in the method definition's body implied to be super? If not it looks like it would call the class's own <=> method and you would get infinite recursion. Like I said, a dumb question
ewnd9 has quit [Remote host closed the connection]
girija has joined #ruby
ssvo has quit [Ping timeout: 260 seconds]
ewnd9 has joined #ruby
Ripp__ has joined #ruby
jkline has joined #ruby
ewnd9 has quit [Remote host closed the connection]
mary5030_ has quit [Remote host closed the connection]
ewnd9 has joined #ruby
ewnd9 has quit [Remote host closed the connection]
mary5030 has joined #ruby
ewnd9 has joined #ruby
Aryasam has quit [Ping timeout: 264 seconds]
vramana has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0/20130803215302]]
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki>
Suit_Of_Sables: i am fully cognizant of that
krz has joined #ruby
<pontiki>
that's how i answered
Monie has quit [Ping timeout: 245 seconds]
schaerli has quit [Remote host closed the connection]
<jrhorn424>
|jemc|: great, that's going into bookmarks. thanks.
camilasan has joined #ruby
<pontiki>
every instance variable in a class has a class as well
<jrobeson>
|jemc|, thanks for that.. i didn't know about it either
ananthakumaran has joined #ruby
Stalkr_ has joined #ruby
<pontiki>
Suit_Of_Sables: have you looked at how you make your own class a comparable?
<jrhorn424>
wow, those are some really great articles that come up through symbol hound
<pontiki>
some examples?
<Suit_Of_Sables>
pontiki: ah ok, so if they are strings it uses the <=> method from the string class
<pontiki>
bingo
* sevenseacat
also bookmarks symbolhound
<Suit_Of_Sables>
pontiki: yeah that was an example of how I made my own class comparable. I should have realized the <=> in the definition would the one implemented in the class of what it was called on >.<
<pontiki>
as all methods are
<Suit_Of_Sables>
exactly, which is why I should have realized that T_T
butblack has quit [Quit: butblack]
osvico has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
hamakn has quit [Remote host closed the connection]
<luckyruby>
pontiki: thanks
hamakn has joined #ruby
<luckyruby>
my 3AM brain wasn't functioning properly and return seems obvious now
jumpingcloud has joined #ruby
cj3kim has quit [Remote host closed the connection]
snovak has joined #ruby
bradhe has quit [Remote host closed the connection]
Bosox20051 has quit [Read error: Connection reset by peer]
hamakn has quit [Ping timeout: 240 seconds]
twoism_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Nogbit has quit [Ping timeout: 260 seconds]
zarul has quit [Read error: Connection reset by peer]
Bosox20051 has joined #ruby
h_kon has joined #ruby
zarul has joined #ruby
snovak has quit [Ping timeout: 268 seconds]
twoism has quit [Ping timeout: 248 seconds]
camilasan has joined #ruby
twoism_ has quit [Ping timeout: 240 seconds]
tonni has joined #ruby
pkrnj has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
DanKnox_away is now known as DanKnox
tjad has joined #ruby
<xybre>
D: That code/concept makes baby heyzeus cry.
workmad3 has quit [Ping timeout: 268 seconds]
hamakn has joined #ruby
T_T has joined #ruby
<pontiki>
the throw/catch thing to mutate a loop? yeah.. ouch ouch ouch
h_kon has quit [Remote host closed the connection]
iliketurtles has quit [Quit: zzzzz…..]
Deele has joined #ruby
iliketurtles has joined #ruby
h_kon has joined #ruby
clocKwize has quit [Quit: clocKwize]
Nogbit has joined #ruby
<Nogbit>
does anyone know why HTTPI would choose to use HTTPClient on Linux Mint but on CentOS it tries to use NetHTTP.... (it fails with NetHTTP btw), and as I understand it HTTPI first tries to load HTTPClient then Curb then NetHTTP?
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
h_kon has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 264 seconds]
io_syl has quit []
ahawkins has joined #ruby
Clooth has joined #ruby
clocKwize has joined #ruby
iliketurtles has quit [Client Quit]
clocKwize_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
DanKnox is now known as DanKnox_away
ckampfe has quit [Ping timeout: 241 seconds]
marcgg has joined #ruby
alup has joined #ruby
h_kon has joined #ruby
buibex has joined #ruby
dash_ has joined #ruby
dangerousdave has joined #ruby
Aryasam has quit [Ping timeout: 268 seconds]
FastestMilkman has joined #ruby
claymore has joined #ruby
greenride has left #ruby [#ruby]
goleldar has quit [Ping timeout: 245 seconds]
TheRealPygo is now known as pygospa
AdmiraI has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrhorn424 has quit [Quit: Computer has gone to sleep.]
zz_michael_mbp is now known as michael_mbp
Xeago has joined #ruby
T_T has quit [Remote host closed the connection]
jumpingcloud has quit [Remote host closed the connection]
michael_mbp is now known as zz_michael_mbp
grzywacz has joined #ruby
tonni has quit [Read error: Connection reset by peer]
threesome has joined #ruby
Nogbit has quit [Ping timeout: 248 seconds]
Elhu has joined #ruby
jonkri has joined #ruby
jonkri has joined #ruby
jonkri has quit [Changing host]
gr33n7007h has quit [Ping timeout: 264 seconds]
parzo has quit [Ping timeout: 248 seconds]
burlyscudd has joined #ruby
Coffers has joined #ruby
luckyruby has quit [Remote host closed the connection]
lxsameer has joined #ruby
zarubin has joined #ruby
gr33n7007h has joined #ruby
<lxsameer>
hi is there any miltiline string identifier in ruby like (""" * """) in python ?
filipe has quit [Ping timeout: 268 seconds]
ewnd9 has quit [Read error: Operation timed out]
<apeiros>
lxsameer: a quoted string can span multiple lines just like that
<lxsameer>
apeiros: thanks
<apeiros>
available string literals: "", '', %{}, %Q{}, %q{}, <<HEREDOC (heredoc itself comes in several flavors, check e.g. zenspiders quickref for a list)
<agent_white>
I was going to say, my x value was set to nil
<xybre>
agent_white: ruby's parser "knows" about the x being set, so it initializes it. Its a little weird.
toah has joined #ruby
funburn has joined #ruby
s0ny123 has joined #ruby
burlyscudd has joined #ruby
levin has joined #ruby
nari has quit [Ping timeout: 265 seconds]
levin is now known as Guest29998
browndawg has joined #ruby
burlyscudd has quit [Ping timeout: 240 seconds]
toah has quit [Remote host closed the connection]
corpuscle has quit [Quit: WeeChat 0.4.1]
clocKwize has quit [Quit: clocKwize]
max9max has joined #ruby
noname001 has quit [Remote host closed the connection]
<max9max>
Hi all!
<hoelzro>
howdy
Kar- has quit [Read error: Connection reset by peer]
<obiwahn>
is there something like chop that only removes white spaces?
<coderhs>
xybre: thanks for the link.. most of the gems there i tried except blather let me have a look
<obiwahn>
ah chomp:)
clocKwize_ is now known as clocKwize
justsee has quit [Ping timeout: 248 seconds]
<coderhs>
hoelzro: ya, its not working much any more.. as i tried to collect to a jabber server, the desktop client and javascript client works but connecting using that library fails
<hoelzro>
I though chomp only removed newlines?
<max9max>
I'm deploying a rails 4 app in production and am having problems with asset hash suffixes. I have disabled config.assets.compile for production, and ran rake assets:compile. I can access an image directly like this: /assets/hero-site-description-bg-7fbacc801ece8283f9a7469344be3e69.jpg but requesting the image in an SCSS File like this: image-url("hero-site-description-bg.jpg") outputs the filename without the hash and leads to a 404.
<hoelzro>
coderhs: what kind of error message do you get?
<obiwahn>
ah oh i would have expected that to result in some sort of array or tuple directly on the other hand this is better for big ranges so you yield one item at a time:)
sjltaylor has joined #ruby
user__ has joined #ruby
<obiwahn>
ruby is quite nice:) and you guys here are friendly as well:))
user__ has left #ruby [#ruby]
MrZYX|off is now known as MrZYX
<shevy>
ruby is 90% perfect
<ekarlso>
obiwahn: converted from python ? ;)
max9max has left #ruby [#ruby]
obs has joined #ruby
moli has quit [Ping timeout: 264 seconds]
<obiwahn>
na - python is awesome and i get quite good around
<obiwahn>
but ruby seems to be a bit more flexible and i need it for puppet
andikr has quit [Remote host closed the connection]
snovak has joined #ruby
shredding has joined #ruby
nari has joined #ruby
moli has joined #ruby
cj3kim has joined #ruby
ayaz has quit [Read error: No route to host]
timonv has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 268 seconds]
timonv has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
nomenkun_ has joined #ruby
camilasan has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zephdev has quit [Remote host closed the connection]
ferdev has joined #ruby
<mva>
can anybody advice me, how can I fix 'invalid multibyte escape: /^\xFF\xFE/' error to "when /^\xFE\xFF/" condition? [in vpim gem, actually. It seems, it is incompatible with ruby20]
<hoelzro>
looks like someone set up you the BOM
relix has joined #ruby
<mva>
bundler? :)
<jrobeson>
lol
ayaz has joined #ruby
kayloos has quit [Remote host closed the connection]
Kar- has joined #ruby
schaerli has joined #ruby
tvw has joined #ruby
mrnugget has joined #ruby
mrnugget has quit [Client Quit]
Advocation has joined #ruby
mrnugget has joined #ruby
Kar- has quit [Read error: Connection reset by peer]
Kar- has joined #ruby
Advocation has quit [Client Quit]
locriani has joined #ruby
Aryasam has joined #ruby
tesuji has quit [Ping timeout: 248 seconds]
einarj has joined #ruby
Advocation has joined #ruby
locriani has quit [Ping timeout: 248 seconds]
dodosan has quit [Remote host closed the connection]
<shevy>
what do you guys think of using a hash that keeps all instance variables of a class, rather than make separate instance variables?
<shevy>
like rather than have @foo @bar @bla, these would become key-value pairs in one main hash
<hoelzro>
sounds like you'd incur an extra hash lookup
<canton7>
yeah I'm not really seeing the point. What's the advantage?
mrnugget has quit [Quit: mrnugget]
<hoelzro>
and if the implementation's compiler is smart enough, it could probably translate @foo, @bar, and @bla to offsets in an object
Aryasam has quit [Ping timeout: 240 seconds]
nfk has joined #ruby
<obiwahn>
to_c:))) nice
<ehaliewicz>
except they're going to be offsets to pointers anyway
yaymukund has quit [Ping timeout: 245 seconds]
<ehaliewicz>
there's so much indirection going on behind the scenes of any non-jitted ruby that it probably wont make much of a difference
<shevy>
canton7 right now I pass a hash to a class, which has about 12 entries. I am trying to reorganize the class so that I can initialize it both with such a hash, but also with something simple like a string, and it then builds me the data structures I need. So I started to assign instance variables for each entry... but right now I wonder if this is smart at all, because I need to write so many @ ... :(
<hoelzro>
all access to the objects would still be through pointers, true
<hoelzro>
I was thinking it might help to keep objects trimmer so you can fit more on a page, and thus more in your caches
<canton7>
shevy, so the class contains only data found in the hash?
machuga|away is now known as machuga
<shevy>
canton7 hmmmm good question... it kinda changed as the years passed by ... hehehe
<canton7>
if so, sounds like you've got a class and a hash basically doing the same thing, except that the former has methods
<canton7>
in which case... do you need the hash?
mikecmpbll has joined #ruby
schaerli has quit [Read error: Connection timed out]
zz_michael_mbp is now known as michael_mbp
<shevy>
The input could be a string or a hash, the problem is the class must run some sanitization on the dataset
<shevy>
but to give an example
<xybre>
I often subclass Hash and add methods to it.
<shevy>
things are like @hash['foo'] and I wonder if it is better or worse to change this to @foo
burlyscudd has joined #ruby
nfk has quit [Quit: yawn]
schaerli has joined #ruby
<xybre>
Then most of that is done for you. You can tweak the initializer and []= methods at will.
vince_prignano has joined #ruby
odinswand has joined #ruby
<odinswand>
sgoin on
andikr has joined #ruby
xeon has joined #ruby
<shevy>
when I asked here some days ago, I was told that it is not good to subclass Hash ... :P
xeon has quit [Max SendQ exceeded]
odinswand has quit [Client Quit]
timonv has quit [Remote host closed the connection]
<shevy>
(but for another project)
persand has joined #ruby
<ehaliewicz>
it's actually pretty fun to implement classes and methods with closures
<ehaliewicz>
if you're into the whole reinventing the wheel thing
xeon has joined #ruby
xeon has quit [Max SendQ exceeded]
<xybre>
If I want a hash-like object I shouldn't have to reimplement an innefficient version of it.
<xybre>
I also use the Hashie gem pretty often when I want some specific set of functionality.
<canton7>
xybre, it took me a solid 5 minutes of googling different keywords to find the damn thing. It's impossible to remember what search terms to use...
<canton7>
xybre, but yeah, there are a ton of them out there. The page I linked has a good list of alternatives iirc
BillCriswell has quit [Remote host closed the connection]
mlpinit has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
<obiwahn>
another question:)
emergion has joined #ruby
pkrzywicki has quit [Read error: Operation timed out]
<xybre>
canton7: yeah I went through that list, most of them are unmainted since like 2009 or before
<xybre>
unmaintained^
<canton7>
aah, fair enough
<canton7>
shasme
<canton7>
*shame
<xybre>
So I stuck to things updated in the last year
clocKwize_ is now known as clocKwize
emergion has joined #ruby
<canton7>
not that I'd necessarily discard them for that - they might just have reached a mature state. the task they're doing hasn't changed for a long, long time
emergion has quit [Max SendQ exceeded]
BillCriswell has joined #ruby
emergion has joined #ruby
sparklr has quit [Read error: Operation timed out]
<xybre>
Yeah, but if they've not been touched in 4 years they probably won't work with Ruby 2.
<xybre>
And since everything I develop uses Ruby 2 pretty much, that means they're not teribly useful to me.
blackmes1 has quit [Ping timeout: 240 seconds]
bugsinlights has joined #ruby
liquidogenous56 has quit [Quit: liquidogenous56]
<canton7>
really? I'd be interested to see. Ruby 2 doesn't break that much
stonesmatch18 has joined #ruby
tdm4 has joined #ruby
banister`gym has quit [Read error: Connection reset by peer]
<tdm4>
I need help installing something.. and it's saying bundler isn't installed.. but.. it is! http://pastebin.com/DRxiV8Lx thanks :)
banisterfiend has joined #ruby
io_syl has joined #ruby
<xybre>
tdm4: why are you using the full paths?
buibex_ has quit [Remote host closed the connection]
<xybre>
canton7: it breaks a lot compared to 1.8 whic hwas still common 4 years ago
<tdm4>
xybre: using rvm in /usr/local/rvm to install ruby 2.0.0
emergion has quit [Ping timeout: 254 seconds]
<tdm4>
separate to system's ancient 1.8.7
dawkirst has quit [Ping timeout: 245 seconds]
<tdm4>
just wondering why it complains bundler isn't there when it clearly is
<tdm4>
how do I get the system to see it's actually there?
<xybre>
tdm4: it doesn't look like you are using rvm correctly
dawkirst has joined #ruby
<tdm4>
what should I do then?
emergion has joined #ruby
<xybre>
Did you put `source $HOME/.rvm/scripts/rvm` in your shell configuration or at least run it in your current shell?
io_syl has quit [Client Quit]
lurch_ has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
<tdm4>
there is no $HOME/.rvm
<tdm4>
basically I'm trying to get puppet to install ruby 2.0.0, rails 3.2.13 and redmine 2.3.3
mklappstuhl has joined #ruby
Stygia has joined #ruby
emergion has quit [Max SendQ exceeded]
<tdm4>
and it manages to install ruby 2.0.0 and rails.. and all.. but complains about bundler not being there when it is
haxrbyte has quit [Read error: Connection reset by peer]
dangerousdave has quit [Quit: Leaving...]
<MrZYX>
because your $GEM_PATH etc doesn't include it
emergion has joined #ruby
blackmes1 has joined #ruby
<MrZYX>
because you didn't select the installed ruby with rvm use
<tdm4>
I wonder.. do I have to make a @redmine set?
emergion has joined #ruby
<MrZYX>
you don't have to
<tdm4>
gem list shows them being in local
<tdm4>
ok
emergion has quit [Max SendQ exceeded]
emergion has joined #ruby
<obiwahn>
!doc Hash
snovak has joined #ruby
haxrbyte has joined #ruby
<tdm4>
hmm these instructions must be wrong for redmine then.. bundle --gemfile switch doesn't work anymore?
Elhu has quit [Quit: Computer has gone to sleep.]
Apocalypse has quit [Ping timeout: 260 seconds]
coderhs has joined #ruby
kayloos has joined #ruby
<tdm4>
I'm totally lost here.. I've never used ruby before.
<tdm4>
this gem stuff gives me a headache :(
jkamenik has joined #ruby
Apocalypse has joined #ruby
Ubercow has quit [Quit: Computer has gone to sleep.]
kayloos has quit [Remote host closed the connection]
funburn has quit [Quit: funburn]
g0bl1n has joined #ruby
g0bl1n has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
sparklr has joined #ruby
hanmac has joined #ruby
snovak has quit [Ping timeout: 240 seconds]
stonesmatch18 has quit [Ping timeout: 268 seconds]
emergion has quit [Ping timeout: 247 seconds]
<shevy>
but it does not seem you have only gem to blame, you also seem to use RVM and bundler
<xybre>
Redmine does an awful lot, and I don't know if setting that up is going to be in your best interests. Reading the RVM documentation for how to install and use it would be helpful though.
emergion has joined #ruby
emergion has quit [Max SendQ exceeded]
dangerousdave has joined #ruby
emergion has joined #ruby
girija has quit [Ping timeout: 240 seconds]
emergion has quit [Max SendQ exceeded]
buibex has joined #ruby
<xybre>
If you're on Linux and don't want to use Vim then Sublime is fine. Gedit should be good enough to get started with.
<shevy>
\o/
ffranz has joined #ruby
mark_locklear has joined #ruby
emergion has joined #ruby
mmitchell has joined #ruby
AndChat| has joined #ruby
emergion has quit [Max SendQ exceeded]
emergion has joined #ruby
<xybre>
I really don't see the appeal of the "IDE" concept. But maybe thats because I've spent 7 years writing Ruby and not Java.
schaerli has quit [Remote host closed the connection]
krz has quit [Quit: krz]
<shevy>
it depends
emergion has quit [Max SendQ exceeded]
<shevy>
if the IDE would be integrated and a component of the overall operating system, like the unix philosophy, then it wouldn't be bad
stonesmatch18 has joined #ruby
dkamioka has quit [Remote host closed the connection]
<xybre>
Well, thats what I have the GNU tools, bash/zsh, and vim for.
kayloos has joined #ruby
emergion has joined #ruby
krz has joined #ruby
krz has quit [Client Quit]
tdm4 has left #ruby [#ruby]
<shevy>
and where is the GUI in your chain? :P
<hanmac>
sometimes, when you have bigger projects with more than 200files, or maybe an binding that transports one library from one language into an other its better to have an IDE that manages that for you
emergion has quit [Max SendQ exceeded]
<shevy>
I still don't know how hanmac can manage to have so many files open
<xybre>
shevy: Its not, except for my terminal and my browser (and gvim).
jibi has quit [Quit: .]
emergion has joined #ruby
dash_ has quit [Quit: dash_]
<xybre>
I've dealt with hgue projects without a problem.
emergion has quit [Max SendQ exceeded]
<hanmac>
shevy i have enough RAM ;P
gr33n7007h has joined #ruby
girija has joined #ruby
<xybre>
I'm pretty sure ctags and ack are going to get me what I want as fast or faster than an IDE tool.
emergion has joined #ruby
emergion has quit [Max SendQ exceeded]
hogeo has quit [Remote host closed the connection]
funburn has joined #ruby
emergion has joined #ruby
jlebrech has joined #ruby
emergion has quit [Max SendQ exceeded]
Apocalypse has quit [Ping timeout: 260 seconds]
emergion has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
emergion has quit [Max SendQ exceeded]
mklappstuhl has joined #ruby
emergion has joined #ruby
emergion has quit [Max SendQ exceeded]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ewnd9 has joined #ruby
emergion has joined #ruby
lkba has joined #ruby
emergion has quit [Max SendQ exceeded]
Apocalypse has joined #ruby
buibex has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
<hanmac>
m i think Date/Time and DateTime should get funny enumerator methods … so you can so "the next N months" (and it iterates over the months not all the dates)
NealJ has joined #ruby
hanmac has quit [Read error: Connection reset by peer]
hanmac has joined #ruby
cj3kim has joined #ruby
<mikecmpbll>
MrZYX: my bad, thought i was in #rubyonrails, haha.
Ox6abe has quit [Remote host closed the connection]
<jocke_>
what are some good screencasts on application design and structure (possibly going to patterns as well)? ruby would be preferable, but it's not a must
Kar- has joined #ruby
cj3kim has joined #ruby
hogeo has quit [Ping timeout: 248 seconds]
<sweeper>
what are the rules about assignment causing data to be copied instead of referenced?
<hanmac>
jocke_: i think you mean rails right? #rubyonrails
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<jocke_>
hanmac: not necessarily, but i will try my luck there as well :)
iamjarvo_ has joined #ruby
Cyrus has quit [Quit: Cyrus.sleep()]
iamjarvo has quit [Read error: Connection reset by peer]
<mjc_>
hm. I have a hash names = {"name" => "Foo Bar", "code" => "FB"}; I'm trying to turn it into { "Foo Bar" => "FB"}
kayloos has quit [Write error: Broken pipe]
dkamioka has joined #ruby
sarkis has joined #ruby
<lupine>
the best you could say of it is that it has a documentary effect
<mjc_>
names.map { |x| { x["name"] => x["code"] }.inject(:merge) seems to work
<mjc_>
is there a more rubyish way to do that?
<lupine>
but it's not a very good thing
<hanmac>
Todd, sometimes its nesssary to catch this exceptions … specially when its unknown when they will be raised
<havenwood>
Todd: I'd vote that you should put a second `begin...rescue` inside the first rescue, and re-raise a second time. (Just for dramatic effect.)
<Todd>
I'm deleting this nonsense
<havenwood>
Or that.
headius has quit [Quit: headius]
cawing01 has quit [Ping timeout: 248 seconds]
jbrechtel has joined #ruby
<waxjar>
Hash[*names.values]
headius has joined #ruby
RORgasm has joined #ruby
girija has quit [Read error: Connection reset by peer]
pzula has joined #ruby
* hanmac
raise his fist :" lets rescue all exceptions and raise them again" ;D
vlad_starkov has quit [Remote host closed the connection]
<MrZYX>
but only raise them again after election ;)
tobago has quit [Remote host closed the connection]
<tobiasvl>
hanmac: i'll rescue that fist and raise it again!
jbrechtel has quit [Remote host closed the connection]
<hanmac>
xDD
cawing01 has joined #ruby
rins has joined #ruby
<Todd>
I'm gonna add a few more puts inside the nested begins
<Todd>
again, for dramatic effect
<sweeper>
so, when does assignment involve a copy, and when doesn't it, in ruby?
workmad3 has joined #ruby
dkamioka has quit [Remote host closed the connection]
zeade has quit [Quit: Leaving.]
<MrZYX>
hm, never?
<sweeper>
ah, k
ner0x has joined #ruby
sr78ger has joined #ruby
sr78ger has quit [Max SendQ exceeded]
<s2r2>
hi #ruby. Is there any specific documentation on hypermedia APIs and lostisland/sawyer? I got the strong feeling that it is a great fit for some API I'm trying to interact with, but I fail with some details (I can't have it read the schema...)
pzula has quit [Read error: Connection reset by peer]
blackmes1 has quit [Ping timeout: 240 seconds]
sr78ger has joined #ruby
<sweeper>
troubleshooting a method that seems to have problems with large files
tonni has quit [Read error: Connection reset by peer]
<sweeper>
no errors, just terrible performance, and the code is pretty specific. I know what I'm looking for (something that causes a copy, or otherwise iterates over the file)
s0ny123 has quit [Quit: leaving]
mansi_ has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
negaduck has quit [Quit: negaduck]
<Morrolan>
Reading the whole file into memory at once?
<momomomomo>
sweeper: You want to copy a file if it exists, or you want to iterate over it? Which
blackmes1 has joined #ruby
<sweeper>
neither, natch
mklappstuhl has joined #ruby
dkamioka has joined #ruby
Targen_ has joined #ruby
Targen has quit [Ping timeout: 264 seconds]
<workmad3>
sweeper: so you're looking to optimise... have you run ruby-prof over your code to identify what is actually causing the slowdowns?
cutmail has quit [Remote host closed the connection]
<sweeper>
Morrolan: well given current arch, it needs to be in memory (bad I know), but I want to make sure it's only there once, and we're not doing anything stupid
<workmad3>
sweeper: or are you just guessing that it's something to do with unnecessary copying of strings?
toah has joined #ruby
<sweeper>
workmad3: well I know what method is slow, I'll try profiling it locally...
axl_ has joined #ruby
<workmad3>
sweeper: just loading a large file into memory can be harsh on performance ;)
Desert_eagle has joined #ruby
dhruvasagar has quit [Ping timeout: 268 seconds]
<sweeper>
workmad3: well it's coming in an http request, to a rails app, so not a whole lot I can do atm without reworking the entire infrastructure
thecodethinker has joined #ruby
platzhirsch has quit [Ping timeout: 264 seconds]
<sweeper>
(from ngnix/haproxy, I'm not waiting on a slow client)
mansi_ has quit [Remote host closed the connection]
ehaliewicz has joined #ruby
nbouscal has joined #ruby
v0n has joined #ruby
renanoronfle has quit [Quit: This computer has gone to sleep]
mansi_ has joined #ruby
baroquebobcat has joined #ruby
Urizen has quit [Ping timeout: 268 seconds]
nbouscal has quit [Client Quit]
ixx is now known as lyd
freerobby has quit [Quit: Leaving.]
lyd is now known as ixx
toah has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
Xiti has quit [Quit: Leaving]
Squarepy has joined #ruby
<OneMT>
I want to save every 1000 key value pairs to a json file. Can I clear the array and repeat? And do I need to increment the file name or will it create emails-1 etc.. ?
mklappstuhl has joined #ruby
brain_shim has joined #ruby
sambao21 has quit [Ping timeout: 258 seconds]
Nogbit has quit [Read error: Operation timed out]
dyoung522 is now known as DonovanYoung
mvangala has quit [Remote host closed the connection]
<mikecmpbll>
OneMT: have you tried anything yet?
mvangala has joined #ruby
brain_shim has quit [Max SendQ exceeded]
ehaliewicz has quit [Ping timeout: 245 seconds]
brain_shim has joined #ruby
tabolario has joined #ruby
<OneMT>
Yes I've tried checking the count over 999 and saving the file. But the count continues and it doesn't write anything after the initial 1000 count.
bradhe has joined #ruby
nfk has quit [Quit: yawn]
mansi_ has quit [Read error: Connection reset by peer]
mansi__ has joined #ruby
dhruvasagar has joined #ruby
burlyscudd has joined #ruby
<OneMT>
mikecmpbil, So I figure a way to make sure I'm getting all the files and writing every 1000 count is to clear and repeat.
JohnBat26 has quit [Read error: Operation timed out]
iamjarvo has quit [Remote host closed the connection]
sloucher has joined #ruby
schaerli has quit [Remote host closed the connection]
iamjarvo has joined #ruby
bricker`LA has quit [Ping timeout: 240 seconds]
bradhe has quit [Remote host closed the connection]
bricker`LA has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
Guest85570 has quit []
<Morrolan>
OneMT: Do you want to write every thousandth, or in batches of 1000?
<OneMT>
morrolan, batches
RichardBaker has joined #ruby
sambao21 has joined #ruby
<waxjar>
mikecmpbll, did you used to hang out in a channel called #indie?
tkuchiki has quit [Remote host closed the connection]
devdazed has quit [Quit: Bye]
iamjarvo has quit [Ping timeout: 256 seconds]
<mikecmpbll>
waxjar: i didn't, but i like the sound of it.
<Morrolan>
OneMT: Then #each_slice(1000) will get you arrays containing 1000 items each. Loop over those, and write them to a file.
<waxjar>
ah nvm then, thought i recognized the name
filipe has quit [Remote host closed the connection]
<Morrolan>
OneMT: If you want to write to files à la output_1.json, output_2.json (i.e. with an incrementing number in there), you could use #with_index to avoid having to manually increment a variable. (This isn't Java, after all)
mikepack has quit [Read error: Connection reset by peer]
Squarepy has quit [Ping timeout: 245 seconds]
Teddy2steper has joined #ruby
mikepack has joined #ruby
ScottRadcliff has quit [Remote host closed the connection]
<Morrolan>
#each_with_index, sorry.
Teddy2st_ has joined #ruby
devdazed has joined #ruby
timonv has quit [Remote host closed the connection]
sambao21 has quit [Ping timeout: 245 seconds]
thecodethinker has quit [Ping timeout: 264 seconds]
dagobah has quit [Remote host closed the connection]
Teddy2steper has quit [Ping timeout: 264 seconds]
snovak_ has quit [Remote host closed the connection]
Voodoofish430 has joined #ruby
lfox has quit [Quit: ZZZzzz…]
burlyscudd has quit [Quit: Leaving.]
mlpinit_ has quit [Remote host closed the connection]
DanBoy has quit [Remote host closed the connection]
snovak has joined #ruby
kayloos has quit [Remote host closed the connection]
Squarepy has joined #ruby
mlpinit has joined #ruby
senayar_ has joined #ruby
<OneMT>
morrolan, each with index instead of each slice?
threesome has joined #ruby
<Morrolan>
Oh, no, in addition to each_slice.
<OneMT>
morrolan, oh wait no, but
<Morrolan>
each_slice will give you slices of the desired length, each_with_index will enumerate them with an index.
<havenwood>
BraddPitt: Definitely no parens on methods like #puts, that is agreed upon convention. For other methods, omitting parens when possible is often referred to as "Seattle style" since that is a convention of Seattle Ruby Brigade.
Maokomioko has joined #ruby
apeiros has joined #ruby
sambao21 has joined #ruby
Maokomioko is now known as maoko
<havenwood>
BraddPitt: Both ways are common.
<BraddPitt>
hmmm
<BraddPitt>
okay
<BraddPitt>
thanks for the link jkamenik I will watch in a sec
gallon|w has joined #ruby
<hanmac>
it depends if you want to use an method on the object ….. meth(arg).func is better than (meth arg).func
<havenwood>
best argument i've heard for using more parens is ease of refactoring, but i like the look of fewer
kayloos has quit [Ping timeout: 245 seconds]
sr78ger has quit [Ping timeout: 268 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
<|jemc|>
ha. "seatlle style"
Es0teric has joined #ruby
momomomomo has quit [Quit: momomomomo]
Ox6abe has joined #ruby
<|jemc|>
that's entertaining to me, being from seattle (but not affiliated with seattle.rb)
burlyscudd has joined #ruby
Es0teric has quit [Max SendQ exceeded]
dash_ has joined #ruby
sambao21 has quit [Client Quit]
Teddy2steper has joined #ruby
<hanmac>
same for spaces, you can try to avoid them so 3+4 works the same as 3 + 4 … you need to find an good way between them
alekst has quit [Quit: Computer has gone to sleep.]
<hanmac>
like this: "[].any?? ?a:?b" its works but it is not so much readable ;D
ffranz has joined #ruby
nuba_ is now known as nuba
zastern has joined #ruby
burlyscudd has quit [Ping timeout: 261 seconds]
Urizen has joined #ruby
ukd1 has joined #ruby
platzhirsch has joined #ruby
rackburn has joined #ruby
<Eiam>
I generally prefer parens but I don't put it on things like puts =)
<Eiam>
or chains
<Eiam>
like .flatten.compact
thecodethinker has joined #ruby
<platzhirsch>
I have a 350 MB JSON dump file, which consists of 20 JSON arrays each having again 1000 objects. I need to parse them in order to create an object containing an array with all of these 20k objects. On a 1 GB machine this hits the memory limits quickly, even with Yajl::Parser. Any idea how to approach this?
Nogbit has quit [Ping timeout: 245 seconds]
SiliconDon has joined #ruby
workmad3 has joined #ruby
<Eiam>
parse each array one at a time?
<hanmac>
Eiam: yeah but when the function needs parameter AND you want to chain them you need () … in one way or another
<Eiam>
right, .flatten(1).compact
snovak_ has quit [Remote host closed the connection]
<platzhirsch>
Eiam: yes, the problem is I nwould need a stream based JSON encoding and it seems no JSON parser library supports that, the all assume you start with the JSON object in memory...
DanBoy has quit [Remote host closed the connection]
<Eiam>
I feel like () shows intent better than spaces
shaunbaker has quit [Remote host closed the connection]
<Eiam>
yajl supports streaming
<Eiam>
but that wasn't working?
<onewheelskyward>
How did you end up with a 350mb json file?
<platzhirsch>
it does, but apparently not encoding with a streamed inptut
shaunbaker has joined #ruby
<Eiam>
onewheelskyward: ? thats not bad..
jbpros has joined #ruby
<Eiam>
I've seen (and have) bigger
Astralum has quit [Ping timeout: 268 seconds]
shanlar has joined #ruby
snovak has joined #ruby
<platzhirsch>
The Yajl Parser parse method can take an IO object, which is great. But the encode method expects a hash
<platzhirsch>
or maybe I haven't spotted it yet.. crawling deeper
<onewheelskyward>
neat, platzhirsch
c0rn has joined #ruby
Admiral has joined #ruby
johnjohnson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
AdmiraI has quit [Ping timeout: 260 seconds]
<platzhirsch>
oh, I guess I am mistaken, it is possible to instantiate the Yajl encoder and encode based on a block
tziOm has joined #ruby
<platzhirsch>
" The encoder will do its best to hand you data in chunks that are around 8kb"
<platzhirsch>
I hope this is what I want, that would make me happy and my crappy Linode hardware :P
SiliconDon has quit [Ping timeout: 256 seconds]
chopmo has joined #ruby
peregrine81 has quit []
echevemaster has joined #ruby
Fire-Dragon-DoL has left #ruby [#ruby]
corpuscle has quit [Quit: WeeChat 0.4.1]
<platzhirsch>
onewheelskyward: Yeah, and it's really not getting better. The US CKAN instance has 100,000 datasets. So probably something over 1 GB, uncompressed. I just consumes hour to harvest the data. I wish everyone would offer a static dump to download
<onewheelskyward>
wowser.
<onewheelskyward>
Data is a big problem.
cina has quit [Quit: leaving]
ryannielson has joined #ruby
saarinen has joined #ruby
cj3kim_ has quit [Remote host closed the connection]
zarubin has joined #ruby
s2013 has joined #ruby
<s2013>
im having trouble understanding the diffrence between collect and map
<platzhirsch>
Using .collect is bad luck, as opposed to .map which gets you lucky
vmoravec has joined #ruby
aaronmcadam has quit [Quit: Leaving...]
<s2013>
im just going through all the functionalities now
jbpros has joined #ruby
jonkri has quit [Quit: BBL!]
jbpros has quit [Client Quit]
false_economy has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 256 seconds]
workmad3 has quit [Read error: Operation timed out]
dsabanin has joined #ruby
false_economy has joined #ruby
clov3r has quit [Remote host closed the connection]
geekbri has quit [Remote host closed the connection]
peregrine81 has quit []
maoko has quit [Remote host closed the connection]
shredding has quit [Quit: shredding]
Ox6abe has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
johnjohnson has joined #ruby
kevind_ has joined #ruby
atmosx has joined #ruby
cescalante is now known as ce_afk
Soda has quit [Ping timeout: 240 seconds]
aagdbl1 has joined #ruby
g0bl1n has quit [Quit: Ex-Chat]
rdark has quit [Quit: leaving]
iamvery has joined #ruby
g0bl1n has joined #ruby
geekbri has joined #ruby
dangerousdave has joined #ruby
kevind has quit [Ping timeout: 276 seconds]
kevind_ is now known as kevind
aagdbl1 is now known as aagdbl
alex__c2022 has joined #ruby
jkline has joined #ruby
devdazed has quit [Quit: Bye]
devdazed has joined #ruby
<BraddPitt>
you can recursively call initialize, right?
svector has quit [Ping timeout: 245 seconds]
soheil has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
tomsthumb has joined #ruby
locriani has joined #ruby
mm__ has joined #ruby
Soda has joined #ruby
a1ph4g33k has joined #ruby
mmm has quit [Ping timeout: 252 seconds]
dodosan has joined #ruby
mengu has joined #ruby
elk_tamer has joined #ruby
locriani has quit [Ping timeout: 240 seconds]
<elk_tamer>
is there an #askrubyquestions channel or is this a fair game place to ask?
gr33n7007h has quit [Changing host]
gr33n7007h has joined #ruby
jdenen has quit [Ping timeout: 264 seconds]
alvaro_o_ has joined #ruby
mklappst_ has joined #ruby
jdenen has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
dangerousdave has quit [Read error: Connection reset by peer]
mihirrege has joined #ruby
rezzack has joined #ruby
Dave has joined #ruby
mklappstuhl has quit [Ping timeout: 248 seconds]
Dave is now known as Guest98163
moli has quit [Read error: Connection reset by peer]
<platzhirsch>
elk_tamer: I don't understand, but you definitely can ask ruby questions here
iamjarvo has joined #ruby
snath has joined #ruby
<elk_tamer>
Okay - I'm trying to refactor some stub requests for WebMock and cucumber, and I've come across a small detail where I don't really understand what's going on. I pulled the JSON request from this API: http://maps.google.com/maps/api/geocode/json?address=20001&sensor=false
<elk_tamer>
and I don't understand what the results: [
<elk_tamer>
part is doing
<elk_tamer>
specifically the ":"
burlyscudd has joined #ruby
kirun has joined #ruby
amsi has quit [Ping timeout: 242 seconds]
<elk_tamer>
it's more of a syntax question I guess
snath has quit [Client Quit]
malkomalko has quit [Remote host closed the connection]
vmoravec has quit [Ping timeout: 251 seconds]
jkline has quit [Quit: jkline]
<apeiros>
elk_tamer: um, that's ordinary json?
<apeiros>
{"key": "value"}
Teddy2steper has quit [Remote host closed the connection]
n5red-2 has joined #ruby
jkline has joined #ruby
Gideon has joined #ruby
jkline has quit [Client Quit]
locriani has joined #ruby
thecodethinker has quit [Ping timeout: 260 seconds]
n5red-2 has quit [Read error: Connection reset by peer]
iamjarvo has quit [Remote host closed the connection]
ferdev has joined #ruby
<Morrolan>
`which bundle`, check whether it's using the correct one.
<ddustin>
$ which bundle /usr/bin/bundle
<tjbiddle>
Hey guys. So I have a gem 'git-company', which is a fork of 'git', and am requiring 'trac4r' which relies on 'git' (The original). It seems that my my require for 'git-company' is being ignored. I made sure to require 'git-company' after 'trac4r' to no avail. Not sure what's going on here
bobinator60_ has joined #ruby
iamjarvo has joined #ruby
tvw has joined #ruby
<ddustin>
is there another bundle installed somewhere?
<Morrolan>
How did you install Ruby 2.0?
renanoronfle has quit [Quit: This computer has gone to sleep]
<ddustin>
brew install ruby
soheil has quit [Remote host closed the connection]
<bobinator60_>
when is ruby 3 coming out?
BizarreCake has quit [Ping timeout: 268 seconds]
bradhe has quit [Remote host closed the connection]
susy41y has quit []
<ddustin>
i moved /usr/bin/ruby to /usr/bin/rubyold as a precaution
vlad_sta_ has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
<Morrolan>
Argh, don't do that. OSX will rely on Ruby 1.8.7, messing with the system's Ruby is a very bad idea.
<ddustin>
Ah, this worked $ /usr/local/bin/ruby `which bundle` install
<tjbiddle>
bobinator60_: Ruby 2.0 just came out a couple months ago. I doubt another major version is coming any time soon.
tziOm has quit [Remote host closed the connection]
<tjbiddle>
I could be entirely mistaken though - haven't read anything about it.
jdeeburke has joined #ruby
jdeeburke has quit [Max SendQ exceeded]
iamjarvo has quit [Ping timeout: 245 seconds]
bobinator60_ has quit [Client Quit]
jdeeburke has joined #ruby
clov3r has joined #ruby
adambeynon has joined #ruby
peregrine81 has joined #ruby
<ddustin>
huh, bundle's first line is this: #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
agent_white has joined #ruby
<ddustin>
why would it be set to that
Ripp__ has quit []
<Morrolan>
It's probably the bundler which ships with the system's ruby.
<Morrolan>
Erm, does `which gem` point to the correct gem binary?
<Morrolan>
(i.e. the Ruby 2 one)
<ddustin>
$ which gem /usr/local/bin/gem
<Morrolan>
Hrm, where is Ruby 2.0's binary?
<ddustin>
$ head -n 1 `which gem` #!/usr/local/Cellar/ruby/2.0.0-p195/bin/ruby
false_economy has joined #ruby
<Morrolan>
Ah.
<Morrolan>
This whole setup looks kinda funny. But given that 'gem' is in /usr/local/bin it's probably the one which was installed by homebrew. Is there a gem in /usr/bin?
ukd1_ has quit [Remote host closed the connection]
dodosan has quit [Remote host closed the connection]
vlad_sta_ has quit [Ping timeout: 256 seconds]
<ddustin>
yeah
<ddustin>
$ head -n 1 /usr/bin/gem #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Guest25835 has quit [Remote host closed the connection]
Ripp__ has joined #ruby
optimusprimem has quit [Read error: Connection reset by peer]
jprovazn has quit [Remote host closed the connection]
clov3r has quit [Ping timeout: 253 seconds]
<Morrolan>
Okay. So we have /usr/bin/gem, /usr/bin/bundler and /usr/bin/ruby which are probably part of the system-provided Ruby, and /usr/local/bin/gem and /usr/local/Cellar/ruby/2.0.0-p195/bin/ruby which are part of the Ruby 2.0 which you installed.
<Morrolan>
Uh, try to install bundler with the ruby 2.0 gem binary.
decoponio has quit [Quit: Leaving...]
ksh has quit [Quit: ksh]
<Morrolan>
Also, are you using a Ruby version manager? It would make these tasks easier, by managing PATH for you.
thecodethinker has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
workmad3 has joined #ruby
kevind_ has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aagdbl has quit [Quit: Leaving.]
soheil has joined #ruby
kevind has quit [Ping timeout: 276 seconds]
kevind_ is now known as kevind
vlad_starkov has joined #ruby
aagdbl has joined #ruby
<|jemc|>
Morrolan: why are you telling me about /alis?
jbrechtel has quit [Remote host closed the connection]
<Morrolan>
|jemc|: Oh, I slipped by one line, meant to target susy41y.
ce_afk is now known as cescalante
<|jemc|>
ah
tacos1de has quit [Ping timeout: 240 seconds]
mklappst_ has quit [Remote host closed the connection]
<|jemc|>
I dropped my connection and missed that part of the conversation
mklappstuhl has joined #ruby
<Morrolan>
There wasn't any conversations, to be honest. I didn't realise that I had highlighted the wrong person up to now. ;)
jdenen has quit [Ping timeout: 245 seconds]
<Morrolan>
And susy41y left by now.
radic has quit [Quit: Verlassend]
shaunbaker has joined #ruby
shaunbaker has quit [Remote host closed the connection]
shaunbaker has joined #ruby
jdenen has joined #ruby
Teddy2steper has quit [Remote host closed the connection]
evenix_ has joined #ruby
radic has joined #ruby
evenix has quit [Ping timeout: 245 seconds]
clov3r has quit [Ping timeout: 248 seconds]
sayan has quit [Ping timeout: 248 seconds]
jlast_ has quit [Remote host closed the connection]
platzhirsch has left #ruby [#ruby]
workmad3 has quit [Read error: Operation timed out]
dodosan has joined #ruby
staafl has joined #ruby
wicketn00b has quit [Ping timeout: 276 seconds]
balves is now known as fryguy
robustus has quit [Ping timeout: 264 seconds]
wicketn00b has joined #ruby
robustus has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rkrdo has joined #ruby
cescalante is now known as ce_afk
workmad3 has joined #ruby
endash has quit [Ping timeout: 248 seconds]
Squarepy_ has quit [Quit: Leaving]
renanoronfle has joined #ruby
aagdbl has quit [Ping timeout: 264 seconds]
spider-mario has joined #ruby
radic has quit [Quit: Verlassend]
amsi has joined #ruby
endash has joined #ruby
<Dwarf>
I
Soda has quit [Read error: Operation timed out]
<Dwarf>
Love
<Dwarf>
Ruby.
ckampfe has quit [Ping timeout: 260 seconds]
aagdbl has joined #ruby
dodosan has quit [Remote host closed the connection]
radic has joined #ruby
vince_prignano has joined #ruby
<onewheelskyward>
me
<onewheelskyward>
2
Xeago has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
jlast has joined #ruby
kil0byte has joined #ruby
codebeaker has quit [Ping timeout: 240 seconds]
vince_prignano has quit [Remote host closed the connection]
<reactormonk>
what's the proper way to use enum_for?
ryannielson has quit [Quit: ryannielson]
Nogbit has quit [Ping timeout: 248 seconds]
leehambley has joined #ruby
dunc_ has quit [Write error: Broken pipe]
klaut has joined #ruby
cody-- has quit [Quit: derp]
Stalkr_ has quit [Read error: Connection reset by peer]
dweeb_ has quit [Quit: Computer has gone to sleep.]
mercwithamouth has joined #ruby
yalue has quit [Quit: Leaving]
ghr has joined #ruby
Falcore has quit [Quit: Falcore]
fcahoon has joined #ruby
bradhe has joined #ruby
soheil has quit [Remote host closed the connection]
devoldmx has joined #ruby
Soda has joined #ruby
evenix_ has quit [Ping timeout: 256 seconds]
soheil has joined #ruby
Newbcake has joined #ruby
NealJ has quit [Ping timeout: 260 seconds]
ce_afk is now known as cescalante
beneggett has joined #ruby
radic has quit [Quit: Verlassend]
radic has joined #ruby
echevemaster has quit [Read error: Connection reset by peer]
chairabanta has quit [Quit: Leaving...]
bruhnsi has quit [Ping timeout: 250 seconds]
carraroj has joined #ruby
LMolr has joined #ruby
jkline has joined #ruby
<a1ph4g33k>
reactormonk, haven't used it before.
mklappstuhl has joined #ruby
tonni has joined #ruby
bobdobbs has quit [Read error: Connection reset by peer]
Nogbit has joined #ruby
<jkline>
One of the jobs of my gem is to create configuration files for an external program. I figure I should render those using erb. I therefore want to include an erb template inside my gem. Can someone recommend please good pattern for doing that? Where in my gem should I store the template.erb file?
zmansiv has joined #ruby
<shevy>
reactormonk I think when you want to lateron run #each on it ... perhaps in a lazy way? I am not sure
<shevy>
in ruby many things seem cool but I find it hard to find good use cases for them
reset has joined #ruby
schaerli has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
vmoravec has quit [Client Quit]
haxrbyte has joined #ruby
cpruitt has joined #ruby
RDash is now known as RDash[AW]
ce_afk is now known as cescalante
workmad3 has quit [Ping timeout: 260 seconds]
chuckboxx has joined #ruby
robbyoconnor has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
jkamenik has quit [Quit: Leaving.]
Fuzai_ is now known as Fuzai
shaunbaker has quit [Remote host closed the connection]
Xeago has joined #ruby
aagdbl has quit [Quit: Leaving.]
radic has quit [Quit: Verlassend]
ukd1 has joined #ruby
cody-- has joined #ruby
kil0byte_ has joined #ruby
ravster has quit [Quit: Leaving.]
kil0byte has quit [Ping timeout: 246 seconds]
thecodethinker has joined #ruby
Admiral is now known as AdmiraI
fastred has quit [Quit: fastred]
baggypants has joined #ruby
cescalante is now known as ce_afk
troii has joined #ruby
cads has joined #ruby
<troii>
ruby is shit.
troii was kicked from #ruby by apeiros [trolls are not welcome]
troii has joined #ruby
troii was kicked from #ruby by apeiros [trolls are not welcome]
jb41 has joined #ruby
mark_locklear has quit [Ping timeout: 248 seconds]
havenwood has quit [Remote host closed the connection]
radic has joined #ruby
havenwood has joined #ruby
dankest has quit [Quit: dankest]
carraroj has quit [Quit: Konversation terminated!]
spider-mario has quit [Read error: Connection reset by peer]
stkowski has quit [Quit: stkowski]
shredding has joined #ruby
robbyoconnor has quit [Excess Flood]
fmcgeough has quit [Quit: fmcgeough]
ged_ is now known as ged
geekbri has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
<eka>
"ruby is the shit" FTFY
<interactionjaxsn>
^
<gf3>
↑
<gf3>
→
n5red-2 has joined #ruby
<gf3>
↑↑↓↓←→←→BA
n5red-2 has quit [Remote host closed the connection]
shredding has quit [Ping timeout: 256 seconds]
robbyoconnor has joined #ruby
Xeago has quit [Ping timeout: 256 seconds]
funburn has joined #ruby
thelamest has quit [Quit: reboot yo]
r0bby_ has joined #ruby
<onewheelskyward>
start
robbyoconnor has quit [Client Quit]
aryaching has quit [Ping timeout: 240 seconds]
phantasm66 has quit [Quit: *sleeeep….]
jdeeburke has quit [Quit: Leaving.]
snath has joined #ruby
alvaro_o has quit [Ping timeout: 268 seconds]
Gideon has quit [Quit: Page closed]
alvaro_o has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rkrdo has quit [Remote host closed the connection]
dangerousdave has quit [Read error: Connection reset by peer]
shredding has joined #ruby
dangerousdave has joined #ruby
dash_ has quit [Quit: dash_]
stkowski has joined #ruby
Igneous has joined #ruby
Kar- has quit [Ping timeout: 248 seconds]
Urizen has joined #ruby
r0bby_ has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
ner0x has quit [Quit: Leaving]
thelamest has joined #ruby
sailias has quit [Ping timeout: 240 seconds]
axl_ has quit [Quit: axl_]
Banistergalaxy has quit [Ping timeout: 268 seconds]
Teddy2steper has joined #ruby
freerobby has quit [Quit: Leaving.]
motto has joined #ruby
mansi__ has quit [Remote host closed the connection]
mansi has joined #ruby
AdmiraI has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cads has quit [Ping timeout: 260 seconds]
Es0teric has joined #ruby
FDj has quit [Ping timeout: 245 seconds]
brbcoding has quit []
<Igneous>
Anybody in here have experience using savon, by chance? Savon seems to keep appending the word "Input" to the operation names in my wsdl. So calling :perfmon_open_session tries to call the PerfmonOpenSessionInput operation on the serverside..
m8 has quit [Ping timeout: 256 seconds]
Stalkr^ has joined #ruby
IceyEC has quit [Quit: IceyEC]
baordog_ has quit [Remote host closed the connection]
jonahR has joined #ruby
Banistergalaxy has joined #ruby
mansi_ has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
Xeago has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
end_guy has quit [Ping timeout: 240 seconds]
kaldrenon has quit [Remote host closed the connection]
axl_ has joined #ruby
kaldrenon has joined #ruby
end_guy has joined #ruby
michael_mbp is now known as zz_michael_mbp
segfalt has joined #ruby
corpuscle has quit [Quit: WeeChat 0.4.1]
haxrbyte has quit [Remote host closed the connection]
<s2013>
how can i get a list of classes from amodule?
Teddy2steper has quit [Remote host closed the connection]
<a1ph4g33k>
s2013, you can iterate object_space
FDj has joined #ruby
<MrZYX>
Mod.constants.select {|c| c.is_a? Class }
<s2013>
there isnt something thatw ould just quickly retrun list of classes?
<MrZYX>
but why do you need that?
<s2013>
just want to check something
<|jemc|>
MrZYX: they're all symbols
<|jemc|>
not classes
claymore_ has joined #ruby
<MrZYX>
oh, right
<|jemc|>
you need const_get
<s2013>
so Module.const_get.select .. ?
kaldrenon has quit [Ping timeout: 240 seconds]
babinho has quit [Quit: leaving]
<MrZYX>
Mod.constants.map {|c| Mod.const_get c }.select {|c| c.is_a? Class }
chopmo has quit [Remote host closed the connection]
<s2013>
oh ok
claymore has quit [Ping timeout: 240 seconds]
<havenwood>
>> Module.constants.keep_if { |k| Module.const_get(k).is_a? Class }
<eval-in>
havenwood => /tmp/execpad-9ef58557aa89/source-9ef58557aa89:2:in `const_get': Use RbConfig instead of obsolete and deprecated Config. ... (https://eval.in/49392)
<s2013>
that worked MrZYX thanks
<s2013>
what im trying to figure out how is if something is an object of Mod::ClassA how can I get it to call a method of Mod::ClassB
<s2013>
if that makes sense
<MrZYX>
s2013: but if it's just for exploring I'd recommend pry
virtualize has quit [Ping timeout: 276 seconds]
<s2013>
how would i do it in pry?
<MrZYX>
ls Mod
<s2013>
ok thanks
prox|a has quit [Ping timeout: 268 seconds]
T__T has joined #ruby
Targen_ has joined #ruby
funburn has quit [Quit: funburn]
<MrZYX>
(and no, at least to me that doesn't make a lot sense :P)
Teddy2steper has joined #ruby
Targen has quit [Ping timeout: 264 seconds]
<s2013>
so i have an image and its class is Paperclip::Attachment
<s2013>
i need to call resize method from Paperclip::Geometry on that image
<s2013>
does that make sense?
T_T has quit [Ping timeout: 248 seconds]
crowell has quit [Ping timeout: 256 seconds]
SHyx0rmZ has joined #ruby
<havenwood>
the first sentence made sense, the second is ambiguous
cads has joined #ruby
<MrZYX>
I doubt that's possible
freerobby has joined #ruby
nfk has quit [Remote host closed the connection]
<s2013>
i basically want to resize the image thats all.
ldnunes has quit [Quit: Leaving]
<s2013>
im sure im missing something obvious that im overlooking
radic has quit [Quit: Verlassend]
<MrZYX>
you can't call abitrary methods from other objects on an object
virtualize has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
iamjarvo has quit [Remote host closed the connection]
radic has joined #ruby
iamjarvo has joined #ruby
<MrZYX>
Paperclip::Attachment is an attachment, it doesn't know how to resize an image
<MrZYX>
you need to use the information it provides to initialize another object that knows how to do such things
ckampfe has joined #ruby
sarlalia1 has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
<s2013>
hmmm im just going to use imagemagick directly. thanks
dangerousdave has joined #ruby
SloggerKhan has quit [Quit: Leaving.]
virt|a has joined #ruby
Urizen has quit [Quit: Lost terminal]
breakingthings has quit []
iamjarvo has quit [Ping timeout: 245 seconds]
sarlalian has quit [Ping timeout: 245 seconds]
ehc has quit [Ping timeout: 268 seconds]
funburn has joined #ruby
Falcore has joined #ruby
jdenen has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 256 seconds]
thecodethinker has quit [Ping timeout: 260 seconds]
freerobby has quit [Quit: Leaving.]
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
Monie has joined #ruby
Xeago has quit [Remote host closed the connection]
cody-- has quit [Quit: derp]
mercwithamouth has joined #ruby
Xeago has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
mansi_ has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
shredding has quit [Quit: shredding]
cj3kim has quit [Remote host closed the connection]
mansi has joined #ruby
Nenor has joined #ruby
mansi has quit [Read error: Connection reset by peer]
Monie has quit [Client Quit]
mansi has joined #ruby
mansi has quit [Remote host closed the connection]
iliketurtles has quit [Quit: zzzzz…..]
dallasm_ has joined #ruby
mansi has joined #ruby
momomomomo has joined #ruby
rkrdo has joined #ruby
endash has quit [Quit: endash]
interactionjaxsn has quit [Ping timeout: 264 seconds]
Xeago has quit [Ping timeout: 256 seconds]
dallasm_ has quit [Remote host closed the connection]
funburn has quit [Quit: funburn]
klaut has quit [Remote host closed the connection]
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
ukd1 has quit [Remote host closed the connection]
hamakn has quit [Remote host closed the connection]
Monie has joined #ruby
ryandeussing has quit [Remote host closed the connection]
T__T is now known as T_T
hamakn has joined #ruby
tziOm has quit [Remote host closed the connection]
kvirani has quit [Remote host closed the connection]
ckampfe has quit [Ping timeout: 260 seconds]
Evixion has joined #ruby
kvirani has joined #ruby
jeebster has joined #ruby
ukd1 has joined #ruby
mikepack_ has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
snovak has quit [Remote host closed the connection]
jdeeburke has joined #ruby
freerobby has joined #ruby
mikepack_ has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
baggypants has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dweeb_ has joined #ruby
hamakn has quit [Ping timeout: 260 seconds]
kvirani has quit [Ping timeout: 276 seconds]
<xybre>
MiniMagick is a nice Ruby wrapper for imagemagick/graphicsmagick if you need to automate it.
<s2013>
yeah i was thinking of using rmagick but i also saw vips. ill try that
<s2013>
thanks
s2013 has quit [Quit: Leaving]
rins has quit [Ping timeout: 245 seconds]
radic has quit [Quit: Verlassend]
radic has joined #ruby
iliketurtles has joined #ruby
elk_tamer has quit [Remote host closed the connection]
mercwithamouth has quit [Quit: Lost terminal]
fcahoon has quit [Quit: Leaving]
codecop has quit [Remote host closed the connection]
<|jemc|>
coming from python, I thought I'd never want to use 2 spaces instead of 4
nomenkun has joined #ruby
<|jemc|>
but after a week or so of fighting it, I just fell in to it and 4 looks so wrong now in ruby code
BillCriswell has joined #ruby
cody-- has joined #ruby
<Eiam>
(I honestly don't CARE this much, but given a choice I choose to use tabs that indent as 2 spaces)
clov3r has joined #ruby
<Eiam>
like their indent depth is 2 spaces.
pel_daniel has left #ruby [#ruby]
alx- has joined #ruby
<Eiam>
I do think that spaces are harder to determine at a glance, especially when you delete them, you only delete 1 space vs a tab deletes them all. I just think tabs have fewer pitfalls that can bite you when you are tired/overworked
MissionCritical has quit [Ping timeout: 264 seconds]
gstamp has joined #ruby
alx- has quit [Client Quit]
<|jemc|>
it's more about how your editor treats whitespace than the space itself
<Eiam>
but I follow whatever convention is in the code base I'm working on. so if they are jack asses and do if(blah){
<Eiam>
{
<Eiam>
} I'll do that, but we all know that if (blah)
<Eiam>
} is better.
alx- has joined #ruby
dml_ has quit [Quit: Computer has gone to sleep.]
Stalkr^ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
jaynewstrom has quit [Disconnected by services]
<shevy>
2 spaces on my grave
Stalkr^ has quit [Read error: Connection reset by peer]
Lauritz_ has joined #ruby
nomenkun has quit [Ping timeout: 256 seconds]
jaynewst_ has joined #ruby
Teddy2steper has quit [Remote host closed the connection]
AdmiraI has quit [Ping timeout: 264 seconds]
lfox has joined #ruby
<|jemc|>
`
<|jemc|>
and now I'm ascii puns. is this what my life has come to?
<|jemc|>
*I'm making
Falcore has quit [Quit: Falcore]
ddustin has quit [Ping timeout: 250 seconds]
thepumpkin has joined #ruby
<shevy>
you made an ascii pun right there ^^^
<shevy>
~
<|jemc|>
if I had a daughter I'd name her Ma~
Boohbah has joined #ruby
<chrismerrill>
ascii a silly question. get a silly ansi.
<shevy>
lol
Lauritz_ has quit [Ping timeout: 264 seconds]
<chrismerrill>
:)
<|jemc|>
heheh
<shevy>
|jemc| that nick actually makes me want to tab-complete
<maletor>
Would you consider a MQ system to communicate internally between rails apps A Good Idea(™)? For instance, between a "mailer" app and a "hub" app.
Aryasam_ has joined #ruby
<z_eos>
havenwood: I do make in /usr/ports/lang/ruby19
goleldar has quit [Ping timeout: 264 seconds]
goleldar has joined #ruby
chuckboxx has quit [Quit: chuckboxx]
osvico has joined #ruby
sloucher has joined #ruby
Nogbit has joined #ruby
<z_eos>
havenwood: can you advise, please?
Aryasam has quit [Read error: Connection reset by peer]
<maletor>
Oops wrong channel.
Davey has quit [Quit: Computer has gone to sleep.]
harrymoreno has quit [Quit: harrymoreno]
chrismerrill has left #ruby [#ruby]
lukec has quit [Quit: lukec]
<havenwood>
maletor: Could ask in #RubyOnRails. An alternative to one of the MQs would be Drb.
<havenwood>
z_eos: to get latest stable ruby: ruby-install ruby
<havenwood>
z_eos: or to get latest stable 1.9.3: ruby-install ruby 1.9
twoism has quit [Remote host closed the connection]
lfox has quit [Quit: ZZZzzz…]
snovak has quit [Ping timeout: 264 seconds]
Aryasam has joined #ruby
ehaliewicz has quit [Remote host closed the connection]
tacit7 has quit [Quit: tacit7]
<havenwood>
z_eos: A tool that pairs nicely is chruby, which changes the current Ruby. Especially nice if you use multiple Rubies: https://github.com/postmodern/chruby#readme
<z_eos>
havenwood: let me build bash first :(
GeissT has joined #ruby
Stalkr^ has joined #ruby
<z_eos>
havenwood: no ... all I need is portupgrade ...
<havenwood>
z_eos: I don't primarily use FreeBSD, but I guess someone should let the Ruby port maintainer know it is broken!
cj3kim has joined #ruby
<z_eos>
yes, I'll try to email him
<havenwood>
z_eos: :D
<havenwood>
z_eos: chruby will autodetect the Ruby installed by ruby-install, btw