wesside has quit [Quit: Computer has gone to sleep.]
iliketurtles has joined #ruby
brandon_ has joined #ruby
HardFu has quit [Ping timeout: 245 seconds]
wesside has joined #ruby
Cyrus has quit [Quit: Cyrus.close()]
zachrab_ has joined #ruby
Neomex has quit [Quit: Neomex]
blip99 has joined #ruby
Kruppe has joined #ruby
banisterfiend is now known as banister`sleep
druonysus has quit [Remote host closed the connection]
Davey has joined #ruby
druonysus has joined #ruby
druonysus has joined #ruby
druonysus has quit [Changing host]
Vivekananda has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
sdegutis has quit [Remote host closed the connection]
Lewix has joined #ruby
Lewix has joined #ruby
Grieg has quit [Quit: Grieg]
love_color_text has quit [Remote host closed the connection]
jeremywrowe has joined #ruby
jeremywrowe has joined #ruby
marr has quit [Ping timeout: 246 seconds]
jeremywrowe has quit [Client Quit]
<pipework>
Packaging ruby isn't fun.
s2013 has quit [Ping timeout: 248 seconds]
rrecio has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
rodacato has joined #ruby
nathancahill has quit [Quit: nathancahill]
pupoque_ has quit [Quit: Leaving]
druonysus has quit [Ping timeout: 268 seconds]
NimeshNeema has joined #ruby
sdegutis has joined #ruby
anonymuse has quit [Remote host closed the connection]
wald0 has joined #ruby
k0rupted_ has joined #ruby
<wald0>
why by default when I use vim with ruby, there's a "#" char for the newlines ?
<sdegutis>
what's the best way to hide internal data structures in a Ruby class created via C?
nfk has quit [Quit: yawn]
<popl>
wald0: there isn't
Cyrus has joined #ruby
<popl>
wald0: try it after a line that doesn't begin with #
<popl>
s/it/entering a new line/
<wald0>
popl: i ask that because i have also see it in a ruby source code, so you mean that it doesn't has any purpose at all ?
<popl>
wald0: I mean it's not doing what you think it does
jonathanwallace has joined #ruby
<popl>
wald0: what do you mean you saw it in a ruby source code?
<wald0>
popl: well, it looks an empty comment to me
<popl>
wald0: have you tried doing what I suggested?
k0rupted has quit [Ping timeout: 260 seconds]
<wald0>
popl: yes, it worked, i was just curious about if this had any meaning
k0rupted__ has quit [Ping timeout: 276 seconds]
Mon_Ouie has quit [Ping timeout: 268 seconds]
<popl>
wald0: just autocommenting with vim
<wald0>
i see
k0rupted has joined #ruby
codex has quit [Quit: leaving]
anonymuse has joined #ruby
<popl>
wald0: vim does this with commenting in most languages
<popl>
wald0: ctrl-u to get rid of it
<blip99>
hi all, when doing array concat i do A.concat(B) and the end result goes in A - but I want the result to go in B but in the same order of A_elements...B_elements
<blip99>
should I just use + symbol and assign to B, instead of concat ?
hogeo has joined #ruby
Lewix has quit [Remote host closed the connection]
rrecio has joined #ruby
cyong has joined #ruby
anonymuse has quit [Remote host closed the connection]
jarray52 has quit [Changing host]
jarray52 has joined #ruby
s2013 has joined #ruby
thinkschematwo has joined #ruby
nari has quit [Ping timeout: 264 seconds]
blip99 has quit [Remote host closed the connection]
Kricir has joined #ruby
jnoob22 has joined #ruby
<seitensei>
What is the best way to remove special characters within a string?
<seitensei>
I'm currently using .scan().to_s, but that returns an array of strings
<Rylai>
seitensei: "special characters"?
<Rylai>
such as?
<seitensei>
@#$%^&*アあ赤.!?...etc
love_color_text has joined #ruby
<seitensei>
specifically, what I'm doing right now is .scan(/[a-zA-Z\s]/).to_s
urielable has joined #ruby
<Rylai>
'
<Rylai>
err.
codepython777 has quit [Quit: Leaving.]
ppq_ has quit [Remote host closed the connection]
love_color_text has quit [Read error: Connection reset by peer]
optimusprimem has quit [Quit: Saindo]
optimusprimem has joined #ruby
<itcharlie>
seitensei: what you need to do is a string substitution.
arya_ has joined #ruby
<itcharlie>
look at gsub( )
<popl>
>> a = (1..10).to_a; b = (11..20).to_a; a.reverse.each{|x| b.unshift(x)}; p b
optimusprimem has quit [Remote host closed the connection]
hackingoff has joined #ruby
tkuchiki has joined #ruby
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
spidergears has quit [Ping timeout: 264 seconds]
thinkschematwo has quit [Quit: Leaving]
kofno has joined #ruby
<itcharlie>
yeah so example : string_variable.gsub(/\@/, '' ) # this would remove @ character from string variable. but if you want to change in place make sure you use gsub!
<itcharlie>
seitensei: ^
Kricir has quit [Remote host closed the connection]
DonRichie has quit [Ping timeout: 264 seconds]
thinkschematwo has joined #ruby
smathieu has joined #ruby
<seitensei>
I see.
DonRichie has joined #ruby
cyong has quit [Quit: Leaving.]
khismetix has quit [Quit: Computer has gone to sleep.]
_numbers has joined #ruby
_numbers has left #ruby [#ruby]
spidergears has joined #ruby
<seitensei>
I do see a problem with that, but it might because there's something I don't know
thinkschematwo has quit [Client Quit]
<itcharlie>
seitensei: whats the problem?
optimusprimem has quit [Quit: Saindo]
<seitensei>
I'm getting rid of everything that isn't latin character, save for spaces
<seitensei>
Putting \W in there would do all that, but it would get spaces as well
optimusprimem has joined #ruby
rrecio has quit [Remote host closed the connection]
Deele has quit [Ping timeout: 240 seconds]
adeponte has quit [Remote host closed the connection]
cyong has joined #ruby
danielrb has quit [Quit: Quit]
yshh has joined #ruby
danielrb has joined #ruby
smathieu has quit [Ping timeout: 276 seconds]
<itcharlie>
I see
<itcharlie>
and in the substitution you just want to delete the character and not replace it with space?
Kricir has joined #ruby
threesome has quit [Ping timeout: 276 seconds]
<seitensei>
Yep.
<seitensei>
What I'm doing is converting strings into url-friendly forms without special non-latin characters
<seitensei>
Spaces, I'm probably going to be substituting with hyphens
<itcharlie>
seitensei: maybe try the URI::Escape gem?
<itcharlie>
well that won't be removing the special characters but it would be escaping them making it url friendly
<seitensei>
True, but it wouldn't exactly be human-friendly
<itcharlie>
I see
huoxito has joined #ruby
LaPetiteFromage has joined #ruby
vikhyat has quit [Remote host closed the connection]
codepython777 has joined #ruby
nari has joined #ruby
lnormous has quit [Ping timeout: 260 seconds]
amacgregor_ has joined #ruby
<seitensei>
If I input a string like "Moby-Dick; or, The Whale", my goal is to get an output pf "Moby-Dick-or-The-Whale" out
yfeldblum has joined #ruby
baroquebobcat has joined #ruby
TheFuzzball has quit [Quit: Computer has gone to sleep.]
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
<itcharlie>
ok so how about converting string to array of characters. iterating through each character and first checking whether that character is a space ( if so then skip to next character ) then checking if its a special character and if so then replace with "-".
TheFuzzball has joined #ruby
sdegutis has quit [Remote host closed the connection]
amacgregor has quit [Ping timeout: 248 seconds]
kofno has quit [Remote host closed the connection]
TheFuzzball has quit [Client Quit]
<popl>
>> "Moby-Dick; or, The Whale".gsub(/\W+/, '-')
tjbiddle has quit [Read error: Connection reset by peer]
<pontiki>
seitensei: that's what we all say :)
<pontiki>
right up until we get a whiny nil
<seitensei>
That's what we all hope to be the case
<seitensei>
Admittedly, the production environment is an odd odd place
<pontiki>
the hope is to make the test environment the weirdest place the code will ever run
<Kelet>
No, whenever I write a program and I have such cases I formally prove that it can never be nil unless cosmic radiation flips a bit, but that's why I have ECC RAM.
rodacato has joined #ruby
* pontiki
unleashes the butterfly swarm at kelet's code
babykosh has quit [Quit: babykosh]
rezzack1 has quit [Ping timeout: 264 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
freeayu has joined #ruby
tjbiddle_ has quit [Ping timeout: 248 seconds]
tjbiddle has joined #ruby
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
Lewix has joined #ruby
niklasb has quit [Ping timeout: 264 seconds]
bradsmith has joined #ruby
Blaster has joined #ruby
wald0 has quit [Quit: Lost terminal]
cj3kim has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
sepp2k has joined #ruby
danielrb has quit [Quit: Quit]
hamakn has joined #ruby
danielrb has joined #ruby
sergiocampama has quit [Quit: sergiocampama]
ruby_lover has left #ruby [#ruby]
iliketurtles has quit [Quit: zzzzz…..]
nbouscal has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
cj3kim has quit [Remote host closed the connection]
heftig has quit [Quit: Quitting]
fuhgeddaboudit has joined #ruby
codepython777 has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
fuhgeddaboudit has quit [Read error: Connection reset by peer]
Domon_ has joined #ruby
fuhgeddaboudit has joined #ruby
fuhgeddaboudit has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
fuhgeddaboudit has joined #ruby
codepython777 has joined #ruby
yourmysin has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 264 seconds]
BillCriswell has quit [Remote host closed the connection]
cantonic has joined #ruby
babykosh has joined #ruby
smathieu has joined #ruby
fuhgeddaboudit has quit [Read error: Connection reset by peer]
dagnachew has joined #ruby
Shirakawasuna has quit [Quit: Leaving]
jonathanwallace has quit [Ping timeout: 276 seconds]
alainus has joined #ruby
zets has joined #ruby
dagnachew has quit [Client Quit]
brennanMKE has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
Mon_Ouie has quit [Ping timeout: 256 seconds]
rodacato has quit [Remote host closed the connection]
smathieu has quit [Ping timeout: 248 seconds]
Vivekananda has quit [Ping timeout: 248 seconds]
thinkschematwo_ has joined #ruby
n_blownapart has quit [Remote host closed the connection]
adeponte has quit [Ping timeout: 248 seconds]
nathancahill has joined #ruby
radic_ has joined #ruby
querymyquery has joined #ruby
Beth has joined #ruby
justsee has joined #ruby
radic__ has quit [Ping timeout: 264 seconds]
dodosan has joined #ruby
lnormous has joined #ruby
cj3kim has quit [Remote host closed the connection]
cj3kim has joined #ruby
cj3kim has quit [Remote host closed the connection]
querymyquery has quit [Ping timeout: 250 seconds]
sleetdrop has joined #ruby
rodacato has joined #ruby
iliketurtles has joined #ruby
n_blownapart has joined #ruby
nlv has joined #ruby
n_blownapart has quit [Read error: Connection reset by peer]
n_blownapart has joined #ruby
iliketurtles has quit [Client Quit]
iliketurtles has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
becky_ has joined #ruby
cj3kim has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
weblog has quit [Ping timeout: 248 seconds]
robustus has joined #ruby
sdegutis has joined #ruby
cj3kim has quit [Remote host closed the connection]
thinkschematwo_ has quit [Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130618035212]]
<sdegutis>
if you were going to wrap a really simple ObjC class, without using RubyCocoa or MacRuby, but just the normal ruby.h stuff, would you use Data_Make_Struct ?
nlv has quit [Remote host closed the connection]
cj3kim has joined #ruby
Domon_ has quit [Remote host closed the connection]
freerobby has joined #ruby
<sdegutis>
oh sorry wrong room probably
nathancahill has quit [Quit: nathancahill]
weblog has joined #ruby
<pontiki>
might be
anonymuse has joined #ruby
<pontiki>
i haven't a clue about using ObjC with ruby
<sdegutis>
yeah that was a terribly stupid question
<sdegutis>
heres a way better one
Ripp__ has quit [Quit: This computer has gone to sleep]
<sdegutis>
how can i attach a random C pointer to a Ruby object that i create in C, so that i can get this C pointer back out of it again later?
<sdegutis>
should i just use rb_iv_get and rb_iv_set?
<sdegutis>
those take a VALUE though, and i have a void*
<bnagy>
sdegutis: people don't like it when you crosspost without at least saying you're doing it
<bnagy>
fyi
jonathanwallace has joined #ruby
<sdegutis>
bnagy: im trying to figure out which is the right room
<sdegutis>
its a lot harder to ask metaquestions like that without just asking the question
<pontiki>
this is true
Beth has quit []
<bnagy>
you could get an answer in either
<pontiki>
but it is nice to say (crosspost from..)
<sdegutis>
pontiki: ok, noted. thx
Beth has joined #ruby
<bnagy>
but your odds are going to improve in about 3-4 hours
nlv has joined #ruby
<sdegutis>
why?
<bnagy>
europe wakes up
Kricir has joined #ruby
<sdegutis>
heh
<sdegutis>
and i go to sleep :)
thecodethinker has joined #ruby
<thecodethinker>
is there any way for you to poll input in ruby?
<sdegutis>
so i was looking for a way to wrap a void* in a VALUE, and it looked like Data_Make_Struct might be what i need
<sdegutis>
but it seems like it does more than that, maybe too much. its hard to tell
<bnagy>
thecodethinker: yes, but the actual answer depends on what you mean by 'poll input'
nlv has quit [Remote host closed the connection]
nathancahill has joined #ruby
<thecodethinker>
bnagy: I am making a program that relies on user input. I am looking to make it NOT event driven.
<bnagy>
there's a nice gem, think it's called highline
zachrab_ has quit [Remote host closed the connection]
kung has joined #ruby
m104_ has joined #ruby
browndawg has joined #ruby
arya_ has joined #ruby
Lewix has quit []
dik_dak has quit [Quit: Leaving]
Lewix has joined #ruby
emptymag00 has joined #ruby
vikhyat has quit [Remote host closed the connection]
dr0ff has joined #ruby
m104_ has quit [Quit: Bye!]
m104 has joined #ruby
speakingcode has joined #ruby
thecodethinker has joined #ruby
<thecodethinker>
Is there a way to poll user input. I gave highline a try but it doesn't seem to constantly poll it. I need a way for the program to detect input w/o the user hitting enter. Can that happen?
vlad_starkov has joined #ruby
cads has joined #ruby
baroquebobcat has joined #ruby
mercwithamouth has joined #ruby
urielable has joined #ruby
<pontiki>
thecodethinker: i think that's why i pointed you at the non-blocking IO stuff...
spidergears has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Ping timeout: 240 seconds]
bigmac has quit [Quit: Leaving]
smathieu has joined #ruby
benweint has joined #ruby
weblog has joined #ruby
<bnagy>
thecodethinker: getc will fire every time there's a keypress
Domon has quit [Quit: Connection closed for inactivity]
<bnagy>
I think highline supports some of that stuff, but I could be mistaken
<pontiki>
getc waits for a keypress
<pontiki>
i suppose you could put that in a thread tho
<bnagy>
yeah, that's how I'd do it
Es0teric has quit [Quit: Computer has gone to sleep.]
<bnagy>
have a Thread pouring keypresses into a Queue and then have something else doing whatever actions need to be done
<bnagy>
cause you'd probably need some kind of toeknizer
<bnagy>
but I say all this knowing 0 about the requirements
smathieu has quit [Ping timeout: 268 seconds]
weblog has quit [Remote host closed the connection]
blandflakes has quit [Read error: Connection reset by peer]
weblog has joined #ruby
Kricir has joined #ruby
optimusprimem has quit [Remote host closed the connection]
eldariof has joined #ruby
weblog has quit [Remote host closed the connection]
brennanMKE has joined #ruby
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
cschneid has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
alainus has left #ruby ["Leaving"]
stillEPIK has quit [Ping timeout: 264 seconds]
jonkri has quit [Quit: jonkri]
narcan has joined #ruby
tacos1de has quit [Ping timeout: 240 seconds]
Megtastique has joined #ruby
Nisstyre has quit [Quit: Leaving]
Kruppe has quit [Remote host closed the connection]
Shirakawasuna has quit [Ping timeout: 246 seconds]
tacos1de has joined #ruby
Megtastique has quit [Client Quit]
<thecodethinker>
I am following this tutorial and I'm having a bit of trouble with this line of code: $:.push File.expand_path('../lib', __FILE__)
<thecodethinker>
Can someone decypher this for me?
icole has quit [Ping timeout: 276 seconds]
blip- has quit [Remote host closed the connection]
<pontiki>
thecodethinker: it pushes the application root + lib directory onto the load path
<pontiki>
more often see $:.unshift to put it in front
<thecodethinker>
ah
havenwood has joined #ruby
<thecodethinker>
cool
<thecodethinker>
thanks
m104 has quit [Quit: brb]
m104 has joined #ruby
cha1tanya has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
benweint has quit [Quit: Computer has gone to sleep.]
dtcrshr has quit [Remote host closed the connection]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
urielable has quit [Quit: Leaving.]
hmsimha has joined #ruby
<hmsimha>
so i'm trying to familiarize myself with a codebase that i've been working with
<hmsimha>
This is a large project that has been created and maintained by one person, and I am the first new person to come on board
platforms is now known as platforms_away
<pontiki>
is the other person still around?
<hmsimha>
I'm wondering if it would be appropriate to push my possibly obvious comments to the repository
<hmsimha>
yes he is
<hmsimha>
for example: STRIP_FILTER = lambda{ |field| field.to_s.strip} #formats as string with leading and trailing whitespace removed
Drewch has joined #ruby
<pontiki>
oh, ah, yeah, those are actually pretty useless comments
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
Kricir has joined #ruby
<pontiki>
and they're the type that don't get maintained, usually
<hmsimha>
ok. Thanks!
mercwithamouth has quit [Ping timeout: 264 seconds]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
<pontiki>
those sorts of comments are okay when you're doing something to demonstrate something to a newbie to ruby
<pontiki>
but not in working code, really
osvico has quit [Ping timeout: 246 seconds]
<hmsimha>
ok. I guess I am a newbie so they are helpful to me while trying to go through the code
aspiers has quit [Ping timeout: 264 seconds]
<pontiki>
that's fair
cha1tanya has quit [Ping timeout: 246 seconds]
<pontiki>
if you keep them as personal notes, not a problem
optimusprimem has quit [Quit: Saindo]
Kricir has quit [Ping timeout: 246 seconds]
m104 has quit [Quit: brb]
<hmsimha>
this entire file I am working with right now has no comments though
aspiers has joined #ruby
<pontiki>
are you new to ruby?
<hmsimha>
it's hard to determine what kinds of comments, if any, would be appropriate to add
<pontiki>
or just this project?
leonardo__ has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
<pontiki>
well, ok, personal opinion here.
<hmsimha>
I am definitely new to rails, I'm not experienced in ruby by any means either
<pontiki>
much of ruby code i've seen has no comments
cschneid has joined #ruby
leonardo__ has quit [Read error: Connection reset by peer]
<pontiki>
but the lack of comments is really only disturbing to me when the previous coders made certain design or algorithmic choices that are not obvious
axeman- has joined #ruby
<pontiki>
and in cases in ruby where they've run amok with metaprogramming
mary5030 has joined #ruby
<hmsimha>
ok thank you, that is helpful
<pontiki>
the reasons why a certain implementation choice was made can save a future dev days of chasing down alternatives that might not exist, and that the previous devs have already eliminated
<pontiki>
metaprogramming amok time is just wrong
<pontiki>
otoh, i've littered a fair bit of code i've touched with bad doggerel, too, so...
vvvvoo has joined #ruby
<pontiki>
and even comments like "some right bastard mucked with this *again* and it broke the entire build" are quite useful to find
optimusprimem has joined #ruby
<pontiki>
to me, there are two kinds of useless comments
havenwood has quit [Read error: Connection reset by peer]
<pontiki>
one that simply says exactly what the code is doing
havenwood has joined #ruby
<pontiki>
the other is the boilerplate muck that some firm's coding standards dictate
pcarrier has joined #ruby
mercwithamouth has joined #ruby
<pontiki>
and that's enough from me
Megtastique has joined #ruby
<hmsimha>
but aren't comments that say what the code is doing helpful, for example, for someone who wants to read descriptions of api methods without having to pore through the code?
<pontiki>
not per line, heavens no
nbouscal has joined #ruby
<pontiki>
because that's actually giving too much internal info
<pontiki>
you document the contract for the API
<pontiki>
not how it does it
<hmsimha>
right.. but perhaps a comment describing a chunk of code and its utility, or an overall synopsis of the method itself?
<pontiki>
if you look at ruby-doc, you see a much better way
browndawg has quit [Quit: Leaving.]
platforms_away is now known as platforms
apeiros has quit [Read error: Connection reset by peer]
<pontiki>
you see the methods described as *what* they do, and what the parameters are
apeiros has joined #ruby
<pontiki>
some examples are given to show how it's used
Shirakawasuna has joined #ruby
<pontiki>
then if you do want to see how it works, there's an expando link and voila
kofno has quit [Remote host closed the connection]
<pontiki>
but that level of commentary is for external user documentation
haxrbyte has joined #ruby
bradsmith has quit [Remote host closed the connection]
wtfspm has joined #ruby
bradsmith has joined #ruby
cha1tanya has joined #ruby
<pontiki>
in your STRIP_FILTER example above, if that is an exposed constant, i'd know exactly what it would be in most cases
<pontiki>
and the fact that it is a constant means i read it as a noun, as opposed to if it were snake_case, i'd think it was a method, therefore read it as a verb
nbouscal has quit [Ping timeout: 260 seconds]
<pontiki>
am i making sense, or am i just confusing things?
wtfspm has left #ruby [#ruby]
<hmsimha>
i think i am following, i'm just going over ruby-docs now too
<pontiki>
if you hover over a method, you should see the background go pale yellow and a link appear in the upper right
<hmsimha>
it's hard to determine what kinds of things may or may not be obvious to more experienced rubyists, but i guess i can assume that unless I have reason to believe otherwise, my comments won't be necessary
<hmsimha>
there's a "click to toggle source code" button
<pontiki>
yes, that's it
thecodethinker has quit [Ping timeout: 264 seconds]
bradsmith has quit [Remote host closed the connection]
spidergears has joined #ruby
* pontiki
wishes someone else would say something about this...
ewnd9 has joined #ruby
smathieu has joined #ruby
tjbiddle has joined #ruby
adeponte has joined #ruby
nanothief has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
eoinkelly has quit [Quit: eoinkelly]
smathieu has quit [Ping timeout: 248 seconds]
mary5030 has quit [Remote host closed the connection]
bradsmith has joined #ruby
Kricir has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
apeiros has quit [Ping timeout: 264 seconds]
benweint has joined #ruby
bluOxigen has joined #ruby
m104 has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
tjbiddle has quit [Quit: tjbiddle]
dik_dak has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
eldariof has quit [Ping timeout: 260 seconds]
havenwood has quit [Remote host closed the connection]
spectre| has joined #ruby
dhruvasagar has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
druonysus has joined #ruby
druonysus has joined #ruby
cj3kim has joined #ruby
osvico has joined #ruby
bradsmith has quit [Remote host closed the connection]
huoxito has quit [Quit: Leaving]
cj3kim has quit [Read error: Connection reset by peer]
dik_dak has quit [Quit: Leaving]
cj3kim has joined #ruby
m104 has quit [Quit: bye]
Mon_Ouie has joined #ruby
pen has quit [Remote host closed the connection]
m104 has joined #ruby
sleetdrop has joined #ruby
stonevil has joined #ruby
poga has joined #ruby
poga has quit [Remote host closed the connection]
kofno has joined #ruby
poga has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
Resure has joined #ruby
nlv has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
adeponte has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
v0n has quit [Ping timeout: 240 seconds]
poga has quit [Remote host closed the connection]
fridim_ has quit [Ping timeout: 276 seconds]
zachrab_ has joined #ruby
zachrab_ has quit [Remote host closed the connection]
cha1tanya has quit [Ping timeout: 276 seconds]
bionoid has joined #ruby
anay has joined #ruby
Megtastique has quit [Quit: Megtastique]
amacgregor_ has joined #ruby
fridim_ has joined #ruby
codepython7771 has joined #ruby
kofno has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
benweint has quit [Quit: Computer has gone to sleep.]
amacgregor has quit [Ping timeout: 264 seconds]
tagrudev has joined #ruby
codepython777 has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
xcv has joined #ruby
nlv has joined #ruby
zachrab_ has joined #ruby
lsmola has joined #ruby
freerobby has quit [Ping timeout: 276 seconds]
fridim_ has quit [Ping timeout: 246 seconds]
Kricir has joined #ruby
RichardBaker has joined #ruby
timonv has joined #ruby
m104 has quit [Quit: bye]
Ripp__ has joined #ruby
m104 has joined #ruby
yacks has quit [Quit: Leaving]
<narcan>
anyone here use fnordmetric ?
Kricir has quit [Ping timeout: 256 seconds]
dash_ has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit:]
druonysus has quit [Quit: Konversation terminated!]
axeman- has quit [Read error: Connection reset by peer]
timonv has quit [Remote host closed the connection]
druonysus has joined #ruby
druonysus has quit [Changing host]
druonysus has joined #ruby
axeman- has joined #ruby
haxrbyte has quit [Remote host closed the connection]
platforms is now known as platforms_away
haxrbyte has joined #ruby
timonv has joined #ruby
bluOxigen has joined #ruby
browndawg has joined #ruby
bradsmith has joined #ruby
adeponte has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
m104 is now known as m104_
eoinkelly has joined #ruby
tomzx_mac has quit [Read error: Operation timed out]
NealJ has quit [Quit: :c]
timonv has quit [Remote host closed the connection]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
poga has joined #ruby
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
n_blownapart has quit [Remote host closed the connection]
bradsmith has quit [Ping timeout: 241 seconds]
bionoid has quit [Remote host closed the connection]
tonini has joined #ruby
m104_ is now known as m104
bradsmith has joined #ruby
smathieu has joined #ruby
stoffus has joined #ruby
arya_ has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
limon7 has joined #ruby
ananthakumaran has joined #ruby
stoffus has quit [Client Quit]
smathieu has quit [Ping timeout: 268 seconds]
arya_ has joined #ruby
stonevil has quit [Remote host closed the connection]
stonevil has joined #ruby
Kricir has joined #ruby
jonathanwallace has quit [Ping timeout: 260 seconds]
_Andres has joined #ruby
stonevil has quit [Ping timeout: 246 seconds]
whowantstolivefo has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
codecop has joined #ruby
babykosh has quit [Quit: babykosh]
swordsmanz has quit [Quit: ooh ponies kinkeyyy]
Davey has quit [Quit: Computer has gone to sleep.]
zachrab_ has quit [Remote host closed the connection]
Es0teric has joined #ruby
limon7 has quit [Remote host closed the connection]
druonysus has quit [Ping timeout: 264 seconds]
aganov has joined #ruby
druonysus has joined #ruby
spectre| has quit [Quit: Leaving.]
cyong has quit [Quit: Leaving.]
optimusprimem has quit [Ping timeout: 268 seconds]
cha1tanya has joined #ruby
bigkevmcd has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
echevemaster has quit [Quit: Leaving]
RichardBaker has quit [Quit: RichardBaker]
Davey has joined #ruby
RichardBaker has joined #ruby
RichardBaker has quit [Client Quit]
blaxter_ has joined #ruby
freerobby has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
dash_ has quit [Quit: dash_]
warren has joined #ruby
druonysus has quit [Ping timeout: 256 seconds]
optimusprimem has joined #ruby
dash_ has joined #ruby
freerobby has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Remote host closed the connection]
noop has joined #ruby
<warren>
Hi, I'm having trouble with the scrypt rubygem. I am unable to reproduce a particular one-way hash from a similar C implementation of scrypt. It might be because I am using ruby incorrectly, or perhaps I am using the scrypt rubygem in an unexpected way that is unsupported.
<warren>
bnagy: rare hash outputs are how you create artificial scarcity in a bitcoin-like design
<bnagy>
ericboehs1: huh, yeah you're right
<bnagy>
warren: ah ok, all good then... apart from not working
buibex has joined #ruby
jenrzzz has quit [Quit: leaving]
<ericboehs1>
So does anyone know how to kill a threaded system call in ruby?
tjbiddle has quit [Quit: tjbiddle]
lnormous has quit [Ping timeout: 246 seconds]
Elico has quit [Quit: Elico]
<bnagy>
it's not a system call, it's just the sleep command
<bnagy>
you could look at fork() and see if you can get more control that way
<ericboehs1>
The sleep command is an example.
_whitelogger_ has joined #ruby
bradsmith has quit [Remote host closed the connection]
Olipro has quit [Ping timeout: 262 seconds]
<bnagy>
warren: it's weird. Are there either any other gems, or can you write against the same C lib it's wrapping?
<bnagy>
like, in c
<ericboehs1>
A long timeout will actually work in my use case.. I think I'll just do seomthing like: Thread.new { system "(sleep 100) & sleep 5 ; kill $!" }
_whitelogger has quit [Remote host closed the connection]
<ericboehs1>
Solving ruby problems with bash :D
<apeiros>
suicidal app
tekacs has joined #ruby
rickmasta has joined #ruby
Olipro has joined #ruby
krnflake has joined #ruby
<apeiros>
def seppuku!; `kill -9 #{$$}`; end
L8D has quit [Ping timeout: 256 seconds]
bradsmith has joined #ruby
threesome has joined #ruby
L8D has joined #ruby
<warren>
bnagy: I can easily just wrap the same C lib, but it won't be acceptable to upstream. they want either native ruby or an existing rubyge.
<bnagy>
warren: yeah, just for debugging
freerobby has joined #ruby
<[narcan]>
anyone here used fnordmetric ?
maxmanders has joined #ruby
stoffus has joined #ruby
<warren>
I'm rather new to ruby... I'll test it by making my own FFI rubygem.
platforms_away is now known as platforms
bradsmith has quit [Ping timeout: 276 seconds]
ehaliewicz has joined #ruby
maxmanders has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
ShapeShifter499 has joined #ruby
<bnagy>
warren: hm.. wait is this written by hand?
<bnagy>
usually these FFI gems would just wrap a well known external lib
<warren>
bnagy: unclear
<bnagy>
if you have a C lib you know, IMHO I would FFI that
alup has joined #ruby
camilasan has joined #ruby
<bnagy>
unless it's clear this guy hasn't just written his own version, in c
freerobby has quit [Ping timeout: 241 seconds]
nikeita has joined #ruby
<warren>
i'm looking at the original author of scrypt's source now
<warren>
well, at least I have a working scrypt implementation now... next I need to figure out why the scrypt rubygem isn't doing what I expect.
lkba has joined #ruby
<bnagy>
so, what, your wrapper works?
<bnagy>
just use that then ;)
<warren>
bnagy: upstream won't accept it
oceanbreeze has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
<warren>
I either need to 1) figure out how I'm using scrypt rubygem incorrectly 2) write scrypt in native ruby, which I suspect will be way too slow since it's designed to be memory inefficient and slow 3) or fix the scrypt rubygem to do this thing it wasn't intended to do.
Speed has joined #ruby
Kricir has quit [Ping timeout: 260 seconds]
mywebcompute has quit [Remote host closed the connection]
<bnagy>
ok then just fix the gem - if you've got working FFI code you should be able to see where it's different, no?
khismetix has joined #ruby
mywebcompute has joined #ruby
<warren>
our implementation of scrypt forked from the upstream scrypt a LONG time ago and we stripped out everything we don't need for performance
<xybre>
Wait, you're trying to make scrypt *more* performant?
<xybre>
Isn't that sort of exactly the opposite of the goal?
himsin has quit [Quit: himsin]
<warren>
hahahaha
<warren>
yes
<warren>
xybre: we're using scrypt in a weird way. It's a proof-of-work, the validator needs to be as fast as possible.
buibex has quit [Remote host closed the connection]
<xybre>
Making rainbow tables or something?
<xybre>
scrypt won't be performant in Ruby, while Ruby can be optimized, bit shifting and all that is not fun stuff in Ruby, and it will be slower at runtime due to method resolution and object instantiation. For high performance applications a C extension is the only way to go.
<warren>
xybre: bitcoin uses sha256d for proof-of-work, you need to find rare hash outputs with lots of leading zeroes to randomly solve a block solution. litecoin replaced the proof-of-work with scrypt + particular parameters.
<warren>
xybre: I agree
AndChat| has joined #ruby
yacks has joined #ruby
<xybre>
That should be seriously flexing the security of SHA-2 and Scrypt algos.
senayar has joined #ruby
ehaliewicz has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 256 seconds]
heftig has quit [Ping timeout: 264 seconds]
pyx has joined #ruby
pyx has quit [Client Quit]
s2013 has quit [Ping timeout: 260 seconds]
platzhirsch has joined #ruby
<jonahR>
If anyone needs a simple RVM intro, I wrote a simple tip (article) about using RVM for projects at coderwall, https://coderwall.com/p/812law
AndChat| has quit [Quit: Bye]
<xybre>
jonahR: going to spam every channel with that?
lkba has joined #ruby
<jonahR>
only pasted into two channels. Sorry
<gnufied>
xybre: thats uncalled for. it is not spam.
<jonahR>
only trying to help out new ruby devs
<Xeago>
better keep it on you clipboard when somebody mentions it
amacgregor has joined #ruby
relix has joined #ruby
<gnufied>
I am amazed what people will call spam these days.
heftig has joined #ruby
<bnagy>
linkbaiting is spam imho
<gnufied>
bnagy: do we call spam when you post your github project etc?
ebanoid has quit [Read error: Connection reset by peer]
<gnufied>
spam is inherently, something which is not revelant to the group/community
<bnagy>
if I ever did it when it wasn't actually directly related to the discussion, yeah, you could
smathieu has joined #ruby
anay has quit [Remote host closed the connection]
<xybre>
When I see someone copy paste the same blurb with a link between multiple channels it is a yellow flag.
<jonahR>
gnufied: thanks for staying true to MINSWAN
banister`sleep has joined #ruby
ebanoid has joined #ruby
<xybre>
At least you're not a bot, had that happen last week.
darth_chatri has joined #ruby
shaunbaker has joined #ruby
shaunbak_ has joined #ruby
freerobby has joined #ruby
blaxter_ is now known as blaxter
nari has quit [Ping timeout: 245 seconds]
smathieu has quit [Ping timeout: 264 seconds]
maxmanders has joined #ruby
buibex has joined #ruby
emergion has joined #ruby
axeman- has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
bionoid has joined #ruby
axeman- has joined #ruby
anay has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
jibi_ has quit [Quit: .]
shaunbaker has quit [Ping timeout: 245 seconds]
freerobby has quit [Ping timeout: 240 seconds]
niklasb has joined #ruby
Lewix has quit [Remote host closed the connection]
ayonix has quit [Read error: Connection reset by peer]
contradictioned has quit [Read error: Connection reset by peer]
row has left #ruby [#ruby]
Iszak has quit [Max SendQ exceeded]
<warren>
bnagy: although i'm being told by the litecoin devs who forked scrypt long ago that our scrypt is optimized and a lot faster than the original
Iszak has joined #ruby
Iszak has quit [Client Quit]
bionoid has quit [Remote host closed the connection]
<bnagy>
nice
Kricir has quit [Ping timeout: 268 seconds]
contradictioned has joined #ruby
<bnagy>
what's 'wrong'?
noyb has joined #ruby
<warren>
bnagy: I can imagine the scrypt rubygem maintainer won't like the idea of including yet another implementation
QKO has joined #ruby
<bnagy>
I'm confused though - does your c code pass their tests?
ayonix has joined #ruby
<warren>
bnagy: "their" being who?
DarthGandalf has quit [Ping timeout: 245 seconds]
jonahR has quit [Quit: jonahR]
<bnagy>
the ruby scrypt
<warren>
no
<warren>
our C code is hard-coded to litecoin's scrypt parameters.
himsin has joined #ruby
<bnagy>
hrm
Blue_Ice_ is now known as Blue_Ice
Kar- has quit [Remote host closed the connection]
klip has quit [Read error: Connection reset by peer]
<bnagy>
can't you just publish your own gem, then use that?
YaNakilon has joined #ruby
<warren>
The upstream owner of bitcoin-ruby is resistant to relying on FFI at all. He isn't convinced that the speed of the hash matters. I don't think he realizes how horrible scrypt would be in native ruby.
<warren>
but he begrudgingly will accept an existing, widely used library
BRMatt has joined #ruby
adeponte has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<bnagy>
it would probably be vaguely ok in jruby :P
nikeita has quit [Quit: sleep]
<bnagy>
but I guess that's going to fly even less
<warren>
He said no to relying on java, even though most people run this in jruby.
<bnagy>
sounds like a bit of work to write it in ruby though
<bnagy>
I'd love to see the benchmarks though :)
<warren>
I thought this would be a quick port when I saw the scrypt rubygem ... supposed to be working on my thesis now. =)
adeponte has quit [Remote host closed the connection]
puppeh has joined #ruby
<puppeh>
can I do '$addToSet' in mongo for a nested field?
shaunbaker has quit [Remote host closed the connection]
stoffus has joined #ruby
spectre| has quit [Quit: Leaving.]
anay has quit [Remote host closed the connection]
Kricir has joined #ruby
graydot has quit [Quit: graydot]
<_br_>
xeqtr: maybe this is better. Dir.glob( "*.rb" ).sort_by { |item| item.tr( "^0-9", "" ).to_i }.pop
<_br_>
a bit more maintainable.
ArchBeOS has joined #ruby
arya_ has joined #ruby
obs has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
karlfreeman has joined #ruby
<xeqtr>
_br_ does that return the highest number?
<_br_>
no it returns the filename with the highest number
stonevil has joined #ruby
<xeqtr>
aah
<_br_>
xeqtr: Find all *.rb, sort them by the int and give me the last value of the array (largest)
caveat- has quit [Ping timeout: 264 seconds]
osvico has joined #ruby
darth_chatri has quit [Ping timeout: 264 seconds]
<xeqtr>
_br_ it would be nicer to use. i just need to rewrite some lines first cause now i'm using the same function to return all files, some files, and then just picking the highest from that result
caveat- has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
lupine has joined #ruby
<_br_>
uh, I see.
stonevil has quit [Remote host closed the connection]
<_br_>
well, need my caffene fix. bbl
browndawg1 has joined #ruby
sailias has quit [Ping timeout: 276 seconds]
withnale has quit [Ping timeout: 264 seconds]
cody-- has quit [Quit: Computer has gone to sleep.]
withnale has joined #ruby
yacks has joined #ruby
browndawg has quit [Ping timeout: 246 seconds]
sumark has quit [Remote host closed the connection]
vvvvoo has quit [Ping timeout: 240 seconds]
<zai>
if I install a gem with rdoc documentation: where do I find the rdoc documentation? (ubuntu)
sumark has joined #ruby
xefi_ has quit [Ping timeout: 264 seconds]
xefi_ has joined #ruby
realDAB has joined #ruby
darth_chatri has joined #ruby
Kricir has joined #ruby
juo100 has quit [Quit: juo100]
obs has quit [Remote host closed the connection]
karlfreeman has quit [Remote host closed the connection]
karlfreeman has joined #ruby
kofno has joined #ruby
<zai>
found it. it's $(gem env gemdir)/doc
jibi has joined #ruby
xefi_ has quit [Ping timeout: 264 seconds]
mark_locklear has joined #ruby
xefi_ has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
<_br_>
zai: gem gem help contents
<_br_>
zai: gem contents <gemname> | egrep -i doc
devoldmx has joined #ruby
noxgirl has quit [Ping timeout: 264 seconds]
smathieu has joined #ruby
perlsyntax has joined #ruby
ananthakumaran has joined #ruby
devoldmx27 has quit [Ping timeout: 246 seconds]
jibi has quit [Ping timeout: 276 seconds]
krawchyk has joined #ruby
<perlsyntax>
Does RubyGems come with ruby 1.9.3?
autumn has joined #ruby
msuszczy has joined #ruby
L8D has left #ruby [#ruby]
smathieu has quit [Ping timeout: 264 seconds]
<perlsyntax>
nevemind i found it:)
<perlsyntax>
forgot it was gem silly me.
<zai>
thx _br_
jlast has joined #ruby
Tricon has quit [Quit: Bye!]
Tricon has joined #ruby
Nakilon has joined #ruby
maz-dev has joined #ruby
fmcgeough has joined #ruby
<perlsyntax>
hi zai
geekbri has joined #ruby
realDAB has quit [Quit: realDAB]
YaNakilon has quit [Ping timeout: 246 seconds]
denver has joined #ruby
anonymuse has joined #ruby
yshh has joined #ruby
schickung has quit [Ping timeout: 260 seconds]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
haxrbyte_ has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
cjs226 has quit [Quit: cjs226]
Kruppe has joined #ruby
kofno has quit [Remote host closed the connection]
schickung has joined #ruby
kofno has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
darth_chatri has quit [Ping timeout: 246 seconds]
cj3kim has joined #ruby
juo100 has joined #ruby
darth_chatri has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
Neomex has joined #ruby
yshh has quit [Ping timeout: 276 seconds]
rshetty has joined #ruby
jonathanwallace has joined #ruby
xefi_ has quit [Ping timeout: 264 seconds]
xefi_ has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
schickung has quit [Ping timeout: 256 seconds]
hamakn has quit [Remote host closed the connection]
anay has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
bradsmith has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
gyre007 has joined #ruby
axeman- has joined #ruby
freerobby has joined #ruby
theRoUS has joined #ruby
arya_ has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 268 seconds]
h8R has joined #ruby
codepython777 has joined #ruby
codepython777 has quit [Read error: Connection reset by peer]
sanav has joined #ruby
ehc has joined #ruby
braoru has joined #ruby
ehc has quit [Client Quit]
Judge has quit [Read error: Operation timed out]
sailias has joined #ruby
ehc has joined #ruby
arya_ has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
codepython7771 has quit [Ping timeout: 248 seconds]
nari has joined #ruby
Judge has joined #ruby
nlv has joined #ruby
schickung has joined #ruby
freakfantom has joined #ruby
huoxito has joined #ruby
pipework has quit [Remote host closed the connection]
moted has quit [Ping timeout: 264 seconds]
JZTech101 has joined #ruby
schickung_ has joined #ruby
bradsmith has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 240 seconds]
machuga|away is now known as machuga
khismetix has joined #ruby
schickung has quit [Ping timeout: 264 seconds]
schickung_ is now known as schickung
yalue has joined #ruby
migimunz has quit [Ping timeout: 264 seconds]
sdegutis has joined #ruby
sdegutis has quit [Changing host]
sdegutis has joined #ruby
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
vikhyat has joined #ruby
devoldmx has joined #ruby
carlyle has joined #ruby
darth_chatri has quit [Ping timeout: 240 seconds]
sanav has quit [Ping timeout: 250 seconds]
milardovich has quit [Quit: Leaving]
gazarsgo has joined #ruby
karlfreeman has quit [Remote host closed the connection]
mwmnj has joined #ruby
hamakn has joined #ruby
sailias has joined #ruby
mahmoudimus has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
kristiandelay has quit [Read error: Connection reset by peer]
rshetty has quit [Quit: Sleeping]
kristiandelay has joined #ruby
mahmoudimus has joined #ruby
NimeshNeema has quit [Ping timeout: 240 seconds]
diegok has quit [Ping timeout: 240 seconds]
TomRone has quit [Ping timeout: 240 seconds]
Peej has quit [Read error: Connection reset by peer]
chihhsin has quit [Read error: Connection reset by peer]
Peej has joined #ruby
sdegutis has quit [Remote host closed the connection]
chihhsin has joined #ruby
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #ruby
darth_chatri has joined #ruby
kapowaz has quit [Ping timeout: 240 seconds]
Beoran_ has quit [Ping timeout: 240 seconds]
browndawg1 has quit [Ping timeout: 240 seconds]
diegok has joined #ruby
TomRone has joined #ruby
Beoran_ has joined #ruby
ryannielson has joined #ruby
lord4163 has joined #ruby
d2dchat has joined #ruby
<lord4163>
Hello
browndawg has joined #ruby
cj3kim has quit [Ping timeout: 256 seconds]
nezumi has quit [Read error: Operation timed out]
ewnd9 has quit [Remote host closed the connection]
axeman- has quit [Ping timeout: 264 seconds]
<lord4163>
I wanted to know if it's really hard to make a GUI application which can read/write xml, send web requests, download files and play them? :)
jerius has joined #ruby
jbpros has quit [Quit: jbpros]
<lord4163>
Has to be crossplatform, and what do you guys use to create GUI's in Ruby?
axeman- has joined #ruby
bradsmith has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
jlebrech has quit [Quit: Ex-Chat]
ananthakumaran has joined #ruby
jlebrech has joined #ruby
tomzx_mac has joined #ruby
perlsyntax has quit [Remote host closed the connection]
<Kelet>
lord4163, I've had good luck with JRuby + Swing, but it's pretty "heavy" in terms of, like Java, it sucks up the memory and such.
cj3kim has quit [Read error: Connection reset by peer]
bradsmith has joined #ruby
bradsmith has quit [Remote host closed the connection]
<lord4163>
Kelet: What about Qt?
sambao21 has quit [Quit: Computer has gone to sleep.]
<lupine>
qt-ruby is a bit special at times and places
<Kelet>
I feel like one of Ruby's downfalls is that nearly all ui bindings are outdated or just ugly
<lupine>
I honestly can't recommend it
nikeita has quit [Quit: sleep]
<Kelet>
and by ugly I mean they are fairly straight bindings and not very idiomatic ruby
<wuest>
Kelet: I agree. I'd love for shoes to not be broken from a packaging standpoint, since it is pretty darn good otherwise.
fernandoaleman has left #ruby [#ruby]
<Kelet>
Yeah, I used shoes some years ago, it seems like it is what ruby needs :)
<Kelet>
hopefully the new developers can eventually deliver something good
interactionjaxsn has joined #ruby
<Kelet>
but when I used it, it essentially came with a separate distribution of Ruby which is ick
devoldmx has quit [Ping timeout: 264 seconds]
nikeita has joined #ruby
tylersmith has joined #ruby
acrussell has joined #ruby
acrussell has left #ruby [#ruby]
AndChat| has quit [Ping timeout: 246 seconds]
TIJ has quit [Ping timeout: 261 seconds]
<nikeita>
lord4163, for this kind o prj i think jruby is the way to go, imho
<nikeita>
if u want ruby.
nikeita has quit [Client Quit]
jlast has quit [Remote host closed the connection]
tvw has quit []
cantonic has joined #ruby
Coolhand has joined #ruby
Spami has joined #ruby
pipework has joined #ruby
cads has joined #ruby
msuszczy has quit [Quit: leaving]
<shevy>
Kelet I think the new maintainers failed to deliver with shoes
jasonsmr has joined #ruby
ewnd9 has joined #ruby
jlast has joined #ruby
<Kelet>
shevy, Yeah, which is super unfortunate because I think not having things like Shoes keeps Ruby from evolving in other directions, but since I'm not contributing to the area I won't complain too much :)
<shevy>
yep
<shevy>
the evolution of the WWW also made development for bindings in ruby for GUIs harder
hogeo_ has joined #ruby
jp- has joined #ruby
<shevy>
like when everyone is using rails, they see little need in using ruby-qt or ruby-gnome. or shoes
vlad_starkov has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
<wuest>
Yeah. Clearly applications should just be packaged up with Webrick and distributed as portable web apps :p
khismetix has quit [Quit: Computer has gone to sleep.]
shaunbaker has joined #ruby
vvvvoo has quit [Client Quit]
atno has joined #ruby
darth_chatri has quit [Ping timeout: 276 seconds]
Davey has joined #ruby
gazarsgo has quit [Quit: gazarsgo]
pentameter has joined #ruby
poga has joined #ruby
Kricir has joined #ruby
poga has quit [Remote host closed the connection]
poga has joined #ruby
poga has quit [Remote host closed the connection]
toddWork_ has quit [Quit: toddWork_]
poga has joined #ruby
nikeita has joined #ruby
dEPy has joined #ruby
sdegutis has joined #ruby
sdegutis has joined #ruby
cHarNe2 has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
benweint has joined #ruby
sdegutis has quit [Remote host closed the connection]
arturaz has quit [Read error: Operation timed out]
gazarsgo has joined #ruby
bklane has joined #ruby
sdegutis has joined #ruby
sdegutis has joined #ruby
sdegutis has quit [Changing host]
TheFuzzball has joined #ruby
khismetix has joined #ruby
jonathanwallace has quit [Ping timeout: 245 seconds]
shaunbak_ has joined #ruby
BillCriswell has joined #ruby
jnoob22 has quit [Write error: Broken pipe]
jnoob22 has joined #ruby
cj3kim has joined #ruby
MrThePlague has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
julian-delphiki has joined #ruby
baroquebobcat has joined #ruby
tonini has quit [Remote host closed the connection]
stonevil has joined #ruby
buibex has quit [Remote host closed the connection]
bionoid has joined #ruby
jnoob22 has quit [Ping timeout: 246 seconds]
andikr has quit [Remote host closed the connection]
rhys has joined #ruby
bionoid has quit [Remote host closed the connection]
solars has joined #ruby
Liothen has quit [Quit: System of a down……]
cj3kim has quit [Ping timeout: 248 seconds]
bean has quit [Ping timeout: 276 seconds]
kreantos has joined #ruby
rodacato has joined #ruby
staafl has joined #ruby
khismetix has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
buibex has joined #ruby
lkba has joined #ruby
rodacato has quit [Remote host closed the connection]
<kreantos>
hello, when i start my sinatra application it tells me "https.rb:22:in `require': cannot load such file -- openssl (LoadError)" i installed then openssl via rvm but then it says "/net/http.rb:678: [BUG] Segmentation fault (core dumped)"
<ericwood>
kreantos: do you have openssl installed on the computer (not talking about the gem, but the actual libraries)
ebanoid has quit [Quit: brbomgwtfbbq]
<kreantos>
yes
<ericwood>
kreantos: what platform are you using?
<ericwood>
OS X?
braoru has quit [Quit: Leaving]
<kreantos>
ubuntu 13.04
khismetix has joined #ruby
<ericwood>
weird.
<ericwood>
you may want to try #sinatra
ananthakumaran has quit [Quit: Leaving.]
<ericwood>
this channel is more devoted to just plain 'ol ruby; the sinatra channel will probably be more helpful
baroquebobcat has quit [Quit: baroquebobcat]
<kreantos>
i have installed libssl-dev and openssl on ubuntu
stoffus has quit [Ping timeout: 264 seconds]
afd___ has quit [Read error: Connection reset by peer]
optimusprimem has joined #ruby
<kreantos>
ok, thanks ericwood
<ericwood>
I think those are the right packages, but it's been a while since I've used aptitude
afd__ has joined #ruby
<ericwood>
my best guess is that there's some stuff that's dynamically linked and the headers are missing
<ericwood>
but you'd probably see that when installing the openssl gem...
<ericwood>
hhhmmmmm
rodacato has joined #ruby
nlv has quit [Remote host closed the connection]
* ericwood
is of no use at this point
ffranz has joined #ruby
toddWork_ has joined #ruby
tagrudev has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
asteve has joined #ruby
bklane_ has joined #ruby
wmoxam has joined #ruby
mneorr_ has joined #ruby
<Xeago>
i could also be incompatible versions
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Speed has quit [Ping timeout: 240 seconds]
airlok has joined #ruby
himsin has joined #ruby
himsin has quit [Client Quit]
wallerdev has joined #ruby
cha1tanya has joined #ruby
mneorr has quit [Ping timeout: 264 seconds]
<_br_>
I generated dynamically a class object. I'd like to "require" it into objectspace. What is the best way to approach this ? ObjectSpace.class_eval ?
asteve has quit [Client Quit]
smathieu_ has joined #ruby
<sdegutis>
Is there a less convoluted way to get a C-str from a Symbol than rb_id2name(SYM2ID(obj)) ?
asteve has joined #ruby
bklane has quit [Ping timeout: 264 seconds]
baroquebobcat has joined #ruby
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
mikecmpbll has joined #ruby
staafl has quit [Ping timeout: 268 seconds]
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
rickmasta has quit [Quit: Leaving...]
denver has quit [Remote host closed the connection]
decoponio has joined #ruby
Kricir has quit [Remote host closed the connection]
blackmesa has joined #ruby
stonevil has quit [Remote host closed the connection]
<Xeago>
sdegutis: you may also try #ruby-lang
<sdegutis>
thanks
<Xeago>
more core-developers are in there
smathieu_ has quit [Ping timeout: 264 seconds]
Catbuntu has joined #ruby
Lewix has quit [Ping timeout: 256 seconds]
ffio has quit [Read error: Operation timed out]
Cyrus has quit [Quit: Cyrus.sleep()]
ffio_ has joined #ruby
dash_ is now known as d45h
bradsmith has joined #ruby
bionoid has joined #ruby
baordog has joined #ruby
jonathanwallace has joined #ruby
RonScagz has joined #ruby
r0bgleeson has quit [Quit: WeeChat 0.4.1]
bionoid has quit [Remote host closed the connection]
RonScagz has quit [Client Quit]
axeman- has quit [Ping timeout: 240 seconds]
denver has joined #ruby
mikepack has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
axeman- has joined #ruby
fuhgeddaboudit has joined #ruby
jnoob22 has joined #ruby
awarner has joined #ruby
wallerdev has quit [Quit: wallerdev]
jerius_ has joined #ruby
jerius has quit [Read error: Operation timed out]
limon7 has quit [Remote host closed the connection]
obs has joined #ruby
benweint has quit [Quit: Computer has gone to sleep.]
cj3kim has joined #ruby
apeiros has joined #ruby
thecodethinker has joined #ruby
jefflyne has joined #ruby
benweint has joined #ruby
thecodethinker has quit [Client Quit]
tkuchiki has quit [Remote host closed the connection]
benweint has quit [Quit: Computer has gone to sleep.]
apeiros has quit [Remote host closed the connection]
mjording has joined #ruby
anay has quit [Remote host closed the connection]
alex__c2022 has joined #ruby
TIJ has joined #ruby
mneorr has joined #ruby
sdegutis has quit [Remote host closed the connection]
brbcoding has joined #ruby
skaflem has quit [Quit: This computer has gone to sleep]
fermion has joined #ruby
nikeita has quit [Quit: sleep]
tatsuya_o has quit [Ping timeout: 256 seconds]
Kricir has quit [Remote host closed the connection]
andrewcarter has joined #ruby
<andrewcarter>
hey guys- we're looking into using rake tasks to replace maven on our build server
ckrailo has joined #ruby
<andrewcarter>
one nice thing maven does is let you "inherit" build tasks
obs has quit [Remote host closed the connection]
<andrewcarter>
is there a way to use a remote "sub rake"?
<_br_>
elepedus: Maybe it fills up your memory, did you log exactly what was going on? e.g. what page was being scraped etc. ?
alup has quit [Quit: Leaving]
sambao21 has quit [Quit: Computer has gone to sleep.]
nikeita has joined #ruby
<_br_>
elepedus: Since its a long-running process you might have a memory leak issue, not sure.
pskosinski has joined #ruby
<elepedus>
_br_: I didn't log anything, unfortunately
obs has joined #ruby
wallerdev has quit [Quit: wallerdev]
<elepedus>
but, i think it was about 1200 pages through (out of 2800)
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<_br_>
andrewcarter: "sub rake" ? What does that mean? Is that a inherited build task or something ?
sanav has joined #ruby
jefflyne has quit [Remote host closed the connection]
predator117 has joined #ruby
<_br_>
elepedus: Well, then its absolutely impossible to help you, because we can't rule out anything.
HAPPYFUNBRO has joined #ruby
<HAPPYFUNBRO>
hey. this command should store the output of the command in the variable, right? db2_config_check = `su - "someuser" --session-command "db2set -all DB2COMM"`
jefflyne has joined #ruby
<_br_>
HAPPYFUNBRO: Well, no, su forks another process
<Xeago>
AARGH, recruitment hell
justsee has quit [Ping timeout: 248 seconds]
<HAPPYFUNBRO>
_br_ so how would I store the output of that command./
interactionjaxsn has joined #ruby
TIJ has quit [Quit: Konversation terminated!]
airlok has quit [Remote host closed the connection]
smathieu has joined #ruby
<elepedus>
_br_: I'm thinking of trying to split the array I'm using into a few pieces using values_at and trying again. Do you think that might help? What changes can I make to make it easier to debug?
<_br_>
HAPPYFUNBRO: Since you are doing shell hackery I would suggest a simple plain log file on /tmp or so.
rodacato has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
Lewix has quit [Remote host closed the connection]
jefflyne has quit [Remote host closed the connection]
tricon_ has joined #ruby
<_br_>
elepedus: You need to integrate a sane and proper log file system and output what is going on at the moment .. secondly for long running ruby processes you need to monitor whats going on e.g. memory consumption etc.
<andrewcarter>
_br_: yea
<_br_>
elepedus: Like I wrote, without more information, tracking down the issue is difficult.
<andrewcarter>
_br_: I coudn't find that documented but I saw some people using it
<andrewcarter>
looks like it works but
ry4nn has joined #ruby
<HAPPYFUNBRO>
_br_ there must be a way to do this
<elepedus>
_br_: thanks for trying :) I'll look into implementing logging
rodacato has quit [Remote host closed the connection]
<_br_>
elepedus: np
<HAPPYFUNBRO>
*without creating a log
<_br_>
HAPPYFUNBRO: Sure there is but it will be unmaintainable imo
<lectrick>
What's the best (fastest, least resource-intensive) way to approximate PI in Ruby?
<_br_>
andrewcarter: Possibly, rake has still many holes.
<_br_>
lectrick: how many digits ?
bradsmith has joined #ruby
zachrab_ has quit [Remote host closed the connection]
<aedorn>
HAPPYFUNBRO: Yes, it should as long as db2_config_check came back as a string. You might want to double check your output by adding "p db2_config_check" to make sure you're storing what you think you're storing when this is running.
mosca_ has quit [Quit: Sto andando via]
skaczor has joined #ruby
browndawg has quit [Quit: Leaving.]
skaczor has quit [Quit: leaving]
jasonsmr has quit [Quit: Lost terminal]
<lectrick>
_br_: However many I want? I was more interested in the best solutions available to that problem (if possible, in ruby) than in the actual value itself.
phite has joined #ruby
emergion has joined #ruby
phite has quit [Changing host]
phite has joined #ruby
bradsmith has quit [Remote host closed the connection]
skaczor has joined #ruby
solars has quit [Quit: WeeChat 0.4.0]
predator117 has joined #ruby
d45h has quit [Ping timeout: 264 seconds]
sanav has quit [Quit: Page closed]
mneorr has quit [Remote host closed the connection]
<HAPPYFUNBRO>
but the code block in question still runs
kpwz has quit [Read error: Connection reset by peer]
kpwz has joined #ruby
anay has joined #ruby
dash_ has joined #ruby
<_br_>
lectrick: Hm, "however many i want" is tricky. I think the digits in ::PI are rather limited. If you want arbitrary precision you either need something that calculates arbitrary precision e.g. mersienne prime implementation or a really long contant what satisfies your entropy.
bluOxigen has quit [Ping timeout: 260 seconds]
<cr3>
how can I use methods like each, filter, etc. on a function that yields values?
<_br_>
HAPPYFUNBRO: If you do this kind of stuff you might want to look into "named pipes"
rhys has joined #ruby
bradsmith has joined #ruby
<HAPPYFUNBRO>
_br_ this should work though
<HAPPYFUNBRO>
no?
kaspergrubbe has joined #ruby
cat_martyn has quit []
<_br_>
HAPPYFUNBRO: No, su spawns an entire new Process.
<_JamieD_>
how do I convert a float into the next integer up? e.g. 2.1 > 3 or 5.8 > 6
<HAPPYFUNBRO>
oh shit
predator117 has joined #ruby
<aedorn>
HAPPYFUNBRO: try using !!db2_config_check.match(/word/)
<HAPPYFUNBRO>
yeah, do not run if this is true
Black has joined #ruby
<_br_>
Facinating. Why did the chef people define a new operator "not_if" ? What was wrong with "unless" ?
tricon_ has quit [Ping timeout: 264 seconds]
andrewcarter has left #ruby [#ruby]
Black is now known as Guest10893
<lectrick>
_br_: Because they could, probably lol
Krajsnick has quit [Remote host closed the connection]
jonahR has joined #ruby
<aedorn>
_br_: It's a condition modifier for tasks. So you build your task up and at the end you can add that in without having to add an unless modifier at the end of the task description.
<_br_>
_JamieD_: Well there is #round but it works on the normal math of everything above >.5 is round up aso.
<_br_>
aedorn: ah interesting, thanks
<aedorn>
_JamieD_: use #ceil to round up
pandawanda has left #ruby [#ruby]
<_JamieD_>
aedorn: thanks
camilasan has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 241 seconds]
pandawanda has joined #ruby
camilasan has joined #ruby
Catbuntu has joined #ruby
<michael_mbp>
hello
Tricon has joined #ruby
camilasa_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
pandawanda has left #ruby [#ruby]
Uranio has joined #ruby
pandawanda has joined #ruby
neektza1 has quit [Ping timeout: 264 seconds]
tjbiddle has quit [Quit: tjbiddle]
rezzack has joined #ruby
rezzack has quit [Changing host]
rezzack has joined #ruby
nikeita has quit [Quit: sleep]
thinkclay has joined #ruby
Guest10893 has quit [Ping timeout: 240 seconds]
<aedorn>
why must laptop vendors put pozidriv screws in
jsatk has joined #ruby
ybart has quit [Quit: ybart]
cha1tanya has joined #ruby
rippa has joined #ruby
zigomir has joined #ruby
DanKnox is now known as DanKnox_away
jsatk has quit [Remote host closed the connection]
<_br_>
aedorn: Well, some vendors even invent special screws (hint: apple) so I wouldn't complain too much about pozidriver screws.
<michael_mbp>
true
jsatk has joined #ruby
<michael_mbp>
btw any ideas on handling currency input in EUR format?
<_br_>
michael_mbp: Hm, "money" gem ?
DarthGandalf has joined #ruby
mahmoudimus has joined #ruby
<michael_mbp>
i.e. 2.340,20 is 2340.20
ntus1017 has quit [Remote host closed the connection]
<michael_mbp>
_br_: without the money gem, I don't think that'll help with this
khismetix has quit [Quit: Computer has gone to sleep.]
ntus1017 has joined #ruby
<michael_mbp>
the way I see is a gsub strategy
<_br_>
michael_mbp: oh, I see your problem now. No, thats a country specific formatting of currency. Haven't seen a "out of the box" solution for that.
buibex_ has quit [Remote host closed the connection]
<aedorn>
oh my mistake, it's a quadrex screw...
<aedorn>
that makes it so much better... /sarcasm
<michael_mbp>
_br_: yeah
<_br_>
aedorn: hehe
<michael_mbp>
lol aedorn
<michael_mbp>
_br_: I'll spec this tdd... only sensible way :)
mklappstuhl has joined #ruby
<michael_mbp>
thanks
rodacato has quit [Remote host closed the connection]
rezzack has quit [Quit: Leaving.]
thinkclay has quit [Quit: Leaving.]
ffio has quit [Quit: WeeChat 0.4.1]
rezzack has joined #ruby
bigoldrock has joined #ruby
<michael_mbp>
_br_: what's the term for this kind of input?
<michael_mbp>
'country specific formatting of currency' is a bit long :)
<_br_>
michael_mbp: I still think using e.g. the money gem as a basis makes sense. There is alot of goodness in there which helps you with other tasks. Formatting the output shouldn't be to difficult with all the helper functions in there.
<_br_>
Anyone have an idea if its possible with RMagick to use an image and a mask and produce a alpha channel png ?
rodacato has joined #ruby
benweint has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
khismeti_ has joined #ruby
obs has joined #ruby
brennanMKE has joined #ruby
zets has quit []
bluenemo has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
khismetix has quit [Ping timeout: 246 seconds]
JohnAdams has joined #ruby
<aedorn>
michael_mbp: Try RubyMoney, it has a formatter in it for different currencies. Not sure if it's what you want, though: https://github.com/RubyMoney/money
atmosx has joined #ruby
<aedorn>
oh
<aedorn>
I just read up
<michael_mbp>
:)
carlyle has quit [Remote host closed the connection]
jbpros has joined #ruby
filipe has quit [Read error: Connection reset by peer]
<_br_>
Never mind the imagemagick one, found it,.
jbpros has quit [Client Quit]
ffio has joined #ruby
rodacato has joined #ruby
tatsuya_o has joined #ruby
_JamieD_ has quit [Quit: _JamieD_]
wallerdev has joined #ruby
timonv has quit [Remote host closed the connection]
adimania has joined #ruby
<aedorn>
actually does look like the money gem will parse strings out too
rubyguy has quit [Quit: Connection closed for inactivity]
brennanMKE has quit [Ping timeout: 245 seconds]
<adimania>
Hi, can unicorn handle https traffic directly without nginx/apache/any other server?
<adimania>
atmosx, there is no ssl specific config.
babykosh has quit [Quit: babykosh]
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<adimania>
this can serve http traffic well but if I try https I get "Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error."
<_br_>
adimania: Unicorn is a socalled application server. If you want SSL/TLS capability, I strongly suggest not relying on unicorn alone, but rather use it as a reverse-proxy together with some proper proxy.
<atmosx>
adimania: I miss the point where you mentioned SSL
Kricir has joined #ruby
TIJ has joined #ruby
<Kelet>
HAPPYFUNBRO, Maybe your root password is wrong
niceguyjames has quit [Quit: Computer has gone to sleep.]
<atmosx>
adimania: unicorn can not handle HTTPS directly from what I've know. So either you're going for a dirty hack or you'd better of off use nginx
<atmosx>
which is very simple really
<Kelet>
I sincerely hope that isn't your actual root password ._.
ephemerian has quit [Quit: Leaving.]
<atmosx>
use a socket on unicorn and map-it on the nginx config
djbkd has joined #ruby
wmoxam has joined #ruby
dagobah has quit [Remote host closed the connection]
camilasa_ has quit [Remote host closed the connection]
<_br_>
I think puma can do SSL sockets out of the box. Not sure if Unicorn/Rainbows do that atm.
<adimania>
_br_, I totally agree with you. We have an application which checks for ssl explicitly. Now my upstream, http://unicorn, fails this check. That is why I was wondering
shaunbak_ has quit [Remote host closed the connection]
relix has joined #ruby
TIJ has quit [Client Quit]
asobrasil has joined #ruby
<_br_>
Quite interesting btw. if you look at shootouts between Unicorn/Rainbows/Puma etc.
noyb has joined #ruby
pygospa has quit [Disconnected by services]
<_br_>
I still think not using a battle tested proxy and only app server alone is a bad idea.
pygospa has joined #ruby
k3VB6u4d is now known as goodmanio
vikhyat has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
futilegames has quit [Quit: futilegames]
zeade has quit [Quit: Leaving.]
apeiros has quit [Ping timeout: 276 seconds]
cantonic has quit [Quit: cantonic]
Kruppe has quit [Remote host closed the connection]
Lewix has joined #ruby
noname001 has quit [Ping timeout: 248 seconds]
wmoxam has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
neektza1 has joined #ruby
kevinykchan has joined #ruby
Tricon has joined #ruby
stonevil has quit [Remote host closed the connection]
obs has quit [Remote host closed the connection]
ghr has joined #ruby
spider-mario has joined #ruby
ghr has quit [Client Quit]
i_s has joined #ruby
rupee has joined #ruby
obs has joined #ruby
urielable has joined #ruby
goodgame has quit [Ping timeout: 246 seconds]
<kaspergrubbe>
Anyone sufficient in Ruby that could take a look at this: https://gist.github.com/kaspergrubbe/6105698 how do i get it to execute the method within the scope of the Worker class?
bklane has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 248 seconds]
rodacato has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 240 seconds]
<_br_>
Paul-Atreides: Well, depends on your use-case. Padrino ?
wmoxam has joined #ruby
<Paul-Atreides>
_br_: im testing padrino. it's for a site a guy and i are going to work on.
ericboehs has joined #ruby
jonathanwallace has joined #ruby
bionoid has joined #ruby
tatsuya_o has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
Uranio has quit [Quit: while you reading this, a kitty dies]
Astralum has joined #ruby
saarinen has joined #ruby
zigomir_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
mjording has quit [Remote host closed the connection]
<ericboehs>
Is it possible to make the hotlist only count mentions?
<zendeavor>
smells like rails
Evixion has joined #ruby
cj3kim has joined #ruby
<ericboehs>
Oh man.. not at all.. I thought I was in #weechat ! haha
* ericboehs
puts on dunce hat
marcdel has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
aedorn has quit [Quit: Leaving]
tttt_ has quit [Remote host closed the connection]
rodacato has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
tttt_ has joined #ruby
kaspergrubbe has joined #ruby
sdegutis has joined #ruby
sdegutis has quit [Changing host]
sdegutis has joined #ruby
timonv has quit [Remote host closed the connection]
jeffreylevesque_ has joined #ruby
zigomir has quit [Ping timeout: 276 seconds]
jonathanwallace has quit [Ping timeout: 245 seconds]
tttt_ has quit [Remote host closed the connection]
x1337807x has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
blaxter_ has joined #ruby
anay has quit [Remote host closed the connection]
smathieu has joined #ruby
choobie has quit [Ping timeout: 276 seconds]
cj3kim has quit [Ping timeout: 240 seconds]
pandawanda has quit [Quit: pandawanda]
LaPetiteFromage has joined #ruby
axl_ has joined #ruby
jeffreylevesque has quit [Ping timeout: 264 seconds]
ebanoid has joined #ruby
arya_ has joined #ruby
BigBadQuanta has quit [Quit: Leaving]
smathieu_ has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
HAPPYFUNBRO has joined #ruby
DarthGandalf has quit [Ping timeout: 245 seconds]
kold has joined #ruby
DarthGandalf has joined #ruby
stegosaur has joined #ruby
<stegosaur>
hi, i have a hash and my keys have - characters in them... i need to get the value and doing hash[my-key] will error out because of the hash
Xsheller has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<kold>
I have an object with defined min/max ages for some Obstacles and am trying to get back only entries that a given age falls between. So far I can query them by this: Obstacle.all.find {|k| k.min_age >= 1 && m.max_age <= 5 }, but I'm not sure how to get the comparison of the age 3 in to this
noop has joined #ruby
cj3kim has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
choobie has joined #ruby
Kricir has joined #ruby
codecop has quit [Remote host closed the connection]
cj3kim has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
cj3kim has joined #ruby
jmimi has quit [Quit: Leaving.]
HAPPYFUNBRO is now known as suffix
hogeo_ has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 264 seconds]
codezombie has joined #ruby
habanany has joined #ruby
alvaro_o has joined #ruby
S0da has joined #ruby
codecop has joined #ruby
bradhe has joined #ruby
interactionjaxsn has quit [Ping timeout: 268 seconds]
Kricir has quit [Ping timeout: 264 seconds]
xcthulhu has quit [Quit: xcthulhu]
saarinen has quit [Quit: saarinen]
cdelo has joined #ruby
rupee has quit [Quit: Leaving]
mahmoudimus has quit [Ping timeout: 245 seconds]
ehaliewicz has joined #ruby
blackmesa has joined #ruby
mahmoudimus has joined #ruby
bklane has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
cha1tanya has quit [Remote host closed the connection]
sdegutis has quit [Remote host closed the connection]
cha1tanya_ has joined #ruby
grillermo has quit [Quit: bandtastic.me]
saarinen has joined #ruby
atno has joined #ruby
cha1tanya_ is now known as prathamesh
adimania has quit [Ping timeout: 260 seconds]
prathamesh has quit [Changing host]
prathamesh has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
alex__c2022 has quit [Ping timeout: 276 seconds]
asteve has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
LaPetiteFromage has joined #ruby
trepidaciousMBR has quit [Ping timeout: 256 seconds]
Nakilon has quit [Ping timeout: 246 seconds]
adambeynon has joined #ruby
YaNakilon has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
sambao21 has joined #ruby
blaxter_ has quit [Quit: foo]
interactionjaxsn has joined #ruby
sambao21 has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 248 seconds]
xcthulhu has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
sambao21 has joined #ruby
twoism_ has joined #ruby
twoism has quit [Read error: Connection reset by peer]
Takehiro has quit [Remote host closed the connection]
bionoid has quit [Remote host closed the connection]
Liquid-- has joined #ruby
<jblack>
just make a trivial class with some attr_readers, subclass it with one more, and see what you get. =)
sdegutis has joined #ruby
sdegutis has joined #ruby
sdegutis has quit [Changing host]
zachrab has quit [Remote host closed the connection]
Liquid-- has quit [Client Quit]
<BlakeRG>
what method is best for listing getters in a class
nathancahill has joined #ruby
sam113101 is now known as sam113101_afk
sam113101_afk is now known as sam113101
babykosh has joined #ruby
nikeita has quit [Quit: sleep]
milardovich has quit [Remote host closed the connection]
pskosinski has joined #ruby
BRMatt has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
<lectrick>
BlakeRG: Since the getter creation methods are just macros that make normal methods, you're better off calling .attributes on an object after you .new it
cads has quit [Ping timeout: 240 seconds]
<cr3>
is there a way to get values for multiple keys in a hash in one call?
Taranis_ has quit [Quit: brb]
<lectrick>
BlakeRG: You can probably filter the methods by <Class>.new.methods.select{|m| m.to_s =~ /=$/}
<lectrick>
Those are only the setters though
rupee has joined #ruby
<BlakeRG>
oh, very interesting lectrick, that is why i can not see the methods
<lectrick>
BlakeRG: Yeah, there's no special "getter" or "setter" methods. They're all just "methods". But there ARE instance variables, which you can "ask" an object what it has.
<BlakeRG>
i'm sitting here running .methods on an un instantiate class
pskosinski_ has joined #ruby
<cr3>
aha! I was looking for values_at
ebanoid has quit [Quit: brbomgwtfbbq]
Zeeraw has joined #ruby
cody-- has joined #ruby
<lectrick>
BlakeRG: I think you can also do Class.instance_methods... although now I forget if those are the "class instance" methods (aka "class" methods)
cantonic has joined #ruby
Zeeraw has quit [Client Quit]
<lectrick>
BlakeRG: Yeah, Classname.instance_methods are the instance (instantiated object) methods available to new objects of that class.
pskosinski has quit [Ping timeout: 240 seconds]
bionoid has joined #ruby
pskosinski_ is now known as pskosinski
<lectrick>
BlakeRG: Note that if you ONLY want the instance method defined against that class (and not any of its superclasses via inheritance), you have to pass in "false" to that call. so Classname.instance_methods(false)
scriabin has joined #ruby
<BlakeRG>
ah, perfect lectrick exactly what i needed
<BlakeRG>
thank you so much
<scriabin>
what's the best way to get ruby-1.9.x on rhel 5.8? Is there a best-prectices approach?
elaptics is now known as elaptics`away
<BlakeRG>
the key was realizing that these aren't object members but macros that setup getters/setters
<lectrick>
BlakeRG: You're welcome. Ruby has a good number of "introspection" methods that you can sort of find out about objects by asking them questions like that, via methods
<lectrick>
BlakeRG: Yep. And you can also define your own macros that do so :)
Zolo has quit [Remote host closed the connection]
Zolo has joined #ruby
<lectrick>
They're just class methods
swordsmanz has quit [Remote host closed the connection]
twoism has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
prathamesh has quit [Ping timeout: 240 seconds]
LaPetiteFromage has joined #ruby
awarner has quit [Ping timeout: 248 seconds]
BizarreCake has quit [Ping timeout: 256 seconds]
awarner has joined #ruby
bobbyz has quit [Read error: Operation timed out]
<BlakeRG>
cool lectrick all of my getter methods are indeed inherited by my sub-class
jbpros has joined #ruby
pskosinski has quit [Remote host closed the connection]
<BlakeRG>
.instance_methods is what i needed
sayan has quit [Ping timeout: 245 seconds]
twoism has joined #ruby
LaPetiteFromage has quit [Client Quit]
pskosinski has joined #ruby
Zolo has quit [Ping timeout: 240 seconds]
stoffus has quit [Ping timeout: 264 seconds]
krz has joined #ruby
<lectrick>
good. go play :)
krz has quit [Client Quit]
ntus1017 has quit [Ping timeout: 246 seconds]
ntus1017_ has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
rodacato has quit [Remote host closed the connection]
JZTech102 has joined #ruby
JZTech101 has quit [Disconnected by services]
devoldmx27 has joined #ruby
JZTech102 has quit [Read error: Connection reset by peer]
JZTech101 has joined #ruby
rippa has quit [Ping timeout: 248 seconds]
badquanta has quit [Write error: Broken pipe]
Liquid-- has joined #ruby
devoldmx3 has quit [Ping timeout: 242 seconds]
iliketurtles has quit [Quit: zzzzz…..]
LaPetiteFromage has joined #ruby
pyrac has joined #ruby
sambao21 has joined #ruby
Zolo has joined #ruby
timonv has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
cheapRoc has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
cheapRoc has left #ruby [#ruby]
Catbuntu has quit [Quit: Leaving]
effbiai has quit [Ping timeout: 264 seconds]
effbiai has joined #ruby
ewnd9 has quit [Ping timeout: 245 seconds]
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
Norsken has quit [Read error: Connection reset by peer]
mark_locklear has quit [Ping timeout: 256 seconds]
axeman- has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
niftylettuce has quit [Ping timeout: 246 seconds]
asuka has quit [Ping timeout: 246 seconds]
Muz has quit [Ping timeout: 246 seconds]
scriabin has quit [Ping timeout: 246 seconds]
brbcoding has quit [Ping timeout: 246 seconds]
silky__ has quit [Ping timeout: 246 seconds]
rndstr has quit [Ping timeout: 246 seconds]
robwilliamsuk has quit [Ping timeout: 246 seconds]
bigoldrock has quit [Ping timeout: 246 seconds]
mgorbach has quit [Ping timeout: 246 seconds]
vadelius has quit [Ping timeout: 246 seconds]
mywebcompute has quit [Ping timeout: 246 seconds]
rodasc has quit [Ping timeout: 246 seconds]
jnoob22 has quit [Ping timeout: 246 seconds]
geoffw8_ has quit [Ping timeout: 246 seconds]
phite has quit [Ping timeout: 246 seconds]
klip has quit [Ping timeout: 246 seconds]
Guest42307 has quit [Ping timeout: 246 seconds]
marcgg_ has quit [Ping timeout: 246 seconds]
paissad has quit [Ping timeout: 246 seconds]
sindork_ has quit [Ping timeout: 246 seconds]
Scient has quit [Ping timeout: 246 seconds]
linduxed has quit [Ping timeout: 246 seconds]
sebastianb has quit [Ping timeout: 246 seconds]
intuxicated has quit [Ping timeout: 246 seconds]
fcoury has quit [Ping timeout: 246 seconds]
sebastianb has joined #ruby
s__dana has quit [Ping timeout: 246 seconds]
kapowaz has quit [Ping timeout: 246 seconds]
fourq_ has quit [Ping timeout: 246 seconds]
tjbiddle has quit [Ping timeout: 246 seconds]
yalue has quit [Ping timeout: 246 seconds]
whowantstolivefo has joined #ruby
waxjar has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
benweint has quit [Quit: Computer has gone to sleep.]
fuhgeddaboudit has joined #ruby
sebastianb has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby
JohnAdams has quit [Ping timeout: 276 seconds]
crodas has joined #ruby
Al_ has joined #ruby
niftylettuce has joined #ruby
bigoldrock has joined #ruby
rezzack1 has quit [Quit: Leaving.]
stonevil has joined #ruby
robwilliamsuk has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
klipeto has joined #ruby
paissad_ has joined #ruby
Jan_ has joined #ruby
silky__ has joined #ruby
marcgg has joined #ruby
asuka has joined #ruby
vadelius has joined #ruby
Muz has joined #ruby
Jan_ is now known as Guest17828
jnoob22 has joined #ruby
maxmanders has quit [Ping timeout: 245 seconds]
mary5030 has joined #ruby
intuxicated has joined #ruby
mgorbach has joined #ruby
mary5030 has quit [Remote host closed the connection]
mywebcompute has joined #ruby
mary5030 has joined #ruby
sindork has joined #ruby
emmanuelux has joined #ruby
obs has quit [Ping timeout: 272 seconds]
havenwood has quit [Ping timeout: 240 seconds]
fuhgeddaboudit has quit [Ping timeout: 264 seconds]
amacgregor has quit [Ping timeout: 276 seconds]
Zeeraw has joined #ruby
maxmanders has joined #ruby
bluOxigen has joined #ruby
jpsirois has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phite has joined #ruby
kapowaz has joined #ruby
fourq_ has joined #ruby
Scient has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
yonahw has joined #ruby
Zolo has quit [Remote host closed the connection]
Tricon has quit [Ping timeout: 276 seconds]
tjbiddle has joined #ruby
fuhgeddaboudit has joined #ruby
effbiai has quit [Ping timeout: 240 seconds]
yonahw_ has quit [Ping timeout: 246 seconds]
yalue has joined #ruby
fcoury has joined #ruby
blueOxigen has joined #ruby
sebastianb has joined #ruby
davidboy has quit [Ping timeout: 246 seconds]
axl_ has left #ruby [#ruby]
effbiai has joined #ruby
anildigital is now known as _anildigital
andredublin has joined #ruby
nomenkun has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
andredublin has left #ruby [#ruby]
habanany has quit [Ping timeout: 240 seconds]
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
wting_ is now known as wting
axl_ has joined #ruby
brennanMKE has joined #ruby
Liquid-- has quit [Ping timeout: 240 seconds]
evenix has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
itcharlie has left #ruby [#ruby]
itcharlie has joined #ruby
linduxed has joined #ruby
eoinkelly has joined #ruby
benweint has joined #ruby
Catmartyn-ru has joined #ruby
eoinkelly has quit [Client Quit]
Kricir has quit [Remote host closed the connection]
user1 has joined #ruby
user1 is now known as rien_
akells` has joined #ruby
<rien_>
how do I properly handle an exception so that execution proceeds as normal after then begin/rescue/end block?
eoinkelly has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
i_s has quit [Remote host closed the connection]
Takehiro has joined #ruby
decoponio has quit [Quit: Leaving...]
maxmanders has joined #ruby
<matled>
rien_: if you don't return/exit/... in the rescue execution proceeds as normal
rdark has quit [Read error: Operation timed out]
stoffus has joined #ruby
<rien_>
matled: hmm ok. I think it was a crazy moment I was having with rspec matching regexps from an exception's message :)
<rien_>
matled: thanks!
`MArceLL` has joined #ruby
jefflyne has joined #ruby
habanany has joined #ruby
Zai00 has quit [Quit: Zai00]
bionoid has quit [Remote host closed the connection]
Xeago has joined #ruby
smathieu_ has quit [Remote host closed the connection]
habanany has quit [Client Quit]
jonathanwallace has joined #ruby
stoffus has quit [Quit: leaving]
stoffus has joined #ruby
bionoid has joined #ruby
cjs226 has quit [Quit: cjs226]
iliketurtles has joined #ruby
habanany has joined #ruby
Al_ has quit [Quit: Al_]
vlad_starkov has joined #ruby
crankycoder is now known as vng|afk
nomenkun has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 245 seconds]
seivan has joined #ruby
<seivan>
Hmm, any frameworks for making CLI applications? A recall a few but it's been a while.
SHyx0rmZ has joined #ruby
apeiros has quit [Remote host closed the connection]
<Nilium>
CLI meaning command-line interface or common language infrastructure?
jonathanwallace has joined #ruby
<gazarsgo>
like getopts wrappers ?
* Nilium
prods seivan with a stick
<seivan>
Nilium: The former :)
<Nilium>
Like curses or ncurses?
<seivan>
I'd hope it set up best practices and a skeleton, combined with tests. Also are there better way to pipe out to external applications other than ``
vlad_starkov has quit [Ping timeout: 264 seconds]
eoinkelly has quit [Quit: eoinkelly]
<seivan>
Nilium: Simpler, and in Ruby =)
<Nilium>
So scaffolding or whatever (I think that's the term the railsmongers coined) rather than the library/gem meaning of framework?
adkron has joined #ruby
afd__ has quit [Ping timeout: 245 seconds]
<Nilium>
Also, the curses bindings are pretty Ruby-ish.
hydrozen has joined #ruby
saintcajetan has quit [Remote host closed the connection]
LaPetiteFromage has joined #ruby
smathieu has joined #ruby
<lectrick>
So I can't convert a Float to base_16 via (float_instance.to_s(16))... Is this for mathematical reasons? (maybe floats don't have a clear definition in other bases?)
jlast has quit [Remote host closed the connection]
<Nilium>
Far as I know, there's no base-16 style float
<lectrick>
yeah i was afraid of that
fmcgeough has quit [Quit: fmcgeough]
<Nilium>
What you can do is [float].pack('f').unpack('L').to_s(16), but that's ugly. Could also just write a C function for it.
mansi has quit [Read error: Connection reset by peer]
rodacato has joined #ruby
mansi has joined #ruby
cjs226 has joined #ruby
jlast has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
cjs226 has quit [Max SendQ exceeded]
<seivan>
Nilium: Why are you making it so overly complicated.
<Nilium>
Making what overly complicated?
afd__ has joined #ruby
kleinerdrache has quit [Quit: Ex-Chat]
theRoUS has quit [Ping timeout: 264 seconds]
<Nilium>
Also, I forgot part of the unpack thingy, but whatever.
<seivan>
I was just asking for something that would setup a project skeleton with tests and have some helpers for best practices when writing the interface
<lectrick>
Nilium: [Math::PI].pack('f').unpack('L').first.to_s(16) ... ok that works. forgot the .first
devoldmx3 has joined #ruby
cjs226 has joined #ruby
<lectrick>
although no decimal there :O
<Nilium>
seivan: Because I assumed at first you meant framework as in gem/library.
<Nilium>
I can't help you with the scaffolding thing, since I'm not aware of anything for that.
cjs226 has quit [Max SendQ exceeded]
<seivan>
Nilium: So what gem would you recommend for that?
stoffus has quit [Quit: leaving]
timonv has joined #ruby
cjs226 has joined #ruby
<Nilium>
For CLI UI stuff, I'd recommend curses or ncurses-ruby. For other stuff, like argument parsing, I'm not aware of any gems, but that's 'cause I haven't looked.
djbkd has quit [Remote host closed the connection]
<Nilium>
lectrick: As far as a C function goes, you could do something like: VALUE f_as_i(VALUE rfloat) { const double float_value = NUM2DBL(rfloat); return INT2FIX(*(const int32_t *)&float_value); } /* I think */
x1337807x has joined #ruby
<Nilium>
Wow C does not translate well to a single line message on IRC.
devoldmx27 has quit [Ping timeout: 245 seconds]
mansi has quit [Read error: Connection reset by peer]
<Nilium>
Granted C doesn't look very nice regardless.
dtcrshr has quit [Read error: Connection reset by peer]
<Nilium>
Though I fault it for using the term 'DSL'
<seivan>
Hmm
timonv has quit [Remote host closed the connection]
atno has quit [Remote host closed the connection]
<seivan>
What is the best way to pipe out to an external application other than ``
dtcrshr has joined #ruby
dtcrshr has joined #ruby
dtcrshr has quit [Changing host]
Megtastique has joined #ruby
bradhe has joined #ruby
<Nilium>
Well, what do you want to do aside from just execute something?
<Nilium>
In general, I'd say use the Process module if you can, though, since it gives you better control over this stuff.
jlast has quit [Remote host closed the connection]
atno has joined #ruby
saintcajetan has joined #ruby
Es0teric has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
swordsmanz has joined #ruby
endash has joined #ruby
noop has quit [Ping timeout: 240 seconds]
arya_ has quit [Ping timeout: 264 seconds]
AndChat|335225 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
ixti has joined #ruby
freerobby has joined #ruby
matchaw has quit [Ping timeout: 248 seconds]
bauerbob has joined #ruby
matchaw has joined #ruby
<endash>
Long time dev, first time irc chatter. Running into a bizarre, bizarre issue and hoping someone can help me figure out what's going on.
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
lkba has quit [Ping timeout: 264 seconds]
<endash>
I have a User object, which has a balance. I have a Role class, which is a subclass of Module. I instantiate Role, with a block, and then extend a User (Alice) with that Role/Module
xcthulhu has quit [Quit: xcthulhu]
<bauerbob>
hi. i've got an optional parameter in my opts hash, opts[:check], it is boolean. now in my function i want to set check to opts[:check] if present, otherwise to true. my dumb first try was: check = opts[:check] || true, which is always true (because nil || true is the same as false || true). what's a simple/beautiful way to make it right?
<endash>
if I call alice.balance directly, it works fine, the balance is 100. I also have the function spit out the object signature. If, however, I call the method #deduct_funds, which is part of that Role/Module, calling #balance inside #deduct_funds spits out the same object signature, so it is still alice we're dealing with, but all of its properties are gone
<endash>
furthermore, calling self.balance inside #deduct_funds works as expected, and alice has all her properties
<bauerbob>
my 2nd try was check = opts[:check].presence || true, which is also pretty dumb, of course
hydrozen has quit [Ping timeout: 240 seconds]
xcthulhu has joined #ruby
ehaliewicz has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
cdelo_ has joined #ruby
AndChat|335225 has quit [Ping timeout: 264 seconds]
futilegames has quit [Ping timeout: 240 seconds]
arya_ has joined #ruby
AndChat|335225 has joined #ruby
<Nilium>
bauerbob: Best way is probably just to use a conditional. If not that, then `.. = !h[:check].nil? ? h[:check] : true` which is still a conditional but at least not as wordy.
saarinen has quit [Quit: saarinen]
<Nilium>
I'd still recommend a conditional over the ternary though.
AndChat|335225 has quit [Client Quit]
ehc has quit [Quit: ehc]
<Nilium>
Saying conditional over the ternary is weird since they're both functionally mostly the same thing.
mywebcompute has quit [Ping timeout: 264 seconds]
Nahra has quit [Quit: Lost terminal]
i_s has joined #ruby
<Nilium>
endash: You'll probably want to provide some sort of example code and expected input and output.
cdelo has quit [Ping timeout: 240 seconds]
futilegames has joined #ruby
postmodern has joined #ruby
futilegames has quit [Client Quit]
<bauerbob>
for a moment i thought that check ||= opts[:check]; check ||= true; must work
niklasb has joined #ruby
<bauerbob>
but it also doesn't :-(
<endash>
yarrrrrrr
<Nilium>
Nah, that'd just be true.
<bauerbob>
alright, i go with the conditionals :-)
Davey has joined #ruby
Kricir has joined #ruby
<Nilium>
h[:check] || !h[:check].nil? might also work.
marcgg has quit [Read error: No route to host]
suffix is now known as HAPPYFUNBRO
marcgg has joined #ruby
<Nilium>
That way if it's nil it's true and if it's not nil it's true or false.
Kar- has quit [Remote host closed the connection]
<bauerbob>
uhm... i think i won't understand that anymore when i take a look at it in a few weeks
<Nilium>
Hm, but then it'd be true if check was false..
<Nilium>
Damn you, or.
<endash>
oh jiminy
<endash>
I wasn't using `self.` to call setters so I was creating local vars, and that's what was causing the supposedly anomolous behaviour. Total brain fart.
mary5030 has quit [Remote host closed the connection]
fredjean has joined #ruby
devoldmx3 has joined #ruby
Takehiro has quit [Ping timeout: 264 seconds]
smathieu_ has quit [Remote host closed the connection]
asteve has joined #ruby
toddWork_ is now known as orolo
s0ber has quit [Read error: Connection reset by peer]
spider-mario has quit [Remote host closed the connection]
smathieu has joined #ruby
thomasle_ has quit [Remote host closed the connection]
s0ber has joined #ruby
n_blownapart has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
HAPPPYFUNBRO has quit [Ping timeout: 245 seconds]
<bricker>
Is it possible... hear me out here... to define public instance methods that will be accessible on instances of a class but *not* its subclasses?
<bricker>
That's silly, I know
<bricker>
dumb question
thomasle_ has joined #ruby
<DylanJ>
per instance
<onewheelskyward>
It sounds like you don't actually want the subclasses to be subclasses of that object, honestly.
<DylanJ>
^
workmad3 has joined #ruby
fuhgeddaboudit has joined #ruby
* endash
nods
r0bgleeson has joined #ruby
Norsken has joined #ruby
<bricker>
eh
mary5030 has joined #ruby
Norsken has quit [Client Quit]
<endash>
open/closed principle
gemmy has joined #ruby
Neomex has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Ping timeout: 268 seconds]
<bricker>
I guess this is more of a rails-specific problem now that I think about it, since it's using some active record functionality that's causing the problem I'm having
<ismael_>
happiness mathers. I could earn away more but I'm happy programming in ruby and for now this is what I want to do also
<dagnachew>
ismael_, may I ask what degree you hold
<dagnachew>
?
<DanielRb>
i don't like the new syntax either
r0bgleeson has quit [Ping timeout: 264 seconds]
<DanielRb>
but it's not huge of a deal
<dagnachew>
ismael_, I want to build something of a betting decision maker
smathieu has joined #ruby
<ismael_>
dagnachew I finished my licenciature this year actually, but also started working
<dagnachew>
ismael_, like a dashboard of given sport with teams and player stats
vinay_ has joined #ruby
<dagnachew>
licenciature what his this first time I heard
<dagnachew>
a computer science license ?
<L8D>
ruby is all about choice and freedom though
<ismael_>
DanielRb new syntax is awesome. I never got used to the old one, but it like the way it's clean now
<L8D>
Also, I never use anything besides symbols in my hashes
<DanielRb>
i find => easier to type, that's all
<ismael_>
dagnachew kinda, information systems
brennanMKE has joined #ruby
<DanielRb>
symbols are great
ests has quit [Quit: ests]
<dagnachew>
L8D, but I fear that I will hit wall when scaling come calling altough I am far far far away from scaling issues ...maybe by the time I will need scaling ruby will remove gil and rubinuis will be the defacto implementation :)
asgardBSD has quit [Remote host closed the connection]
Sc0rp10n has quit [Ping timeout: 264 seconds]
<ismael_>
dagnachew: I'm not considered engineer but I don't need that for nothing
brennanMKE has quit [Read error: Connection reset by peer]
BRMatt has joined #ruby
<L8D>
rubinius isn't a defacto implementation
sdegutis has quit [Remote host closed the connection]
<L8D>
the only defacto implemenetation is mri
<ismael_>
btw, I got my degree on Portugal. So it should be a different system
<rien_>
L8D: I think "de facto" doesn't mean what you think it means ;)
<ismael_>
he means "standard" or "default" ??
<rien_>
mri is the de facto specification of ruby
pkremer has joined #ruby
<rien_>
not implementation
r0bgleeson has joined #ruby
<rien_>
as in "nothing else specifies the ruby language but the mri implementation"
<ismael_>
mri is the mother of all rubies
<L8D>
defacto means "actual"
optimusprimem has joined #ruby
optimusprimem has joined #ruby
<rien_>
"de facto implementation" doesn't mean anything
m8 has quit [Quit: Sto andando via]
<rien_>
L8D: no, it means "established as (the adjective) by means of its own existence"
gyre007 has quit [Ping timeout: 260 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ismael_>
"defacto" in portuguese means "actually"
<L8D>
^
<ismael_>
^^
<rien_>
but it doesn't come from portuguese, it comes from latin.
<endash>
and then rearrange all the words just for fun
<L8D>
wisconsin: wut
<wisconsin>
long live yarv
<popl>
Yarp?
superscott[8] has joined #ruby
<popl>
Yaaaarp.
<L8D>
yapp?
<rien_>
endash: yes, but that does not mean that every latin expression means 10 different things.
vinay_ has quit [Ping timeout: 240 seconds]
<superscott[8]>
what's the most update to date and/or working DBI gem? ruby-dbi and rdbi seem to be abandoned?
<L8D>
I could say "I have a water bucket" like "I own a water bucket", "I have a bucket full of water"
<L8D>
etc.
Matadoer has joined #ruby
<ismael_>
some of them have 23+ different meanings
twoism has quit [Read error: Connection reset by peer]
twoism_ has joined #ruby
brennanMKE has joined #ruby
<endash>
problem i thin is that we use the word "literally" metaphorically to mean "in reality".. (and I don't mean people who can literally eat a horse )
<rien_>
ama aquae est mihi (I have a bucket of water) :)
<rien_>
habeo ama aquae (same thing)
gazarsgo has quit [Quit: gazarsgo]
dawkirst has quit [Ping timeout: 260 seconds]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<n_blownapart>
sorry I'm somewhat slow. but what happens when you take away self from line 9? http://pastie.org/8188159 thanks
<zendeavor>
i have a thing. a thing is in my possession.
<zendeavor>
whatever.
<endash>
and there's a certain art to picking out the meaning you want… for instance, my university's motto has the word "Iustitiae" in it, but reads a lot better if you translate it as "righteousness"
<endash>
instead of justice
benweint has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
keen_____ has joined #ruby
<rien_>
fun language indeed
Krajsnick has quit [Remote host closed the connection]
pipework has joined #ruby
devoldmx27 has quit [Ping timeout: 264 seconds]
<n_blownapart>
pax
keen____ has quit [Ping timeout: 276 seconds]
<ismael_>
n_blownapart: it still works. And it does exactly the same thing
ElCapitanMarklar has joined #ruby
geggam has quit [Remote host closed the connection]
<n_blownapart>
ismael_: thanks, this is tied into rspec tests. people on rails were ignoring me understandably
mklappstuhl has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
blackmesa has quit [Remote host closed the connection]
brennanMKE has quit [Remote host closed the connection]
soulcake has quit [Read error: Connection reset by peer]
tomzx_mac has joined #ruby
<n_blownapart>
I'm having trouble understanding how taking away the self affects the tests outcome for bacon_instance.edible? can you switch over to rails and help me ismael_ ?
Lewix has quit [Remote host closed the connection]
<endash>
n_blownapart: assignment is assumed ot be a local variable
<endash>
so `expired = true` would create a local variable called `expired` and set it to `true`
ElCapitanMarklar has quit [Ping timeout: 245 seconds]
<terrellt>
Just for the name.
Asher has joined #ruby
TheFuzzball has quit [Quit: Computer has gone to sleep.]
<n_blownapart>
endash when you remove the self you get the failure at the bottom of pastie. I don't see how the removal affects the outcome of the edible? method
MrZYX is now known as MrZYX|off
<n_blownapart>
endash: I went through an entire good ruby book and it is alarming that I am still having this much trouble.
bionoid has quit [Remote host closed the connection]
<ismael_>
you are right
<ismael_>
I don't know how this idea got in my mind
<endash>
its a bit of a trip up :/
codesoda has quit [Ping timeout: 264 seconds]
<n_blownapart>
I will never ever understand ruby
codesoda_ has joined #ruby
<ismael_>
sorry for misleading
<Nilium>
Well, I finally got tired enough of having to navigate to the ruby header directory that I just made a script for it.
byprdct has joined #ruby
<n_blownapart>
no worries at least it inspired debate
anonymuse has quit [Remote host closed the connection]
<terrellt>
I don't think it's a trip up.
<terrellt>
I think it's good that you have to be explicit about setters.
sarkis has joined #ruby
<endash>
i'm not saying it's *bad* just that if you don't know what's going on you can really be scratching your head
arya_ has joined #ruby
<n_blownapart>
http://pastie.org/8188041 so could you all walk me through. how does the removal of self affect the first test , because a constructor is in each test.
fredjean has quit [Quit: Computer has gone to sleep.]
evenix has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
tylersmith has joined #ruby
d2dchat has quit [Remote host closed the connection]
<Nilium>
Explicitness is next to mild annoyance, finger cramps, and godliness.
codesoda has joined #ruby
<n_blownapart>
separate* constructor
rodacato has joined #ruby
<n_blownapart>
i.e each test has it's own object instance, so would !expired still be true?
Dreamer3 has joined #ruby
<n_blownapart>
wouldn't*
<ismael_>
I'm now installing 1.9.2 to be sure self is always required
codesoda has left #ruby [#ruby]
<terrellt>
n_blownapart: ...Is your test actually erroring like that?
jfelchner has joined #ruby
x1337807x has joined #ruby
codesoda_ has quit [Ping timeout: 276 seconds]
<n_blownapart>
terrellt: after the removal of self. I left it in the failure is without the self.
arya_ has quit [Ping timeout: 245 seconds]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<ismael_>
n_blownapart: without self it will assing to a local variable instead of your instance variable
postmodern has quit [Quit: Leaving]
<terrellt>
So when you remove self from expired! you're essentially doing def expired!; return some_other_variable_im_not_storying_anywhere = true; end;
<terrellt>
Storing, too.
<ismael_>
n_blownapart: sorry for misleading you earlier
<n_blownapart>
terrellt: part of the problem is that I've never used tests, and they are warping my brain. no worries ismael_
milardovich has quit [Ping timeout: 276 seconds]
kaspergrubbe has quit [Remote host closed the connection]
hackingoff has quit []
<n_blownapart>
terrellt: ismael_ thanks !
evenix has quit [Ping timeout: 276 seconds]
_Andres has joined #ruby
kaspergrubbe has joined #ruby
tylersmith has quit [Ping timeout: 264 seconds]
staafl has quit [Ping timeout: 260 seconds]
kaspergrubbe has quit [Read error: Connection reset by peer]
<terrellt>
I like to use self whether or not it's -actually- required, so I know exactly what I'm calling a method on.
postmodern has joined #ruby
Takehiro has joined #ruby
<ismael_>
terrellt: plus 1
<ismael_>
terrellt: do you always use self or just on assignments?
<terrellt>
Always.
<ismael_>
terrellt: even for normal methods? Or just getters and setters?
<terrellt>
Even for normal methods.
<terrellt>
Although, what -isn't- a getter or setter?
<ismael_>
hm. I don't approve that
<ismael_>
command methods
<terrellt>
Such as?
<ismael_>
for example "run"
<terrellt>
Yes, self.run
mrsolo has quit [Quit: Leaving]
milardovich has joined #ruby
v1rr3n has joined #ruby
xcthulhu has quit [Quit: xcthulhu]
<ismael_>
and why you do that? I think that's just polution. I understand why one would use self on getters and setters
<ismael_>
to make sure those does not seem local variables
<terrellt>
So that I can look at that line and say "okay, I'm calling the run method on this object." instead of looking up to make sure I'm not returning the value stored in the local variable called "run"
<ismael_>
but using self on every method call seems just too much and uneccessary
Takehiro has quit [Ping timeout: 245 seconds]
Deele has quit [Ping timeout: 240 seconds]
<terrellt>
It might be okay if you were to explicitly include the parenthesis for the run call.
<terrellt>
But that's less pretty.
<ismael_>
on my code most of the time I don't have that problem, my making small methods with 5-10 lines max
<ismael_>
*by
<ismael_>
*by making ....
awarner has quit [Ping timeout: 245 seconds]
<terrellt>
Sure, it's not -terribly- onerous to look up most of the time, but I honestly feel explicitness is good practice - whether or not the language lets you avoid it.
rhys has quit [Quit: Leaving]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<ismael_>
also, proper named methods and variables help a little
mootpointer has joined #ruby
emergion has joined #ruby
<ismael_>
and there is one gain on leaving self out. You abstract that
<terrellt>
Lol, I suppose you could argue that it makes it easier to pull out a local variable.
<ismael_>
and your code does not know if it is a method or instance variable and you can change it on the future instead of removing or adding a self
<ismael_>
I know this is kinda stupid but leaving self out
johnnyfuchs has quit [Remote host closed the connection]
<ismael_>
seems good to me
* terrellt
shrugs.
<terrellt>
As long as it's consistent.
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
wmoxam has quit [Ping timeout: 248 seconds]
<ismael_>
I'm remembering now about a screencast I saw about this. Well, not directly about this but it was where I got this ideas from
awarner has joined #ruby
<ismael_>
I think it was a ruby tapas episode
<ismael_>
about extracting everything into a method
<ismael_>
have you seen it?
jibi has quit [Quit: .]
devoldmx has joined #ruby
kofno has quit [Remote host closed the connection]
jeffreylevesque_ has quit [Remote host closed the connection]
ismaelrb has joined #ruby
<ismaelrb>
testing this thing
rodacato has quit [Remote host closed the connection]
pskosinski has joined #ruby
Jedi_SCT1 has quit [Ping timeout: 264 seconds]
<mootpointer>
ismaelrb: Greetings.
<ismaelrb>
mootpointer hi
<ismaelrb>
what irc client app do you guys use?
obs has quit [Remote host closed the connection]
<Tricon>
ismaelrb: Linkinus.
fridim_ has joined #ruby
cody-- has joined #ruby
<ismaelrb>
I'm trying Textual and irssi at the same time
<n_blownapart>
limechat
jlebrech has quit [Ping timeout: 264 seconds]
jarin has joined #ruby
<DylanJ>
ismaelrb: weechat. longtime irssi use until a few months ago
<ismaelrb>
Textual is sexy but I won't pay for a irc client
devoldmx3 has joined #ruby
arya_ has joined #ruby
maroloccio has quit [Ping timeout: 264 seconds]
gemmy has quit [Quit: leaving]
predator217 has joined #ruby
Speed has quit [Read error: Connection reset by peer]
cody-- has quit [Client Quit]
<v1rr3n>
weechat is looking awsome with my xresources
<ismaelrb>
DylanJ weechat seems interesting. At least seems to be better then irssi
bl00dsh0t has joined #ruby
<n_blownapart>
ismaelrb: I'm a noob but limechat is great and free
<ismaelrb>
do I need to learn a lot of key bindings to use weechat ?
<n_blownapart>
for osx
devoldmx has quit [Ping timeout: 264 seconds]
<DylanJ>
ismaelrb: it's pretty fugly ootb. it grew on my though. maybe i got lazy.
<v1rr3n>
ismaelrb: no its mostly f keys
<bl00dsh0t>
do you have any tutorials on net-ping?
<ismaelrb>
n_blownapart thanks. I've used limechat in the past
<n_blownapart>
are you ismael_ ?
<Tricon>
I like irssi, but I like that Linkinus embeds images and videos.
<DanielRb>
Macruby looks awesomeone, anyone here have experience with it?
<DylanJ>
kinda what mine looks like
<DanielRb>
*awesome
<n_blownapart>
I need to beg your assistance one last time re: discussion ismaelrb
predator117 has quit [Ping timeout: 240 seconds]
ctp has quit [Remote host closed the connection]
<n_blownapart>
if you take away self, !expired cannot read #expired! because it is merely defined with a local variable and no instance?
arya_ has quit [Ping timeout: 240 seconds]
<ismaelrb>
Tricon wow. Seems to be the best for now. But I'm not into a paid client.
<n_blownapart>
ismaelrb ^^
<DanielRb>
weechat looks nice
<Tricon>
DanielRb: I've done some MacRuby.
<n_blownapart>
shit I mean edible? cannot read expired! ^^ ismaelrb
<ismaelrb>
DylanJ looks really awesome for a terminal client
<DanielRb>
Tricon: great, what's your experience with it? good, bad.. would you rather write in Objective-C or?
randomau_ has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<ismaelrb>
DanielRb better go with rubymotion. It actually compiles into binary as a normal Obj-C app
<Tricon>
DanielRb: I do like MR, and it talks directly to the Obj-C runtime layer, so it's fast, but... 1. I like Obj-C, 2. GC is deprecated in Cocoa (in favor of ARC), 3. It's hard to invest full time, for desktop/mobile applications, a language that doesn't let me disable the GC and manually manage memory.
awarner has quit [Remote host closed the connection]
noyb has quit [Ping timeout: 264 seconds]
<Tricon>
I really like MR for scripts that can talk to Cocoa, though.
<DanielRb>
hmm, if only rubymotion was open source
<Tricon>
Not a fan of RubyMotion, for the record.
<ismaelrb>
DanielRb I've just started the last week into rubymotion and I feel I need to learn everything in Obj-C but still I think it's worth it because you have the best of both worlds. Native apps and the ruby's dynamic and beautiful language
awarner has joined #ruby
froy has quit [Quit: kablam!]
noyb has joined #ruby
<DanielRb>
i do have a bit of experience with Objective-C and Cocoa though, so i think i'll give it a go
randomautomator has quit [Ping timeout: 276 seconds]
<ismaelrb>
n_blownapart sorry. I got lost
fschuindt has joined #ruby
randomau_ has quit [Ping timeout: 240 seconds]
fschuindt has quit [Client Quit]
<v1rr3n>
Is there no portable way to get native apps on all platforms and avoid MR or rubymotion? Why would you need them?
<ismaelrb>
n_blownapart maybe you should try stackoverflow It's easier to help there
qhartman has joined #ruby
mmitchell has joined #ruby
<v1rr3n>
I'm not a Mac user so I'm just wondering?
<n_blownapart>
ismaelrb: do they have a chatroom?
<DanielRb>
why is ruby motion so expensive lol?
<DanielRb>
in AU it's $223+
huoxito has quit [Quit: Leaving]
<DanielRb>
especially for students + people who don't make any money
BillCriswell has joined #ruby
<qhartman>
Is there a more idiomatic way to to do this sort of test on a variable: 'if !foo.nil? and foo == "bar"'
<ismaelrb>
DanielRb I'm having a hard time because I'm a noob at cocoa and app development but I already feel rubymotion worth it because you can do everything you are used to in ruby. I just need to learn the framework better.
<qhartman>
essentially I only want true if foo== bar, but I'm not guaranteed that the variable will be set when I get it
benlieb has quit [Quit: benlieb]
cody-- has joined #ruby
carlyle has joined #ruby
<DanielRb>
i see
Matadoer has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<ismaelrb>
DanielRb I didn't pay for it, it was the company I work for. I know it seems a lot but is it?? I mean, it's a great peace of software and this way you get support and you know for sure it wont just get abandoned.
twoism_ has quit [Remote host closed the connection]
itcharlie has left #ruby [#ruby]
mmitchell has quit [Ping timeout: 245 seconds]
<ismaelrb>
n_blownapart they have but you need reputation to go in there. But you can just get post your question and wait. For sure you will get an answer there
<DanielRb>
ismaelrb: for companies, sure.. it's worth it. but for students, it's just too expensive
<DanielRb>
i
Aww_ is now known as EvilAww
<DanielRb>
i've emailed them about a student discount, hopefully it's fair
<ismaelrb>
DanielRb sure. I wouldn't buy it for personal use for sure