`petey` has quit [Remote host closed the connection]
jhunter has joined #ruby
`petey` has joined #ruby
<jhunter>
q: how to escape => in an .erb?
<jhunter>
i'm assigning val => <%= variable1 %>
<jhunter>
and that => is breaking things
cbetta_afk is now known as cbetta
danshultz has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
<e62>
Our resque pool died and there are a bunch of resque jobs in one of our queues that seem to be stuck. Anybody know how to easily re-enqueue jobs with Resque?
<psst>
centrx: I didn't use collect because that is intended to produce an array result with the same size as the iterated-over collection, right?
<centrx>
psst, yes
<centrx>
psst, Can you describe what you are trying to do, it seems like a roundabout way of doing something
mlpinit has joined #ruby
<centrx>
psst, I assume @deps stands for dependencies
<bnagy>
but it's a recursion, so your map / collect _should_ have the same number of elems
<bnagy>
like if this node has 3 children your map will produde 3 values
<bnagy>
but they'll each be nested
pen has quit [Read error: Connection reset by peer]
<psst>
centrx: I have a class Project with a field @deps that is an array of Projects
<bnagy>
if you want it flat then you you should each, but then you need to append to arr in the each
<psst>
bnagy: the end result I want is a flat list of all the nested dependencies without dupes
pen has joined #ruby
<bnagy>
personally imho map is more readable, you can flatten it afterwards
Fire-Dragon-DoL has joined #ruby
<benzrf>
flat_map
shedd has quit [Ping timeout: 272 seconds]
Megtastique has quit []
<psst>
bnagy: arr |= @deps # doesn't this modify the passed in array?
<bnagy>
psst: it does, but your each there does nothing
<yoshie902a>
bnagy: when I say precision, I guess I mean the number of characters after the decimal. However, it seems dependent on the total number of characters.. Float(123456789123456789.123456789)
<yoshie902a>
=> 123456789123456780.0
bean has joined #ruby
heidi has quit [Quit: Leaving.]
<psst>
bnagy: it passes the array to each dep in turn
<bnagy>
psst: is it working?
pen has quit [Client Quit]
FifthWork has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<psst>
bnagy: it definitely visits all the children, but the end result doesn't include them
<bnagy>
yoshie902a: no runtime should return that, what version are you using?
<bnagy>
it should give you an eXX notation
kitak_ has quit [Read error: Connection reset by peer]
kevind has quit [Quit: kevind]
kitak has joined #ruby
<centrx>
psst, The arr you are building up as it visits is discarded each time
<yoshie902a>
bnagy: how would I check?
<bnagy>
but yes, floats have precision limits at some point, that is the nature of floats
<bnagy>
RUBY_DESCRIPTION
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heidi has joined #ruby
<centrx>
oh well I guess you are passing it in there
<bnagy>
imho each and append or map with one final flatten
<bnagy>
each and append is probably the most efficient
<psst>
bnagy: if I ignore the method call within the each, I agree that arr should not grow
Galgorth has joined #ruby
<psst>
bnagy: are you saying that the call to all_deps(arr) has no effect?
<centrx>
psst, The arr is not growing because you are running arr |= @deps
<bnagy>
psst: ok, I cannot say the same thing in words that are any smaller, you'll have to work it out for yourself from here by experimenting
nanoyak has quit [Ping timeout: 252 seconds]
<centrx>
psst, You are unioning with the original @deps every single time
sergicles has joined #ruby
cescalante is now known as ce_afk
Albright has quit [Quit: Albright]
vlad_starkov has joined #ruby
<centrx>
psst, You are looking for something like arr |= arr.map { |p| p.all_deps }
<centrx>
psst, But it can be done all in one line with flatten and uniq
<psst>
centrx: does that work recursively?
<bnagy>
I don't see why you would want uniq
nanoyak has joined #ruby
mlpinit has quit [Remote host closed the connection]
charliesome has joined #ruby
<centrx>
bnagy, If two dependencies both depend on the same third dependency, he only wants a list that has one entry for it, I assume
<psst>
correct
<psst>
that's why I was trying union
<centrx>
psst, It would be recursive to do it passing the arr and then assigning the arr like arr |= arr.map { |p| p.all_deps }
<centrx>
psst, but having a one-line map would also be "recursive"
robbyoconnor has quit [Ping timeout: 265 seconds]
<psst>
hmm, I see.
<yoshie902a>
bnagy: any info on my version?
<psst>
That sounds much better.
<centrx>
psst, The "flatten" at the end eliminates the need to dig through the nesting recursively
<centrx>
psst, It does that all in a single pass
<bnagy>
yoshie902a: no, I'm just surprised, if that's real output
<bnagy>
but eval-in is dead so I can't check :/
<bnagy>
19>> 'hey'
sambao21 has quit [Quit: Computer has gone to sleep.]
<yoshie902a>
what does you version output?
bricker has quit [Quit: leaving]
joaoh82 has joined #ruby
<yoshie902a>
eval-in?
<bnagy>
the bot that should be working
cads has quit [Read error: Operation timed out]
vlad_starkov has quit [Read error: Operation timed out]
<psst>
ok, I'm giving up on understanding why my version is wrong (much as that goes against the grain)
<centrx>
psst, It's because when you do arr |= @deps, the @deps is the exact same array each time, @deps is never changed
ce_afk is now known as cescalante
heidi has quit [Quit: Leaving.]
<bnagy>
yoshie902a: huh, you're right. I'm hoping it's just an output bug
megus has joined #ruby
<centrx>
psst, @deps.each does not change @deps, @deps.map does
notbrent has joined #ruby
m00nlight has quit [Quit: Konversation terminated!]
<yoshie902a>
bnagy: ya, kinda weird, but maybe I maxed the character limit
<bnagy>
nope, really is truncating
<psst>
centrx: oh, is that what you meant?
Mike98632 has joined #ruby
<psst>
I never want @deps to change (at least not in this method
<psst>
I only wanted to change arr.
<yoshie902a>
bnagy: is there a commond that would prevent truncating?
<centrx>
Right, and the only place you are changing arr is when you do arr |= @deps, which is a set union with the same @deps every time
<Mike98632>
I'm trying to run a program called screenruler, but I get this error. Can anyone help me figure out what I need to fix this? http://pastebin.com/p5rEpVPJ
<bnagy>
yoshie902a: just use bigdecimal
dukz has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
<yoshie902a>
ok
<psst>
centrx: not the same @deps, because I see the arr grow up into the 20s but then back down to the 10s and ends up as just 8
<yoshie902a>
bnagy: what does require "bigdecimal/util" add over require "bigdecimal"
havenwood has joined #ruby
heidi has joined #ruby
zxd has joined #ruby
<centrx>
psst, weird
<psst>
centrx: it |= with the @deps of each dep in turn
<bnagy>
yoshie902a: to answer that I would have to read the docs, which I suggest you do instead
joaoh82 has quit [Ping timeout: 272 seconds]
<centrx>
oh right okay
<psst>
I'm utterly mystified as to at which point the scoping goes wrong
<bnagy>
it's not a scoping issue
<bnagy>
each. does. not. change. the. collection.
<psst>
bnagy: @deps.each {change arr} does not change arr?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
olivier_bK has quit [Ping timeout: 264 seconds]
<bnagy>
now just hope you don't hit StackError ;)
<psst>
there are only 606 projects in total
burlyscudd has joined #ruby
Kar- has joined #ruby
charliesome has joined #ruby
<psst>
if we have too deep a dependency graph between them for Ruby's stack to handle we have some really serious problems
mansi has quit [Ping timeout: 265 seconds]
huttan- has joined #ruby
zeade has quit [Quit: Leaving.]
danshultz has joined #ruby
<zastern>
Here's a question that likely has no answer: Are there any reasonable config file formats that let you represent structured data, that are not XML, JSON, or YAML?
m00nlight has joined #ruby
<benzrf>
dang
<benzrf>
zastern: you could use livescript-flavored json
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<zastern>
hmmm
<psst>
SGML?
jlast has quit [Remote host closed the connection]
Kar- has quit [Ping timeout: 272 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
<yoshie902a>
What am I doing wrong with this, BigDecimal just does not seem to be working for me… "%.20f" % BigDecimal("12345678987654321.123456789",20) => "12345678987654322.00000000000000000000"
huttan- has quit [Ping timeout: 260 seconds]
Soda has joined #ruby
<zastern>
That's not a terrible idea, benzrf
<benzrf>
o:
<psst>
What is the 20 arg to BigDecimal for?
<benzrf>
you looked up livescript?
<zastern>
i did.
<benzrf>
what do you have against json and yaml anyway
megus_ has joined #ruby
<zastern>
As serialization formats, nothing
<psst>
if it's precision, perhaps it is significant digits
<zastern>
as config files, everything
<benzrf>
yaml is quite nice though
<psst>
in which case it is doing what you asked it to
<yoshie902a>
psst: just formatting to display the actual number
<zastern>
YAML is a huge pain in the ass due to its draconion formatting requirements
<benzrf>
if you say so ._
<zastern>
It's very readable
<benzrf>
.
e62 has quit [Ping timeout: 252 seconds]
<zastern>
but hard to write (if you're not a developer and don't deal with it often)
shedd has joined #ruby
<bnagy>
yaml is not meant to be written by hand
<zastern>
right.
<zastern>
but despite that
<benzrf>
:\
<zastern>
a lot of people use yaml config files for their apps
danshultz has quit [Ping timeout: 265 seconds]
<bnagy>
if you want hand written then just parse
wildroman2 has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 246 seconds]
<bnagy>
although I use yaml all the time for simple k-v configs
mr_red has quit [Quit: Bye :)]
cbetta is now known as cbetta_afk
<psst>
yoshie902a: remove the second arg to BigDecimal()
kcombs has joined #ruby
<psst>
yoshie see what happens
Guest88314 has quit [Remote host closed the connection]
<yoshie902a>
psst: it errors out
edwardly has quit [Ping timeout: 252 seconds]
<bnagy>
yoshie902a: BigDecimal objects have their own formatter, try that
<bnagy>
using printf is probably converting to a float which is unlikely what you want
<yoshie902a>
bnagy: that's good to know about the printf formatter. I looked for a big decimal formatter in the docs but did not see it, I'll look again
<yoshie902a>
bnagy: thanks! I get it now. Much better. I was actually looking for a format method, was skipping over t_s, but it's specific to bigdecimal
mr_red has joined #ruby
<yoshie902a>
Thank you everyone for all your help, this has helped a lot
danshultz has joined #ruby
heidi has joined #ruby
firewater5 has joined #ruby
<firewater5>
benzrf: Hey are you here :).
<firewater5>
?
<benzrf>
yeah
<benzrf>
hows it goin
<firewater5>
Reason I ask is because I think I did something wrong or got confused from something from yesterday.
capicue has quit [Quit: Leaving...]
<firewater5>
Good. How is it going though?
<benzrf>
i just found out that there is already something that does more or less what my project would do
<benzrf>
and better
<benzrf>
T_T
<firewater5>
What is that?
<psst>
reuse FTW
<benzrf>
zelda classic
<benzrf>
not in ruby probably
<psst>
aww
* benzrf
is just a little crushed
<firewater5>
Too bad, maybe make a new project?
<benzrf>
i had fun while it lasted
<benzrf>
;-;
thedonvaughn has joined #ruby
<benzrf>
i really thought this was gonna be a thing
<benzrf>
>:
<firewater5>
Build it anyways and go with it, no?
<benzrf>
ehhh
<benzrf>
my motivation drained away when i saw it existed
<benzrf>
~_~
<psst>
it means that your idea was so good, someone else already did it
<firewater5>
:/, well I'm sure you will figure something out.
<benzrf>
hneh
<psst>
so try more ideas
lukec has quit [Quit: lukec]
shedd has joined #ruby
<benzrf>
i dont have many ideas
<benzrf>
i am not an idea guy
<benzrf>
i work best as an implementor of others' schemes
<firewater5>
Btw, I was just trying to test what we talked about yesterday btw benzrf. It seems not to work as it should :/.
<benzrf>
yeah?
<firewater5>
If you do 4.times {n+=2}, it equals out to four.
<firewater5>
How would you make it return 8?
<benzrf>
oh
<firewater5>
I tested it in irb.
<benzrf>
i thought you said you only cared about the effects
threesome has quit [Ping timeout: 272 seconds]
<benzrf>
not the result?
<firewater5>
It returns 4 not 8.
<benzrf>
yes, but n will be set to 8
<benzrf>
*have 8 added to it
<firewater5>
Oh, wait, let me try irb one more time.
maletor has quit [Quit: Computer has gone to sleep.]
<benzrf>
[1] pry(main)> n = 0
<benzrf>
=> 0
<benzrf>
=> 4
<benzrf>
[3] pry(main)> n
<benzrf>
[2] pry(main)> 4.times {n+=2}
<benzrf>
=> 8
<codepython777>
can one serialize a function inside a thread and save it in ruby? Then restart the thread/function later?
<benzrf>
codepython777: ...ew
Brolen has quit [Quit: Brolen]
<benzrf>
codepython777: try continuations
<psst>
yeahm those are called continuations. Didn't know Ruby had them
mavcunha has quit [Ping timeout: 265 seconds]
e62 has joined #ruby
<firewater5>
Sorry, I guess the thing does work.
<psst>
benzrf: There are techniques you can use
<bnagy>
codepython777: the magic ruby word is Fiber
<benzrf>
firewater5: its k ;p
<psst>
benzrf: Try Matsumura's Lotus Blossom.
<codepython777>
how does it know which objects i might touch in the function when i load it?
<codepython777>
or is it saving the entire stack/heap?
<firewater5>
Problem is the next test is using the same method, but instead it now is adding in 4 numbers to a set time.
<benzrf>
psst: huh?
<firewater5>
And then expecting the results to be the average of the four numbers added into them.
<benzrf>
firewater5: adding in 4 numbers to a set time?
<benzrf>
what does that mean @_@
<bnagy>
codepython777: they have a binding, but it's better not to use it - you should pass in anything the fiber needs
vlad_starkov has joined #ruby
<benzrf>
psst: what is Matsumura's Lotus Blossom
<psst>
benzrf: I tried it for 2 hours with 3 other people and we came up with 4 patented inventions
<benzrf>
wut
<psst>
benzrf: a technique for coming up with ideas
<benzrf>
:\
<psst>
I mean that we patented them.
<firewater5>
benzrf: time = Time.parse("2013-5-2 8:00:00")
<psst>
not things that were already patented
<firewater5>
run times =[8, 5, 6, 5]
mavcunha has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
gja has joined #ruby
<firewater5>
measure(4) do
danshultz has joined #ruby
<firewater5>
time+=run_times.pop
<firewater5>
end
fgo has joined #ruby
laphlaw has quit [Quit: Computer has gone to sleep.]
<benzrf>
firewater5: measure(4) ?
<benzrf>
o i c
Wolland has quit [Remote host closed the connection]
<firewater5>
THe method I was making for the last thing
<firewater5>
Then they set that method equal to average_time holder
<benzrf>
ok, so measure runs the block the number of times it asks
Wolland has joined #ruby
<benzrf>
*it is passed
Kar- has joined #ruby
<benzrf>
and measures how long the whole thing takes?
<firewater5>
and do average_time.should== whatever those 4 add up to and divided by four.
<firewater5>
benzrf: The aim of it is the see what the average length of time it takes.
vlad_starkov has quit [Read error: Connection reset by peer]
<firewater5>
But its doing it by adding time to a preset "fake" time.
<benzrf>
wait im confused
<benzrf>
@_@
<firewater5>
Should I show you code in some editor?
<benzrf>
sure
<firewater5>
Or pastebin?
<benzrf>
firewater5: 1 sec i have a thing
<benzrf>
firewater5: are you on a sane OS, or windows?
<firewater5>
windows.
<bnagy>
firewater5: there is a Benchmark module btw
<firewater5>
I only put the two test relevant to this I think.
capicue has quit [Client Quit]
Kar- has quit [Ping timeout: 264 seconds]
<benzrf>
ok
blarghmatey has joined #ruby
<firewater5>
I got the first test to pass already btw, I can show you my solution so far if you want.
<firewater5>
?
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
havenwood has joined #ruby
<benzrf>
firewater5: go ahead
<benzrf>
paste it in a pm pls
joaoh82 has quit [Ping timeout: 272 seconds]
huttan- has quit [Ping timeout: 246 seconds]
nmabry has quit [Quit: nmabry]
huttan- has joined #ruby
<firewater5>
Some of that other code is relevant to other tests.
kaldrenon has quit [Remote host closed the connection]
<benzrf>
firewater5: looks fine to me
<firewater5>
So, the second test should pass too?
<benzrf>
well
<benzrf>
not yet
<benzrf>
firewater5: i would not worry about how the test tests it
<benzrf>
just make it work how it says to and trust the test to be able to tell
<benzrf>
:u
<firewater5>
The results for the second test come out fo 4.
<firewater5>
It is expecting 6.5.
<firewater5>
I'm lost why its getting 4 :/.
<firewater5>
Do you know why?
<benzrf>
well, your method returns 4
havenwood has quit [Ping timeout: 264 seconds]
checkers has joined #ruby
Megtastique has joined #ruby
<firewater5>
So, return yield on last line then.
<firewater5>
That would solve this.
psst has quit [Ping timeout: 260 seconds]
<checkers>
hi, is there an option to irb that will read a ruby file and then leave me at the irb ready to use/debug it? like 'python -i'
<benzrf>
firewater5: no...
<firewater5>
Guess not.
<firewater5>
nevermind, that would run yield one more time.
<benzrf>
but beyond that
<benzrf>
firewater5: it expects back the average run time for the block after runnning it n times
<benzrf>
ignore what the test is actually doing
huttan- has quit [Ping timeout: 260 seconds]
stkowski has joined #ruby
<firewater5>
benzrf: I'm lost :/.
<firewater5>
I need to figure this out though somehow.
heidi has quit [Quit: Leaving.]
<benzrf>
firewater5: you run the method n times
<benzrf>
timing it each time
<benzrf>
and then average the times
<Mike98632>
I'm trying to run a program called screenruler, but I get this error. Can anyone help me figure out what I need to fix this? http://pastebin.com/p5rEpVPJ
<firewater5>
Somehow I need to get yield into a variable then.
<firewater5>
And divide that variable by the number of times its run then.
<firewater5>
Right?
<benzrf>
what?
<benzrf>
you are not averaging the result
eka has quit [Quit: Computer has gone to sleep.]
<benzrf>
you are averaging the length of time it takes to run
<benzrf>
right??
<firewater5>
Yes, I think?
<benzrf>
ok
<firewater5>
I am confused though, because it looks like the test is just adding those times.
heidi has joined #ruby
heidi has quit [Client Quit]
<firewater5>
Adding those numbers to the time.
<benzrf>
ignore what the test is doing ~_~
<benzrf>
it is using fancy trickery to change when now is
<benzrf>
i think
<firewater5>
ok
<firewater5>
Then, to average the time. You need to subtract each time from the start time. Then get a number from each.
<firewater5>
Add those numbers up.
mk-qi has joined #ruby
<firewater5>
And then divide those by the number of times run, right?
mlpinit has quit [Remote host closed the connection]
<benzrf>
why not write that?
<benzrf>
;p
<benzrf>
but i recommend imagining what the results would be
<firewater5>
I will try.
<benzrf>
run the program as though you were the computer
<benzrf>
see what happens
CpuID has joined #ruby
<firewater5>
THe problem though is doing this will break the test for the previous code :/.
ner0x has joined #ruby
joaoh82 has joined #ruby
<benzrf>
just write what you think will work o_o
<benzrf>
do you want a tip?
<firewater5>
I know what to do.
<firewater5>
I will show you, but it will break previous code.
<firewater5>
Basically, you put a=time.now
<firewater5>
Then yield
<firewater5>
b=time.now
<firewater5>
put that in a loop.
<firewater5>
And run it four times.
doodlehaus has joined #ruby
<firewater5>
Somehow put each result in a variable
<firewater5>
+= for that variable
<benzrf>
firewater5: you could use a list for that
<firewater5>
array
<bnagy>
or just map it
alexfreidah has joined #ruby
<firewater5>
I like arrays.
<firewater5>
Either way, it still breaks my previous test :/.
digital-ghost has quit [Remote host closed the connection]
<firewater5>
bnagy: I don't want an answer to this.
<firewater5>
bnagy: I want to try to figure it out on my own with hints.
Hanmac has quit [Ping timeout: 272 seconds]
<bnagy>
I didn't even see your code, it's just a map example
<firewater5>
ok.
<bnagy>
well if you don't want hints you should type /part
jlast has joined #ruby
danshultz has quit [Ping timeout: 252 seconds]
cbetta is now known as cbetta_afk
<firewater5>
benzrf: I think I may just have to try this later.
<firewater5>
benzrf: IDK, I know what to do.
<firewater5>
benzrf: But I know it will break my code. I know on a high level what to do though.
<benzrf>
alright!
<firewater5>
benzrf: Unless you have any other hints of how to do this.
<firewater5>
benzrf: The problem is that method has to do both those tests :/.
<bnagy>
use Benchmark, it's what it was designed for
Xiti has joined #ruby
<benzrf>
bnagy: it's a puzzle
Xiti` has quit [Ping timeout: 260 seconds]
<firewater5>
One test is adding things together
<benzrf>
and/or learning exercise
<firewater5>
bnagy: Its a puzzle I have to solve.
<firewater5>
bnagy: I'm using it to learn ruby.
<benzrf>
firewater5: just default the number of times to 1
<benzrf>
then the average will be the one tim
<benzrf>
*time
<firewater5>
I think I get it.
<firewater5>
So just compare what it starts at to what the "fake" time ends at.
<firewater5>
Subtract the difference.
<benzrf>
ignore the test!
kcombs has joined #ruby
<firewater5>
And come to the same conclusion?
<benzrf>
just write the method as it would be in real code
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
mansi has joined #ruby
Galgorth has quit [Quit: Galgorth]
<firewater5>
benzrf: There is my idea.
<benzrf>
well, try it out
<benzrf>
oh
<firewater5>
I commented where I am lost though.
<benzrf>
you're missing an end ;)
<firewater5>
And doubt its completely right..
<benzrf>
and you left in line 5
<firewater5>
I left 5 there, meant to comment it out.
io_syl has quit [Ping timeout: 272 seconds]
<benzrf>
yep
<benzrf>
ok, first of all you need to put an end to indicate the end of your block
doodlehaus has quit []
<firewater5>
Yes, I edited it in, saw that fail in the test just now ;).
<firewater5>
Sorry, it was a rough draft.
P1RATEZ has joined #ruby
<benzrf>
ok
<benzrf>
you now have the total, right?
mansi has quit [Ping timeout: 272 seconds]
<firewater5>
Yes, after making time capital Time.
<firewater5>
It gives me a result of 4.
nari has joined #ruby
<benzrf>
thats because the times call is returning its result
<benzrf>
aka the number of times you loop
Sawbones has quit [Remote host closed the connection]
<benzrf>
you need to return the average
havenwood has joined #ruby
<benzrf>
how can you get the average from the total?
<benzrf>
the total has been set, but the last statement is the times
<benzrf>
so thats what returns
varfoo has joined #ruby
Sawbones has joined #ruby
<firewater5>
I have to do it outside the loop.
agent_white has joined #ruby
<firewater5>
Holy shit
<firewater5>
I solved it all, lol.
jlast has quit [Remote host closed the connection]
<firewater5>
I have no idea how though :/.
mehlah has quit [Quit: Leaving...]
<benzrf>
what do you have?
<firewater5>
How my solution solved both those tests.
<firewater5>
I will show you.
gja has quit [Quit: This computer has gone to sleep]
alexfreidah has quit [Ping timeout: 272 seconds]
<benzrf>
nice!
<benzrf>
you know, you can set number to default to 1 instead of 0
<benzrf>
and take out the if entierly!
<benzrf>
just always do the loop/divide
<benzrf>
because if a number is not given, it will just loop 1 time
<benzrf>
and the average will be the 1-time run
Andrew_FV has joined #ruby
<firewater5>
I'm too scared to mess with it any more.
<benzrf>
alright ;)
alexfreidah has joined #ruby
<firewater5>
I think I know what your saying though.
<firewater5>
benzrf: But, I am really lost how this code both adds those n+=1 problem.
<firewater5>
AND
<firewater5>
Solves that time average thing at the same time :/.
Andrew_FV has left #ruby [#ruby]
<benzrf>
it switches depending on what it gets as input
lukec has joined #ruby
<firewater5>
benzrf: How about this, we should probably just look at both the problem and solution another time. I have to go to sleep again for work tomrorrow :/.
Sawbones has quit [Ping timeout: 272 seconds]
<benzrf>
ok!
<firewater5>
benzrf: Are you on on Sunday usually?
<benzrf>
yep :_
<firewater5>
Or tomorrow?
<benzrf>
yeah
<firewater5>
I may just shoot you a pastebin of both the problem and solution and try to figure it out this weekend. If I can't, I will chat you Sunday.
fijimunkii has joined #ruby
bitness64 has joined #ruby
daidoji has joined #ruby
<firewater5>
And shoot you the pastebin.
<firewater5>
I really appriciate your help with this though.
<firewater5>
I'm learning a lot with this.
<firewater5>
Thanks a lot for everything so far :).
<firewater5>
benzrf: See you later sometime, probably Sunday :).
reset has quit [Ping timeout: 260 seconds]
phinfone_ has quit [Quit: exitiing]
firewater5 has quit [Quit: Page closed]
Kricir has joined #ruby
zxq9 has quit [Quit: Konversation terminated!]
e62 has quit [Ping timeout: 245 seconds]
huttan- has joined #ruby
firewater5 has joined #ruby
simplyaubs has joined #ruby
<firewater5>
benzrf: Also, sorry, don't want to seem like I'm "using" you. I really do appriciate your help.
Soda has quit [Remote host closed the connection]
Megtastique has quit []
<benzrf>
firewater5: i dont mind at all
<firewater5>
benzrf: I'm just super busy so jump on here after I have thought about the problem and get lost is all. Then I have to jump right off afterwords due to having to go to work Monday-Friday is all.
<firewater5>
benzrf: Well, again, really do appriciate it.
_maes_ has joined #ruby
<firewater5>
benzrf: And good luck with that project, or any new ones you decide to work on :).
<firewater5>
benzrf: See ya once again.
bitness64 has quit [Quit: Leaving]
<benzrf>
see you
fgo has joined #ruby
Oog has joined #ruby
<Oog>
t = Tempfile.new("pluto")
lyanchih has joined #ruby
<Oog>
if I write to pluto
<Oog>
err
m00nlight has quit [Ping timeout: 260 seconds]
<Oog>
t
<Oog>
then read from it, am i guaranteed to read the data that i just wrote?
freezey has joined #ruby
alexfreidah has quit [Ping timeout: 265 seconds]
troyready has quit [Read error: Operation timed out]
yacks has joined #ruby
sec^nd has quit [Ping timeout: 240 seconds]
bitness64 has joined #ruby
CaptainJet has quit []
nmabry has joined #ruby
cescalante is now known as ce_afk
codepython777 has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
gja has joined #ruby
kcombs has quit [Remote host closed the connection]
benzrf has quit [Quit: leaving]
mansi has joined #ruby
Fire-Dragon-DoL has left #ruby [#ruby]
vlad_starkov has quit [Read error: Connection reset by peer]
Kar- has joined #ruby
nmabry has quit [Ping timeout: 265 seconds]
m00nlight has joined #ruby
ocline has joined #ruby
firewater5 has quit [Quit: Page closed]
yarou has joined #ruby
maletor has joined #ruby
maletor has quit [Client Quit]
po10 has quit [Quit: /]
Hanmac has joined #ruby
codepython777 has joined #ruby
Kar- has quit [Ping timeout: 246 seconds]
Hanmac1 has quit [Ping timeout: 246 seconds]
zeade has joined #ruby
sec^nd has joined #ruby
fgo has quit [Remote host closed the connection]
nfk has quit [Read error: Operation timed out]
nowthatsamatt has quit [Quit: nowthatsamatt]
huttan- has quit [Read error: Operation timed out]
Hanmac has quit [Ping timeout: 272 seconds]
terrellt has quit [Ping timeout: 265 seconds]
gja has quit [Quit: This computer has gone to sleep]
huttan- has joined #ruby
po10 has joined #ruby
Hanmac has joined #ruby
freezey has quit [Remote host closed the connection]
emocakes has joined #ruby
BillyJack has quit [Ping timeout: 248 seconds]
fgo has joined #ruby
phipes has joined #ruby
huttan- has quit [Ping timeout: 246 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
ninegrid has quit [Ping timeout: 246 seconds]
saarinen has quit [Quit: saarinen]
blarghmatey has quit [Ping timeout: 260 seconds]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
codepython777 has quit [Quit: Leaving.]
mordocai` has joined #ruby
coder_neo has joined #ruby
codepython777 has joined #ruby
ninegrid has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
icy` has joined #ruby
<pontiki>
o/
ce_afk is now known as cescalante
BillyJack has joined #ruby
mordocai` has quit [Read error: Connection reset by peer]
shanlar has quit [Quit: Be back later]
cescalante is now known as ce_afk
IceDragon_ has joined #ruby
mordocai` has joined #ruby
chrisramon has joined #ruby
P1RATEZ has quit [Ping timeout: 252 seconds]
mordocai` has quit [Remote host closed the connection]
shanlar has joined #ruby
figgleberry has quit [Ping timeout: 272 seconds]
IceDragon has quit [Ping timeout: 264 seconds]
Cephalostrum has quit [Ping timeout: 264 seconds]
shanlar has quit [Client Quit]
simplyaubs has quit [Ping timeout: 272 seconds]
shanlar has joined #ruby
Cephalostrum has joined #ruby
mansi has joined #ruby
krz has joined #ruby
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
tharindu has joined #ruby
figgleberry has joined #ruby
coder_neo has quit [Quit: This computer has gone to sleep]
Brolen has joined #ruby
codepython777 has quit [Quit: Leaving.]
rajasaurus has joined #ruby
toastynerd has quit [Remote host closed the connection]
`petey` has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
<Oog>
t = Tempfile.new("pluto") if I write to t then read from it is this ok and am I guaranteed the read will give me what i wrote?
toastynerd has joined #ruby
Wixy has quit [Ping timeout: 246 seconds]
Mattx has quit [Ping timeout: 264 seconds]
figgleberry has quit [Ping timeout: 272 seconds]
psyl0n has quit [Remote host closed the connection]
BillyJack has quit [Ping timeout: 245 seconds]
e62 has joined #ruby
rajasaurus has quit [Read error: Connection reset by peer]
raja has joined #ruby
ando has joined #ruby
yasushi has joined #ruby
cyberarm has quit [Quit: Bye]
braincrash has quit [Quit: bye bye]
mavcunha has quit [Quit: Computer has gone to sleep.]
gja has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
vlad_starkov has joined #ruby
nmabry has joined #ruby
e62 has quit [Ping timeout: 260 seconds]
<popl>
Oog: Have you read the documentation for Tempfile?
braincrash has joined #ruby
<Oog>
yes
vlad_starkov has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
<popl>
The reason I ask is that the documentation clearly shows writing to and reading from a Tempfile instance. So I don't understand the question, I guess.
CpuID has quit [Quit: This computer has gone to sleep]
baroquebobcat has quit [Client Quit]
Kar- has joined #ruby
Mattx has joined #ruby
Wixy has joined #ruby
<Oog>
i see
<Oog>
i had not read that part
lyanchih has quit [Quit: lyanchih]
<Oog>
thanks
nmabry has quit [Ping timeout: 272 seconds]
braincra- has joined #ruby
Oog has left #ruby [#ruby]
ewnd9 has joined #ruby
oz` has joined #ruby
TheNumb_ has joined #ruby
Vivekananda has joined #ruby
CpuID has joined #ruby
TheNumb has quit [Ping timeout: 252 seconds]
Catie has quit [Ping timeout: 252 seconds]
phrozen77 has quit [Ping timeout: 252 seconds]
oz has quit [Ping timeout: 252 seconds]
oz` is now known as oz
simoz118 has joined #ruby
Kar- has quit [Ping timeout: 245 seconds]
BillyJack has joined #ruby
braincrash has quit [Ping timeout: 252 seconds]
BillyJack has quit [Read error: Connection reset by peer]
sergicles has quit [Quit: sergicles]
JohnBat26 has joined #ruby
phrozen77 has joined #ruby
Catie has joined #ruby
lioninawhat has joined #ruby
Soda has joined #ruby
sergicles has joined #ruby
maroloccio has quit [Ping timeout: 260 seconds]
mmitchell has joined #ruby
yfeldblum has quit [Remote host closed the connection]
IceDragon_ has quit [Quit: Space~~~]
Brolen has quit [Quit: Brolen]
e62 has joined #ruby
sassamo_ has quit [Remote host closed the connection]
lioninawhat has quit [Remote host closed the connection]
sassamo has joined #ruby
sergicles has quit [Quit: sergicles]
ando has quit [Remote host closed the connection]
ando has joined #ruby
BillyJack has joined #ruby
BillyJack has quit [Read error: Connection reset by peer]
e62 has quit [Ping timeout: 246 seconds]
serp` has joined #ruby
sassamo has quit [Ping timeout: 264 seconds]
reach has joined #ruby
CpuID has quit [Quit: This computer has gone to sleep]
fgo has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
nmabry has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has joined #ruby
ambushsabre has quit [Quit: rip]
codymtx has joined #ruby
raja has quit [Ping timeout: 272 seconds]
megus has quit [Quit: megus]
ner0x has quit [Quit: Leaving]
noop has joined #ruby
charliesome has joined #ruby
ehc has quit [Quit: ehc]
nmabry has quit [Ping timeout: 265 seconds]
Kricir has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 264 seconds]
rankine has joined #ruby
raja has joined #ruby
Kricir has joined #ruby
w4pm has quit [Ping timeout: 245 seconds]
ylluminate has quit [Quit: Bye!]
ando has quit [Remote host closed the connection]
ando has joined #ruby
Mars has joined #ruby
BillyJack has joined #ruby
Mars is now known as Guest84540
BillyJack has quit [Read error: Connection reset by peer]
helpa has joined #ruby
ando has quit [Remote host closed the connection]
allaire has quit []
ando has joined #ruby
fgo has joined #ruby
mordocai` has joined #ruby
_whitelogger_ has joined #ruby
dominikh has joined #ruby
`petey` has quit [Remote host closed the connection]
butblack has quit [Quit: butblack]
dseitz has joined #ruby
`petey` has joined #ruby
<centrx>
whomp, hmm
krz has joined #ruby
alexfreidah has quit [Ping timeout: 260 seconds]
ando has quit [Remote host closed the connection]
ando has joined #ruby
vlad_starkov has joined #ruby
nmabry has joined #ruby
<centrx>
whomp, Probably should make a pastie/pastebin with the code and error message
<whomp>
centrx, permissions issue? lock issue?
<centrx>
What do you mean by printing out? How can you print out a Photoshop file in irb?
yasushi has quit [Remote host closed the connection]
<whomp>
it prints out the object representing the file
`petey` has quit [Ping timeout: 272 seconds]
<whomp>
the file returned by PSD.new
soba has joined #ruby
BillyJack has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
JPascal has joined #ruby
<icy`>
PSD.open('file.psd') {|f| (print out properties of f} like that?
BillyJack has quit [Read error: Connection reset by peer]
nmabry has quit [Client Quit]
chrisramon has quit [Quit: chrisramon]
<icy`>
whomp, in that style, f stays within scope of {} and closes after }
<whomp>
ohh snap
<whomp>
man i had no clue
<icy`>
or you can do .open and later .close style
yarou has quit [Quit: This computer has gone to sleep]
<whomp>
any ideas why it prints out less output in a program than in irb?
ando has quit [Ping timeout: 272 seconds]
<icy`>
as centrx said, pastie is probably best
mrnugget has joined #ruby
Kar- has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
e62 has joined #ruby
<whomp>
icy` and centrx, ty
sethen has quit [Remote host closed the connection]
lyanchih has joined #ruby
Kar- has quit [Ping timeout: 272 seconds]
Spitfire has joined #ruby
bluOxigen has joined #ruby
mercwithamouth has joined #ruby
jeremyevans has quit [Quit: leaving]
BillyJack has joined #ruby
Guest84540 has quit [Remote host closed the connection]
BillyJack has quit [Read error: Connection reset by peer]
pehlert has joined #ruby
noop has quit [Ping timeout: 252 seconds]
sindork_ has quit [Remote host closed the connection]
pehlert has quit [Ping timeout: 260 seconds]
thomasxie has joined #ruby
codymtx has left #ruby [#ruby]
lukec has quit [Quit: lukec]
wallerdev has quit [Read error: Connection reset by peer]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
siwica has quit [Ping timeout: 272 seconds]
e62 has quit [Ping timeout: 264 seconds]
BillyJack has joined #ruby
prc has quit [Quit: Leaving.]
BillyJack has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
rankine has quit [Ping timeout: 252 seconds]
Jake232 has joined #ruby
mmitchell has quit [Remote host closed the connection]
reach has quit [Remote host closed the connection]
toydestroyer_ has joined #ruby
toydestroyer_ is now known as toydestroyer
juarlex has quit [Remote host closed the connection]
yfeldblum has joined #ruby
toydestroyer has left #ruby [#ruby]
danshult_ has quit [Remote host closed the connection]
emocakes has quit [Quit: Leaving...]
tyl has joined #ruby
dukz has joined #ruby
simoz118 has quit [Ping timeout: 272 seconds]
Mars has joined #ruby
whomp has quit [Ping timeout: 272 seconds]
Mars is now known as Guest63067
toydestroyer has joined #ruby
toydestroyer has quit [Client Quit]
toydestroyer has joined #ruby
robertrv has joined #ruby
BillyJack has joined #ruby
jailbot has joined #ruby
<jailbot>
hiya!
<jailbot>
what does =~ mean
<checkers>
it's a regex match
<jailbot>
specific to regex tho
<checkers>
?
<jailbot>
idk man
<popl>
What are you asking?
<jailbot>
what that means
<checkers>
ah
tectonic has joined #ruby
<popl>
=~ is the pattern match operator
<jailbot>
== would match objects
<checkers>
it's a form of text pattern matching
<popl>
== matches integers
BrixSat has quit [Read error: Connection reset by peer]
<popl>
== in ruby might be overloaded to match objects. I don't know.
<popl>
I'm sure you could find out as easily as I could.
BrixSat has joined #ruby
kiri has quit [Read error: Operation timed out]
<jailbot>
you cant google that shit
<jailbot>
thanks for your help
Virtualize has quit [Ping timeout: 272 seconds]
<popl>
jailbot: try duckduckgo
sassamo has joined #ruby
<agent_white>
See ya Radar!
kiri has joined #ruby
<popl>
search for ruby match operator
<agent_white>
mt :P
<jailbot>
k thanks
<icy`>
!('hello' =~ /h/ ).nil?
shedd has quit [Remote host closed the connection]
agent_white has quit [Quit: brb]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mrnugget has quit [Quit: mrnugget]
juarlex has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zigomir has joined #ruby
sassamo has quit [Ping timeout: 272 seconds]
spyzer has joined #ruby
danshultz has joined #ruby
mrnugget has joined #ruby
Guest63067 has quit [Remote host closed the connection]
<spyzer>
hey everyone, I am receiving a response from server which is UTF-8, when I open my "json" url in browser contents are like this https://gist.github.com/abhishek0/546103f1634507162fe0 They have \u003c shown. I think browser is doing that for me, but when I receive the same thing in my ruby code printing the server response shows control characters and random characters
<spyzer>
I tried encoding the server response to UTF-8 but it still shows the same thing
<centrx>
What version of Ruby are you using?
juarlex has quit [Ping timeout: 252 seconds]
<spyzer>
2.0.0p247
whomp has joined #ruby
<spyzer>
centrx: I think I might be doing something foolish though, I am having a hard time figuring it out
w4pm has joined #ruby
<centrx>
What are the random characters that Ruby is showing?
<spyzer>
and one more thing I am actually using JSON.parse on server response
toydestroyer has quit [Ping timeout: 272 seconds]
Kar- has joined #ruby
danshultz has quit [Remote host closed the connection]
Jake232 has quit [Ping timeout: 272 seconds]
Kricir has quit [Remote host closed the connection]
charliesome has joined #ruby
<spyzer>
centrx: a square box with 0011 inside it
<spyzer>
I think JSON parsing might be removing something
<spyzer>
?
parduse is now known as Guest75107
parduse has joined #ruby
Guest75107 has quit [Ping timeout: 252 seconds]
carraroj has joined #ruby
<centrx>
spyzer, Maybe. You could compare before and after
<centrx>
spyzer, Does Ruby show the < > symbols? That is what 003c and 003e are
<centrx>
Then 0011 appears for some reason, for which it does not have an ordinary symbol
w4pm has quit [Ping timeout: 265 seconds]
<spyzer>
centrx: I just saw it is the json parsing, you are right. So how can I fix this
Kar- has quit [Ping timeout: 245 seconds]
yasushi has joined #ruby
<centrx>
spyzer, Do the transcoding before JSON.parse?
<centrx>
spyzer, You can also try the String#unpack method if String#encode does not work
juarlex has joined #ruby
<dseitz>
you could also update your font to something like source code pro hehehe
charliesome has quit [Remote host closed the connection]
charliesome has joined #ruby
carraroj has quit [Read error: Operation timed out]
mengu has joined #ruby
fgo has quit [Remote host closed the connection]
emocakes has joined #ruby
ce_afk is now known as cescalante
<spyzer>
centrx: There is one thing that server is sending me a stringified json and one particular key-value pair in that json is itself unicode encoded. Does that affect json parsing? Bcoz this key value pair is already a string in utf-encoded so it aint' converting to what I want
<centrx>
I don't know
<centrx>
That is where unpack might be helpful
raja has quit [Ping timeout: 252 seconds]
<centrx>
The server is converting perfectly ordinary ASCII characters like < > to Unicode, so that seems fixable if you controlled the server
juarlex has joined #ruby
tyl has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<spyzer>
centrx: so i use unpack and pack again in what format i will have to unpack and into what should i pack again? please tell
Jake232 has joined #ruby
juarlex has quit [Ping timeout: 260 seconds]
zipper has joined #ruby
yacks has quit [Quit: Leaving]
<dseitz>
Out of all the characters to escape and they didn't escape the ' in 'we couldn't find this page' only thing that gives me problem with your gist in Ruby
<spyzer>
dseitz: ohh but this is a copy pasted server response
<spyzer>
dseitz: Also I simply copy that part of response which has the unicode encoded string and try to convert it to ascii in ruby it works, but entire response itself is a string so is my response like encoded two times?
daidoji has quit [Ping timeout: 272 seconds]
<spyzer>
dseitz: I can;t control the server but :(
<dseitz>
like json.to_json.to_json hehehe
<centrx>
spyzer, I assign the value to a variable in irb and it converts it ASCII :)
<dseitz>
jsonlint shows no errors with the response's encoding as well
mark_oz has joined #ruby
<spyzer>
centrx, dseitz exactly this is what is happening to me as well
dogonthesun has joined #ruby
<spyzer>
the server response is a stringified json and my actualy unicoded content is a part of this stringified json
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<spyzer>
I am also able to convert the response to normal if i select it
<spyzer>
but JSON.parse I don't know what;s wrong with it
<dseitz>
What version of json do you have installed
juarlex has joined #ruby
tagrudev has joined #ruby
e62 has joined #ruby
<spyzer>
dseitz: I don't get it json parse is also working on irb IFF I escape the ' character which you mentioned
chinkung has quit [Read error: Connection reset by peer]
chinkung has joined #ruby
threesome has quit [Remote host closed the connection]
obs_ has quit [Client Quit]
obs_ has joined #ruby
toastynerd has joined #ruby
brennanMKE has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
tharindu has quit [Ping timeout: 264 seconds]
obs_ has quit [Client Quit]
CpuID has joined #ruby
Macaveli has quit [Ping timeout: 272 seconds]
obs_ has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
toastynerd has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
cbetta_afk is now known as cbetta
bMalum has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
hiall has joined #ruby
zipper has joined #ruby
timonv has quit [Remote host closed the connection]
okinomo has quit [Ping timeout: 246 seconds]
shedd has joined #ruby
CpuID has quit [Ping timeout: 252 seconds]
okinomo has joined #ruby
okinomo is now known as Casey
<wald0>
> In addition, assignment operators(+= etc.) are not user-definable.
<wald0>
they are not ?
yfeldblum has quit [Ping timeout: 272 seconds]
kitak has quit [Read error: Connection reset by peer]
kitak_ has joined #ruby
hiall has quit [Ping timeout: 265 seconds]
<apeiros>
no, because they are syntax sugar
ando has quit [Remote host closed the connection]
<apeiros>
you can define +, -, * etc, by which you more or less also define +=, -=, *= etc
ndrei has joined #ruby
ando has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
klaut has joined #ruby
<wald0>
ok
craigp is now known as thunderkeg
thunderkeg is now known as craigp
<wald0>
class << obj ; expr ; end
<wald0>
what this is for?
ando has quit [Remote host closed the connection]
<apeiros>
opens the singleton class
ando has joined #ruby
pranny1 has quit [Quit: Leaving.]
Kricir has joined #ruby
<wald0>
singleton ? mmh, i think that i have not read about this
<apeiros>
(almost) every object has a singleton class, which defines methods which only apply to that single object
<apeiros>
don't confuse singleton class and singleton pattern
<wald0>
where i could read about this?
Wolland has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<apeiros>
dunno
ando has quit [Remote host closed the connection]
<wald0>
whats the difference to use or not "=" in a method definition?
<wald0>
like: def age=(new_age)
ando has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
Kricir has quit [Ping timeout: 272 seconds]
ando has quit [Remote host closed the connection]
ando has joined #ruby
<tobiasvl>
nothing syntactically
<apeiros>
the = is just part of the name
ando has quit [Remote host closed the connection]
kacperix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ando has joined #ruby
<tobiasvl>
but semantically it's a setter method
<apeiros>
`x.foo = 12` invokes the foo= method
ando has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
ando has joined #ruby
<apeiros>
while `x.foo 12` invokes the foo method
<tobiasvl>
google attr_writer, which is sugar for creating methods lile that
buzzybron has joined #ruby
fgo has joined #ruby
drumusician has quit [Ping timeout: 245 seconds]
marr has joined #ruby
<apeiros>
google :(
ando has quit [Remote host closed the connection]
<apeiros>
use proper api docs
<buzzybron>
how do i call a method within my own class during initialize?
<buzzybron>
is that possible?
ando has joined #ruby
<apeiros>
buzzybron: initialize is a normal instance method
<apeiros>
so yes, just like from any other instance method too
lkba has quit [Ping timeout: 272 seconds]
<wald0>
ah, i see
ndrei has quit [Quit: Lost terminal]
yasushi has quit [Remote host closed the connection]
kacperix has joined #ruby
<buzzybron>
so... if i have another method called another_met(), i can just call it in the initialize method? with another_met()?
ndrei has joined #ruby
<apeiros>
yes
OdNairy has joined #ruby
<wald0>
apeiros: "proper api docs", which ones you mean? i dont know yet "the best place where to search documentation when i need to" (better if offline)
nari has quit [Ping timeout: 264 seconds]
carraroj has joined #ruby
zeeraw has joined #ruby
canton7-mac has joined #ruby
<apeiros>
offline: ri, else rdoc.info or ruby-doc.org
kacperix has quit [Client Quit]
fgo has quit [Ping timeout: 246 seconds]
tharindu has joined #ruby
ando has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
<wald0>
is yard the replacement of rdoc ? (improved)
claymore has quit [Quit: Leaving]
<apeiros>
it's a competitor
<apeiros>
I prefer yard
h_kon has joined #ruby
<wald0>
can i generate docs from comments of my code similar to doxygen with it ? (i have read about that for rdoc)
hiall has joined #ruby
kitak_ has quit [Remote host closed the connection]
<apeiros>
yes, rdoc and yard do that
avril14th has joined #ruby
<apeiros>
ri or your browser can then be used to view the generated docs
ferr has quit [Ping timeout: 272 seconds]
* wald0
switches the pointer of a neuron from rdoc to yard
mehlah has quit [Ping timeout: 260 seconds]
mk-qi has quit [Ping timeout: 265 seconds]
<apeiros>
yard can also tell you what you forgot to document
dgheath21 has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
<wald0>
hum, that's nice
ndrei has quit [Ping timeout: 245 seconds]
kacperix has joined #ruby
<wald0>
forced documenting :)
tkuchiki has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 265 seconds]
tkuchiki has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<apeiros>
for me it's more a help to find missing spots
<apeiros>
quite annoying to find them manually
Macaveli has joined #ruby
ahmedelgabri has joined #ruby
zipper has quit [Ping timeout: 272 seconds]
apeiros_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
w1xz has joined #ruby
tkuchiki has quit [Ping timeout: 264 seconds]
decoponio has joined #ruby
m00nlight has joined #ruby
tobylane has joined #ruby
Albright_ has joined #ruby
Albright has quit [Ping timeout: 272 seconds]
Albright_ is now known as Albright
* Hanmac
laughs because rdoc did broke itself ;D
ndrei has joined #ruby
kacperix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kacperix has joined #ruby
_JamieD_ has joined #ruby
dukz has quit [Remote host closed the connection]
kacperix has quit [Client Quit]
<wald0>
def initialize(name="Unknown", age)
<wald0>
im doing tests but im unable to create an object having the Unknown name value
buzzybron has left #ruby [#ruby]
<wald0>
a = Foo.new nil, 15 not works too
dukz has joined #ruby
wildroman2 has joined #ruby
<hoelzro>
I feel like Foo.new(15) should do it?
<wald0>
hu, how is that possible?
<hoelzro>
>> class Foo ; def initialize(name='Unknown', age) puts name; puts age; end ; end Foo.new(15)
<hoelzro>
iirc
<hoelzro>
as of 1.9
<hoelzro>
optionals may precede requireds
<hoelzro>
and Ruby figures it out based on the # arguments provided
<wald0>
so... if 2 args are set and the first is optional, when i call it only with 1 arg the first optional is shifted ?
<wald0>
heh, this is smart... not sure if expected but.. :)
<wald0>
funny in any case
<hoelzro>
I *think* so
<hoelzro>
I'm checking now =)
<workmad3>
yeah, it does
sassamo has joined #ruby
<workmad3>
that really surprised me when I first encountered it (about 4 months ago :) )
<wald0>
seems like ruby make things works by default "no matter what" lol
<hoelzro>
yeah, works for me
<hoelzro>
it inherited that from Perl =P
<workmad3>
until then, I'd figured that optional args had to come after other args
dweeb_ has joined #ruby
<wald0>
workmad3: me always coded on that way too
<workmad3>
ruby tries to ease the strain... but it's certainly not a 'no matter what' mentality... that's more PHP
pranny has joined #ruby
<hoelzro>
workmad3: that was true in 1.8
<wald0>
whats wrong with php ? :)
mklappstuhl has joined #ruby
rubyracer has joined #ruby
<workmad3>
wald0: you mean other than the syntax? or what they call an object model? or non-local behaviour of several core methods based on external config that itself will depend on compiler flags? (with no way to change it)... or that they *never* seem to deprecate any core methods, with the result of a 'standard library' that's so badly cluttered it's becoming increasingly impossible to know what the hell to use from it... other tha
ace_striker has quit [Ping timeout: 272 seconds]
mklappstuhl has quit [Remote host closed the connection]
sassamo has quit [Ping timeout: 252 seconds]
<wald0>
workmad3: can you repaste since "other tha..." ? irc cut your message
<workmad3>
wald0: ... other than that? :P
colonolGron has quit [Quit: leaving]
<wald0>
i was enjoying reading the definition lol
mrnugget has quit [Quit: mrnugget]
<workmad3>
wald0: there's a nice article - 'PHP: A Fractal of Bad Design'. Some points may be arguable (and many unarguable points have still been argued by ardent PHPers) but it's quite a good read anyway :)
dogonthesun has joined #ruby
mrnugget has joined #ruby
tt1187 has quit [Read error: No route to host]
stkowski has quit [Ping timeout: 272 seconds]
brennanMKE has joined #ruby
<dweeb_>
Im using sucker_punch gem to run a job after_create. The problem is that the job can't find the record that was just created. So somehow the job is run before the record is created? It only happens at heroku and not in local env. Any ideas?
<wald0>
oh btw, what is good for "conf files" in ruby ?
moholinati has joined #ruby
<wald0>
i mean, a well maintained lib, easy to use, and a syntax of conf files easy to understand by the users
mehlah has joined #ruby
fgo has joined #ruby
<Hanmac>
shevy huhu
brennanMKE has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
h_kon has quit [Remote host closed the connection]
maasha has joined #ruby
mklappstuhl has joined #ruby
h_kon has joined #ruby
dEPy has quit [Quit: Computer has gone to sleep.]
fusi0n has quit [Quit: .]
<wald0>
workmad3: I have found somewhere another article too, saying why php rocks better than ruby, explaining that the new features of php makes php nicer than ruby :)
<wald0>
unfortunately this article is not useful anymore for a flamewar, we are at 2014 so the title deprecates itself lol, too late php
shedd has joined #ruby
<wald0>
workmad3: bad design in the title swallowed by the fractal too ? :)
aryaching has joined #ruby
dEPy_ has joined #ruby
<maasha>
I am trying to figure out the state of performance of threads vs processes in Ruby2.0 compared to Ruby1.9. I am not finding clear answers with Google ... ?
<maasha>
Ruby MRI, btw
lyanchih has quit [Ping timeout: 260 seconds]
thumpba_ has joined #ruby
<wald0>
maasha: i think that this is a very application-specific topic
obs_ has quit [Quit: Saliendo]
moholinati has quit [Quit: Leaving]
<Hanmac>
wald0 php: 0, "0", 0.0 are false but "0.0" is true
<wald0>
different ways of work/use-them different results
<workmad3>
maasha: ruby 2 still has a GIL
<wald0>
Hanmac: WTF!
wildroman2 has quit [Remote host closed the connection]
obs__ has joined #ruby
<maasha>
workmad3: ok, and is there any future plan to improve thread performance?
yfeldblum has quit [Ping timeout: 272 seconds]
<workmad3>
maasha: ruby 1.9+ uses native threads... you can't exactly improve thread performance much from that without rewriting the OS :P
<ddd>
why would there *not* be plans to increase thread performance?
<workmad3>
maasha: I guess what you mean is 'are there any future plans to remove the GIL and allow more than 1 thread to be running in ruby code at once?'
<ddd>
as much as the tech can be improved, ruby usually does
<RubyPanther>
because threads are silly
thumpba has quit [Ping timeout: 272 seconds]
nari has joined #ruby
<maasha>
workmad3: I suppose that is it.
<ddd>
rubypanther only the ones coming off your pants ;)
w4pm has joined #ruby
shedd has quit [Ping timeout: 265 seconds]
<RubyPanther>
You can pass a filehandle over a socket, so there is no reason left to need threads
<maasha>
workmad3: so GIL plans?
<workmad3>
I don't know about that one... the work on rubinius shows that it at least seems possible, but it would be a major undertaking in MRI most likely
robertrv has quit [Ping timeout: 245 seconds]
shime has joined #ruby
dukz has quit [Remote host closed the connection]
<RubyPanther>
Ruby 2 fixes the COW, so we have full fork power now
obs__ has quit [Remote host closed the connection]
Kricir has joined #ruby
rmroulette has quit [Ping timeout: 260 seconds]
dukz has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
<ddd>
workmad3 i thought matz *was* working on removing the GIL, wasn't that what was planned for 2.2? I thought (Hiro?) one of his guys was working on that
wald0 has quit [Read error: Operation timed out]
rootshift has joined #ruby
<workmad3>
ddd: I'll trust it when I see it happens ;)
<ddd>
I want to say Hiro asaki or something similar to the name
<ddd>
maasha quite possible. this is just something i thought i'd read at an irc meeting of the different ruby implementation discussions
<ddd>
admittedly that was awhile ago so..
w4pm has quit [Ping timeout: 272 seconds]
<wald0>
Hanmac: workmad3: good for php, but what do you think about the design of java?
Thanatermesis has quit [Ping timeout: 272 seconds]
stkowski has joined #ruby
<Hanmac>
java has a design? oO
Kricir has quit [Ping timeout: 246 seconds]
`petey` has joined #ruby
browndawg has joined #ruby
<wald0>
idk but a lot of ppl uses it and thinks that is the better language of the world
james_woods has joined #ruby
<workmad3>
I know lots of people use it
<workmad3>
I don't know many of them that think it's a brilliant language
rubyracer has quit [Quit: Konversation terminated!]
alexfreidah has quit [Ping timeout: 260 seconds]
<wald0>
i never tried it, but some friends says that is the biggest s*it ever made, it is really so bad ?
<james_woods>
I have an array of hashes and I want to find the max value for a given key in all of those hashes. I have a solution which is returning me a high value but not the max one (so it's not really a solution)
mklappstuhl has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
craigp has quit [Remote host closed the connection]
<wald0>
james_woods: i readed in my book about .max and .min, maybe this is what you are searching for?
<james_woods>
canton7-mac: copy paste error, its not in my code, I updated the gist
<canton7-mac>
your solution is right
<workmad3>
james_woods: the typo is still in the gist
<canton7-mac>
hmm. is e['value'] a string or a number?
`petey` has quit [Ping timeout: 272 seconds]
<james_woods>
workmad3: corrected it now
<james_woods>
canton7-mac: its a number
<workmad3>
james_woods: could you add the hash and the result to a separate file in the gist possibly?
<canton7-mac>
what I'm trying to make sure is that it isn't a number represented as a string
<james_woods>
canton7-mac: it looks like this ..... =>[{"measure_time"=>1389351660, "value"=>3.0,
<canton7-mac>
looks fine. what you've written should work
<canton7-mac>
let's see some sample input and output
kacperix has joined #ruby
<wald0>
I just discovered what is "DATA", I found it in a code without understand it and the __END__ stuff, how i can know that things like "DATA" is part of ruby and not the code of the application/gem that im reading ?
<wald0>
i mean, there's a lof ot hings in ruby to know
<wald0>
maybe some ctags feature for vim for ruby ?
fgo has quit [Remote host closed the connection]
<workmad3>
wald0: already exists
craigp_ has joined #ruby
<wald0>
workmad3: which thing?
mrdtt has joined #ruby
<workmad3>
wald0: ctags can give you tags from ruby code
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
<wald0>
mmh, but i need to generate myself the ctags or something like this? from where i can get a ctags file for ruby ?
nari has joined #ruby
<james_woods>
canton7-mac: It works now. There was another typo in my code. Thanks!
camilasan has quit [Remote host closed the connection]
hackeron_ has quit [Remote host closed the connection]
zipper has joined #ruby
Deele has joined #ruby
mrdtt has quit [Remote host closed the connection]
camilasan has joined #ruby
simoz118 has quit [Ping timeout: 272 seconds]
Thanatermesis has joined #ruby
hackeron has joined #ruby
enape_101 has quit [Ping timeout: 252 seconds]
<workmad3>
wald0: you need to generate the ctags for whatever language you're using
drumusician has joined #ruby
mavcunha has joined #ruby
Kar- has quit [Ping timeout: 252 seconds]
mark_oz has joined #ruby
<workmad3>
wald0: tools exist to generate and keep them up to date though (guard-ctags, bundler.vim, etc have various things for extending ctag support)
dEPy_ has quit [Quit: Computer has gone to sleep.]
ahmedelgabri has joined #ruby
zipper has quit [Ping timeout: 260 seconds]
Macaveli has quit [Ping timeout: 272 seconds]
Casey has quit [Ping timeout: 264 seconds]
<wald0>
mmh, i need to do some ruby+vim research someday
kizzx2 has quit [Quit: Leaving.]
heftig has joined #ruby
lkba has joined #ruby
<wald0>
private
<wald0>
# things from here only accessible from the object itself (instances)
<wald0>
# calls: method of an object can call its private methods (inside's class code)
<wald0>
# cannot call: dog.method_private
<wald0>
is this correct? i miss something?
drumusician has quit [Read error: Operation timed out]
ace_striker has quit [Ping timeout: 272 seconds]
<wald0>
i know that my english is not perfect, i try to explain it simple and clear :/
dukz has quit [Remote host closed the connection]
kacperix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CpuID has joined #ruby
cbetta is now known as cbetta_afk
ozgun has joined #ruby
ferr has joined #ruby
fgo has joined #ruby
m00nlight_ has joined #ruby
m00nlight has quit [Ping timeout: 252 seconds]
tharindu has quit [Quit: Leaving...]
pehlert has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
zegerjan has joined #ruby
brennanMKE has joined #ruby
blaxter_ is now known as blaxter
cbetta_afk is now known as cbetta
nihed has joined #ruby
<mark_oz>
wald0: you cannot call dog.method_private
craigp_ has quit [Remote host closed the connection]
<mark_oz>
but you can dog.call(:method_private)
<mark_oz>
private methods in ruby aren't very private :)
craigp has joined #ruby
<apeiros_>
mark_oz: you mean send, I assume
<mark_oz>
send
<mark_oz>
yep, you're right.
<Hanmac>
wald0 private setter methods like meth= are special
pehlert has quit [Ping timeout: 265 seconds]
sassamo has joined #ruby
<wald0>
"send label" for call it ? mmh
brennanMKE has quit [Read error: Operation timed out]
<Hanmac>
because you need self.meth= for private setter
<Hanmac>
private getter like meth does not work with self.meth
Casey has joined #ruby
<apeiros_>
wald0: send is a method too
<apeiros_>
it allows invoking methods by name
<apeiros_>
and it bypasses private/protected
juarlex has joined #ruby
CpuID has quit [Quit: This computer has gone to sleep]
<workmad3>
there's also public_send which respects them
<apeiros_>
and which you should use instead of send whenever you want to call methods by name
mudmaster has quit [Ping timeout: 246 seconds]
ndrei has joined #ruby
DouweM has joined #ruby
Macaveli has joined #ruby
<wald0>
i assume that if i want to restrict me correctly, then i dont need to use send at all but the normal way ?
fgo has quit [Remote host closed the connection]
<apeiros_>
wald0: of course you use foo.bar and not foo.send(:bar)
sassamo has quit [Ping timeout: 264 seconds]
camilasan has quit [Read error: Connection reset by peer]
<apeiros_>
but when you have e.g. my_method = :bar; foo.send(my_method), then it's better to use foo.public_send(my_method) instead.
drumusician has joined #ruby
toydestroyer has joined #ruby
toydestroyer has left #ruby [#ruby]
camilasan has joined #ruby
fixl has quit [Remote host closed the connection]
juarlex has quit [Ping timeout: 272 seconds]
kacperix has joined #ruby
vlad_starkov has joined #ruby
kacperix has quit [Client Quit]
<Hanmac>
you could also use foo.method(my_method).call ;P
RedNifre has quit [Read error: Connection reset by peer]
<apeiros_>
since that doesn't respect privacy either…
dogonthesun has quit [Quit: Computer has gone to sleep.]
<wald0>
what is "my_method = :bar" ?
<tobiasvl>
it just sets the variable my_method to the symbol :bar
<tobiasvl>
nothing fancy
<tobiasvl>
but the method send takes a symbol and calls the method with the name which is the value of the symbol
charliesome has joined #ruby
<wald0>
mmh, similar to an alias to the method ?
<tobiasvl>
not really, it's just a symbol that contains the name of the method
<apeiros_>
wald0: :bar is a value, just like "bar" or 12 are values
browndawg has quit [Ping timeout: 264 seconds]
<apeiros_>
to be precise: it's a Symbol literal. "foo" is a String literal. 12 is a Fixnum (Integer) literal.
dogonthesun has joined #ruby
dogonthesun has quit [Read error: Connection reset by peer]
dogonthesun has joined #ruby
joaoh82 has quit []
shaunbaker has joined #ruby
sepp2k has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
thelamest has quit [Quit: reboot]
drumusician has quit [Ping timeout: 260 seconds]
psst has joined #ruby
<Hanmac>
:"bar & foo" is also a Symbol literal
yfeldblum has joined #ruby
<wald0>
Support for Ruby version 1.9.3 will end on February 23, 2015.
<wald0>
wait! i have not finished to learn it yet! :/
<wald0>
oh, 2015
* wald0
hides
shedd has joined #ruby
<wald0>
is there much differences between 2.1 and 1.9.3 ? (syntax), iirc there was not much on 2.0
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
phinfonet has joined #ruby
mircoblitz has joined #ruby
Sawbones has joined #ruby
<charliesome>
wald0: nothing major
shime has quit [Ping timeout: 272 seconds]
<apeiros_>
hi charliesome
<charliesome>
ylo
<charliesome>
yo
<apeiros_>
yolo?
<workmad3>
wald0: 1.9 was mainly the testing ground for new syntax to go into 2.0
nowthatsamatt has joined #ruby
<tagrudev>
:)
nowthatsamatt has quit [Client Quit]
yfeldblum has quit [Ping timeout: 264 seconds]
phinfonet has quit [Client Quit]
<mircoblitz>
Hi. I am pretty new to ruby (used to other languages though). i am now running into a problem I don't get how to debug ist. I try to connect to a jira sever and get some json data. But executing Net::HTTP.get_response(URI.parse(http://user:test@jira.test.local/rest/api/latest/issue/DO-22)) responds with a 401 in ruby. calling the same url via curl in the terminal gives me a 200 and the data i need. I am puzzled how to debug this.
<wald0>
workmad3: well, its default in debian wheezy so thats the reason of why I would stick on it until the next 6 months (next debian release)
shedd has quit [Ping timeout: 260 seconds]
<apeiros_>
mircoblitz: might be due to your use of non-standard username/password in the url
Schmidt has quit [Ping timeout: 276 seconds]
<workmad3>
apeiros_: user info in the URL is fine
<apeiros_>
workmad3: nope. not standard.
<mircoblitz>
How would I use user and pass in ruby ?
kirun has joined #ruby
<apeiros_>
mircoblitz, workmad3: also it's generally a bad idea to have your username + password in the url.
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
mircoblitz has joined #ruby
DouweM has quit [Quit: Leaving...]
psyl0n has joined #ruby
vlad_starkov has joined #ruby
relix has joined #ruby
cbetta is now known as cbetta_afk
Schmidt has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
kaldrenon has quit [Ping timeout: 245 seconds]
cbetta_afk is now known as cbetta
shedd has joined #ruby
keen_ has quit [Remote host closed the connection]
colonolGron has joined #ruby
drumusician has joined #ruby
mlpinit has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
Schmidt has quit [Ping timeout: 245 seconds]
Sawbones has quit []
keen_ has joined #ruby
aurimasn has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 0.4.2]
shaunbaker has quit [Remote host closed the connection]
brennanMKE has joined #ruby
<Fuzai>
Is there anyone around that can answer a simple MongoMapper question for me? http://mongomapper.com/documentation/embedded-document.html How does the line "many :line_items" automatically translate to using the embedded document LineItem?
bMalum has joined #ruby
psyl0n has quit []
<workmad3>
Fuzai: because it's a method call
<workmad3>
Fuzai: and the method does that
sassamo has joined #ruby
psyl0n has joined #ruby
IceyEC has joined #ruby
<tobiasvl>
`many :line_items` is just `many(:line_items)`
<Fuzai>
Ok but what I don't get is how LineItem = :line_items
sepp2k1 has joined #ruby
<Fuzai>
I mean I don't see any line that makes a clean association of that
<apeiros_>
string transformation
<Fuzai>
it looks like it's assumed here or something
<Fuzai>
is that the case?
<workmad3>
Fuzai: convention
varfoo has quit [Quit: WeeChat 0.4.0]
brennanMKE has quit [Ping timeout: 246 seconds]
<Fuzai>
anything camel case gets an underscore for a space and a s on the end?
<apeiros_>
I'd assume mongomapper will allow you to explicitly tell the class name too
<workmad3>
Fuzai: the convention is that the association is snake_case and pluralized (on a many association) for a class thats CamelCase and singular
<apeiros_>
at least AR does that in similar situations
sepp2k has quit [Ping timeout: 264 seconds]
Schmidt has joined #ruby
<workmad3>
Fuzai: and yeah, I'd assume along with apeiros_ that mongomapper allows you to specify an explicit class if desired (in the same way it uses the same conventions for associations)
<Fuzai>
workmad3: thank you, you phrased that alot better then I did, but it was the resolution I had come to in my head
mark_oz_ has joined #ruby
<Fuzai>
oh so i could do "many LineItem" as well as "many :line_items" ?
<workmad3>
Fuzai: heh :) can you tell I've explained that many times in #rubyonrails when talking about active record ;)
<workmad3>
Fuzai: doubtful
<apeiros_>
more like many :line_items, class_name: "LineItem"
<workmad3>
^^
<Fuzai>
ah
<Fuzai>
see that reads alot better to me
<workmad3>
Fuzai: the first argument is also the method used to access the association after all :)
sassamo has quit [Ping timeout: 272 seconds]
<workmad3>
Fuzai: of course, that's a pure guess based on MongoMapper seeming to replicate many AR conventions
<Fuzai>
I would assume you are right
<Fuzai>
as they even make mention to what you just said
<Fuzai>
I have no experience with active record
<workmad3>
yeah, if I was using MongoMapper, I'd start with that assumption and check the docs if things broke :)
<Fuzai>
and this is the first time i've used an api layer over a database to abstract the data
<workmad3>
your first ODM? :D
<workmad3>
(Object to Document Mapper)
<Fuzai>
the problem is the docs are really light and seem to make assumptions on one side, and the others are very buried and the third set seems like a skeleton and nothing else
cbetta is now known as cbetta_afk
<Fuzai>
yea
<Fuzai>
ODM, that's what they call this layer
<workmad3>
it's normally the ORM when dealing with a relational database
<Fuzai>
I really like it so far, i'm used to writing stored procedures so it's quite a transition
ndrei has quit [Ping timeout: 272 seconds]
<mircoblitz>
workmad3, apeiros, craigp thank you for your help. Got everything fixed and undersood more about ruby. Bit win for today.
darthdeus has joined #ruby
<workmad3>
mircoblitz: I'm not sure I helped much with your problem or ruby understanding, but yw anyway (as I recall, I just got things wrong about the HTTP RFC :) )
e62 has joined #ruby
shime has joined #ruby
lyanchih has joined #ruby
<mircoblitz>
your discussion helped :-) the valueable ifo was between the lines ;-)
Targen has quit [Ping timeout: 246 seconds]
mark_oz_ has quit [Ping timeout: 260 seconds]
IceyEC has quit [Quit: IceyEC]
Alina-malina has quit [Read error: Connection reset by peer]
m00nlight__ has quit [Quit: Konversation terminated!]
Alina-malina has joined #ruby
lyanchih has quit [Client Quit]
colonolGron has quit [Quit: leaving]
Alina-malina has quit [Read error: Connection reset by peer]
lyanchih has joined #ruby
cbetta_afk is now known as cbetta
sergicles has joined #ruby
nhhagen has joined #ruby
rudisimo has joined #ruby
zegerjan has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
skaflem has joined #ruby
mudmaster has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
drumusician has quit [Ping timeout: 260 seconds]
ndrei has joined #ruby
kacperix has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
IceyEC has joined #ruby
Alina-malina has joined #ruby
sarkie_ruby has joined #ruby
w4pm has joined #ruby
mengu has quit [Remote host closed the connection]
<sarkie_ruby>
hi, I'm looking for a gem that just talks to SQL Server, just from a ruby script not rails, just something simple, any ideas?
<workmad3>
Fuzai: you mean a handy method like File#flush? :)
kotk1 has joined #ruby
<apeiros_>
workmad3: iirc ms itself refers to it as 'sql server' too. but yeah, maybe the users are to blame.
<Fuzai>
nice
mircoblitz has left #ruby [#ruby]
lorelei_ has joined #ruby
endash has joined #ruby
<apeiros_>
Fuzai: beware, that only tells ruby to flush. various other layers may still buffer
<Fuzai>
Ok, fair enought, thank you :)
`petey` has quit [Ping timeout: 272 seconds]
gr33n7007h has joined #ruby
tvw has joined #ruby
<vedic>
How do you log the usages of REST API? Eg: How many api access or Auth requests?, How many failed, successful requests? etc. Is there any ruby based library or tool for such cases (High performance) ?
kotk has quit [Ping timeout: 265 seconds]
zipper has quit [Ping timeout: 252 seconds]
dkamioka has joined #ruby
BillyJack has quit [Remote host closed the connection]
<lupine>
lorelei_, I so am
zipper has joined #ruby
carraroj has quit [Ping timeout: 246 seconds]
<workmad3>
vedic: depends on where you want to report to... there's things like a Ganglia gem, there's Instrumental.app and a corresponding ruby gem, you could just use a logging gem to log out various usages and use log analysis to get your metrics
<lorelei_>
lupine, damn it! Unless, of course, you're now stalking me...
<vedic>
workmad3: I would like to keep this log for next 6 months and considering 50 log requests/second
<lupine>
I've been here forever too
<vedic>
workmad3: I am not sure if any database will be useful for that or writing on filesystem. I would certainly perform analytics on it time to time to figure out the actual use metrics
breakingthings has joined #ruby
<workmad3>
vedic: I'd probably look at ganglia metrics or similar then... they use a round-robin database for metric storage
yalue has joined #ruby
<workmad3>
vedic: or just a log file with a suitable logrotate rule setup
<vedic>
ok
mudmaster has joined #ruby
mansi has joined #ruby
zxd has joined #ruby
<emocakes>
lupine why ?
mark_locklear has joined #ruby
<emocakes>
the webserver already logs all that
pranny has joined #ruby
<emocakes>
erm
<emocakes>
vedic
kiri has quit [Ping timeout: 272 seconds]
sergicles has quit [Quit: sergicles]
<emocakes>
you could configure the server logs to be more useful
<emocakes>
then you can get more of an idea
<vedic>
emocakes: I see
<emocakes>
plus its fast
<emocakes>
alot faster than ruby would be
kiri has joined #ruby
danshultz has quit []
<lupine>
just stick it in a syslog server
<workmad3>
emocakes: heh :) I was assuming that it was desired to record the metrics based on some application level data
<lupine>
job's a good'un
<emocakes>
it might be workmad3, i got no idea of why exactly he needs it
<wald0>
is Minitest the prefered "test tool" ?
jkamenik has joined #ruby
<workmad3>
wald0: depends on who you're talking to ;)
<emocakes>
wald0, testing is so 2007
<wald0>
emocakes: what you mean ?
<emocakes>
i dont do TDD, i do YOLO
<workmad3>
emocakes: YDD!
zxd has quit [Ping timeout: 245 seconds]
<wald0>
workmad3: well, i dont need actually a powerful one, but a simple to use and fast to write :)
<emocakes>
exactly
<emocakes>
YDD
<emocakes>
rspec?
<tagrudev>
:D
bluOxigen has joined #ruby
<workmad3>
rspec, minitest, test/unit, minispec, bacon, testrocket... take your pick :)
<emocakes>
i like bacon
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has quit [Remote host closed the connection]
shedd has joined #ruby
mansi has joined #ruby
<workmad3>
emocakes: same... especially for breakfast :)
Casey has quit [Ping timeout: 252 seconds]
phipes has quit [Read error: Connection reset by peer]
mansi has quit [Remote host closed the connection]
<emocakes>
I might make some right now workmad3
<emocakes>
I'm feeling kind of hungry, nothing like midnight bacon
<workmad3>
emocakes: make some? you have a pig ready for butchering?
<wald0>
seems like rspec is the most used and the one needed to failt at "packaging/compiling" time? (yeah, there's no compiling, well, you got what i mean)
<emocakes>
fry some unfortunately :(
juarlex has joined #ruby
mansi has joined #ruby
<workmad3>
wald0: huh? 'needed to fail'?
drumusician has joined #ruby
<workmad3>
wald0: also, again, 'most used' would depend on who you talk to :)
<wald0>
workmad3: hu? i wrote that? lol sorry, i sleeped today only 4 hours :/
<workmad3>
wald0: but the biggest contenders are minitest and rspec
<workmad3>
wald0: you *just* wrote it :P
gja has joined #ruby
<wald0>
workmad3: but i dont even know what i meant there lol
<workmad3>
wald0: hehe :) so saying 'you got what I mean' was incorrect? ;)
<workmad3>
wald0: because personally I had no idea what you meant... and it seems neither did you ;)
<wald0>
workmad3: if im not wrong, when writting some ruby stuff, there's an .rspec file included which does tests to see if everything works correctly everytime "something" (installing it, packaging it, what else?)
<workmad3>
wald0: you're wrong
<workmad3>
wald0: the .rspec file is just for providing 'standard' flags to rspec when running it on a per-project basis
<vedic>
emocakes: Well, server log will surely inform what time a new request came and what url it had accessed, whether it failed or succeeded etc but on per user basis, ie. user x has logged on this time and access this url won't be there in server log. I need the second part
shedd has quit [Ping timeout: 265 seconds]
ndrei has quit [Ping timeout: 272 seconds]
amedeiros has quit []
<emocakes>
mixture of both?
<workmad3>
wald0: e.g. you could put into .rspec in one project '-I foobar_extensions' because that project needs that path on the LOAD_PATH
benzrf has joined #ruby
popl has quit [Ping timeout: 272 seconds]
<wald0>
workmad3: mmh, that is that redhat packaging standard stuff?
<emocakes>
if possible you might add a custom http header per user
<emocakes>
like a hashed guid
<emocakes>
:p
<emocakes>
then log that as well
<emocakes>
and then you get user was here and there at this time and got a 200
<workmad3>
wald0: it sounds like you're expecting rspec to be daemonised and running continuously...
<emocakes>
or a 403
<workmad3>
wald0: which it doesn't do... it runs on demand ;)
<workmad3>
wald0: you can run it continuously with something like guard (but you can do that with minitest or anything else too)
<vedic>
emocakes: thats great. But I don't think it can be real time monitored and responded accordingly. Something like rate limit.
<emocakes>
understood
<emocakes>
honestly, depends on how much performance you want
krawchyk has joined #ruby
<vedic>
emocakes: currently 50 requests/second is what I am targetting.
<emocakes>
if you needed the absolute speed you do it at the proxy server level
gja has quit [Quit: This computer has gone to sleep]
<emocakes>
try write some Rack middleware to check it out vedic
<vedic>
emocakes: Didn't get. What you mean by proxy server level
brennanM_ has joined #ruby
zipper has quit [Read error: Connection reset by peer]
mengu has joined #ruby
pranny has quit [Ping timeout: 272 seconds]
<vedic>
emocakes: You mean RabbitMQ type?
<emocakes>
well you usually have nginx proxying to bunch of workers
brennanMKE has quit [Read error: Connection reset by peer]
<emocakes>
or apache or IIS...
bMalum has quit [Read error: Connection reset by peer]
<emocakes>
lol IIS
<vedic>
emocakes: I use Nginx with GUnicorn
bMalum has joined #ruby
<vedic>
lol
<emocakes>
so nginx is proxying to gunicorn
<vedic>
yea
<wald0>
minitest is included in stdlib, which other ones are included too, workmad3 ?
joaoh82 has joined #ruby
<workmad3>
wald0: test/unit is too
<wald0>
well, as i have read test/unit is actually just a binding for minitest for compatibility
zeeraw has joined #ruby
<benzrf>
whats new rubyists
<workmad3>
it's not quite just a binding, it adds some extra bits on top
<workmad3>
but yeah, it's built on top of minitest since 1.9
<wald0>
ok so seems like the candidate is minitest for now :)
<shevy>
guys
pehlert has quit [Ping timeout: 260 seconds]
mklappstuhl has joined #ruby
<shevy>
I wanna distribute a .rb file, standalone. a tutorial. webrick can load it up. now I also want to use images embedded into that .rb file. I believe one can use arbitrary data after __END__ but how could I load and "display" the image(s)? like for instance. "embed" one .png file into a .rb file
<DouweM>
WHY
sassamo has joined #ruby
<wald0>
what is the more easy to write/read/remember? bacon ? (looks very english/simple writed)
<benzrf>
shevy: wtf
<DouweM>
But if you really wanted to, read the file, encode it as base64, use an <img> tag with a data-uri
<workmad3>
^^ that could work
<workmad3>
shevy: or you use some form of separator to allow you to pick out bits of the DATA section
<shevy>
workmad3 ah
amedeiros has joined #ruby
<wald0>
shevy: tutorial! send me it :)
<ddd>
shevy yeah i get the desire to include all tutorial parts in one lump, but *in* the rb file??
pama has quit [Quit: Connection closed for inactivity]
<workmad3>
shevy: then do things like --/img/foobar.png <base64 encoded image>
<shevy>
wald0 eeeeh I am laying out the structure first
<Hanmac>
shevy my latest rwx commit: "Showing 91 changed files with 1,906 additions and 632 deletions. " ;P
sassamo has quit [Read error: Connection reset by peer]
<ddd>
shevy you fall out of bed this morning or something?
brennanM_ has quit [Ping timeout: 252 seconds]
<shevy>
ddd yep. I will distribute only one .rb file
<wald0>
shevy: i think that we are doing actually the same thing lol
<ddd>
shevy yeah thats 600MB huge
sassamo has joined #ruby
<shevy>
ddd nah, only small images
<DouweM>
shevy: why though
tkuchiki has joined #ruby
<shevy>
DouweM so that someone else has to download only one file
<wald0>
shevy: its about somekindof ruby reference / example of code?
<workmad3>
shevy: which you could then load up on program boot, then when webrick gets a request in, see if it's a registered path for serving a file
<shevy>
wald0 yeah. a tutorial that should be extensive, including specific examples with GUI toolkits as well
marcgg_ has joined #ruby
<workmad3>
shevy: I think sinatra can manage some of that kind of DATA section manipulation
<DouweM>
why not use a zip and a bunch of html files :/ I don't see the use of Ruby here
<ddd>
shevy Umm, zip or gz. one file
<ddd>
that arg doesn't gist
<shevy>
no option. someone else would have to extract it
<shevy>
and there won't be any .html files
EngierkO has joined #ruby
<ddd>
insane arg but ok
<shevy>
your claim not mine
<ddd>
i can see for a 'can i?' project but for real??
juarlex has quit [Remote host closed the connection]
<shevy>
do I have to repeat myself?
<ddd>
hehe, no
<workmad3>
shevy: option 3 - base64 encode a zlib file in there
<DouweM>
why do you think people could get ruby and the script working but not unzip?
<ddd>
wait!
<shevy>
it's not as if any of YOU have to write it
<DouweM>
right, I'm just baffled that someone would want to
<shevy>
DouweM it's a question of convenience and ease of distribution
<workmad3>
shevy: then you can use the ruby stdlib zlib to decode it into a tmp directory
juarlex has joined #ruby
<ddd>
maybe you do! if you repeat yourself enough maybe you'll see why *we're* all baffled
<workmad3>
shevy: and serve up files from that
<shevy>
that's fine but it's not for you to decide DouweM
rootshift has joined #ruby
<DouweM>
sure
<ddd>
but hey like you say you can do as you wish
<ddd>
its your time and effort
<shevy>
yep, good that we have that cleared up
<ddd>
hahah
<ddd>
i think thats why i like you
<ddd>
totally unflappable
<workmad3>
ddd, DouweM: aren't you guys familar with shevy wanting crazy things yet? :P
<ddd>
workmad3 yes, but this is an elevation move! :)
<DouweM>
workmad3: yeah, but I keep thinking there must be a line somewhere that eve nshevy won't cross :P
<workmad3>
ddd: if it helps, think of it as an interesting thought exercise ;)
<ddd>
douwem++
<ddd>
workmad3 lol touche
ghr has quit [Read error: Operation timed out]
marcgg has quit [Ping timeout: 260 seconds]
<ddd>
actually think touche is the wrong wird there
RaCx has quit [Ping timeout: 245 seconds]
sarkie_ruby has quit [Quit: Page closed]
<DouweM>
I bet shevy's just a workmad3 alt to spout his insane ideas
<workmad3>
ddd: not as wrong a word as 'wird' :)
<ddd>
err word. whats the word for you have a point there
albertgrala has joined #ruby
<ddd>
hahaha
<ddd>
true that
<shevy>
how often have you seen workmad3 suggest insane ideas?
<ddd>
douwem hah
<DouweM>
that's where you come in
<workmad3>
shevy: I think that's DouweM's point
<ddd>
shevy is the control for often you?
<workmad3>
shevy: after all, we've never been seen in public together... :P
<ddd>
;)
<wald0>
shevy: nice! please send me it when you have it structured :), im trying to write a (small) reference too
<shevy>
workmad3 hey... perhaps we might have crossed in reallife and just did not know!
<workmad3>
shevy: ever been to the UK?
<shevy>
yeah but only once, to London :(
e62 has quit [Ping timeout: 252 seconds]
<workmad3>
right... so highly unlikely :)
<ddd>
hehe gotta love shevy and workmad3. two of the most insane, and unflappable guys i know on this network. both are insane of course, but totally hilariously funny
mklappst_ has joined #ruby
<workmad3>
which is exactly what I'd expect my insane future self to do if he invented a time machine and wanted to come back in time to screw with me on IRC under an alt!!!!
<DouweM>
haha
<workmad3>
ddd: hey I'm not ins....
<shevy>
why is workmad3 insane
<workmad3>
ok...
RaCx has joined #ruby
<ddd>
workmad3 oh whoa now! who's to say thats not the actual case?
<ddd>
workmad3 hahaha
<ddd>
yeah see? can't argue truth there pal
<workmad3>
shevy: I've been known to join IRC twice in order to have conversations with myself when bored...
juarlex has quit [Ping timeout: 252 seconds]
tkuchiki_ has joined #ruby
albertgrala has quit [Quit: Leaving]
<shevy>
Hanmac is rwx usable finally?
<ddd>
hehe
<workmad3>
shevy: I even have an alt for it - gonemad3
<shevy>
really?
<ddd>
shevy workmad3 isnt the stablest rock in the pile ;)
<shevy>
I think I saw that nick before hmm
albertgrala has joined #ruby
tkuchiki has quit [Ping timeout: 252 seconds]
raja has joined #ruby
<shevy>
indeed... the word mad is part of his nick
<workmad3>
shevy: I also sometimes have it set up as my alt if I need to ghost workmad3 :)
<ddd>
shevy he can't be afterall. he's friends with *me*!
<ddd>
that oughta tell you whats up right there
<Hanmac>
shevy: hm most of the added part is usable ... (documented functions should be usable too) but its still not finish yet
<workmad3>
shevy: and don't forget... I *enjoy* coding :P
ferr has quit [Ping timeout: 272 seconds]
<workmad3>
shevy: which is considered crazy by most people I know IRL... dunno why
mklappstuhl has quit [Ping timeout: 260 seconds]
<ddd>
workmad3 hey! you're the same guy that told me if I didn't enjoy it i was in the wrong raquet!
<workmad3>
ddd: you are
<workmad3>
ddd: doesn't stop it being crazy though ;)
<ddd>
hehe
<shevy>
well, the creative part of coding is nice
<DouweM>
I read other people's code for fun
<shevy>
bugs however are damn annoying
<ddd>
workmad3 hey it beats swapping out cylinder heads!
<workmad3>
shevy: then there's my current stack of bedtime reading - Futher Maths for Physical Sciences; Theoretical Physics; Tensors, Differential Forms and Variational Principles...
RaCx has quit [Client Quit]
bluOxigen has quit [Ping timeout: 245 seconds]
<ddd>
bedtime.. reading...
<shevy>
:\
<shevy>
so much physics
<ddd>
and my wife thinks i'm nuts for reading ruby books in the can!
<ddd>
sheesh
<workmad3>
ddd: I'm working @ home at the moment... I don't have my normal bus time to read in
<ddd>
but but.. bedtime..
<ddd>
hoiw can you sleep with that running around your skull??
<DouweM>
Yeah, I live 5 minutes from uni and 10 for work, but I don't get as much reading in as I'd want either :/
shaunbaker has joined #ruby
<DouweM>
*so
<ddd>
douwem if i didn't have PDFs of my books, i wouldn't have time to read
<ddd>
taking ruby books to the can involves a laptop
<workmad3>
hehe
<DouweM>
haha
<DouweM>
that's dedication
Serpent7776 has joined #ruby
<workmad3>
I've used my phone for that at times
<ddd>
my screen's too small or i would
<shevy>
I can't quite learn well before a computer
<DouweM>
tablet?
<ddd>
doesn;t require as much real estate :)
<ddd>
douwem I gave my kid mine
raja has quit [Ping timeout: 252 seconds]
<ddd>
he needed it for school
<DouweM>
you needed it for the can
<shevy>
haha
<Serpent7776>
hello, what's the ruby way of validating function input values?
<shevy>
ddd does your kid also get your car and you take the bicycle?
<DouweM>
praying
<ddd>
shevy i learn better by talking with others, thus irc. even if i come upo with REALLY stupid shit, least folks show me where i'm being stupid. books don't
<ddd>
shevy two words. HELLS NO
<shevy>
hmm
<ddd>
you've never seen him drive!
clamstar has joined #ruby
daidoji has quit [Ping timeout: 272 seconds]
<ddd>
I HAVE
dEPy has joined #ruby
shaunbak_ has joined #ruby
<workmad3>
shevy: no, ddd's kids get his truck and he takes a segway...
<ddd>
hahahahaha
<shevy>
Serpent7776 what do you mean with validating? "type" checking?
<ddd>
I would too damn it!
<ddd>
them things are fun!
<DouweM>
lol
ewnd9 has joined #ruby
<shevy>
I am scared of segways
<shevy>
I watched too many accidents with them on ....
zipper has joined #ruby
<shevy>
... youtube
enebo has joined #ruby
<Serpent7776>
I mean I have method that should take positive integer, how to check whether it really is?
vlad_starkov has quit [Remote host closed the connection]
<apeiros_>
shevy: are you afraid of walking too?
<ddd>
shevy besides, for ruby, workmad3 is my goto guy. educational to say the least. but, alas, I can't take him to the can with me
<ddd>
that'd be.. nuts
thelamest has joined #ruby
<shevy>
apeiros_ a little :)
<apeiros_>
there's various accidents with walking on youtube
yfeldblum has joined #ruby
<DouweM>
ddd: :)
<workmad3>
ddd: also somewhat expensive... flying me out there every time you needed a dump... :P
<ddd>
hehehe
<shevy>
Serpent7776 in this example, you could x = 5; x.is_a? Integer and perhaps > 0
<ddd>
that got an irl chuckle
mercwithamouth has joined #ruby
<ddd>
careful, i ever make it like bill gates i just might!
<ddd>
PARTY IN THE POOPER ROOM!
<DouweM>
Serpent7776: you can check whether it's > 0 and raise an argument error
<shevy>
apeiros_ I am mindful when I were to walk on some area close to flood, I saw walking people get run over by huge monster waves!
<ddd>
ok think i'm starting to show i've been up all night (again)
<shevy>
like one moment they were there, the next moment they were gone
<Serpent7776>
shevy, so my_param.to_i>0 is enough to check? what about strings?
<ddd>
i'm losing it
<Hanmac>
shevy: the next commits will not add new classes or features, i try to increase the comment / blank ratio
<shevy>
Serpent7776 well that would convert it into an integer. "5".to_i # => 5
avril14th has quit [Remote host closed the connection]
dblessing has joined #ruby
shaunbaker has quit [Ping timeout: 264 seconds]
<ddd>
i comment the shit out of my files. i don't care if it seems unprofessional or not. i wanna *know* what I was doing 6 months from now (or why at the very least)
<shevy>
Serpent7776 whether it is a string you could check with .is_a? String. you could also raise a specific error if the input is wrong, or you simply try to make sense of the input and then use that interpretation in your method
<DouweM>
Serpent7776: usually, type checking in Ruby is not-done
<shevy>
Serpent7776 some strings would not give good results with .to_i
<Serpent7776>
shevy, so my_param.is_a? Integer for ints, my_param.is_a? String for strings?
vlad_starkov has joined #ruby
<shevy>
Serpent7776, for instance: "abc".to_i # => 0
<ddd>
i cut back on my comments in DTF and i'm suffering for it 8 months later trying to remember why the hell i did something
<DouweM>
Serpent7776: if no-one would reasonably call your method with anything other than an integer, just skip the type check
<DouweM>
Serpent7776: checking for > 0 is reasonable
<DouweM>
Serpent7776: but please. No #is_a?
<shevy>
Serpent7776 dunno. I don't really have to do that much at all. most of the time when I do any of that, it's because I want an array rather than a string (because I lateron do batch-processing on the array via .each )
<ddd>
workmad3 oh btw, you got a couple minutes for a side discussion?
zegerjan has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
<ddd>
douwem what's wrong with checking #is_a?(Integer) or something?
<Serpent7776>
DouweM, why not #is_a?
<DouweM>
type-checks aren't needed usually
<workmad3>
ddd: about to have lunch, sorry m8
<ddd>
if ! var.is_a?(Integer) puts "Enter what you were told to, damn it!"
<ddd>
workmad3 np
<DouweM>
your code is going to be used by a dev who hopefully somewhat knows what's he's doing
<ddd>
workmad3 was just an idea i had but not sure how it'd play out.
<DouweM>
passing in a negative int is a reasonable mistake, especially if it's user input, but a reasonable dev wouldn't pass a string or an array
<ddd>
douwem people try to crash programs purposefully
robertrv has joined #ruby
<shevy>
:)
<DouweM>
right, but it depends on whether it's user or dev input
<shevy>
PEOPLE ARE EVIL
<ddd>
if all you want is an integer, what's wrong with testing specifically for it and going with that
<DouweM>
devs can be trusted
<ddd>
hardly
<ddd>
no more so than anyone else
<shevy>
trust me :)))
<DouweM>
ddd: do you do type checking in every method you write?
vedic has quit [Quit: Leaving.]
<apeiros_>
DouweM: devs like to have clear failures, though
<DouweM>
ddd: the most they can break is their own code
<ddd>
douwem when its critical
<DouweM>
I'm not saying all type checking is bad
<apeiros_>
I do more typechecks nowadays than I did earlier, simply to get easier to understand bugs
<workmad3>
ddd: devs can't be trusted, but devs *can* be held responsible if they use your code incorrectly
<DouweM>
^^
fedez77 has joined #ruby
<ddd>
not to mention its not that hard to enter 1o instead of 10
<shevy>
I never do that!
<workmad3>
ddd: namely, if they use it badly, it's their fault, not yours :)
<shevy>
I always input 42
<ddd>
workmad3 i can agree with that
<DouweM>
ddd: in code, the former would be a syntax error
<ddd>
shevy hehe
<shevy>
"User error: You are too dumb to input only numbers. Get out."
Kricir has joined #ruby
<ddd>
shevy hahah
pushpak has joined #ruby
<workmad3>
shevy: I use a random number... 4
<DouweM>
I'm assuming the dev passes the input, not the user
<shevy>
workmad3 hehehe
<workmad3>
shevy: my d6 told me it was random
<ddd>
doh!
<ddd>
just had to get in the D&D ref huh?
mosez has quit [Quit: Switching back to real life]
psyl0n has quit [Read error: Connection reset by peer]
<workmad3>
ddd: no, if it was a D&D reference, it would have been a d20 :P
mosez has joined #ruby
<ddd>
hah
<workmad3>
ddd: or I'd have used my THAC0
<shevy>
workmad3 ddd played when they still used a d6 :P
<ddd>
shevy hey, no tellin my age!
<shevy>
ddd when I was like 10 years or so, I wanted that blue DnD box
<shevy>
my english sucked but the pictures were cool. DRAGONS
<ddd>
lupine i'd be happy ith yaml files for the roles
joaoh82 has quit [Remote host closed the connection]
<ddd>
:shrug:
<benzrf>
DouweM: a zelda thingy
<ddd>
err role definitions
<lupine>
why not start every rails application with an sqlite 'database' that has a single table, with a single column - 'database'
<benzrf>
DouweM: basically a game framework for 2d zelda-likes
<lupine>
it can be a giant json hash
<benzrf>
DouweM: with almost all of the game logic handled
<ddd>
lupine lol
<DouweM>
benzrf: oh that's pretty interesting
<lupine>
mutter mutter
<benzrf>
DouweM: google 'zelda classic'
<ddd>
lupine gimme another option then (besides cancan)
<lupine>
I don't have one, like I said, I've been out of date
<lupine>
when I wanted roles and permissions for my project, I did it from scratch
<ddd>
there's one like direct_authorization or something someone told me aboutbut i can't remember the exact name and the person hasn't been online so i can't check it out
lorelei_ has quit [Changing host]
lorelei_ has joined #ruby
<ddd>
lupine i did the auth part. i just didn't want to invest a lot of time writing a roles management
<lupine>
my roles stuff isn't actually very good ^^
<lupine>
but it's better than storing the whole damn thing in a json string
<ddd>
i mean i *am* using a field to define the 'type' (role) so i man i could easily do that, but it wouldn't be an easily modifiable
lioninawhat has joined #ruby
<ddd>
yeah, i get your point, and agree mostly. i don't see why it had to be in json rather than just a yaml dump or even a roles table but what do i know i'm still mediocre at this
chinkung has quit [Read error: Connection reset by peer]
mlpinit has quit [Ping timeout: 245 seconds]
lyanchih has quit [Quit: lyanchih]
ndrei has joined #ruby
<shevy>
hmm just to confirm it... when I store after __END__ and then load this, like doing: x = DATA.read, DATA seems to be emptied after this. this is expected behaviour I suppose?
chinkung has joined #ruby
<shevy>
I can't recall DATA.read emptying but perhaps I wasn't paying attention before
RaCx has joined #ruby
mikecmpbll has joined #ruby
jerius has joined #ruby
<DouweM>
shevy: that's expacted, that's the way read works
<benzrf>
DouweM: so yeah, somebody pointed me to that when i told them about legend
<benzrf>
DouweM: [legend == my project]
<ddd>
ahh thats it. declarative_authorization was it
stryek has joined #ruby
<benzrf>
DouweM: now my motivation has drained away
<ddd>
the other is pundit
<Hanmac>
benzrf: what is it, what does it need, why do i need it, and why should i care?
Kricir has quit [Remote host closed the connection]
<DouweM>
benzrf: understandable
<benzrf>
Hanmac: huh?
tyl has joined #ruby
<Hanmac>
benzrf: your legend project
<benzrf>
Hanmac: it was going to be an engine/framework for 2d-zelda style games/maps
lyanchih has joined #ruby
cescalante is now known as ce_afk
<benzrf>
Hanmac: the idea being that you can just write new tile definitions and sprite definitions, or use somebody else's, and legend loads and plays it
<benzrf>
Hanmac: as a standalone application
lorelei_ has quit [Ping timeout: 245 seconds]
<benzrf>
*obviously you need to make a map as well
mlpinit has joined #ruby
<benzrf>
Hanmac: anyway Zelda Classic is basically similar to that... so i basically shelved legend
<wald0>
well, this is more or less my reference of ruby (more like code structure than a list of all)
<wald0>
shevy: ^
shedd has quit [Ping timeout: 264 seconds]
roolo has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 272 seconds]
sailias has joined #ruby
lyanchih has quit [Quit: lyanchih]
ndrei has joined #ruby
noop has quit [Ping timeout: 252 seconds]
roolo has joined #ruby
juarlex has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has joined #ruby
brennanMKE has joined #ruby
megus has joined #ruby
mansi has quit [Remote host closed the connection]
jdguzman has joined #ruby
mansi has joined #ruby
phrozen77 has joined #ruby
phrozen77 has quit [Changing host]
blassing has joined #ruby
blassing has left #ruby [#ruby]
blassing has joined #ruby
<blassing>
hello
<blassing>
anyone here experienced with ffi-ncurses ?
e62 has joined #ruby
brennanMKE has quit [Ping timeout: 260 seconds]
kacperix has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
drumusician has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
klaut has quit [Remote host closed the connection]
Megtastique has joined #ruby
lioninawhat has quit [Remote host closed the connection]
Cephalostrum has quit [Quit: Aim higher. Try this: why am I here? Why do I exist, and what is my purpose in this universe? (Answers: 'Cause you are. 'Cause you do. 'Cause I got a shotgun, and you ain't got one.)]
rhys has quit [Remote host closed the connection]
blassing has quit [Quit: blassing]
iaj has joined #ruby
rhys has joined #ruby
joaoh82 has joined #ruby
vmachine has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
xjiujiu has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
tannerburson has joined #ruby
m00nlight has joined #ruby
agjacome_ has quit [Ping timeout: 264 seconds]
joaoh82 has quit [Ping timeout: 245 seconds]
max96at has joined #ruby
sambao21 has joined #ruby
ehc has joined #ruby
dkannan has joined #ruby
mansi has quit [Read error: Connection reset by peer]
Sid05 has joined #ruby
joaoh82 has joined #ruby
nhhagen has quit [Remote host closed the connection]
<vmachine>
Hi all new to programming and ruby.. hope this channel is more helpful than #python:-D
<DouweM>
vmachine: you and your expectations
Soda has joined #ruby
Soda has quit [Read error: Connection reset by peer]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
<workmad3>
vmachine: how is #python nowadays?
<vmachine>
i do have lots of expectation... I need a "gem" for my programming language.
<joonty>
vmachine: sounds like juicy gossip
mansi has quit [Read error: Connection reset by peer]
<vmachine>
i hate that channel
<vmachine>
all they do there is brag:-D
<workmad3>
vmachine: ah, not much has changed then
<vmachine>
now thats gossip
jedimind has joined #ruby
mansi has joined #ruby
<DouweM>
brag about what?
<joonty>
the size of their vm
<vmachine>
how python is better than everything else.. and how they can code well
<vmachine>
not very helpful at all to newbies
<DouweM>
jeez
<joonty>
vmachine: what gem are you looking for?
<joonty>
let's get productive :)
MrZYX|off is now known as MrZYX
<workmad3>
DouweM: yeah... they think they can code better than us?
<workmad3>
DouweM: unlikely, eh? :D
<waxjar>
but.. ruby is better than everything else?
<workmad3>
</sarcastic-brag>
alexfreidah has quit [Ping timeout: 246 seconds]
<shevy>
ruby is better than your grandma
<DouweM>
:p
<joonty>
you don't know my grandma
<waxjar>
my grandma's name is ruby
<vmachine>
ruby is better than perls! thats for sure
<shevy>
python is better than perl
bMalum_ has joined #ruby
<shevy>
php is better than perl
sassamo has quit [Remote host closed the connection]
<workmad3>
perl isn't that bad
<workmad3>
however, most perl code *is* that bad
<shevy>
perl is better than workmad3
<joonty>
lol
<wmoxam>
php is better than Cobol
sassamo has joined #ruby
<shevy>
vmachine look what you started man :(
<workmad3>
wmoxam: lies!!!!
<wmoxam>
that's about it
<joonty>
#ruby is broken :<
<DouweM>
vmachine: so, what were you wanting help with? :p
<workmad3>
COBOL TIL I DIE!!!
<shevy>
joonty the bot eval-in too :(
<wmoxam>
workmad3: DIE NOW
* workmad3
dies
<shevy>
you used to be able to do things like this
<shevy>
>> 5+5
<DouweM>
yeah, eval-in died again :(
<joonty>
:(
<workmad3>
wmoxam: how about fortran? :D
<joonty>
>> puts "help me please"
<waxjar>
help me please
<wmoxam>
workmad3: no idea, never written any
<workmad3>
vmachine: what d'ya need? :)
<joonty>
>> puts "someone replace my batteriezz"
<joonty>
waxjar: nice
bMalum has quit [Ping timeout: 252 seconds]
<waxjar>
someone replace my batteriezz
<joonty>
who needs automation
<wmoxam>
workmad3: I have written a minimal amount of Cobol though
* wmoxam
shudders
VinceThePrince has quit [Read error: Connection reset by peer]
yoshie902a has joined #ruby
<workmad3>
wmoxam: I can honestly say that my mother has written more cobol than me :)
<vmachine>
any site you all can recommend for a newbie.. basically im into sysadim/network and webapp security so i want to you ruby to create apps that can automate thing for me.. that will be my main use of the language
blaxter_ has joined #ruby
mary5030 has joined #ruby
<DouweM>
workmad3: me too!
clamstar has quit [Quit: Computer has gone to sleep.]
<workmad3>
vmachine: hmm... maybe you should take a look at chef and puppet
mary5030 has quit [Remote host closed the connection]
<joonty>
vmachine: what are you trying to learn specifically? rails? Or just ruby?
<Hanmac>
vmachine: what kind of apps? websites? application GUIs or more console guis ?
joaoh82 has quit []
<vmachine>
just ruby
<vmachine>
rails later on
mary5030 has joined #ruby
clamstar has joined #ruby
<workmad3>
vmachine: chef and puppet are both configuration management tools written in and extensible with ruby
<joonty>
vmachine: workmad3 is right, puppet and chef are specifically for automating sys admin tasks
bMalum_ has quit [Remote host closed the connection]
tanema has quit []
<wmoxam>
workmad3: heh
cbetta is now known as cbetta_afk
VinceThePrince has joined #ruby
<wmoxam>
vmachine: don't listen to workmad3's lies!
<workmad3>
wmoxam: from the sounds of things, my mum has written more cobol than you too ;)
<wmoxam>
Ruby is a toy language
<wmoxam>
only toys write ruby code!
<vmachine>
well whats a good website for ruby newbies
<wmoxam>
workmad3: most likely!
jlast has joined #ruby
<vmachine>
or book/vidoes
<wmoxam>
workmad3: I had one assignment in Uni that required Cobol
<wmoxam>
I tihnk they were just trolling us
sassamo has quit [Ping timeout: 272 seconds]
<workmad3>
vmachine: how much coding experience do you have?
<JADE_>
true A.I. lol like i have a design but sadly nearly not programming skills...
<benzrf>
>true A.I.
tagrudev has quit [Remote host closed the connection]
<benzrf>
sorry to break it to you but your idea is wrong in some way
MattStratton has joined #ruby
<JADE_>
?
nateberkopec has joined #ruby
cads has joined #ruby
aaronmcadam has joined #ruby
pehlert has quit [Read error: Operation timed out]
obs_ has quit [Quit: Saliendo]
marcgg has quit [Read error: Connection reset by peer]
marcgg_ has joined #ruby
bilbo_swaggins has joined #ruby
mercwithamouth has joined #ruby
<benzrf>
JADE_: you have not figured out how to do true ai
<benzrf>
JADE_: your approach is flawed
<workmad3>
JADE_: benzrf is playing the probabilities... the likelihood of someone having designed a strong AI without knowning a) how to code it up and b) knowing that it's called strong AI and not 'true AI' is highly unlikely
burlyscudd has quit [Quit: Leaving.]
<workmad3>
*knowing
shaunbak_ has quit []
<bilbo_swaggins>
what did I miss
<benzrf>
bilbo_swaggins: JADE_ has figured out 'true ai'
<workmad3>
bilbo_swaggins: '15:32 < JADE_> true A.I. lol like i have a design but sadly nearly not programming skills...'
<workmad3>
bilbo_swaggins: after asking for help to find some insight on a project they've been wanting to start
<lectrick>
Hanmac: Whenever you forbid something, you give it power.
<bilbo_swaggins>
hmm I can share that sentiment
srkn has joined #ruby
<bilbo_swaggins>
JADE_ might progress to programmer
<lectrick>
Hanmac1: ^ that was a reference to some apparently old comment you write here about the nazi party in germany, just realized it was old and not recent, lol my bad
<srkn>
hi, how to change directory with patterns ex: Dir.chdir("~/Library")
<workmad3>
lectrick: stop leaving your scrollback on old comments? :P
<lectrick>
workmad3: irccloud shows history by default
<MrZYX>
srkn: check File.expand_path
Cephalostrum has joined #ruby
<benzrf>
aaronmcadam: case?
dkannan has quit [Quit: dkannan]
gja has joined #ruby
<DouweM>
I'm still curious about JADE_'s "true AI"
<aaronmcadam>
what would you switch on?
<benzrf>
aaronmcadam: nothing
<benzrf>
case
<benzrf>
when this
<benzrf>
foo
<benzrf>
when that
<benzrf>
the other
<benzrf>
end
<aaronmcadam>
hmm yeh
<aaronmcadam>
I was hoping to use objects
<Hanmac1>
i want a AI that can be tricked to belive that the AI is human ;P
<lectrick>
true AI is probably impossible
<benzrf>
aaronmcadam: not everything has to be an object
freezey has quit [Remote host closed the connection]
<benzrf>
lectrick: what is that supposed to mean
<MrZYX>
aaronmcadam: make and array of the values and do .map(&:presence).first
<dachi_>
true ai scares me, just imagine, ai, good ai, True AI aa O_o
<workmad3>
aaronmcadam: or you could just do 'current_user.try(:language) || params[:locale] || cookies[:locale] || I18n.default_locale
<MrZYX>
*.compact.first
<benzrf>
lectrick: at the very least we could maybe duplicate the human brain structure as a program
<benzrf>
even if we never figure out why it works
<lectrick>
benzrf: we can't even duplicate a fruit fly as a program. nor a single cell for that matter. so, good luck with that.
<workmad3>
lectrick: wrong ;)
<aaronmcadam>
ah, that would be a bit nicer MrZYX
<lectrick>
workmad3: Link.
marcgg_ has quit [Ping timeout: 245 seconds]
<lectrick>
Show me a cell simulation that is indistinguishable from a living cell in every way.
<aaronmcadam>
I could use .fetch I think to set the default case too
ando has joined #ruby
yasushi has joined #ruby
<JADE_>
well my idea for the AI started with me learning aiml
<lectrick>
In any event, that's where we should start. Forget AI and just try to simulate life because it might turn out they're more related than we think
<bilbo_swaggins>
lectrick > In any event, that's where we should start. Forget AI and just try to simulate life because it might turn out they're more related than we think
<bilbo_swaggins>
I think so too
<bilbo_swaggins>
There's an underlying idea of finding simple patterns which generate more complex ones
<bilbo_swaggins>
both by trial and error
freezey has joined #ruby
<lectrick>
workmad3: bilbo_swaggins I don't think this effort will be wasted, at all. I wholeheartedly support this kind of work. I just think that the answers that emerge won't be what we expected. :)
<workmad3>
lectrick: that could be the case
<bilbo_swaggins>
I'd be fascinated either way
acrussell has joined #ruby
marcgg has joined #ruby
<workmad3>
lectrick: however, unless you happen to understand intelligence and consciousness (which, afaik, is currently beyond the sum total of human understanding) then you don't really have anything to base that off other than guesswork
<lectrick>
workmad3: Intuition. :)
Albright has quit [Quit: Albright]
<workmad3>
lectrick: intuition in areas that aren't understood == guesswork
dangerousdave has joined #ruby
_5kg has joined #ruby
<lectrick>
workmad3: I've casually studied it, I was a Psych major, I've been a programmer for > 20 years. I got into Cornell by writing a really awesome paper on A.I. In fact I am pretty sure I wrote at least four papers on AI over the course of my education.
<lectrick>
I also meditate.
ando has quit [Ping timeout: 272 seconds]
<workmad3>
lectrick: do you claim to understand consciousness?
<bilbo_swaggins>
I think we do know some things
<lectrick>
workmad3: I claim to understand what it's not
yjmsf20 has quit [Quit: leaving]
<lectrick>
workmad3: And it's not simulatable in a machine that we can currently conceive of
<bilbo_swaggins>
consciousness the feeling or consciousness the phenomenon?
<workmad3>
lectrick: now, is that part of your definition of consciousness, or is it merely a feeling of intuition based on the fact that you can't imagine how it can be done and that it hasn't been achieved yet?
<JADE_>
my design is if using a infinate - or + 0.0 intager with the same concept as aiml and an auto function that can delete, modify, create aiml based off value ie the the intager value of preveus files in its db and this has been
<workmad3>
lectrick: I think it's complete bullshit to claim that consciousness is epiphenomenal
<lectrick>
workmad3: you can't prove that either, so we're at an impasse :)
Neomex has joined #ruby
maasha has quit [Ping timeout: 272 seconds]
yjmsf20 has joined #ruby
fire has quit [Quit: WeeChat 0.4.1]
<workmad3>
lectrick: if consciousness *is* epiphenomenal, then it has no bearing on the real world
<lectrick>
workmad3: the only way to prove that is to recreate consciousness in a machine
net_mask has joined #ruby
<lectrick>
workmad3: that's not necessarily true, that's a reductionist argument
<workmad3>
lectrick: the whole basis of an epiphenomena is that it has no bearing on the real world
<bilbo_swaggins>
claiming consciousness doesn't exist is a cop-out, but it's clearly not what was always assumed
<workmad3>
lectrick: otherwise it wouldn't be an epiphenomena
figgleberry has joined #ruby
FifthWork has joined #ruby
<workmad3>
lectrick: once it has *any* effect on the real world, it becomes a normal phenomena that can be observed
<lectrick>
workmad3: if you can't predict the state of my brain 52.3454 hours from now, does that mean I have no effect on the real world?
<workmad3>
lectrick: no
mark_locklear has quit [Ping timeout: 252 seconds]
<workmad3>
lectrick: but I don't claim your brain is an epiphenomena that can *never* be empirically observed
<lectrick>
by "effect on the real world", you mean "will", right? Otherwise we are all merely zombie biochemical processes
<dachi_>
nokogiris methods ...
<bilbo_swaggins>
"You" and "your" body are different things.
<workmad3>
lectrick: no, I don't necessarily mean 'will'
<lectrick>
I think that a non epiphenomic consciousness is bullshit because all that means is that the whole point of this entire universe is to go from low to high entropy, and living thinking beings seems like a ridiculously silly/complex way to achieve that
<lectrick>
i.e. conclusion: nihilism.
<workmad3>
lectrick: that's not arguing from facts though, that's arguing from a personal desire to see the world in one way
lmickh has joined #ruby
klaut has joined #ruby
<bilbo_swaggins>
You're both not getting past the original question of whether consciousness is, in some sense, real
<lectrick>
since I reject all arguments that end in nihilism, working backward I believe (yes, believe. sigh) that consciousness is somehow nonphysical, where "physical" = "what we UNDERSTAND about the physical NOW". The latter is important.
<lectrick>
workmad3: nope.
<workmad3>
lectrick: ok, so you accept that consciousness could in the future be understood?
<workmad3>
lectrick: and be subject to empirical observations?
<benzrf>
consciousness is irrelevant to everything in general
<lectrick>
workmad3: yes. more of it. not sure about all of it. but yes, more of it, sure.
<lupine>
why would you reject nihilism?
<lectrick>
lupine: because it's void.
<lupine>
personal preference?
yfeldblum has joined #ruby
<workmad3>
lectrick: whatever 'consciousness' is? (which is itself a really badly defined word and concept)
<bilbo_swaggins>
benzrf: you lose nothing leaving it out of the equation I think
<bilbo_swaggins>
even in a strong AI
<lupine>
if you just don't like it, fair enough
`petey` has joined #ruby
Fire-Dragon-DoL has joined #ruby
<benzrf>
bilbo_swaggins: exactly
<lupine>
existential nihilism seems like a no-brainer to me
<benzrf>
bilbo_swaggins: if every person in the rest of the world was a p-zombie
<benzrf>
what would that change?!
<lectrick>
lupine: I think that if you believe the world is nihilistic you will act in ways that bring you towards nihilism. If you believe the world is not nihilistic you will act in ways that lead you away from nihilism and toward true meaning. Thus your worldview as well as your life is intimately tied to your beliefs whether or not you are religious.
<workmad3>
lectrick: so, if someone created a machine that acted like a conscious being in every way, even down to asking questions like 'Am I conscious?' and writing articles and blog posts about it... would you entertain the idea that this machine is conscious?
Wixy has quit [Read error: Connection reset by peer]
Mattx has quit [Read error: Connection reset by peer]
<lupine>
lectrick, no, either (existential) nihilism is true, or it is false
Neomex has quit [Quit: Neomex]
<lupine>
and nothing of our actions can change that
<benzrf>
bilbo_swaggins: ok well i guess im not entitled to say that
<benzrf>
since id probably break down if i had proof of that
<benzrf>
~_~
<lectrick>
lupine: "existential nihilism seems like a no-brainer to me".... If that was a pun, that was hilarious
gilcosson has joined #ruby
<lupine>
;)
<bilbo_swaggins>
benzrf: most any horror-scenario involving AI can be resolved by *not* modeling it after ourselves
* benzrf
awards lupine 10 pun points
<benzrf>
bilbo_swaggins: what else do we have to model them on, though?
<lupine>
in the absence of a concrete source of objective meaning, I must accept that meaning is subjective (and quite possibly intersubjective) as a general rule until proven otherwise
<benzrf>
we are the only intelligence we know of
lukec has quit [Quit: lukec]
<lupine>
that doesn't have much to say about almost all interpersonal conduct
bennyboobooboo has quit [Remote host closed the connection]
<workmad3>
lectrick: also, a lack of any objective, external meaning to existence does not lead inevitably to nihilism
wallerdev has joined #ruby
<lupine>
workmad3, it is, exactly, what existential nihilism is
<lectrick>
lupine: So I choose to disbelieve in nihilism, and I work backwards logically from the premise that void conclusions are wrong conclusions. I freely admit that, though.
<lupine>
no more and no less
gja has quit [Quit: This computer has gone to sleep]
<bilbo_swaggins>
benzrf: include reason, exclude the midbrain and everything it does
bennyboobooboo has joined #ruby
freezey has quit [Remote host closed the connection]
ndrei has joined #ruby
<lupine>
if you work from there to decide you should act in one way or another because of that datum, that's something on top
<lectrick>
workmad3: I don't see that. If there is no true meaning then all meanings are illusory and by definition meaningless
<lupine>
no, they're subjective
<lupine>
which is differemnt to illusory or meaningless
<lectrick>
subjectivity is impenetrable
VinceThePrince has quit [Ping timeout: 260 seconds]
zoscoy has joined #ruby
<lupine>
no it isn't
tharindu|away has quit [Quit: Leaving...]
<lectrick>
lupine: I won't ever know exactly what it's like to be lupine. It's effectively impenetrable. Maybe for all time, but certainly, for now ;)
<benzrf>
bilbo_swaggins: well, that might be fine for operating systems that don't require human interactionjaxsn
<benzrf>
*interactoin
w1xz has quit [Quit: ZZZzzz…]
_maes_ has joined #ruby
<lupine>
indeed, objective meaningfulness is exactly the same as subjective meaningfulness, but with the proviso that the subject is a singleton
yfeldblum has quit [Ping timeout: 264 seconds]
failshell has joined #ruby
<interactionjaxsn>
:)
<benzrf>
bilbo_swaggins: but our interactions with other intelligent entities are all modelled off of the assumption that the other is similar to us
<benzrf>
in certain basic ways
bennyboobooboo has quit [Read error: Connection reset by peer]
<lectrick>
lupine: Hmmm. :)
<lupine>
you assume a subject you have no evidence exists, and then declare that that is the subject of meaningfulness. it's not very interesting
<benzrf>
if you take away the basic similarities, it would probably make AIs *very* difficult to interact with
<benzrf>
from a human positoin
<lupine>
meanwhile, subjects like you and me are eminently interesting
<benzrf>
*position
clamstar has quit [Quit: Computer has gone to sleep.]
<lupine>
and they can be the subjects of meaning
zipper has quit [Ping timeout: 245 seconds]
bennyboobooboo has joined #ruby
<bilbo_swaggins>
benzrf: one can appreciate that an octopus is very intelligent, very different in how that manifests, and yet interesting and friendly in many cases
vedic has left #ruby [#ruby]
<bilbo_swaggins>
it's a different being. so what?
<lupine>
compared to a super-important singleton of meaning, those subjects might seem unimportant, but if that super-important singleton doesn't actually exist, then they're a lot better
<lectrick>
Everyone is obsessed with objective measurements of things. Simulating neuron signals ≠ simulating what it's like to be a neuron. Simulating a brain ≠ simulating what it's like to live in a brain.
<dachi_>
we have souls
<lectrick>
Subjectivity and belief are far more important than we think. Why is the Mona Lisa worth a bajillion dollars? It's just wood, canvas, and some arrangement of ink.
<lupine>
simulating a suitable brain will simulate an entity that will be able to tell you what it's like to live in a brain
<bilbo_swaggins>
If I accept that my computer now is inhuman in many regards, I'd have no trouble accepting an AI which was inhuman
clamstar has joined #ruby
<lupine>
I think you're taking liberties with what subjectivity actually is
vlad_starkov has joined #ruby
<benzrf>
bilbo_swaggins: yes, but you are not interacting with your computer as another intelligent being
<bilbo_swaggins>
lectrick, lupine: I think subjectivity will one day be viewed as a process
<lectrick>
Why is an ounce of gold worth $1,200? Why is a bitcoin worth $800? Why did Apple stock appreciate in value when the stock itself didn't change? Why do I pick one girlfriend over another when they are both quite serviceable future moms?
<bilbo_swaggins>
benzrf: Google is intelligent
fgo has quit []
<lectrick>
lupine: re: taking liberties- Maybe.
<lupine>
lectrick, in the absence of any evidence to the contrary, it's silly to conclude that you did it because of an invisible external giver-of-meaning
<lectrick>
Almost all values are subjective and therefore not computable
<benzrf>
bilbo_swaggins: =_=
freezey has joined #ruby
<lectrick>
Not computable things are not simulatable
<lectrick>
Ergo
<lupine>
many subjective values are computable
<dachi_>
yes
<lupine>
for instance, prediction markets make tonnes of money
<txdv>
thsi channel
<bilbo_swaggins>
lectrick, lupine: subjective values are information
<workmad3>
lupine: was just about to make that point :)
<lupine>
what they're doing is predicting subjectivity
<lectrick>
Why was Nirvana a popular band? Why are girls obsessed with One Direction?
<lupine>
yes, all this is computable
<txdv>
girls in north america*
RaCx has quit [Quit: Computer has gone to sleep.]
<lectrick>
Hell, why is Ruby loved by people? It's just as serviceable a language to get things done as, say, C#.
<txdv>
never had an idea that that band existed until i talked to some girl on omegle
<bilbo_swaggins>
So anything that exists is a computation
<lupine>
the future price of bitcoin is also simulatable
<txdv>
its like the north american version of tokyo hotel
senj has joined #ruby
<lectrick>
lupine: If you could do that you would be very wealthy very soon
<benzrf>
well, all occurances are a product of the laws of physics
<lupine>
yes, lots of people do
<benzrf>
and the laws of physics are computable
<benzrf>
therefore all things are computable
<lupine>
the only fun bit is that they get into recursion
<bilbo_swaggins>
lectrick: imperfect information looks like randomness, but it's really not
FifthWall has joined #ruby
<lectrick>
I got into bitcoin 2 years ago. Off... a gut feeling and no proof.
`petey` has quit [Remote host closed the connection]
burlyscudd has joined #ruby
<workmad3>
benzrf: the laws of physics aren't as computable as you'd like to think
<lupine>
it's just your average paradox. people are predicting the future and so change the present based on it, which changes the future
<workmad3>
benzrf: at least, not in the sense of how computation is defined mathematically
zipper has joined #ruby
<lupine>
you can't argue from that, that consciousness is spooky
<lectrick>
I had no simulations and no data. I read the source code and the paper and thought, holy crap, this might end up being A Thing™. I had a hard time explaining it to people (read: process) as to why I would throw 30 grand at it.
<bilbo_swaggins>
workmad3: elaborate
<lupine>
anyway, I'm sure ##philosophy can educate you
<workmad3>
bilbo_swaggins: quantum mechanics, as we know it, is a computationally intractable problem, iirc
<lupine>
well, there are some undecidable bits in QM
<lupine>
but it's eminently computable
<lectrick>
workmad3: yes another interesting point. Not all things are computable
<lectrick>
Not to mention, computable things are subject to hangs which themselves are impossible to prove :O
<bilbo_swaggins>
that shows nothing for your greater point
colli5ion has quit []
vlad_starkov has joined #ruby
<workmad3>
lectrick: not computable on a universal turing machine and all equivalent models of computation, yes
JADE_ has quit [Quit: Page closed]
<lupine>
lectrick uses stream of consciousness. it misses!
dayepa has quit [Ping timeout: 252 seconds]
<lectrick>
workmad3: yes i am assuming "computable" means "on a universal turing machine"
<lectrick>
lupine: LOL
<workmad3>
lectrick: that's kinda the definition of computable ;)
toastynerd has joined #ruby
<workmad3>
lectrick: and sure, some problems our outside that set
<benzrf>
well the universe is computable on a black box
<workmad3>
*are
<bilbo_swaggins>
I'm telling you you guys aren't going to reach a consensus because you're differing on the classic question of mind-body duality and extending from there
terrellt has joined #ruby
<lectrick>
workmad3: well maybe there is some FUTURE "computable" that is not based on the turing machine idea, or expands on it, who knows
<lupine>
bilbo_swaggins, well, what we're talking about is *why* we differ on it
<lectrick>
bilbo_swaggins: you're probably right
<lupine>
lectrick's approach is to reject the entirely sensible proposition of nihilism out-of-hand based on nothing
kpshek has joined #ruby
<lupine>
which is fair enough, I guess
<lectrick>
lupine: I agree. It's based on a feeling that void conclusions are false. :)
<workmad3>
lectrick: afaik, it's still an open question as to whether quantum computation is turing computation or a superset of it
<bilbo_swaggins>
well can you really even prove the universe is consistently logical?
<lectrick>
workmad3: An interesting question
<lupine>
lectrick, you're hiding something in "void conclusions"
<bilbo_swaggins>
that your memories aren't created as you think?
snath has joined #ruby
<lupine>
existential nihilism drops exactly one proposition from your model of the universe
<lupine>
and it's one that you have no support for
<workmad3>
bilbo_swaggins: maybe you're just a boltzmann brain, floating in the ether, living through a spontaneously generated set of memories in the instant before your dissolve back into the ether?
<lectrick>
lupine: i believe that true meaning exists. I don't know if it's measurable, I believe it's subjective, and yes I will even concede that it makes me uncomfortable that I just used "believe" twice. Make that three times. :)
burlyscudd has quit [Ping timeout: 272 seconds]
<lupine>
if by "true meaning" you mean "objective meaning", then it can't be subjective, it's objective
<workmad3>
lectrick: everything you state is a 'belief'
<dachi_>
it's all written what will happen
<lectrick>
lupine: So I just work backwards from conclusions that are missing any sense of "meaning", like nihilism, so I call it "void"
<bilbo_swaggins>
workmad3: I heard that recently about computation. I didn't know Turing machines hadn't been proven the most powerful model.
toastynerd has quit [Remote host closed the connection]
<lectrick>
workmad3: that's my point. you can't get away from some belief, ultimately.
dayepa has joined #ruby
<lectrick>
you can't get away from resorting to subjectivity
<lupine>
nihilism doesn't exclude meaning, merely ovjective meaning
mklappst_ has quit [Remote host closed the connection]
<lectrick>
unless you think the entire universe is mechanical, which I find ridiculous
momomomomo has joined #ruby
<lectrick>
sorry, unless you "believe"
<bilbo_swaggins>
workmad3: we can't prove that we're being logical at any step in time of our mental workings
<lupine>
with your priors, it's not hard to see why you believe that
<workmad3>
lectrick: however, when you say 'I believe', I think you're really stating 'I believe that I believe X' or in your case 'I really hope that my believe X is true'
<lectrick>
biochemicalmechanical
<bilbo_swaggins>
that we have experienced anything
<bilbo_swaggins>
but yes I'm a mechanist
<workmad3>
*belief
<lupine>
but you've derived those from a pretty ridiculous basis, i fyou ask me
Mattx has joined #ruby
Mattx has joined #ruby
Mattx has quit [Changing host]
digital-ghost has joined #ruby
Wixy has joined #ruby
hoelzro has left #ruby [#ruby]
<lectrick>
bilbo_swaggins: yeah I can't be a mechanist. Which is kind of ironic considering I love programming.
`petey` has joined #ruby
<lectrick>
The more I program, the more I realize my brain doesn't act like a program
<lupine>
"this answer can't be right because I don't like it" is no good for discussion, really
<bilbo_swaggins>
you can have evidence and an inherent frame of reference guiding your beliefs
sumark has quit [Remote host closed the connection]
<lectrick>
Fall in love a few times and you will realize that too
<workmad3>
lectrick: I don't think the universe is mechanical in the classical sense
<bilbo_swaggins>
lectrick: it's something more powerful than a program
<workmad3>
lectrick: because otherwise there wouldn't be quantum physics that worked :P
razibog has joined #ruby
<bilbo_swaggins>
I fell in love once. Now I play blues guitar.
sumark has joined #ruby
<bilbo_swaggins>
I know a lot of songs about trains.
<lectrick>
workmad3: yes you can also work backwards from the fact that quantum mechanics is not computable and yet real to conclude that the universe is not computable, at least by turing machine
<lupine>
I've fallen in love a few times. I reject lectrick's assertion that it excludes this viewpoint
<lectrick>
lupine: you're entitled to your belief ;)
<lupine>
yes, I know
blaxter_ has quit [Quit: foo]
<lupine>
the question is which one is more sensible, not which one you should hold
<bilbo_swaggins>
isn't the question of whether the universe is mechanistic a matter of definition?
<lectrick>
I experience the illusion of pleasure while discussing these things. But we should probably get back to Ruby. :)
<lupine>
I hold many insensible beliefs that I shouldn't
<bilbo_swaggins>
I'd say anything it does is consistent with its own laws and thus is a computation
<lectrick>
lupine: ^ that was for you :)
<lupine>
you hold at least one more than I do, though ;)
<bilbo_swaggins>
lectrick: if Ruby questions are asked, we'll yield
<workmad3>
bilbo_swaggins: in that case, you're working from a non-standard definition of computation
<bilbo_swaggins>
I fully believe that computation can be extended into that realm
_maes_ has joined #ruby
<bilbo_swaggins>
I'm not saying I have a new model for it
<lectrick>
We're still exploring all the implications of our universal turing machines. It's a fascinating mine. Turing really was a genius
IceyEC has quit [Quit: IceyEC]
<bilbo_swaggins>
yes
IceyEC has joined #ruby
<bilbo_swaggins>
although
shime has quit [Ping timeout: 252 seconds]
<lupine>
never mind that we don't have any
<workmad3>
bilbo_swaggins: also, claiming something is true/false based off definition means you're playing word games
<lectrick>
lupine: Mentioning the love thing was an assertion that many choices I've made felt irrational yet true. A left-brain-dominated life is lesser than a full-brain-dominated one, as it were.
<workmad3>
bilbo_swaggins: it's like arguing if a tree falling in the woods causes auditory vibrations, even if there is nothing around to interpret those auditory vibrations in the air as a sound
p8952 has quit [Quit: Leaving]
ferr has left #ruby ["Good night everyone!"]
ferr has joined #ruby
<bilbo_swaggins>
I do have to say the universe is random to some degree, even if it's purely mechanistic, based even only on the fact that some arbitrary seed must have set out the evolution of it
<workmad3>
bilbo_swaggins: sorry, I mean 'does a tree falling in the woods make a sound?'
mikecmpbll has joined #ruby
<lupine>
lectrick, nothing about the universe suggests that irrationality can only be generated externally
srkn has left #ruby [#ruby]
mudmaster has quit [Read error: Connection reset by peer]
<lectrick>
lupine: quantum fluctuation at the neuron level? :)
mudmaster has joined #ruby
<bilbo_swaggins>
workmad3: I'm not claiming it true. Just saying I believe it is.
<lupine>
add up to normality
ghr has quit [Quit: Computer has gone to sleep.]
mark_locklear has joined #ruby
<lupine>
Quantum(tm) tends to
<lupine>
which is why we have quite predicable macro structures
gregoriokusowski has joined #ruby
burlyscudd has joined #ruby
ferr has left #ruby ["Good night everyone!"]
ferr has joined #ruby
<workmad3>
bilbo_swaggins: ok, so to cut through that particular gordian knot - when I see the term 'mechanistic', I interpret it as 'classical physics mechanics'
<lectrick>
i better toss a different bone in here: Thoughts on composition pattern vs. inheritance pattern with regards to pervasive unit testing?
<workmad3>
bilbo_swaggins: and when I see 'computation' I read it as 'computable on a turing machine'
<lupine>
composition > inheritance
apeiros_ has quit [Remote host closed the connection]
<lupine>
ironically enough
<lectrick>
lupine: I'm coming to that conclusion. Slowly and with a lot of baggage. :)
<lupine>
sounds like busy-work ;)
sambao21 has quit [Quit: Computer has gone to sleep.]
apeiros_ has joined #ruby
<workmad3>
lectrick: inheritance is the strongest association you can make between two objects in an OO language
<bilbo_swaggins>
workmad3: as I interpret, the fact that an apparently consistent (if random) system exists, it's self-evidently computable
<lectrick>
lupine: I'm hurting for a green-field project, let's just say that
<bilbo_swaggins>
although clearly I'm extending the definition of computable
<workmad3>
bilbo_swaggins: but what do you mean by 'computable'?
<workmad3>
bilbo_swaggins: yes, and how? :)
<bilbo_swaggins>
what is a computation?
<bilbo_swaggins>
just a process?
<workmad3>
lectrick: so, would you always use your strongest form of glue to join things together? :)
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3>
bilbo_swaggins: one sec, need to make sure I get this right so need to look a bit up :)
<lectrick>
workmad3: yep. another good point.
apeiros has quit [Remote host closed the connection]
larissa has quit [Quit: Leaving]
ahawkins has quit [Quit: leaving]
<bilbo_swaggins>
our model of QM is computable
<workmad3>
lectrick: composition is a weaker relationship... so yes, I'll prefer composition over inheritance, in the same way as I'll grab PVA before I glue things together with polycement ;)
<lectrick>
workmad3: lupine: OK so if I want to use the compositional pattern more, yet I'm more or less stuck with Rails, should I just nihilistically jump off the nearest roof? lol. (Are there other pieces/gems/tools useful to web development that were written with a compositional pattern?)
<bilbo_swaggins>
that doesn't necessarily mean the Universe "is" a computation
lastWhisper_ has joined #ruby
<lupine>
nihilism does not imply suicide
<bilbo_swaggins>
same word, different meaning
kewubenduben has joined #ruby
<bilbo_swaggins>
lupine: agreed
<lastWhisper_>
Are any of you guys familiar with GC in Ruby 2.0?
<bilbo_swaggins>
how familiar?
<lectrick>
lupine: but suicide (or not) doesn't make a difference in nihilism
<lupine>
yes it does
<lupine>
dear me
<lectrick>
i exist, i don't exist, so what either way?
<lastWhisper_>
I am trying to understand what happens when I do GC.enable and then GC.start
<lastWhisper_>
should I be seeing a memory decrease if I run GC(after the fact) ?
nari has quit [Ping timeout: 246 seconds]
<lupine>
rather than being the object of one meaning-giver, you can be the object of many
<bilbo_swaggins>
nihilism isn't a matter of existence but purpose, I thought
<workmad3>
lectrick: so the world doesn't exist... what exactly is it that doesn't exist?
<lectrick>
lupine: let's table it for now, i did enjoy discussing that tho :)
JPascal has quit [Remote host closed the connection]
albertgrala_ has joined #ruby
bluenemo has quit [Remote host closed the connection]
<lupine>
this initial rejection of yours is really based on a complete misunderstanding of the implications
<lectrick>
lastWhisper_: not if you have a memory leak :O
<workmad3>
lectrick: after all, there's something that you're interacting with... claiming that it doesn't exist doesn't stop your (non-existent) self from interacting with the (non-existent) thing... so what is it?
<workmad3>
lectrick: so arguing that nothing exists doesn't make the questions go away ;)
<bilbo_swaggins>
lastWhisper_: do you have GC off already?
ambushsabre has quit [Quit: rip]
apeiros_ has quit [Ping timeout: 264 seconds]
<lastWhisper_>
lectrick: Is there a way to debug whether or not I have a leak? Besides watching my ruby process blow upwards of 2.5GB
<lectrick>
workmad3: hmmm.
<workmad3>
lectrick: it just adds an extra question - why do I think it doesn't exist? :)
<lastWhisper_>
bilbo_swaggins: Is GC enabled/disabled by default when you start a new process?
<bilbo_swaggins>
enabled
zigomir has quit [Read error: Connection reset by peer]
<lastWhisper_>
Or do you need to specify what it should be
<lastWhisper_>
ok
thejoecarroll has quit [Ping timeout: 272 seconds]
<lupine>
check what you've got lots of in ObjectSpace? ;)
rootshift has quit [Quit: rootshift]
<lastWhisper_>
If GC is enabled, and I do GC.enable
<lastWhisper_>
will that turn it to false?
<lupine>
there used to be a really cool gem for debugging memory leaks, but I've forgotten what it's called
<lectrick>
lastWhisper_: you can periodically inspect the memory using ObjectSpace.each_object I guess
<lupine>
it'd show you how many of what were around over time, and where they were being created
<bilbo_swaggins>
GC is enabled && GC.enable => true
<bilbo_swaggins>
returns true and does nothing
<lectrick>
lastWhisper_: and count the number of objects per class and see which class is leaking
ndrei has quit [Ping timeout: 272 seconds]
<bilbo_swaggins>
I'm just reading the Ruby Docs
albertgrala has quit [Ping timeout: 272 seconds]
<bilbo_swaggins>
does pry let you step through execution?
<bilbo_swaggins>
or any other gem?
ndrei has joined #ruby
<einarj>
bilbo_swaggins: You should be able to do that with pry, or other gems such as 'debugger'
<workmad3>
bilbo_swaggins: ok, so a computation, by my viewpoint of it meaning turing-computable, is a process where the outcome is completely and unambiguously decidable when given the current state of a system and deterministic rules for evolving that system
<lastWhisper_>
I usually use pry so that would be the most familiar for me
thejoecarroll has joined #ruby
<workmad3>
bilbo_swaggins: oh, sorry, a *finite* process
<bilbo_swaggins>
thanks einarj
<bilbo_swaggins>
I will play with both
<lupine>
workmad3, turing machines need infinite time
<workmad3>
lupine: only if it's an uncomputable problem
<workmad3>
lupine: e.g. the exact value of pi, the halting problem
<bilbo_swaggins>
workmad3: you're not accounting for the halting problem
rankine has joined #ruby
rdark has quit [Quit: leaving]
<workmad3>
bilbo_swaggins: the halting problem is uncomputable
<bilbo_swaggins>
its computation never resolves
<MrZYX>
bilbo_swaggins: also check byebug, pry-byebug, pry-debugger and pry-stack_explorer
ewnd9 has quit [Read error: Operation timed out]
<workmad3>
bilbo_swaggins: exactly, which is why it's uncomputable
yoshie902a has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<bilbo_swaggins>
another case of a word having different aspects
<lastWhisper_>
I actually have a quick meeting I'll be back to continue this convo though
kevind_ has joined #ruby
<lastWhisper_>
thx for the help so far
<bilbo_swaggins>
uncomputable in the sense that it never finishes
coderhs has joined #ruby
vlad_starkov has joined #ruby
<bilbo_swaggins>
but it's a definite process
<workmad3>
bilbo_swaggins: yes, but it's not a finite process
<bilbo_swaggins>
thanks MrZYX
dweeb_ has quit [Quit: Computer has gone to sleep.]
stryek has quit [Remote host closed the connection]
<bilbo_swaggins>
workmad3: we don't know whether the Universe is finite or infinite
<workmad3>
bilbo_swaggins: indeed we don't ;)
Spami has joined #ruby
<bilbo_swaggins>
GoToMeeting time :(
<workmad3>
bilbo_swaggins: but part of the standard definition of computable is that you can get the result out in a finite (if length) period of time ;)
<workmad3>
*lengthy
<lupine>
our best guess is finitely old, infinitely big
cbetta is now known as cbetta_afk
vlad_starkov has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
<yoshie902a>
I'm trying to think of a good name for a module that focuses on imports and exports. Any ideas?
<workmad3>
yoshie902a: IO? :P
colli5ion has joined #ruby
<workmad3>
yoshie902a: sorry, being trite there... what are you importing and exporting?
guardianx has quit [Remote host closed the connection]
maroloccio has quit [Quit: WeeChat 0.4.2]
<yoshie902a>
workmad3: np, to be far it's not complicated question, but I'm trying to improve my naming conventions. I'm importing and exporting CSV and XLSX files that contain stock position and stock trade data
gilcosson has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
<bilbo_swaggins>
what's new yoshie902a
<yoshie902a>
bilbo_swaggins: hi, how you doing?
nettoweb has joined #ruby
gilcosson has joined #ruby
cbetta_afk is now known as cbetta
<nettoweb>
guys, I'm trying to upgrade to ruby 2.0 but getting this error message: Could not find test-unit-2.5.5 in any of the sources
axl_ has joined #ruby
<workmad3>
yoshie902a: ok, so I'd probably start with deciding if I want to have something like a Stocks::IO module with Stocks::IO::CSV::PositionExport/Import, Stocks::Positions::IO::CSV, etc...
<workmad3>
yoshie902a: which I'd probably base on the current design
tylersmi_ has quit [Remote host closed the connection]
zipper has quit [Quit: leaving]
<yoshie902a>
workmad3: I did not realize you can you "/" in module names.
nihed has quit [Read error: Connection reset by peer]
<workmad3>
yoshie902a: e.g. if I'm already grouping things under something like Stocks::Positions::<Stuff to do with the positions> and Stocks::Trades::<stuff to do with trades>
<workmad3>
yoshie902a: then I'd build off that
<workmad3>
yoshie902a: sure, you can nest modules :)
<workmad3>
yoshie902a: oh sorry, no the / was in the vein of 'PositionExport or PositionImport'
<bilbo_swaggins>
nettoweb: with RVM, from source or Rubyinstaller?
Vivekananda has joined #ruby
<yoshie902a>
workmad3: got it. that makes sense
IceDragon has quit [Ping timeout: 252 seconds]
<nettoweb>
bilbo_swaggins: source
mklappstuhl has joined #ruby
<yoshie902a>
I like the IO, clean and to the point. I'm always worries that I'm going to over write an existing class or module in ruby. Is there a way to check in the docs?
<workmad3>
yoshie902a: keep your stuff in a namespace
<workmad3>
yoshie902a: which is why I was suggest Stocks::IO
<workmad3>
yoshie902a: on the idea you have a top-level namespace 'Stocks' ;)
<workmad3>
*suggesting
<workmad3>
yoshie902a: it also means that yes, you're not overwriting the top-level IO module
<yoshie902a>
workmad3: that makes sense, that way it does not get mixed up.
zcreative has joined #ruby
benzrf has quit [Read error: Connection reset by peer]
<workmad3>
yoshie902a: and you're also not claiming that you've written a module for general IO, just an IO module for your stocks ;)
tharindu has joined #ruby
<yoshie902a>
workmad3: however, doesn't that also lead to longer reference to these modeules?
<yoshie902a>
stocks::IO:import vs IO:import
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<workmad3>
yoshie902a: well, inside the Stocks module, you can reference your IO module as IO
<workmad3>
yoshie902a: and the top-level IO module as ::IO
<workmad3>
yoshie902a: and outside the stocks module, you use Stocks::IO
<yoshie902a>
workmad3: so it will work inside out, trying the lowest level first and working up
<workmad3>
yoshie902a: I tend to use the word 'innermost' rather than 'lowest' which to many people would mean the bottom (and most general) namespace
<workmad3>
yoshie902a: but yeah
acrussell has quit [Quit: Leaving.]
dangerousdave has joined #ruby
noname001__ has quit [Ping timeout: 252 seconds]
<yoshie902a>
workmad3: that makes sense, to improve my communication, when people use lowest, they mean top level, like the IO module?
<workmad3>
yoshie902a: that's what I immediately interpretted it as, yes
wallerdev has quit [Quit: wallerdev]
<ferr>
enumerator = [3, 7, 14].each why do they use .each in this assignment?
<yoshie902a>
workmad3: and highest is the innermost or most details stocks:IO:imports
`petey` has quit [Remote host closed the connection]
<workmad3>
yoshie902a: again, that's what I would have interpretted it as :)
yfeldblum has joined #ruby
<yoshie902a>
confusing, lowest is the top and highest most mean the bottom.
<lupine>
I would avoid any re-use of stdlib names
<workmad3>
yoshie902a: but I do tend to use innermost and outermost rather than highest and lowest
<lupine>
even namespaced
`petey` has joined #ruby
<lupine>
::Highline::String causes me so many problems
Bumptious has quit [Remote host closed the connection]
<MrZYX>
ferr: to get hold of an Enumerator
zipper has joined #ruby
tharindu has quit [Ping timeout: 265 seconds]
Bumptious has joined #ruby
<yoshie902a>
lupine: do you recommend not using standard library name? If it's name spaced, does it just cause reference problems?
tharindu has joined #ruby
benzrf has joined #ruby
<yoshie902a>
for example you think your using the outer most IO module, but you are really using the innermost
<benzrf>
frig
<workmad3>
yoshie902a: yeah, that can happen and cause annoyance... especially for a maintainer
shime has joined #ruby
<lupine>
at best, it'll confuse you a few years down the line
<lupine>
at worst, it will cause perennial problems
<workmad3>
yoshie902a: even more especially, as I now think of it, in a situation like yours where you're quick likely to use the stdlib module(s) in your implementation
bilbo_swaggins has quit [Quit: Leaving]
<workmad3>
yoshie902a: as I'm sure you're going to want to use the stdlib CSV module in your own CSV stuff ;)
Solnse has joined #ruby
pranny has quit [Quit: Leaving.]
`petey` has quit [Ping timeout: 252 seconds]
<workmad3>
yoshie902a: so yeah, that's something else you'd want to keep in mind when naming... how likely it is you're going to have clashes and annoy the hell out of future maintainers (including you 6 months down the line)
lkba has quit [Read error: Connection reset by peer]
<lupine>
I've gone right off of deep namespacing in general, actually
`petey` has joined #ruby
Bumptious has quit [Ping timeout: 245 seconds]
mityaz has joined #ruby
<yoshie902a>
lupine: workmad3: I agree with both, I will try to avoid the std lib names, but so many are so good for naming things
Advocation has joined #ruby
<lupine>
I had a project called rack organiser on rails 2.1 at one point
<lupine>
the upgrade to 2.3 was fun
<yoshie902a>
I guess I could add a prefix, like Stock_IO
<workmad3>
yoshie902a: or maybe you don't need a general IO module and can go with Stock::Importers and Stock::Exporters as your grouping elements
<benzrf>
yoshie902a: smurf
<yoshie902a>
benzrf: smurf?
IceDragon has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<workmad3>
yoshie902a: or maybe your project would be more sensible with Stock::Positions::CSVImporter; Stock::Positions::XMLImporter, etc
<workmad3>
(and maybe a module Stock::Positions::Importer that you include into other importers to get some useful shared behaviour)
introom has joined #ruby
<introom>
hi.
<workmad3>
yoshie902a: there's plenty of ways to structure this sort of thing :)
<introom>
I am on homebrew. just did a update to ruby. and now I found when I run gem, the previous gems cannot be executed.
ambushsabre has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
<yoshie902a>
workmad3: I was thinking of using the same code for importing, transactions and positions, its pretty general. However, that goes bring up a mother questions.
<mikecmpbll>
we just have a general XMLProcessor class and then specific implementation for different clients which inherit from it
<yoshie902a>
mother=another
<ferr>
does anyone know a source where enumerators are explained simply for newbies?
<introom>
I have two folders in side usr/local/lib/ruby/gems. one is 2.0.0 and 2.1.0
<introom>
those in 2.0.0 cannot be invoked from command line now.
<workmad3>
introom: that's probably because your ruby version is now 2.1.0, right?
<yoshie902a>
if I have methods that I want to use in two classes/modules, can I do that using, Class myclass1, myclass2
<workmad3>
introom: right... so that's completely normal behaviour
larissa has joined #ruby
<yoshie902a>
workmad3: is there a way to complish sharing methods?
<introom>
workmad3: then what can I do to use the previous gems?
<workmad3>
introom: re-install them in the new ruby
<mikecmpbll>
lmao
<introom>
ok. thanks.
sambao21 has joined #ruby
<workmad3>
yoshie902a: yes, put the shared methods in a module and include them into both classes
<introom>
can I get the packages list out, like pip freeze, and then do a bunch insall ?
<introom>
workmad3: ^
<benzrf>
introom: in ruby we use Gemfiles
<benzrf>
introom: venvs r superior though
<yoshie902a>
workmad3: that's smart
phansch has quit [Quit: Leaving]
<introom>
benzrf: would you be specific? how to export a gemfile?
<benzrf>
introom: you write the gemfile yourself
<yoshie902a>
workmad3: Thanks so much for the great advice!
<benzrf>
then you install the packages in it with bundle install
<introom>
benzrf: got it. thanks.
bennyboobooboo has quit [Remote host closed the connection]
toastynerd has joined #ruby
nvrch has quit [Quit: nvrch]
* introom
wonders how to stop homebrew updating new ruby... quite troublesome.
<benzrf>
introom: a Gemfile is like a requirements.txt
<makkura>
Is there any way to control the search order when using the Find.find? I'm using it to recursively look through folders and it ends up looking at the older content first [I assume due to alphabetical sorting] while it'd be faster to compare against newer content
<workmad3>
yoshie902a: np... also, any advice I ever give comes with the provisio that if you go to your project and realise it's all useless in your context then you are to ignore it and do something sensible instead ;)
nfk has joined #ruby
bennyboobooboo has joined #ruby
w4pm has joined #ruby
intuxicated has joined #ruby
Wolland has joined #ruby
dEPy has joined #ruby
<yoshie902a>
workmad3: of course. I like the idea of thinking for yourself, but it also helps to hear from people that are experienced and have a much better understanding.
megus has quit [Ping timeout: 252 seconds]
user258467 has quit [Read error: Connection reset by peer]
KneferilisHome has joined #ruby
rezzack has joined #ruby
<KneferilisHome>
hello, in ruby that lacks abstract classes and interfaces, how do they implement abstraction and polymorphism? They pass concrete parent classses instead of abstract classses or interfaces to methods?
Megtastique has quit []
dweeb_ has joined #ruby
<workmad3>
KneferilisHome: duck typing
<MrZYX>
KneferilisHome: we just assume that a passed object implements the right API, search for duck typing
<workmad3>
KneferilisHome: and a tendency to shallow inheritance hierarchies
introom has left #ruby ["WeeChat 0.4.2"]
mikecmpbll has quit [Ping timeout: 246 seconds]
jprovazn has quit [Quit: Odcházím]
yoshie902a has left #ruby [#ruby]
<KneferilisHome>
workmad3: oh you mean, like in public function test($IamPolymorhic)?
<workmad3>
KneferilisHome: no
lkba has joined #ruby
gilcosson has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
bennyboobooboo has quit [Ping timeout: 252 seconds]
aasirc has joined #ruby
browndawg has quit [Quit: Leaving.]
<workmad3>
KneferilisHome: I mean like MrZYX said - if you get passed an object, you assume it has the correct methods and try to call them. If it doesn't you'll get NoMethod errors
mansi has joined #ruby
gilcosson has joined #ruby
w4pm has quit [Ping timeout: 245 seconds]
<KneferilisHome>
workmad3: what do mean by tendency to shallow inheritance hierarchies?
<shevy>
KneferilisHome you can do everything in ruby whenever you want to, using method_missing() send() the various *eval() ways and define_method()
<workmad3>
KneferilisHome: and for abstract classes, we also have module mixins for sharing that kind of behaviour... e.g. the Comparable module which you can mixin to a class, implement your own <=> operator and get the rest of the comparison implementations from the module
<workmad3>
KneferilisHome: I mean that rather than building up deep hierarchies of abstract classes, in ruby there's a tendency to have not much inheritance at all
rankine has quit [Ping timeout: 264 seconds]
dkamioka has quit [Remote host closed the connection]
<KneferilisHome>
workmad3: relying only on composition then?
<workmad3>
KneferilisHome: composition, mixins and duck-typed interfaces, yes
mansi has quit [Read error: Connection reset by peer]
RaCx has joined #ruby
<workmad3>
KneferilisHome: maybe with the odd bit of inheritance as a last resort
mansi has joined #ruby
<KneferilisHome>
ok
dagobah has quit [Remote host closed the connection]
rippa has joined #ruby
mudmaste_ has joined #ruby
<workmad3>
KneferilisHome: there's also the 'leap before you look' principle whereby you don't check for types or an interface first, you instead just try to use it
dkamioka_ has joined #ruby
<workmad3>
KneferilisHome: and potentially catch the NoMethod error from such a call to turn it into an ArgumentError to inform someone that they called your method incorrectly ;)
urbanmonk has joined #ruby
<MrZYX>
hm, I think I rather do a respond_to? if I want to throw an ArgumentError in such a case
juarlex has quit [Remote host closed the connection]
bennyboobooboo has joined #ruby
whomp has quit [Quit: leaving]
<terrellt>
Duck-typed interfaces ftw.
mudmaster has quit [Ping timeout: 264 seconds]
MrThePlague has joined #ruby
senayar_ has joined #ruby
<workmad3>
MrZYX: that's an option too... I've encountered some people who don't like doing that because it imposes a check on everyone rather than just the people that do it incorrectly
vlad_starkov has joined #ruby
<workmad3>
MrZYX: but I've also seen people argue that they'd rather do a respond_to? instead of two walks of the method lookup chain ;)
timonv has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
vlad_starkov has quit [Read error: Connection reset by peer]
<workmad3>
MrZYX: end of the day - whichever one you (or your team) finds clearest :)
<MrZYX>
it's probably just me finding methods preconditions on the end weird
vlad_starkov has joined #ruby
lorelei_ has joined #ruby
<MrZYX>
or input validation or what you want to call it
dankest has joined #ruby
hoelzro has joined #ruby
makerop has joined #ruby
w1xz has joined #ruby
<workmad3>
yeah. I have to admit, I don't normally both with either... I tend to feel that someone calling a method knows roughly what goes into it
aganov has quit [Remote host closed the connection]
<workmad3>
and also that if they're doing exploratory stuff in IRB, they have the know-how to interpret a NoMethod error as 'my object doesn't fit their duck'
_maes_ has quit [Ping timeout: 245 seconds]
<makerop>
im messing around with the remote-syslogger gem
zipper has quit [Quit: Lost terminal]
<MrZYX>
sure, I only consider it for stuff like public gem APIs anyway
lethjakman has quit [Ping timeout: 246 seconds]
<MrZYX>
if at all
<workmad3>
although I do now *really* want to crack open my projects and redefine Object#method_missing to throw an IncorrectDuck error istead of a NoMethod error
senayar has quit [Ping timeout: 264 seconds]
<MrZYX>
if it costs me more than one check I'd probably already won't do it
<workmad3>
with a default message of 'maybe you need to punch it some more?'
lorelei_ has quit [Changing host]
lorelei_ has joined #ruby
marcgg_ has joined #ruby
momomomomo has joined #ruby
mehlah has quit [Quit: Leaving...]
troyready has joined #ruby
Voodoofish430 has joined #ruby
<KneferilisHome>
thanks for the information
marcgg has quit [Ping timeout: 252 seconds]
KneferilisHome has quit [Quit: Page closed]
megus has joined #ruby
zigomir has quit [Remote host closed the connection]
<workmad3>
lectrick: although the phrase "I'm interested in interesting stuff" is more so :)
wingdspur has joined #ruby
<shevy>
I am bored
<shevy>
ddd say something funny
<workmad3>
I think he's afk atm
pehlert has quit [Ping timeout: 252 seconds]
Cephalostrum has quit [Quit: Aim higher. Try this: why am I here? Why do I exist, and what is my purpose in this universe? (Answers: 'Cause you are. 'Cause you do. 'Cause I got a shotgun, and you ain't got one.)]
canton7-mac has quit [Remote host closed the connection]
<workmad3>
lectrick: Cephalostrum's quit message is also in-line with our previous discussion ;)
Megtastique has joined #ruby
momomomomo has quit [Quit: momomomomo]
rmroulette has joined #ruby
agent_white has joined #ruby
timonv has joined #ruby
Neomex has joined #ruby
<shevy>
I dont see join and quite events, what was his quit message :(
SCommette has joined #ruby
vlad_sta_ has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
LostMonk has quit [Read error: Connection reset by peer]
danman has joined #ruby
agent_white has quit [Client Quit]
avril14th has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
<DouweM>
" Aim higher. Try this: why am I here? Why do I exist, and what is my purpose in this universe? (Answers: 'Cause you are. 'Cause you do. 'Cause I got a shotgun, and you ain't got one.)"
mrnugget has joined #ruby
fijimunkii has quit [Ping timeout: 272 seconds]
_maes_ has joined #ruby
Hanmac has joined #ruby
mikecmpbll has joined #ruby
camilasan has quit []
vlad_sta_ has quit [Ping timeout: 252 seconds]
Hanmac1 has quit [Ping timeout: 264 seconds]
<shevy>
hmm
<shevy>
too much philosophy
<shevy>
I need more beer
dfranciosi has quit [Remote host closed the connection]
bennyboobooboo has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
dkamioka_ has quit [Remote host closed the connection]
pu22l3r has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
dkamioka has joined #ruby
mansi has quit [Remote host closed the connection]
tharindu has quit [Quit: Leaving...]
pel_daniel has quit [Ping timeout: 246 seconds]
mansi has joined #ruby
saarinen has joined #ruby
ace_striker has joined #ruby
carraroj has quit [Ping timeout: 260 seconds]
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
colli5ion has quit []
RaCx has joined #ruby
lyanchih has quit [Quit: lyanchih]
dweeb_ has quit [Quit: Computer has gone to sleep.]
Guest63670 has quit [Quit: Lost terminal]
thumpba has joined #ruby
heftig has quit [Ping timeout: 264 seconds]
bigkevmcd has quit [Quit: have a fun weekend folks]
sassamo has joined #ruby
dkamioka has quit [Ping timeout: 252 seconds]
mansi has quit [Ping timeout: 260 seconds]
bigoldrock has left #ruby [#ruby]
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Advocation has quit [Quit: Advocation]
echevemaster has joined #ruby
`petey` has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
`petey` has joined #ruby
subbyyy__ has joined #ruby
atmosx has joined #ruby
cbetta is now known as cbetta_afk
juarlex has joined #ruby
zigomir has quit [Quit: Leaving]
juarlex has quit [Remote host closed the connection]
juarlex has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cbetta_afk is now known as cbetta
Bira has joined #ruby
<shevy>
Hanmac1, nope never played pokemon games. I dont even know what that is
`petey` has quit [Ping timeout: 260 seconds]
<lastWhisper_>
Alright I'm back.... So I'm running cucumber/rails and I want to defer GC to do it every 5-10 scenarios or so. Since it's enabled by default, should I disable it in a before hook, and then in the after one, if the scenario counter is above 9, then enable it and GC.start ? Would that work?
`petey` has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<MrZYX>
I think it would
KensoDev has joined #ruby
burlyscudd has joined #ruby
p8952 has joined #ruby
capicue has joined #ruby
notbrent has left #ruby [#ruby]
timonv has quit [Remote host closed the connection]
DFieldFL has joined #ruby
tt1187 has quit [Ping timeout: 272 seconds]
cj3kim has joined #ruby
klaut has quit [Remote host closed the connection]
Neomex has quit [Quit: Neomex]
atmosx has quit [Quit: computer went to sleep...]
plotter has joined #ruby
zcreative has quit [Quit: Computer has gone to sleep.]
atmosx has joined #ruby
ahmedelgabri has joined #ruby
wildroman2 has joined #ruby
red_menace has joined #ruby
ehc has quit [Quit: ehc]
Advocation has joined #ruby
urbanmonk has quit [Quit: urbanmonk]
red_menace has left #ruby [#ruby]
figgleberry has quit [Read error: Operation timed out]
senayar_ has quit [Remote host closed the connection]
<lastWhisper_>
thx MrZYX
<lastWhisper_>
I'll let you know how it goes :D
MindfulMonk has quit [Ping timeout: 260 seconds]
senayar has joined #ruby
`petey` has quit [Remote host closed the connection]
<gr33n7007h>
it comes back as "\xD9\x85\xD8\xB1\xD8\xAD\xD8\xA8\xD8\xA7\" in the response
<ferr>
I've read Learn to program by Chris Pine, then I switched to pickaxe but it's still too hard for me, any suggestions?
<lastWhisper_>
shevy: Is it possible to change them locally just for a test environment?
<agent_white>
ferr: rubymonk.com :)
camilasan has joined #ruby
<pontiki>
ferr: do Learn to Program again
heftig has joined #ruby
stkowski has quit [Client Quit]
ehc has joined #ruby
stkowski has joined #ruby
<shevy>
ferr hmm that's a bit difficult. I think you should try to write some simple ruby code that does something like create a file, fill it, close the file, remove the file, change directory, in ruby. then show the code, and turn it into a class, then add more convenient ways to use that class
<shevy>
lastWhisper_ actually I have not seen these constants
<shevy>
RUBY_HEAP_MIN_SLOTS=600000
<shevy>
RUBY_GC_MALLOC_LIMIT=59000000
jcrocetta has joined #ruby
<pontiki>
lastWhisper_: I do not know this for sure, as it might be something that happens before ruby gets started up, but you could set things based off RAILS_ENV in your test helper?
<pontiki>
s/you could/could you/
<lastWhisper_>
Hmm perhaps.
jbzt has quit [Quit: jbzt]
<pontiki>
i wouldn't even begin to know how to see if they would take effect, though
<shevy>
lastWhisper_ do you know where these constants get set?
<ferr>
I do all of that but I miss some kind of clarification
poulson has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
hiall has quit [Ping timeout: 272 seconds]
<shevy>
ferr clarification in what regard?
<pontiki>
ferr, you just did all of Learn to Program again?
<ferr>
Maybe there is something like Learn to program but just covers more topics?
<pontiki>
that is too fast
subbyyy has quit [Quit: none 0.3.9.2]
<ferr>
pontiki no
<lastWhisper_>
shevy: I do not, that's kind of the root of my initial question
raja has joined #ruby
<shevy>
ferr hmm not in that style, I think. it's a bit old by now too, one day we'll make an updated and expanded version of that tutorial
<lastWhisper_>
Currently I've got a bunch of debugging things set up in my test environment to "watch" GC run, and see the differences in regards to what's happening with all the GC.stat output
<pontiki>
ferr: try learnrubythehardway.com
<pontiki>
you are well beyond my experience in that, lastWhisper_
<lastWhisper_>
Alright :(
<shevy>
ferr the best you can do, in my opinion, is to try and write as much code as possible and improve it. that way you are kinda forced to research how ruby functions, you'll have to know the methods on class String and Array eventually, then you can find out what Enumerable and enumerators are etc...
<shevy>
lastWhisper_ well at least I found where they are
<shevy>
and I loved << instantly. in my mind it meant "append this"
<agent_white>
ferr: That just comes down to cruising Google and tinkering with irb. I'm actually learnin about enum's myself as well :)
<lastWhisper_>
this is actually a decent resource
cj3kim has joined #ruby
<shevy>
ah good point
<shevy>
ferr, do you use IRB already?
<ferr>
ofc
<ferr>
I test every code I see
<ferr>
and make notes
<pontiki>
(switch to pry!)
jlast_ has quit [Read error: Connection reset by peer]
pothibo has joined #ruby
timonv has joined #ruby
<shevy>
well if you still don't know what to write next, try to answer questions other people have here on #ruby, eventually you'll be able to answer them, just like benzrf does now :)
<shevy>
benzrf is an ex-haskell ex-python guy ;) ;P
FnX has joined #ruby
<pontiki>
ferr, what is the actual confusing between enumerators and an enumerable?
jlast_ has joined #ruby
megus has quit [Ping timeout: 245 seconds]
<shevy>
I wouldn't be able to answer that without looking at notes
<shevy>
it specifically writes mixin here, not module :)
Brolen has quit [Quit: Brolen]
ndrei has quit [Read error: Operation timed out]
<shevy>
ferr ruby uses some tricks here and there
tharindu has joined #ruby
postmodern has joined #ruby
<shevy>
ferr for instance, have you tried to sort with ruby before?
<ferr>
yes
<shevy>
ok then you know things like %w( abc ghi def ).sort # => ["abc", "def", "ghi"]
<shevy>
and sort_by
<pontiki>
agent_white: i would say yes, in that it is asking the fundamental question about whether a class is implementing a collection
<shevy>
and you can define a method in your class to become sortable too
<shevy>
I forgot what it was
jlast has quit [Ping timeout: 252 seconds]
<pontiki>
Comparable
<pontiki>
<=>
<agent_white>
pontiki: Roger that :)
<shevy>
hmm
noop has quit [Ping timeout: 248 seconds]
<shevy>
oh yes
<shevy>
def <=>(per)
<shevy>
ferr that is also a valid ruby method
FnX has quit []
wildroman3 has joined #ruby
<shevy>
ferr have you written a class before?
<ferr>
yes
<shevy>
ok good
<shevy>
your first puzzle!
larissa has quit [Quit: Leaving]
wingdspur has quit [Quit: Leaving]
<shevy>
ferr, how would you enable an object in ruby to respond to something like: your_object["foo"] = 5
<shevy>
where your_object is the instance of your class
<shevy>
like your_object = Ferr.new
Cephalostrum has quit [Read error: Connection reset by peer]
<ferr>
enable to respond
<ferr>
it's like false true or nil?
<shevy>
that you can use the [] notation there
<shevy>
normally you can not use []
wildroman2 has quit [Ping timeout: 245 seconds]
<shevy>
you can try it: class Foo; end; foo = Foo.new; foo[3] # this will fail
lukec has joined #ruby
<shevy>
NoMethodError: undefined method `[]' for #<Foo:0xb228c00>
<pontiki>
agent_white: along the lines of "Do the simplest thing that works" returning an enum makes more sense than coupling your class with Enumerable
tharindu has quit [Ping timeout: 265 seconds]
<shevy>
ferr, you can define a method called [] in your class
<shevy>
ferr, if it is to accept arguments, the syntax is a bit funky, for instance:
<shevy>
class Ferr; def [](i); puts i * 2; end;end;foo = Ferr.new; foo[3] # 6
<shevy>
rubyforge.org - "RubyForge will be shutting down on May 15 2014."
<shevy>
the ruby world is coming to an end
<benzrf>
theres a running gag in another channel i go on
<benzrf>
i linked to c2 wiki once
<shevy>
#crossdressers?
<shevy>
c2 wiki is like the first wiki with only black white right?
<benzrf>
and somebody glommed onto 'wiki is a fun way to communicate asyncronously across the network'
<benzrf>
shevy: yeah
<shevy>
and blue for hyperlinks
pel_daniel has joined #ruby
<benzrf>
and they put that as a description in my bot's factoids for like
<benzrf>
letters, email, twitter, irc
<benzrf>
:v
tharindu has quit [Ping timeout: 246 seconds]
<benzrf>
oh wow raa was started when i was born
<benzrf>
*that year
<benzrf>
it was as old as me o.o
<shevy>
:(
ffranz has joined #ruby
timonv has joined #ruby
momomomomo has quit [Quit: momomomomo]
pehlert has quit [Ping timeout: 248 seconds]
vlad_sta_ has joined #ruby
<shevy>
everything is coming to an end
raja has joined #ruby
<atmosx>
shevy: like... what?
m8 has joined #ruby
<shevy>
atmosx ruby sites!
<shevy>
guys, anyone of you thinks this is sexy?
<shevy>
@FOO = 'abc'
vlad_starkov has quit [Ping timeout: 246 seconds]
codepython777 has joined #ruby
<atmosx>
I don't
<dachi_>
so, what's next?
sailias has quit [Ping timeout: 252 seconds]
e62 has joined #ruby
Liquid-- has joined #ruby
<shevy>
atmosx hehe
<atmosx>
I think Jennifer Lawrence is sexy
<benzrf>
shevy: why would that be sexy
<agent_white>
and Halle Berry. Just how I like my coffee: with a lil bit of cream and sugar.
rbenv has joined #ruby
toydestroyer has joined #ruby
<waxjar>
is there a way to tell nokogiri to stop SAX parsing when you find what you're interested in?
sailias has joined #ruby
<atmosx>
agent_white: Halle Berry is an old lady... if you wanna go there, you can go directly to French and Italian (Bellucci and Marceaeu to name just two) and get on with life :-P
<shevy>
benzrf easier to read
<atmosx>
bellucci is easier to read
ffranz has quit [Ping timeout: 272 seconds]
<shevy>
BELLUCCI is easier to read
<agent_white>
atmosx: I'll take all three ;)
nhmood has quit [Quit: Connection closed for inactivity]
<shevy>
you can't handle three
fijimunkii has joined #ruby
<atmosx>
agent_white: me too (if I could) :-P
<atmosx>
I would be happy with just one... Alessandra Ambrosio. She's not that ritch and famous (I think so)
<atmosx>
err rich
benzrf has quit [Quit: ~_~]
<atmosx>
I can downvote on HN, I think I'll downvote them all now!!!!
* atmosx
kidding
nanoyak has quit [Quit: Computer has gone to sleep.]
Targen_ has joined #ruby
Targen has quit [Ping timeout: 252 seconds]
timonv has quit [Remote host closed the connection]
gregoriokusowski has quit [Read error: Connection reset by peer]
jonnyro has joined #ruby
ahmedelgabri has quit []
<jonnyro>
I'm working on a longish script. Apparently I have a mismatched end block. How can I figure out where it begins?
<agent_white>
jonnyro: Does your text editor/ide have a syntax checker?
<jonnyro>
agent_white: no. I am however open to using another editor
mikecmpbll has quit [Quit: Computer has gone to sleep.]
nynex2 has joined #ruby
momomomomo has joined #ruby
jayferd has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<jayferd>
hi everyone, i'm trying to write a correct syntax highlighter for ruby
toydestroyer has left #ruby [#ruby]
<jayferd>
and i'm getting tripped up by the % strings combined with modulo operators
mlpinit_ has joined #ruby
<jayferd>
`%=foo=` is a perfectly valid string
<jayferd>
and also `foo %= bar` is assignment
<jayferd>
with the modulo operator
<agent_white>
jonnyro: Well that would be using a hammer to crack an egg... but definitely a good idea to snag a plugin for that in the future.
mlpinit has quit [Read error: Operation timed out]
e62 has quit [Ping timeout: 265 seconds]
<agent_white>
jonnyro: Otherwise, I'm not sure. Personally I have 'indentation markers' along with syntax checking which helps. What ide/text editor do you use?
dfranciosi has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<jonnyro>
agent_white: vim
<jonnyro>
7.4
<agent_white>
jonnyro: Synctastic :)
jerius has joined #ruby
Targen has joined #ruby
vmachine has quit [Ping timeout: 272 seconds]
<agent_white>
jonnyro: That's what I use, well well worth it. It's a Bundle-compliant plugin as well
maletor has quit [Quit: Computer has gone to sleep.]
Targen_ has quit [Ping timeout: 265 seconds]
makerop has quit [Remote host closed the connection]
<jonnyro>
agent_white: do you have a link to the setup instructions, there seem to be a few references to synctastic in google
<jonnyro>
I dont have a lot of pre-existing behavior to preserve in my vim environment, so i'm fine with wiping everything out if need be
<jonnyro>
I have pathogen, following instructions on vim.org page linked above
tyl has joined #ruby
ffranz has joined #ruby
<agent_white>
jonnyro: Rad, you gotter! :)
noop has quit [Ping timeout: 265 seconds]
glundgren has joined #ruby
glundgren is now known as guilund
ikawnoclast has left #ruby ["PART #freebsd-src :PART #freebsd :PART #ubuntu :PART ##security :PONG :holmes.freenode.net"]
centrx has joined #ruby
asteros has joined #ruby
JohnBat26 has quit [Read error: Operation timed out]
<jonnyro>
agent_white: once its installed, how do you use it?
wildroman3 has quit [Remote host closed the connection]
sambao21 has joined #ruby
wildroman2 has joined #ruby
<sweeper>
hey so I'm trying to hax a library...there are several classes where I would like to perform an action if a specific method in those classes is called, how would I do that?
phantasm66 has joined #ruby
phantasm66 has joined #ruby
rootshift has joined #ruby
momomomomo has joined #ruby
dkamioka has quit [Remote host closed the connection]
apeiros has joined #ruby
<agent_white>
jonnyro: Just reload vim and you should be set! Afterwords try :Helptags to see if it did
w_alexus has quit [Ping timeout: 272 seconds]
dkamioka has joined #ruby
<jonnyro>
agent_white: :Helptags appears to do nothing
rootshift has quit [Client Quit]
<centrx>
sweeper, Sounds like you want alias_method_chain, or possibly Observers
freezey has quit [Remote host closed the connection]
<RubyPanther>
sweeper: you alias chain it, put the old one in foo_without_bar and then the new one is foo_with_bar which calls the old one, and then alias the original name to the new method
gregoriokusowski has quit [Quit: gregoriokusowski]
jerius has quit [Ping timeout: 272 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<agent_white>
jonnyro: Actually... it may be loaded!
ambushsabre has joined #ruby
rezzack has joined #ruby
wildroman2 has quit [Ping timeout: 260 seconds]
ffranz has quit [Ping timeout: 272 seconds]
<sweeper>
mkay, thanks
cj3kim has quit [Ping timeout: 272 seconds]
Kricir has quit [Remote host closed the connection]
<jonnyro>
agent_white: I just ran :help syntastic-checker-options and recieved output
Guest21835 has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
<jonnyro>
Sawbones: i learned more in one afternoon than in a previous week reading ruby books
<jonnyro>
Sawbones: the koans are awesome
robbyoconnor has quit [Ping timeout: 246 seconds]
dankest has joined #ruby
mlpinit_ has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
wildroman2 has joined #ruby
superscott[8] has joined #ruby
deception has joined #ruby
<Sawbones>
Looking into it
jwest has quit [Quit: WeeChat 0.4.1]
burlyscudd has joined #ruby
momomomomo has quit [Quit: momomomomo]
juarlex has quit [Remote host closed the connection]
tropicalmug has joined #ruby
ffranz has joined #ruby
freezey has joined #ruby
Dan_ has joined #ruby
Dan_ is now known as Guest32439
yoshie902a has joined #ruby
stetho has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jailbot_ has joined #ruby
<jailbot_>
hi
jailbot_ is now known as jailbot
tropicalmug has quit [Client Quit]
<yoshie902a>
I made a ruby instance object, … Security.new({field1:"myvalue", field2:"myvalue2"}) but I would like to use something like the Hash's value_at() method. Is there anything I can use?
burlyscudd has quit [Ping timeout: 260 seconds]
teddyp1cker has joined #ruby
<jonnyro>
jailbot: hi
<jailbot>
im having problems with !select
<jailbot>
select!
dankest has quit [Ping timeout: 265 seconds]
<jonnyro>
jailbot: whats going on?
<yoshie902a>
jailbot: problem more context
<jailbot>
wait
<jailbot>
working on it
<jonnyro>
context free question :) such concise
baschtmobil has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
allaire has quit []
ambushsabre has quit [Quit: rip]
sophomorical has quit [Ping timeout: 240 seconds]
<apeiros>
yoshie902a: I don't understand your question
<centrx>
yoshie902a, You mean instead of calling the method? I am not sure what you mean
Dwarf has quit [Ping timeout: 260 seconds]
subbyyy__ has joined #ruby
<yoshie902a>
sorry, I'll try to be more clear.
<DFieldFL>
got a .gemspec / Gemfile question
tvw has joined #ruby
<DFieldFL>
for dependencies do they both basically do the same thing?
danman has quit [Quit: danman]
<DFieldFL>
the only extra thing a Gemfile does is specify specific locations?
vlad_sta_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<centrx>
DFieldFL, .gemspec is for the gem, Gemfile is for a project?
rankine has joined #ruby
rankine has joined #ruby
rankine has quit [Changing host]
<RubyPanther>
DFieldFL: gemspec is for building a gem locally, those are the deps for the gem repo, Gemfile is for installing and loading runtime dependencies
Hanmac has joined #ruby
<Sawbones>
jonnyro: What do I do with these Koans?
<jonnyro>
Sawbones: the koans are set up like a unit test suite
<yoshie902a>
I would like to loop through an array like ["field1", "field2", "field3"], to call an objects getter methods, for example, instead of Security.field1, I would like something like Security.get("field1"), so that I can loop through the values.
tharindu has joined #ruby
<jonnyro>
Sawbones: you run the suite using "rake", it complains aobut errors. You fix them
<jonnyro>
In the process of fixing them, you learn ruby
jwest has joined #ruby
jkamenik has quit [Quit: Leaving.]
<jonnyro>
What the koan authors did was create a set of progressively more difficult ruby problems that have a lot of hints on whats broken. In order to fix each problem you must understand the concept that is explained
<centrx>
yoshie902a, Security.send(:field1)
<Sawbones>
says no rake file is found
<DFieldFL>
RubyPanther: once a gem is build all you need to run it is the dependencies from the Gemfile?
<centrx>
yoshie902a, Any method can be called dynamically/passed as a parameter, using the #send method
<yoshie902a>
more precisely, I would love to use value_at() on my objects to say, Security.value_at([ "field2", "field3"]
nanoyak has joined #ruby
<jonnyro>
Sawbones:
radic has joined #ruby
<RubyPanther>
DFieldFL: right, unless you are the gem author, you never build the gem you just unpack and install a prebuilt gem. So the user only cares about the Gemfile
<jonnyro>
Sawbones: is there a Rakefile in the folder you are in?
<centrx>
yoshie902a, Why not store it has a hash then?
<jonnyro>
Sawbones: when I unpacked the download, i recieved a folder with much *.rb files and one Rakefile
<yoshie902a>
apeiros: Value_at is not a method for a custom method.
<DFieldFL>
RubyPanther: How do you specify a source in a gemspec?
mkevin has joined #ruby
mlpinit has joined #ruby
<yoshie902a>
I guessI could convert it to a hash
<Sawbones>
Oh I see it Rakefile
<apeiros>
yoshie902a: so go and define it
<Sawbones>
still says there is no rake file though
<RubyPanther>
DFieldFL: You don't, because you don't install from there. You only calculate dependencies from there.
<apeiros>
that's the point of defining your own classes - that you add the methods to it which you want
<jonnyro>
type this, rake --version
<jonnyro>
give me the number back
<RubyPanther>
Those dependencies are assumed to be public, released gems
<jonnyro>
You willthen need to do "rake gen"
simoz118 has quit [Ping timeout: 272 seconds]
skaflem has quit [Quit: Leaving]
<Sawbones>
10.1.0
<jonnyro>
Sawbones: same as i have
<jonnyro>
Sawbones: type: rake gen
<DFieldFL>
RubyPanther: interesting. So no way can you use a private gem?
<havenwood>
I have 10.1.1, live in the *now*, man.
<apeiros>
havenwood, the now-man
<DFieldFL>
RubyPanther: via a .gemspec..
<RubyPanther>
DFieldFL: You can use one, you just can't list it in the repo metadata as a dep unless it is also going to be in the repo. Nothing is loaded from that, it is just for repo management
<yoshie902a>
apeiros: .send was preventing me, but now I'm in better shape. but I also did not want to reinvent the wheel if it already existed
<apeiros>
special powers: lives in the now!
baschtmobil has quit [Ping timeout: 252 seconds]
<havenwood>
man now: No manual entry for now
tharindu has quit [Ping timeout: 260 seconds]
<Sawbones>
Oh I figured it out
<Sawbones>
sweet
<apeiros>
man live: No manual entry for live
<Sawbones>
Thanks :D
<DFieldFL>
RubyPanther: Thanks for the clarification
<DFieldFL>
RubyPanther: jumping into chef and there are a lot of things to learn before I start messing with chef
<RubyPanther>
DFieldFL: When people are actually installing it, they should be using the Gemfile so it doesn't matter if those deps are left out of the gemspec
mrnugget has quit [Quit: mrnugget]
<Sawbones>
Caption for that should be, "About to write a C++ program"
gtc|ghost has quit [Remote host closed the connection]
timonv has joined #ruby
<RubyPanther>
Unless it is a library, then it has to be able to work that way
<yoshie902a>
centrx: thanks for the help
<jonnyro>
Sawbones: haha, i like to read it as, I have been hired to a new job, and given a bunch of legacy C++ code
<DFieldFL>
RubyPanther: so really what is the .gemspec for?
craigp has quit [Remote host closed the connection]
ikawnoclast has joined #ruby
<RubyPanther>
DFieldFL: The gemspec is to the support building the actual gem file (a type of zip) before pushing it to rubygems
teddyp1cker has quit []
craigp has joined #ruby
<shevy>
DFieldFL a .gemspec file is also valid ruby so you can write into it all you want to
<centrx>
yoshie902a, An array is created (rb_ary_new2). For each of the values passed to values_at (numbering argc), the value is retrieved from the hash (rb_hash_aref) and then pushed onto the new array (rb_ary_push). New array is returned.
<rankine>
I'm having trouble what's being passed in as an argument in the following line: User.find_for_database_authentication(:login=>params[:user_login][:login])
Astralum has joined #ruby
<rankine>
some sort of hash?
m8 has quit [Quit: Sto andando via]
<shevy>
rankine yes
mkevin has quit [Quit: mkevin]
<shevy>
rankine you need to try and understand how the parser sees it
rootshift has joined #ruby
<workmad3>
rankine: exactly a hash
gtc has joined #ruby
<shevy>
the {} can be omitted sometimes for a hash
<havenwood>
a naked hash
<workmad3>
rankine: just the interpreter allows you to drop the {} around a hash when it's the last argument in the parameter list
<rankine>
the params is confusing though, is the params receiving the [:user_login]?
<shevy>
a sexy hash
<shevy>
that is not confusing, that is clearly a hash
<workmad3>
rankine: no, arguments are fully evaluated before the method is called
<shevy>
one symbol key is :user_login and apparently it returns another hash, so you have a hash inside a hash there
fire has quit [Quit: WeeChat 0.4.1]
ctp has joined #ruby
<shevy>
this will probably return a string
<workmad3>
rankine: so 'params[:user_login][:login]' is evaluated, which means that params[:user_login] is evaluated and a value retrieved, then the [:login] value is retrieved from that before being passed to the method
<apeiros>
the upper is the C code translated relatively closely to ruby. the lower is what it does in idiomatic ruby.
<DFieldFL>
RubyPanther: So why do people exclusively use Gemfiles and then others use .gemspec and put nothing in the Gemfile except a reference to the .gemspec
<apeiros>
ruby doesn't have for(init; cond; update), so I had to replace that
<workmad3>
DFieldFL: if you're writing a gem, you need a gemspec
sassamo has quit [Remote host closed the connection]
<workmad3>
DFieldFL: if you're writing an application, you don't need a gemspec and the Gemfile becomes the file to provision your application with requirements
<rankine>
once the [:login] value is retrieved from params[:user_login] it is used to retreieve a value from :login?
<apeiros>
DFieldFL: to be honest, I have no idea why anybody uses a Gemfile for gem development.
sassamo has joined #ruby
<RubyPanther>
DFieldFL: One is build time, one is user install time (for apps)
<yoshie902a>
centrx: you summary helps a lot.
<RubyPanther>
Gemfile is new, because bundler is new
<yoshie902a>
apeiros: you code clarify's it even more!
<yoshie902a>
thank you both!
<workmad3>
apeiros: stable gem environment when developing?
<apeiros>
workmad3: development dependencies in .gemspec?
<RubyPanther>
In the old days, we didn't have that tool. We just had a gemspec and if your deps were not the published version, it was just documented and you had to install them from the right places in the right order, and hope your deps didn't ask for conflicting versions
unixpro1970 has joined #ruby
<workmad3>
apeiros: doesn't stabilise your transitive dependencies
unixpro1970 has quit [Max SendQ exceeded]
<apeiros>
k, I guess my gems rarely have real dependencies
<RubyPanther>
If they had thought of bundler in the 90s, we'd have a single unified tool
nettoweb has quit [Client Quit]
<apeiros>
RubyPanther: coming. ruby 2.2 unifies bundler and gems
<jailbot>
how do you share code?
<apeiros>
jailbot: github.com
<RubyPanther>
apeiros: lol <3 <3 <3
<DFieldFL>
workmad3: the example given by rubygems.org talks about jekyll: https://github.com/jekyll/jekyll and it has runtime and dev dependencies in the .gemspec file
sassamo has quit [Read error: Operation timed out]
CpuID has joined #ruby
kung has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<RubyPanther>
gemspec doesn't load anything, so it is at best user install time, not runtime. The Gemfile is for both user install time, and runtime loading
alekst has quit [Quit: Leaving...]
mengu__ has joined #ruby
<RubyPanther>
but you still have a gemspec to build the gem when you publish versions
<DFieldFL>
RubyPanther: I feel like i am def going the wrong direction
<jailbot>
look at the switch statement in the "search" function
havenwood has quit [Remote host closed the connection]
<RubyPanther>
Usually people come from Perl, Java, or PHP, so they stab themselves less
<shevy>
nfk hmm dont think so but you could always do so from the commandline, just let lynx output the html, and save it locally. that can be done in ruby as well
cbetta is now known as cbetta_afk
alexfreidah has joined #ruby
<DFieldFL>
I have 4 years of Java background before python
havenwood has joined #ruby
<DFieldFL>
If that helps any
cbetta_afk is now known as cbetta
<nfk>
shevy, incredibly i managed to find something myself, i think
<RubyPanther>
DFieldFL: I dunno what you're doing, but normally you don't mess with publishing gems until somewhat later after you've fully jumped
<nfk>
assuming if i correctly understand what jekyll does
<nfk>
i'm currently having a closer look at it
<DFieldFL>
I am not publishing anything...which is that crazy part
<centrx>
DFieldFL, Then don't make a gem :)
<DFieldFL>
berkshelf is comparing things I am un aware up
timonv has quit [Remote host closed the connection]
<RubyPanther>
DFieldFL: Right, so the crazy part is asking about gemspec which is a build file :P
<yoshie902a>
apeiros: I modified it like this, http://pastie.org/8621777 it seems to work, but if you have any comments for improvement, please let me know.
<DFieldFL>
something that is wrong with me...confused
sambao21 has quit [Ping timeout: 252 seconds]
<RubyPanther>
DFieldFL: I'm entirely mystified as to the purpose
Wolland has quit [Remote host closed the connection]
Mars has joined #ruby
<DFieldFL>
RubyPanther: why they made the comparison?
alexfreidah has quit [Ping timeout: 246 seconds]
Liquid-- has quit [Quit: Computer has gone to sleep.]
<RubyPanther>
DFieldFL: Right, it creates a whole bundler copy with the names of everything changed, for some WTF-type reason
<shevy>
nfk I never wrote RoR output so why do you assume I did?
Mars is now known as Guest81710
<apeiros>
yoshie902a: I'd use the idiomatic code, not the direct C translation ;-)
Hanmac has quit [Ping timeout: 248 seconds]
havenwood has quit [Ping timeout: 276 seconds]
<nfk>
isn't lynx a very basic http browser?
<apeiros>
also you omitted the * (splat)
<RubyPanther>
It looks to me like they could have just used a database, and have object relations instead of their "recipe dependencies"
<jailbot>
the commends are a bit confusing
<jailbot>
comments
<centrx>
jailbot, And you want it to do what?
toastynerd has quit []
<jailbot>
"input: " is actually input to the loop
gregoriokusowski has joined #ruby
<DFieldFL>
RubyPanther: yeah they just added an extra layer that appears to be blah
<jailbot>
I want to remove words from the "answer" array
<jailbot>
so the first loop tests the first letter
clamstar has quit [Quit: Computer has gone to sleep.]
Bira has quit [Ping timeout: 265 seconds]
sassamo has joined #ruby
deception has quit [Remote host closed the connection]
S0da has joined #ruby
<yoshie902a>
apeiros: oops, sorry, I just noticed your post above with the same code. except you used public, which I assume is a safer way to do it
shadoi has quit [Quit: Leaving.]
<Wixy>
how do you set the default module so you don't have to write Foo::Bar::... every time?
yfeldblum has joined #ruby
raja has quit [Ping timeout: 272 seconds]
phantasm66 has quit [Quit: *poof*]
Astralum has quit [Read error: Connection reset by peer]
<MrZYX>
there's no such thing
yfeldblum has quit [Read error: Connection reset by peer]
Kricir has quit [Read error: No route to host]
yfeldblum has joined #ruby
Asher has quit [Quit: Leaving.]
lkba has quit [Ping timeout: 246 seconds]
<MrZYX>
if you're talking about toplevel code, you can use include to mix the module into the main object
<yoshie902a>
Wixy: redefine your namespace
timonv has joined #ruby
Asher has joined #ruby
fijimunkii has joined #ruby
<yoshie902a>
apeiros: Thank you for all your help!
larissa has joined #ruby
gccv has joined #ruby
gccv has left #ruby [#ruby]
Wolland has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
<Wixy>
redefine my namespace?
<Wixy>
what do you mean?
<MrZYX>
yeah, what do you mean?
Guest32439 has quit [Quit: Peace]
<centrx>
what?
bilbo_swaggins has joined #ruby
`petey` has quit [Remote host closed the connection]
burlyscudd has joined #ruby
`petey` has joined #ruby
juarlex has joined #ruby
<yoshie902a>
more along the lines of MrZYX , use an include, to quote Stackoverflow… "Look if you have to reference the constant in namespace A::B::C::D may you have wrong design of you system? The goal of OOP usually to keep data & methods as closer as possible."
Advocation has quit [Quit: Advocation]
<MrZYX>
that's not "redefining the namespace" at all
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
<MrZYX>
include is a type of inheritance, you augment the current self (ruby has one even at the top level)
gomix has joined #ruby
fedez77 has quit [Ping timeout: 252 seconds]
<yoshie902a>
MrZYX: well, better organizing than?
ambushsabre has joined #ruby
<yoshie902a>
MrZYX: I some not great at expressing my self here, don't always have the best jargon.
<yoshie902a>
some=am
tharindu has joined #ruby
andynu has quit [Quit: Lost terminal]
<MrZYX>
if you do an include the current namespace stays the same (it's Object btw)
pehlert has joined #ruby
timonv has quit [Remote host closed the connection]
`petey` has quit [Ping timeout: 252 seconds]
RaCx has joined #ruby
megus has joined #ruby
pehlert has quit [Read error: Operation timed out]
<Wixy>
it's a lib, I can't change its design
bruno- has joined #ruby
bruno- has quit [Client Quit]
cj3kim has joined #ruby
sassamo has quit [Ping timeout: 272 seconds]
DrShoggoth has quit [Remote host closed the connection]
<Wixy>
so the idea is to include Foo::Bar
havenwood has joined #ruby
<MrZYX>
Another trick can be assigning the module to something
* Hanmac1
changes the design once per week ;P
<MrZYX>
it's an object after all
<Wixy>
Hanmac1, I meant it's not mine :P
<Wixy>
well, I can fork it, but I won't
<MrZYX>
so Bar = Foo::Bar; Bar.x == Foo::Bar.x
<shevy>
nfk the > will redirect the HTML into a file
Hanmac1 is now known as Hanmac
<wald0>
is yard the same formatting of comments (for generate docs from comments) than in rdoc ?
bricker has joined #ruby
unixpro1970 has joined #ruby
lkba has joined #ruby
unixpro1970 has quit [Max SendQ exceeded]
`petey` has joined #ruby
tharindu has quit [Ping timeout: 265 seconds]
ctp has joined #ruby
<nfk>
[23:48] <shevy> nfk the > will redirect the HTML into a file // are you doing this on purpose?
raja has joined #ruby
atmosx has joined #ruby
unixpro1970 has joined #ruby
EngierkO has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cj3kim has quit [Ping timeout: 265 seconds]
ubuu has joined #ruby
mark_locklear has quit [Ping timeout: 252 seconds]
razibog has quit [Quit: Leaving.]
wallerdev has quit [Quit: wallerdev]
momomomomo has quit [Quit: momomomomo]
Astralum has joined #ruby
clamstar has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
rudisimo has quit [Quit: Leaving.]
yfeldblum has joined #ruby
clamstar has quit [Client Quit]
Astralum has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
KensoDev has quit [Remote host closed the connection]
<shevy>
<nfk> shevy, the point i want to generate HTML not dump it
<shevy>
nfk the html is "generated" - you can do whatever you want to with the generated string
<shevy>
what else other than a big fat string is html to you anyway nfk?
yfeldblum has quit [Remote host closed the connection]
Xeago_ has joined #ruby
<nfk>
stop being stupid
aaronroyer has joined #ruby
<shevy>
stop being a noob
starkhalo has joined #ruby
yfeldblu_ has joined #ruby
<nfk>
i would explain but since i know you have been IRC'ing for a long time I know you are not a noob and hence you must be a troll so lay off
S0da has quit [Read error: Connection reset by peer]
Brolen has quit [Quit: Brolen]
wildroman2 has quit [Read error: Operation timed out]
breakingthings has quit []
S0da has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kpshek has joined #ruby
sassamo has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
thomasvs has quit [Read error: Operation timed out]
thomasvs has joined #ruby
thomasvs has quit [Changing host]
thomasvs has joined #ruby
<wald0>
what means the syntax: rescue => e ?
<MrZYX>
catch all (I think Runtime)Exceptions and assign it to e
cmedeiros has quit [Ping timeout: 272 seconds]
<apeiros>
gaaah!
<apeiros>
NOT catch
<apeiros>
rescue
phansch has quit [Quit: Leaving]
<MrZYX>
:P
Liquid-- has joined #ruby
<MrZYX>
had to do java all the semester, sorry :(
<apeiros>
wald0: when code above the rescue raises an exception, execution jumps to the rescue
fijimunkii has quit [Ping timeout: 272 seconds]
<Hanmac>
"everyone saved, no survivors"
ikawnoclast has quit [Quit: Leaving.]
<apeiros>
rescue => e is equivalent to rescue StandardError => e, meaning it rescues all exceptions of type StandardError (or descendants thereof)
sethen has quit [Ping timeout: 260 seconds]
DFieldFL has quit [Quit: DFieldFL]
Brolen has joined #ruby
dankest has joined #ruby
<nfk>
Hanmac, my favourite is pokemon code "gotta catch them all"
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
<Hanmac>
nfk did you see the recent specials of DoctorWho? there are many Quotable Lines inside
wildroman2 has joined #ruby
zigomir has quit [Remote host closed the connection]
codezomb has quit [Read error: Connection reset by peer]
zigomir has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<yoshie902a>
Since we started talking about includes and namespacing, I thought I'd play around with them. Any idea what I'm doing wrong. (the answer is usually a lot! haha) http://pastie.org/8621957
sassamo has quit [Remote host closed the connection]
<nfk>
no, i have never seen a single episode of it
sassamo has joined #ruby
<nfk>
wanted to give it a try this x-mas but didn't have time for that
<MrZYX>
yoshie902a: you're requiring a file that is not containing the module or you didn't show the whole content of "Security_Export.rb" (we'd name it security_export.rb and require it with require "security_export" btw)
<MrZYX>
wald0: I mostly hate statically typed languages and I think that java is almost as broken and inconsistent as php, so you might not get a neutral answer here :P
<wald0>
apeiros: mmh, the part that i dont understand is more exactly the "=> e" one, what does this mean? it was not for set hashes? i dont see how it works here
failshel_ has quit [Ping timeout: 276 seconds]
<MrZYX>
yoshie902a: do you have any output for gem which security_export or do you run ruby with -I. or how do you not get a LoadError on the require?
<wald0>
Hanmac: which specials!? there in spain such thing doesn't even exist ://
<bilbo_swaggins>
MrZYX: I'm thinking Python for my next language. I considered Haskell and C. I think Python would be practical.
<bilbo_swaggins>
How do you find Ruby?
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<MrZYX>
bilbo_swaggins: have a functional one in your set yet? I think one should know at least a dynamically typed, a statically typed and a functional language
<bilbo_swaggins>
I started with ActionScript
<wald0>
is not ruby functional too ?
<MrZYX>
so Haskell might be good next choice, python won't give you a too new experience if you already now Ruby IMO
enebo has joined #ruby
<bilbo_swaggins>
I considered Haskell, because why not go all the way?
<yoshie902a>
MrZYX: I tried to summarize, it's not a gem, it's my own modules I've rewritten and included with an application_help.rb file, that I require in my files.
<bilbo_swaggins>
I've heard Python and Ruby are both good to know
<MrZYX>
wald0: not strictly, what I mean is one where you have only functions, no objects etc
mansi has quit [Ping timeout: 272 seconds]
_aeris_ is now known as [_aeris_]
<yoshie902a>
MrZYX: I'm running it within Textmate, the requires work, its the include that's giving me the problem
mavcunha has joined #ruby
<wald0>
mmh, ruby Modules :)
<Hanmac>
wald0: last year was the 50th year special from DoctorWho ... and in December was the yearly Christmas special
<MrZYX>
yoshie902a: are you then sure that the module is loaded before the class?
Underbyte has joined #ruby
Underbyte has quit [Changing host]
Underbyte has joined #ruby
agjacome has quit [Ping timeout: 272 seconds]
<wald0>
Hanmac: iirc there was a movie in the cinemas, it was there something else extra ?
<lastWhisper_>
do any of you guys know of any open source testing that needs to be done?
<lastWhisper_>
Basically I'd like to contribute my ruby testing skills wherever they're needed
<lastWhisper_>
get some github karma and what not
<bilbo_swaggins>
could you teach a man to fish?
<yoshie902a>
MrZYX: Genius! that was it! I didn't even think of that!
<yoshie902a>
MrZYX: Works great now!
timonv has quit [Remote host closed the connection]
<Hanmac>
wald0 hm no that was the 50th year one ...
<yoshie902a>
MrZYX: Thank you!
<MrZYX>
yw
maletor has quit [Quit: Computer has gone to sleep.]
cescalante is now known as ce_afk
guilund has quit []
maletor has joined #ruby
<wald0>
Hanmac: mmh, and what is the christmas one exactly?
Brolen has quit [Quit: Brolen]
<wald0>
MrZYX: im trying to search info in wikipedia but i dont found it very clear: what is a statically-typed language?
ubuu has quit [Quit: WeeChat 0.4.2]
Valesk has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
kaldrenon has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
workmad3 has joined #ruby
<bilbo_swaggins>
wald0: (1/1) would be a different value from (1) in a statically typed language, being typed as, for example, rational and integer, respectively.
<MrZYX>
so in ruby a variable doesn't have a type, you can do x = "a string"; x = 5; in a statically typed language you have to declare the type of a variable, String x = "a string"; x = 5 # fails; int x = 5; # fails too
<Hanmac>
wald0: the yearly Christmas special ...like each year
Kar- has joined #ruby
<bilbo_swaggins>
Ruby lets you add 5 to 4.3, which is not possible in a statically typed language, in the case of C this is because the numbers are represented with a different scheme when the program is compiled
<bilbo_swaggins>
5.0 =/= 5
<bilbo_swaggins>
=/= (5/1)
lorelei_ has joined #ruby
<bilbo_swaggins>
these are just examples though
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MrZYX>
well, I wouldn't consider that the main point. For example Java allows "some string"+5; ruby doesn't
<wald0>
MrZYX: ah yeah, C :), what you exactly dont like from it? just the extra typing or the generic "much more typing of everything" ?
lorelei_ has quit [Changing host]
lorelei_ has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
clevermatt has joined #ruby
* Hanmac
uses C for evil purpose! ;P
Jake232 has quit [Ping timeout: 265 seconds]
<bilbo_swaggins>
C programs break harder
<wald0>
Hanmac: im living in spain! the biggest third-world country in the world actually, the only thing that I know about dr.who is the 6 season series that i found on internet (and some random movies in torrents)
<Hanmac>
your info is outdated ... there are 7 new seasons, and this year in august the 8th is coming
<Hanmac>
bilbo_swaggins: but when they do they do it hard ,P
Cephalostrum has joined #ruby
kpshek has quit []
enebo has quit [Quit: enebo]
<bilbo_swaggins>
they've been known to explode
<wald0>
good to know! :) im actually at the 3º season
CpuID has quit [Quit: This computer has gone to sleep]
freezey has quit [Read error: No route to host]
aaronroyer has quit [Quit: aaronroyer]
<Hanmac>
wald0: did you see the episode "Blink" ? ;P
freezey has joined #ruby
contradictioned has quit [Ping timeout: 252 seconds]
Cephalostrum has quit [Read error: Connection reset by peer]
asteros has quit [Quit: asteros]
e62 has quit [Ping timeout: 248 seconds]
bean has joined #ruby
bilbo_swaggins has quit [Quit: bblhaskell]
meatherly has joined #ruby
var1 has left #ruby ["Leaving"]
<wald0>
Hanmac: not yet! this one is 10º, i watched today 5º
monkegjinni has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
tylersmith has joined #ruby
phipes has joined #ruby
Bira has joined #ruby
<Hanmac>
wald0: the Shakespeare Episode with "Explilamus" ? ;P
atmosx has quit [Quit: Lost in trance]
tharindu has joined #ruby
ambushsabre has quit [Quit: rip]
MindfulMonk has joined #ruby
Bira_ has joined #ruby
tobylane has quit []
contradictioned has joined #ruby
w4pm has quit [Ping timeout: 248 seconds]
dmerrick has quit []
<wald0>
Hanmac: the one with the witches ? yes :)
claymore has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
tharindu has quit [Read error: Connection reset by peer]
<wald0>
i think that if ppl in spain watch dr.who, the society would become a little more smart than what you can see in the streets... there's only things like "honey boo boo" crap
tharindu_ has joined #ruby
<wald0>
"mothers: if you love your kids, dont let them to watch television", i should make a tshirt like this :)
interactionjaxsn has quit [Remote host closed the connection]
Bira has quit [Ping timeout: 276 seconds]
e62 has joined #ruby
polaco is now known as polaco_zZz
<wald0>
Hanmac: that is good to know, i think that spain is one of the most conformist country's of the world (maybe the biggest one), this is why the country goes so bad here
tharindu_ has quit [Ping timeout: 276 seconds]
<wald0>
ppl dont complain, just open bigger their... :-#
<wald0>
if ppl would think like me, there were no politicians puting crap, only heads of politicias in the floors
blackmesa has quit [Remote host closed the connection]
asteros has joined #ruby
mojjojo has joined #ruby
e62 has quit [Ping timeout: 252 seconds]
gregoriokusowski has quit [Quit: gregoriokusowski]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
monkegjinni has quit [Remote host closed the connection]
cj3kim has joined #ruby
axl_ has quit [Quit: axl_]
<wald0>
cut heads :)
relix has joined #ruby
`petey` has quit [Remote host closed the connection]
`petey` has joined #ruby
CpuID has joined #ruby
CpuID has joined #ruby
CpuID has quit [Changing host]
`petey` has quit [Read error: Connection reset by peer]
`petey` has joined #ruby
dblessing has quit [Quit: dblessing]
asteros has quit [Ping timeout: 265 seconds]
<shevy>
wald0 most politicans are basically just actors these days
makkura is now known as mak|idle
<wald0>
un-needed actors like "belen steban", better to cut their heads off :)
<Xeago_>
damn
<Xeago_>
finally done after a 16 hours shift
<Xeago_>
>.<
<shevy>
Xeago_ the way to riches is a stony one
zipper has quit [Ping timeout: 260 seconds]
<Hanmac>
shevy: i compare them with scarecrows ... most of them has the same inside their head
magoo has joined #ruby
codepython777 has quit [Quit: Leaving.]
<shevy>
hey there was once a scary scarecrow movie
albertgrala_ has quit [Quit: Leaving]
zipper has joined #ruby
burlyscudd has quit [Ping timeout: 272 seconds]
<wald0>
shevy: protagonist was bush ?
<shevy>
nah
<shevy>
some guy was murdered in a silo or so, then came back as scarecrow and killed those who killed him
<shevy>
something along those lines
<shevy>
I was mighty scared at age 8
Cephalostrum has joined #ruby
<wald0>
heh :), i miss these scary movies where you -really- feeled scary
<wald0>
actually i see all of them just like "plan 9 from outer of space"
<shevy>
I know a great way for that
<shevy>
be all alone at home, get a large tv screen, sit close to the tv, turn the volume up, make the room very dark
culturelabs_ is now known as culturelabs
tylersmith has quit [Read error: Connection reset by peer]
<wald0>
nah, they are simply not the same anymore... when i was kid i was not unable to forget it for 2 weeks, now i can simply go to walk to a dark alone place after to watch the movie like any normal day
<apeiros>
wald0: got your question regarding `=> e` answered?
tylersmith has joined #ruby
roolo has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
<shevy>
wald0 yeah, quality of movies has decreased on average
ambushsabre has joined #ruby
<wald0>
apeiros: nah
robbyoconnor has quit [Ping timeout: 252 seconds]
<apeiros>
wald0: => e there just means "store the rescued exception in e"
<wald0>
shevy: i dont know if was quality or simply us that we dont believe anymore "so easy", i also downloaded "freddy kruegger" movies and they dont look the same lol
<shevy>
hehe
<shevy>
I liked the first one
<wald0>
apeiros: mmh, but is => a hash asignation ?
<shevy>
freddy rocked
beneggett has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wald0>
shevy: yeah, these ones the best :)
<wald0>
was*
Bira_ has quit [Remote host closed the connection]
baschtmobil has joined #ruby
yoshie902a has joined #ruby
cj3kim_ has joined #ruby
<wald0>
apeiros: because if it doesn't works as a hash, then i dont understand this syntax (i dont have see this at all in my book)
<apeiros>
wald0: in that context, it's unrelated to hashes
mikemar10 has quit [Ping timeout: 245 seconds]
asteros has joined #ruby
benzrf has joined #ruby
<benzrf>
sup ruby users
tropicalmug has joined #ruby
<apeiros>
yes, hashes use => for key => value, but no, rescue => e has nothing to do with a hash. just "happens" to use the same characters.
lmickh has quit [Remote host closed the connection]
<benzrf>
i have been thinking bout a language that I may or may not eventually try fleshing out a little
Jake232 has joined #ruby
CpuID has quit [Quit: This computer has gone to sleep]
mansi has joined #ruby
klaut has quit [Remote host closed the connection]
tropicalmug has quit [Client Quit]
MrThePlague has quit []
cj3kim has quit [Ping timeout: 248 seconds]
<wald0>
benzrf: fleshing?
<benzrf>
making more concrete, filling in
<benzrf>
idiomatic
<wald0>
apeiros: mmh, so im trying to understand "how ruby parses code/syntax", do you know what is exactly this => here ? i think that i have today correctly understood the use of = in a method
spider-mario has quit [Remote host closed the connection]
<benzrf>
wald0: a token is a predefined word or symbol that the lexer recognizes
<benzrf>
i think
Guest19684 has quit [Quit: Konversation terminated!]
<wald0>
mmh
<apeiros>
wald0: "end" is a token, "class" is a token
<benzrf>
& is a token
<apeiros>
this token happens to be "=>"
<benzrf>
so is =>
<benzrf>
wald0: => is given different meaning depending on where it is used
<wald0>
i have see the other day something that i dont understood too, it was "->(*_)" or similar
nanoyak has joined #ruby
<apeiros>
`->(args) { code }` is another way to write `lambda { |args| code }`
<wald0>
apeiros: ah ok so its simply a part of the ruby syntax language "itself", not something defined to be on that way from its classes/methods/whatever (ruby code) ?
<centrx>
"Token" comes from the Old English "tacen" for "sign, symbol, evidence"
asteros has quit [Ping timeout: 265 seconds]
<apeiros>
wald0: yes, it's predefined
<apeiros>
fixed
Wolland has quit [Remote host closed the connection]
<wald0>
apeiros: but only for rescue, right?
parduse has quit [Ping timeout: 246 seconds]
<apeiros>
yes
<wald0>
good...
* wald0
needs to read about lambda too
sambao21_ has quit [Quit: Computer has gone to sleep.]
<wald0>
shevy: how it is going your tutorial?
Wolland has joined #ruby
<Hanmac>
benzrf: are you sure that & is a "token" and not a method?
<Xeago_>
that stabby winking lambda with 1 eye thing you saw
<shevy>
wald0 I need to make the first iteration which will take some days
<wald0>
Xeago: but i think that i need to understand the meaning of ->(*_) for use FFI
<apeiros>
Hanmac: I'd say e.g. in def foo(&bar), the & is a token
* wald0
is a novice of ruby and wants to use FFI with C libraries
<shevy>
wald0 I'll eventually turn it into a gem
wildroman2 has quit [Remote host closed the connection]
blackmesa has joined #ruby
<wald0>
shevy: iteration? what is exactly the idea with the tutorial? something interactive like "type something; good!, now.."
<wald0>
?
mrsolo has joined #ruby
<Hanmac>
wald0: i was interested in FFI too, but then i found its better to write the extensions in C(++) so you can add extra layers between them (for sample when i connect c++ objects with ruby objects i can force the ruby object to stay alive as long as the c++ object lives
mrsolo has quit [Remote host closed the connection]
<shevy>
wald0 I have tried to pile up some things and have a massive local knowledge base, way too much to turn it into a single project. so I first need to see what is useful and what is not and only put the useful things into it
sambao21 has joined #ruby
SCommette has joined #ruby
h4mz1d has quit [Ping timeout: 272 seconds]
<wald0>
Hanmac: mmh, that depends on the api I assume? what im going to use is a C api which runs in a "event based loop" so if im not wrong, objects are simply alive until you remove them?
<wald0>
well, that FFI is already made, (gem: ruby-efl)
codepython777 has quit [Quit: Leaving.]
<wald0>
shevy: and what is the tutorial about? to learn ruby? which level?
Beoran__ has joined #ruby
kevind_ has joined #ruby
dankest has joined #ruby
SCommette has quit [Client Quit]
`petey` has quit [Remote host closed the connection]
mr_red has quit [Quit: Bye :)]
w4pm has joined #ruby
SCommette has joined #ruby
mr_red has joined #ruby
claymore has quit [Quit: Leaving]
<Hanmac>
wald0: like for sample for libarchive ... there was a FFI gem that uses the API of libarchive but thought it was not cool enough so i write my own api around it in C++ (hm i need to update that lib if i had time)
jedimind has quit [Disconnected by services]
parduse has joined #ruby
yedimind has joined #ruby
apeiros has quit [Remote host closed the connection]
orphanboyk has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.2]
Beoran_ has quit [Ping timeout: 264 seconds]
codepython777 has joined #ruby
sailias has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby
<tt1187>
Hi, is ruby-forum a place where a beginner can ask question, or is it mainly for more advanced questions only?
<shevy>
wald0 to learn ruby, at a slightly wider topic than chris pine's tutorial
<shevy>
tt1187 the forum is without restrictions. if you have a question related to ruby, it fits there
kevind__ has quit [Ping timeout: 265 seconds]
shime has quit [Ping timeout: 252 seconds]
<tt1187>
kk thanks
SCommette has quit [Client Quit]
Megtastique has quit []
<wald0>
shevy: which way? html doc, plain text, book, interactive ?
terrellt has quit [Ping timeout: 265 seconds]
robonerd has joined #ruby
<robonerd>
fastest language to rapid prototype web apps? (i like ruby but i also prefer static typing or at least an 'opt in' static typing support)
<shevy>
wald0 nah, standalone running .rb file. the gem download will detail how to start it from the commandline as well. interactive format would be fun though, like an adventure book :D
<shevy>
wald0 ask back in 5 months perhaps ;P
<benzrf>
robonerd: haskell is the shit
<benzrf>
robonerd: but probably not for rapidly prototyping web apps
<wald0>
shevy: this is the best way to learn :), like a game!
tvw has quit []
<Hanmac>
wald0: the "title_set title" methods are not ruby like enough i would prefer "self.title= title" ... but for ffi code its not bad
Guest81710 has quit [Remote host closed the connection]
v10energy has joined #ruby
asteros has joined #ruby
<v10energy>
is there some kinda gem or method to check balance of a certain cryptocoin wallet?
<krainboltgreene>
"not ruby like" :P
<benzrf>
hmmm, i wonder if you could create a REPL-based text adventure that is operated by typing in ruby code
phipes has quit [Remote host closed the connection]
<benzrf>
i.e. self.go :south
<wald0>
Hanmac: well, the fact is that the method names comes from a giant framework of C libs api, tehse names are shortcuts (automatically generated) of things like: evas_window_title_set, removing the extra thing (a big work to do for 480 parsed .h header files of api's)
cj3kim_ has quit [Ping timeout: 276 seconds]
<benzrf>
puts self.current_room.description
<benzrf>
puzzles could be code based :-D
<shevy>
benzrf go make a MUD in ruby
e62 has joined #ruby
<wald0>
Hanmac: but yeah, this is a good suggestion, maybe they can be improved to work more in that way manually adding them :)
meatherly has quit [Remote host closed the connection]
Brando753 has quit [Read error: Connection reset by peer]
Guest1890 has quit [Remote host closed the connection]
w1xz has quit [Quit: ZZZzzz…]
pehlert has quit [Ping timeout: 246 seconds]
Brando753 has joined #ruby
nide has joined #ruby
freezey_ has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
workmad3 has quit [Ping timeout: 246 seconds]
senj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freezey has quit [Read error: Operation timed out]
mansi has quit [Remote host closed the connection]
tharindu has quit [Ping timeout: 265 seconds]
pel_daniel has left #ruby [#ruby]
<wald0>
is there any good documentation (maybe in a book) with examples about "dynamic code execution" ? what im reading in teh book "begining ruby" about it is very hard to understand