<shevy>
after that, try to solve trivial things in ruby, then slowly build more complex scripts
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki_ has joined #ruby
narcan has joined #ruby
renderful has joined #ruby
codecop has quit [Quit: Išeinu]
marr has quit [Ping timeout: 240 seconds]
hogeo has joined #ruby
tkuchiki_ has quit [Ping timeout: 240 seconds]
blip99 has quit [Ping timeout: 260 seconds]
mary5030 has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has quit [Ping timeout: 264 seconds]
rick2011 has joined #ruby
rick2011 has left #ruby [#ruby]
<SmoothPorcupine>
Guest62923 my friend, depends on what you consider learning.
<SmoothPorcupine>
What is your goal with Ruby/progamming?
<SmoothPorcupine>
programming?*
wesside has quit [Quit: I think I heard an ice cream truck..]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
m8 has quit [Quit: Sto andando via]
ehc has joined #ruby
ephemerian has quit [Quit: Leaving.]
oddalot_mac has quit [Remote host closed the connection]
agjacome_ has quit [Quit: leaving]
Kricir has quit [Remote host closed the connection]
osvico has joined #ruby
vishal has joined #ruby
snovak has joined #ruby
arya_ is now known as arya__
arya__ has quit []
IceDragon has quit [Quit: Space~~~]
AlSquirrel has quit [Quit: This computer has gone to sleep]
cj3kim has joined #ruby
halle_ has joined #ruby
halle_ has quit [Client Quit]
<Nilium>
I think Guest62923's goal might be elongating the quantum matrix.
ElCapitanMarklar has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snovak has quit [Ping timeout: 264 seconds]
halle_ has joined #ruby
<SmoothPorcupine>
Noble.
cj3kim has quit [Ping timeout: 240 seconds]
<Guest62923>
What can ruby do?
<Nilium>
No, no, no, wrong question, what do you want to do?
bradsmith has quit [Remote host closed the connection]
ngoldman has quit [Remote host closed the connection]
bradsmith has joined #ruby
bradsmith has quit [Read error: Connection reset by peer]
bradsmith has joined #ruby
saarinen has joined #ruby
<Guest62923>
Anything but RoR
<Nilium>
More specific.
<SmoothPorcupine>
Best way to learn ruby is to read the source code.
maligree has quit [Quit: I just remembered I'm sleep deprived.]
<Nilium>
The best way to learn Ruby is to read the source which is mostly C so really you'd be learning C
<SmoothPorcupine>
You won't actually get through it all but you'll understand things.
<SmoothPorcupine>
Like, you know, system calls.
tanema has joined #ruby
tanema has quit [Remote host closed the connection]
<Guest62923>
Stupidly enough, I'm quite fond of C.
<zendeavor>
no one likes micro-optimizing
bradsmith has quit [Remote host closed the connection]
<SmoothPorcupine>
Until you're understanding the underlying system, you're not using Ruby for much more than web scripting if you can only identify "Not RoR" as a purpose.
Lewix has quit [Remote host closed the connection]
halle_ has quit []
renderfu_ has joined #ruby
halle_ has joined #ruby
ewnd9 has quit [Ping timeout: 240 seconds]
bradsmith has joined #ruby
renderful has quit [Ping timeout: 240 seconds]
bradsmith has quit [Remote host closed the connection]
maligree has joined #ruby
pvizcay has left #ruby ["ruby"]
Davey has quit [Quit: Computer has gone to sleep.]
Vivekananda has quit [Ping timeout: 240 seconds]
Kricir has joined #ruby
Shirakawasuna has quit [Ping timeout: 240 seconds]
saarinen has quit [Quit: saarinen]
<RubyPanther>
Use the C API, you can do anything you want with Ruby.
Mattix has quit [Remote host closed the connection]
krainboltgreene has joined #ruby
chrisja has quit [Quit: leaving]
ffranz has joined #ruby
Mattix has joined #ruby
byprdct has joined #ruby
saarinen has joined #ruby
<Nilium>
It is actually fairly cool that Ruby can be done almost entirely in C.
<shevy>
Guest62923 basically you can use it to replace all shell scripts
<shevy>
on top of that you can use it for web related stuff and there are some slightly limited GUI bindings as well, ruby-gtk3 for instance
<shevy>
I want ruby done in ruby
tkuchiki has joined #ruby
<Nilium>
I try to keep Ruby in Ruby, but it's very, very nice that it's easy to drop down to C.
<Nilium>
Though dropping down to C will piss off the jruby users, which is like a secondary bonus if you think about it.
kaldrenon has joined #ruby
brennanMKE has joined #ruby
<shevy>
lol
cburyta has quit [Remote host closed the connection]
oddalot_mac has joined #ruby
kaldrenon has quit [Read error: Operation timed out]
viszu has joined #ruby
sevenseacat has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
nso95 has left #ruby [#ruby]
nfk has quit [Quit: yawn]
<Nilium>
Well today's been fun. Went to a wine tasting and now I've got beer.
<Nilium>
I'm the most uncultured drinker.
brennanMKE has quit [Remote host closed the connection]
<shevy>
what the
<shevy>
why do you go to wine tasting
abraham123 has joined #ruby
<Nilium>
My parents had tickets to it and decided they didn't want to go, so they offered 'em to my sister and her husband, but my sister couldn't go, so me and her husband went.
<Nilium>
And we drank a bunch of wine.
<Nilium>
Mostly went because they give you free wine glasses.
hamakn_ has quit [Remote host closed the connection]
<shevy>
lol
Shirakawasuna has joined #ruby
hamakn has joined #ruby
<shevy>
I swear IRC teaches about human psychology just as a good book would too
Shirakawasuna has quit [Read error: Connection reset by peer]
<shevy>
I think I have only one wine glass in my flat :(
<Nilium>
At any rate, if I go by the hipsters and twitters, Ruby and drinking basically go hand in hand, which says either horrible things or great things about it, but nothing neutral
<popl>
shevy: it's a bubble of perception though
<Nilium>
I technically own no wine glasses because I gave my glass to my sister.
<Nilium>
I typically just either a) drink wine out of the bottle or b) pour it into a regular glass.
<Nilium>
This is because I very, very rarely drink wine.
halle_ has quit []
<Nilium>
Plus I very rarely drink in the first place.
<popl>
ruby!
Emmanuel_Chanel has quit [Read error: No route to host]
halle_ has joined #ruby
<Nilium>
Ruby doesn't make me want to drink. Now if I were working in COBOL, I'd be in a hospital.
<Nilium>
Or VB6, as one of my recent job offers said I'd be using
<Nilium>
Which, uh, turned that down.
<shevy>
oh man
<shevy>
looking at job offers, now that is a reason to start drinking
<popl>
a job is a job
oddalot_mac has quit [Remote host closed the connection]
<Nilium>
VB6 and MUMPS, and while I have some reason to distrust a company using a language/database that showed up only 7 years after COBOL, MUMPS is not the reason I turned it down.
\13k has joined #ruby
\13k has quit [Changing host]
\13k has joined #ruby
<popl>
COBOL itself would be something.
Lewix has joined #ruby
<popl>
COBOL is a niche and COBOL jobs can be lucrative.
hamakn has quit [Ping timeout: 240 seconds]
<Nilium>
In general, they just had bad reviews from former employees on GlassDoor.com (apparently they're okay with 50- to 60-hour work weeks), and the VB6 thing was way over the edge
SmoothPorcupine has left #ruby ["Stack validation."]
<Nilium>
I would actually take a job doing COBOL, provided I had a way of learning COBOL
<popl>
ah
<Nilium>
I don't really have a huge problem with it, though I will joke about it endlessly
<popl>
50-60 hour work weeks are dubious.
<Nilium>
The reality is that a lot of the old mainframes and such running that stuff are usually pretty solid and it's the stuff on top of them that's failing because they're trying to circle a square.
<popl>
absolutely
tkuchiki has quit [Remote host closed the connection]
<reactormonk>
Any parallel each that is enumerator-like?
<zendeavor>
parallelize it in the block
MrPoT4tO has joined #ruby
mrpot4to_ has joined #ruby
MrPoT4tO has quit [Remote host closed the connection]
mrpot4to_ has quit [Read error: Connection reset by peer]
MrPoT4tO has joined #ruby
mrpot4to_ has joined #ruby
Guest62923 has quit [Quit: leaving]
cougarten has quit [Ping timeout: 260 seconds]
rburton- has joined #ruby
Emmanuel_Chanel has joined #ruby
fuzzy_ is now known as Fuzai
Steve009 has joined #ruby
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
cj3kim has joined #ruby
cha1tanya has quit [Quit: cha1tanya]
<Steve009>
When subtracting two UTC Dates, you get a number such as: 278526.0. Is there a gem to convert to hours, or number of days, number of weeks, etc?
<popl>
Steve009: can you show us your code? There's a pastebin URL in the topic.
nari has joined #ruby
r0bgleeson has joined #ruby
cj3kim has quit [Ping timeout: 248 seconds]
snovak has joined #ruby
pkrnj has joined #ruby
wallerdev has quit [Quit: wallerdev]
allaire has joined #ruby
<Steve009>
gists cause me problems with my firewall in my loc.
kaspergrubbe has quit [Remote host closed the connection]
<Steve009>
metaprogramming… not enough people do it :)
<Nilium>
Too many people do it >_>
nari has quit [Ping timeout: 276 seconds]
Steve009 has quit [Quit: Steve009]
justsee has joined #ruby
<Nilium>
Also looks like that gem depends on activesupport, which is a whole lot of shite to drag in for unit conversion
<zendeavor>
too late
Fire-Dragon-DoL has quit [Quit: Leaving.]
<Nilium>
I need to start paying more attention to parts.
<popl>
why?
<Nilium>
Or just unhide them, really.
<Nilium>
I decided to try what pontiki did and hide them because I don't really care.
<zendeavor>
weechat smart_filter <3
<Nilium>
I use limechat. It's sufficient.
huoxito has quit [Ping timeout: 264 seconds]
<zendeavor>
don't know it
<Nilium>
OS X thing.
<zendeavor>
smart_filter is bawse tho
<popl>
I wonder what the incidence of support burnout is in #ruby.
<Nilium>
Probably not as bad as Stack Overflow.
<Nilium>
Give someone a short amount of time on SO and you'll watch them turn into a jaded husk of a human being.
xcv has quit [Remote host closed the connection]
bleubeard has joined #ruby
xpirator has joined #ruby
MissionCritical has quit [Read error: Operation timed out]
jarray52 has joined #ruby
Diranged has left #ruby [#ruby]
eka has quit [Quit: Computer has gone to sleep.]
ssvo has quit [Ping timeout: 256 seconds]
osvico has quit [Ping timeout: 276 seconds]
krainbol_ has joined #ruby
krainboltgreene has quit [Ping timeout: 246 seconds]
nitish has joined #ruby
nitish has joined #ruby
fgo has joined #ruby
kaspergrubbe has joined #ruby
huoxito has joined #ruby
wallerdev has joined #ruby
thepumpkin has joined #ruby
Mission-Critical has joined #ruby
smathieu has joined #ruby
Shirakawasuna has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
smathieu has quit [Ping timeout: 248 seconds]
RichardBaker has joined #ruby
Mission-Critical is now known as MissionCritical
<sevenseacat>
that is so true.
<popl>
Nilium: So you think support burnout is not high in #ruby?
<Nilium>
I'd say it's relatively lower, but I couldn't comment on how high it is when I've been here probably less than a month.
<popl>
Ah, I see.
<Nilium>
That said, I deal mainly with people asking dumb questions about: json, iOS coding in general, Android coding in general, and so on.
<Nilium>
There are probably vastly more stupid questions in that area per capita than Ruby, which should lead to greater burnout.
Megtastique has quit [Quit: Megtastique]
oddalot_mac has quit [Remote host closed the connection]
<popl>
I don't know that stupid questions so much as frustrating behaviors contribute.
<Nilium>
Well, frustrating behavior leads to stupid questions
oddalot_mac has joined #ruby
<popl>
Sure.
<Nilium>
E.g., not reading docs, not reading specs, not reading in general, not thinking about a problem, not considering input and output, etc.
<popl>
In this case I was thinking specifically of Steve009's behavior.
<sevenseacat>
ive been helping people in #rubyonrails for over two years and there's definitely a case for burnout.
<popl>
I can imagine.
Tarential has quit [Excess Flood]
<popl>
It's highly a popular technology.
Tarential has joined #ruby
<Nilium>
I just stay away from rails questions. Gaze into the abyss and all that.
<popl>
I'm sure it's near the top of the buzzword list.
<Nilium>
It's so near the top of the buzzword list that I get rails job offers because I use Ruby even though I've never touched rails.
<Nilium>
Mostly because recruiters are stupid, even the in-house ones.
<sevenseacat>
people assume ruby = rails
<Nilium>
Well, some recruiters.
<sevenseacat>
(people are stupid)
<popl>
Let's not generalize unnecessarily. :P
cj3kim has joined #ruby
<sevenseacat>
aw, but its so fun
<Nilium>
It's tedious, to say the least, because I want to get job offers but I want to get them because of what I know, not because 'ruby' is one of the top languages on my github profile and ruby must mean rails.
<popl>
I should push some stuff to github
<Nilium>
I sometimes think I have too much stuff on github.
Inside has joined #ruby
<Nilium>
Like I'm polluting the well by making it hard to sort through my projects and see what's good.
<sevenseacat>
i have very little public on github
v0n has joined #ruby
oddalot_mac has quit [Remote host closed the connection]
<sevenseacat>
though i did just push one of my work rails projects public (not under my account though)
<sam113101>
I use bitbucket for everything private
<Nilium>
I just make stuff public 'cause I have no reason to really care about my code being private.
<Nilium>
That is, I have no benefit to keeping stuff private.
allaire has quit [Quit: allaire]
<popl>
Nilium: Doesn't it cost money to make private github repositories?
<popl>
:P
<Nilium>
A very small amount
<Nilium>
I could afford it, so it's not an issue of money
<sam113101>
on bitbucket it's free
<popl>
Daddy Warbucks.
<Nilium>
I also have a bitbucket account, I just have no reason to make anything private.
<sevenseacat>
i like bitbucket. i find the UI a lot nicer.
huoxito has quit [Ping timeout: 240 seconds]
<sevenseacat>
github keeps rearranging their UI seemingly on a whim, and every time they change something they break it on my setup (firefox/ubuntu)
<popl>
I haven't been on bitbucket in awhile, but the github UI is pretty fucking amazing.
<Nilium>
Also, I really need to spend more time on Snow. I've devoted something like the past month to Ruby projects.
<Nilium>
I really need clones.
<sevenseacat>
'The other thing anyone releasing code has to realize is that their project will most likely never be used by anyone else — ever. ' haha that is so true
Kruppe has quit [Remote host closed the connection]
postmodern has joined #ruby
<sevenseacat>
you do have a lot of stuff on github
<Nilium>
On the upside, I at least have some things to backport from my Ruby work to Snow.
wallerdev has quit [Quit: wallerdev]
kaspergrubbe has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 240 seconds]
<Nilium>
My github account is like a project graveyard.
stevenrockarts has joined #ruby
<Nilium>
Though for me it's also a fun look back at my obsessions over time.
wallerdev has joined #ruby
<Nilium>
Thank god it's not really possible to see my obsession with threads.
<sevenseacat>
! you made the ST2 theme nil? i so use that
kaspergrubbe has joined #ruby
<Nilium>
Yep.
<sevenseacat>
:D
<Nilium>
Hopefully you're not one of the people who got mad when I added purple.
<Nilium>
'Cause those people exist.
lethjakm1 has joined #ruby
<sevenseacat>
nah
<sam113101>
I use Tomorrow
<sevenseacat>
i was like 'whoa hey thats different' but thats about it
<Nilium>
Most of the things I've done have been disable-able, anyway.. people just don't read the readme, usually.
<sevenseacat>
i will admit to not having read the readme but i am now and there is cool stuff in there that i never knew about lol
<sevenseacat>
highlight_modified_tabs is going to be my new best friend
<Nilium>
I wonder which elder god I referenced in it
<Nilium>
Shub-Niggurath. Figures.
<popl>
herp
<zendeavor>
sevenseacat: until you have 40 rows with whitespace highlights
<popl>
*sooo* last eon
snovak has joined #ruby
<Nilium>
You shut up, Shubby's awesome.
<zendeavor>
then you're gonna be like ugh eff this
juxovec has joined #ruby
fridim_ has quit [Ping timeout: 248 seconds]
<popl>
Nilium: "Shubby"
<Nilium>
The buddy god.
snovak has quit [Ping timeout: 264 seconds]
<popl>
That makes me think of a commercial for some American toy called "My Buddy".
juxovec has quit [Remote host closed the connection]
<sevenseacat>
pfft, doom with the simpsons patch was where it was at.
<popl>
Nilium: It's a moment in time. Fuck it.
<Nilium>
I played a lot of Barney Doom, amazingly
<popl>
I started playing a shitload of Unreal Tournament.
<Nilium>
Granted I was maybe six or seven years old and it was funny to me
<popl>
ah
TomRone has quit [Ping timeout: 240 seconds]
<popl>
I was older than that.
<popl>
But I had an unreserved childlike hatred for Barney.
<Nilium>
Most people probably did and still do.
TomRone has joined #ruby
<Nilium>
Especially new parents.
<popl>
Eh. It's just a children's program.
<popl>
Hatred is useless.
<Nilium>
Yes, but I assume hearing that song one too many times would make someone crack.
<sevenseacat>
the teletubbies were worse. damn those freaks and their gibberish
<popl>
possibly
Nisstyre-laptop has quit [Quit: Leaving]
<popl>
tinky winky?
<Nilium>
I was thankfully not around for episodes of Teletubbies when my sister was born, since I was always shuffled off to school
<Nilium>
At least until I got pulled out of school
<Nilium>
And by then she'd moved onto Blues Clues, which was tolerable
<popl>
I know all of these songs. :P
<sevenseacat>
one of my sisters was around at the time of the teletubbies craze. oh lord.
<Nilium>
I just remember my parents and relatives talking about it at the time and laughing at it showing up in the news
<popl>
sevenseacat: You talk about itl ike you were there man.
gz0 has quit [Ping timeout: 240 seconds]
<Nilium>
Man, you had to be there. You had to be there. It was like triangles falling everywhere. Piles of television-stomach corpses. All of them burning.
<Nilium>
Some of the kids.. some of them cut off their triangles. Kept them as souvenirs.
forced_request has quit [Read error: Connection reset by peer]
<Nilium>
I probably should've gone with imitating The Things They Carried instead of generic war-time story cliches.
* popl
cuts off Nilium's triangle.
<Nilium>
Surprisingly painless.
<Nilium>
Must not have nerve endings or something.
<popl>
hardcore
<popl>
:P
parzo has joined #ruby
<Nilium>
I should start converting my documentation to tomdoc.
viszu has quit [Quit: Leaving.]
<Nilium>
Seems like a nice format to use.
wargasm has quit [Read error: Connection reset by peer]
wargasm has joined #ruby
Megtastique has joined #ruby
postmodern has quit [Quit: Leaving]
ssvo has joined #ruby
pvizcay has joined #ruby
<sevenseacat>
i think people are starting to use it internally here
zorg24 has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
Mattix has quit [Remote host closed the connection]
larissa has quit [Quit: Leaving]
juxovec has joined #ruby
germanstudent has quit [Remote host closed the connection]
pvizcay has quit [Remote host closed the connection]
germanstudent has joined #ruby
pvizcay has joined #ruby
bluOxigen has joined #ruby
Lewix has joined #ruby
pvizcay has quit [Client Quit]
johnkary has joined #ruby
mpwin has joined #ruby
krainbol_ has quit [Quit: krainbol_]
akashj87 has joined #ruby
postmodern has quit [Quit: Leaving]
akashj87 has quit [Max SendQ exceeded]
<Nilium>
I think the nice thing is I can keep the entire thing in my head.
<Nilium>
Unlike doxygen/javadoc where I always have to go back and look at the list of tags.
postmodern has joined #ruby
kaspergrubbe has joined #ruby
stevenrockarts has quit [Quit: stevenrockarts]
akashj87 has joined #ruby
akashj87 has quit [Max SendQ exceeded]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
pvizcay has joined #ruby
nari has joined #ruby
johnkary has quit [Quit: @johnkary]
Megtastique has quit [Quit: Megtastique]
kaspergrubbe has quit [Ping timeout: 240 seconds]
stevenrockarts has joined #ruby
saarinen has joined #ruby
pvizcay has quit [Remote host closed the connection]
pvizcay has joined #ruby
gz0 has joined #ruby
fgo has quit [Remote host closed the connection]
pvizcay has quit [Ping timeout: 256 seconds]
pvizcay has joined #ruby
`MArceLL` has quit [Ping timeout: 246 seconds]
sayan has joined #ruby
kreeves has quit [Ping timeout: 240 seconds]
thesheff17 has quit [Remote host closed the connection]
pvizcay has quit [Ping timeout: 256 seconds]
Guest10893 has quit [Ping timeout: 264 seconds]
johnkary has joined #ruby
pvizcay has joined #ruby
Bosox20051 has joined #ruby
Bosox20051 has quit [Remote host closed the connection]
stevenrockarts has quit [Quit: stevenrockarts]
snovak has joined #ruby
Yakko has joined #ruby
mary5030 has quit [Remote host closed the connection]
<rickruby>
In Ruby, when I want to create new instance variables, do I have to declare them inside the class, or can I do something like @name = some_var inside a method and the class objects will now have @name, even though I never defined @name in the class (but in the method yes?)
<popl>
rickruby: try it out! :)
pvizcay has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
ffranz has quit [Quit: Leaving]
pvizcay has joined #ruby
snovak has quit [Read error: Operation timed out]
postmodern has joined #ruby
pvizcay has quit [Ping timeout: 248 seconds]
pvizcay has joined #ruby
<rickruby>
so I can do something like @name = some_var inside a method and it will work (haven't declared @name in the root of the class)
<rickruby>
but if I try attr_accessor :email inside a method
<rickruby>
doesn't seem to work
<rickruby>
has to be declared in the root of the class
<rickruby>
why is this ?
JumpMast3r has quit [Quit: JumpMast3r]
wallerdev has quit [Quit: wallerdev]
mrpot4to_ has quit [Remote host closed the connection]
MrPoT4tO has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
pvizcay has quit [Ping timeout: 260 seconds]
robscomputer has quit [Ping timeout: 256 seconds]
<jrobeson>
rickruby, you should learn the difference between class properties and class instance properties
myth17 has joined #ruby
myth17 has joined #ruby
<jrobeson>
personally i don't really like that ruby allows you to just do @foo out ouf the blue.. :(
<rickruby>
thanks I will google this :)
nitish has quit [Ping timeout: 246 seconds]
<jrobeson>
rickruby, unlike most other languages .. in ruby. .the class itself is an object
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
<rickruby>
Oh I think I see, attr_accessor is a method that can only be run on a module
stevenrockarts has joined #ruby
<rickruby>
class is an extension (?) of module
<rickruby>
which is why that only works inside the root of the class
macmartine has joined #ruby
havenwood has joined #ruby
<jrobeson>
rickruby, have you done any other programming before?
<rickruby>
a little bit of Java
<jrobeson>
if you have.. there's a guide somewhere that highlights differences between languages
<jrobeson>
perhaps not for java tho..
poga_ has joined #ruby
poga has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
tonni has quit [Remote host closed the connection]
<Yakko>
RVM I just installed you again today, why you so slow RVM? why "time rake environment" takes 30 extra seconds to run now? :(
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
<zendeavor>
rvm ;]
macmartine has quit [Quit: Computer has gone to sleep.]
stevenrockarts has quit [Quit: stevenrockarts]
heftig has quit [Ping timeout: 245 seconds]
renderfu_ has quit [Remote host closed the connection]
St_Marx has joined #ruby
baroquebobcat has quit [Read error: Connection reset by peer]
gz0 has quit [Ping timeout: 260 seconds]
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
kbouwser has joined #ruby
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby
corehook has joined #ruby
<pontiki>
is that due to rvm? rails always starts slow...
Inside has quit [Ping timeout: 246 seconds]
<jrobeson>
pontiki, he said rake environment
<jrobeson>
or rather.. they said..
kbouwser has quit [Client Quit]
lethjakm1 has quit [Ping timeout: 240 seconds]
<pontiki>
which if they're running rails, most rake tasks start up the rails environment
LLckfan has joined #ruby
<LLckfan>
I am trying to rreconnect my blu-ray player to my routeers wifi and I am getting DHCP cannot be acquired. I have checked the routers settings and DHCP is enabled. Is there a way to fix this?
<pontiki>
i've just not seen anything about rvm that would be slow
tacos1de has quit [Remote host closed the connection]
<Nilium>
I don't think RVM does anything that would cause that in the first place O_o
<sevenseacat>
LLckfan: lolwat
tacos1de has joined #ruby
<Nilium>
Ignore the confused person, it is a trap
<sam113101>
TROLL
<Nilium>
It's like a memetic virus.
<LLckfan>
Not a troll
<Nilium>
Thank you, Pontypool, for adding that phrase to my lexicon.
<sevenseacat>
ah right. k.
<pontiki>
BURN IT ALL
<LLckfan>
It is not a trap
<LLckfan>
I amnot a troll
<Nilium>
We can't be certain of that, so we'll need you to get bitten by a rabid deer to show us you're not already rabid.
narcan has joined #ruby
<jrobeson>
She's a witch!
<pontiki>
i am not!
<zendeavor>
she turned me into a newt!
<jrobeson>
see.. if you float.. you're a witch.. if you drown.. you're not
<popl>
if you quote Monty Python…
<jrobeson>
pontiki, it's just what Nilium said sounded like that to me
<pontiki>
get that duck away from me!
<pontiki>
oh, hey, i'm all over it
<jrobeson>
hah
<Nilium>
I had a pet duck once.
mpwin has quit [Remote host closed the connection]
<jrobeson>
so.. i've always been in the periphery of the ruby community.. done a few things on my own.. but never anything serious
<jrobeson>
i've always wondered though.. why is the ruby community seemingly so whimsical
veer has joined #ruby
<jrobeson>
why does it feel like a world of endless wonder
veer is now known as Guest7774
<Nilium>
Because we're all imbued with the power of demons.
<jrobeson>
it's nothing i've seen replicated in any other language's community
<jrobeson>
err.. useless '
<sevenseacat>
because we want to make our world better?
_veer has quit [Ping timeout: 264 seconds]
<jrobeson>
so does everybody else
<sevenseacat>
instead of just doing the same old stuff because thats the way we've always done it?
<Nilium>
Also because there are a handful outspoken whimsical people and that gives the outward appearance of whimsicalness and otherwise are mostly the same as other communities.
<sevenseacat>
yeah no, not everyone else does.
<jrobeson>
Nilium, but it seems infectious though
<pontiki>
i think, well,.. hmm
<Nilium>
jrobeson: That's the power of demons
<sevenseacat>
tell that to the people still writing PHP4 apps
<pontiki>
i do note the difference you see, jrobeson
JDHankle has quit [Remote host closed the connection]
<jrobeson>
it's more than a handful.. it would take more than a handful of people to write all these fancy gems i see
apeiros has quit [Ping timeout: 260 seconds]
<Nilium>
Well, if you're writing PHP4 apps, you're probably masochistic
JDHankle has joined #ruby
<pontiki>
maybe because ruby was intended as a language to delight programmers
<pontiki>
we're all just having so much fun
sayan has quit [Ping timeout: 264 seconds]
<jrobeson>
sometimes you can say a thing and the power of words makes it true i suppose
<pontiki>
i can't say coding java or php is fun
<pontiki>
perl is
alem0lars has joined #ruby
<jrobeson>
somebody is a good saleperson
<pontiki>
lisp is a whackload of fun, but then there's the scheme/cl wars to deaden things there
<pontiki>
jrobeson: here's a fact from the neuroscience world: when you hear the same thing a second time, you're 50% more likely to believe it
<jrobeson>
i got started in php quite some time ago.. i can't say it was ever fun.. even when it was really the only thing other than perl
<pontiki>
and thus we have advertising
ananthakumaran has joined #ruby
<rcs>
pontiki: I didn't believe that the first time I heard it.
<pontiki>
well played
<jrobeson>
i didn't have to hear advertising of ruby to see that sinatra was the most beautiful program i had ever seen
<Nilium>
Praise be to scheme, FYI.
lurch_ has joined #ruby
<rcs>
What's the beautiful part? The binding of routes to otherwise anonymous methods?
<rcs>
Or are you speaking of the internals?
thebastl has joined #ruby
<jrobeson>
rcs, it was how much if wasn't special to sinatra .. not just some parsed config file
bleubeard has quit [Ping timeout: 264 seconds]
<jrobeson>
it was just ruby
<Nilium>
Sinatra's not really my idea of a beautiful thing. It's handy, but not beautiful.
tonini has joined #ruby
Kelet has quit [Read error: Connection reset by peer]
<pontiki>
beauty is in the eye of the beholder
<jrobeson>
seeing a DSL that was not some specially parsed magic file was eye opening to me
<Nilium>
It's not a DSL -_-
<pontiki>
i find sinatra quite beautiful
<jrobeson>
Nilium, it's just ruby
<Nilium>
It would have to be a specially parsed magic file to be a DSL >:|
<jrobeson>
and that was what caught me i
<jrobeson>
Nilium, ah.. my definition is perhaps looser than yours
<pontiki>
ellegant, event
<pontiki>
-t
<jrobeson>
the fact that you can do it with just ruby.. was amazing to me
<sevenseacat>
the term DSL is so ambiguous
<r0bgleeson>
jrobeson: lots of domain languages are written in Ruby, Sinatra is considered to be one of them, at least in the classic style you write sinatra.
<sevenseacat>
i once had a debate with someone because they said you should 'parenthesize all method calls that were not part of rails or ruby's DSL'... i was like wat
<jrobeson>
ah.. my definition is not that loose :)
<jrobeson>
tonini, boo!
ntus1017 has joined #ruby
<jrobeson>
do you remember me?
<tonini>
jrobeson: sry, I think not :) maybe help me about a bit ;)
<jrobeson>
i helped you in #symfony
poga_ has quit [Remote host closed the connection]
<jrobeson>
i remember saying you did ruby mostly
<tonini>
jrobeson: ahhh yes :) bad symfony times :)
<tonini>
luckely we got away from symonfy and doing full time ruby/rails again :)
snovak has joined #ruby
<jrobeson>
seeing what folks have to do to contort php to act like rspec .. ouchies
<tonini>
I think that's a goal which is really hard to achieve
<jrobeson>
pontiki, i think that the emergence of rails at that particular time in internet history .. was perhaps the most perfect moment it could have happened
<jrobeson>
tonini, look at phpspec
<tonini>
yeah, but there is still some really hard syntax noise like -> I really don't like :)
<jrobeson>
i have a theory.. which i want to test out at some point..
<jrobeson>
something about the fallout from the dotcom bubble bursting and all sorts of loose java developers.
<sevenseacat>
stabby syntax in ruby makes me sad
<jrobeson>
i'd like to find evidence that many of these loose java developers found a home in ruby
<pontiki>
java is still like > 40% of web apps
snovak has quit [Ping timeout: 246 seconds]
<jrobeson>
so?
<jrobeson>
obviously there are still java devs making web apps :)
<tonini>
Why not just have fun with a language which gives you a lot of power but also responsibility?
<jrobeson>
honestly.. the first language that came to my mind when you said that was python
<popl>
"MY language can beat up YOUR language!"
<tonini>
sounds good, no one said you should take ruby :)
<jrobeson>
tonini, no.. i love ruby..
<tonini>
I like elixir far more than ruby atm :)
<jrobeson>
i was just professing my love earlier
<tonini>
hehe :)
<jrobeson>
that doesn't mean i'm not friends with other languages
<tonini>
popl: yeah, but I hope we all over that kind of talks :)
<jrobeson>
well.. erlang kicked my ass once..
<jrobeson>
which is why elixer sounds appealing :)
<jrobeson>
elixir*
<tonini>
jrobeson: and that's the attitude I lile :)
<jrobeson>
i made a few successful patches to ejabberd
<jrobeson>
but it was like parsing renaissance era french while only knowing modern spanish..
<tonini>
*like
<pontiki>
oh, great analogy
<tonini>
:)
<jrobeson>
i wanted my irc gateway to work really really badly
<jrobeson>
for some reason.. that was the most important thing at the time
<jrobeson>
although i later learned.. that ejabberd 2.x .. isn't actually the best example of how one would write erlang ...
<jrobeson>
i ended up with the lua based prosody xmpp server later..
seoaqua has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
poga has joined #ruby
jaynewstrom has quit [Read error: Connection reset by peer]
<jrobeson>
could anyone speculate a time in which rvm and rbenv would no longer be seemingly required tools for working with various ruby applications?
<sevenseacat>
they're not at the moment
<jrobeson>
you think that time is over?
<jrobeson>
i just had to install rbenv to get octopress working :(
<jrobeson>
fedora ships with ruby 2.0
<sevenseacat>
no, but those two tools arent the only tools out there to manage ruby versions.
apeiros has joined #ruby
<sevenseacat>
if you wanted antiquated versions of other languages, you'd need something similar
<jrobeson>
it was even seemingly needed between variying 1.x versions of ruby
<jrobeson>
although i only had a sinatra app at the time.. so never ran into any trouble
<rcs>
I'm a big fan of them. it's a Hard Problem to manage app dependencies on production servers.
<rcs>
Bundling with the app code, or shipping the configuration so you can switch-to-it or fail? Awesome.
<jrobeson>
that feels more like a mac osx philosophy.. while i'm more of a linux package manager guy
<sevenseacat>
well you could always go the debian approach and have packages for ruby, ruby19, ruby191 (which actually has 1.9.3 in it), etc.
<jrobeson>
shared librares and whatnot
<rcs>
Having deployed with and without trying to use system package managers, I'll take app bundled dependencies every time.
w4pm has quit [Ping timeout: 246 seconds]
<jrobeson>
well the future seems to be going towards the vm approach where one packages up the whole system or a whole "container"
<rcs>
Your authentication system for login to the boxes requires a libray of libshh that requires glibc 1.5.4 patched with the floating point double boolean extension, but glibc 1.5.4 has a problem with PRNGs.
<rcs>
Yeah.
<sevenseacat>
there isnt even a ruby2 package yet. shame.
<rcs>
docker et al is an amazing booming ecosystem.
<jrobeson>
i haven't really looked at docker yet myself
noopq has joined #ruby
<jrobeson>
the closest analogue i have to that is openvz/linux-vserver
<Nilium>
It's more about avoiding polluting the global namespace/scope/object class/what have you
tagrudev has joined #ruby
<apeiros>
so yes, it may cost you more today. but in a while, it won't anymore. and you gain better maintainable code for the cost of learning it today.
<jrobeson>
oh noes.. i got stuck in portland..
<YaNakilon>
"it may cost you more today. but in a while, it won't anymore. and you gain better maintainable code for the cost of learning it today."
<YaNakilon>
"premature optimization"
<apeiros>
and the point is: unless all you ever write is <50 line scripts, you'll have to anyway
<Nilium>
>> def foo ; end ; Object::foo
<eval-in>
Nilium => private method `foo' called for Object:Class (NoMethodError) ... (https://eval.in/42663)
<josiah14>
error is euler1.rb:11:in % : Array can't be coerced into Fixnum (TypeError)
<Nilium>
That's more or less what I'm talking about when I say polluting the object class, FYI
<apeiros>
YaNakilon: um, no. as said, unless you expect to never write any script longer than 50 lines.
<apeiros>
YaNakilon: but then just put it into a single file already
devoldmx27 has quit [Quit: Bye]
<apeiros>
YaNakilon: or did you "prematurely optimize" when you put it into 2 files?
<apeiros>
(wrong term, really)
devoldmx has joined #ruby
yxhuvud has quit [Ping timeout: 264 seconds]
<Nilium>
When did the whole premature optimization quote get so misused?
<apeiros>
Nilium: when it got hyped
<apeiros>
similar to DRY
<Nilium>
I mean, the quote's not even about saying "don't optimize at first"
<apeiros>
"don't write 10 requires! use a loop!!!!"
<apeiros>
blergh :)
<apeiros>
Nilium: indeed
renderful has quit [Ping timeout: 240 seconds]
<apeiros>
Nilium: or rather, it's not telling you not to "think before you code"
<popl>
Nilium: Hey, what's the word?
<popl>
:D
<Nilium>
"sanity"?
<popl>
pffft
<popl>
you suck
AlSquire has joined #ruby
* Nilium
is waiting for you to give him the money.
<popl>
Nilium: Everybody knows that bird is the word.
sr78ger has joined #ruby
sr78ger has quit [Client Quit]
<Nilium>
Like I'd fall into that trap.
<popl>
But you like birds. :(
<Nilium>
And I've got a degree in English, so I hate puns
<popl>
If it is a trap it is a trap of AWESOME.
<popl>
And correlation does not imply causation.
sayan has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
<Nilium>
And anyway, back to pointing out that good design isn't premature optimization
<Nilium>
It's almost like saying picking an algorithm that fits or the right data structures is premature optimization
postmodern has quit [Quit: Leaving]
<apeiros>
it tends to be used as a blanket license to not use your brain
<apeiros>
and/or to justify cowboy coding
<popl>
Who are you pointing this out to?
<apeiros>
THE PUBLIC!
<Nilium>
And YaNakilon more specifically, I think
<popl>
I don't think YaNakilon is paying attention.
Demo_of_doom_ has joined #ruby
<Nilium>
Since he's misusing a quote I see often misused
cj3kim has quit [Remote host closed the connection]
<Nilium>
PAY ATTENTION, CHILD.
ntus1017 has quit [Remote host closed the connection]
<popl>
But the public has a right to know.
<jrobeson>
when i hear don't prematurely optimize.. i always think.. don't try to squeeze micro seconds.. when you can squeeze actual seconds
<popl>
:P
arturaz has joined #ruby
sergicles has joined #ruby
<zendeavor>
hm
<Nilium>
jrobeson: That's sort of basically it.
Es0teric has joined #ruby
<zendeavor>
can i get RUBY_VERSION split on the dots
<Nilium>
It's actually slightly useful because it makes a[0] == ?a compatible in both 1.9 and 1.8
<Nilium>
If you care about it
<apeiros>
Nilium: yes, but it breaks all uses where it was used as an integer literal
<Nilium>
Unfortunately.
<popl>
AH
<apeiros>
so I'm not convinced about that having been "the right choice"
<popl>
he was enlightened
<LLckfan>
I am trying to rreconnect my blu-ray player to my routeers wifi and I am getting DHCP cannot be acquired. I have checked the routers settings and DHCP is enabled. Is there a way to fix this?
<popl>
why does that exist?
<apeiros>
ah, \?C-c - control-c
<Nilium>
I'd frankly rather have just kept string#[] returning an integer as well
ayaz has joined #ruby
myth17 has quit [Remote host closed the connection]
<apeiros>
LLckfan: your router and/or blueray player run ruby?
<zendeavor>
how far back can that .split ?. go
<zendeavor>
versions
<Nilium>
It's not difficult to allocate a string within the embedded length size, but it's less convenient than just cramming the character in an integer
<zendeavor>
apeiros: no, he's a pathological spammer
<Nilium>
LLckfan: Go away until you're going to discuss cats, parrots, booze, or Ruby, prioritized in that order.
<popl>
pffft
<popl>
cats
<zendeavor>
we had to +b him in #bash
Yakko has quit [Quit: No Ping reply in 180 seconds.]
<popl>
Nilium: reverse order
<Nilium>
I wonder why he'd join programming channels to ask in the first place.
emergion has quit [Quit: Computer has gone to sleep.]
smathieu has quit [Ping timeout: 276 seconds]
ssvo has joined #ruby
<vlad_sta_>
Question: I need to test string with numbers against regexp mask. Like "4434444" against "XXYXXXX" mask. What is the best way to implement it: build complex regexp OR collect presented digits to kinda dictionary, and then associate each of digit with character (like X Y Z A B C etc..) and after that build regexp and then test the initial string against that regexp?
goleldar has quit [Ping timeout: 240 seconds]
emergion has joined #ruby
threesome has joined #ruby
JohnBat26 has joined #ruby
JohnBat26 has quit [Client Quit]
JohnBat26 has joined #ruby
timonv has quit [Remote host closed the connection]
<zendeavor>
each_with_index seems to fit
Al_ has joined #ruby
KevinSjoberg has joined #ruby
juxovec has quit [Remote host closed the connection]
<zendeavor>
like i said, ruby is too empowering
sevenseacat1 has joined #ruby
sevenseacat has quit [Ping timeout: 264 seconds]
bousquet has joined #ruby
maz-dev has joined #ruby
Matriks has joined #ruby
stkowski has quit [Quit: stkowski]
Ciscoridze has joined #ruby
buibex has joined #ruby
ssvo has quit [Ping timeout: 240 seconds]
snovak has joined #ruby
<josiah14>
is there a way in ruby to find only the unique permutations on an array disregarding order?
axeman- has quit [Remote host closed the connection]
Alina-malina has quit [Read error: Connection reset by peer]
ruben__ has joined #ruby
snovak has quit [Read error: Operation timed out]
sevenseacat1 is now known as sevenseacat
ruben__ has quit [Client Quit]
kaspergrubbe has joined #ruby
Coffers has joined #ruby
anay has quit [Remote host closed the connection]
Neomex has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
nplusp has joined #ruby
kaspergrubbe has quit [Ping timeout: 240 seconds]
juxovec has joined #ruby
jim0thy_ has joined #ruby
horofox has quit [Quit: Leaving.]
<bnagy>
some_array.sort?
krainboltgreene has quit [Read error: Operation timed out]
<bnagy>
disregarding order doesn't seem to make sense there? :)
juxovec has quit [Read error: Connection reset by peer]
Yakko has quit [Remote host closed the connection]
gstamp has quit [Quit: Computer has gone to sleep.]
JDHankle has joined #ruby
s2013 has joined #ruby
noname001 has joined #ruby
cyong has quit [Quit: Leaving.]
postmodern has quit [Ping timeout: 246 seconds]
tatsuya_o has joined #ruby
Xeago has joined #ruby
JDHankle has quit [Ping timeout: 264 seconds]
Mon_Ouie has joined #ruby
BizarreCake has quit [Read error: Connection reset by peer]
colonolGron has joined #ruby
mercwithamouth has joined #ruby
Ciscoridze has quit [Quit: WeeChat 0.4.1]
jim0thy_ has quit [Quit: jim0thy_]
ephemerian has joined #ruby
yacks has quit [Ping timeout: 276 seconds]
codesoda has joined #ruby
camilasan has quit [Remote host closed the connection]
Ciscoridze has joined #ruby
vivekimsit has joined #ruby
Ciscoridze has quit [Client Quit]
ent_ has joined #ruby
Ciscoridze has joined #ruby
camilasan has joined #ruby
<vivekimsit>
Hi guys, I am having a weird error here. I have created a gem and all my tests are passing successfully, but when I am using it my script I am getting errors like "undefined constant named Digest". I think digest module is included by default
<vivekimsit>
My ruby version is 2
<apeiros>
vivekimsit: no, digest needs to be required
<apeiros>
it's part of stdlib, and even there it only exists if ruby was compiled with openssl present.
<vivekimsit>
sevenseacat: its strange, but requiring "date" and "openssl" modules solves my problem
<bnagy>
that is not weird
bony has joined #ruby
julweber has joined #ruby
<sevenseacat>
nope.
blaxter_ has joined #ruby
JumpMast3r has joined #ruby
<apeiros>
sevenseacat: it is
<apeiros>
but it's in stdlib
camilasan has quit [Remote host closed the connection]
<apeiros>
vivekimsit: that's the difference between core and stdlib
camilasan has joined #ruby
<apeiros>
time and date are slightly weird in that a part of their functionality is in core, but not everything. the rest is in stdlib, which means you have to require it.
<sevenseacat>
ah okay
<apeiros>
the reason being that all core must be C
<apeiros>
at least for KRI
<apeiros>
(and MRI, but MRI is dead)
<sevenseacat>
leap? sounds like it should be an instance method
<apeiros>
well, leap?(year) makes sense as a utility method, and then it doesn't belong on the instance
<bony>
I am trying to install redmine with thin and nginx. I don't get any error when i start the server but when i stop the server i get this error http://paste.debian.net/24269/
<bony>
i use debian sid
<bony>
by the way redmine is working fine with webrick
<apeiros>
as in, Date::leap? answers the question whether a given year is a leap year, Date#leap? answers the question whether the given date is in a leap year.
jibi has joined #ruby
<sevenseacat>
i guess.
<bnagy>
it is not the cleanest API you could wish for
<sevenseacat>
well if +800 is WA it has no DST because WA is pants-on-head retarded
<bnagy>
even so, offset only is 'ok' I guess
<bnagy>
as long as you don't try to compare them with timezones of make any dst calculations
<bnagy>
this is assuming that the 'internal' date is in UTC and the offset is only stored as metadata
GeissT has quit [Ping timeout: 248 seconds]
clocKwize has joined #ruby
noopq has joined #ruby
wildroman has joined #ruby
clocKwize has quit [Client Quit]
_honning_ has quit [Ping timeout: 240 seconds]
parzo has quit [Remote host closed the connection]
<bnagy>
they should just store latitudes with the timezones and then use heuristics based on distance from equator
<bnagy>
and maybe cow population
<wildroman>
Q: I want to ask a question regarding a short piece of code (about 10 lines), where should I post it (any equivalent to JSFiddle for Ruby)?
<wildroman>
(where should I post the code)
<MrZYX>
wildroman: /topic
<bnagy>
eval.in or gist.github.com
senayar has joined #ruby
parzo has joined #ruby
laurone16 has quit [Ping timeout: 264 seconds]
halle_ has quit []
anay has joined #ruby
<wildroman>
bnagy: Thanks MrZYX: Thanks as well
laurone16 has joined #ruby
<vivekimsit>
I am trying to: add_dependency "digest" in my .gemspec file of gem but I am getting error while doing gem install
<MrZYX>
it's in stdlib, just require it before you use it
<sevenseacat>
digest isnt a gem, is it
fixl has joined #ruby
<bnagy>
no, it's stdlib
<vivekimsit>
MrZYX: You say to require it before requiring my gem
<wildroman>
Question regarding the AMQP gem with EventMachine: https://eval.in/42743 This simple code fails to publish a message to AMQP. If I remove lines 11-13 (eventmachine stop) the message is published, but the code won't stop executing. How can I make sure publishing is complete and then stop the eventmachine?
<sevenseacat>
no, before your gem uses it
anay has quit [Read error: Connection reset by peer]
<bnagy>
no, require it _in_ your gem
<MrZYX>
vivekimsit: no, require it in the file you're using it, inside your gem
axeman- has joined #ruby
<vivekimsit>
oh
anay has joined #ruby
<sevenseacat>
heh we all said the same thing just slightly differently
<Nilium>
Require it like you're placing a piece of cheese down for a mouse in a very specific place
graydot has quit [Quit: graydot]
justsee has quit [Ping timeout: 240 seconds]
<bnagy>
wildroman: will the code be more complex than this, and does it _have_ to use EM?
graydot has joined #ruby
<bnagy>
because it's not a very good approach ( imho ) for clients, especially fairly trivial ones
<wildroman>
bnagy: APQN complains when not inside an EventMachine. This simple script is used for my development testing purposes, it just has to inject a task to the queue, nothing more complex.
nomenkun has joined #ruby
<bnagy>
I'd suggest using one of the sync amqp gems then
Demo_of_doom_ has quit [Read error: Connection reset by peer]
<vivekimsit>
My gem file contains Gemfile and Gemfile.lock, is it ok to push it on github
<bnagy>
zaargy: yes, don't write Java in ruby
<sevenseacat>
const_get("#{type}Chocolate").new ?
<zaargy>
bnagy: that's what i thought except that excerpt is similar to what's in design patterns in ruby
<sevenseacat>
or something like that
<zaargy>
bnagy: care to explain more?
<bnagy>
it's very hard to talk about patterns with toy code
Kabaka has quit [Remote host closed the connection]
<bnagy>
but it looks like an inheritance pattern
<bnagy>
class DarkChocolate < Chocolate
<zaargy>
er yes
<zaargy>
that's implied by the above
<sevenseacat>
no, no it is not
<zaargy>
yes it is
<zaargy>
it doesn't solve the problem
<zaargy>
of creating the right subclass on demand
Kabaka has joined #ruby
<bnagy>
just create the subclass you want to create
<bnagy>
which is why, as I said, it's hard to have these discussions in example code
<bnagy>
whatever thing knows it wants to call blahblahFactoryblah with :milk should just instantiate a MilkChocolate
<bnagy>
or if that's truly awkward, just have Chocolate and use ducktyping to handle whatever the differences are between Milk and Dark
<bnagy>
which may also be awkward, in which case maybe some other approach, I dunno
<filipe>
just switch to espresso and be done with the whole thing
<filipe>
sheesh
<zaargy>
the point is you don't want the client to know about how to make chocolate objects
<zaargy>
since the create logic might change or become more complex
<zaargy>
which motivates doing it this way in the first place
<bnagy>
uh huh
<zaargy>
i would agree that it can be hard to see that from toy code
<zaargy>
no worries. i'll wait until someone more experienced is around.
<bnagy>
:)
Emmanuel_Chanel has joined #ruby
_honning_ has joined #ruby
sevenseacat has quit [Quit: Leaving.]
jonkri has joined #ruby
renderful has joined #ruby
eka has joined #ruby
julweber has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
sjltaylor has joined #ruby
LLckfan has quit []
lurch_ has quit [Quit: lurch_]
xcv has joined #ruby
Schmidt has quit [Quit: WeeChat 0.3.5]
anne89 has joined #ruby
anne89 has left #ruby [#ruby]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
nari has quit [Ping timeout: 245 seconds]
Schmidt has joined #ruby
kaspergrubbe has quit [Ping timeout: 264 seconds]
lurch_ has joined #ruby
Guest7774 has quit [Changing host]
Guest7774 has joined #ruby
Guest7774 is now known as _veer
postmodern has joined #ruby
Lewix has quit [Remote host closed the connection]
goodgame has joined #ruby
lewis has joined #ruby
jim0thy_ has quit [Quit: jim0thy_]
lewis has quit [Remote host closed the connection]
darth_chatri has joined #ruby
blackmesa has joined #ruby
renderful has quit [Remote host closed the connection]
Bry8Star{T2 has joined #ruby
<popl>
zaargy: you said that's similar to something in design patterns in ruby -- where is it at in the book?
banister has joined #ruby
renderful has joined #ruby
vishal_ has joined #ruby
vishal has quit [Ping timeout: 240 seconds]
m8 has joined #ruby
rickruby has quit [Ping timeout: 248 seconds]
<zaargy>
popl: i htink it was that book but i don't have it to hand atm
<zaargy>
you think i am mistaken?
<popl>
no
<popl>
I don't think you are not either, though. I don't know.
ent_ has quit [Quit: Leaving]
parzo has quit [Remote host closed the connection]
rickruby has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
parzo has joined #ruby
dbcclarke_ has joined #ruby
<popl>
zaargy: Can you make that toy example work?
<dbcclarke_>
Can someone help me with my simple javascript code for a jqPLOT? My simple code isn't displaying the jqPLOT on my webpage. Code -> http://pastie.org/private/cbfamj2qmq5fwyestumzbw
<popl>
e.g. p ChocolateFactory.create(:milk).is_a?(Chocolate) # true
sjltaylor has quit [Remote host closed the connection]
<bnagy>
dbcclarke_: you might have better luck in #rubyonrails
<dbcclarke_>
I got banned for asking a question similar to this..thats why I'm here :(
<popl>
zaargy: I just get a NameError
<bnagy>
uh.. ok? Kinda not really a ruby question, is the thing
<popl>
dbcclarke_: ask in ##javascript
neo_ has joined #ruby
<popl>
oh gosh
<popl>
that's pretty spooky looking
<dbcclarke_>
I'm in ##javascript too... people arent as active there as they are in this room or the rubyonrails room
<popl>
dbcclarke_: if we wanted to answer questions about javascript then we would be in ##javascript
<popl>
:)
Maoko has joined #ruby
<bnagy>
be that as it may, questions about javascript, carpentry and the poetry of Voltaire aren't really on topic
<dbcclarke_>
k
<bnagy>
as interesting as they might be in another context
<zaargy>
popl: that's not a full example
<popl>
I don't ask ruby questions in #perl
<popl>
zaargy: can you provide a full example?
<zaargy>
popl: that's just me typing up what i remembered from what i'd read somewhere
rickruby has quit [Remote host closed the connection]
<bnagy>
that particular example would be a lot easier if they just put their logger specific code in modules
rgrinberg has quit [Read error: Operation timed out]
xybre has quit [Ping timeout: 264 seconds]
Tobarja has quit [Ping timeout: 264 seconds]
TaiftaX has quit [Read error: Connection reset by peer]
onewheelskyward has joined #ruby
scrogson has joined #ruby
paul_k has joined #ruby
<bnagy>
yeah that's not a lot better. Returning an instance of a different class from new is trivial to implement, but falls well and truly into 'nasty'
sindork has quit [Client Quit]
Tobarja has joined #ruby
<popl>
bnagy: why?
<bnagy>
well it's not really neccessary
<zaargy>
popl: the accepted answer in teh taht post i like as that fits my use case quite closely
<bnagy>
that's what mixins are for
blackmesa has quit [Ping timeout: 240 seconds]
graydot has joined #ruby
onewheelskyward has quit [Max SendQ exceeded]
<popl>
OH I see what you're getting at bnagy
<bnagy>
idiomatically ruby prefers duck typing
<popl>
ok I got you
Guest44466 has quit [Ping timeout: 248 seconds]
sindork has joined #ruby
<bnagy>
a) cause we don't even have multiple inheritance and b) because it's imho cleaner
lewis has joined #ruby
<bnagy>
like anytime you're writing is_a? or kind_of? it's a code smell
redmenace has joined #ruby
mfridh has joined #ruby
<zaargy>
no one is doing that though
vlad_starkov has joined #ruby
<popl>
basically you are
onewheelskyward has joined #ruby
relix has joined #ruby
<bnagy>
you're trying to polymorph by class instead of by behaviour, is all I'm saying
<relix>
hey guys
<relix>
that returns the result of the block you pass it, instead of the element that was "found"
<relix>
is there a command similar to Enumerable#find
Guest98488 has joined #ruby
<bnagy>
relix: uh.. you can break with a value, but not sure that's exactly what you want
<relix>
bnagy yeah I'd rather not use break
onewheelskyward has quit [Max SendQ exceeded]
<bnagy>
example use case?
yonahw has quit [Quit: No Ping reply in 180 seconds.]
<relix>
bnagy I have an array of objects (same class, say fridge), and one of those objects were sold and has a client, I want that client
zzak has joined #ruby
<relix>
jees my creativity isn't all that this morning
<zaargy>
this objection is actually discussed in the book
yonahw has joined #ruby
<MrZYX>
#find { }.client
orionstein_away has quit [Ping timeout: 240 seconds]
<zendeavor>
i just spent half an hour overengineering something in ruby
<Nilium>
Welcome to programming.
<zendeavor>
now i deleted it because it was a dumb idea
<jon_y>
was it at least Agile? :)
<Nilium>
Death be upon agile.
<zendeavor>
dafuq is "Agile"
<zendeavor>
is this a buzzword floating around the ruby community
<jon_y>
managers like Agile and Lean
<bnagy>
it's like programming but with twice as many managers
<Nilium>
A corporate buzzword that people say they follow when in fact they don't
<lupine>
Nilium, that doesn't sound very agile at all
<zendeavor>
sounds ugly
<jon_y>
you end up with specs ever changing
<Nilium>
It could also be seen as a way of trying to industrialize programming.
<jon_y>
and datelines ever looming closer
kaspergrubbe has quit [Remote host closed the connection]
<jon_y>
all the Agile apologists like to go "you're not doing it right" if you complain
niceguyjames has quit [Quit: Computer has gone to sleep.]
osvico has joined #ruby
xybre has joined #ruby
<jon_y>
nobody does it right anyway
emergion has joined #ruby
<Nilium>
Basically, managers didn't like that they weren't doing much because they're effectively useless for most of the programming and only really exist as a communication device with legs, so they came up with a way to get revenge. That revenge was Agile.
allanm has quit [Read error: No route to host]
<apeiros>
lol
<Nilium>
Another one was UML, and that went over a little better with some particularly demented programmers.
timonv has quit [Remote host closed the connection]
<apeiros>
managers and UML? that's way over most managers head…
<Nilium>
It's marketed as a thing for managers, amazingly.
<Xeago>
as a thing readable for non-technicals
<Xeago>
never seen it used as such
<Nilium>
AKA managers
<apeiros>
and agile wasn't revenge of the managers, but of the devs, to fight ever-changing specs. to deal with a reality that already existed.
<Xeago>
customers*
<Nilium>
I've never seen anyone use UML except to make their generated doxygen look prettier.
<apeiros>
heh
<Xeago>
I use it when sketching
<apeiros>
yeah, most uses of UML I've seen was indeed "look! pretty pictures!"
<Nilium>
It's probably more common in corporate environments than open-source projects.
<apeiros>
same as with "we don't need text, we have power point presentations!"
<bnagy>
managers?
<Nilium>
Class diagrams are the only useful part I can think of, since you can see how stuff is related.
amacgregor has joined #ruby
<Nilium>
That said, it's only really useful if generated from code, as opposed to building code around the diagram
<jon_y>
I like UML graphs, its pretty
<jon_y>
I don't know what drug addled reason at the time was, a supposedly Agile managed software project had classes with no public methods
<jon_y>
"oh we do object oriented programming"
<apeiros>
Nilium: well, I can see it being useful for sketching and communicating processes
<jon_y>
and end up inheriting it and using Java instaceof to find out what the object is to do anything
<Nilium>
There's a funny sarcastic article on UML I like linking to, but it's not really accurate, and some people take it too seriously.
<apeiros>
but sadly, as many tools it can be abused as "distraction"
<Fractional>
Its in the right path and everything.
nfk has joined #ruby
<bnagy>
try require_relative
tkuchiki_ has joined #ruby
<Fractional>
Works.
<Fractional>
What's the difference?
tkuchiki has quit [Read error: Connection reset by peer]
<bnagy>
they took '.' out of the default load path at some point
<bnagy>
for imho very sounds security reasons
<bnagy>
*sound
<Fractional>
Ok, thank you very much for the help! :)
<bnagy>
np
<Fractional>
I'm quite new to Ruby but I strive to get better :P
juxovec has quit [Read error: Connection reset by peer]
<Nilium>
FYI, type $: into irb.
juxovec has joined #ruby
<MrZYX>
or $LOAD_PATH (memorizes better IMO)
camilasan has quit [Read error: Connection reset by peer]
Domon has quit [Remote host closed the connection]
<Fractional>
$
<Nilium>
I have $: burned into my skull for some reason and just forget $LOAD_PATH exists.
camilasan has joined #ruby
Domon has joined #ruby
tkuchiki has joined #ruby
tkuchiki_ has quit [Read error: Connection reset by peer]
<Nilium>
It is way too hot tonight to sleep with a blanket.
vishal_ has joined #ruby
<zets>
so, I started reading The Well-Grounded Rubyist over vacation to fill in any gaps in my knowledge, and am totally loving it so far... there was a lot with the inheritance structure and objectyness that I didn't fully understand about the language. It's awesome. Does anyone have any other good Ruby books they'd recommend after I finish?
<Nilium>
Can I recommend non-Ruby books?
bigkevmcd has quit [Quit: Ex-Chat]
<zets>
sure
<Nilium>
'Cause I have no Ruby books.
<Nilium>
Anyway, get Programming Pearls.
<Fractional>
Does anyone have a book that explains more about the game developing theory than how to write the code?
bigkevmcd has joined #ruby
<Nilium>
I don't think there is a theory.
shanth has joined #ruby
<zets>
I actually have that... haven't started it. Maybe that'll be my next vacation book :)
<bnagy>
eh?
<bnagy>
there's loads, isn't there?
<Nilium>
I'm sure there are books claiming to teach you something about game dev, but I think most of them are full of lies.
<bnagy>
at least, I know people that work for game companies that can't even write a line of code
<Nilium>
Most of them are artists.
<bnagy>
nah
<bnagy>
story stuff
altamic has joined #ruby
xcv has quit [Remote host closed the connection]
<Nilium>
Well, writers count as artists.
<bnagy>
pacing, engagement blah blah
BizarreCake has quit [Read error: Connection reset by peer]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<Nilium>
That said, I don't think there's a specific theory of anything. It's mostly just you go to a studio and they have this way of doing things and another has another way and so on.
altamic has left #ruby [#ruby]
vishal__ has quit [Ping timeout: 264 seconds]
Domon has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Ping timeout: 264 seconds]
bondar has joined #ruby
shanth has quit [Quit: Leaving]
bigkevmcd has quit [Client Quit]
bigkevmcd has joined #ruby
<Fractional>
Ok. I'm no where near that point but it would have been useful if someone made a book that explained in theory how to make the game instead of giving you all the code.
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
<Nilium>
Step 1) make the game
<zendeavor>
don't get lost in the planning phase
<Nilium>
It's mostly a matter of breaking that down into whatever you need to get the game to do what you want.
<zendeavor>
you'll never write a line of code
<Fractional>
I'm trying to make a Asteroid game using the Chingu library :)
<Nilium>
You'll also likely never reuse a line of code, so don't bother.
<Nilium>
Well, don't bother trying to write generic things, anyway.
<shevy>
hashpuppy I prefer [1, 2, 3].select{|x| foo(x)} as well because the intent is instantly clear to me, whereas with &method syntax I first need to look to the right side before being able to understand what is going on, whereas with foo() or also .foo I instantly know what happens
devoldmx3 has joined #ruby
shredding has joined #ruby
<dlind>
i've written a very basic irc-bot in ruby(im just starting out), is it ok to paste a link to a pastebin in here so that people could take a look and perhaps give me some pointers on how to polish it?
zombiebit has joined #ruby
Banistergalaxy has quit [Ping timeout: 260 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<shredding>
is anyone using httparty?
<shevy>
yes pasting links here to ruby code is just fine dlind
<shredding>
I want to send a post request, where the data is just a raw body, not key / value pairs.
<shevy>
not me, have not even heard of httparty yet
<shredding>
And am failing with that.
devoldmx has quit [Ping timeout: 260 seconds]
<shredding>
shevy: interesting, i thought it was the big thing in ruby.
sambao21 has joined #ruby
evenix has joined #ruby
<shredding>
shevy: What are you using for http requests?
cowgarden has quit [Ping timeout: 264 seconds]
<dlind>
great, http://pastebin.ca/2431026 - feel free to comment on it, either in the channel or via msg :)
<shevy>
I dont know, I dont know the rails community for example
<shredding>
HTTParty looked very simple.
evenix has quit [Remote host closed the connection]
<shevy>
dunno. I only need open() usually and open-uri
evenix has joined #ruby
<MrZYX>
dlind: most people don't check argument types, if you need to use .is_a? or .kind_of?
adambeynon has joined #ruby
<MrZYX>
:: for calling methods is very uncommon
<dlind>
MrZYX: Ok, is that because the code should be "obvious" enough, making checking unneccessary?
<shevy>
dlind .is_a? is often better
awarner has joined #ruby
<shevy>
raise ArgumentError, "The first argument has to be a string" unless server.is_a? String
<MrZYX>
that and that it'll raise anyway if something else comes in
<dlind>
true
<shevy>
TCPSocket::new
<shevy>
typical
<shevy>
TCPSocket.new
<shevy>
sorry
<shevy>
the first is atypical, .new would be typical
<waxjar>
:: for calling methods is actually deprecated :)
<MrZYX>
also not checking allows to pass objects that just behave as the expected
<shevy>
yeah
<shevy>
and you can always convert inside a method
Zolo has joined #ruby
<shevy>
input = input[0] if input.is_a? Array
v0n has joined #ruby
<shevy>
or .to_s or .to_i
havenwood has joined #ruby
<dlind>
i really like ruby's compact statements
<MrZYX>
"PONG #{@server}"
<shevy>
hmmmmmm dlind
<shevy>
does your code work?
<shevy>
I never saw "def loop" before
<dlind>
shevy: it's running in the other terminal as we speak
tagrudev has quit [Remote host closed the connection]
wmoxam has quit [Changing host]
wmoxam has joined #ruby
<MrZYX>
dlind: okay, one last thing: make the methods not needed by users of your class, in your example that could be loop and register, private ones
mumble has quit [Ping timeout: 240 seconds]
<shevy>
MrZYX it looks ugly, but my brain needs extra time to see where the arguments are
hiyosi has joined #ruby
<shevy>
def foo(one, two, three)
<shevy>
def foo one, two, three
<MrZYX>
so mostly a "not used to it"
<shevy>
everything can be trained
<MrZYX>
my syntax highlighting colors method names and arguments differently, maybe that's why
<shevy>
aha
<shevy>
hmm
<shevy>
I dont even know how my editor highlights this, let's see ...
<waxjar>
real men dont use syntax highlighting!
znode has quit [Remote host closed the connection]
<MrZYX>
you're missing a stupid in that sentence
yacks has joined #ruby
<MrZYX>
"real stupid men...."
Cyrus has quit [Quit: Cyrus.sleep()]
<e-dard>
Hi, anyone here use Travis with a ruby project?
sjltaylor has joined #ruby
<waxjar>
haha
<shevy>
indeed, I see, my editor highlights the () in a specific colour
<banister>
e-dard: Yeah
sjltaylor has quit [Remote host closed the connection]
<shevy>
you use sublime MrZYX?
<MrZYX>
yup
<MrZYX>
makes the arugments italic even
<e-dard>
I'm getting "$ bundle exec rake // rake aborted! // No such file or directory - /home/travis/build/xx/yyy/config/database.yml" but I create the database.yml in the before_script of my travis.yml
<banister>
mywhich editor do you use?
graydot has joined #ruby
<e-dard>
And I right in thinking that this is running in the before_install bit?
<banister>
MrZYX: ^
teddyp1cker has joined #ruby
<shevy>
MrZYX what editor did you use before sublime?
<MrZYX>
scribes
<shevy>
hmmm
<shevy>
time to google that ...
<MrZYX>
yeah little known one ;)
kaspergrubbe has quit [Remote host closed the connection]
<wmoxam>
"lively or energetic spirit; enthusiasm; vitality."
rbento has joined #ruby
snath has joined #ruby
<MrZYX>
banister: re trying vim / emacs: I like GUI editors. I tried learning vim a few times but I don't like working with a cheat sheet permanently open for the first few weeks, GUI editors allow you to learn the tricks as you go
ghr has quit [Quit: Computer has gone to sleep.]
<shevy>
MrZYX I like GUI editors too... vim always felt as if it was for console junkies
Neomex has joined #ruby
Neomex has quit [Client Quit]
<MrZYX>
games, mail and browsing are probably the only other things I do in a GUI...
_veer has quit [Ping timeout: 256 seconds]
<shevy>
time to reinstall here, laters
shevy has quit [Quit: ""]
fyz1x has joined #ruby
fgo has quit [Remote host closed the connection]
halle_ has joined #ruby
Kabaka has quit [Ping timeout: 240 seconds]
<banister>
MrZYX: emacs has a kind of gui
ffranz has joined #ruby
devoldmx has joined #ruby
<MrZYX>
I really don't have the feeling that I'm missing anything in sublime that emacs or vim could give me
tealmage has joined #ruby
burlyscudd has joined #ruby
Kabaka has joined #ruby
kaspergrubbe has joined #ruby
<MrZYX>
and I actually like using the mouse for longer code browsing
buibex has quit [Remote host closed the connection]
Neomex has joined #ruby
<banister>
MrZYX: why i didn't know what i was missing with emacs until i started using it in anger too ;)
<banister>
MrZYX: but things like org-mode, magit, elisp and the huge package library is a major win
ImFearless has joined #ruby
<ImFearless>
Anybody fimilar with ShoesRB?
<MrZYX>
banister: I hope you know that this means nothing to somebody not familiar with it
buibex has joined #ruby
sjltaylor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<banister>
MrZYX: magit is a git interface that's pretty incredible
buibex has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
ersmith has quit [Ping timeout: 240 seconds]
TheDick_ has joined #ruby
<banister>
MrZYX: elisp is the built in programming language, everything is written in elisp, in fact you can view the editor as just another elisp application...so 'emacs' is really a smalltalk-like environment for executing elisp, the editor being just one of those live applications, which you can modify on the fly
cowgarden has joined #ruby
buibex has joined #ruby
persand has quit [Quit: persand]
senayar_ has joined #ruby
TheDick has quit [Ping timeout: 248 seconds]
codecop has joined #ruby
redmenace has quit [Ping timeout: 276 seconds]
anay has quit [Remote host closed the connection]
<MrZYX>
anyway, I've currently no workflow problems with sublime and not the feeling I'm doing any repetitive stuff in a complicated manner, so there's really no reason to relearn
nplusp has quit [Read error: Connection reset by peer]
<banister>
fairynjff
<ImFearless>
Anybody on my problem?
tealmage has quit [Ping timeout: 240 seconds]
rbento has quit [Quit: ZZZzzz…]
aganov has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
TheDick has joined #ruby
tommyvyo has joined #ruby
<MrZYX>
I might reconsider if I have to work on a bigger C(++) project, since SublimeClang is discontinued
TheDick_ has quit [Ping timeout: 240 seconds]
_veer has joined #ruby
senayar has quit [Ping timeout: 264 seconds]
tealmage has joined #ruby
<banister>
MrZYX: yeah, considering that the same guy who wrote emacs also wrote gdb, you can imagine emacs has pretty good C debugging support ;)
vlad_starkov has quit [Remote host closed the connection]
sambao21 has joined #ruby
burlyscudd has quit [Ping timeout: 260 seconds]
Tricon has quit [Ping timeout: 276 seconds]
geggam has joined #ruby
devoldmx has joined #ruby
sambao21 has quit [Client Quit]
ssvo has joined #ruby
_whitelogger has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
_whitelogger has joined #ruby
Eiam has joined #ruby
emergion has quit [Ping timeout: 260 seconds]
noname001 has quit [Ping timeout: 264 seconds]
mklappstuhl has quit [Remote host closed the connection]
Kricir has joined #ruby
burlyscudd has joined #ruby
Senjai has joined #ruby
kek has quit [Quit: kek]
Kabaka has joined #ruby
efrainolivares has joined #ruby
Voodoofish430 has joined #ruby
Astral_ has quit [Ping timeout: 264 seconds]
devoldmx has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
anay has quit [Remote host closed the connection]
d3 has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
horofox has quit [Read error: Operation timed out]
<platzhirsch>
havenwood: thanks, I opened it, too
mary5030 has quit [Remote host closed the connection]
<platzhirsch>
I would have thought it's weaved too much into the Rails code
geggam has quit [Disconnected by services]
spider-mario has joined #ruby
geggam_ is now known as geggam
<havenwood>
platzhirsch: Nope, it is only what is in that one file.
geggam_ has joined #ruby
<havenwood>
platzhirsch: You can just require that part only if you want: require 'active_support/core_ext/class/subclasses'
<havenwood>
platzhirsch: Or yeah, extract the functionality.
baroquebobcat has joined #ruby
<platzhirsch>
I find it sometimes irritating to find so many useful helpers in the Rails code
Geison_Bequer has joined #ruby
<banister>
platzhirsch: a more general (non-rails) solution is to use ObjectSpace, but dat nasty
Senjai has joined #ruby
<platzhirsch>
banister: the Rails implementation does use ObjectSpace
<platzhirsch>
how come that it is nasty?
cody-- has quit [Quit: Computer has gone to sleep.]
sayan has joined #ruby
<banister>
platzhirsch: well it's not available on all rubies afaik and it just feels hacky to iterate over all objects looking for the ones you want, rather than to have that information naturally fall out of your design ;)
cj3kim has joined #ruby
Haya has quit [Ping timeout: 260 seconds]
thepumpkin has joined #ruby
<platzhirsch>
banister: true, it handles it differently for JRuby
mercwithamouth has quit [Quit: leaving]
<banister>
platzhirsch: can u show me the jruby code?
goleldar has joined #ruby
mercwithamouth has joined #ruby
senayar has quit [Remote host closed the connection]
<platzhirsch>
though nice, with subclasses I can now generate the view even more generically, by just looking up the number of classes there are
nanoxd has joined #ruby
<banister>
platzhirsch: if you have control over the classes, u might consider adding an inherited() hook to keep track of it
<platzhirsch>
banister: could you elaborate, what is the use case?
<banister>
if you have this code in a tight loop in particularl, the ObjectSpace approach (i'm guessing, though not 100% sure) could be extremely expensive
<banister>
platzhirsch: to keep track of subclasses
<apeiros>
ObjectSpace is really nothing for production
<banister>
platzhirsch: or you could design things in a different way to avoid it altogether
<yxhuvud>
at least not iterating over it. it can be nice to have around if one have to do GC bindings for something.
<lectrick>
Is there an encryption algorithm out there which is very secure and intentionally slow?
<platzhirsch>
I am sorry, I have no idea how inherited() could be implemented. I mean I could simply cache the number of classes if called for the first time
<lectrick>
I know bcrypt but that's a hashing algorithm not an encryption algorithm
<_br_->
lectrick: What is the purpose? Storing passwords?
interactionjaxsn has quit [Remote host closed the connection]
<Celelibi>
Fuuuu.... the client does nothing but a REST post.
interactionjaxsn has joined #ruby
<lectrick>
_br_-: Yep. Private keys in this case
YaNakilon has quit [Ping timeout: 264 seconds]
interactionjaxsn has quit [Read error: No route to host]
<lectrick>
_br_-: I'm aware that that's possibly the ONLY valid use case, but anyway.
interactionjaxsn has joined #ruby
xcv_ has joined #ruby
<_br_->
lectrick: You want to encrypt private key files to protect them from 3rd party use when accessed by encrypting them via bcrypt?
<predator117>
:b haskell
bricker`LA has quit [Ping timeout: 240 seconds]
<lectrick>
_br_-: Not via bcrypt. Bcrypt is a hash. I need actual encryption, which would get you back the original data. two way not one way
<atno>
i want to get into haskell one of this days
<atno>
i just dont have a project that needs haskell yet
<atno>
sad story :(
rbento has quit [Quit: ZZZzzz…]
<shevy>
nobody needs haskell
<_br_->
lectrick: I see. How is this going to be stored? In a database? Filesystem?
shredding has quit [Quit: shredding]
thepumpkin has quit [Remote host closed the connection]
Astralum has quit [Read error: Connection reset by peer]
cody-- has joined #ruby
jerius has joined #ruby
Astralum has joined #ruby
includex has quit [Quit: Leaving...]
<Celelibi>
what is the ! at the end of a line?
<_br_->
lectrick: You could just use a symmetrical encryption to encrypt your private key again. But depending on the system it would probably make more sense to just encrypt the entire partion.
efrainolivares has quit [Quit: efrainolivares]
xcv has quit [Ping timeout: 240 seconds]
<shevy>
Celelibi part of a method name
<alpha123>
Celelibi: Probably a method name, what's the code?
mumble_ has quit [Ping timeout: 256 seconds]
YaNakilon has joined #ruby
intuxicated has joined #ruby
<Celelibi>
Distem::NetAPI::ServerNode.run!
<apeiros>
the name of the method is 'run!'
<Celelibi>
ok
<apeiros>
! are allowed as last character of a method name. as is ? and =
<apeiros>
the latter can be called with spaces between the rest of the name too:
<shevy>
no fixed one, you could just append a ? or ! to all of your methods
theRoUS has quit [Read error: Operation timed out]
<apeiros>
Celelibi: ! means "be careful"
Kricir has quit [Remote host closed the connection]
<lectrick>
_br_-: Scrypt looks like a possibility.
<lectrick>
It also has a ruby gem.
<apeiros>
often ! and non-! are paired and the !-one is in-place/mutates while the non-! returns a new object
<_br_->
lectrick: Scrypt is also a hashing based scheme
<apeiros>
Celelibi: ? usually returns true/false
devoldmx has quit [Read error: Connection reset by peer]
<_br_->
lectrick: just with a memory working factor
<lectrick>
_br_-: To be stored in a filesystem or database. I want to assume either can be accessed via unknown future security hole
<apeiros>
and foo= methods are obviously for assignments
thepumpkin has joined #ruby
<lectrick>
What if I just run AES on the same data thousands of times?
Al_ has quit [Quit: Al_]
julweber has quit [Remote host closed the connection]
<Celelibi>
ok
<_br_->
lectrick: AES has two modes (block, stream) depending on the mode running it multiple times it won't do much security improvement wise.
<apeiros>
Celelibi: in my example, `x.a = 1` calls the method 'a=' on the object referenced by 'x' with a single argument '1'
<lectrick>
_br_-: no extra resistance to brute forcing?
<apeiros>
e.g. it could also be written as `x.a=(1)`
devoldmx has joined #ruby
havenwood has quit [Remote host closed the connection]
<_br_->
lectrick: If you are really paranoid about this, then your best bet is to put your key printout in a safe and your digital copy on a usb you carry around with you and remove all other occurances.
<_br_->
(usb utlizing encrypted fs)
banister has quit [Remote host closed the connection]
<_br_->
lectrick: AES being one of the SHA2 family is considered, nearly obsolete btw. by NIST. You might want to check out the new ones out there. DJB has always interesting works regarding this. Though again, depends on the usecase stream, block etc.
efrainolivares has joined #ruby
val___ has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
mumble_ has joined #ruby
banister has joined #ruby
dodosan has joined #ruby
<Celelibi>
Do the @ in front of variable have a special meaning?
tatsuya_o has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
<Celelibi>
Maybe it's just an instance attribute mark.
<_br_->
Celelibi: Instance variables have one @, class variables two @
<banister>
Celelibi: Yeah
<Celelibi>
ok
<banister>
Celelibi: thinks of it as this. in js :)
pkrnj has joined #ruby
<_br_->
Urk, JS and scoping.
<Celelibi>
I don't think @ is allowed in js. :)
<Celelibi>
Ah, yes, "this.".
<Celelibi>
ok ok
rbento has joined #ruby
devoldmx has joined #ruby
<banister>
though it's not quite the same, because @vars can only be accessed from within the object
twoism has joined #ruby
c0rn has quit [Ping timeout: 256 seconds]
graydot has quit [Quit: graydot]
sambao21 has joined #ruby
robscomputer has joined #ruby
<Celelibi>
_br_-: JS scoping is still better than Python's scoping. :p
kirun has joined #ruby
<Celelibi>
(yay, troll!=
<Celelibi>
)
robscomputer has quit [Remote host closed the connection]
arya__ has joined #ruby
arya__ has quit [Client Quit]
efrainolivares has joined #ruby
robscomputer has joined #ruby
arya__ has joined #ruby
xcv_ has quit [Remote host closed the connection]
c0rn has joined #ruby
arya__ has quit [Client Quit]
xcv has joined #ruby
dankest has quit [Read error: Connection reset by peer]
dankest has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<ryannielson>
I'm looking to interact with the Facebook graph API. Can anyone with experience in Kaola and fb_graph comment on which I should be using?
havenwood has joined #ruby
Eiam has joined #ruby
mansi has joined #ruby
AndChat| has joined #ruby
Dan_ has joined #ruby
louism2wash has joined #ruby
w3pm has joined #ruby
Dan_ is now known as Guest47288
devoldmx has joined #ruby
cads has joined #ruby
Guest47288 has quit [Client Quit]
dankest has quit [Ping timeout: 256 seconds]
Banistergalaxy has quit [Ping timeout: 276 seconds]
devoldmx has quit [Read error: Connection reset by peer]
interactionjaxsn has quit [Remote host closed the connection]
mrsolo has joined #ruby
dankest has joined #ruby
tvw has quit []
interactionjaxsn has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
Diranged has joined #ruby
<Diranged>
whats the best soap client framework to use today in ruby (without using savon, because it requires libraries that are not always available)
<louism2wash>
Hey everyone, I have an array of objects that I would like to mark as frozen if a certain criteria is met. However, I feel like marking the array as frozen isn't semantically correct as I am not explicitly trying to prevent any further object manipulation. Is there any sort of method that I could use that changes the object state that doesn't have some sort of semantic meaning?
tealmage has quit [Remote host closed the connection]
<_br_->
Diranged: Check rubytoolbox, thats normally helpful with questions like that.
pentameter has quit [Read error: Operation timed out]
jonkri has joined #ruby
burlyscudd has quit [Quit: Leaving.]
banister has quit [Remote host closed the connection]
<_br_->
louism2wash: Hm, why not wrap it into your own ADT. Then you can model it just the way you want.
interactionjaxsn has quit [Ping timeout: 240 seconds]
<louism2wash>
_br_-: ADT?
Kricir has joined #ruby
fernandoaleman has joined #ruby
Zolo has quit [Remote host closed the connection]
<_br_->
louism2wash: Abstract Datatype. If on newer rubies, you can maybe play with refinements and add something to array if needed.
teddyp1cker has quit [Ping timeout: 264 seconds]
xcv_ has joined #ruby
<louism2wash>
_br_-: I'll look into abstract datatypes. I guess I could also look into altering the array class and adding an instance variable to that array
io_syl has joined #ruby
<_br_->
louism2wash: Don't do namespace pollution (monkeypatching). Make sure to keep it clean and local.
fernandoaleman has left #ruby [#ruby]
endash has quit [Quit: endash]
xcv has quit [Ping timeout: 260 seconds]
runixo has quit [Ping timeout: 264 seconds]
parzo has quit [Remote host closed the connection]
mumble_ has quit [Ping timeout: 276 seconds]
shevy has quit [Quit: Leaving]
parzo has joined #ruby
apeiros has joined #ruby
shevy has joined #ruby
amacgregor has joined #ruby
Banistergalaxy has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
julweber has joined #ruby
<Celelibi>
I suppose << is an append operator to an array.
mary5030 has joined #ruby
fermion has quit [Ping timeout: 248 seconds]
sambao21 has joined #ruby
<alpha123>
Celelibi: correct, if you're familar with JavaScript it's like Array#push
Kricir has quit [Ping timeout: 260 seconds]
gz0 has quit [Ping timeout: 256 seconds]
Kricir has joined #ruby
eldariof has joined #ruby
fermion has joined #ruby
julweber has quit [Remote host closed the connection]
AndChat| has quit [Ping timeout: 264 seconds]
saarinen has joined #ruby
DrShoggoth has joined #ruby
popl has joined #ruby
rbento has quit [Quit: ZZZzzz…]
TheDick has quit [Quit: TheDick]
Shirakawasuna has quit [Ping timeout: 260 seconds]
<cads>
Hey guys, I'm in linux, and I'd like to play sounds with ruby, for a meditation app I'm mocking up
zombiebit has joined #ruby
pentameter has joined #ruby
<cads>
I've seen win32snd and SDL libraries, and the latter may be applicable
<cads>
but I'm wondering if I can avoid having to have SDL as a dependency - gstreamer might be good here
devoldmx has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
browndawg has quit [Quit: Leaving.]
<cads>
I'd like an interface that's as simple as include "Soundgasm" ; Soundgasm.play("sound.wav")
moos3 has joined #ruby
pentameter has quit [Read error: Operation timed out]
parzo_ has joined #ruby
interactionjaxsn has joined #ruby
xcv_ has quit [Remote host closed the connection]
<_br_->
cads: Try ruby-audio, depdends only on libsndfile as far as I remember
<cads>
thanks br, I'll evaluate that
banister has joined #ruby
<cads>
huh, it turns out I can use the commandline `play` command
tonini has joined #ruby
<_br_->
I though you wanted a ruby solution?
devoldmx has quit [Read error: Connection reset by peer]
<_br_->
"19:10 < cads> Hey guys, I'm in linux, and I'd like to play sounds with ruby"
Nisstyre-laptop has joined #ruby
devoldmx has joined #ruby
dallasm has joined #ruby
parzo has quit [Ping timeout: 264 seconds]
tatsuya_o has quit [Remote host closed the connection]
<banister>
_br_-: is your name short for Breehy-hinny-brinny-hoohy-hah ?
athst has quit [Quit: athst]
breaking_ has joined #ruby
<cads>
_br_-: the code that triggers the sound is ruby, so for prototyping purposes I can quote the command using backticks
jerius has quit [Read error: Operation timed out]
Mattias has quit [Ping timeout: 268 seconds]
breakingthings has quit [Ping timeout: 264 seconds]
mark_locklear has quit [Ping timeout: 248 seconds]
<Celelibi>
banister: Pronounced more like Bjoern Rennhak I think.
devoldmx has quit [Read error: Connection reset by peer]
<alpha123>
cads: At least on my Arch system the command is `aplay' so if you do go the shell command route itn's not very portable
<_br_->
banister: You have a very weird imagination.
<Lanser>
cads, I raise my bottle of wine to your level of retardation!
<_br_->
Not quite, there was a follow up paper that corrected it to 5+/-2
<cads>
ah, that's right - I tend to add the 'minus two' to account for my own retardicity
Lanser has left #ruby ["Leaving"]
Lanser has joined #ruby
Haya has joined #ruby
Lanser has left #ruby ["Leaving"]
<cads>
hehe, I love you too, Lanser
<banister>
_br_-: 5 +- 2 seems more accurate :)
<apeiros>
too stupid to part?
<_br_->
banister: Semantics my friend :]
<banister>
_br_-: speaking from my own experience :)
athst has joined #ruby
<apeiros>
needed 2 tries…
<alpha123>
banister: Indeed, since those are all prime numbers. :P
alvaro_o has joined #ruby
v0n has quit [Remote host closed the connection]
<banister>
alpha123: hehe
<banister>
good point
<banister>
3, 5, 7
<cads>
hmm, if anything 7 +- 2 invokes a compositive number - icky
v0n has joined #ruby
<cads>
composite*
<_br_->
Though I would be very careful with the Psych papers. There is a big review going on of the entire field, because of the malpractice and cooked up results in too many papers.
<banister>
_br_-: i feel the same way about nearly every subject in the 'social sciences' :)
<yxhuvud2>
no, not all subjects are smart enough to do reviews yet
teddyp1cker has quit [Remote host closed the connection]
alem0lars has quit [Quit: Leaving]
<banister>
_br_-: did you see chomsky's withering attack on 'social science' ? :)
devoldmx has joined #ruby
<_br_->
banister: You have to love the stuff Chomsky comes up with. Not quite aware of that one though, any link? Still a big fan of his "Manufacturing concent" and other works.
zooz has joined #ruby
snovak is now known as snovak|away
zooz has left #ruby [#ruby]
<cads>
hey alpha123, turns out that I have aplay as well - `play` is part of sox, the 'swiss army knife of audio processing', while `aplay` is short for 'alsa-play', and is part of alsa-utils
<banister>
_br_-: quite lol "they look at the friends at the physics department and decide they want that too. 'They have big words, we'll have big words. They talk incomprehensibly, we can talk incomprehensibly'"
<banister>
i lol'd
<_br_->
:D that would be awesome.
julweber has joined #ruby
jellosea has joined #ruby
<Nilium>
shevy: It already is a gem.
lessless has quit [Remote host closed the connection]
<jellosea>
hey, if i read a string from a file which has #{some_var} in it and i want ruby to do the substitutions, how do i do so
earthquake has quit [Quit: earthquake]
marcgg_ has joined #ruby
<_br_->
jellosea: Load it with ERB ?
marcgg has quit [Read error: Connection reset by peer]
c0rn has quit [Quit: Computer has gone to sleep.]
thepumpkin has quit [Remote host closed the connection]
Xeago has joined #ruby
<jellosea>
_br_-: how?
<banister>
_br_-: haha, that's cool
<cads>
It's funny that the person uploading the video characterizes it as an attack against postmodern feminism and marxism
<banister>
_br_-: thanks for the link
<louism2wash>
Hey Everyone, I know about singleton methods but are there singleton attributes? Can I add an attribute to a class instance?
<cads>
really it would tend to attack any field that wants to use complicated theory without the backing of formal methods
<_br_->
banister: I'm trying to do a distance learning B.Sc. currently in Psych, but I don't know. Its so much "blah blah" compared to CS (done before). This stuff is interesting and you can see why people like Marvin Minsky etc. are enticed by it, but cutting through the "blahblah" is tricky stuff and Physics envy doesn't help.
c0rn has joined #ruby
<shevy>
Nilium waht is the name?
hashpuppy has quit [Quit: Computer has gone to sleep.]
<Nilium>
Ironic, considering I tell people not to write generic game things.
<banister>
_br_-: cool
<cads>
_br_-: hmm, I like the idea of physics envy as a honest effort to mathematicize' a field, not just throwing around math sounding jargon
<Nilium>
Granted I'm trying to only cover a few things in that.
<banister>
_br_-: maybe you can combine what you learn there with your CS background and build the next generation AI ?:P
earthquake has joined #ruby
<_br_->
banister: I wish. Still feels so far away. Did a PhD in Robotics, so its the right direction, but AI is so big and difficult. Any hints how to solve it ? :)
mark_locklear has joined #ruby
<Nilium>
You don't solve AI, you just wait for an AI to solve AI.
<cads>
_br_-: I defniitely think, psychology, for example, benefits when high quality statistical tools are used.. but to my understanding the theoretical assumptions behind the tools tend to be complex enough that it becomes easy for a practitioner to apply principles in situations where they're invalid
<banister>
_br_-: wow, you got a phd in robotics? that's awesome
blaxter has quit [Ping timeout: 256 seconds]
<cads>
like assuming some variable has a normal distribution, when really there's no reason to make that assumption
devoldmx has quit [Read error: Connection reset by peer]
<_br_->
Nilium: Ah, waiting for the singularity, well we are all doing that. But do you think its feasible? Really?
<Nilium>
It's a joke, not a serious statement.
thebastl has quit [Remote host closed the connection]
<banister>
_br_-: did you do anythign with that or just move straight into software development?
rdxc has joined #ruby
<_br_->
cads: There is good psych papers out there sure. Focus on statistics helped alot, depends what direction you go. Most of the "bio" inspired psych is pretty interesting and based on decent science, seems. (not expert in this though)
Mattias has joined #ruby
<_br_->
banister: Detour currently with own startup :/
<banister>
_br_-: cool, got a link to your startup ? (i assume it has a web presence :)
<_br_->
Its really a detour from robotics, its applied Computer Vision for the garment industry. Kinda need to make some money currently :). http://clothesnetwork.com
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
snovak|away is now known as snovak
devoldmx has joined #ruby
juxovec has joined #ruby
cj3kim has quit [Remote host closed the connection]
<_br_->
Btw. if any of you guys are in/around london, let me know. Beers on me.
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
renderful has joined #ruby
<Nilium>
That could get expensive with a channel of ~850 people
<_br_->
Ah, good point! :)
<Nilium>
"But no I meant banister and such-" "Betrayer!"
<jellosea>
hey, if i read a string from a file which has #{some_var} in it and i want ruby to do the substitutions, how do i do so
<cads>
_br_-: may I ask what sorts of CV libs you guys build off of?
parzo_ has quit [Remote host closed the connection]
<alpha123>
jellosea: Just use a real template system.
Haya has quit [Read error: Connection reset by peer]
efrainolivares has joined #ruby
Kricir has joined #ruby
<alpha123>
jellosea: I'd stick with ERb but you could try eval'ing the string. IMO that's a bad solution though, just go with ERb
ninegrid has quit [Ping timeout: 260 seconds]
<banister>
_br_-: just as an aside, did you ever understand wavelets? :)
<_br_->
cads: Libs? Actually there are many cool CV libs, but as it turns out they are really inconsistent over time. e.g. OpenCV C++ interface changed so much over the versions that its not funny anymore and also internals which mess up computations. So we use some libs like BoefCV, OpenCV etc. just a basis and build our own stuff.
mengu has joined #ruby
<_br_->
banister: Yeah, wavelets are alot of fun, why?
kaspergrubbe has quit [Remote host closed the connection]
Haya has joined #ruby
<apeiros>
_br_-: nice, what are you using those CV libs for?
<banister>
_br_-: i did a bunch of image analysis stuff a while ago (when i was writing my own image manip library), and though i mastered fourier techniques i never got my head around wavelets
<_br_->
Kind of weird I got into this. Its really a detour for me :/
tvw has joined #ruby
<_br_->
anyway money...
<_br_->
banister: Cool, opensource?
<banister>
yeah
<banister>
brb dinner
<_br_->
banister: Wavelets have so many usecases. Understanding and using it can be super useful for the future. Used it e.g. for smoothing of high frequency components, also compression naturally (jpeg e.g. works based on these factorizations) etc etc.
hamakn has quit [Remote host closed the connection]
<cads>
_br_-: yeah, I've been having a hard time of finding succinct and stable opencv libraries. Pyopencv seems like the ticket for now. The latest version of opencv seems to have left the haskell interface in the dust. You guys wouldn't be experimenting with CV bindings for ruby, would you?
hamakn has joined #ruby
Fire-Dragon-DoL has joined #ruby
<apeiros>
_br_-: interesting
sambao21 has quit [Quit: Computer has gone to sleep.]
nadirvar_ has joined #ruby
<_br_->
Ah I wish cads. I really love ruby, but most researchers in our company only speak C++ or Matlab :/.
thebastl has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
fermion has quit [Quit: Computer has gone to sleep.]
pkremer has joined #ruby
athst has quit [Quit: athst]
llirkaz has quit [Ping timeout: 248 seconds]
shredding has joined #ruby
Matriks has quit [Remote host closed the connection]
<shredding>
I have a method in ruby that accepts a client_id and an api_key and builds an internal @hashed_key out of them.
<shredding>
The @hashed key is used in various methods.
<shredding>
Would i test if the @hashed_key is set correctly in the initialize (and if yes, how)?
kaspergrubbe has quit [Read error: Connection reset by peer]
<shredding>
Or is it best practise to only test the public api.
kaspergrubbe has joined #ruby
<shredding>
I'n python i'd do the first, but there are no internal properties.
<shredding>
(i use rspec, or at least i try to)
superscott[8] has joined #ruby
llirkaz has joined #ruby
llirkaz is now known as Guest11254
RichardBaker has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
gz0 has joined #ruby
Guest74111 is now known as Amnesia
Amnesia has quit [Changing host]
Amnesia has joined #ruby
<Nilium>
"But no I meant banister and such-" "Betrayer!"
<Nilium>
Bah, you're not the terminal window.
* Nilium
smacks his cmd+tab
<Banistergalaxy>
Betray what?
pothibo has quit [Quit: pothibo]
<cads>
_br_-: I have an inkling that more and more FOSS is becoming a viable strategy in the platform services model. Clients are attracted to build on the platform's FOSS libraries and apps, and they become paying customers to leverage the platform's mature infrastructure and consulting services.
frewsxcv has joined #ruby
<Celelibi>
damn
frewsxcv has left #ruby ["Leaving"]
<Celelibi>
the interface creation happen at the lxc level. :(
tonni has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
iliketurtles has quit [Quit: zzzzz…..]
lewis has joined #ruby
<_br_->
shredding: Well, normally such a construction of keys is a function. It terms of testing, you could work on C0 (prototype level) and onward C1 etc. until you feel sufficiently confident. In RSpec you normally would use fixtures or mock data to see if input / output is correct I suppose.
dr_bob has joined #ruby
fcahoon has joined #ruby
<shredding>
_br_-: I start with testing the base class of my gem and the initialize methods does roll out everything, so basically i can't inject mocks there.
dr_bob has left #ruby [#ruby]
<_br_->
cads: Yes, thats a really popular model these days. It seems to work, but still not quite sure, its also difficult foss'ing a product if you are dealing with complex algorithms which take long r&d time unfortuantely.
<_br_->
shredding: Initialize doesn't call other functions to do this kind of work?
robustus has joined #ruby
Matriks has joined #ruby
nadirvar_ has joined #ruby
<shredding>
_br_-: I have for example @rest = RestRequest.new
<shredding>
Should i put that in a dedicated class?
<Celelibi>
_br_-: you were right, strace has been a great help since the interface creation is done outside of ruby.
<shredding>
method
<_br_->
Abstraction wise? Uff, difficult to say with so little info, shredding.
<_br_->
Celelibi: Cool, did you find the issue?
halle_ has quit []
<Celelibi>
not yet.
<shredding>
_br_-: Given I do that, can i mock parts of a class.
devoldmx3 has quit [Ping timeout: 248 seconds]
<Celelibi>
But I see what I may have to change.
<_br_->
Ah, keep at it, hope you can solve it.. celelibi. Otherwise, if I remember correctly, its possible to attach to running ruby sessions with Pry and alike, which could help to tap into running code.
<Celelibi>
It's not a ruby problem anymore.
<_br_->
ah, never mind then
k610 has joined #ruby
brennanMKE has quit [Remote host closed the connection]
ryannielson has left #ruby [#ruby]
<shredding>
The cool thing, when i do this RestRequest.new in a dedicated class is, that i can accept a class as param.
pranny has joined #ruby
Demo_of_doom has quit [Read error: Connection reset by peer]
<shredding>
It's my very first ruby program, so don't get a heartattack : )
<shredding>
I want to start with testing this class.
<shredding>
But i guess i'm can figure the most stuff out.
Nisstyre has quit [Quit: Leaving]
ananthakumaran has quit [Quit: Leaving.]
shaunbaker has joined #ruby
<_br_->
No worries, every start is difficult, you'll get the hang of it quickly.
Evixion has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
<shredding>
It's fun splitting up the stuff in multiple methods.
earthquake has quit [Quit: earthquake]
<shredding>
I'm really surprised with how little code i can get away most of the time.
<_br_->
shredding: Well, testing wise the Ruby community is big on TDD/BDD (not sure if you are aware or follow that). RSpec is one way, there is also Minitest from the seattle guys and cucumber if you like to go a level higher with business logic. Probably a good idea to look into would be metric_fu gem, it contains alot of fun things such as measuring code complexity, code smells, coverage etc.
Evixion has joined #ruby
<_br_->
Wasn't there a really fun primer video somewhere on this from a past rubyconf.. hm
<shredding>
_br_-: I'm trying to get behind PHP and have done a lot of python. I'm very big fan of tdd and it was one of the reasons i started to learn ruby.
Matriks has quit [Remote host closed the connection]
mengu has quit [Quit: This computer has gone to sleep]
i_s has joined #ruby
pranny has quit [Quit: Leaving.]
i_s has quit [Remote host closed the connection]
maxmanders has joined #ruby
JimmyAtCMU has joined #ruby
wald0 has joined #ruby
<wald0>
how i can know from where it comes the File.open code ? I want to read how works the "each" class on it
maxmanders has quit [Max SendQ exceeded]
kpshek has joined #ruby
amacgregor has quit [Ping timeout: 264 seconds]
maxmanders has joined #ruby
<Mon_Ouie>
You mean the implementation? It's written in C (for YARV or however we call it now)
kpshek has quit [Client Quit]
<Mon_Ouie>
In Pry you can look it at it using '$ File#each'
devoldmx has joined #ruby
jaynewstrom has quit [Remote host closed the connection]
fcahoon has quit [Quit: Leaving]
jaynewstrom has joined #ruby
<wald0>
in C ? mmh... well, im reading a ruby book and i have see that the File.each processes LINES, not words or other things, so i wanted to read the code to see how deals it differently
Krajsnick has joined #ruby
<wald0>
Mon_Ouie: that not showed me much info
<_br_->
Mon_Ouie: Isn't 2.x still just the continuation of YARV?
hamakn has joined #ruby
<Mon_Ouie>
It probably is, I just don't really follow the names people call it
Kricir has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
maxmanders has quit [Ping timeout: 246 seconds]
companion is now known as Companion
devoldmx has quit [Read error: Connection reset by peer]
rbento has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
devoldmx has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 0.4.1]
hamakn has quit [Ping timeout: 264 seconds]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
kaspergrubbe has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
<wald0>
what is the common way to read the documentation of ruby? for example, i want to know how to use the "each" class for the File... module?, well, File.each, (its parameters, details, etc)
<wald0>
_br_-: thx, after to read the first chapter of "pro git" i understood how important is to understand correctly the internals :)
<_br_->
Hm, wald0 do you mean pure Ruby API or Ruby VM internals?
vince_prignano has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
<wald0>
_br_-: I think that VM internals (in other words, how to use File.each, which options i have available, etc)
lewis has quit [Remote host closed the connection]
<_br_->
Hm, I think I misunderstood you. So you want a good beginner level ruby intro book?
athst has joined #ruby
<JimmyAtCMU>
Hello, I'm kind of confused with the Classes and Modules in Ruby, and in my implementation of a simple class (https://gist.github.com/ymzong/e7ea65a3c89319434be3), Ruby gives me an error that I don't understand. Could someone help me tell what has gone wrong?
<_br_->
wald0: Try Pickaxe or Poignant Guide for ruby. Depends on your taste.
<shevy>
JimmyAtCMU, that is easy, you have no method called .association_cache=
<JimmyAtCMU>
shevy: I know, but I thought the definition on Line 24 would work.
<shevy>
are you calling it
<shevy>
you are not showing the whole code
<shevy>
association_cache= resides in the module AssessmentAssociationCache
brbcoding has quit []
mengu has joined #ruby
<JimmyAtCMU>
shevy: So, in this case, how would I be able to call that?
saarinen has quit [Quit: saarinen]
<shevy>
if it resides in a module, typically include that module first
<shevy>
add: include AssessmentAssociationCache
tealmage has quit [Read error: Connection reset by peer]
punkrawkR has joined #ruby
tealmage has joined #ruby
<JimmyAtCMU>
shevy: Thanks! where should I put the "include" line?
<shevy>
before calling using the code that calls it of course
<shevy>
as said you are not showing your whole code right now
hashpuppy has joined #ruby
i_s has joined #ruby
babykosh has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
ArchBeOS is now known as ArchBeOS-thug-ry
iliketurtles has joined #ruby
ArchBeOS-thug-ry is now known as ArchBeOS-riding
kaspergrubbe has joined #ruby
<wald0>
_br_-: i checked some books for start with ruby and i selected the one called "beginning ruby" (its contents looked to me nicer than others, very well explained)
Kricir has joined #ruby
<wald0>
by other side maybe a bit noobish, but after page 240 i still happy reading it
fermion has joined #ruby
sjltaylor has joined #ruby
<wald0>
_br_-: about the previous question, let's say I want to use File.open("foo.txt").each, where i need to go for read "how ot use it" ?
cody-- has quit [Quit: Computer has gone to sleep.]
BayaBaya has quit [Quit: Leaving]
* wald0
loves ctags when editing C code
lewis has joined #ruby
platzhirsch has joined #ruby
<platzhirsch>
is it possible to make kind of recursive calls inside a block? For instance if I iterate over a list of values, I want to apply a method and apply the method again on the results until I receive nil, empty array or what so ever
<platzhirsch>
or do I simply have to stick to a loop or actual recursive call?
juxovec has quit [Remote host closed the connection]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jds_ has quit [Remote host closed the connection]
pentameter has joined #ruby
banister has joined #ruby
blip- has quit [Ping timeout: 260 seconds]
juxovec has joined #ruby
intuxicated has joined #ruby
peregrine81 has joined #ruby
Companion is now known as companion
thetristan has joined #ruby
<wald0>
i can use .each for iterate over array elements, but when using as File.open("foo.txt").each it iterates over lines, why? (im trying to understand how this works exactly)
jds_ has joined #ruby
Nisstyre-laptop has joined #ruby
eldariof has quit [Ping timeout: 260 seconds]
snath has quit [Read error: Connection reset by peer]
allsystemsarego has quit [Quit: Leaving]
snath has joined #ruby
juxovec has quit [Ping timeout: 264 seconds]
forced_request has joined #ruby
<i_s>
wald0: that is just how the people who wrote those classes chose to implement .each, nothing more
mark_locklear has quit [Ping timeout: 248 seconds]
sarkis has joined #ruby
<i_s>
you could make your own class and make .each do whatever you want
mary5030 has quit [Remote host closed the connection]
earthquake has joined #ruby
marcdel has joined #ruby
jds_ has quit [Ping timeout: 260 seconds]
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
chriskk has joined #ruby
<shevy>
wald0 dunno, can't you just use .readlines() instead?
cowgarden has quit [Ping timeout: 264 seconds]
<shevy>
is anyone of you guys using windows? I am considering switching back to windows but only if ruby works on it
krawchyk has quit [Remote host closed the connection]
<havenwood>
shevy: Back to Windows from what?
parzo_ has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
k610 has quit [Quit: Leaving]
<shevy>
havenwood linux
c0rn has joined #ruby
parzo has joined #ruby
<shevy>
the real problem is that it takes too much time :(
louism2wash has quit [Quit: This computer has gone to sleep]
<wald0>
shevy: i dont want to start a flamewar but... why you would want such (crazy) thing?
<havenwood>
wald0: Array#each, Enumerable#each, IO#each, etc are each entirely different methods with their own implementation. Click method to see the source:
<wald0>
shevy: i mean, for me to try to work on windows is an extremely lose of time by lots of reasons
<shevy>
wald0 I spend too much time with things that take away more of my time away
Guest11254 is now known as llirkaz
llirkaz has quit [Changing host]
llirkaz has joined #ruby
<shevy>
like setting things up properly again
<wald0>
shevy: mmh, for example?
<shevy>
wald0 getting my editor to work. it requires gtk2
apeiros has left #ruby [#ruby]
apeiros has joined #ruby
vlad_starkov has joined #ruby
Nisstyre-laptop is now known as Nisstyre
<wald0>
shevy: i think that this is a bit relative to the distro, if you use a stable system like debian (stable, so wheezy) you should not have those problems... the good thing is that everything that you configure for yourself stays forever
<apeiros>
yes. all your misdeeds will be visible FOREVA!
robbyoconnor has joined #ruby
devoldmx has joined #ruby
huoxito has quit [Quit: Leaving]
<shevy>
step by step I approach 2.0.0
Badreddin has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Ping timeout: 276 seconds]
cowgarden has joined #ruby
<wald0>
shevy: which distro you used ?
<shevy>
wald0 all of them
jds_ has quit [Ping timeout: 264 seconds]
tealmage has quit [Remote host closed the connection]
<shevy>
wald0 they all will limit me in different ways. I want versioned directories. I want to permanently switch between rolling releases
Kricir has quit [Remote host closed the connection]
smathieu_ has joined #ruby
<wald0>
I see ruby full of power, possibilities, and infinite features, I see multiple ways to do things better than others, how you guys do for remember everything since there's so much things ?
<shevy>
my editor easily works when the right .so files are available, but in most distributions these are too old or in conflict with other files
<shevy>
wald0 dunno, I try to keep a good local knowledgebase about ruby and continually add to it slowly
parzo_ has joined #ruby
<shevy>
and lots of snippets and (hopefully still working) examples
<shevy>
for me ruby is a lot more important than the underlying OS
efrainolivares has quit [Quit: efrainolivares]
mklappstuhl has joined #ruby
ehaliewicz has joined #ruby
<wald0>
shevy: i understand your "problem" in linux, but do you really think that this can improve in windows? anyways... for directories you can simply start a git repo locally, for stable system use a stable distro, and if you want to have and extremely-versioned-able system I suggest you to make a look to NIXOS packaging system
tommyvyo has quit [Quit:]
baordog has quit [Remote host closed the connection]
jefflyne has joined #ruby
jds_ has joined #ruby
snath has quit [Read error: Connection reset by peer]
<shevy>
wald0 it can insofar that once things would "work" I would not have this insane amount of extra problems I get when any fancy dev decides to upgrade something
burlyscudd has joined #ruby
<_br_->
apeiros: Isn't the last line with "other public logging is prohibited" a bit silly? Does that mean my bouncer log is illegal?
amacgregor has joined #ruby
smathieu has quit [Ping timeout: 248 seconds]
earthquake has quit [Quit: earthquake]
<wald0>
shevy: well, this is a very relative problem... that's why i suggested you a stable debian (old, but very robust)
efrainolivares has joined #ruby
parzo has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
<shevy>
wald0 even stable debian would not allow me to run my editor, simply because the FHS does not easily allow you to combine multiple versions at the same time
twoism has quit [Remote host closed the connection]
<wald0>
i use the default 1.9.3 of debian wheezy, not intending to switch to 2.0, i think that i can perfectly live with the default version of ruby (and its packaged gems) that comes by default
snath has joined #ruby
<shevy>
you have not much choice
twoism has joined #ruby
stuartrexking has joined #ruby
IceyEC has quit [Quit: IceyEC]
twoism has quit [Read error: Connection reset by peer]
<shevy>
try to have 1.8.x 1.9.x and 2.x side by side on debian by default
drfreeze has left #ruby [#ruby]
mengu has quit [Quit: This computer has gone to sleep]
twoism has joined #ruby
postmodern has joined #ruby
smathieu_ has quit [Read error: Connection reset by peer]
Spami has joined #ruby
Spami has joined #ruby
<shevy>
I am just glad to have finally switched to 1.9.x, took me a long time
<wald0>
shevy: a small idea just come to my mind, maybe you can install your own versions in let's say /opt/rubyversions/ where you created a local git repo, installing different versions on different branches, so with a command you can switch your entire ruby system from one to another very fast (git is very fast for this)
smathieu has joined #ruby
jds_ has quit [Ping timeout: 264 seconds]
Mon_Ouie has joined #ruby
babykosh has quit [Quit: babykosh]
<wald0>
shevy: with correct environment-variables you should be able to reference everything on /opt/rubyversions/, even your own installed gems etc... or in your home in fact
gadgetoid has quit [Ping timeout: 240 seconds]
pjeide has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
<shevy>
wald0 yeah, I run all three ruby versions. ruby is not the problem, ruby works great, it's the OS I get annoyed with
xcv has joined #ruby
<shevy>
or I will just switch to the latest fashion
Kricir has joined #ruby
<shevy>
perhaps it's time to switch to sublime finally
shaunbaker has quit [Remote host closed the connection]
<shevy>
wald0 what editor do you use by the way?
gadgetoid has joined #ruby
<wald0>
shevy: a simple way to me sounds like not installing ruby from debian but all in your home, and adding a git repo for each "ruby own dir" (like $HOME/.gems/) that with a simple script you can switch from one version to another fastly
io_syl has quit [Quit: io_syl]
<wald0>
shevy: vim :)
tommyvyo has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
<shevy>
wald0 yeah, it is no problem with ruby, and most small programs
* Nilium
would use vim but the multiple cursors thing in Sublime has him slightly spoiled
<shevy>
problems are when you combine gtk2/gtk3, old atk/newer atk, and more differently versioned programs
qubit01 has joined #ruby
<qubit01>
Hi all, I'm just getting started with Ruby ( long term programmer ), what are some libraries that I need to get to know right off the bat ?
marcdel has quit [Ping timeout: 264 seconds]
<shevy>
but I think I will really switch to sublime
<_br_->
shevy: Vagrant + Docker? Could be useful to put things just into containers instead of messing around with all the deps.
<Nilium>
qubit01: What do you want to do?
<shevy>
now that I am on 1.9.x I could just as well call it quits and just move on to a new editor, after almost 10 years :(
<qubit01>
Nilium, mostly learn ruby, but let's start with web app backend
<Nilium>
Then not a clue.
<shevy>
_br_- hmm I am not familiar with that
<_br_->
qubit01: What language are you most familiar with?
<shevy>
_br_- going to google
<qubit01>
_br_-, probably java, but Ive used php for 10 years or so also
<_br_->
shevy: Think containerization and virtualization. Very neat for deployment and local dev env
cek has quit [Ping timeout: 264 seconds]
* Nilium
resists the urge
<shevy>
hmm
jds_ has joined #ruby
<_br_->
qubit01: So, if I ask you, "hey I'm a new Java programmer, what are the most important libs I need to know to get started" what would you say?
<shevy>
_br_- how big of an environment could be reproduced? something like a "minimal" distribution (kernel/glibc) but also lightweight GUI (xorg/gtk2)? I think that could fit in around 300 MB or less ... 200 perhaps
<_br_->
qubit01: I think before you can start off with interesting packages (gems) you first need to learn the basics I guess.
<shevy>
and of course ruby in it :D
ziggles has quit [Remote host closed the connection]
<_br_->
shevy: docker is extremely light weight
<qubit01>
_br_-, apache commons, hibernate, Spring if you want to go that route
ldnunes has quit [Quit: Leaving]
<shevy>
ok, will investigate that, thanks for mentioning _br_-
<_br_->
qubit01: Sounds like you send me off into web-land, there are so many other directions you can go
<_br_->
shevy: np
jds_ has quit [Read error: Connection reset by peer]
sarkis has quit [Ping timeout: 256 seconds]
<qubit01>
_br_-, so there are no utility libraries you find yourself using in almost every project ?
jds_ has joined #ruby
<Nilium>
I've yet to find any like that outside of the standard library.
<_br_->
qubit01: Quite the opposite, there is too much. The question is too generic.
dodosan has quit [Remote host closed the connection]
<shevy>
qubit01 10 years php is a long time :)
<Nilium>
Plus if you're using the same thing over and over, you're probably doing it wrong.
jds_ has quit [Read error: Connection reset by peer]
<shevy>
qubit01 for my ruby projects, I started to do minimal-gems, and I reuse them like components quite often
<Nilium>
At any rate, check what's in the standard library.
marcdel has joined #ruby
jds_ has joined #ruby
<Mon_Ouie>
Pry is probably something you might want to use though
<Nilium>
Though it's less a library and mostly just a better irb.
jds_ has quit [Read error: Connection reset by peer]
breakingthings has quit [Quit: breakingthings]
jds_ has joined #ruby
emergion has joined #ruby
jds_ has quit [Read error: Connection reset by peer]
<_br_->
rien: Sanitization? What do you mean by that?
<wald0>
shevy: well, programms made on gtk2 or 3 is problem of the author's updates, some are not developed anymore etc, but at least you can have the source and modify things, in windows you simply can't change anything and you are stuck at looks, bugs, etc
superscott[8] has joined #ruby
<rien>
_br_-: like turning "$45.32" into the float 45.32 for saving to a database
<wald0>
Nilium: ah, i see what you mean, yes, this is really nice, but im pretty sure that in vim there should be an equivalent plugin (im going to ask that NOW!), btw you may be interested on UltiSnips plugin, where you can create snippets of code and it does the same thing for the cursors
jds_ has joined #ruby
<Nilium>
I already have stuff in vim for TextMate-like snippets.
<banister>
Nilium: btw are you aware that pry is more than just an irb alternative? (it has debugging features too :)
<Nilium>
banister: Yes, but I've found its debugging stuff to be lacking
<qhartman>
I often need to test the value of variables for flow control, but if the variable is unset when I get it ruby throws a nil error. Is there a compact idiomatic way to only test a variable if it's not nil?
<rien>
it can't step though, right?
<_br_->
rien: Well, thats quite some sanatizing. Thats certainly *not* done automatic for you.
<banister>
Nilium: oh what features were missing?
<qhartman>
as opposed to a bunch of nested ifs
gnufied has left #ruby [#ruby]
<banister>
rien: it can
shadoi has joined #ruby
<_br_->
qhartman: andand gem
<rien>
_br_-: well my coworker has been using methods= a lot and I think it's so weird... but his argument is that he can't check this stuff only at instantiation, he also needs to check if anyone changes this objects cost, for instance, after initializing it.
<Nilium>
It's like I set a breakpoint, but inspecting locals is unusually difficult for some reason.
<rien>
_br_-: so that's hsi rationale for using methods=
ArchBeOS-riding has quit [Read error: Connection reset by peer]
<_br_->
qhartman: Pity, ruby doesn't have a nice existential op like coffee does.
<rien>
banister: just like ruby-debug? / debugger / byebug...
<Nilium>
Basically, I expect gdb and I got what seems to amount to "look we'll launch a repl in the middle of your code"
<Nilium>
Except the repl doesn't really have access to everything.
<rien>
shevy: yeah, wouldn't you think it's strange that it does more than assigning? it's weird that assignment does logic
JimmyAtCMU has left #ruby [#ruby]
<banister>
Nilium: what's difficult about inspecting locals?
<Nilium>
They come out as undefined.
<shevy>
rien well from the method name alone
<banister>
rien: sure, there are pry-debugger and pry-byebug plugins..pry was designed to have plugins from the beginning
<_br_->
rien: Hm, see, ruby is a duck typed langauge. So, on assignment validation via e.g. something like Design by Contract isn't really in the language. You could need to write a bit of code to support that.
<Nilium>
Probably just me misusing it, but either way, it's unpleasant.
<banister>
Nilium: then they are undefined ;) If pry doesn't show you the correct things then it's a bug in *ruby* not in pry, but i've never encountered locals appearing as undefined when they shouldn't be.
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
interactionjaxsn has quit [Remote host closed the connection]
<Nilium>
I have, considering I've jammed code in to spit the local out to stderr before letting Pry do its thing.
<Nilium>
So, like I said, likely down to me misusing it.
interactionjaxsn has joined #ruby
jds_ has quit [Ping timeout: 276 seconds]
<banister>
Nilium: interesting, if that's really the case then it must be a bug in ruby i think. We've never had a bug of that nature ever reported in 3+ years
<Nilium>
The other issue, at least when using pry-debugger, was that step/next just didn't seem to work at all
<rien>
_br_-: but what I mean is, it's not common ruby idiom, right
<rien>
_br_-: do you see everyday ruby/rails code with explicit assignment= methods?
<banister>
Nilium: on what ruby version?
<Nilium>
Or at least didn't work the way I expect them to, which is again based on gdb
ixti has quit [Read error: No route to host]
<Nilium>
2.0.0-p247
<rien>
banister: pry-byebug -> I'm sold now.
optimusprimem has quit [Remote host closed the connection]
arya__ has quit [Ping timeout: 264 seconds]
<banister>
Nilium: ah, try pry-byebug in that case. 'debugger' (which pry-debugger plugin relies on) is slightly broken on 2.0
<Nilium>
I'll do that.
<rien>
debugger is so broken... you can't step to the next line
<rien>
it almost always steps into
<Nilium>
I'm fine with stepping into something.
<Nilium>
That's what I expect step to do.
<rien>
not all the time as you'll see :)
smathieu has quit [Remote host closed the connection]
<rien>
stepping over is very useful
<Nilium>
So 'next' didn't work for you?
<_br_->
rien: Rails does validations on the model side, its a MVC thing.
burlyscudd has joined #ruby
smathieu has joined #ruby
RichardBaker has joined #ruby
smathieu has quit [Remote host closed the connection]
failshell has quit [Ping timeout: 264 seconds]
<rien>
_br_-: yeah well this is a rails project and he's peppering every model with these variablename= methods... I've never seen this in rails project... not that many, nor the need to ever use a method=
<Nilium>
Hm, any idea if stack_explorer is borked on 2.0?
<banister>
Nilium: segfaults?
v0n has quit [Ping timeout: 248 seconds]
<Nilium>
I wouldn't know, I'm trying to avoid installing it if it's known to be broken
<_br_->
rien: Hm, maybe you should go to #rubyonrails for that
smathieu has joined #ruby
<banister>
Nilium: it shoudl work fine on 2.0+
earthquake has joined #ruby
<rien>
_br_-: too placid right now, I'll wait awhile
<banister>
Nilium: i rewrote a special binding_of_caller for 2.0 that pry-stack_explorer uses, that should work perfectly on 2.0
interactionjaxsn has quit [Ping timeout: 264 seconds]
renderful has quit [Remote host closed the connection]
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
<Nilium>
Well, hopefully
<rien>
banister: you have a rewrite of binding_of_caller? does it fix the error that together with better_errors it's very very slow?
<banister>
rien: the very very slow problem was due to a very old binding_of_caller, ensure your binding_of_caller is at the very latest and it should be fast
fgo has joined #ruby
jds_ has joined #ruby
<banister>
rien: if it's not fast, file an issue and i'll fix it
<Nilium>
Bleh, was hoping better_errors was something I could use.
<Nilium>
Disappointed now.
sepp2k has joined #ruby
<banister>
Nilium: what's wrong with it?
<Nilium>
It's for rails.
<banister>
Nilium: it's for any rack-app
<Nilium>
No use for me, since I'm not doing web stuff.
<banister>
Nilium: ah :)
<rien>
banister: hmm I have 0.7.2 for binding_of_caller
<Nilium>
Aside from that, it looks swank. Don't mean to say it's bad.
Neener54 has quit [Quit: Adios muchachos!!!]
<rien>
Nilium: it's sooo good. I've solved so many bugs almost instantaneously with it.
<banister>
rien: is that the most recent? i dont remember :) Anyway, it should not be slow, if it's really slow it could possibly be due to the most recent ruby patch level that somehow slowed down the internal frame introspection methods, but i could probably work around that if it came to it
<Nilium>
Looks that way.
<Nilium>
I wonder how many people leave it on in production. That could be funny.
evenix has quit [Remote host closed the connection]
<rien>
burlyscudd: June 7, 2013, most recent, yep :)
<rien>
banister: ^
<banister>
rien: how slow is slow?
jds__ has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.0]
Kruppe has quit [Ping timeout: 260 seconds]
Badreddin has joined #ruby
juxovec has joined #ruby
<rien>
Nilium: it doesn't run in production... and if you want it to you have to fill out an environment variable TRUSTED_IP
fgo has quit [Remote host closed the connection]
spider-mario has quit [Read error: Connection reset by peer]
<Nilium>
Smart.
<rien>
Nilium: I use it everyday in production (with the trusted_ip thing set to just mine) and it saves my bacon time and again
<rien>
banister: oh yeah, thanks for writing binding_of_caller, really really nice gem that I use every day :)
jds_ has quit [Ping timeout: 248 seconds]
<banister>
rien: np, i also wrote pry btw ;)
cads has quit [Read error: Operation timed out]
<rien>
banister: takes some 15 seconds for it to render, meanwhile my server's top shows ruby pegged at 99%
dodosan has joined #ruby
<banister>
rien: hmm, weird i haven't got any issues filed about that then. What ruby version are you using exactly?
tommyvyo has quit [Ping timeout: 264 seconds]
<rien>
banister: the reason I had some prejudice against pry is because at first/by itself it can't step so it immediately came across as too "stiff" for me.
<rien>
ruby 2.0.0p247
mando has quit [Remote host closed the connection]
<Nilium>
p247 to the max.
kaldrenon has quit [Remote host closed the connection]
<Nilium>
Unless that number increases.
<Diranged>
Hrmm.. I can't seem to figure out how to set the SSL verify mode to VERIFY_NONE in the ruby soap code..
tommyvyo has joined #ruby
<Nilium>
Oh god my niece won't stop shouting for her brother because he isn't walking down the hall to her
<Nilium>
This is going to drive me insane :|
<banister>
rien: it was never designed to be 'by itself', it was alwasy a plugin architecture. THe reason we don't bundle more functionality into pry core is because we want to support as many ruby versions as possible, and they all work differently for stepping/nexting/stack exploration, and some dont work at all. I also didn't think it was too big a deal to just add a plugin to teh Gemfile if you needed that
sayan has quit [Read error: Connection reset by peer]
<Nilium>
I should probably feel bad about not using bundler. Maybe.
jds__ has quit [Ping timeout: 264 seconds]
renderful has joined #ruby
sayan has joined #ruby
r0bgleeson has quit [Ping timeout: 276 seconds]
<shevy>
heeh
tatsuya_o has joined #ruby
<rien>
banister: thanks for explaining the motivation. I'll definitely install it and check it out. opportunities to use another debugging tool abound here :)
gazarsgo has joined #ruby
<superscott[8]>
i can have an attr_reader be a hash, correct? can/should i?
<rien>
banister: where did you get the idea of changing-directory into scopes?
<Nilium>
Eh?
<gazarsgo>
is there a method that will loop over an object and print all its attributes ? like var_dump from php ? :)
<shevy>
superscott[8] attr_reader is just an easier way to name a method for a reader method
parzo_ has quit [Remote host closed the connection]
Speed has joined #ruby
parzo has joined #ruby
tommyvyo has joined #ruby
<endash>
platzhirsch: ObjectSpace.each_object(Class).select { |klass| klass < self }
julweber has quit [Remote host closed the connection]
<endash>
stolen from SO
stkowski has quit [Quit: stkowski]
Tricon has quit [Read error: Connection reset by peer]
athst has quit [Quit: athst]
<platzhirsch>
endash: this gives me an empty list, but besides that, does that work recursivly?
tommyvyo has quit [Client Quit]
snath has quit [Ping timeout: 264 seconds]
Xeago has quit [Remote host closed the connection]
<endash>
a subclass of a subclass will return true for klass < self
Tricon has joined #ruby
Naoe-Kanno has joined #ruby
SHyx0rmZ has quit [Ping timeout: 246 seconds]
Tricon has quit [Read error: Connection reset by peer]
tvw has quit []
chxane has joined #ruby
Tricon has joined #ruby
tvw has joined #ruby
athst has joined #ruby
randomautomator has quit [Ping timeout: 264 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
superscott[8] has quit [Quit: superscott[8]]
mengu has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
jds_ has joined #ruby
<platzhirsch>
for some reasons, ObjectSpace.each_object(Metrics::Metric) gives me an enumerator which is already finished, it does not contain classes, although the .subclasses implementation uses ObjectSpace as well
<Mon_Ouie>
Because it should be each_object(Class)
<Mon_Ouie>
each_object(some_class) will return every instance of that class
<Mon_Ouie>
You want every instance of Class, not every instance of Metrics::Metric
Tricon has quit [Read error: Connection reset by peer]
pentameter has quit [Read error: Connection reset by peer]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Tricon has joined #ruby
<Mon_Ouie>
banisterfiend: Well, the dataflow part is interesting. Besides that, it's mostly trying to mix and show many paradigms in the same language. I probably wouldn't use it for any "real" project.
bobajett has joined #ruby
marius has joined #ruby
ebanoid has quit [Quit: brbomgwtfbbq]
Naoe-Kanno has quit [Ping timeout: 256 seconds]
pjeide` has joined #ruby
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ssvo_ has joined #ruby
<platzhirsch>
Mon_Ouie endash: Thanks, that solution was already discussed before, somehow I forgot about it. Althought it makes sense to pass Metrics::Metric.singleton_class to each_object to keep the list of returned classes small
<v0n>
hi
SHyx0rmZ has joined #ruby
mneorr has quit [Remote host closed the connection]
<v0n>
is there a method to do array << "foo" unless array.include? "foo"
i_s has joined #ruby
<banisterfiend>
Mon_Ouie: are you interested to implement monadic do-notation for ruby?
tricon_ has joined #ruby
SHyx0rmZ has quit [Client Quit]
Tricon has quit [Ping timeout: 245 seconds]
tricon_ has quit [Read error: Connection reset by peer]
Tricon has joined #ruby
devoldmx3 has joined #ruby
<endash>
v0n: sounds like you want a set
<v0n>
endash: a set ?
pjeide has quit [Ping timeout: 246 seconds]
twoism has quit [Remote host closed the connection]
Krajsnick has quit [Remote host closed the connection]
<v0n>
endash: cool
<platzhirsch>
oh, I just see that I need to implement inherited only one time for the root class and not for each subclass, well.. *facepalm*
<bobajett>
I have a "make" question - I'd like to write a simple Makefile, something like = my_project: my_ruby_script.rb\n \t cp my_ruby_script.rb $HOME/bin
SJr has joined #ruby
nari has joined #ruby
snovak has quit [Remote host closed the connection]
mlpinit has quit [Remote host closed the connection]
kobain has quit [Read error: Connection timed out]
<bobajett>
but everytime I type "make" it always copies my_ruby_script.rb to $HOME - even when I haven't changed my_ruby_script.rb?
devoldmx has quit [Ping timeout: 240 seconds]
<SJr>
Does DESTDIR need to be set prior to calling ./configure when compiling ruby from source, or just before make install?
<banisterfiend>
Mon_Ouie: when you finally 'got' monads were you excited?
twoism_ has joined #ruby
elux has quit [Quit: Bye!]
<Mon_Ouie>
Not really
sjltaylor has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phantummm has quit [Quit: phantummm]
<banisterfiend>
Mon_Ouie: is that because nothing excites you in general or because you just didn't find it that interesting? when i finally 'got' the state monad i was very impressed
twoism has quit [Read error: Connection reset by peer]
<Nilium>
Ok, lazy-loaded textures done. That was simple.
renderful has quit [Remote host closed the connection]
<Mon_Ouie>
I didn't find it that exciting to understand them because it's just a convenient way of abstracting away part of the logic. I was excited e.g. when I understood hashtables, realizing you didn't have to look at every key to look one up, because that was something completely new.
bobajett has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<Mon_Ouie>
I guess that's part of why the two projects I do in essentially every new language that I learn are a hash table implementation and a game of life (where the world has a fixed size but wraps around at the edges)
ffranz has quit [Quit: Leaving]
<banisterfiend>
Mon_Ouie: i was impressed because it allowed me to express something that looks/feels imperative but is completely pure
geggam has quit [Remote host closed the connection]
geggam_ has quit [Remote host closed the connection]
stonevil has joined #ruby
_maes_ has quit [Ping timeout: 246 seconds]
bluOxigen has quit [Ping timeout: 264 seconds]
<Mon_Ouie>
Yes, but you can't implement algorithms that require side effects (e.g. a queue where you keep a reference to the last node so you can quickly add to the end), only apply pure functions to a certain data structure
<banisterfiend>
Mon_Ouie: i guess it's more monads + do-notation that i found impressive, rather than monads per se
<Mon_Ouie>
Yes, the notation is cool; and feels sort of magic when you don't understand the implementation yet
efrainolivares has quit [Quit: efrainolivares]
marcdel has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
punkrawkR has quit [Read error: Connection reset by peer]
Kruppe has joined #ruby
<platzhirsch>
banisterfiend: just noticed one problem with defining a self.inherited() method approach. This only works for level 1 subclasses, not for level n :-/
kreeves has joined #ruby
<banisterfiend>
platzhirsch: just change @sub to @@sub ;)
mansi has quit [Remote host closed the connection]
<platzhirsch>
I should use an evil class instance variable?
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
mansi has joined #ruby
cads has joined #ruby
juxovec has joined #ruby
Diranged has quit [Quit: Leaving.]
<Mon_Ouie>
That's a fun fact too. Are there any language in which "class" variables (or however they call them there) aren't shared with all children?
<platzhirsch>
but does work
efrainolivares has joined #ruby
<Nilium>
Mon_Ouie: Depends on how you define a class variable in a language.
ekr3m has joined #ruby
<banisterfiend>
Mon_Ouie: how do they work in C++ ?
iliketurtles has quit [Quit: zzzzz…..]
jds_ has quit [Write error: Broken pipe]
<Mon_Ouie>
shared with subclasses, as in Java (using static variables)
<Nilium>
If the static variable is private, it's not shared, as far as I know
jds_ has joined #ruby
<Nilium>
Or shouldn't be, since that'd be ignoring the point of making something private
gazarsgo has quit [Quit: gazarsgo]
<Nilium>
C++ works that way, anyhow.
julweber has joined #ruby
mansi has quit [Ping timeout: 260 seconds]
twoism_ has quit [Read error: Connection reset by peer]
Megtastique has quit [Quit: Megtastique]
twoism has joined #ruby
juxovec has quit [Ping timeout: 256 seconds]
mikepack has quit [Remote host closed the connection]
<Mon_Ouie>
Oh, yes, I don't mean you can directly change it
<Mon_Ouie>
I mean it's the same variable, i.e. whether you change it from a method called on an instance of the subclass or on a direct instance, the same variable will be changed
Megtastique has joined #ruby
tomzx_mac has joined #ruby
iliketurtles has joined #ruby
matti has joined #ruby
matti has joined #ruby
matti has quit [Changing host]
jds_ has quit [Ping timeout: 256 seconds]
<banisterfiend>
Mon_Ouie: have you messed much with promises? i think they could benefit from monadic do-notation in ruby
Buuyo has left #ruby [#ruby]
ekr3m has left #ruby [#ruby]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<banisterfiend>
that's easy to implement just using the fiber trick too (i.e a complete implementation of do-nation isn't necessary)
Mattias has quit [Ping timeout: 240 seconds]
<Mon_Ouie>
banisterfiend: Not sure what promises are. Are they like futures?
_honning_ has quit [Ping timeout: 256 seconds]
rhys has quit [Quit: Leaving]
<banisterfiend>
Mon_Ouie: similar, but more general. Futures AFAIK are just promises that execute immediately on a background thread and are 'resolved' when the thread completes its computation. But promises can be resolved whenever/however you want, and may or may not be executed in a background thread
<banisterfiend>
Mon_Ouie: let me show you something wonderful
mlpinit has quit [Remote host closed the connection]
realDAB has joined #ruby
saarinen has joined #ruby
devoldmx has quit [Ping timeout: 276 seconds]
tanema has joined #ruby
agjacome has quit [Ping timeout: 269 seconds]
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
agjacome has joined #ruby
agjacome has quit [Client Quit]
wallerdev has joined #ruby
Tricon has joined #ruby
staafl has quit [Ping timeout: 256 seconds]
emergion has joined #ruby
realDAB has quit [Quit: realDAB]
agjacome_ has quit [Ping timeout: 240 seconds]
zastern has joined #ruby
djdarkbeat has joined #ruby
snovak has joined #ruby
evenix has joined #ruby
vince_prignano has quit [Remote host closed the connection]
banghouse has quit [Remote host closed the connection]
evenix has quit [Ping timeout: 264 seconds]
snovak has quit [Ping timeout: 264 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
sambao21 has joined #ruby
<zendeavor>
why did you write here?
<zendeavor>
you asked a pretty awful question; don't look for topic experts, just ask a question about your problem directly and if anyone can help, they will.
renderful has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
moted has quit [Quit: moted]
moted has joined #ruby
val___ has quit [Quit: Lost terminal]
randomautomator has quit [Remote host closed the connection]
thetristan has quit [Quit: thetristan]
sambao21 has quit [Ping timeout: 240 seconds]
d2dchat has quit [Remote host closed the connection]