<workmad3>
snkcld: it's still a method call, but yeah, afaik they just return 'self'
kitak has joined #ruby
mercwithamouth has joined #ruby
<snkcld>
what i mean to say is, do the to_ whatever functions continue to attempt to process the conversion, even if the type of the object is already the type to be converted to
<Morrolan>
Yes. The various classes just implement it by returning self.
<Morrolan>
E.g. Integer's definition of #to_i will be 'def to_i; self; end'
krisbulman is now known as [krisbulman]
<Morrolan>
There's not really any other way to do it, as those functions *return* an object of the desired type, they can't just do nothing.
benzrf has joined #ruby
<benzrf>
so a rack middleware is basically a proxy to your app?
<Hanmac>
same goes for the Kernel Functions like String() because they only call to_s and the others
<snkcld>
ah, awesome!
<benzrf>
nestable proxies?
<snkcld>
thanks
<Morrolan>
:)
<snkcld>
well the actually conversion logic is in c, i would think
<snkcld>
?
<snkcld>
atleast for mri ruby
<Morrolan>
Probably is, yea.
bradhe has quit [Ping timeout: 252 seconds]
<Morrolan>
You could check on ruby-doc.org, it includes the source for each method. :)
Solnse has quit [Remote host closed the connection]
pyr0commie has joined #ruby
pyr0commie has quit [Remote host closed the connection]
cjsarette has joined #ruby
<workmad3>
benzrf: a rack middleware is something that implements the rack interface but passes on to another rack application
<workmad3>
benzrf: to allow you to create a stack
<workmad3>
benzrf: so yeah, it's a type of proxy, but that's probably a less useful way to think of it ;)
<benzrf>
ok
<benzrf>
i guess 'delegate' might be a better word
rootshift has joined #ruby
yarou has joined #ruby
<benzrf>
hmm, is there anything like meteor.js for ruby ?
<benzrf>
using opal
agjacome has joined #ruby
therod has joined #ruby
<workmad3>
benzrf: I guess the best pattern to describe a middleware stack is as decorators :)
mocfive has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
rubyracer has quit [Quit: Konversation terminated!]
<workmad3>
benzrf: not aware of anything in the ruby ecosystem that fills quite the same niche as meteor.js
<chipotle>
can someone tell me what's wrong with this code? i'm new to ruby, but it says after completing the input that i have 574 characters in my name, which is not true: http://pastie.org/8670424
<Morrolan>
You're adding strings, which will concatenate them.
<Morrolan>
Unlike Perl, Ruby won't implicitly convert between types depending on the operation.
zz_karupanerura is now known as karupanerura
nateberkopec has joined #ruby
<waxjar>
Because operations are not operations in Ruby, but method calls! :D
<chipotle>
Morrolan: how do i sum them?
therod has quit [Ping timeout: 252 seconds]
m104 has joined #ruby
m104 has quit [Max SendQ exceeded]
<chipotle>
i tried quotes around each of them, like "last_name.length.to_s" but that didn't work...
visof has quit [Ping timeout: 248 seconds]
aryaching_ has quit []
<Morrolan>
chipotle: Something like "Did you know that your name has " + (first_name.length + middle_name.length + last_name.length).to_s "characters?"
<chipotle>
oh i see
<workmad3>
I'd probably use string interpolation for that
<Morrolan>
Basically, sum them while they are still numbers, then convert the sum to a string.
<Morrolan>
Yea, me too. But one step at a time. ;D
<workmad3>
:)
<chipotle>
i get this: chapter6.rb:18:in `+': no implicit conversion of Fixnum into String (TypeError)
<chipotle>
from chapter6.rb:18:in `<main>'
<Morrolan>
Now you're probably missing the to_s on the sum.
<Hanmac>
workmad3: or String#%
<chipotle>
where's the sum, i don't see how to add it?
<Morrolan>
Right now you are asking Ruby to do `"Did you know that ..." + 547`, which it has no clue how to do.
<Morrolan>
What is your current code?
<f4a244c>
decided to go ahead and implement a standards recommendation (informal): https://gist.github.com/jkassemi/8641384 - what's the closest to an informal collection of RFCs we have for stuff as basic as this?
shedd has quit [Ping timeout: 272 seconds]
predator217 has joined #ruby
<chipotle>
puts 'Did you know there are ' + (first_name.length.to_s + middle_name.length.to_s + last_name.length).to_s + ' characters in your name.'
<Morrolan>
Oh, you still have the .to_s after first_name.length and middle_name.length
<Morrolan>
You'll want to sum the numbers, not two strings and a number.
ghanima1 has joined #ruby
<chipotle>
how do i 'sum the numbers'?
<gr33n7007h>
bnagy, Right this is what I've got AF_BLUETOOTH = 31 and BTPROTO_RFCOMM = 3
[krisbulman] is now known as krisbulman
<workmad3>
chipotle: 'first_name.length' gives you a number
ghanima has quit [Ping timeout: 252 seconds]
<workmad3>
chipotle: 'first_name.length.to_s' turns that number into a string
<pontiki>
add the lengths, not the lenghts as strings
<pontiki>
sorry, workmad3
<chipotle>
so remove the to_s?
<pontiki>
^
<workmad3>
pontiki: np, yours was slightly better stated than mine ;)
<chipotle>
when i remove the to_s i get this error message: chapter6.rb:18:in `+': no implicit conversion of Fixnum into String (TypeError)
<chipotle>
i guess i don't know what you mean by adding the lengths?
<Morrolan>
Then you probably removed the wrong .to_s.
<chipotle>
does that mean just turn it into a number and not a string?
<Morrolan>
Eh, let's start at a more basic level.
<pontiki>
after you calc the total length, then that needs tobe stringified
<Morrolan>
Oh, pontiki will help, I'm out then. *grins*
vlad_starkov has joined #ruby
<workmad3>
yeah, unfortunately it's after midnight for me, so I'm not quite cognizant enough to teach coding
predator117 has quit [Ping timeout: 272 seconds]
<chipotle>
aha, so is this right? puts 'Did you know there are ' + (first_name.length + middle_name.length + last_name.length).to_s + ' characters in your name.'
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<workmad3>
chipotle: woo!
<pontiki>
i'm in the midst of an anxiety attack and hugely angerful
p8952 has joined #ruby
<workmad3>
pontiki: hit something
<workmad3>
(not me)
<Hanmac>
something more readable: 'Did you know there are %d characters in your name.' % (first_name.length + middle_name.length + last_name.length)
ukd1 has quit [Quit: Leaving...]
<chipotle>
somethings wrong, when i do this: puts 'Did you know there are ' + (first_name.length + middle_name.length + last_name.length).to_s +' characters in your name.' i get this error message: chapter6.rb:18: syntax error, unexpected unary+, expecting end-of-input...ngth + last_name.length).to_s +' characters in your name.
angusigu1ss has joined #ruby
<chipotle>
Hanmac: oh, what is that character called again? %d
JJMalina has joined #ruby
<chipotle>
formatters?
<workmad3>
Hanmac: personally, I find "Did you know there are #{first_name.length + middle_name.length + last_same.length} characters in your name"
<workmad3>
more readable
<chipotle>
i'm using chris pine's how to program book right now
Aryasam has joined #ruby
nateberkopec has quit [Ping timeout: 245 seconds]
<Hanmac>
workmad3: yeah both are good, depend if you get the strings from a source or not (like language table)
vlad_starkov has quit [Read error: Connection reset by peer]
<pontiki>
huh
simoz15 has joined #ruby
bean__ has joined #ruby
araujo has joined #ruby
DaniG2k has quit [Quit: leaving]
<chipotle>
Hanmac: yeah, that worked!
<chipotle>
%d is a formatter, right? i think i remember that from the little python i did
<chipotle>
that is much more readable
<Hanmac>
chipotle: >> +'<< change that to: >> + ' <<
<chipotle>
yay!
<chipotle>
that worked too
<chipotle>
thanks guys!!
<pontiki>
clearly a syntax/precedence issue:
<workmad3>
right, I'm off to bed
<workmad3>
night all
<Hanmac>
chipotle: it goes back to old C .. String#% is calls Kernel#sprintf and that works nearly as sprintf in each other language
Neomex has quit [Quit: Neomex]
<chipotle>
gnite workmad3
standyro2 has joined #ruby
bthesorceror has joined #ruby
phipes has joined #ruby
<chipotle>
i see
<chipotle>
C is a cumbersome language, ruby is much nicer
<Hanmac>
pontiki: +@ is a method (hm but yes it should not raise an syntax error maybe ,P )
ckinni has quit [Ping timeout: 252 seconds]
<pontiki>
i can see where it gets confused, but then i am thinking it should backtrack
mocfive has quit [Remote host closed the connection]
<pontiki>
how does unary+ get implemented?
danijoo has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
<pontiki>
seems like it's a parsing thing at that point, innit?
danijoo has joined #ruby
simoz15 has quit [Ping timeout: 245 seconds]
Opettaja has quit [Remote host closed the connection]
LaPetiteFromage has joined #ruby
dorei has quit []
phinfone_ has quit [Quit: exitiing]
LaPetiteFromage_ has joined #ruby
jtdowney has quit []
mocfive has quit [Ping timeout: 252 seconds]
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
angusigu1ss has joined #ruby
tkuchiki has joined #ruby
LaPetiteFromage has quit [Ping timeout: 272 seconds]
LaPetiteFromage_ is now known as LaPetiteFromage
m104 has joined #ruby
recurrence has joined #ruby
<benzrf>
hey did somebody ping me
<benzrf>
ah
robustus has quit [Ping timeout: 245 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
ghanima1 has quit [Read error: Connection reset by peer]
leoxagy1234 has quit [Ping timeout: 252 seconds]
kewubenduben has quit [Ping timeout: 265 seconds]
benzrf has left #ruby [#ruby]
robustus has joined #ruby
Wolland has quit [Ping timeout: 272 seconds]
dseitz has joined #ruby
felixjet_ has joined #ruby
bradhe has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
mocfive has joined #ruby
mojjojo has joined #ruby
felixjet has quit [Ping timeout: 252 seconds]
angusigu1ss has quit [Ping timeout: 245 seconds]
mavcunha has quit [Quit: Computer has gone to sleep.]
mercwithamouth has joined #ruby
krisbulman is now known as [krisbulman]
mehlah has quit [Quit: Leaving...]
<idiocrash>
hiya gents
bradhe has quit [Ping timeout: 252 seconds]
<idiocrash>
looking for a starting point to auto-detect the title and author of a news article on the web
v0n has joined #ruby
<idiocrash>
any existing gems?
<idiocrash>
I know about readability, but I don't see methods for grabbing the title and author
aspires has joined #ruby
guest12345 has quit [Quit: Page closed]
<cong>
hpricot
<pontiki>
idiocrash: are you talking about from the body of the web page? there is no standard for creating that info
<cong>
still in use by me but deprecated by everyone else
<idiocrash>
Yeah, was hoping for some algorithms for best guess
<pontiki>
you might try looking for css selectors
<idiocrash>
true
<idiocrash>
it may just come down to that
sambao21 has joined #ruby
[krisbulman] is now known as krisbulman
Spami has quit [Quit: This computer has gone to sleep]
<cong>
how do i make an html version of an rdoc file with everyone contained in one file?
sambao21 has quit [Ping timeout: 248 seconds]
SiliconG has quit [Ping timeout: 252 seconds]
mojjojo has quit [Quit: mojjojo]
mercwithamouth has quit [Ping timeout: 272 seconds]
axl_ has quit [Quit: axl_]
mojjojo has joined #ruby
mojjojo has quit [Client Quit]
shedd has joined #ruby
iamdoo2 has joined #ruby
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
fgo has joined #ruby
tdubya has quit [Read error: Connection reset by peer]
senayar_ has joined #ruby
tdubya has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby
senayar has quit [Ping timeout: 252 seconds]
iamdoo2 has quit [Ping timeout: 272 seconds]
mocfive has quit [Ping timeout: 252 seconds]
RoxasShadowRS has quit [Read error: Connection reset by peer]
SiliconG has joined #ruby
Brolen has joined #ruby
rickruby has joined #ruby
phipes has quit [Remote host closed the connection]
sepp2k1 has quit [Read error: Connection reset by peer]
aspires has quit []
asmodlol has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
meatherly has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
mercwithamouth has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
MacGruberMan has joined #ruby
mary5030 has quit [Remote host closed the connection]
MacGruberGuy has quit [Ping timeout: 260 seconds]
kc8qvp has joined #ruby
niklasb has quit [Ping timeout: 272 seconds]
krisbulman is now known as [krisbulman]
<kc8qvp>
I need to install ruby gems from git. Bundler works perfectly, except I don't need the bundling part; I just want to install them to GEM_HOME. specific-install doesn't work.
rburton- has joined #ruby
[krisbulman] is now known as krisbulman
<grieg>
x["3","4","5","6","7"] x.to_i returns error should i convert each element of array separately?
centrx has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
therod has joined #ruby
yeltzooo has quit [Ping timeout: 245 seconds]
FifthWall has quit [Ping timeout: 260 seconds]
shtirlic has quit [Ping timeout: 276 seconds]
ebeip90 has quit [Ping timeout: 245 seconds]
ptierno has quit [Ping timeout: 245 seconds]
slash_nick has quit [Ping timeout: 272 seconds]
camt has quit [Ping timeout: 240 seconds]
fgo has quit [Remote host closed the connection]
snkcld has quit [Ping timeout: 264 seconds]
Muz has quit [Ping timeout: 272 seconds]
brisbin has quit [Ping timeout: 272 seconds]
SirCmpwn has quit [Ping timeout: 248 seconds]
yan_ has quit [Ping timeout: 248 seconds]
gwb3 has quit [Ping timeout: 245 seconds]
Parker0 has joined #ruby
maxmanders_ has quit [Ping timeout: 264 seconds]
therod has quit [Ping timeout: 245 seconds]
|PiP| has quit []
brisbin has joined #ruby
maxmanders_ has joined #ruby
shtirlic has joined #ruby
SirCmpwn has joined #ruby
FifthWall has joined #ruby
krisbulman is now known as [krisbulman]
jamto11 has joined #ruby
banjara has joined #ruby
mercwithamouth has quit [Ping timeout: 260 seconds]
standyro2 has quit [Ping timeout: 272 seconds]
slash_nick has joined #ruby
ptierno has joined #ruby
[krisbulman] is now known as krisbulman
ebeip90 has joined #ruby
snkcld has joined #ruby
yan_ has joined #ruby
gwb3 has joined #ruby
phipes has joined #ruby
camt has joined #ruby
jamto11 is now known as blaz3
blaz3 is now known as blaz3r
blaz3r is now known as blaz3rz
Soda has quit [Read error: Connection reset by peer]
Wolland has joined #ruby
vlad_starkov has joined #ruby
bradhe has joined #ruby
Fyyr13 has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
Wolland_ has joined #ruby
Wolland has quit [Read error: Connection reset by peer]
Muz has joined #ruby
nari has quit [Ping timeout: 264 seconds]
bradhe has quit [Ping timeout: 252 seconds]
angusigu1ss has joined #ruby
Baluse has quit [Ping timeout: 245 seconds]
<cong>
can i install 2 versions of the same gem?
thomasxie has joined #ruby
<cong>
different versions ofc
senayar_ has quit [Remote host closed the connection]
<centrx>
cong, Yes, with RVM you can
<centrx>
cong, Actually you can do it anyway
<centrx>
without RVM
<cong>
i don't have/use rvm
<cong>
so that's a yes
Baluse has joined #ruby
Wolland_ has quit [Ping timeout: 240 seconds]
phipes has quit [Remote host closed the connection]
mocfive has joined #ruby
yeltzooo has joined #ruby
fgo has joined #ruby
angusigu1ss has quit [Ping timeout: 245 seconds]
banjara has quit [Quit: Leaving.]
<cong>
what if they have executable program? what happens then?
<centrx>
gems are stored in directories that have version numbers in them, like bundler-1.5.1/
benzrf has joined #ruby
Hanmac1 has joined #ruby
<benzrf>
hmm, is there anything for integrating Opal with rack apps?
zachrab has joined #ruby
<benzrf>
and/or sharing objects between client and server?
lyanchih has joined #ruby
axl_ has joined #ruby
jack_rabbit has quit [Quit: SIGSEGV (core dumped)]
Hanmac has quit [Ping timeout: 265 seconds]
<txdv>
rvm isbest
<txdv>
no need for root rights forpackages
<txdv>
gems i mean
<txdv>
have to stay true to the ruby puntrain
mercwithamouth has joined #ruby
krisbulman is now known as [krisbulman]
LexicalScope has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
banjara has joined #ruby
zachrab has quit []
angusigu1ss has joined #ruby
<benzrf>
if i want to write a middleware to provide extra pages, would i intercept requests and take over ones that are in my scope and reject the rest
octoberry has joined #ruby
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
tyl has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
iamdoo2 has joined #ruby
SmoothPorcupine has joined #ruby
<SmoothPorcupine>
How do I stop ruby from spawning it's Process::detach thread?
<benzrf>
chipotle: I recommend learning java, C, haskell, javascript, and python
<benzrf>
chipotle: not immediately
<chipotle>
why?
<chipotle>
i want to learn js next
<chipotle>
and then node.JS
<chipotle>
but first i will get good at ruby
<benzrf>
chipotle: but like, as things to learn someday
<chipotle>
i come from a drupal background, but i've never really coded
<benzrf>
chipotle: they will all teach you things
<centrx>
beginnerrubyist, Unix-like systems have three standard "streams", stdout, standard output, stdin, standard input, and stderr, standard error. By default these read and write to the terminal
<SmoothPorcupine>
I recommend learning C and seeing what ASM is.
iamsean has joined #ruby
<chipotle>
is it better to use single quotes or double quotes when using puts/print?
<benzrf>
chipotle: javascript is important to know, python will show you another way of doing some things, java will teach you some things to avoid, C will give you better understanding as to how computer works, haskell will blow your mind
SCommette has joined #ruby
<SmoothPorcupine>
chipotle: Do you know the difference between ' strings and " strings?
<emanu>
I want to make a script to move my osx application settings into dropbox
snuffeluffegus has quit [Read error: Connection reset by peer]
<emanu>
so that my desktop and laptop can have the same settings
danshultz has joined #ruby
<SmoothPorcupine>
You don't need ruby for that.
niklasb has joined #ruby
<SmoothPorcupine>
That's basic shell scripting.
hamakn has joined #ruby
<emanu>
yea, but it's a lot of work figuring out which files are safe to move for which app
<emanu>
so I'm thinking of open sourcing the tool, giving some nice facilities to define an osx program's config files that are safe to symlink, and hoping that people contribute
<SmoothPorcupine>
The complexity of that task doesn't change that it needs to happen whatever language you use.
<beginnerrubyist>
cong ty
mary5030 has joined #ruby
<emanu>
so is there a ruby gems for shell scripts?
mocfive has joined #ruby
<SmoothPorcupine>
:V
<emanu>
why not use ruby?
<emanu>
(sincere question)
<SmoothPorcupine>
You don't need a gem.
w4pm has joined #ruby
<SmoothPorcupine>
Ruby is very systems level as it is.
<emanu>
I don't understand your logic
<SmoothPorcupine>
Trying to weasel some random gem into the design process is a bad idea.
<beginnerrubyist>
I think I understand now, instance variables are only in classes.
<benzrf>
emanu: a shell script by definition is a script in a shell language
<emanu>
the goal is to distribute this to people so that they get interested in using it
<benzrf>
beginnerrubyist: erm
<benzrf>
beginnerrubyist: no, they are variables that are scoped to an object
<emanu>
so I'm chosing ruby in the hopes that my install process is like this: "gem install backup-tool"
<emanu>
and no more
<benzrf>
...which may be what you meant
<beginnerrubyist>
instance variables are accustomed the way they're because each instance of a class may have different instance variable values right?
<benzrf>
you mean named?
<beginnerrubyist>
benzrf, oh
<benzrf>
beginnerrubyist: do you know what it means if a variable is scoped to somethibg?
Lewix has quit [Remote host closed the connection]
<SmoothPorcupine>
emanu: A gem isn't the best way to distribute or design this.
<beginnerrubyist>
benzrf, nope
amclain has quit [Quit: Leaving]
<emanu>
I hear you, I'm just not hearing your argument for why
<benzrf>
beginnerrubyist: a scope is something a variable live sin
<emanu>
which will help me understand
<benzrf>
beginnerrubyist: if a variable is scoped to x, it means that it lives in x and will go away when x ends
danshultz has quit [Ping timeout: 272 seconds]
<benzrf>
beginnerrubyist: lvars are scoped to each time a method runs
<SmoothPorcupine>
emanu: In basic terms, all you're doing is copying files, right?
<benzrf>
beginnerrubyist: so they live in a method invocation, and when the method is done all of the variables scoped to it die
tyl_ has joined #ruby
<benzrf>
beginnerrubyist: ivars are scoped to an object, meaning that they live in an object and go away when the object is garbage collected
<beginnerrubyist>
the variables go away?
w4pm has quit [Read error: Operation timed out]
<cong>
beginnerrubyist, you're just confusing yourself so do this https://eval.in/95233
<emanu>
smooth: but I need a maintainable repository of osx applications and the files that are safe to symlink for them. These file lists will also likely change with every version of the application, so I need to build in version detection
<emanu>
sorry, that was for SmoothPorcupine
<emanu>
so it doesn't seem as simple as just copying files
<benzrf>
cong: i do not think solving it for them is very helpful
<benzrf>
(´_`)
<emanu>
so I feel the toolset of ruby has some good solutions to this problem
<beginnerrubyist>
cong ty, this is the help I need.
<cong>
we need to be more helpful.
<SmoothPorcupine>
emanu: Regardless of which files get copied, that's basically the final end result operation being performed, yes?
<emanu>
SmoothPorcupine: no, it's actually version detection of the application it's backing up first (the harder problem), and then moving the "safe" config files for the version that was detected
<SmoothPorcupine>
Right, but that's deciding which files to move.
<SmoothPorcupine>
In the end, you still need to move them to have done anything useful.
<emanu>
yea, the core problem to solve
<emanu>
and then yes, I will move and symlink files
<emanu>
but I don't think sh/bash is a good tool for solving the hard problem, no?
<beginnerrubyist>
cong, can you help me please.
Parker0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baggypants has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<SmoothPorcupine>
Depends on how fluent you are in it.
FifthWall has quit [Ping timeout: 264 seconds]
maxmanders_ has quit [Ping timeout: 245 seconds]
end_guy has quit [Ping timeout: 240 seconds]
<emanu>
not very fluent, and I'm very fluent in ruby, so I still don't see why not?
<SmoothPorcupine>
But ultimately you're building a file index based on environmental conditions.
<emanu>
yes
snkcld has quit [Ping timeout: 252 seconds]
<SmoothPorcupine>
Yes, that's a more or less trivial task.
<SmoothPorcupine>
Ruby's natural system-level funcitonality provides everything you need for that basic task.
maxmanders_ has joined #ruby
<SmoothPorcupine>
functionality*
snkcld has joined #ruby
therod has joined #ruby
<emanu>
I thought this was a ruby channel. Why are you so adamant on me not using ruby?
fgo has quit [Remote host closed the connection]
<SmoothPorcupine>
Have you tested to ensure symlinked config files work properly?
<cong>
beginnerrubyist, in order to access the instance variables you have to define instance methods. you understand that right? attr_writer or attr_reader is just that.
iamdoo2 has joined #ruby
<SmoothPorcupine>
E.g., do the symlinks get overwritten with new config files when applications exit?
<seekwill>
emanu: Because sometimes there are better tools for certain tasks
bthesorceror has quit [Remote host closed the connection]
<beginnerrubyist>
cong, I'll just read on the internet about these things. Thanks for helping me
<SmoothPorcupine>
emanu: Using ruby is fine, but your problem isn't about ruby per se.
baggypants has joined #ruby
<emanu>
and what is my problem?
FifthWall has joined #ruby
<cong>
beginnerrubyist, see yer
<SmoothPorcupine>
Collaborative file indexing based on environmental conditions.
<beginnerrubyist>
cong: huh
<SmoothPorcupine>
Ruby can do this, and I'm not saying you shouldn't use ruby to do this.
Brolen has quit [Remote host closed the connection]
<cong>
beginnerrubyist, fairwell?
Brolen has joined #ruby
<emanu>
so what are you saying? I'm confused
<beginnerrubyist>
bye
<SmoothPorcupine>
Mostly I'm using words in ways that match the design process more accurately.
drewbug has joined #ruby
<drewbug>
I'm a big fan of #tap
therod has quit [Ping timeout: 272 seconds]
<SmoothPorcupine>
You sound like you have your terminology and layers of abstraction slightly confused.
<pontiki>
or a big fan of on-tap
<emanu>
I didn't realize there was a canonical process for design
end_guy has joined #ruby
iamdoo2 has quit [Ping timeout: 265 seconds]
<emanu>
that might actually be the case, yes
<SmoothPorcupine>
It's not well advertised. :V
<emanu>
oy...
<SmoothPorcupine>
Or, it's not as advertised as, "Woooo code!"
baggypants has quit [Ping timeout: 265 seconds]
fgo has joined #ruby
<BraddBitt>
is the rails chan on freenode #rails or #rubyonrails?
Mattx has quit [Ping timeout: 272 seconds]
Brolen has quit [Ping timeout: 264 seconds]
Lewix has joined #ruby
<centrx>
BraddBitt, #rubyonrails is much more active
<BraddBitt>
thanks
BraddBitt is now known as BraddPitt
nanoyak has joined #ruby
jtdowney has joined #ruby
<SmoothPorcupine>
emanu: You'd hope that an application would change the path name of its configuration file every time it changed the format of its configuration file.
guardianx_ has joined #ruby
Lewix has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
FifthWall has quit [Ping timeout: 245 seconds]
<SmoothPorcupine>
Although "structure" of configuration might be a better term in some cases.
<emanu>
now I think you're overthinking this
<emanu>
or at least your terminology
maxmanders_ has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
<SmoothPorcupine>
I have a tendency to. <_<
end_guy has quit [Ping timeout: 240 seconds]
<SmoothPorcupine>
It'd all be ones and zeros if not for terminology.
cjsarette has quit [Ping timeout: 240 seconds]
maxmanders_ has joined #ruby
axl_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<pontiki>
it still is all ones and zeros :)
cj3kim has joined #ruby
FifthWall has joined #ruby
shedd has joined #ruby
<emanu>
+1
ebeip90 has quit [Ping timeout: 272 seconds]
<emanu>
aanyways
<emanu>
this is very off topic
Amart41 has joined #ruby
shedd has quit [Read error: Connection reset by peer]
<emanu>
clearly there are some people who like using ruby more than shell scripting
shedd has joined #ruby
ebeip90 has joined #ruby
<emanu>
thus the existence of vli, thor, commander and cir
<emanu>
cri*
<pontiki>
oh heavens yes
<cong>
more then batch batching
<emanu>
so, the original question, which I think is still relevant, is: If you had to pick one, is there one that is a more active and popular project?
<emanu>
is there one that is considered "best practice"?
<pontiki>
sorry, for what?
<emanu>
for creating a command-line-only application
<pontiki>
oh
<pontiki>
*shrug*
<pontiki>
davetron5000's are rather nice
<pontiki>
gli and methadone
<pontiki>
i like using them
<pontiki>
i like thor for generators
<pontiki>
and of course, good old rake
<pontiki>
i guess i wouldn't strive to pick on, ever, really
<pontiki>
one*
<emanu>
got it, I was considering gli
<emanu>
I think I will foliow this train of thought
<pontiki>
gli rather packages common things up, an ok dsl
<emanu>
though not to rag on you SmoothPorcupine, you did mention something important I didn't consider: I haven't thought about what happens when an application in osx is closed, does it write to its config? And if so, will there be conflicts for open applications on multiple machines
<pontiki>
i like it because it let's me just concentrate on the app
tdubya has quit [Read error: Connection reset by peer]
<emanu>
pontiki: yea, that's exactly what I'm looking for
tdubya has joined #ruby
Amart41 has quit [Ping timeout: 272 seconds]
end_guy has joined #ruby
<pontiki>
if you have to keep configuration in sync across different machines using the same installation, that seems rather a sticky thing.
cyberarm has joined #ruby
<pontiki>
i'm not sure i'd tend to do that for a cli
OdNairy has joined #ruby
Mattx has joined #ruby
<emanu>
I'm basically thinking I can copy the relevant files from ~/Library to Dropbox
<emanu>
and let dropbox do the syncing
<SmoothPorcupine>
For CLI best practice is to not use some abstraction layer.
<emanu>
but it auto-opts-in all your apps, kind of frightening
<SmoothPorcupine>
Shouldn't be hard to change that behavior, given the source code.
browndawg has joined #ruby
<emanu>
yea, exactly
sambao21 has joined #ruby
octoberry has quit [Ping timeout: 272 seconds]
shedd has quit [Ping timeout: 265 seconds]
sambao21_ has joined #ruby
sambao21 has quit [Read error: Connection reset by peer]
sambao21_ is now known as sambao21
OdNairy has quit [Ping timeout: 264 seconds]
ghanima has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
<SmoothPorcupine>
emanu: Thanks for the question though. It's helped me isolate a high-level design demand.
<emanu>
I have no idea what you're talking about, but glad to be of service. ;)
drewbug has left #ruby [#ruby]
<SmoothPorcupine>
Well, you can write an IRC bot with telnet(1), sed(1), and a few connective lines of sh(1).
cbetta is now known as cbetta_afk
charliesome has joined #ruby
<SmoothPorcupine>
Shell scripting was designed with application development explicitly in mind.
<benzrf>
ew
Lewix has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
ClientAlive has joined #ruby
<SmoothPorcupine>
Hey, do I express disgust at /your/ way of life/code? >:V
Lewix has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
<benzrf>
you are free to
<benzrf>
;)
Lewix has joined #ruby
gener1c has quit [Disconnected by services]
gener1c_ has joined #ruby
<ClientAlive>
I'm getting ""
<ClientAlive>
An error occurred while installing mysql2 (0.3.11), and Bundler cannot continue.
<ClientAlive>
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling
<ClientAlive>
After runnin "sudo -u git -H bundle install --deployment --without development test msql aws"
<ClientAlive>
Got the same when I ran "sudo -u git -H bundle install --deployment --without development test msql2 aws"
<ClientAlive>
What gives?
blaz3rz has quit [Remote host closed the connection]
<ClientAlive>
I'm using postgresql, not mysql
<SmoothPorcupine>
How do you live like this?!
Lewix has quit [Remote host closed the connection]
<centrx>
ClientAlive, Then just remove mysql2 from your Gemfile :)
<ClientAlive>
centrx: I can do that and not break the app I'm trying to install?
<centrx>
What is the app?
<ClientAlive>
gitlab
<seekwill>
You have "msql2". is that correct, and not "mysql2"?
beginnerrubyist has quit [Ping timeout: 245 seconds]
<centrx>
You'll have to find out if gitlab is compatible with postgresql
<ClientAlive>
seekwill: oh schnapp!!
<ClientAlive>
my bad
<seekwill>
Was that really the issue? :)
<ClientAlive>
I'm about to find out. It look like I had that misspelling though. lol
sambao21 has quit [Ping timeout: 252 seconds]
braincrash has quit [Quit: bye bye]
banjara has joined #ruby
<ClientAlive>
Nope
<ClientAlive>
still getting the error ( with the correct spelling? Or is it "mysql" and not "mysql2"? )
blaz3rz has joined #ruby
sambao21 has joined #ruby
<SmoothPorcupine>
ClientAlive: There's a ton of things you can do without breaking the app you're trying to install and few people will ever find out even a handful of what those things are.
<SirFunk_>
When using a module for a singleton. Is there any way to run some code when it gets "initialized" (called for the first time) ?
fgo has joined #ruby
<seekwill>
I think you need to pastebin some details
<pontiki>
ClientAlive: you should look in your gemfile and see what the group name is
<ClientAlive>
SmoothPorcupine: right on
<ClientAlive>
pontiki: well that makes me feel pretty dumb :)
<SmoothPorcupine>
"Dependency" often just means,
braincrash has joined #ruby
gozali has joined #ruby
jtdowney has quit []
<SmoothPorcupine>
"Developer prefers."
<pontiki>
*gulp* sorry :(
Hanmac has joined #ruby
<SmoothPorcupine>
SirFunk_: I know there is, but I'm not recalling offhand.
<SirFunk_>
hmm. I've been googling for a while, can't find an answer
yacks has joined #ruby
<SmoothPorcupine>
Either that, or I just ended up being satisfied with calling an extension method post-extend.
<ClientAlive>
pontiki: The line reads "gem "mysql2", group: :mysql"
<SmoothPorcupine>
It'll be in the standard documentation if there is a way.
<ClientAlive>
Can you tell I know nothing about ruby?
banjara has quit [Ping timeout: 260 seconds]
<ClientAlive>
It was "mysql"
cjsarette has joined #ruby
<ClientAlive>
I'm good now
Hanmac1 has quit [Ping timeout: 260 seconds]
<ClientAlive>
Just out of curiousity, when I get that error, does it mean I need to run the command again until it is successful? Or does all the other stuff get insalled properly anyway and I can just press forward and be ok?
cj3kim has quit [Remote host closed the connection]
<SmoothPorcupine>
It either means what it says or it means the developer would prefer you do what it says.
<SmoothPorcupine>
There's no standard way of knowing or determining which is which.
<ClientAlive>
SmoothPorcupine: Not sure that answers my question but ok. I suppose common sense would tell you that you don't know where the thing got stopped up at and thus not assume everything but that one gem is installed. Idk.
<ninjapig>
#join #ruby-lang
jtdowney has joined #ruby
<centrx>
ClientAlive, Usually gems fail to install because your system is missing the necessary development/header files to compile the gem
<ClientAlive>
But what I thought was that - it's concievable - when one or two gems fail to install, all ( all ) the others may yet install anyway. In other words, afaik, if the fialing gem is located on a line somewher in the middle of the Gemfile, bundler might still just skip over it and continue to install everything that comes after it. Or, it may just stop trying the minute it hits the problem line in the Gemfile. Which one might it be?
<ClientAlive>
*failing gem*
bradhe has quit [Remote host closed the connection]
sparrovv has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
<SmoothPorcupine>
Dependency resolution is actually pretty trivial.
<SmoothPorcupine>
It probably halts on error.
Hanmac1 has joined #ruby
yasushi has joined #ruby
<SmoothPorcupine>
No sense doing work for something you know has already failed.
sassamo has quit [Remote host closed the connection]
<ClientAlive>
hmm... now this makes me curious ( curiousity killed the cat though ) lol
<ClientAlive>
anyway, back to my install I guess. knowing the answer to this won
ch0mskiii has quit [Read error: Connection reset by peer]
sassamo has joined #ruby
<ClientAlive>
won't stop me from that
shedd has joined #ruby
sassamo has quit [Read error: Connection reset by peer]
fgo has quit [Remote host closed the connection]
ch0mskiii has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
sassamo has joined #ruby
xcv has joined #ruby
agjacome has quit [Quit: leaving]
fgo has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
<benzrf>
hey
<benzrf>
has anybody here used Faye?
mary5030 has quit [Remote host closed the connection]
shedd has quit [Ping timeout: 272 seconds]
gr33n7007h has quit [Remote host closed the connection]
jtdowney has quit []
<lpvb>
faye?
cong has quit [Quit: lake front]
<lpvb>
oh nvm
danshultz has joined #ruby
mary5030 has joined #ruby
nfk has quit [Quit: yawn]
zz_anildigital is now known as anildigital
Cache_Money has joined #ruby
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
iamdoo2 has joined #ruby
mocfive has quit [Read error: Connection reset by peer]
iamdoo2 has quit [Remote host closed the connection]
iamdoo2 has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
danshultz has quit [Ping timeout: 240 seconds]
dseitz has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mr_red has quit [Ping timeout: 264 seconds]
meatherly has quit [Remote host closed the connection]
meatherly has joined #ruby
angusigu1ss has quit [Ping timeout: 252 seconds]
mikepack has joined #ruby
rubyn00b has joined #ruby
<rubyn00b>
Hi there rubylists
<benzrf>
hello
<rubyn00b>
I am landing for the first time here, do you guys help each other with the problems. ?
mr_red has joined #ruby
Solnse has quit [Remote host closed the connection]
Solnse has joined #ruby
tyl_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ewnd9 has joined #ruby
vlad_starkov has joined #ruby
tyl_ has joined #ruby
<SmoothPorcupine>
rubyn00b: Yes, hello.
<benzrf>
yeah
kizzx2 has quit [Quit: Leaving.]
vlad_starkov has quit [Read error: Connection reset by peer]
kate_r has joined #ruby
<rubyn00b>
Write a function, `no_repeats(year_start, year_end)`, which takes a range of years and outputs those years which do not have any repeated digits.
<rubyn00b>
Can somebody help me with this please .
<rubyn00b>
For example no_repeats(1234, 1234) should give [1234]
<rubyn00b>
no_repeats(1980, 1987).should == [
ghanima has quit [Ping timeout: 248 seconds]
<centrx>
hmm
<SmoothPorcupine>
rubyn00b: Integer#uptio
<SmoothPorcupine>
rubyn00b: Integer#upto rather
habanany1 has joined #ruby
<BraddPitt>
rubyn00b you doing App Academy prep work?
<centrx>
rubyn00b, There might be some fancy mathematical way to determine what numbers have no repeated digits, but otherwise the straightforward way is to convert the integer to a string and do something with the characters
ohwhoa has quit [Quit: woah!]
<rubyn00b>
YEs sir, you got it .
habanany2 has joined #ruby
habanany has quit [Quit: Leaving.]
<BraddPitt>
I start my cohort tomorrow there haha
<rubyn00b>
I assume, you have done App Academy's stuffs? Or google gave it away?
<BraddPitt>
NY or SF?
<rubyn00b>
SF
<BraddPitt>
same here
grieg has quit [Quit: grieg]
<rubyn00b>
Wow, great
tyl_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rubyn00b>
I am so hard trying to get in. I m on 2nd code challange
<rubyn00b>
Freked out about it.
<BraddPitt>
Yeah, I was too
axl_ has quit [Quit: axl_]
<BraddPitt>
You just gotta forget about your nerves and study
<rubyn00b>
Any tips on what to expect.
<rubyn00b>
I am about to take that code challange 2 in an hr.
anildigital is now known as zz_anildigital
<BraddPitt>
We aren't allowed to say the specifics, but I can tell you that the prep work on their github will prepare you very well
gja has joined #ruby
<BraddPitt>
if you can do the majority of those exercises without a problem, you will be fine
<SmoothPorcupine>
rubyn00b: Integer#divmod by the desired base.
shedd has joined #ruby
<SmoothPorcupine>
Is 2002 a year with repeating digits?
habanany1 has quit [Ping timeout: 272 seconds]
<benzrf>
g2g see yall
benzrf has left #ruby [#ruby]
bradhe has joined #ruby
daxroc has quit [Quit: Leaving.]
mocfive has joined #ruby
OdNairy has joined #ruby
shedd has quit [Ping timeout: 245 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
Tritania has quit [Ping timeout: 245 seconds]
Deele has joined #ruby
Vivekananda has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 272 seconds]
meatherly has quit [Remote host closed the connection]
banjara has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
axl_ has joined #ruby
jailbot has joined #ruby
trickyhero has quit [Ping timeout: 245 seconds]
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SmoothPorcupine has left #ruby [#ruby]
jailbot has quit [Client Quit]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Aryasam has quit [Ping timeout: 260 seconds]
tyl has joined #ruby
Tritania has joined #ruby
gja has joined #ruby
bradhe has joined #ruby
gja has quit [Client Quit]
mr_red has quit [Max SendQ exceeded]
mr_red has joined #ruby
nisstyre has quit [Quit: Leaving]
sassamo has quit [Read error: Connection reset by peer]
SiliconG has joined #ruby
sassamo has joined #ruby
SiliconG has quit [Max SendQ exceeded]
SiliconG has joined #ruby
Aryasam has joined #ruby
tylersmith has joined #ruby
yasushi has quit [Remote host closed the connection]
Steve445 has joined #ruby
OdNairy has quit [Ping timeout: 265 seconds]
tylersmi_ has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
iamsean has quit [Quit: iamsean]
tyl has quit [Ping timeout: 272 seconds]
sethen has quit [Quit: Leaving...]
shedd has joined #ruby
pu22l3r_ has joined #ruby
tyl has joined #ruby
IceDragon has quit [Quit: Space~~~]
cj3kim has joined #ruby
daxroc has joined #ruby
OdNairy has joined #ruby
OdNairy has quit [Client Quit]
Hanmac has joined #ruby
pu22l3r_ has quit [Ping timeout: 248 seconds]
shedd has quit [Ping timeout: 272 seconds]
cj3kim has quit [Ping timeout: 272 seconds]
axl_ has quit [Quit: axl_]
habanany2 has quit [Read error: Connection reset by peer]
habanany has joined #ruby
Hanmac1 has quit [Ping timeout: 240 seconds]
sassamo has quit [Remote host closed the connection]
sambao21 has joined #ruby
sassamo has joined #ruby
therod has joined #ruby
zz_anildigital is now known as anildigital
banjara has quit [Ping timeout: 248 seconds]
zxq9 has quit [Read error: Connection reset by peer]
<ev1luti0n>
im very very new ^_^ im trying to deploy an irc bot
<ev1luti0n>
seems simple enough
<ev1luti0n>
but it's my first time
<fantasticsid>
so what if i want to programmatically pass in the name of arg1?
<centrx>
I see
<centrx>
Interesting
Aryasam has joined #ruby
<centrx>
fantasticsid, Well, let's think about this, what is the reason for doing that, can't it be named anything?
<centrx>
ev1luti0n, Go on...
<fantasticsid>
reason i'm doing this is i want to generate some apis from a specifications programmatically, and for each method i have some required arguments, i want to pass in those required arguments..
<ev1luti0n>
do i have to clone this install somewhere specific
yarou has quit [Remote host closed the connection]
<fantasticsid>
i will be using the name of the formal arguments in the method definition body..
<fantasticsid>
for eg.
<fantasticsid>
if i have method_name = :square, arg_name = :x
<ev1luti0n>
i was using git bash and it placed it in c:\user\username\bitches
<centrx>
fantasticsid, Why does _your_ method have to have the same internal argument name as the API?
<ev1luti0n>
is that fine
<centrx>
fantasticsid, Is the dynamic method going to be used in an API with keyword arguments?
<fantasticsid>
i want to programmatically generate def square(x) puts x.to_s; puts x * x end
<Steve445>
anyone use RubyJS or Opal?
octoberry has joined #ruby
<fantasticsid>
no, positional
zxq9 has joined #ruby
<fantasticsid>
reason is those arguments are required arguments, so i want to generate positional arguments so the API is safer
gnephiak has joined #ruby
<centrx>
ev1luti0n, That should be fine
e^0 has joined #ruby
<centrx>
fantasticsid, But they can be named anything? If they are positional, no one sees the variable name except the compiler?
shedd has joined #ruby
niklasb has quit [Ping timeout: 264 seconds]
Riking has quit [Ping timeout: 264 seconds]
xcv has quit [Remote host closed the connection]
<fantasticsid>
but i still need to refer to those names in my method definition
<fantasticsid>
actually the api will have multiple arguments
<fantasticsid>
for eg., args_list = [:x, :y]
<centrx>
I don't really understand, but you can use class_eval
<fantasticsid>
ooh
<ev1luti0n>
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/1.8/bcrypt_ext.so, ski
<ev1luti0n>
pping
<fantasticsid>
i'm really new to ruby
<ev1luti0n>
that's what happens when i install dependancies
<centrx>
ev1luti0n, I think that is just a warning, not a show-stopping error?
nanothief has joined #ruby
<centrx>
fantasticsid, but you have the name in the method definition |arg|
Riking has joined #ruby
Riking has joined #ruby
Riking has quit [Changing host]
m104 has quit [Quit: bye]
octoberry has quit [Ping timeout: 245 seconds]
<centrx>
fantasticsid, Do you have the real code you are working with?
<fantasticsid>
yeah, but if i use `arg`, then the name of the arguments is `arg` right? What i want is to customise the name of argument so that i can use these names in my method definition..
<fantasticsid>
you can see here i have a list of apis i want to define
<fantasticsid>
for now i'm doing it manually
danijoo_ has quit [Read error: Connection reset by peer]
bradhe has quit [Remote host closed the connection]
<centrx>
fantasticsid, Do you have to write those methods yourself, or just pass the arguments through?
danijoo has joined #ruby
guardianx has joined #ruby
musty_ is now known as musty
guardianx_ has quit [Ping timeout: 245 seconds]
<fantasticsid>
pass it through
bradhe has joined #ruby
<fantasticsid>
you see the definition of create_domain is fairly simple
Alina-malina has quit [Read error: Connection reset by peer]
jso has quit [Quit: Goodbye]
<fantasticsid>
just compose a hash out of name of arguments and their value, then pass it to the `call` method
browndawg has quit [Ping timeout: 265 seconds]
Alina-malina has joined #ruby
sambao21 has joined #ruby
sambao21 has quit [Client Quit]
anildigital is now known as zz_anildigital
<fantasticsid>
so the question really is, once i have the method lists and required arguments names for each of these methods, how can i programmatically generate all apis like i'm doing here with create_domain..
<fantasticsid>
maybe i'll just digress and simply collect all positional arguments and keyword arguments, zip them up with the required arguments list into a hash, then merge keyword arguments, and finally pass them to `call`
<fantasticsid>
that way seems to be viable
bradhe has quit [Ping timeout: 272 seconds]
v0n has quit [Ping timeout: 264 seconds]
pranny has joined #ruby
<fantasticsid>
but loses the benefit of more informative error reporting if user passes wrong number of arguments..
f0ster has quit [Read error: Connection reset by peer]
<centrx>
ev1luti0n, sqlite works...
<centrx>
ev1luti0n, Usually the extension is *.db I believe
<centrx>
fantasticsid, You don't need to do anything to merge positional and keyword arguments, the keyword arguments are converted into a hash from the * splat
aniM has joined #ruby
<centrx>
Steve445, RubyJS sounds really great....
<Steve445>
Have you looked at OpalRB?
<centrx>
This is the first I've seen of both of them
tonni_ has quit [Remote host closed the connection]
Czupa has quit [Remote host closed the connection]
<ev1luti0n>
centrx, ok it's missing a dependancy
<ev1luti0n>
youtube_it
therod has joined #ruby
browndawg has joined #ruby
mikepack has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
ktosiek has quit [Read error: Operation timed out]
banjara has quit [Ping timeout: 240 seconds]
noop has joined #ruby
altin has quit [Ping timeout: 260 seconds]
banjara has joined #ruby
ktosiek has joined #ruby
OdNairy has joined #ruby
therod has quit [Ping timeout: 264 seconds]
angusigu1ss has joined #ruby
* sickweezle
kicks himself as he discovers that a great deal of his headache may have been memory exhaustion, and may very well have wasted MANY hours chasing the wrong problem. -.-
banjara has quit [Client Quit]
Aryasam has quit [Ping timeout: 252 seconds]
bradhe has quit [Remote host closed the connection]
predator217 has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
recurrence has joined #ruby
nism has quit [Quit: This computer has gone to sleep]
<pontiki>
sickweezle: take a break. make some tea. maybe a soak.
<pontiki>
just time to disengage, you know?
<sickweezle>
Yar. :)
<sickweezle>
Just that I had no clue there was a memory problem on the remote host, causing load issues and having spent a long time on things that aren't the problem is irritating.
<pontiki>
memory problems are a bitch to solve
angusigu1ss has quit [Ping timeout: 265 seconds]
<sickweezle>
Well, in this case, the ec2 instance is a micro instance and had no swap configured. Now it has 1GB of swap. ^^
Aryasam has joined #ruby
vlad_starkov has joined #ruby
thesheff17 has quit [Ping timeout: 272 seconds]
bradhe has quit [Ping timeout: 265 seconds]
<sickweezle>
Or maybe.
<sickweezle>
Bleah.
<sickweezle>
I think it is time for sleep.
* pontiki
nods
<pontiki>
fresh eyes tomorro
<sickweezle>
capistrano + rbenv + bundler + trying to daemonize the thing from ruby code called from command line + being still quite noobish = ouch
* sickweezle
staggers off towards bed.
vlad_starkov has quit [Ping timeout: 240 seconds]
danijoo has quit [Read error: Connection reset by peer]
dik_dak has quit [Quit: Leaving]
danijoo has joined #ruby
bradhe has joined #ruby
yacks has quit [Read error: Connection reset by peer]
recurrence has quit [Quit: super tired]
<ev1luti0n>
i've never compiled from source or anything
<ev1luti0n>
i need an old version of nokogiri
<ev1luti0n>
but when i found it it has no gemspec to build
tylersmi_ has quit [Remote host closed the connection]
Spami has joined #ruby
makara has joined #ruby
vlad_starkov has joined #ruby
shedd has joined #ruby
kitak_ has quit [Remote host closed the connection]
Aryasam has quit [Ping timeout: 252 seconds]
zipper has joined #ruby
heidi has joined #ruby
ph8 has quit [Read error: Connection reset by peer]
v10energy has quit [Ping timeout: 272 seconds]
browndawg has quit [Quit: Leaving.]
ghanima has joined #ruby
MissionCritical has quit [Read error: Operation timed out]
zipper has quit [Client Quit]
zipper has joined #ruby
predator117 has joined #ruby
<fantasticsid>
centrx Thanks!!
Lewix has quit [Remote host closed the connection]
<centrx>
fantasticsid, Ah you did see it
mary5030 has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
shedd has quit [Ping timeout: 252 seconds]
apeiros has quit [Remote host closed the connection]
rubyn00b has joined #ruby
bradhe has joined #ruby
apeiros has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Aryasam has joined #ruby
vlad_starkov has joined #ruby
<rubyn00b>
Anybody here joining Appacademy anytime soon?
pu22l3r_ has joined #ruby
kevinykchan has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
kitak has joined #ruby
<centrx>
rubyn00b, Probably not at this hour :)
<rubyn00b>
Looks like it.
tonni has joined #ruby
brunops has quit [Ping timeout: 272 seconds]
bradhe has quit [Ping timeout: 252 seconds]
apeiros has quit [Ping timeout: 272 seconds]
ClientAlive has quit [Quit: I quit...]
<rubyn00b>
Anybody care to explain what is the point of just joining this irc and logging out. I dont see any conversation happening here. Or am I missing something?
pu22l3r_ has quit [Ping timeout: 272 seconds]
bal has joined #ruby
<jrobertfox>
lol agree, i wish i could hid that
vlad_starkov has joined #ruby
Nanuq has quit [Ping timeout: 245 seconds]
<ev1luti0n>
i need an old version of nokogiri
mhenrixon has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
<ev1luti0n>
how do i do it when there is no .gemspec file?
mhenrixon has joined #ruby
<shevy>
wat
<shevy>
you need a .gemspec file if you wanna build a .gem file
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<shevy>
nokogiri is on rubygems.org
brennanMKE has quit [Remote host closed the connection]
<ev1luti0n>
but it seems like all the dependancies are conflicting or something
<ev1luti0n>
>_<
<snkcld>
apparently Kernel.Float is occupying alot of time, in my jruby profiling... how would i track down exactly where Kernel.Float is being called?
<ev1luti0n>
seems like they didn't update the .gems file
<ev1luti0n>
i have two versions of cinch it seems :(
<shevy>
uninstall one then
<shevy>
gem install cinch
<shevy>
Fetching: cinch-2.0.11.gem (100%)
<shevy>
gem uninstall bla --version 1.1.9
<rubyn00b>
@ev1luti0n Nice repo name BTW, I have to opt-out, dunno much. My apologies.
mocfive has quit [Remote host closed the connection]
JasmeetQA has quit [Read error: Connection reset by peer]
<shevy>
rb app.rb
<shevy>
/usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- cinch/extensions/authentication (LoadError)
<shevy>
hmmm
<ev1luti0n>
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require': cannot load such file -- nokogiri/
<ev1luti0n>
2.0/nokogiri (LoadError)
dseitz has joined #ruby
<shevy>
seems like a bug
mocfive has joined #ruby
<shevy>
I mean that you dont have nokogiri
<shevy>
did you do a gem install nokogiri anyway?
roolo has joined #ruby
<shevy>
start irb, then do: require 'nokogiri'. if the gem install before worked then require must work.
klaut has joined #ruby
<ev1luti0n>
shevy i have nokogiri 1.5.2 x86-mingw32
<ev1luti0n>
oh
<ev1luti0n>
irb?
gja has joined #ruby
<shevy>
irb.exe on windows
lifestream has joined #ruby
<shevy>
should work if you open cmd.exe
<shevy>
win+r key I think
w4pm has joined #ruby
<shevy>
windows sucks so much, go install the unix tools like from MSys, that will help a bit :P
<shevy>
that require line seems weird btw
<shevy>
anyway, in irb try:
<shevy>
require 'nokogiri'
<shevy>
nokogiri-1.5.5.gem
rubyn00b has quit [Quit: irc2go]
abroco has joined #ruby
<abroco>
hello
cj3kim has joined #ruby
<shevy>
hi abrocoli
<ev1luti0n>
it says cannot load such file
<ev1luti0n>
nokogiri/2.0/nokogiri
<abroco>
Given the string "hello'\bye", how can I trim the string so that it gives back "hello" alone, trimming special characters, and everything that comes after it?
<abroco>
hello shevy :)
mocfive has quit [Ping timeout: 264 seconds]
JasmeetQA has joined #ruby
<lifestream>
Is there some sort of ruby tutorial that teaches by creating a program, and adding features with each lesson? I'm not a programmer but I've been exposed to programming in the past, so I already know the theory.
<mbuf>
bnagy, I have actual double words (4 bytes) from a device in HEX, which I would like to convert to floating point
<mbuf>
bnagy, can you give an example?
visof has quit [Ping timeout: 272 seconds]
visof has joined #ruby
senayar has joined #ruby
plotter has joined #ruby
plotter has joined #ruby
Solnse has quit [Remote host closed the connection]
<bnagy>
4 bytes? That's single precision I guess?
recurrence has joined #ruby
<recurrence>
I am saving an activerecord and it is causing an undesirable side effect (a different db table is being updated). Is there a way to trace what is doing that?
<pipecloud>
bnagy: Some people do indeed use activerecord outside of rails. The sane ones use datamapper though.
Al__ has joined #ruby
olivier_bk has joined #ruby
thealch3m1st has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
greenarrow has joined #ruby
<apeiros>
pipecloud: if you already know AR, is it worth the effort of learning DM?
shedd has joined #ruby
<pipecloud>
apeiros: I think it depends on if you like the datamapper pattern over the activerecord pattern. Some people seem to avoid learning new things though.
joonty_ has quit [Quit: WeeChat 0.4.2]
<apeiros>
it's not that I'm not willing to learn new things
mavcunha has quit [Client Quit]
<pipecloud>
apeiros: I like datamapper in ruby because it takes a lot less effort.
<apeiros>
but AR and DM are rather complex beasts with (probably, since I don't know DM) each its fair share of non-trivial issues which require a lot of in-depth knowledge
TMM has joined #ruby
<pipecloud>
datamapper migrations are pretty nice.
danijoo has quit [Read error: Connection reset by peer]
<apeiros>
:name.like
bradleyprice has joined #ruby
nvrch has joined #ruby
danijoo has joined #ruby
sparrovv has joined #ruby
predator117 has joined #ruby
Hanmac has joined #ruby
shadoi has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
ninjapig1 has joined #ruby
chipotle has joined #ruby
dayepa1 has quit [Quit: dayepa1]
recurrence has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hanmac2 has quit [Ping timeout: 248 seconds]
sparrovv has quit [Remote host closed the connection]
ninjapig has quit [Ping timeout: 252 seconds]
bcz has joined #ruby
dayepa1 has joined #ruby
rdark has joined #ruby
mikecmpbll has joined #ruby
Deejay_ has joined #ruby
brennanMKE has joined #ruby
asmodlol has joined #ruby
dweeb_ has joined #ruby
<bcz>
hi everyone. can someone give me a hint here? i want to have the RECORD_FILENAME variable to append a integer (loop counter) so it creates a new file every time
<apeiros>
pipecloud: I read that as a "yes, it does"
<pipecloud>
apeiros: In a pretty ugly way too.
<apeiros>
hm, I don't like deprecation errors without information about how to upgrade
<apeiros>
#{"raise \"explicit use of '#{sym}' operator is deprecated (#{caller.first})\"" if sym == :eql || sym == :in}
<apeiros>
and they put singleton_class into the wrong class and forgot that Kernel methods are all module_function…
brennanMKE has quit [Ping timeout: 245 seconds]
Asimuth has joined #ruby
Asimuth has quit [Remote host closed the connection]
gtsiftsis has joined #ruby
<apeiros>
public_instance_methods(false).any? { |m| m.to_sym == :to_str } # lol? never heard of method_defined? it seems…
roolo has joined #ruby
<apeiros>
rails isn't role model code. it seems DM isn't either :(
<pipecloud>
It could probably use some love, but I don't really like contributing to large projects.
yasushi has quit [Remote host closed the connection]
srji has joined #ruby
<apeiros>
my experience with large projects has invariable been one of unwilling gatekeepers
<apeiros>
not interested in fighting such fights.
einarj_ has joined #ruby
Baluse has quit [Ping timeout: 272 seconds]
nari has quit [Ping timeout: 245 seconds]
einarj has quit [Read error: Connection reset by peer]
Baluse has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Client Quit]
yfeldblum has joined #ruby
predator117 has quit [Ping timeout: 272 seconds]
Aryasam has joined #ruby
Aryasam_ has quit [Read error: Connection reset by peer]
<bcz>
rec_out = `/usr/bin/arecord -D plughw:#{options[:microphone]},0 -d #{SAMPLE_DURATION} -f #{FORMAT} -t wav #{RECORD_FILENAME} 2>/dev/null` <-- how can i append the loop counter variable to RECORD_FILENAME in ruby?
ozgun has joined #ruby
<apeiros>
bcz: that command contains already various variables, and you can't figure out how to insert another one? o0
<mikecmpbll>
lol :D
<bcz>
i want to know how to append variables
<bcz>
means #{RECORD_FILENAME+i}?
DouweM has joined #ruby
<apeiros>
well, appending is an operation on objects, not variables. assuming RECORD_FILENAME is a String, String#<< would be the append method
shime has joined #ruby
<bcz>
and even then its not what i want because i would like to have "wave1.wav" and not "wave.wav1"
<apeiros>
you can't do "string"+1, no.
<bcz>
okay thanks. ill check that method
frankbutt has joined #ruby
<apeiros>
well, separate suffix and filename then
<apeiros>
I don't think you want to append, though.
<bcz>
good idea. i just need to "combine" all those strings then
frankbutt has left #ruby [#ruby]
<apeiros>
otherwise you'll have wave1, wave12, wave123 etc.
<mikecmpbll>
i think you're looking for this utility method: `insert_counter_variable_before_file_ext(file, counter)`
<mikecmpbll>
:'D
<apeiros>
mikecmpbll: *cough*, sure
Fyyr13 has quit [Remote host closed the connection]
<apeiros>
bcz: the #{} thingy is called "interpolation"
<bcz>
ill see if i can create my own function
<bcz>
sadly the ruby syntax seems to be a bit different to the stuff i usually use
<apeiros>
sadly?
<apeiros>
what'd be the point of different languages if they were all the same?
shedd has joined #ruby
<bcz>
sadly for me - dont get me wrong :)
Wolland has quit [Remote host closed the connection]
obs has quit [Quit: Konversation terminated!]
workmad3 has joined #ruby
bradhe has joined #ruby
mbuf has quit [Ping timeout: 252 seconds]
necrotic_ has joined #ruby
DouweM has quit [Ping timeout: 272 seconds]
roolo has quit [Remote host closed the connection]
shedd has quit [Ping timeout: 272 seconds]
Wolland has joined #ruby
mhenrixon has quit [Read error: Connection reset by peer]
predator117 has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
thomasvs has quit [Read error: Operation timed out]
necrotic_ has quit [Remote host closed the connection]
necrotic_ has joined #ruby
mhenrixon has joined #ruby
karupanerura is now known as zz_karupanerura
marr has joined #ruby
thomasvs has joined #ruby
thomasvs has quit [Changing host]
thomasvs has joined #ruby
necrotic_ has quit [Remote host closed the connection]
popl has joined #ruby
popl has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
obs has joined #ruby
razibog has quit [Ping timeout: 272 seconds]
necrotic_ has joined #ruby
Hanmac has joined #ruby
necrotic_ has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 245 seconds]
heftig has quit [Ping timeout: 272 seconds]
Xeago has joined #ruby
phansch^ is now known as phansch
yfeldblum has joined #ruby
thomasxie has quit [Read error: Connection reset by peer]
mhenrixon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heftig has joined #ruby
Advocation has joined #ruby
obs has quit [Remote host closed the connection]
mojjojo has joined #ruby
cba has quit [Quit: Leaving]
zeeraw has joined #ruby
Elhu has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
shaunbaker has joined #ruby
ephemerian has joined #ruby
mojjojo has quit [Client Quit]
predator117 has joined #ruby
obs has joined #ruby
mojjojo has joined #ruby
nairys has quit [Quit: nairys]
kitak has quit [*.net *.split]
roolo has joined #ruby
Asimuth has joined #ruby
kitak has joined #ruby
tdubya has quit [Ping timeout: 245 seconds]
Asimuth has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 265 seconds]
relix has joined #ruby
drumusician has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 272 seconds]
drumusician has joined #ruby
charliesome has joined #ruby
timonv has quit [Remote host closed the connection]
<mikecmpbll>
just found out about `retry` in a begin..rescue..end
<mikecmpbll>
neat ..
obs has quit [Quit: Konversation terminated!]
rdark has quit [Quit: leaving]
Asimuth has joined #ruby
DouweM has joined #ruby
bradhe has joined #ruby
rdark has joined #ruby
Asimuth has quit [Remote host closed the connection]
shedd has joined #ruby
Wolland has quit [Remote host closed the connection]
<bcz>
whats the correct way to call my function/method in this line?
<bcz>
my method looks like this: def insert_counter_variable_before_file_ext(record_filename, counter) record_filename + counter + ".wav" end
kitak has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 272 seconds]
xue has joined #ruby
xue__ has joined #ruby
xue__ has quit [Client Quit]
shedd has quit [Ping timeout: 252 seconds]
predator117 has joined #ruby
<mikecmpbll>
if counter is an integer that will fail.
<tobiasvl>
mismatched `
<tobiasvl>
bcz: why not just interpolate insert_counter_variable_before_file_ext('RECORD_FILENAME', 'i')
Asimuth has quit [Remote host closed the connection]
<tobiasvl>
like you interpolated the rest
kitak has joined #ruby
<bcz>
mmh i am not familiar with the interpolate thingy
<bcz>
let me google that
<tobiasvl>
well you're using it
<tobiasvl>
#{variable}
<bcz>
its not my script
<tobiasvl>
ah ok
francisfish has joined #ruby
DaniG2k has joined #ruby
<bcz>
mikecmpbll: so what do i do with the integer? it surely is one
<bcz>
i have this line now (interpolated i guess): rec_out = `/usr/bin/arecord -D plughw:#{options[:microphone]},0 -d #{SAMPLE_DURATION} -f #{FORMAT} -t wav #{puts insert_counter_variable_before_file_ext('RECORD_FILENAME', 'i')} 2>/dev/null
Asimuth has joined #ruby
<tobiasvl>
remove the puts from the last interpolation
<mikecmpbll>
yeah
<mikecmpbll>
and remove the quotes around 'i'
<mikecmpbll>
and record_filename
<tobiasvl>
ah yeah i didn't even see those wtf
Asimuth has quit [Remote host closed the connection]
<mikecmpbll>
and put counter.to_s in your method.
Xeago has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
Xeago has joined #ruby
<bcz>
okay removing the quotes actually solved the syntax errors now ;o lets see about the counter.to_s :)
<bcz>
thanks again!
Asimuth has joined #ruby
brennanMKE has joined #ruby
Asimuth has quit [Remote host closed the connection]
end_guy has quit [Remote host closed the connection]
Asimuth has joined #ruby
allen_on_c has quit [Quit: Leaving]
Asimuth has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
brennanMKE has quit [Ping timeout: 245 seconds]
mojjojo has joined #ruby
shaunbaker has quit [Remote host closed the connection]
gregoriokusowski has joined #ruby
predator117 has quit [Ping timeout: 252 seconds]
kiri has quit [Ping timeout: 260 seconds]
Asimuth has joined #ruby
Asimuth has quit [Remote host closed the connection]
razibog has joined #ruby
bradleyprice has quit [Read error: Connection reset by peer]
workmad3 has quit [Quit: leaving]
adamholt has joined #ruby
kiri has joined #ruby
Asimuth has joined #ruby
Asimuth has quit [Remote host closed the connection]
Asimuth has joined #ruby
xlogic has joined #ruby
mengu has quit [Remote host closed the connection]
nari has joined #ruby
Asimuth has quit [Remote host closed the connection]
Asimuth has joined #ruby
<bcz>
mikecmpbll, tobiasvl: its working - thanks both for your help
diegoviola has joined #ruby
<bcz>
naming is a bit off due to a logic error somewhere but the basi functionality is exactly what i wanted
Asimuth has quit [Remote host closed the connection]
ktun has quit []
kaffeebohne has joined #ruby
Asimuth has joined #ruby
blaxter has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
Asimuth has quit [Remote host closed the connection]
<kaffeebohne>
Hi. What would be the best way to pair the gsubs to get cleaner code? https://paste.xinu.at/I1d/ I tried to give an array of regexes but that doesn't work.
fuhgeddaboudit has joined #ruby
shedd has joined #ruby
cow_ has joined #ruby
predator117 has joined #ruby
JBreit has quit [Read error: Connection reset by peer]
ace_striker has quit [Ping timeout: 245 seconds]
<apeiros>
kaffeebohne: nobody told you not to use regexen with html?
<popl>
kaffeebohne: Are you trying to parse HTML?
<apeiros>
in that case: don't use regexen for html!
<popl>
kaffeebohne: You should check out nokogiri
<kaffeebohne>
I try to get rid of the html tags.
<apeiros>
yes. what I said.
ghr has joined #ruby
<popl>
You can do that with Nokogiri.
<kaffeebohne>
cool. Can I get the value of for example "<a title="thevalueiwant">" too?
<apeiros>
yes
<popl>
absolutely
<kaffeebohne>
ok, thanks :)
<kaffeebohne>
But why is regex bad for html?
<popl>
kaffeebohne: Because HTML is not a regular language.
<apeiros>
because html is not regular
<apeiros>
Nokogiri.HTML('<a href="#foo" title="lalala">Some link</a>. Some <b>bold text</b>').text # => "Some link. Some bold text"
fuhgeddaboudit has quit [Ping timeout: 260 seconds]
<Kingsy>
can I get help here installing rails?
<Kingsy>
or would that be offtopic?
<DaniG2k>
Kingsy: try rubyonrails
<popl>
Kingsy: You'd probably get better help in #rubyonrails
Asimuth has joined #ruby
<Kingsy>
thanks
blackmesa has joined #ruby
Kingsy has quit [Changing host]
Kingsy has joined #ruby
<diegoviola>
hi
SHyx0rmZ has quit [Ping timeout: 245 seconds]
cow_ has quit []
Kingsy has left #ruby [#ruby]
JBreit has joined #ruby
Asimuth has quit [Remote host closed the connection]
Baluse has quit [Ping timeout: 245 seconds]
wildroman2 has joined #ruby
blaxter has joined #ruby
Baluse has joined #ruby
predator117 has quit [Ping timeout: 272 seconds]
SHyx0rmZ has joined #ruby
razibog has quit [Ping timeout: 260 seconds]
<Hanmac>
apeiros: .xpath('//a/@title') is interesting too
Asimuth has joined #ruby
Asimuth has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby
Asimuth has joined #ruby
Galgorth has quit []
Asimuth has quit [Remote host closed the connection]
predator117 has joined #ruby
therod has quit [Ping timeout: 252 seconds]
nucc has joined #ruby
xue has quit [Quit: Leaving]
aniM has joined #ruby
DaniG2k has quit [Quit: leaving]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
alexherbo2 has quit [Quit: WeeChat 0.4.2]
bradhe has joined #ruby
Asimuth has joined #ruby
obs has quit [Quit: Konversation terminated!]
Asimuth has quit [Remote host closed the connection]
Asimuth has joined #ruby
Asimuth has quit [Remote host closed the connection]
therod has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bradhe has quit [Ping timeout: 240 seconds]
Amart41 has joined #ruby
Salsa has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
shedd has joined #ruby
obs has joined #ruby
duncan_bayne has joined #ruby
Amart41 has quit [Ping timeout: 245 seconds]
<duncan_bayne>
Hey is help with Rubywarrior (https://github.com/ryanb/ruby-warrior) on-topic here? Want to check before referring people here in a presentation.
<duncan_bayne>
It's a 'how to learn Ruby with rubywarrior' meetup presentation for newbies.
predator117 has quit [Ping timeout: 272 seconds]
jtdowney has joined #ruby
shedd has quit [Ping timeout: 252 seconds]
Salsa has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
user258467 has quit [Quit: Quitte]
kitak has quit [Remote host closed the connection]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<solars>
hi, I have IDs like "IT_FU_BAR" (only uppercase letters and _) which I need to map to an integer ID that always is the same. does anyone know something I could use to quickly do this, like a hash, anything?
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
SHyx0rmZ has joined #ruby
therod has joined #ruby
brennanMKE has quit [Ping timeout: 264 seconds]
gregoriokusowski has quit [Ping timeout: 272 seconds]
gja has joined #ruby
netQT has joined #ruby
Aryasam has quit [Ping timeout: 248 seconds]
Guedes has joined #ruby
Aryasam has joined #ruby
Guedes has left #ruby [#ruby]
<mercwithamouth>
ok i can't get octopress to work for the life of me. i've used it in the past with no problem but it just hangs when i run bundle install
<apeiros>
solars: treat it as base 27 and convert it
vlad_starkov has quit [Remote host closed the connection]
<apeiros>
actually, tr supports ranges
<apeiros>
id.tr("_A-Z", "0-9a-q").to_i(27)
shedd has joined #ruby
altin has joined #ruby
yfeldblum has joined #ruby
blaxter has quit [Quit: foo]
tyl has joined #ruby
blaxter_ has joined #ruby
browndawg has quit [Quit: Leaving.]
kizzx2 has joined #ruby
<solars>
apeiros, Hanmac I just found out that I only have 11 chars for the integer ID... the IDs are generated, I cannot influence them, I just get the string and need a representation of int(11) of it
shedd has quit [Ping timeout: 252 seconds]
<apeiros>
solars: in that case, you're fucked
kizzx2 has quit [Client Quit]
<apeiros>
how long can the string ids be?
yfeldblum has quit [Ping timeout: 245 seconds]
lyanchih has quit [Quit: lyanchih]
Mon_Ouie has quit [Ping timeout: 248 seconds]
gregoriokusows-1 has joined #ruby
Virtualize|away has joined #ruby
Spooner has joined #ruby
popl has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
<solars>
apeiros, string ids can be 16, int ids limited to 11 :)
<solars>
I think I have to store a unique ID somewhere
<apeiros>
yes, fucked as I said
<solars>
yeah
<apeiros>
what you want then is hashing and some way to deal with collisions. but sounds like you're stuck in a lot of suck.
<solars>
yeah that's overkill, I'll try to finda different way.. in fact it's only about 200 IDs, but like this it's a mess
heftig has quit [Ping timeout: 272 seconds]
angusigu1ss has joined #ruby
gregoriokusows-1 has quit [Ping timeout: 252 seconds]
<apeiros>
then just keep an enumeration table on your side
<apeiros>
each new string id gets an autoinc id
jtdowney has joined #ruby
<solars>
ah
thisirs has joined #ruby
<solars>
I just saw I can remove the first 7 chars, because they are always fixed
<solars>
they have a common prefix
<apeiros>
won't help
<apeiros>
still 7625597484986 max decimal number, which is 13 digits
Aryasam has quit [Ping timeout: 260 seconds]
gregoriokusowski has joined #ruby
<solars>
right
<solars>
damn
bradhe has quit [Ping timeout: 265 seconds]
mhenrixon is now known as mhenrixon|afk
<apeiros>
assuming that 11 digit int really means 32bit int, you need 6 digits or less
Elhu has joined #ruby
MrZYX|off is now known as MrZYX
<solars>
yeah..
<solars>
I'm not sure if there is something like a hash function that could be used for this
Es0teric has joined #ruby
<apeiros>
as said, with hash functions you automatically also need collision handling
falood has joined #ruby
<apeiros>
unless no new string ids will ever be generated
<solars>
hm yeah
<solars>
what a mess
<apeiros>
then you can "just" use a perfect hashing algorithm
Es0teric has quit [Max SendQ exceeded]
iamdoo2 has joined #ruby
mhenrixon|afk is now known as mhenrixon
phansch has quit [Quit: Leaving]
marr has joined #ruby
kirun has joined #ruby
Aryasam has joined #ruby
ahawkins has quit [Quit: leaving]
iamdoo2 has quit [Ping timeout: 245 seconds]
ewnd9 has quit [Remote host closed the connection]
_justin has joined #ruby
_justin has left #ruby [#ruby]
yacks has quit [Remote host closed the connection]
mhenrixon has quit [Ping timeout: 252 seconds]
visof_ has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
Davey has joined #ruby
visof has quit [Ping timeout: 252 seconds]
Aryasam has quit [Ping timeout: 272 seconds]
spastorino has joined #ruby
spastorino has quit [Client Quit]
h4rz has joined #ruby
<bcz>
is the formatting in ruby syntax relevant?
<bcz>
tabstops i.e.
EngierkO has joined #ruby
<apeiros>
it's relevant for people who read code
<apeiros>
in some places, space/no-space makes a difference. same for newline/no-newline
<bcz>
okay thanks
<apeiros>
convention is 2 spaces for indent. spaces for alignment.
ewnd9 has joined #ruby
shedd has joined #ruby
shime has quit [Ping timeout: 269 seconds]
anomaly_ has quit [Quit: see you when I see you]
mehlah has quit [Read error: Connection reset by peer]
mehlah_ has joined #ruby
ewnd9 has quit [Remote host closed the connection]
Es0teric has joined #ruby
Es0teric has quit [Remote host closed the connection]
obs has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
prateekp has quit [Ping timeout: 245 seconds]
thomasxie has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 265 seconds]
JasmeetQA has quit [Quit: Leaving.]
ninjapig1 has quit [Ping timeout: 252 seconds]
ewnd9 has joined #ruby
brennanMKE has joined #ruby
tt1187 has joined #ruby
Aryasam has joined #ruby
freerobby has joined #ruby
h4rz has quit [Quit: h4rz]
brennanMKE has quit [Ping timeout: 240 seconds]
e^0 has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
shvelo has joined #ruby
<shvelo>
I need a simple template engine which can include a file easily
[krisbulman] is now known as krisbulman
<shvelo>
like using a single {{ include something.html }}
Aryasam has quit [Ping timeout: 272 seconds]
hiall has joined #ruby
benzrf has joined #ruby
<benzrf>
whats new ruby fans
<benzrf>
shevy: i finally have a gem idea that i am working on
anekos__ has quit [Remote host closed the connection]
tzorvas has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
anekos has joined #ruby
joonty has joined #ruby
krawchyk has joined #ruby
joonty has quit [Client Quit]
<tzorvas>
is there any function for array, which picks all elements after the first desired matching element? without using a[found_index, -1]
w4pm has quit [Write error: Broken pipe]
* benzrf
shrugs
<benzrf>
tzorvas: drop
<MrZYX>
drop_while
francisfish has joined #ruby
<tzorvas>
thank you both, drop_while is what I was looking for
tonni has quit [Remote host closed the connection]
rootshift has joined #ruby
agjacome has joined #ruby
shedd has joined #ruby
visof_ has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
falood has quit []
bradhe has joined #ruby
ikawnoclast has joined #ruby
joonty has joined #ruby
joonty has quit [Client Quit]
shedd has quit [Ping timeout: 252 seconds]
dkamioka has joined #ruby
kalelsage has joined #ruby
tt1187 has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 252 seconds]
tt1187 has joined #ruby
Aryasam has joined #ruby
clamstar has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
breakingthings has joined #ruby
IceyEC has joined #ruby
dblessing has joined #ruby
krz has quit [Quit: WeeChat 0.4.2]
yalue has joined #ruby
tvw has joined #ruby
nikkos has quit [Quit: Computer has gone to sleep.]
lyanchih_ has joined #ruby
bal has quit [Quit: bal]
Elhu has joined #ruby
_root has joined #ruby
visof has joined #ruby
weeb1e has quit [Ping timeout: 264 seconds]
rmorello has joined #ruby
_root has left #ruby [#ruby]
weeb1e has joined #ruby
Brolen has quit [Remote host closed the connection]
yedimind has joined #ruby
ctp has joined #ruby
tonni has joined #ruby
nikkos has joined #ruby
iamdoo2 has joined #ruby
Aryasam has quit [Ping timeout: 252 seconds]
Aryasam has joined #ruby
nikkos has quit [Remote host closed the connection]
kalelsage has quit [Quit: ThrashIRC v2.9 sic populo comunicated]
agjacome has quit [Ping timeout: 248 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
visof has quit [Remote host closed the connection]
coderhs has joined #ruby
visof has joined #ruby
iamdoo2 has quit [Ping timeout: 265 seconds]
sergicles has joined #ruby
danshultz has joined #ruby
bettyclamp has joined #ruby
<bettyclamp>
I'm getting "undefined method `local_variable_get' for #<Binding:0x007faeaa16a660> (NoMethodError)". Any idea why? The docs say that that's one of the four methods of a Binding instance.
dx7 has joined #ruby
<benzrf>
bettyclamp: context?
<apeiros>
bettyclamp: wrong ruby version?
<benzrf>
bettyclamp: it fails for me
<benzrf>
1.9
<apeiros>
you should use docs which match your ruby version
dx7 has quit [Client Quit]
<bettyclamp>
apeiros: you're absolutely right. Thanks for the heads-up.
dx7 has joined #ruby
<benzrf>
hmm
<benzrf>
is there a way to do something only once for every time a method is called in a template?
fella5s has quit [Remote host closed the connection]
mehlah_ is now known as mehlah
<MrZYX>
you mean for all calls?
gja has joined #ruby
nvrch has left #ruby [#ruby]
<MrZYX>
cache the result: def foo; @foo ||= compute_foo; end
_humani has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
orionstein_away is now known as orionstein
gja has quit [Client Quit]
browndawg has joined #ruby
shredding has joined #ruby
nism has quit [Quit: Leaving]
joonty has joined #ruby
shedd has joined #ruby
fella5s has joined #ruby
ahawkins has joined #ruby
_humani has quit [Client Quit]
<apeiros>
I usually use @_foo ||=, just to indicate the lazy nature of the ivar
yacks has joined #ruby
thomasxie has quit [Ping timeout: 269 seconds]
Wolland has joined #ruby
<MrZYX>
hm, that always reminds me of hungarian notation, which I don't like
linduxed has quit [Read error: Operation timed out]
gja has joined #ruby
Zubin has joined #ruby
blaxter_ has quit [Quit: foo]
netQT has quit [Read error: Connection reset by peer]
<benzrf>
so im makin a thingy for javascript rmi
<benzrf>
over websockets
shedd has quit [Ping timeout: 245 seconds]
AlSquirrel has joined #ruby
orionstein is now known as orionstein_away
tonni has quit [Read error: Connection reset by peer]
msuszczy has joined #ruby
blaxter_ has joined #ruby
gnephiak has quit [Remote host closed the connection]
vpretzel has joined #ruby
gnephiak has joined #ruby
<bcz>
anyone any idea about this warning message? i just dont like warnings ;)
<bcz>
mmh
<benzrf>
bcz: which warning message?
thisirs has quit [Remote host closed the connection]
<bcz>
doesnt appear again
<bcz>
just restarted my script but didnt change anything
brennanMKE has joined #ruby
<bcz>
was this one basically: warning: shadowing outer local variable
lyanchih_ has quit [Quit: lyanchih_]
Zubin has quit [Read error: Connection reset by peer]
<MrZYX>
foo = "x"; something.map {|foo| # <- this foo is shadowing the foo pointing to "x"; }
nomadic has quit [Ping timeout: 252 seconds]
<bcz>
ah okay
jerius has joined #ruby
nomadic has joined #ruby
bthesorceror has joined #ruby
<Hanmac>
bcz: also notice that is a difference between 1.8 and 1.9+ because 1.8 does overwrite not shadow
brennanMKE has quit [Ping timeout: 260 seconds]
<MrZYX>
who does still care about 1.8 except you Hanmac?
<Hanmac>
i only warned him, i dont what that he comes back yelling that his code does not work
chipotle has quit [Quit: cya]
<MrZYX>
you know I then have no problem yelling back why he's still using 1.8
lyanchih_ has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
<shevy>
benzrf what gem idea?
thesheff17 has joined #ruby
coderhs has quit [Quit: Leaving]
zoscoy has joined #ruby
tonni has joined #ruby
zoscoy has quit [Client Quit]
<benzrf>
shevy: what i said earlier
<benzrf>
shevy: the thing where it is a rack middleware and then you can do <%= generate_js(ruby_obj, "jsvar") %> and then in the js after that you can use jsvar as the ruby object because of rmi over websockets
LaPetiteFromage has joined #ruby
Davey has joined #ruby
tannerburson has joined #ruby
gregoriokusowski has quit [Quit: gregoriokusowski]
<benzrf>
im callin it Clientside
tkuchiki has joined #ruby
gnephiak has quit [Read error: Connection reset by peer]
fgo has quit [Remote host closed the connection]
gnephiak has joined #ruby
thesheff17 has quit [Read error: Operation timed out]
v0n has joined #ruby
enebo has joined #ruby
<shevy>
hmm
<shevy>
the name is not flashy enough
<shevy>
noone will remember it
Aryasam has quit [Ping timeout: 252 seconds]
<shevy>
call it ....
<shevy>
BenzPower!
* benzrf
whaps shevy with a rolled-up newpaper
<benzrf>
*newspaper
gja has quit [Quit: This computer has gone to sleep]
carif has joined #ruby
Albright has quit [Quit: Albright]
Astralum has joined #ruby
bradhe has joined #ruby
gnephiak has quit [Remote host closed the connection]
gja has joined #ruby
common1 has joined #ruby
pranny has quit [Quit: Leaving.]
common1 has left #ruby [#ruby]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
thesheff17 has joined #ruby
kpshek has joined #ruby
blaxter_ has quit [Ping timeout: 252 seconds]
<shevy>
marketing is everything benzrf
<shevy>
call it...
<shevy>
superJS
bradhe has quit [Ping timeout: 264 seconds]
<shevy>
or how about
<shevy>
JS-Hype
altin has quit [Ping timeout: 245 seconds]
<shevy>
JS-RainbowMaker
<shevy>
JSattack!
<shevy>
js_middleman
shedd has joined #ruby
duggiefresh has joined #ruby
<shevy>
js_rubysockets
<shevy>
:D
Brolen has joined #ruby
<shevy>
man, this is fun
yfeldblum has joined #ruby
aniM has quit [Ping timeout: 245 seconds]
gja has quit [Quit: This computer has gone to sleep]
chipotle has joined #ruby
Virtualize|away has quit [Read error: Connection reset by peer]
benzrf has quit [Read error: No route to host]
Aryasam has joined #ruby
snath has quit [Ping timeout: 252 seconds]
shime has joined #ruby
phansch has joined #ruby
_justin has joined #ruby
_justin has left #ruby [#ruby]
mhenrixon has joined #ruby
Amart41 has joined #ruby
shedd has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
habanany has joined #ruby
SiliconG has quit [Ping timeout: 252 seconds]
<shevy>
where is atmosx
atraylen has quit [Ping timeout: 248 seconds]
carif has quit [Quit: Ex-Chat]
MindfulMonk has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
Amart41 has quit [Ping timeout: 252 seconds]
<chipotle>
how do i make all words in a string uppercase? i tried this but i get an error: puts 'Huh!? Speak up, Sonny!'.uppercase
dkamioka has quit [Remote host closed the connection]
kcombs has joined #ruby
MindfulMonk has joined #ruby
jlast has joined #ruby
pranny has joined #ruby
Squarepy has quit [Quit: Leaving]
mansi has joined #ruby
banister has joined #ruby
mhenrixon is now known as mhenrixon|afk
rmorello has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
fmcgeough has joined #ruby
Czupa has joined #ruby
razibog has joined #ruby
jedimind has joined #ruby
gregoriokusowski has joined #ruby
momomomomo has joined #ruby
tonni has joined #ruby
mlpinit has joined #ruby
blaxter_ has quit [Ping timeout: 265 seconds]
mmcclimon has joined #ruby
mikesplain has joined #ruby
tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby
_HolyCow1 has joined #ruby
ghanima has quit [Quit: Leaving.]
_HolyCow has quit [Ping timeout: 264 seconds]
_HolyCow1 is now known as _HolyCow
tonni has quit [Read error: Connection reset by peer]
shredding has quit [Quit: shredding]
jtdowney has quit []
_maes_ has quit [Read error: Connection reset by peer]
nfk has joined #ruby
mhenrixon|afk is now known as mhenrixon
rmorello has joined #ruby
jobewan has joined #ruby
robbyoconnor has quit [Ping timeout: 272 seconds]
brennanMKE has joined #ruby
clamstar is now known as rx
alekst has joined #ruby
Advocation has quit [Quit: Advocation]
makara has quit [Ping timeout: 272 seconds]
robbyoconnor has joined #ruby
mansi has quit [Read error: Connection reset by peer]
cjsarette has joined #ruby
noop has quit [Ping timeout: 272 seconds]
wildroman2 has quit [Remote host closed the connection]
lfox has joined #ruby
mansi has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
griffindy has joined #ruby
yedimind has joined #ruby
mansi has quit [Read error: Connection reset by peer]
dseitz has joined #ruby
pranny has quit [Quit: Leaving.]
mansi has joined #ruby
mlpinit_ has joined #ruby
Uranio has joined #ruby
bean__ has joined #ruby
<shevy>
apparently ;-)
brennanMKE has quit [Ping timeout: 272 seconds]
ffranz has joined #ruby
blaxter_ has joined #ruby
<dseitz>
grr... why attack github.com? obviously to piss people off, but really
robbyoconnor has quit [Client Quit]
<lectrick>
If I "require" a file while inside some module definition, will the class defined inside the file I require end up defined inside that module?
jedimind has quit [Ping timeout: 248 seconds]
<lectrick>
Or do "require"'s always run in the toplevel scope?
yedimind is now known as jedimind
<Uranio>
dseitz: :O was github atacked?
<dseitz>
it is currently being attacked
mlpinit has quit [Ping timeout: 248 seconds]
<dseitz>
they had to take the repo server offline
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
Butcho has joined #ruby
<Hanmac>
lectrick: require does always put into toplevel scope
<alekst>
A ruby newbie here. have a question about unless statement in ruby. https://gist.github.com/alekst/8650152 this makes no sense to me. I want it to add an element to an array unless a condition is met. what am I doing wrong?
_justin has joined #ruby
_justin has quit [Client Quit]
<lectrick>
Hanmac I suppose I could just try an experiment eh?
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Fyyr13 has quit [Remote host closed the connection]
<hoelzro>
alekst: well, think of that condition
<hoelzro>
"unless the first element of array is 'b', add 'd' to the end of the array"
<Hanmac>
lectrick: load has a second form that load into an anoymous module ... but it does not return it ;(
<hoelzro>
the first element is 'a', so the conditional is entered
axl_ has joined #ruby
Butcho has quit [Client Quit]
<alekst>
d'oh!
<Hanmac>
banister: huhu
aniM has quit [Ping timeout: 265 seconds]
fatih96512547 has joined #ruby
Butcho has joined #ruby
<Uranio>
alekst: also y could write in only one line:
Butcho has quit [Max SendQ exceeded]
michael_lee has quit [Remote host closed the connection]
<Uranio>
array << "d" unless array[0] == "b"
Butcho has joined #ruby
<Uranio>
[action] unless [condition]
Butcho has quit [Max SendQ exceeded]
x77686d has joined #ruby
<alekst>
yes, I know about one line... I just have another version of the conditional that has two lines of code.
interactionjaxsn has joined #ruby
<alekst>
thanks for all your help.
Butcho has joined #ruby
sergicles has quit [Quit: sergicles]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jcarouth has joined #ruby
Advocation has joined #ruby
<Xeago>
what ruby gem converts 25m into 25*60 ?
zeeraw has joined #ruby
bradhe has joined #ruby
<shevy>
the 60-gem?
fatih96512547 has left #ruby [#ruby]
<Xeago>
shevy: ?
pu22l3r_ has joined #ruby
<shevy>
"This absolutely useful gem will take input, then multiply it by 60."
<shevy>
aaaah you mean minutes ;)
<Xeago>
25m as in 25 minutes
<Hanmac>
Xeago: i am not telling you that activesupport does the shit you want ;P
<shevy>
I think there is chronos and the active-record thingy has something
netQT has quit [Read error: Connection reset by peer]
fmcgeough has quit [Quit: fmcgeough]
geggam has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
derf- has left #ruby [#ruby]
CYMOC has quit []
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
apeiros has quit [Remote host closed the connection]
po10 has quit [Quit: ZZZzzz…]
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
po10 has joined #ruby
shaunbaker has joined #ruby
banister has joined #ruby
apeiros has joined #ruby
shedd has joined #ruby
SiliconG has joined #ruby
tyl has joined #ruby
SiliconG has quit [Read error: Connection reset by peer]
RaCx_ has joined #ruby
mlpinit_ has quit [Remote host closed the connection]
RaCx_ has quit [Client Quit]
SiliconG has joined #ruby
RaCx has quit [Ping timeout: 272 seconds]
agjacome has joined #ruby
mlpinit has joined #ruby
mansi has joined #ruby
Aryasam has quit [Ping timeout: 245 seconds]
RaCx has joined #ruby
kobain has joined #ruby
niklasb has joined #ruby
tyl has quit [Client Quit]
apeiros has quit [Ping timeout: 252 seconds]
fedesilva has joined #ruby
MrZYX is now known as MrZYX|off
krisbulman is now known as krisbulman|otp
Butcho has joined #ruby
brunops has joined #ruby
Butcho has quit [Max SendQ exceeded]
senj has joined #ruby
devinus has joined #ruby
deception has joined #ruby
Butcho has joined #ruby
gnephiak has joined #ruby
angusigu1ss has quit [Ping timeout: 248 seconds]
shvelo has quit [Ping timeout: 252 seconds]
geggam has quit [Remote host closed the connection]
geggam has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
tyl has joined #ruby
duggiefresh has joined #ruby
hamakn has joined #ruby
tyl has quit [Client Quit]
ckinni has joined #ruby
gtsiftsis has quit [Quit: Leaving]
byprdct has joined #ruby
yasushi has joined #ruby
<Hanmac1>
ping banister
aniM has joined #ruby
shadoi has joined #ruby
philsturgeon has joined #ruby
<philsturgeon>
having an odd problem. using tweetstream which is a gem implementing eventmachine. I am making a HTTP request within the event block and if something goes wrong the error is silent
user258467 has joined #ruby
<philsturgeon>
normally I'd expect a big old stacktrace to blow up in my face, but its just not doing anything and continuing with the next loop
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterone has quit [Ping timeout: 248 seconds]
Hanmac has joined #ruby
banisterone has joined #ruby
Butcho has quit [Read error: Connection reset by peer]
visof has quit [Ping timeout: 245 seconds]
Hanmac1 has quit [Ping timeout: 265 seconds]
MrZYX|off is now known as MrZYX
Butcho has joined #ruby
allaire has joined #ruby
gmci has joined #ruby
pabloh has joined #ruby
nucc has joined #ruby
<pontiki>
what are you making the request with? Net::HTTP?
jrobertfox has joined #ruby
ebetancourt has joined #ruby
snath has joined #ruby
geekbri has joined #ruby
brunops has quit [Ping timeout: 265 seconds]
gja has quit [Quit: This computer has gone to sleep]
gnephiak has quit [Remote host closed the connection]
Fyyr13 has joined #ruby
Butcho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gnephiak has joined #ruby
Aryasam has joined #ruby
<pontiki>
^ to philsturgeon
top4o has joined #ruby
<philsturgeon>
ponbiki: HTTParty. so im catching the error kinda with rescue, and I see my "SH*T FAILED" output, but not sure what sort of exception it is
banister has joined #ruby
<philsturgeon>
http://d.pr/i/r8PD so just a general ruby question now, but how can i catch ANY exception?
Pixels has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby
gja has joined #ruby
<philsturgeon>
PHP guy, would just catch( Exception $e) to get anything
tkuchiki has quit [Remote host closed the connection]
<freeone3000>
philsturgeon: rescue StandardError
<philsturgeon>
thanks freeone3000
tkuchiki has joined #ruby
<apeiros>
plain rescue defaults to rescue StandardError
<terrellt>
Or just rescue Exception.
<apeiros>
never rescue Exception
<terrellt>
No?
<freeone3000>
philsturgeon: Or rather, to get a reference to the exception, 'rescue => e'.
<apeiros>
unless you know really really well what you're doing.
<freeone3000>
No, Exception includes things like syntax errors and the process running out of memory.
<philsturgeon>
freeone3000: oh nice!
yacks has quit [Quit: Leaving]
<terrellt>
See, that I didn't know, Thank you.
Petru has joined #ruby
zeade has quit [Quit: Leaving.]
troessner has quit [Quit: Leaving]
Lewix has quit [Remote host closed the connection]
Fyyr13 has quit [Ping timeout: 252 seconds]
angusigu1ss has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
moppersmurf has quit [Ping timeout: 272 seconds]
acrussell has joined #ruby
banister has quit [Remote host closed the connection]
jrobertfox has quit [Remote host closed the connection]
tyl has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
pdkl has joined #ruby
x77686d has quit [Quit: x77686d]
gja has quit [Quit: This computer has gone to sleep]
danshultz has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
chrisseaton has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
yasushi has quit [Remote host closed the connection]
<chrisseaton>
Is anyone here familiar with the warning "Useless use of == in void context." - how does the parser know that == has no side effects, in order to issue that warning?
noname001__ has quit [Ping timeout: 272 seconds]
aryaching has joined #ruby
sski has quit [Ping timeout: 260 seconds]
rx has quit [Quit: Computer has gone to sleep.]
<workmad3>
chrisseaton: it probably doesn't (but I could be wrong)... however, ruby warnings do sometimes express opinions about how certain things shouldn't be done, such as == not having side effects (which would be really surprising and not particularly good code)
ademidov has joined #ruby
<MrZYX>
side effects in general should be avoided
dangerousdave has joined #ruby
ademidov has left #ruby [#ruby]
<shevy>
hehe
jlebrech has joined #ruby
<shevy>
like drugs
<shevy>
avoid drugs, kiddies
<workmad3>
driving on drugs is better when they're prescription
thumpba_ has quit [Remote host closed the connection]
dseitz has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy>
workmad3 but you UK guys drive the wrong way even without drugs!!!
zipper has quit [Quit: Lost terminal]
krisbulman|otp is now known as krisbulman
<shevy>
come to think about it, perhaps it is time for drugs there ;)
<chrisseaton>
workmad3: understandable, but for example MSpec and so RubySpec has == that has side effects, so it's not theoretical code
drumusician has quit [Read error: Operation timed out]
<workmad3>
shevy: I don't drive anyway :)
RaCx has joined #ruby
pabloh has quit [Quit: Saliendo]
havenwood has quit [Remote host closed the connection]
moppersmurf has joined #ruby
moppersmurf has quit [Max SendQ exceeded]
<pontiki>
s'funny, because you see 'rescue Exception' all over the place, and it's such a bad practice
slash_nick has quit [Changing host]
slash_nick has joined #ruby
bradhe has joined #ruby
moppersmurf has joined #ruby
<shevy>
pontiki it's good to rescue people!
<shevy>
so it must be good to rescue poor, unhappy code too
moppersmurf has quit [Max SendQ exceeded]
gsvolt_work has joined #ruby
<MrZYX>
just don't forget to raise it afterwards
<shevy>
raise sounds so dangerous
<pontiki>
first rule of rescuers: don't put yourself in the position of having to be rescued
moppersmurf has joined #ruby
moppersmurf has quit [Max SendQ exceeded]
mikesplain has quit [Ping timeout: 252 seconds]
Albright has left #ruby [#ruby]
x77686d has joined #ruby
mikesplain has joined #ruby
devinus has quit [Ping timeout: 245 seconds]
krz has joined #ruby
devinus_ has joined #ruby
moppersmurf has joined #ruby
motto has joined #ruby
moppersmurf has quit [Max SendQ exceeded]
shredding has quit [Quit: shredding]
<lectrick>
there should be a webpage that, all it does is find Github repos of Ruby code that has "rescue Exception" in them and shames them
<benzrf>
i need my json_create method to be able to see a certain value
<benzrf>
can i pass it to load and have it send it along or something?
Aryasam has quit [Quit: Bye]
timonv_ has joined #ruby
<wiku5_>
okay, so if I want to create something like weechat-curses or irssi with that level of a user interface, I could essentially do it in Highline, or is there a better console library with better documentation than highline?
<shevy>
hmm
<shevy>
wiku5_ if you want a wrapper around ncurses then this won't be too easy
<Mattx>
do you happen to know any gem to sample sound from the mic?
<shevy>
it should still work but without a C guru who loves curses, this is doomed to bit-decay
<wiku5_>
so..... which library would you all recommend?
<Mattx>
I found one called ffi-portaudio but it's not longer mantainer
<Mattx>
seems to be the only one
<benzrf>
hi Mattx
timonv has quit [Ping timeout: 240 seconds]
<shevy>
wiku5_ well you said you wanna build weechat-curses
<Mattx>
mantained *
<shevy>
there is not much choice with that
SilentHobo has joined #ruby
phansch has joined #ruby
<shevy>
wiku5_ if you only care about basic input, Readline module + Highline gem should bring you far away. you can even make a disco prompt and use tab completion with that! and with Highling, you could disguise password input too through '*' characters. isn't that awesome? :D
<shevy>
*Highline
jailbot has quit []
<shevy>
the only thing you'd miss is the absolute positioning you can get in curses
saarinen has quit [Quit: saarinen]
rdark has quit [Quit: leaving]
shaunbak_ has quit [Remote host closed the connection]
timonv_ has quit [Read error: Connection reset by peer]
<shevy>
actually you can remove all the Curses. there
<shevy>
you get the idea
<shevy>
but it is so awful
timonv has joined #ruby
<shevy>
everyone hates curses
<wiku5_>
then what do people NOT hate?
<benzrf>
i should make a console thingy library o-o
<benzrf>
maybe someday
<shevy>
wiku5_ ruby :)
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy>
curses is like a 1:1 API translation of the C curses
<wiku5_>
.... I mean, what console library (other than curses) do people usually use?
jtdowney has joined #ruby
olivier__ has quit [Quit: olivier__]
NemesisD has quit [Ping timeout: 245 seconds]
olivier_bk has quit [Read error: Operation timed out]
zeeraw has joined #ruby
Hobogrammer_ has quit [Ping timeout: 252 seconds]
<shevy>
Readline :P
predator117 has quit [Ping timeout: 252 seconds]
<shevy>
benzrf what console library do you use
<wiku5_>
my idea though is creating a simple curses-like ruby-infused program that I'm able to interact with in plain english in order to control teh appliances around my house using JSON get/post requests, as I have a bunch of Raspberry Pi's running Sinatra that control my coffeemaker(s),blinds, etctera.
predator117 has joined #ruby
shime has quit [Ping timeout: 272 seconds]
<lupine>
sounds overkill ^^
<freeone3000>
Doesn't sound like overkill, sounds like you want a webpage instead.
<lupine>
using a raspberry pi to make a blind go up and down is overkill
<wiku5_>
works pretty well at the moment with my android app, just want an interactive console for miscellanious stuff.
<freeone3000>
Web pages are great at making json get/post requests.
zeeraw has quit [Client Quit]
angusigu1ss has quit [Ping timeout: 248 seconds]
m8 has joined #ruby
shime has joined #ruby
_maes_ has quit [Ping timeout: 272 seconds]
mikesplain has quit [Quit: mikesplain]
mhenrixon is now known as mhenrixon|afk
mhenrixon|afk is now known as mhenrixon
motto has quit [Ping timeout: 248 seconds]
subbyyy has joined #ruby
octoberry has joined #ruby
enebo has joined #ruby
freezey has quit [Remote host closed the connection]
timonv_ has joined #ruby
Brolen has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
jlast_ has joined #ruby
kraljev5 has joined #ruby
clamstar has joined #ruby
aniM has joined #ruby
zigomir has joined #ruby
mansi has joined #ruby
<kraljev5>
I have Controller class, from where you can inherit:
<kraljev5>
class User < Controller
<kraljev5>
I want to make #get, #post and #delete class methods that would store the data for later use
<kraljev5>
is there any resource where could I learn that
pu22l3r_ has joined #ruby
Brolen has joined #ruby
Nanuq has quit [Ping timeout: 245 seconds]
babykosh has joined #ruby
<kraljev5>
you should later be able to query the User : What are all the #get methods?
krisbulman is now known as [krisbulman]
<kraljev5>
class User < Controller
<kraljev5>
get :data
<kraljev5>
get :picture
<kraljev5>
end
<kraljev5>
and then get [:data, :picture]
jlast has quit [Ping timeout: 272 seconds]
[krisbulman] is now known as krisbulman
jlast_ has quit [Ping timeout: 272 seconds]
IcyDragon has joined #ruby
IceDragon has quit [Ping timeout: 252 seconds]
dann_ has joined #ruby
jtdowney has quit []
IcyDragon is now known as IceDragon
<dann_>
hey
DrCode has joined #ruby
<dann_>
what's the best way to get a file dialog on ruby
<dann_>
do i use TK, shoes, or some other gem?
jonahR has joined #ruby
<dann_>
I'm looking for something lightweight
DrCode has quit [Remote host closed the connection]
Czupa has quit [Remote host closed the connection]
DouweM has joined #ruby
blaz3rz has quit [Remote host closed the connection]
mhenrixon|afk is now known as mhenrixon
Solnse has quit [Remote host closed the connection]
<shevy>
dann_ I recommend ruby-gnome
<shevy>
but Hanmac is working on rxw
<shevy>
once rxw is ready, you should use it
dawkirst has joined #ruby
<hanmac>
shevy: rwx is not "lightweight" and will never be ;P
<shevy>
dann_ TK looks like shit, shoes4 depends on java (jruby), qtruby is not really maintained, fxruby is kinda dead (lyle abandoned it years ago afaik)
krz has quit [Quit: WeeChat 0.4.2]
mhenrixon is now known as mhenrixon|afk
<kraljev5>
How is Controller.map implemented in Ramaze?
<shevy>
#ramaze will know, manveru is there usually
<shevy>
and he wrote ramaze
LastWhisper has quit [Ping timeout: 245 seconds]
<dann_>
shevy: what exactly is ruby-gnome?
pushpak has joined #ruby
jlast has joined #ruby
<shevy>
dann_ ruby bindings for gtk (and partially gnome, but you can limit yourself to just gtk)
<dann_>
i should mention i have no experience using either
<shevy>
"Tk is a graphical user interface toolkit that takes developing desktop applications to a higher level than conventional approaches."
<shevy>
"Tk is the standard GUI not only for Tcl, but for many other dynamic languages, and can produce rich, native applications that run unchanged across Windows, Mac OS X, Linux and more."
DrCode has joined #ruby
Fyyr13 has quit [Ping timeout: 252 seconds]
<shevy>
dann_, in ruby-gnome a file dialog would be like this:
Lewix has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 264 seconds]
mikepack_ has quit [Ping timeout: 272 seconds]
Advocation has quit [Quit: Advocation]
mordocai` has quit [Ping timeout: 272 seconds]
rickruby has quit [Ping timeout: 252 seconds]
rmorello has joined #ruby
Notte has joined #ruby
f4a244c has quit [Quit: f4a244c]
pu22l3r_ has quit [Remote host closed the connection]
asteros has joined #ruby
tdubya has quit [Ping timeout: 245 seconds]
thealch3m1st has joined #ruby
pu22l3r_ has joined #ruby
<shevy>
:'1'.class
<shevy>
hah
davy_ has joined #ruby
<shevy>
do you guys use this often?
<shevy>
case x
<shevy>
when 'bla' then ble
<shevy>
in other words, do you use then in case/when menus?
<centrx>
Yes
mehlah has quit [Quit: Leaving...]
<centrx>
I use it when it is appropriate to use it, but that is just my opinion
DrCode has quit [Remote host closed the connection]
Lewix has joined #ruby
<shevy>
hmm
<shevy>
I am starting to dislike it
Lewix has quit [Remote host closed the connection]
<centrx>
Quod!?
<dann_>
shevy: often
<shevy>
it seems to visually disturb me when I look at other case/when menues when they lack "then"
<dann_>
and i'm gonna look into gtk right now
<shevy>
*menus
<shevy>
we even had : in the past
poulson has quit [Remote host closed the connection]
<centrx>
oh you meant then
<centrx>
Standard practice is to use then or a new line
<centrx>
"THEN"
tauebel has quit [Quit: Leaving.]
<centrx>
This then is thus the then
jprovazn has quit [Quit: Odcházím]
DrCode has joined #ruby
Xeago has quit [Remote host closed the connection]
ephemerian has joined #ruby
danman has joined #ruby
mansi has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
krisbulman is now known as krisbulman|afk
mansi has joined #ruby
gsvolt_work has quit [Ping timeout: 245 seconds]
kewubenduben has joined #ruby
blaz3rz has joined #ruby
tdubya has joined #ruby
carraroj has joined #ruby
krisbulman|afk is now known as [krisbulman|afk]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
kraljev5 has left #ruby [#ruby]
wildroman2 has quit [Remote host closed the connection]
motto has joined #ruby
DrCode has joined #ruby
mansi has quit [Ping timeout: 272 seconds]
gigetoo has quit [Remote host closed the connection]
<shevy>
centrx hehe
reactormonk has quit [Quit: WeeChat 0.4.1]
olivier__ has joined #ruby
m8 has quit [Ping timeout: 252 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
jerius has quit [Ping timeout: 252 seconds]
gigetoo has joined #ruby
wildroman2 has joined #ruby
SHyx0rmZ has joined #ruby
freezey has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
ec has joined #ruby
DrCode has quit [Remote host closed the connection]
browndawg has quit [Quit: Leaving.]
carraroj has quit [Quit: Konversation terminated!]
dangerousdave has joined #ruby
Txandy has quit [Quit: Leaving...]
shaunbaker has joined #ruby
shaunbaker has quit [Remote host closed the connection]
jerius has joined #ruby
bradhe_ has quit [Remote host closed the connection]
olivier__ has left #ruby [#ruby]
robert_ has quit [Ping timeout: 260 seconds]
bradhe has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
DrCode has joined #ruby
soukihei has joined #ruby
aagdbl0 has joined #ruby
aagdbl has quit [Disconnected by services]
aagdbl0 is now known as aagdbl
bogeyd6 has joined #ruby
wildroman2 has quit [Ping timeout: 260 seconds]
lmickh has quit [Remote host closed the connection]
noop has quit [Ping timeout: 248 seconds]
bradhe has quit [Ping timeout: 264 seconds]
freerobby has quit [Quit: Leaving.]
shedd has quit [Remote host closed the connection]
mansi has joined #ruby
tauebel has joined #ruby
havenwood has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
freezey has joined #ruby
DrCode has quit [Remote host closed the connection]
pu22l3r_ has joined #ruby
x1337807x has joined #ruby
iamdoo2 has joined #ruby
freerobby has joined #ruby
freerobby has quit [Client Quit]
kraljev5 has joined #ruby
e^0 has joined #ruby
x1337807x has quit [Client Quit]
x1337807x has joined #ruby
pietr0 has joined #ruby
x1337807x has quit [Client Quit]
robert_ has joined #ruby
Solnse has joined #ruby
Liothen has joined #ruby
Butcho has joined #ruby
x1337807x has joined #ruby
octoberry has quit [Ping timeout: 240 seconds]
jailbot has quit [Remote host closed the connection]
VTLob has joined #ruby
iamdoo2 has quit [Ping timeout: 272 seconds]
Hobogrammer has quit [Ping timeout: 245 seconds]
squeeb has joined #ruby
<squeeb>
Hi, Do I need to install a new version of ruby-installer every time a new ruby is released?
benzrf has quit [Quit: leaving]
<squeeb>
or is there some kind of magical available-rubies list update thing?
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
sambao21 has joined #ruby
tuttinator has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
tvw has quit []
roolo has joined #ruby
shedd has joined #ruby
linojon has quit [Quit: linojon]
mikepack has joined #ruby
Amart41 has joined #ruby
defrag has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has quit [Remote host closed the connection]
bradhe has joined #ruby
mansi has joined #ruby
decoponio has quit [Quit: Leaving...]
altin has quit [Ping timeout: 272 seconds]
rootshift has joined #ruby
asteros has quit [Quit: asteros]
aagdbl has quit [Quit: Leaving]
mercwithamouth has quit [Read error: Connection reset by peer]
f4a244c has joined #ruby
Amart41 has quit [Ping timeout: 245 seconds]
kevinykc_ has quit [Quit: Computer has gone to sleep.]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
squeeb, I would just use the package manager for your operating system...
tauebel has quit [Quit: Leaving.]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
nanoyak has joined #ruby
aspires has quit []
Hanmac1 has joined #ruby
Hobogrammer has joined #ruby
<shevy>
squeeb good question. I would assume that ruby-installer would need only one file changed to reflect new rubies
chrisramon has joined #ruby
chrisseaton has joined #ruby
hanmac has quit [Ping timeout: 260 seconds]
tjbiddle has joined #ruby
bogeyd6 has quit [Ping timeout: 264 seconds]
squeeb has quit [Quit: leaving]
<sickweezle>
Erm, so, folks know any good pointers on where to read up on how to handle capistrano v3, bundler, rvenv, and the daemons gem combined together into the monstrosity I'm trying to make work? >.<
Shidash has joined #ruby
<freeone3000>
centrx: And for those of us whose operating systems don't have package managers?
davy_ has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
vlad_starkov has quit [Ping timeout: 264 seconds]
<centrx>
freeone3000, I would recommend installing a developer-friendly operating system. Mac OS X, Linux, and more are excellent operating systems.
<shevy>
sickweezle sounds quite complex!
<centrx>
freeone3000, But I assume there is a Ruby installer for Windows somewhere
<sickweezle>
shevy: *sigh* Yeah. :(
<shevy>
freeone3000 in this case, ruby-installer should allow quick updates
<shevy>
rubyinstaller is that win-only thingy isn't it?
<sickweezle>
shevy: Here I was thinking I was following pretty decent practices for environment control. I may need to significantly rethink that ...
<shevy>
sickweezle dunno. sounds pretty insane to me. but I dont use bundler nor rbenv (I guess you meant rbenv? you wrote rvenv). the daemons gem should be trivial though or? gem install daemons
<shevy>
actually I am not sure why you need bundler, you need some mass handling? :D
<sickweezle>
shevy: er, yes, rbenv
kraljev5 has quit [Ping timeout: 252 seconds]
<shevy>
centrx man that is some setup there
<shevy>
even java is in the list
<sickweezle>
centrx: gah!
<sickweezle>
I'm only using a few of those :p
<sickweezle>
shevy: I was under the impression that bundler was good for version handling of gems, but ... meh.
nairys has joined #ruby
<sickweezle>
Sounding a lot like I should just simplify a lot of things for the ec2 instance I'm isntalling to.
senayar_ has joined #ruby
xlogic has quit [Remote host closed the connection]
<shevy>
sickweezle I think bundler came from the rails ecosystem because they were using so many different gem versions, different ruby versions and different rails version
<freeone3000>
shevy: If they're just going to print $0, why would they use english?
kaldrenon has joined #ruby
senayar has quit [Ping timeout: 252 seconds]
<freeone3000>
havenwood: Alright, thanks.
pietr0 has quit [Quit: pietr0]
<shevy>
freeone3000 good question
<shevy>
I have no idea lol
mando has quit [Ping timeout: 248 seconds]
lessless has joined #ruby
i_s has quit []
<lessless>
folks, what do you recommend to read to advance my ruby skills?
dawkirst has quit [Ping timeout: 248 seconds]
Fyyr13 has quit [Ping timeout: 252 seconds]
mando_ has quit [Ping timeout: 252 seconds]
standyro2 has quit [Ping timeout: 260 seconds]
Liothen has quit [Quit: System of a down……]
<havenwood>
lessless: The Ruby Programming Language is a good book. Actually Jesse Storimer, who I just mentioned above for the Threading book, has good books on Processes, TCP Sockets, etc.
Lewix has joined #ruby
kaldrenon has quit [Ping timeout: 272 seconds]
<havenwood>
lessless: There is a beta second edition of The Well Grounded Rubyist that looks nice.
Liothen has joined #ruby
<lessless>
yeah. I tends to the Well Grounded Rubyist too :)
aspires has joined #ruby
asteros has joined #ruby
<lessless>
also there are books like Eloquent Ruby and Refactoring Ruby
olivier_bk has joined #ruby
<havenwood>
Confident Ruby
<havenwood>
i haven't read any of those
gregoriokusowski has quit [Quit: gregoriokusowski]
Virtualize|away has quit [Quit: Leaving...]
<RubyPanther>
is Perl like Ruby, or is Ruby like Perl?
sambao21 has quit [Quit: Computer has gone to sleep.]
Fyyr13 has joined #ruby
<centrx>
RubyPanther, Ruby uses some of the syntactic features of Perl
<havenwood>
PerlPanther: Perl6 is like Ruby and Ruby is like Perl5.
mhenrixon has joined #ruby
<centrx>
RubyPanther, But they are fundamentally different styles
<RubyPanther>
Yeah, havenwood might be on to something
mnemon has left #ruby [#ruby]
mnemon has joined #ruby
<RubyPanther>
but Ruby was inspired by Perl long before Perl 5
jailbot has joined #ruby
<hoelzro>
I'd say that Ruby borrows a lot of Perl's spirit, too
<centrx>
Perl has enough variety you could say any language is like Perl
dwingo has joined #ruby
<waxjar>
brainfuck and perl are very much alike
gr33n7007h has joined #ruby
sambao21 has joined #ruby
<RubyPanther>
Well, I think historically Ruby was intended to have smalltalk style object sematics and Perl/C style syntax, with a pragmatic "least surprise" attitude
Fyyr13 has quit [Ping timeout: 240 seconds]
<sickweezle>
shevy: Something I vaugely recall having read is that bundler is indeed being eaten by gem/ruby.
mikesplain_ has joined #ruby
<sickweezle>
havenwood: good info, but I think it all may be far too much for me to chew on presently, given my newness, still, to the whole environment land.
coffeina has joined #ruby
senayar_ has quit [Remote host closed the connection]
jonahR has joined #ruby
mikesplain has quit [Ping timeout: 252 seconds]
mikesplain_ is now known as mikesplain
<shevy>
sickweezle just use gem itself
<shevy>
:)
<RubyPanther>
I thought bundler came from... what was it called... Merb?
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<sickweezle>
shevy: that's what I am thinking
<shevy>
RubyPanther why is the OOP in perl so shitty
dawkirst has joined #ruby
<RubyPanther>
shevy: Larry Wall said it was because it was an afterthought, and was "bolted through"
senayar has joined #ruby
<shevy>
the whole language design is like "bolted through"!
<sickweezle>
'afterthought' is being very kind, too
<RubyPanther>
He also said if you want to do everything with OOP then Ruby is a better language than Perl. That was the first time I heard of Ruby, in the late 90s. Then he gave a defense of procedural programming.
<RubyPanther>
He in no way defended Perl's OOP as being good, just that it made that style of programming available
kalelsage has joined #ruby
nhhagen has joined #ruby
senayar has quit [Remote host closed the connection]
<havenwood>
release of JVM Rakudo Star should be interesting
blaz3rz has quit [Remote host closed the connection]
blaz3rz has joined #ruby
<havenwood>
threads, promises, channels, oh my!
iamdoo2 has joined #ruby
<havenwood>
was very happy to see that perl11 picked up the potion vm, but kinda sad Rubyists aren't more involved (get involved!): https://github.com/perl11/potion#readme
mikepack has quit [Remote host closed the connection]
<bnagy>
o_0
<havenwood>
A lang by _why with Matz' help, wheeee!
pietr0 has joined #ruby
<hoelzro>
havenwood: I find the MoarVM work more interesting myself
<hoelzro>
but I think both are a good step
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
aspires has quit [Remote host closed the connection]
babykosh has quit [Quit: babykosh]
<havenwood>
hoelzro: i don't know MoarVM, will have to check it out!
lessless has quit [Remote host closed the connection]
aspires has joined #ruby
<hoelzro>
it's a new VM, developed specially for Rakudo
<hoelzro>
drop by #perl6 if you'd like, we're nice =)
<hoelzro>
(people here are nice too ;) )
mansi has quit [Remote host closed the connection]
x1337807x has joined #ruby
gregoriokusowski has joined #ruby
mansi has joined #ruby
iamdoo2 has quit [Ping timeout: 265 seconds]
mikepack has joined #ruby
acrussell has quit [Quit: Leaving.]
standyro2 has quit [Ping timeout: 252 seconds]
<sickweezle>
Welp, off to the Dr. again. Now I get to see an allergist. Wheeee.
zeade has quit [Quit: Leaving.]
banisterone has quit [Read error: Connection reset by peer]
banisterone has joined #ruby
mando has joined #ruby
zeade has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
zeade has quit [Client Quit]
phansch_ has joined #ruby
chrisramon has quit [Quit: chrisramon]
kcombs has quit [Remote host closed the connection]
mansi has joined #ruby
mocfive has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
binaryhat has quit [Quit: Leaving]
mikepack has joined #ruby
mocfive has joined #ruby
chrisseaton has quit []
sambao21 has quit [Quit: Computer has gone to sleep.]
charliesome has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
Xuerian has quit [Remote host closed the connection]
jerius has quit []
kraljev5 has joined #ruby
iliketurtles has joined #ruby
phansch has quit [Ping timeout: 272 seconds]
iliketurtles has quit [Remote host closed the connection]
<benzrf>
SAVE STORAGE SPACE PUT USER CREDENTIALS ON THE CLIENT SIDE AND DO AUTH THERE
<bnagy>
anyway if it's trusted data, as in you produced it yourself and it's as secure as the rest of the code, then use Marshal, then it's clear. If it's user supplied, use safe json or whatever
bradhe has quit [Ping timeout: 265 seconds]
<bnagy>
or, ideally, don't ever unserialise user supplied data
<benzrf>
hmmmm
<bnagy>
we've already had one exploitable heaf o/f in the unserialise code itself. There will be more.
dawkirst has quit [Ping timeout: 272 seconds]
<bnagy>
just that nobody's lookin
Parker0 has joined #ruby
<bnagy>
*heap of
<benzrf>
i am writing a JS-to-ruby rmi widget that acts as Rack middleware and does the JS generation for you
<benzrf>
8D
* benzrf
ducks
Hanmac1 has joined #ruby
<bnagy>
I didn't understand any of the words in that sentence
<benzrf>
rmi = remote method invocation
<benzrf>
javaspeak actually
<benzrf>
basically allow you to access server-side objects from client-side js via websockets
stkowski has quit [Quit: stkowski]
<benzrf>
you call a function from it and it generates js to establish a connection and drop in a var
<bnagy>
oh. I thought they already had stuff for this that wasn't stupid?
<benzrf>
then you can call methods on the var and youll get promises that resolve
<benzrf>
:(
nairys has joined #ruby
<benzrf>
bnagy why do you hurt me so
<benzrf>
im sure all the rails skiddies who love stupid language tricks will loveit
<bnagy>
because that's how idealistic coders encounter people that do security
hanmac has quit [Ping timeout: 272 seconds]
jedimind has joined #ruby
Xeago has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
<benzrf>
i *know* this is normally a terrible idea
jackneill has quit [Ping timeout: 260 seconds]
danshultz has joined #ruby
<shevy>
benzrf bnagy is like the old dragon that guards a cave full with gold
<benzrf>
im trying to make it minimally stupid ill tell you about it in a sec
<benzrf>
brb
<shevy>
bnagy it'll be his first gem!
Guest86406 has quit [Ping timeout: 245 seconds]
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sambao21 has quit [Quit: Computer has gone to sleep.]
ktosiek is now known as filipk
Notte has quit [Remote host closed the connection]
<benzrf>
no 1:
filipk is now known as ktosiek
<bnagy>
<img src=popcorn.gif>
<benzrf>
it will not let you send over objects or invoke on them unless they contain an identifying mixin
<benzrf>
no 2:
<benzrf>
you cannot call methods that have not been explicitly marked as js allowed
<benzrf>
no 3:
<bnagy>
hahaha
<benzrf>
no more than n number of objects per session allowed on the server where you can set n
<shevy>
will your gem have documentation?
<benzrf>
now that is only 50% likely to get hacked instead of 100%
<bnagy>
holy shit you have reinvented activeX!
<benzrf>
B)
yalue has quit [Quit: Leaving]
<bnagy>
kill yourself.
<benzrf>
D:
<bnagy>
nah srsly though, that still sounds pretty bad
<benzrf>
im sure it is
<benzrf>
please tell me how
Squarepy has quit [Quit: Leaving]
<bnagy>
what's your 'identifying mixin' ?
<bnagy>
and also, what's wrong with just using normal websockets?
rylinaux has quit [Remote host closed the connection]
lfox has quit [Ping timeout: 265 seconds]
<v0n>
no ini parser in the standard library?
<bnagy>
aren't they designed for this, so that the server can fill the reqs and stream the responses?
nhhagen has quit [Remote host closed the connection]
<bnagy>
I mean.. I don't usually do any webcrap so my understanding of that domain is pretty limited
<benzrf>
bnagy: they are, but it is a pain to write up all the code for recognizing particular messages
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
<shevy>
atmosx I have to write a suite that will extract (and process and eventually help display) data from different taxonomical sets, including (mostly) http://www.ncbi.nlm.nih.gov/Taxonomy
danman has quit [Quit: danman]
linojon has joined #ruby
<shevy>
and right now I am absolutely clueless how
<benzrf>
shevy: o dangerousdave
<benzrf>
*dang
<benzrf>
haha wow
kenneth has quit [Quit: kenneth]
pu22l3r_ has quit [Ping timeout: 245 seconds]
<shevy>
lol
<benzrf>
i actually wrote some python scripts to work with data from there
<shevy>
your tab completions inspire me
<benzrf>
back last summer
<dangerousdave>
hello
<benzrf>
sup dangerousdave
<benzrf>
just a tab mishap
<shevy>
atmosx problem is they actually want it in perl, so my idea is to first finish with a suite in ruby, then port it somehow to perl
<dangerousdave>
being dangerous
<benzrf>
ick
<shevy>
dangerousdave you can go back to idle mode again now
charliesome has quit [Client Quit]
standyro2 has joined #ruby
<centrx>
rb2pl
<dangerousdave>
zzzz
<shevy>
benzrf the team is like +10 years older than me on average, that is why they learned perl, and they didn't learn another language (well other than C or C++)
pu22l3r__ has quit [Ping timeout: 240 seconds]
sassamo has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
sassamo has quit [Ping timeout: 245 seconds]
<west24352>
centrx, that would be good, will check if it runs :)
Megtastique has quit []
<Hanmac1>
west24352: depends ... are you an PHP spy? do you want an "associative" array? we call it Hash
chrisramon has joined #ruby
<shevy>
centrx lol. epic answer
<shevy>
no, west24352 wrote array
afhammad has quit [Read error: No route to host]
<shevy>
so centrx gave the best answer
kenneth has joined #ruby
<shevy>
Hanmac1, you are out!
<shevy>
go work on rxw!
Megtastique has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
<shevy>
guys
<shevy>
what is the closest thing to a string in ruby?
<centrx>
PHP array: "This one datatype acts as a list, ordered hash, ordered set, sparse list, and occasionally some strange combination of those."
nomenkun has joined #ruby
afhammad has joined #ruby
<atmosx>
shevy: cool
sparrovv has joined #ruby
<shevy>
php is weird
<west24352>
sass says no to my_array = [1, 2, 3] :(
<atmosx>
shevy: cool project, is that from your intern job?
<shevy>
I actually found php dataset more confusing than ruby
<west24352>
if it was js i would be making a 2d array
<shevy>
atmosx yeah, but I have to sign some shitty thing where I need to be careful what I can "take out" from the main building (blabla trade secrets blablablabla)
<shevy>
js has no hash?
<shevy>
west24352 but it is valid ruby!
<atmosx>
shevy: maybe we can sell their secrets somehow
<shevy>
benzrf well actually... name ALL ways in ruby to create a string
Davey has joined #ruby
<benzrf>
shevy: js 'objects' are hashes
<shevy>
(the major ways)
<west24352>
a=[ [1,2,3],[4,5,6] ] and accessing it like a[0][1] and want to do that in sass which is built on ruby afaik
<benzrf>
literals?
<atmosx>
shevy: industrial espionage is interesting. Then we can invest in Greek bonds short-sell them, make some money.
mary5030 has quit [Remote host closed the connection]
<atmosx>
shevy: and go the bahamas
<Hanmac1>
west24352: works for me:
<Hanmac1>
>> a=[ [1,2,3],[4,5,6] ]; a[0][1]
<shevy>
atmosx hehe nah... I just want to work for one month for now, then do something else and consider further options. what annoys me is a clause for "future work" in that document... I haven't signed it yet
chrisramon has quit [Client Quit]
Al__ has joined #ruby
<atmosx>
shevy: I see.
<shevy>
atmosx Greek investment scares me ;-)
<atmosx>
shevy: how much do they pay you?
<shevy>
atmosx btw do you know the "greek motife" in protein structure?
<atmosx>
shevy: sure it should.
<Hanmac1>
hm where is my charlie? :/
<atmosx>
shevy: no
Hanmac1 is now known as Hanmac
saarinen has quit [Quit: saarinen]
<shevy>
atmosx sorry, "greek key" motif
<atmosx>
shevy: but tell that to greek nationalists, it's all their waiting to start singing about racial superiority ll
<west24352>
it must be just sass then, rather than ruby itself, that makes it a problem
V9Energy has joined #ruby
jlast_ has quit [Remote host closed the connection]
<shevy>
and in protein structure, it is 4x beta-sheet (plated sheet?), starting from one point, to the left, to the right and to the left again or something like that... a folding pattern
asmodlol has quit [Remote host closed the connection]
afhammad has quit [Ping timeout: 272 seconds]
fedesilv_ has joined #ruby
<shevy>
atmosx eh normal payment crap, dont know what the standard rate was, very low. but I already know I would not do this job for a longer while, I dont want to specialize in taxonomy or data mining really
jobewan has quit [Quit: Leaving]
agent_white has quit [Quit: leaving]
<shevy>
atmosx nationalists are idiots in every country anyway
shadoi has joined #ruby
IceyEC has quit [Quit: IceyEC]
<atmosx>
shevy: word heh
<shvelo>
who are the mysterious people who download gems the instant they are published?
<atmosx>
shevy: that's a tertiary structure, I don't undetstand which part is the greek key
<shevy>
atmosx do you have to use javascript for the stuff you code?
asteros has quit [Ping timeout: 265 seconds]
asteros_ has joined #ruby
<shevy>
shvelo! my nick brother!
<atmosx>
shvelo: people running mirrors
<shevy>
now we just need shlevy from #nixos !
<shvelo>
hey shevy
<west24352>
Hanmac1, no im not a php spy ;)
<shevy>
shvelo these are bot downloads
<shevy>
shvelo 99% of these instant downloads
<bnagy>
west24352: exactly what a PHP spy would say
SHyx0rmZ has joined #ruby
jlast has joined #ruby
<shevy>
atmosx yeah...
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
postmodern has joined #ruby
camila has quit [Quit: Konversation terminated!]
<shevy>
atmosx not sure how they map it into 3D, but on the right side, it is the typical greek key pattern... goes to the left (to 2), then it goes to the right (to 4), then to (3) I think
<shevy>
aren't you greek, you should know that key! :P
<shvelo>
so 17k downloads ain't shit?
po10 has left #ruby ["/"]
<shevy>
minotaurs too - you should know what minotaurs is
iliketurtles has joined #ruby
<shevy>
shvelo that's quite a lot. dont think these are only bots
<shevy>
3 real users ;P
fedesilva has quit [Ping timeout: 260 seconds]
iliketurtles has quit [Excess Flood]
<shevy>
I once had a guy tell me "hey, nice gems but... WHERE IS THE DOCUMENTATION"
<ClientAlive>
When it comes to ruby applications and instlaling them, does the same gem have to be installed for each application or does one insall apply globally?
sickweezle has quit [Ping timeout: 252 seconds]
<shevy>
west24352 php kinda works. but as a language, it is not of good design at all
<centrx>
PHP is an abomination
Advocation has joined #ruby
<west24352>
but i was just hoping not to have to use SASS lists () and get to use real arrays like any good language has
<iliketurtles>
on a certain computer (mid-2012 macbook air) using Ruby 1.8.7-p374 evaluating (2**159) returns -1, but on the same setup, Ruby 1.8.7-p374 2013 macbook pro (2**159) evaluates to the correct square. why could this be?
<shevy>
I dont even know what is sass
<shevy>
but it clearly is not using normal ruby code
<iliketurtles>
shevy: we tried ruby 1.9.3-p448 and same result
<shevy>
what result
<ClientAlive>
Anyone?
<shevy>
-1?
<bnagy>
iliketurtles: probably a bad compile, or a binary build for the wrong arch
<iliketurtles>
-1
<shevy>
on which machine
zoscoy has joined #ruby
<shevy>
on my machine, I get 73etc
<iliketurtles>
shevy: on the macbook air
<iliketurtles>
yes i also get 73.... on the macbook pro
<shevy>
and the macbook pro shows the right outcome?
<iliketurtles>
shevy: correct
<shevy>
hmmm
<shevy>
weird
<iliketurtles>
bnagy: what do you suggest? remove version and reinstall?
failshell has quit []
<shevy>
iliketurtles what if you try: (2.0 ** 159.0)
<iliketurtles>
we also have this issue on numerous machines --
<bnagy>
well first of all I suggest just binning 1.8.7 forever
<shevy>
bin it!
<bnagy>
it's past eol and not supported
kirun has quit [Quit: Client exiting]
<shevy>
iliketurtles what result do you get with the .0 one?
<shevy>
surely it can't be -1
<iliketurtles>
shevy: 7.3 e+47
<shevy>
tada!
mary5030 has joined #ruby
<bnagy>
then I suggest installing up to date compiler and buiding a decent ruby from source
<iliketurtles>
oh sorry and returns 0 not -1 when using integers
<iliketurtles>
so wtf, what does that mean
jobewan has joined #ruby
<shevy>
iliketurtles perhaps it rounds early
olivier_bk has quit [Ping timeout: 252 seconds]
<bnagy>
maybe it's not automatically switching to bigint?
<bnagy>
who can say
<shevy>
hmm
<bnagy>
ancient software does crazy stuff, use better software
<iliketurtles>
weiiiird
<iliketurtles>
but even 1.9.3-p448 does that
_justin has joined #ruby
<shevy>
but only on the macbook air, not macbook pro
_justin has left #ruby [#ruby]
chrisseaton has quit []
iamsean has joined #ruby
<iliketurtles>
correct shevy
<shevy>
iliketurtles, what if you do: (BigDecimal(2) ** BigDecimal(159)).to_i
<bnagy>
so both versions on that box are faulty?
<MrZYX>
iliketurtles: I suppose you already checked 32 vs 64 bit?
<shevy>
iliketurtles you should not get -1
<bnagy>
I'd start looking at the compile chain imho
<iliketurtles>
MrZYX: no i did not -- just trying to help a colleague here
<MrZYX>
not only processor support but also ruby build type
<apeiros>
iliketurtles: install the bigdecimal gem
<apeiros>
not sure whether 1.9.3 can actually be affected
<apeiros>
but zzak wrote that in case of issues with bigdecimal, one should install the gem
<iliketurtles>
MrZYX: how do I check this?
bradhe has quit [Remote host closed the connection]
<MrZYX>
ruby -v
<freeone3000>
When using IO.popen(["arg", :err => [:child, :out]]), the subprocess seems to keep the server alive beyond when it should be killed. Any soultion to this?
bradhe has joined #ruby
jedimind has quit [Quit: screw you guys, im going home!]
<bnagy>
freeone3000: you might want to also check out open3 in stdlib, it's much more convenient for some stuff
<freeone3000>
shevy: Sorry, using JRuby because I need actual threads. They're only on 2.0.0, and I'm using 1.9.2 for compatability with certain other things.
asmodlol has quit [Remote host closed the connection]
<shevy>
I am on 1.9.3 myself
hobodave has quit [Read error: Operation timed out]
bradhe has quit [Remote host closed the connection]
<Oog>
wkhtmltoimage is dutifully eating up 100% of my cpu
<bnagy>
freeone3000: what option are you trying to set?
motto has quit [Quit: Sto andando via]
<freeone3000>
bnagy: :err => [:child, :out]
asteros has joined #ruby
shadoi has joined #ruby
<Oog>
when i finally kill the wkhtmltoimage process in task manager
<Oog>
ruby then says Timeout::Error: execution expired
fedesilv_ has joined #ruby
<bnagy>
can't you just use popen3?
sailias has quit [Ping timeout: 260 seconds]
fedesilva has quit [Read error: Connection reset by peer]
<RubyPanther>
Oog: I know for example that DNS lookups will foil the timout unless you do require 'resolv-replace' (not sure if this is still true)
<bnagy>
freeone3000: like just get the handle to err and write it to out
sassamo has quit [Remote host closed the connection]
<bnagy>
or capture2e maybe, if I am understanding what you want
<snkcld>
well, im doing a map() then doing a select to weed out all the elemnts which map had returned as null
mocfive has quit [Remote host closed the connection]
<snkcld>
so im just wondering if map can ever return an array of a smaller size than the original
iamdoo2 has quit [Ping timeout: 252 seconds]
<MrZYX>
no
<bnagy>
snkcld: look at compact
sassamo has joined #ruby
<Oog>
RubyPanther: it shouldnt be doing dns its rendering local html
mocfive has joined #ruby
<Oog>
is there a more robust timeout...?
<RubyPanther>
Oog: At the extreme end is forking off a process and doing the timeout in the parent
<snkcld>
heh. bnagy thanks, compact is perfect
<MrZYX>
snkcld: I think that a .map {|i| i if condition }.compact is less flexible and less readable than a .select {|i| condition }.map {|i| i }. nil may be a valid element in the mapped array and for me it just reads backwards otherwise
mansi has quit [Ping timeout: 272 seconds]
tauebel has quit [Ping timeout: 248 seconds]
<Oog>
what about running the bad command in a new thread and having the main thread sleep on it with a timeout
<bnagy>
I'd agree with that ^^
workmad3 has joined #ruby
<Oog>
like Thread.sleep(newthread,2.seconds)
dx7 has quit [Remote host closed the connection]
<bnagy>
Oog: if timeout is not working it's probably cause some C thread has run off with execution and isn't giving it back
<iliketurtles>
so recompiled ruby 1.8.7 on this older macbook, and notice that in IRB 2 ** 159 works, but in tmux 2 ** 159 returns 0 :( tried commenting out the entire tmux.conf but same issue, running tmux 1.8
<bnagy>
MRI is a bit stymied then.
<Oog>
bnagy: that is likely i mean i see wkhtmltoimage process eating 100% of the cpu
dx7 has joined #ruby
Maitiu has joined #ruby
<Oog>
and the kit.to_file function is waiting for that process to exit
<bnagy>
iliketurtles: ok that's probably because your system ruby isn't the same as your user shell ruby now
<benzrf>
you may want to make tabs 2sp somehow
<Oog>
MrZYX: so whats the answer?
<freeone3000>
MrZYX: Because a thread can hold a mutex, and when a thread is killed, that mutex will never be released?
rootshift has joined #ruby
<bnagy>
iliketurtles: so you just need to mess with paths and bash_profile and blah blah until you get the same ruby under tmux / screen as you get from a 'normal' shell
<shevy>
benzrf, ERROR: Could not find a valid gem 'clientside' (>= 0) in any repository
<MrZYX>
freeone3000: not only that, you also can't assure that you interrupt it between two atomic operations etc.
<Oog>
it seems like there isnt a fix...
<benzrf>
heh
<freeone3000>
MrZYX: Okay. What we do in languages with threading support is actually raise a shared volatile semaphore for the thread to kill itself.
<shevy>
iliketurtles now you know that it works!
<benzrf>
i will only push it in the event that it is usable and does not entirely suck (for what it is)
nhhagen has quit [Remote host closed the connection]
<shevy>
benzrf man
<shevy>
benzrf push early, push often
enebo has quit [Quit: enebo]
<bnagy>
freeone3000: ruby has threading support
<MrZYX>
freeone3000: sure, that's the sane solution, tell the thread to kill itself
kraljev5 has quit [Ping timeout: 260 seconds]
aspires has quit []
rubyracer has quit [Quit: Konversation terminated!]
<MrZYX>
freeone3000: that's just not built into most languages
<bnagy>
imho the easiest way in ruby is just to push a 'go die please' to a Queue
kpshek has quit []
<bnagy>
but there are fiddlier and more exotic ways as well
<MrZYX>
bnagy: that's basically was freeone3000 was saying
dx7 has quit [Ping timeout: 252 seconds]
<bnagy>
I know, but he also implied that ruby didn't have threading support :)
<MrZYX>
Oog: so you run an external process? kill that instead of the thread
<Oog>
the imgkit code is doing Open3.popen3(*cmd) {|i, o, e|
<Oog>
im guessing that is what is getting stuck
blaz3rz has joined #ruby
digifiv5e has quit [Quit: quit]
<MrZYX>
try getting that pid and sending it a SIGTERM then
<shevy>
btw benzrf since you once wondered what gem would be cool - a gem that could simulate unix pipelines in pure ruby would be nice
<MrZYX>
after sleeping for n seconds
aryaching has quit [Ping timeout: 252 seconds]
<Oog>
MrZYX: but if the process finishes early I dont want to wait
<Hanmac1>
shevy: did you hear the recent news? AngryBirdsPlayer supports the NSA ;P
AlSquirrel has quit [Quit: This computer has gone to sleep]
<benzrf>
shevy: wanna test the middlware for me
<RubyPanther>
Threads are silly, they add a huge amount of code complexity, for little to no gain
<benzrf>
:u
iamsean has joined #ruby
<benzrf>
shevy: do you know ur websockets
<RubyPanther>
forking and IPC is hard, they say... threads are more complicated, only the hello world is easier
blaz3rz has quit [Ping timeout: 252 seconds]
nfk has quit [Quit: yawn]
<Oog>
heh this code works except wkhtmltoimage continues to run........
<freeone3000>
RubyPanther: They allow me to, say, respond to web requests and not tie up the rails thread, while maintaining a worker in the background.
<shevy>
benzrf I dont know websockets
<RubyPanther>
freeone3000: Right, I do that stuff too, doing that doesn't require threads
Lewix has quit [Remote host closed the connection]
<freeone3000>
RubyPanther: It requires either threads or processes.
<Oog>
ive tried thread.kill terminate etc - the thread seems stuck in sleep mode
phinfonet has quit [Remote host closed the connection]
<RubyPanther>
Right, and Ruby was designed around *nix processes and forking
geggam has quit [Remote host closed the connection]
phinfonet has joined #ruby
<shevy>
it even spawns as a zombie
<freeone3000>
RubyPanther: If that were true, it'd have a shorter startup time.
<shevy>
benzrf a bit, the basics. I cant really do anything close to node.js
<benzrf>
hmmmmm
bradhe has quit [Ping timeout: 272 seconds]
<RubyPanther>
I know, it is like the rails blog in 4 minutes or whatever the blog was. the hello world hides that the code complexity is huge
<benzrf>
you know about anonymous functions in js, like callbacks?
<shevy>
nope, that is advanced stuff
<benzrf>
mka
jrobertfox has quit [Remote host closed the connection]
<benzrf>
y
west24352 has quit [Quit: Leaving]
<benzrf>
anybody here know websockets on the js/browser end and care to test out my half-finished gem?
<RubyPanther>
Threading is guaranteed to be more logically complicated, regardless of how many LoC your part is
brunops has quit [Ping timeout: 245 seconds]
<RubyPanther>
benzrf: I know telnet, that is the same as websockets right?
<benzrf>
heh
<benzrf>
basically i guess o:
<benzrf>
do you know js?
<RubyPanther>
I did last time I wrote some... 5 or 7 years ago
jobewan has quit [Quit: Leaving]
<benzrf>
;p
baroquebobcat has quit [Quit: baroquebobcat]
IceyEC has joined #ruby
<shevy>
hmmm
<shevy>
I begin to notice that RubyPanther speaks about his deeds many years ago
<shevy>
like learning ruby 15 years ago
jlast has quit [Remote host closed the connection]
<shevy>
writing some threading 7 years ago
<benzrf>
clearly he is an old fogey
<shevy>
at this point he may not even use ruby anymore!
bean has joined #ruby
x77686d has joined #ruby
<shevy>
benzrf, don't end up like that
<shevy>
leave ruby early if you can
xcv has joined #ruby
<RubyPanther>
No, I only learned Ruby in 2004. I first found out Ruby was better than Perl for OOP 15 years ago, but there were not yet English manuals
<shevy>
hehe
<shevy>
you could have learned japanese
xcv has quit [Remote host closed the connection]
<RubyPanther>
Like Larry Wall said, Perl is not a hard language. Japanese, that is a hard language.
xcv has joined #ruby
tauebel has joined #ruby
dazeddev has quit [Read error: Operation timed out]
undert has quit [Read error: Operation timed out]
telling has quit [Read error: Operation timed out]
<shevy>
hmm
thesheff17 has joined #ruby
JBreit has quit [Read error: Connection reset by peer]
raar has joined #ruby
iamsean has quit [Ping timeout: 264 seconds]
raar is now known as Guest55511
dazeddev has joined #ruby
telling has joined #ruby
telling has quit [Changing host]
telling has joined #ruby
<Oog>
the problem is capture3 blocks - how can i interrupt it?
iajrz_ has joined #ruby
jerius_ has joined #ruby
dwingo has quit [Ping timeout: 252 seconds]
undert has joined #ruby
dawkirst has quit [Ping timeout: 264 seconds]
carif has joined #ruby
Al__ has quit [Read error: Connection reset by peer]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
Al__ has joined #ruby
Al__ has quit [Client Quit]
baroquebobcat has joined #ruby
mikepack has joined #ruby
mityaz has quit [Quit: See ya!]
supershabam has joined #ruby
mikepack has quit [Remote host closed the connection]
IceyEC has quit [Quit: IceyEC]
mikepack has joined #ruby
x77686d has quit [Quit: x77686d]
mikepack has quit [Read error: Connection reset by peer]
mikepack_ has joined #ruby
benlieb has quit [Quit: benlieb]
jerius has quit [Ping timeout: 252 seconds]
JBreit has joined #ruby
virtualize has quit [Ping timeout: 265 seconds]
danshultz has joined #ruby
digifiv5e has joined #ruby
asteros has quit [Quit: asteros]
digifiv5e is now known as Guest85476
jerius_ has quit [Ping timeout: 240 seconds]
<RubyPanther>
shevy: I don't write threading stuff because I fork and IPC, (still) and I use Ruby for most of my code.
virtualize has joined #ruby
mando has quit [Remote host closed the connection]
bradhe has joined #ruby
mando has joined #ruby
<RubyPanther>
Although I write more and more SQL all the time :/
griffindy has quit [Quit: Computer has gone to sleep.]
<shevy>
a database panther!
<shevy>
SQL the world
<RubyPanther>
shevy: the funny thing is, my database code uses less and less SQL these days thanks to Arel! But GIS programming is mostly in SQL
Guest85476 has quit [Client Quit]
drumusician has quit [Ping timeout: 260 seconds]
<RubyPanther>
I need a GIS ORM
benlieb has joined #ruby
asteros has joined #ruby
rylinaux has quit [Quit: Quit - ZNC]
gizmore has joined #ruby
mansi has joined #ruby
zeade has left #ruby [#ruby]
mando has quit [Ping timeout: 272 seconds]
<Oog>
i need to convert capture3 call to popen3 i think...
meatherly has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
sethen has joined #ruby
pixelgremlins_ba has joined #ruby
yfeldblum has joined #ruby
Amart41 has joined #ruby
meatherly has quit [Ping timeout: 245 seconds]
awarner_ has joined #ruby
w4pm has quit [Ping timeout: 248 seconds]
yfeldblum has quit [Remote host closed the connection]
__LX__ has joined #ruby
robbyoconnor has joined #ruby
clamstar has joined #ruby
yfeldblum has joined #ruby
Raboo has quit [Ping timeout: 245 seconds]
Coolhand has joined #ruby
brunto_ has joined #ruby
benlieb has quit [Quit: benlieb]
jailbot has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<sickweezle>
benzrf: I *think* I'm getting better. Just got back from an appointment with an allergist. They took bunch of blood.
<benzrf>
dang
<benzrf>
sickweezle: do you know JS
<benzrf>
:y
iaj_ has joined #ruby
predator217 has joined #ruby
shvelo has quit [Ping timeout: 272 seconds]
vadviktor_ has joined #ruby
jrd00 has joined #ruby
brunops has joined #ruby
Amart41 has quit [Ping timeout: 240 seconds]
error404_ has joined #ruby
<sickweezle>
benzrf: Only a tiny little sneeze.
Davey_ has joined #ruby
<sickweezle>
Er, a tiny little sneeze of JavaScript that is.
Hanmac has joined #ruby
jcp has joined #ruby
Mohan___ has joined #ruby
m_3_ has joined #ruby
phreax_ has joined #ruby
jcp is now known as Guest92875
AntelopeSalad_ has joined #ruby
saarinen has joined #ruby
tonini_ has joined #ruby
Adawerk has joined #ruby
<benzrf>
hm
pskosinski has joined #ruby
MacGruberGuy has joined #ruby
TigerWolf has quit [Ping timeout: 272 seconds]
sfiggins has quit [Ping timeout: 272 seconds]
brunto has quit [Ping timeout: 272 seconds]
rylinaux has quit [Excess Flood]
niharvey has quit [Read error: Connection reset by peer]
ch0mskiii has quit [Read error: Connection reset by peer]
Kruppe has quit [Ping timeout: 272 seconds]
predator117 has quit [Ping timeout: 272 seconds]
zellio has quit [Ping timeout: 272 seconds]
freeone3000 has quit [Ping timeout: 272 seconds]
m_3 has quit [Ping timeout: 272 seconds]
pdtpatr1ck has quit [Ping timeout: 272 seconds]
pixelgremlins has quit [Ping timeout: 272 seconds]
awarner has quit [Ping timeout: 272 seconds]
jrd0 has quit [Ping timeout: 272 seconds]
error404 has quit [Ping timeout: 272 seconds]
Mohan has quit [Ping timeout: 272 seconds]
grs has quit [Ping timeout: 272 seconds]
iaj has quit [Ping timeout: 272 seconds]
eliasp_ has joined #ruby
tonini has quit [Ping timeout: 272 seconds]
vt102 has quit [Ping timeout: 272 seconds]
phreax has quit [Ping timeout: 272 seconds]
helpa has quit [Ping timeout: 272 seconds]
samuelkadolph has quit [Ping timeout: 272 seconds]
eliasp has quit [Ping timeout: 272 seconds]
xargoon has quit [Ping timeout: 272 seconds]
vadviktor has quit [Ping timeout: 272 seconds]
pdtpatr1ck has joined #ruby
standyro2 has quit [Read error: Connection reset by peer]
MacGruberMan has quit [Read error: Connection reset by peer]
sdwrage has quit [Ping timeout: 272 seconds]
standyro2 has joined #ruby
rylinaux_ has joined #ruby
<shevy>
sickweezle did you put up a fight before they got your blood?
ec has quit [Ping timeout: 272 seconds]
samuelkadolph_ has joined #ruby
<sickweezle>
heh no, no fight
krisbulman|afk is now known as krisbulman
samuelkadolph_ is now known as samuelkadolph
simoz16 has joined #ruby
vt102 has joined #ruby
Davey has quit [Ping timeout: 252 seconds]
ec has joined #ruby
therod has quit [Ping timeout: 264 seconds]
helpa has joined #ruby
VTLob has quit [Ping timeout: 272 seconds]
AntelopeSalad has quit [Ping timeout: 272 seconds]
xargoon has joined #ruby
<sickweezle>
It probably beats the alternative of them stabbing me in the back with a bunch of things I might be allergic to.
jrobertfox has joined #ruby
tauebel has quit [Quit: Leaving.]
grs has joined #ruby
sdwrage has joined #ruby
VTLob has joined #ruby
tauebel has joined #ruby
rootshift has joined #ruby
<benzrf>
sickweezle: do you know anonymous funcs in js?
mikepack_ has quit [Remote host closed the connection]
simoz17 has joined #ruby
<sickweezle>
benzrf: kind of. they are all pretty much anonymous, though.
<benzrf>
m
rylinaux_ is now known as rylinaux
<benzrf>
and you know your json?
mikepack has joined #ruby
simoz15 has quit [Ping timeout: 252 seconds]
<sickweezle>
I know the idea, yeah. Can't say I'm 'good' with it, but it's a fairly obvious thing.
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
danshultz has quit [Remote host closed the connection]
<benzrf>
ok
zellio has joined #ruby
TigerWolf has joined #ruby
simoz16 has quit [Ping timeout: 248 seconds]
danshultz has joined #ruby
sassamo has joined #ruby
aryaching has joined #ruby
<sickweezle>
What's up?
<Oog>
where can i get a list of signal names i can send via Process.kill
<benzrf>
Have JavaScripters gone too far? 80% of people get the question wrong! Click here to take the test -> http://node-os.com/
Aryasam has quit [Quit: Bye]
mavcunha has quit [Quit: Computer has gone to sleep.]
<benzrf>
sickweezle: i wrote half of a half-baked gem and i need testing
<benzrf>
B)
<shevy>
sickweezle benzrf is on his way to his first gem
<sickweezle>
Oog: man signal
<Oog>
MrZYX|off: ive figured out how to use popen 3 so i get the pid and can wait/timeout on it now i need to kill it when it timesout
<sickweezle>
oooh! sweet, benzrf !
mando has joined #ruby
phinfonet has quit [Remote host closed the connection]
t0m0_ has joined #ruby
<benzrf>
sickweezle: can ya git clone benzrf/clientside
<sickweezle>
What the heck ... NodeOS? O.o
nomenkun has quit [Remote host closed the connection]
kitak has joined #ruby
phinfonet has joined #ruby
<benzrf>
sad
<shevy>
wow
<shevy>
where is the counter
<shevy>
RubyOS
octoberry has quit [Ping timeout: 240 seconds]
<benzrf>
shevy: too slow
<sickweezle>
benzrf: Hmm. I don't actually know what rack is, other than something you can put web related thingies with. :/
<benzrf>
it is simple
<benzrf>
rack is an object protocol
danshultz has quit [Ping timeout: 252 seconds]
<krainboltgreene>
Rack is a middleware stack.
<krainboltgreene>
For HTTP requests.
<shevy>
benzrf :(
ZadYree has joined #ruby
iamdoo2 has joined #ruby
<benzrf>
any object can be a rack app if it implements call() such that it takes 1 arg that contains request info and returns [statuscode, header_hash, body_iterable]
<shevy>
why is speed always mentioned
<benzrf>
sickweezle: ^
<krainboltgreene>
Faraday is a middleware stack, for responses.
<Speed>
shevy: I really don't know
DrShoggoth has quit [Quit: Leaving]
<benzrf>
sickweezle: rack middleware means an object like the above that wraps around another app and then modifies requests or does something special before forwarding the request downwards
Adawerk has quit [Quit: Leaving]
<Speed>
:P statistically I get accidentally pinged a few times per day
<sickweezle>
shevy: people don't think, so 'speed' sounds important, even if their code doesn't do enough for speed optimization to matter
<benzrf>
sickweezle: so you can have a big nested series of rack apps that each do something with the request or response
<sickweezle>
huh
<snkcld>
366.49 2.99 1710565 Kernel.Integer
<benzrf>
anything meant to be stuck in the middle is 'middleware'