bthesorceror has quit [Remote host closed the connection]
<jkline>
Firebox_: tell us more about the project you want to create
bthesorceror has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
<Firebox_>
jkline: i want make metasploit script.
<Firebox_>
is it possible?
<jkline>
I have no experience writing metasploit scripts , so I don't know what language is recommended for that.
<Firebox_>
that language is ruby.
<Firebox_>
:)
<jhass>
metasploit is largely written in ruby, so sure. But you better ask #metasploit for support about that
timonv has joined #ruby
sambao21 has joined #ruby
<Firebox_>
oh i see thanks jhass
<jkline>
Ruby gives you access to sockets, and has many available opensource gems for things like running shell commands, connecting to databases, http, etc. So I suspect you can do most of what you want fairly easily
x77686d has joined #ruby
echevemaster has joined #ruby
jkline has quit [Quit: jkline]
<jhass>
we're happy to answer your questions about general ruby problems, but for specific frameworks you should resort to their respective channels
freerobby has quit [Quit: Leaving.]
<Firebox_>
ok i see. but what is gems?
bthesorceror has quit [Ping timeout: 252 seconds]
<jhass>
gems are libraries for ruby, packaged, reusable code
<Firebox_>
oh
<Firebox_>
i see
baweaver has quit [Ping timeout: 264 seconds]
<Firebox_>
java package == ruby gems?
binaryhat has quit [Quit: Leaving]
<jhass>
more like a .jar
amclain__ has joined #ruby
<Firebox_>
java’s jar file == ruby gems?
<Firebox_>
right?
<jhass>
the closest thing if you need to compare
caleb_io has joined #ruby
<Firebox_>
i see thanks jhass
<benzrf>
Firebox_: not quite
<benzrf>
a gem is more like a package
<Firebox_>
oh
<Firebox_>
:(
<benzrf>
in fact it /is/ a package
<Firebox_>
who is right?
timonv has quit [Ping timeout: 252 seconds]
<benzrf>
jhass isn't wrong
<Firebox_>
jar is package also.
<benzrf>
well
<jhass>
I understood package in java as the namespacing tool
<benzrf>
a jar can be a standalone library
<benzrf>
or an executable
<Firebox_>
jar is collect of package.
echevemaster has quit [Ping timeout: 240 seconds]
<benzrf>
a gem is just a package
<Firebox_>
ok isee
<benzrf>
*a package as in something like a .deb
<Firebox_>
ok i see
<benzrf>
not as in a java package
<benzrf>
a java package is closer to a module in ruby
amclain has quit [Ping timeout: 264 seconds]
mary_synthesizin has joined #ruby
<Firebox_>
module and gems?
<Firebox_>
python package == ruby gems
Zesty has joined #ruby
<Firebox_>
who use vmware player?
yfeldblu_ has joined #ruby
ddv has quit [Ping timeout: 245 seconds]
<benzrf>
Firebox_: thats correct
danijoo has quit [Read error: Connection reset by peer]
<Firebox_>
ok i see thanks benzrf
danijoo has joined #ruby
<benzrf>
the 'gem' command is like 'pip'
<benzrf>
well
<benzrf>
more like 'gem install' == 'pip install'
<benzrf>
gem does more things than pip does
<benzrf>
a module in ruby is both a namespace (like in java) and a mixin
<benzrf>
a mixin being like part of a class that you can add to your classes
<benzrf>
'mix into' your classes
bradhe has joined #ruby
mary_synthesizin has quit [Remote host closed the connection]
<Firebox_>
oh thanks
<Firebox_>
i use brew.
<Firebox_>
pip is old thing
<benzrf>
uh
jamto11 has joined #ruby
<benzrf>
dont think youre supposed to use brew to install py packages
<benzrf>
thats what pip's for
SonicX has quit [Ping timeout: 276 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
<Firebox_>
ok i see thanks
johncjensen has joined #ruby
<Firebox_>
i will stay here till making script of metasploit.
<jacky>
Firebox_: pip is what gem is in the Python community
<jacky>
in a loosely comparison
<Firebox_>
ok jacky
bthesorceror has joined #ruby
Shidash has quit [Ping timeout: 252 seconds]
Megtastique has joined #ruby
ddv has joined #ruby
jamto11 has quit [Ping timeout: 265 seconds]
skysploit has joined #ruby
imkmf has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
bricker`LA has quit [Ping timeout: 265 seconds]
stantona has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
skysploit has quit [Quit: This computer has gone to sleep]
tyll_ has quit [Read error: Operation timed out]
brian___ has joined #ruby
stantona has quit [Remote host closed the connection]
Hanmac has joined #ruby
bradhe_ has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
touzine has quit [Ping timeout: 240 seconds]
<shevy>
Firebox_ you used python before?
tyll has joined #ruby
havenwood has quit [Remote host closed the connection]
GrooveStomp has quit [Ping timeout: 265 seconds]
<Firebox_>
i can do python, c, c++, php, jquery, objective-c, ios, javascript, perl, android, java, ajax, sql.
andy___ has quit [Remote host closed the connection]
havenwood has joined #ruby
<Firebox_>
but i dont study c# and ruby.
<Firebox_>
but i will study ruby.
<Firebox_>
now.
<Firebox_>
i down know starting c#.
<Firebox_>
i will not study c# perhaps.
lemur_ has joined #ruby
<Firebox_>
but i need ruby.
<Firebox_>
now
<Firebox_>
how about sh?
dcunit3d has quit [Ping timeout: 255 seconds]
<Firebox_>
how about shevy ?
<shevy>
Firebox_ I went from perl to php to ruby
<shevy>
ruby is 85% perfect
<shevy>
perl and php not even 50%
stantona has joined #ruby
<Firebox_>
perl->php->ruby?
HashNuke has joined #ruby
<shevy>
ya
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Firebox_>
you can do java?
<shevy>
nope
<shevy>
I hate its verbosity
<shevy>
I have no patience for boilerplate code, it wastes time of my life so I skip it instantly
<Firebox_>
you must study java. you can do many thing with java like android.
CorySimmons has joined #ruby
<centrx>
Java causes brain damage
<Firebox_>
but java is used many thing.
havenwood has quit [Ping timeout: 255 seconds]
<centrx>
So is toilet paper
<Firebox_>
but java is used in many thing.
<Firebox_>
java and objective-c is required.
<Firebox_>
to programmer
SilverKey has joined #ruby
brucelee_ has joined #ruby
<shevy>
Firebox_ I couldn't care less about android
nisstyre has joined #ruby
MattStratton has joined #ruby
<Firebox_>
android is good
<ponga>
so is firefox
<Firebox_>
my app is downloaded 1000 people
maximski has quit []
<Firebox_>
my app is downloaded by 1000 people
<shevy>
well and honestly
<shevy>
if it is 100 million
<centrx>
Ruby is like Objective-C with cleaner syntax, some Perl niceties, and more
sparrovv has quit [Remote host closed the connection]
freerobby has joined #ruby
<Firebox_>
i earned $1000, so i will buy mac book air retina this summer
<shevy>
Firebox_ the world is huge, so huge that people can well live without mac, cell phones, android or other fancy gadgets
<Firebox_>
by android
YOUcanPMme has quit [Ping timeout: 240 seconds]
<Firebox_>
then why do you programming?
<Firebox_>
shevy:
<Firebox_>
there is many thing instead of programming.
crucify_me has quit [Remote host closed the connection]
Cache_Money has quit [Ping timeout: 251 seconds]
ponga has quit [Quit: Leaving :)]
helpD has joined #ruby
einarj has joined #ruby
Cache_Money has joined #ruby
stantona has quit [Remote host closed the connection]
<shevy>
Firebox_ I program so that I can automate everything useful and automatable to the computer
bradhe_ has quit [Remote host closed the connection]
GrooveStomp has joined #ruby
<Firebox_>
shevy: what thing? give me list of automation.
<shevy>
it's like a free worker that does useful things, with a little initial time investment
bradhe has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
<shevy>
Firebox_ well here is a Potpourri of what kind of things I do https://rubygems.org/profiles/58718 - a lot of other scripts are not useful enough to upload though
imperator has joined #ruby
crzrcn has joined #ruby
<Firebox_>
thanks
<Firebox_>
i will see it after mastering ruby.
dcunit3d has joined #ruby
<shevy>
Firebox_ right now I work on a postgresql database to the NCBI taxonomy dataset, with a ruby interface to it; it's damn boring but related to work
senayar_ has quit [Remote host closed the connection]
<benzrf>
shevy that is too many gems stop pls
<Firebox_>
i think you are skilled ruby programmer.
<shevy>
benzrf you don't use them anyway
senayar has joined #ruby
<Firebox_>
shevy: you can do something?
<Firebox_>
i must do it.
<Firebox_>
you can help me?
<shevy>
Firebox_ depends on what it is, information sure
einarj has quit [Ping timeout: 276 seconds]
<Firebox_>
i want to web database hacking.
<Firebox_>
it is my purpose.
<Firebox_>
too
<Firebox_>
i must collect information for some reason.
WishBoy has quit [Read error: Connection reset by peer]
WishBoy has joined #ruby
jhass is now known as jhass|off
<Firebox_>
you can help me?
<Firebox_>
shevy:
mansi has quit [Remote host closed the connection]
<shevy>
I don't quite understand the question?
<Firebox_>
oh
<shevy>
you can try at #rubyonrails - they do work with databases much moreso than most people on #ruby on a daily basis
senayar has quit [Ping timeout: 240 seconds]
stantona has joined #ruby
<Firebox_>
if you must register some web page, then your name and address is required. and that information is saved in the web database.
<Firebox_>
and i want hack web databasc for that information.
<shevy>
aha
<Firebox_>
ok you understand it.
imperator has left #ruby ["Leaving"]
<shevy>
dunno
Hanmac has quit [Ping timeout: 276 seconds]
<Firebox_>
oh
<shevy>
I understand that you want to do something that I have no real understanding of so it is unlikely that I can be of assistance really
SilkFox has quit [Ping timeout: 240 seconds]
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
brucelee_ has quit [Ping timeout: 252 seconds]
<Firebox_>
ok then you can web database hacking?
<Firebox_>
you can do web database hacking?
<shevy>
nope, why should I be able to? all I do is fill crap into my databases
<Firebox_>
i think you are very skilled ruby programmer. so you can do it easily.
<Firebox_>
right?
<shevy>
does this make sense for you?
<shevy>
someone who is very good with a rifle is very good with a small revolver?
<shevy>
someone who can jump 215 cm high is very good at jumping 910 cm length?
cgcardona_ has quit [Quit: cgcardona_]
<Firebox_>
i dont know that.
<Firebox_>
ok i see you cant it.
<shevy>
start smaller with ruby
stantona has quit [Remote host closed the connection]
<Firebox_>
ok
<shevy>
then you can still head-dive into metasploit
<Firebox_>
you use vmware?
<shevy>
nah
<Firebox_>
yes
<shevy>
I use the most basic thing - linux and ruby
<Firebox_>
i m studying metasploit.
<Firebox_>
oh
<Firebox_>
linux and ruby. you can do everything with 2 thing?
<Firebox_>
shevy: i think that all programmer’s last goal is hacking.
<shevy>
I can do all I need to do for now
<shevy>
that sounds rather sad
<Firebox_>
but it is real
thomasxie has joined #ruby
SonicX has joined #ruby
<Firebox_>
first all beginner start c,
jack_rabbit has quit [Ping timeout: 264 seconds]
<Firebox_>
and c++ and python and etc
havenwood has joined #ruby
<shevy>
why would you want to use twenty different languages?
<shevy>
it just shows that you are unable to find a language that is worthy to use it
<Firebox_>
but last all programmer want more something.
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
<Firebox_>
no i learn many thing for studying language.
sdwrage has joined #ruby
Martxel has quit [Ping timeout: 252 seconds]
<Firebox_>
only one language can do one language well.
Megtastique has quit []
<Firebox_>
but i want experience many thing.
<shevy>
which language is that?
michaeldeol has joined #ruby
<Firebox_>
?
<Firebox_>
which language is that?
<Firebox_>
what mean?
Solnse has quit [Quit: Leaving.]
mansi has joined #ruby
The_NetZ has joined #ruby
lazyguru has quit [Ping timeout: 252 seconds]
<The_NetZ>
so. anyone can tell me how straight ruby vs an executable with embedded ruby compares?
abdulsattar has joined #ruby
mikepack has quit [Ping timeout: 264 seconds]
<arubin>
In what regard?
<shevy>
Firebox_ I don't think there exists a perfect language; a merge of C and Ruby would be perhaps 95% perfect
<arubin>
shevy: So Rust?
<arubin>
With more OO.
<shevy>
Rust seems like C reloaded
<Firebox_>
ok shevy but you can make android programming with c and ruby?
<shevy>
Firebox_ I have no idea, why do you keep on asking me about android, I don't use android, I don't even have a cellphone ;-)
Megtastique has joined #ruby
<arubin>
shevy: I realized immediately after I wrote it that Rust does not fit the criteria because of its lack of OO.
freerobby has quit [Quit: Leaving.]
<shevy>
well the rust syntax seems extremely C inspired
<The_NetZ>
ruby++ :P
<shevy>
fn main() {
<shevy>
for x in y.chars() {
<Firebox_>
shevy: you use virtual machine?
<The_NetZ>
just about anything above asm is pretty c inspired.
<shevy>
println!("yo there man yippie!",
<shevy>
Firebox_ no I dont use virtual machine, I don't use anything you use :P
<shevy>
The_NetZ yeah
<The_NetZ>
liar :P
<shevy>
and every second year a new language comes out
<shevy>
that is a "better" C
<shevy>
looks 95% the same
<shevy>
does 95% the same
<The_NetZ>
shevy: yep; hey! lets make ruby in c++ XD
<shevy>
naaaaah
havenwood has quit [Read error: Connection reset by peer]
<xargoon>
most 3GL and 4GL's are very similar
<shevy>
C++ should have never happened
havenwood has joined #ruby
<The_NetZ>
lol
<The_NetZ>
considering that a class is just a private struct
* The_NetZ
is considering just using c...
thomasxie has quit [Ping timeout: 264 seconds]
obscured has joined #ruby
lazyguru has joined #ruby
<shevy>
The_NetZ what I liked in C++ was the <<
<shevy>
C should have adopted that
dcunit3d has quit [Ping timeout: 264 seconds]
<shevy>
cout << var
<shevy>
man, that is so much nicer than printfuck();
<The_NetZ>
yeah, that is pretty nice; std::cout and all that nifty stuff
dseitz has joined #ruby
<shevy>
minus the ::
<shevy>
hehe
radic has quit [Ping timeout: 252 seconds]
eka has joined #ruby
mikepack has joined #ruby
<xargoon>
and templates, inheritance, virtual methods
<xargoon>
less boilerplate than when doing the same in C
<The_NetZ>
I don't much care for using namespace std, lol
radic has joined #ruby
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
johncjensen has quit [Remote host closed the connection]
brucelee_ has joined #ruby
<shevy>
!!!
crzrcn has quit [Quit: Leaving.]
Celm has quit [Remote host closed the connection]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
Hanmac has joined #ruby
crzrcn has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
<The_NetZ>
?
<shevy>
!!!!!
<shevy>
I use the ! to confirm that I am just without words
<The_NetZ>
shevy: I think you misunderstand me.
mercwithamouth has joined #ruby
<shevy>
you hate namespace std!
bthesorceror has quit [Remote host closed the connection]
<The_NetZ>
the std:: namespace is wonderful, and pretty much ubiquitous. I just mean, I don't like doing that stupid cheat code "using namespace std;" in my code.
bthesorceror has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
mary_synthesizin has joined #ruby
<shevy>
aha
x77686d has quit [Quit: x77686d]
<shevy>
I always did it!
<shevy>
so I could use the beautiful cout << "yippie!" << endl;
<The_NetZ>
I understand std::cout much better than just cout :P
FDj has quit [Read error: Connection reset by peer]
FDj has joined #ruby
<The_NetZ>
I know how to do it, I'm just asking about good practice
stantona has quit [Remote host closed the connection]
jack_rabbit has joined #ruby
michaeldeol has joined #ruby
<shevy>
ho no
<shevy>
I mean
<shevy>
oh no
<shevy>
he is asking Hanmac for good practice
<shevy>
:-)
<shevy>
Hanmac's C++ code exists out of only macros
helpD_ has joined #ruby
* Hanmac
makes a evil laugh
<shevy>
it's brainfuck in C++
<The_NetZ>
Hanmac: ok Kefka
bradhe has quit [Ping timeout: 252 seconds]
braincrash has joined #ruby
stantona has joined #ruby
<The_NetZ>
shevy: and no, I'm not asking Hanmac, I'm asking the channel :P
helpD has quit [Ping timeout: 276 seconds]
centrx has quit [Quit: All this computer hacking is making me thirsty]
andy___ has quit [Ping timeout: 265 seconds]
<The_NetZ>
Hanmac: hey, you may know the answer to this question; would you consider there to be any performance difference, whether good or bad, between using ruby at /usr/bin/ruby or having rolled your own static-compiled executable with embedded ruby?
brunops has joined #ruby
<Hanmac>
sorry didnt used embedded ruby before
<The_NetZ>
dammit
Deele has joined #ruby
<shevy>
hehe
<shevy>
you are the first guy to try at embedded ruby
<shevy>
and the last!
<The_NetZ>
shevy: no; I've done it.
<The_NetZ>
I wrote one nasty big executable containing the ruby interpreter, some custom rolled extensions, and static linked libruby-static.a into that
<The_NetZ>
it was disgusting
stantona has quit [Remote host closed the connection]
<The_NetZ>
now I gotta rewrite alot of it, porting from sdl to glfw+openal and making a real gem :P
timonv has joined #ruby
<The_NetZ>
not sure how I feel about swig....
imkmf has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
The_NetZ has quit [Quit: leaving]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_m_g_ has joined #ruby
nilsove has quit [Ping timeout: 246 seconds]
andy___ has joined #ruby
nilsove has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
SlvrDragn has quit [Ping timeout: 276 seconds]
_m_g_ is now known as SlvrDragn
mordof has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
jcs222 has joined #ruby
mansi has joined #ruby
dapz has joined #ruby
dapz has quit [Client Quit]
dapz has joined #ruby
rokob has quit [Remote host closed the connection]
kaspergr_ has joined #ruby
brunops has quit [Quit: leaving]
crucify_me has joined #ruby
rokob has joined #ruby
sdouglas has joined #ruby
Deele has quit [Ping timeout: 255 seconds]
caleb_io has quit [Quit: caleb_io]
benzrf is now known as benzrf|offline
Megtastique has quit []
zachallett has joined #ruby
kaspergrubbe has quit [Ping timeout: 264 seconds]
troyronda has quit [Remote host closed the connection]
troyronda has joined #ruby
angelazou has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<angelazou>
newbie question, if there is this line 'include AbstractPhpVersion::Php54Defs', what is the file name that I should look for?
sambao21 has quit [Quit: Computer has gone to sleep.]
Es0teric has quit [Quit: Computer has gone to sleep.]
caleb_io has joined #ruby
benzrf|offline is now known as benzrf
ascarter has joined #ruby
jamto11 has joined #ruby
Hanmac1 has joined #ruby
troyronda has quit [Ping timeout: 252 seconds]
zachallett has quit [Remote host closed the connection]
<shevy>
angelazou there is no binding convention
<shevy>
angelazou if you use linux, try: grep -r Abstract *
SilverKey has quit [Quit: Halted.]
Hanmac has quit [Ping timeout: 255 seconds]
<shevy>
angelazou if they were to follow a convetion, there would be a directory called: abstract_php_version/ and inside it a file called php_54_defs.rb
meatherly has quit [Remote host closed the connection]
bamyojo14335 has joined #ruby
meatherly has joined #ruby
pu22l3r has joined #ruby
Nexus_x1___ has joined #ruby
jamto11 has quit [Ping timeout: 252 seconds]
Nexus_x1__ has quit [Read error: Connection reset by peer]
Nexus_x1____ has joined #ruby
caleb_io has quit [Quit: caleb_io]
bradhe has quit [Remote host closed the connection]
<mordof>
just got to the tutorial point on strings. my first thought: "well.. strings are probably about the same as any other language *starts to skim through it*"... then i got to the list of what methods are available for strings and holy crap o.o
<mordof>
strings are gorgeous beasts in ruby
sparrovv has joined #ruby
senayar_ has joined #ruby
lemur_ has quit [Ping timeout: 264 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
sparrovv has quit [Ping timeout: 264 seconds]
popl has quit [Client Quit]
jamto11 has quit [Remote host closed the connection]
popl has joined #ruby
popl has quit [Client Quit]
<lxsameer>
My Gemfile.lock and Gemfile conatin "sprockets 2.2.0" . But my application keep using sprockets 2.12.0
<jle`>
it's nice to know that people are still learning ruby in 2014
<lxsameer>
how can i debug this
<havenwood>
lxsameer: are you using `bundle exec`?
<lxsameer>
havenwood: yeah
<mordof>
jle`: just got a position that ruby is the main language in use - it's a somewhat recent startup.
yfeldblum has joined #ruby
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
<mordof>
jle`: and there's a possibility that the school i just finished from will start teaching ruby as part of its' curriculum in the future
<havenwood>
jle`: more than ever
senayar has joined #ruby
mcrmfc has quit [Quit: mcrmfc]
<Hanmac>
mordof: at your school ruby or rails?
senayar_ has quit [Ping timeout: 255 seconds]
<mordof>
Hanmac: well - i suppose the possibility of rails is a bit higher, but it's not something that's been decided on yet
<jle`>
i didn't know schools taught web frameworks :|
<Hanmac>
jle`: i was wondering if they teach ruby or rails only
<mordof>
jle`: yeah - some of our classes used jquery to speed things up. it sucks in my opinion, but there's not enough time to teach everyone the raw way to do things
abdulsattar has joined #ruby
<mordof>
Hanmac: we currently got taught a number of different things. Unfortunately PHP was the predominant server side language - but js, jquery, php, as well as some frameworks in php were used in different classes. so if rails gets introduced, there'll probably be a class for ruby also (there should be anyway)
Aaaal has quit [Quit: Aaaal]
yfeldblum has quit [Ping timeout: 252 seconds]
<Hanmac>
hm interesting ...
n0n3 has quit [Remote host closed the connection]
<mordof>
we were the guinea pigs... lol. the course was brand new when i entered it
sdouglas has joined #ruby
mcrmfc has joined #ruby
<Hanmac>
for myself i already used ruby for tones of shit from Window-GUIs over game logic, into 2d & 3d rendering but i didnt used ruby for webstuff yet
* mordof
nods
<mordof>
my job is a mix of web and other logic tools for Ruby/Rails
<mordof>
and the course being entirely web related would probably have a stronger aspect of rails
<mordof>
Hanmac: how did you find the 2d / 3d rendering stuff in ruby?
mcrmfc has quit [Client Quit]
<mordof>
been debating doing some 2D simple games with it.
Es0teric has joined #ruby
<Hanmac>
mordof i wrote the stuff myself ... i have a binding for sfml (its a bit better than gosu) and i have one for ogre3d (didnt worked with it recently)
robbyoconnor has quit [Ping timeout: 276 seconds]
bricker`LA has joined #ruby
mcrmfc has joined #ruby
abdulsattar has quit [Ping timeout: 255 seconds]
jheg has joined #ruby
kyb3r_ has quit [Ping timeout: 252 seconds]
kyb3r_ has joined #ruby
<mordof>
Hanmac: by that do you mean that the current libraries (or gems? whatever they're called) for working with 2d/3d aren't what you'd like them to be - so you wrote your own?
<Hanmac>
yeah ... there was one for ogre but it was outdated and did not working, and there was gosu, but that used swig and i HATE swig ... yeah and i did write my own
<mordof>
ohh ok
<Hanmac>
mordof: did you know about wxRuby? i also wrote a clone of that, that works with newer wx and newer ruby all mysef
<mordof>
Hanmac: no - i'm brand new to Ruby. don't know much at all about what's available
<Hanmac>
mordof wxRuby (or my clone rwx) uses wxWidgets ... its a platfrom independent Window-GUI toolkit
Gooder` has joined #ruby
<mordof>
oh that's handy - i was wondering what sort of compatibility Ruby had for Windows GUI
mcrmfc has quit [Quit: mcrmfc]
<mordof>
how stable/complete is it?
cmoneylulz has joined #ruby
pwh has quit []
charliesome has joined #ruby
abdulsattar has joined #ruby
Rahul_Roy has joined #ruby
<Hanmac>
https://github.com/Hanmac/rwx/ ... most stuff is still missing, but the basics (like Buttons & CheckBoxes) are already implmented, some sample parts too, and its also a bit documented ... but for that i write it all my own its not bad
brucelee_ has left #ruby [#ruby]
<mordof>
ooh ok
Gooder has quit [Ping timeout: 255 seconds]
cmoneylulz has quit [Remote host closed the connection]
<mordof>
question about Time.. can I set my own time in a Time object?
<mordof>
this tutorial seems to state stuff that *might* follow that purpose, but it's not all that clear
<certainty>
imho the only valuable information in the most recent DHH article on testing is the linked pdf. The author has some valid points. Not all conclusions appear sound to me though
razrunelord has quit [Ping timeout: 240 seconds]
rdark has joined #ruby
zigomir has quit [Remote host closed the connection]
arietis has quit [Quit: Computer has gone to sleep.]
zigomir has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
yfeldblum has joined #ruby
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
Speed has joined #ruby
<Firebox>
do |f| <————— what is it?
franzip has joined #ruby
<Firebox>
i dont see it before.
coder_neo has quit [Quit: Leaving]
zigomir has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
<Xeago>
Firebox: it is a block with 1 argument
rm_ has quit [Remote host closed the connection]
<Firebox>
argument?
<Xeago>
>> [1,2,3].each do |i| puts i; end
<kilk_>
i am reading article , and ruby is slower about 25 times than 'c', what do you think , is it true?
<apeiros>
`def print(arg)` # <-- this is the equivalent to `do |arg|`
<apeiros>
print "foo" # <-- this is the equivalent to `yield "foo"` with blocks
<apeiros>
a block is like a method without a name.
<Xeago>
when you pass a block, it is like also providing an inline method to it
mikecmpbll has joined #ruby
Rahul_Roy has joined #ruby
bamyojo14335 has joined #ruby
<Firebox>
i am likly to understand it thanks
<shevy>
hehehe
fgo has quit [Remote host closed the connection]
<shevy>
you just love the | too much
<Firebox>
i don’t see it before.
bradhe has joined #ruby
hl has joined #ruby
matti has quit [Changing host]
matti has joined #ruby
sparrovv has quit [Remote host closed the connection]
Squarepy has quit [Ping timeout: 264 seconds]
SegFaultAX has quit [Excess Flood]
SegFaultAX has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
diegoviola has quit [Remote host closed the connection]
<Hanmac>
kilk_: depends on the bottleneck ... i tested 3d rendering in C++ and in Ruby ... both got similar fps
abdulsattar has joined #ruby
alem0lars has quit [Quit: Going AFK...]
aspiers has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kilk_>
i tried run bin/crystal --help and got error while loading shared libraries: libpcre.so.3: cannot open shared object file: No such file or directory
<shevy>
yeah for objects in 4 colours
<shevy>
and 8 bytes
<kilk_>
coluf u help fix this prbl
<shevy>
kilk_ that means you most likely don't have a libpcre.so.3 file
<shevy>
I have libpcre.so.1.2.3 and libpcre.so.0.0.1
<shevy>
the pcre source archive is at ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
<shevy>
those who use the source can happily download pcre and compile it
<shevy>
those who use a distribution are at the mercy of their providers, so one ought to find the package that includes that versioned .so file
<shevy>
I can not join ##python with a nickname called python :(
einarj has quit [Ping timeout: 265 seconds]
<jhass>
p1th0n
<jhass>
try that
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
troyronda has joined #ruby
roadie has joined #ruby
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anaeem1_ has joined #ruby
<Hanmac>
shevy so ##python is written parselmouth? ;P
troyronda has quit [Remote host closed the connection]
<DouweM>
*parseltongue ;)
<jhass>
hm, so we are gnomes hoarding gems in our caves?
<shevy>
*parselpants
<shevy>
I hoard gems
troyronda has joined #ruby
<shevy>
all your gems are belong to me
carraroj has joined #ruby
[0x1a] has quit [Quit: Connection closed for inactivity]
<Nowaker>
shevy: remember a conversation about shoes the framework? after having it thought over, i wouldnt go fo that. i'd create a standalone nodejs app with the whole webkit embedded, and serve an angularjs webapp.
CorpusCallosum has quit [Quit: Computer has gone to sleep.]
<shevy>
yeah I remember
anaeem1_ has quit [Ping timeout: 264 seconds]
<Nowaker>
my friend did so and its really promising.
<shevy>
you liked the java bits it had
<shevy>
javascript is killing ruby :(
<kilk_>
jhass, output from command ./crystal test.cr
<Nowaker>
yeah, just because java is almost everywhere. but since i can produce a binary with the whole nodejs and webkit embedded, then i need no external component at all.
<jhass>
kilk_: and the only output?
<jhass>
kilk_: always go through bin/crystal
<jhass>
kilk_: bin/crystal test.cr --run
<kilk_>
unpack into ./bi/ folder?
<kilk_>
bin
Hanmac1 has joined #ruby
mansi has joined #ruby
<jhass>
no
<jhass>
unpack to deps/
<kilk_>
where find deps?
elaptics`away is now known as elaptics
<kilk_>
i dont have exp with llvm
<jhass>
bin/crystal --setup should have created it
<jhass>
and downloaded that ubuntu crystal binary to it
<jhass>
which you want to overwrite with mine
bradhe has joined #ruby
jonno11 has joined #ruby
Hanmac has quit [Ping timeout: 255 seconds]
<shevy>
Nowaker so there javascript kills java as well :)
sepp2k has joined #ruby
sparrovv has joined #ruby
<Nowaker>
shevy: certainly. but also ruby kills java, i have been a java/jvm programmer for 5 years.
mansi has quit [Ping timeout: 264 seconds]
<shevy>
well
<shevy>
I see javascript as a big competitor to ruby
AlexRussia has quit [Remote host closed the connection]
<shevy>
java less so because most often people use it because it will be faster or more reliable for really large projects
<shevy>
when html5 came out, there was a big negative impact it had on all ruby GUI toolkit bindings
<shevy>
fxruby died
bradhe has quit [Ping timeout: 252 seconds]
AlexRussia has joined #ruby
<shevy>
the sole qtruby maintainer vanished
<shevy>
ruby-gnome found it difficult to transition into gtk3 (which also happened during that phase)
Guest86355 is now known as juni0r
abdulsattar has quit [Ping timeout: 264 seconds]
<Nowaker>
i like ruby more than nodejs in general, but there are some types of projects where im gonna use nodejs.
<shevy>
:(
<pskosinski>
Ruby + GUI = hell :(
* pskosinski
is too silly to do something more than complaining in that matter
<Xeago>
whats the problem with deploying apps that listen on localhost?
hermanmunster has joined #ruby
mansi has joined #ruby
<Hanmac1>
shevy: yeahyeah i am still working on rwx ... i did recently fixed some stuff for older ruby versions nearly at 4o'Clock in the morning ;P
<Nowaker>
a config friendly proxy server, with simple some http server features
meatherly has joined #ruby
<shevy>
Hanmac1 \o/ you are the last hope of ruby
<shevy>
ruby-gnome has only one main japanese developer (though a few helper guys)
cina has quit [Remote host closed the connection]
<Hanmac1>
shevy: thats sounds much worse as it should be right? ;P
<shevy>
Hanmac1 well
Hanmac1 is now known as Hanmac
<shevy>
Hanmac1 without you there would not be a rwx right now
<Nowaker>
i coded autodetection of certificates. why the hell specify what vhost serves what cert with what private key and what cert bundle if it can be totally automated?
<shevy>
people need to start using rwx
<Nowaker>
and those vhosts definition in apache or nginx... grrrr
SegFaultAX has quit [Excess Flood]
<Nowaker>
life is so easier with http-master once i started using it in production for my business (www.atlashost.eu)
SegFaultAX has joined #ruby
cina has joined #ruby
Xeago has quit [Remote host closed the connection]
<pskosinski>
I wonder… Can I somehow integrate e.g. webkit with Ruby, so I can use HTML+CSS for interface and events like onclick to trigger Ruby functions… and alter DOM…?
aspiers has quit [Ping timeout: 264 seconds]
rdark_ has joined #ruby
* pskosinski
hates the way you create interface in GTK/Qt/etc. and loves HTML+CSS
naw has joined #ruby
rdark has quit [Ping timeout: 276 seconds]
claymore has joined #ruby
rmillerx has joined #ruby
<srji>
pskosinski: you would like to create UI for native applications in HTML+CSS?
<pskosinski>
srji: Remove "native" :p
<pskosinski>
Some apps don't need to look native… imho
Guedes0 has joined #ruby
elaptics is now known as elaptics`away
Ginfuru_ has joined #ruby
troyronda has quit [Remote host closed the connection]
<srji>
web-applications use HTML+CSS and are not native thought
Ginfuru_ has quit [Ping timeout: 252 seconds]
carraroj has quit [Ping timeout: 252 seconds]
bamyojo14335 has joined #ruby
rm_ has joined #ruby
elaptics`away is now known as elaptics
Xeago has joined #ruby
ixti has joined #ruby
<Hanmac>
pskosinski: hm wxWidgets has a WebView control for displaying html stuff ... and there is a ruby binding for that (but does not have WebView yet)
MR-0x41 has joined #ruby
akonny has joined #ruby
Milly_Bays has quit [Ping timeout: 264 seconds]
<MR-0x41>
Hi all Ruby programmers
<kilk_>
jhass, working
mansi has quit [Remote host closed the connection]
hermanmunster has quit [Remote host closed the connection]
troyronda has joined #ruby
davedev24 has joined #ruby
<kilk_>
working mandelbrot
mansi has joined #ruby
Slavox is now known as Slavox|AFK
hermanmunster has joined #ruby
Xeago has quit [Remote host closed the connection]
<MR-0x41>
|^_^|
<jhass>
kilk_: \o/
<MR-0x41>
:-?
MR-0x41 has left #ruby [#ruby]
havenwood has joined #ruby
zigomir has joined #ruby
Xeago has joined #ruby
<shevy>
pskosinski there are ruby webkit bindings in rubygnome
<jxf>
that example is for Python's shell, but I think the issue is the same
<jxf>
can you type "B"?
<jxf>
(as in, the capital letter)
razrunelord has quit [Ping timeout: 264 seconds]
<JimHy>
jxf: Yes, I can type 'B'
<jxf>
how did you install Ruby?
<JimHy>
rbenv
<JimHy>
but I'm pretty sure I installed rbenv because it wasn't working in rvm
<jxf>
I have to say I'm stumped =/
<jxf>
but hopefully that answer puts you on the right track
arietis has quit [Quit: Computer has gone to sleep.]
<JimHy>
jxf: I've tried a number of times. No one, including myself :/, has found a decent solution
<jxf>
I use xubuntu 14.04 and there's all kinds of terminal weirdness across different environments, but haven't encountered this
<JimHy>
Like I said, I can use rb-readline in ruby projects, it's just a little inconvenient.
<JimHy>
Yeah, it's a weird one.
<jxf>
I'm guessing it's because whatever version of readline lib your Ruby/Python/... is hooking into has this behavior
<jxf>
or, failing that, you have something strange in ~/.irbrc, ~/.inputrc, etc.
<JimHy>
jxf: Yes, it is. That's why my original question was about libraries, etc.
<JimHy>
jxf: I've tried different gcc packages to no avail.
Ginfuru_ has quit [Quit: Computer has gone to sleep.]
<JimHy>
jxf: At one point I pondered getting a new machine! Silly.
yfeldblum has joined #ruby
<jxf>
JimHy: a very programmer solution to the hardware problem :)
mcrmfc has quit [Quit: mcrmfc]
<JimHy>
haha, yep
<JimHy>
thanks for your input, all
mcrmfc has joined #ruby
<mikecmpbll>
eh, should you use accessors or class variables within the same class? does it make any difference? is there a code style reason to do either?
<mikecmpbll>
instance*
<mikecmpbll>
i.e. @some_var vs some_var where attr_accessor :some_var
<jxf>
mikecmpbll: usually if you define the accessor you would use the method form (some_var), or if you don't you would use the instance variable (@some_var)
<jxf>
that keeps the behavior consistent
<mikecmpbll>
fair do's, that suits me. thanks jxf :)
<jxf>
mikecmpbll: for example, a common pattern is to do something like "def x; @x ||= []; end" to initialize the instance variable the first time it's used
<mikecmpbll>
ah.
lkba has quit [Ping timeout: 265 seconds]
fgo has joined #ruby
<jxf>
mikecmpbll: but if you used @x here that would be a bug because it wouldn't get initialized through the accessor
yfeldblum has quit [Ping timeout: 252 seconds]
<mikecmpbll>
interesting point, thanks man
<jxf>
<3
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
badhatter has quit [Read error: Connection reset by peer]
klaut has joined #ruby
<JimHy>
jxf: You aren't going to believe this, or maybe you will. "bindkey -v" was the culprit in my .inputrc
<Hanmac>
shock_one: you cant call after_end in line 4 because its defined in line 6
arietis has quit [Quit: Computer has gone to sleep.]
helpD has joined #ruby
meatherly has joined #ruby
<Hanmac>
shock_one: you cant enter a building that is not already build ;P
havenwood has quit [Remote host closed the connection]
<certainty>
you can however enter a building that will never been build
<certainty>
see berlin airport
<certainty>
s/been/be/
Rahul_Roy has quit [Ping timeout: 252 seconds]
<shevy>
I always wondered why they wanted to build an airport
Rahul_Roy has joined #ruby
<shevy>
nobody wants to fly to berlin
<Hanmac>
shevy maybe they want to fly "away" from berlin? ;P
arietis has joined #ruby
cgcardona_ has joined #ruby
<crome>
well, given its one of the biggest cities in europe, I dont see a point against having an airport around it
cgcardona_ has left #ruby [#ruby]
s3ri0us has joined #ruby
<jhass>
they do have one already
sparrovv has joined #ruby
<jhass>
it's "just too small"
<Hanmac>
jhass: the new one is "too small" too ;P
<crome>
oh
helpD has quit [Ping timeout: 240 seconds]
<jhass>
hm yeah, but that doesn't matter since it will never be opened anyway
<Hanmac>
the biggest problems seems to be that they dont know how to read the "construction manuals" ... the ventilation system in case of a fire are located in the basement ... (and it seems that they fucked it SO up, that they need to replace it completly + new costs)
<jhass>
aren't we already at the point to consider rebuilding it from scratch?
danijoo has quit [Read error: Connection reset by peer]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<LadyRainicorn>
Why does everyone hate the Berlin airport so much?
<jhass>
shock_one: I bet @@after_end_callbacks end up being two different variables
danijoo has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
blackavr has joined #ruby
<Hanmac>
jhass: i read it cost less to remove the berlin and build it at a functional airport again
jonno11 has joined #ruby
benzrf|offline is now known as benzrf
<Hanmac>
LadyRainicorn: because they fucked up while building ... if they used qualified specialists (like from china or similar) it would be already finish, ten times better, and cost ten times less than "current" paid
Megtastique has joined #ruby
<Hanmac>
i mean i think even the ancient Egypts would have build it faster with their tools
<LadyRainicorn>
Maybe they could convert it into a disco and forget about it. I've heard Berlin is edgy like that.
yfeldblum has joined #ruby
havenwood has joined #ruby
Lewix has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
fgo has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
SilkFox has quit [Ping timeout: 252 seconds]
rm_ has joined #ruby
_justin has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
<certainty>
LadyRainicorn: hah, nice suggestion
stormbytes has joined #ruby
meatherly has quit [Remote host closed the connection]
<stormbytes>
hello
mehlah has joined #ruby
<stormbytes>
I've got foo = [1, 3, 4, 3, 2, 2, 9, 1] and bar = []. I'm running this loop: foo.each { |i| bar << i if foo.count(i) == 1 }
blackmesa has joined #ruby
<stormbytes>
i expect bar = [4,9]
<stormbytes>
but it spits out a copy of foo
<stormbytes>
why?
mrnugget has quit [Quit: mrnugget]
<canton7>
are you actually looking at bar?
fgo has quit [Ping timeout: 252 seconds]
<stormbytes>
hmm
<jhass>
>> foo = [1, 3, 4, 3, 2, 2, 9, 1] and bar = []; foo.each { |i| bar << i if foo.count(i) == 1 }; bar
<stormbytes>
i'm doing this wrong. I don't think .each returns a filtered set,it just iterates
sambao21 has quit [Quit: Computer has gone to sleep.]
<canton7>
correct. #select returns a filtered set, as jhass demonstrated
<stormbytes>
this is one of the example problems on rubymonk and i was trying to duplicate it in IRB
wald0 has quit [Quit: Lost terminal]
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
<stormbytes>
exactly
<benzrf>
stormbytes: brotip: use pry not irb
<AntelopeSalad>
also you can use .keep_if if you want to mutate foo
<stormbytes>
benzrf i looked into pry but couldn't really make heads or tails of it
<AntelopeSalad>
or is there another reason why you're using bar to hold the 2nd array?
<stormbytes>
hmm nice AntelopeSalad
<benzrf>
stormbytes: u can just use it exactly like irb
<AntelopeSalad>
.select! works the same as keep_if
<benzrf>
but then learn new features as u want em
<benzrf>
:D
<benzrf>
for one, it has history
<canton7>
I think select! and keep_if return different things in the edge-case?
<benzrf>
canton7: yeh
<AntelopeSalad>
canton7: which edge case?
nouitfvf_ has joined #ruby
<stormbytes>
AntelopeSalad - its nice to get a handle on multiple methods and ways of doing things
<canton7>
no items selected, I think?
<canton7>
will have to check the docs
Rahul_Roy has quit [Quit: Leaving]
senayar_ has quit [Remote host closed the connection]
<AntelopeSalad>
keep_if's source calls the implementation of select!
skysploit has joined #ruby
<Hanmac1>
shevy hm can you test, what is faster: a=[1, 3, 4, 3, 2, 2, 9, 1]; a.select {|i| a.count(i) == 1} or a.select {|i| a.one?{|j| i == j }}
imkmf has joined #ruby
<AntelopeSalad>
stormbytes: most of the time ! at the end of a method says you're going to mutate the thing you're using it on but in keep_if and delete_if's case they are aliases to select! and reject!
nouitfvf has quit [Ping timeout: 264 seconds]
dapz has joined #ruby
<canton7>
Hanmac1, it's got to be #one?, surely?
<canton7>
ooh, no, actually
skysploit has quit [Client Quit]
Hanmac1 is now known as Hanmac
<jhass>
keep_if seems to always return self, select! returns nil if there were no changes
<canton7>
hah,, yes of course. the mutation-y ones aren't going to work here
<AntelopeSalad>
look at the source code
<LadyRainicorn>
Results make sense.
<stormbytes>
Hanmac whats the difference in the way I'm setting up the expression?
armyriad has quit [Ping timeout: 255 seconds]
<Hanmac>
its the inner counting
<AntelopeSalad>
look at what function keep_if is calling in the C code
<canton7>
stormbytes, when it reaches that first '1', it finds more than one occurance, and deletes it from the array. when it reaches the second '1', it's the only '1' left in the array, so it's kept
<stormbytes>
AntelopeSalad that's slightly over my head
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<AntelopeSalad>
then look at the method directly below it (reverse!)
centrx has joined #ruby
<AntelopeSalad>
i chose reverse to look at it because what it does is more simple, just read the description for both reverse and reverse!
<AntelopeSalad>
but the same thing applies to select and select!
<Firebox>
for iterating_var in sequence: <——— python and iterating_var == | literating_var |
rmillerx has quit [Quit: rmillerx]
<stormbytes>
one modifies itself, the other returns a new array
<stormbytes>
i get that
<jhass>
Firebox: that's not necessarily the best way to think about is, rubys blocks are a more generic construct than for loops
<Hanmac>
Firebox the for stuff works in ruby too, but its mostly not wanted
srji has quit [Ping timeout: 252 seconds]
froy has quit [Ping timeout: 252 seconds]
estaban has joined #ruby
<Firebox>
ok thanks
fannye has quit [Read error: Connection reset by peer]
<jhass>
Firebox: I think you should stop paying so much effort in trying to map rubys syntax to equivalents in languages you already know, if it doesn't come to your mind in instant, I don't think it will help you understand it easier than trying to understand it directly
<AntelopeSalad>
reading the docs for .any? makes .one? make more sense
<kalleth>
okay, so, say i have [false, true, false, true, true, true, false, false, false], and i want to compact sequential duplicate elements. Any suggestions otehr than iterating over each one and comparing it to the previous one
<kalleth>
ie my desired output is [false, true, false, true, false]
<Hanmac>
shevy i am currently reading the source-code of wxwidgets itself, looking for asserts i need to catch for my rwx (because wx does not use exceptions so i cant catch them nicely) ... finding some nice error messages like >> wxASSERT_MSG( page != m_page, wxT("this is useless") ); <<
<shevy>
"Avoid using {...} for multi-line blocks."
<shevy>
hahahahaha
<pipework>
Do whut you want
franzip has quit [Quit: ...]
<shevy>
"C: Method has too many lines."
<shevy>
omg
jamto11_ has quit [Ping timeout: 240 seconds]
<vasilakisfil>
you can reconfigure it
<pipework>
shevy: Why do you write such shitty code? :(
<shevy>
"C: Line is too long."
<shevy>
pipework it is perfect code
kaspergrubbe has joined #ruby
<Hanmac>
hmm does rubocop works for C++ code too? ;P
<LadyRainicorn>
lol, that is suspiciously close to how JS works normally though.
<pipework>
shevy: mental masturbation much?
omosoj has quit [Ping timeout: 240 seconds]
<shevy>
pipework never, great minds are perfectly fine. how about you though?
<pipework>
shevy: Whose great mind did you steal?
<crome>
shevy: I rage when rubocop fails the build when a comment is too long
<crome>
its just mental
<shevy>
crome man, rubocop is insane
<shevy>
this one is interesting:
<shevy>
"Use fail instead of raise to signal exceptions."
<crome>
well, you can sort of configure it based on your guidelines
<crome>
its not entirely useless
<crome>
its just a lot more pain than gain
<shevy>
"trailling whitespace detected", that one though harmless is ok I guess
<crome>
I kill trailing whitespaces myself beause they look retarded in git diff
osvico has quit [Read error: Connection reset by peer]
<LadyRainicorn>
It is nice to remove trailing whitsespace with a git hook.
<pipework>
crome: Why can't you just wrap your comments?
omosoj has joined #ruby
<LadyRainicorn>
You can change indent styles automagically there too.
<crome>
pipework: of course I can, but sometimes it means I have to put 1 word on the next line
<shevy>
crome yeah, they also are not useful, I mean, trailing whitespace does not serve a function
maletor has quit [Quit: Computer has gone to sleep.]
<shevy>
this one is odd though:
<shevy>
traditional.rb:62:10: C: Do not use semicolons to terminate expressions.
<shevy>
opn; e 'does not seem to exist.'
<pipework>
crome: I puristically wrap all comments after the 78th column.
crazymykl has joined #ruby
<crome>
pipework: good for you
<shevy>
pipework afraid of having more than 78 chars?
<crome>
I dont program on a 80x25 terminal anymore
<pipework>
shevy: On a line? Yeah, it works nicely in my email client.
<LadyRainicorn>
A lot of people do!
<shevy>
"C: Use alias_method instead of alias."
<pipework>
crome: I do it because long lines suck for reading and scanning.
<shevy>
man ...
blackmesa has joined #ruby
<pipework>
shevy: What? The method is better than the keyword most of the time.
<shevy>
rubocop advocates alias_method instead of alias but both are not the same!
<shevy>
pipework not at all
<pipework>
shevy: Sure it is.
lw has quit [Quit: s]
<crome>
pipework: my lines are never longer than 100 characters. I just hate it when a script knows better and tells me to wrap it even though it fucks up a nice, one lin sentence
<shevy>
pipework nope
<pipework>
crome: Mine are never more than 80.
<LadyRainicorn>
alias is weird.
<pipework>
I used to be okay with 120, but 80's proper.
jonr22 has quit [Remote host closed the connection]
<LadyRainicorn>
I really loathe its semantics.
<pipework>
LadyRainicorn: I don't like it either.
<pipework>
Can't even meta.
<LadyRainicorn>
wtf is with symbols and no comma?
jonr22 has joined #ruby
<pipework>
LadyRainicorn: You don't need symbols necessarily even!
jheg has quit [Quit: jheg]
<pipework>
alias to_s fuck_off
<shevy>
hmm weird
<shevy>
rubocop detects whitespace in comments too
<LadyRainicorn>
That's actually a little better than with symbols.
<shevy>
so '# foo ' will be reported, '# foo' is fine
<LadyRainicorn>
But still it's icky.
<pipework>
shevy: Why do you like trailing whitespace so much?
<pipework>
LadyRainicorn: Truly.
<shevy>
pipework you have code that you must meta?
<crome>
shevy: dont waste precious space, thx
<pipework>
shevy: Naturally.
<shevy>
pipework ewww
<pipework>
How else am I to not get bored with ruby?
<pipework>
shevy: Lul.
banister has joined #ruby
<shevy>
pipework dunno, I think your mindset more fits to php
* pipework
is a metabrogrammer
<pipework>
shevy: You clearly haven't been writing ruby since 2006 or prior.
banister has quit [Client Quit]
<shevy>
pipework but I have!
Justinas has joined #ruby
<shevy>
both!
<shevy>
both prior and after!!!
* pipework
remembers when metaprogramming was embraced and a thing to marvel at.
<crome>
its funny, metaprogramming is pretty much what won me over to ruby. and now I actually take pride on solving problems without using *any* metaprogramming features
<crome>
in*
<shevy>
crome can rubocop report errors? I mean like the "offenses" are mostly just opinions, not very useful
RaptorJesus has quit [Remote host closed the connection]
testcore has quit [Quit: BitchX: now Y2K compatible!]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<shevy>
pipework I use a very few instances of .class_eval and define_method, but not many!
<pipework>
crome: I do things like write a meta-client that understands a few different kinds of hypermedia API's.
LexicalScope has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
<shevy>
oh... rubocop detected a wrongful indent, shame on me
ahhMichael has quit [Ping timeout: 246 seconds]
<shevy>
W: end at 109, 5 is not aligned with module at 11, 0
testcore has joined #ruby
omosoj has quit [Ping timeout: 240 seconds]
jonr22 has quit [Ping timeout: 240 seconds]
aagdbl has joined #ruby
<Justinas>
Guys, can you give me any links or tips how to use ActiveRecord with ruby(not rails)? I do have my whole application written in rspec tests, and now i need to transform or upgrade it so it start using ActiveRecord. Any sources?
<shevy>
"C: Space missing inside }"
<crome>
an application written in rspec tests?
<shevy>
"C: Use %r for regular expressions matching more than 1 '/' character."
<Justinas>
pipework: ill try to give a better explanation. I do have a User and Comments classes. For now they are not connected anywhere but each other (user has array of comment class objects). Do i need to change this structure for ActiveRecord to work? Or will it work somehow?
<s2013>
i space it out
<Hanmac>
shevy: foo.each(&method(:yo))
<jhass>
but to answer the question I do foo.map {|blah| yo bla }
relix has joined #ruby
<s2013>
can someone tell me some advanced ruby things one should know
<shevy>
jhass hmm
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<shevy>
jhass rubocop would tell you "C: Space between { and | missing."
<Hanmac>
s2013: you might need to know the difference between "if !obj" and "unless obj"
<jhass>
I would tell rubocup to shut up
<s2013>
whats the difference?
<pipework>
Justinas: You need to setup the database connection. That's really all.
<shevy>
hehe
m3nTe has joined #ruby
m3nTe has joined #ruby
<shevy>
crome rubocop is really noisy by default
zz_karupa is now known as karupa
<s2013>
Hanmac, or was that a joke
Nexus_x1 has joined #ruby
<jhass>
s2013: ! is a method call
<crome>
it takes some taming
<Mon_Ouie>
>> evil = Object.new; def evil.!; true; end; puts "this object is evil!" if !evil
<shevy>
wheeee "C: Missing top-level class documentation comment."
chipotle has quit [Quit: cya]
tjr9898 has quit [Ping timeout: 264 seconds]
<Hanmac>
s2013: the "!" is a method call ... that means "unless" is faster but !can be overwritten as Mon_Ouie did show you
<Justinas>
pipework: you mean, literally, just connect and its done? It will create every table automatic?
<s2013>
ah interesting
<crome>
hehe, I didnt know that
<pipework>
Justinas: It doesn't create tables, it never did.
<s2013>
is unless aliased to if not
<pipework>
You use migrations if you want to migrate data, otherwise you just need to provide or use the database schema.
<Mon_Ouie>
unless/if are not methods, so they can't be aliased
HashNuke has quit [Quit: Connection closed for inactivity]
<s2013>
i see
<AntelopeSalad>
is there a built in that will let me compare 2 aligned values from 2 arrays and then return a new array that contains true or false based on if array #2's value is larger than array #1's value?
<s2013>
that is actually pretty interesting
chrisseaton has quit []
<s2013>
Hanmac, can i borrow parts of your brain
<Mon_Ouie>
The way unless works, it checks if the condition evaluates to either nil or false to decide which branch to pick. So it's not affected by you redefining '!'.
<Justinas>
pipework: so i need to create a database schema first?
sdouglas has quit [Remote host closed the connection]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac>
s2013: another thing you might need to know, Float::NAN defines the NaN(Not a Number) float, but testing it with == does not work (that is hardcoded in ruby)
<Mon_Ouie>
You just redefined false.!. You are confusing variables and objects I believe (or something similar).
<Nexus_x1>
hey all so I am just getting started with Ruby and programming, last time I coded was over 8 years ago in C#. Is there a way to pass a variable into a method via refernce like in C#: static void squareRef(ref int refParameter){ refParameter *= refParameter; }
<LadyRainicorn>
Yes, but you never use it.
sdouglas has joined #ruby
lethjakman has joined #ruby
<LadyRainicorn>
Why do you want to do that?
<Mon_Ouie>
Whether you use a local variable like `a = false; a`, or if you use false directly, or even if you use `3 == 2 + 1`, you will get the exact same object.
<LadyRainicorn>
(@Nexus_x1)
<RubyPanther>
Nexus_x1: Objects always pass by reference, but variables can't be passed. You can make a closure and pass that, but that would be clever and bad
<Hanmac>
Nexus_x1: ruby only has "reference via object" so depending what you do and the Object, some methods can change the object, some can not
<Mon_Ouie>
So if you redefine a method on that object, no matter how you get a reference to it, the new method will be called
<mozzarella>
Nexus_x1: they're all sent by reference already
jonno11 has joined #ruby
<s2013>
yeah but if a = false. and im redefining a.. it doesnt have a pointer to false does it?
<RubyPanther>
You basically always want to use an object as a container in that case, instead of a variable
m3nTe has quit [Ping timeout: 240 seconds]
<pskosinski>
OK, so if I need to store in a variable a very long text including many spaces and new line characters, and that variable is a class variable, how to write it correctly according to style guidelines?
<AntelopeSalad>
jhass: what did you think about when solving that problem btw?
<Nexus_x1>
oh ok thanks, I thought it was pass by vaue
<Mon_Ouie>
Correct
<RubyPanther>
the variable is just the name you use to find the reference, you don't want to be thinking in terms of variables. Only think about the objects.
<crome>
RubyPanther: haha, cant wait to see that in action
<crome>
and a new perl was born
<Hanmac>
"LadyRainicorn does not know what went wrong" ;P *derp*
mr_snowf1ake has joined #ruby
<RubyPanther>
Ruby 2.1, now with 15% more Perl... Free!
<s2013>
k i dunno what i started but now im more confused
<crome>
s2013: your fault
<crome>
now eat it
Mon_Ouie has quit [Remote host closed the connection]
AndChat|185600 has quit [Ping timeout: 255 seconds]
seuros has quit [Ping timeout: 255 seconds]
<RubyPanther>
crome: I'm saving that technique for the next client that won't assign resources for testing
<RubyPanther>
"We have to keep people from trying to refactor, because it wouldn't be safe"
<RubyPanther>
"This way, they'll only replace whole classes and not methods"
<crome>
write unrefactorable code
<shevy>
LadyRainicorn you really like ponies don't you
elaptics`away is now known as elaptics
<RubyPanther>
shevy: Everybody loves ponies!
<LadyRainicorn>
obviously! Ponies are like my non magical family :3
manlycode has joined #ruby
r0bby has quit [Read error: Connection reset by peer]
<RubyPanther>
A lawyer friend of mine always makes people at parties say the word "pony." If they can say it without smiling, she makes them say "pancakes." I've never seen her fail.
maletor has joined #ruby
<shevy>
pancakes is a rather funny word
arietis has quit [Quit: Computer has gone to sleep.]
crzrcn has quit [Quit: Leaving.]
chichou has quit [Read error: Connection reset by peer]
mostlybadfly has joined #ruby
<RubyPanther>
Funny that def 3; end slips past, but def 33 gives a syntax error
sparrovv has quit [Remote host closed the connection]
cina has joined #ruby
estaban has joined #ruby
Firebox has left #ruby [#ruby]
bradhe has joined #ruby
<RubyPanther>
I haven't figured out yet what exactly it is about lawyers and ponies. Somebody will have to get a spy into law school to find out. I tried once, but some sort of mind-control beam must have overtaken me because as soon as I entered the building I started wandering dazed until I found myself researching the magna carta
robbyoconnor has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
<LadyRainicorn>
I can confirm that ponies frequently have ... dark tendencies.
<LadyRainicorn>
Usually it's an innate tendency towards unexpressed magic.
<LadyRainicorn>
(Rainicorns are actually the evolved form of ponies, after we succeed in killing and eating more than 17 humans.)
monkegjinni has joined #ruby
<Hanmac>
LadyRainicorn: and Rainicorns can crossbreed with Talking-dogs ;P
<RubyPanther>
LadyRainicorn: You should totally write a guest blog for popehat, I'll bet he would post it
<alpha123>
RubyPanther: I think "magic" generally refers to "metaprogramming". I guess. :/ I'd still completely arbitrarily say Ruby is more "magical" than Perl
<alpha123>
benzrf: <3
<RubyPanther>
I was assuming that technology that is sufficiently advanced or complicated can't be distinguished from magic
<LadyRainicorn>
" As of May 2014 when are the Bush family going to shut down America and jail & kill their enemies"
GMFlash has quit [Client Quit]
<Hanmac>
RubyPanther: "every high developed progamming language can't be distinguished from magic" ;P
<RubyPanther>
in Ruby we often even know which methods we hid the magic in
<LadyRainicorn>
Ruby is magical because it is powerful; Perl is magical because everything is magic to a brain reduced to shreds as small as those reading Perl makes.
<RubyPanther>
Because of Perl's basis in natural language, you could be getting reprogrammed by NLP just from reading sources... IF you could understand them, anyways
<Hanmac>
and Hanmac's C-Macros are witchcraft ;P
<RubyPanther>
like if you take Snow Crash
jgillman_ has joined #ruby
GMFlash has joined #ruby
ktosiek has joined #ruby
jgillman_ has quit [Quit: I'll see myself out.]
predator117 has quit [Remote host closed the connection]
artgoeshere has joined #ruby
<pipework>
I'm still convinced Snow Crash is just an obscure perl program.
phinfonet has quit []
<RubyPanther>
stay up 3 nights writing Perl code and you'll feel like you just ran it
artgoeshere has quit [Client Quit]
<RubyPanther>
if you're young enough that staying up all night is "fun," Perl is a great language
dawkirst has joined #ruby
<AlexRussia>
pipework: LadyRainicorn Algebraic or Mathematical?O_O I just think - Ruby is HAPPINESS!
LadyRainicorn has quit [Read error: Connection reset by peer]
<pipework>
Ruby is 'good shit' for druggie programmers.
<RubyPanther>
I'll smoke to that
snuffeluffegus has joined #ruby
<AlexRussia>
lol
<RubyPanther>
Not really, because I'm indoors... but it sounded good
mus1cb0x has joined #ruby
<mus1cb0x>
hello
<AlexRussia>
someone know, where i can pay cigarette 'Man'? :P
<pipework>
RubyPanther: I've smoked salmon inside. Inside a shed.
<AlexRussia>
RubyPanther: ^
Stalkr_ has joined #ruby
<pipework>
It was painted blue.
<pipework>
I wanted purple.
saarinen has joined #ruby
<mus1cb0x>
i'm reading up on 2.1 changes. it seems refinements is a big win for scoping class changes. am i wrong in seeing refinements as very useful?
<AlexRussia>
pipework: libpurple?
<mus1cb0x>
vs the broadly applied monkey patching
<metamaterial>
lol lib.purple
maletor has quit [Quit: Computer has gone to sleep.]
<AlexRussia>
libastral.so
<RubyPanther>
You should have monkey-patched it purple
<mus1cb0x>
what's lib purple?
<pipework>
metamaterial: They suck right now.
<AlexRussia>
mus1cb0x: pidgin IM
<alpha123>
Wait, did refinements finally get in Ruby 2.1? Cool.
<pipework>
So bad I don't even want to bother with them.
<mus1cb0x>
oh
<pipework>
alpha123: Experimental feature, I think.
<AlexRussia>
mus1cb0x: IM - instant messenger
<mus1cb0x>
yea
<pipework>
It may have graduated to a proper "This shit really sucks" feature though.
<jhass>
2.0 experimental, 2.1 sorta stable
agjacome has quit [Quit: Lost terminal]
Stalkr_ has quit [Changing host]
Stalkr_ has joined #ruby
thomd has joined #ruby
<AlexRussia>
lol
<AlexRussia>
jhass: rly?
thomd has quit [Remote host closed the connection]
thomd has joined #ruby
<jhass>
at least no more warnings if you use it in 2.1
<AlexRussia>
someone use Eclipse DLTK for ruby dev?
phinfonet has joined #ruby
brian___ has joined #ruby
<AlexRussia>
jhass: what is sorta?
<pipework>
Just vim.
<jhass>
sort of
<AlexRussia>
ah....
<AlexRussia>
google translater dont know it
mus1cb0x has left #ruby ["WeeChat 0.4.2"]
predator117 has quit [Remote host closed the connection]
<RubyPanther>
refinements look good if you're writing code that might use them, but they introduce a lot of uncertainty if you're using code you didn't write
saarinen has quit [Client Quit]
<pskosinski>
Any tool to generate control flow graph of Ruby code?
<benzrf>
pskosinski: why not write your own?
<pipework>
pskosinski: vim
<AlexRussia>
flow graph?
phinfonet has quit [Client Quit]
<AlexRussia>
is like flow charts?
<pipework>
vim + ctags :D
<benzrf>
AlexRussia: graph
<AlexRussia>
pipework: :D
<pskosinski>
Woot
<AlexRussia>
benzrf: example in studio please
<benzrf>
graph like vertex-edge graph
<benzrf>
as in directed acyclic graph
* AlexRussia
should more learning graphs.....
<pipework>
benzrf: Everything is a graph already.
<pskosinski>
benzrf: My own tool for generating such things? Or on paper? :p On paper takes time…
<pipework>
You just ain't even realized yet.
<benzrf>
duuuude
<benzrf>
i see graphs everwere
<AlexRussia>
i never don't learn graphs :( i know how to make easy graph, but dont know fundamental stuffs....
bluOxigen has quit [Ping timeout: 264 seconds]
<benzrf>
syntax
<benzrf>
is a tree
<benzrf>
and trees
<benzrf>
are GRAPHGS
<AlexRussia>
vertex
sdwrage has quit [Quit: This computer has gone to sleep]
dik_dak has quit [Remote host closed the connection]
<AlexRussia>
i try learn in my native language.....math English part not my power....
redondos has quit [Changing host]
redondos has joined #ruby
artgoeshere has quit [Quit: I'll see myself out.]
<AlexRussia>
benzrf: oriented graph is tree with one root?
* pipework
lurves graph algebras.
<pipework>
Honestly, I love most anything *bra
bradhe has quit [Remote host closed the connection]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
Guedes0 has joined #ruby
predator117 has joined #ruby
artgoeshere has joined #ruby
meatherly has quit [Remote host closed the connection]
pika_pika has quit [Ping timeout: 252 seconds]
mehlah has quit [Quit: Leaving...]
<AlexRussia>
ah
<AlexRussia>
i understand
mrnugget has joined #ruby
<AlexRussia>
oriented graph included -> :P
<atmosx>
aloha
<AlexRussia>
o/
razrunelord has joined #ruby
<shevy>
heya atmosx
<shevy>
atmosx I hate database setup
<AlexRussia>
shevy: ;) Hi
wiku5 has joined #ruby
<s2013>
what does it mean to own an object
<jhass>
s2013: a bit more context
<RubyPanther>
I find refinements really hard to accept ideologically. I really don't want WHERE a method is called from to matter. Caring about that was supposed to be Considered Harmful.
<s2013>
like when it comes to testing
thomd has quit [Remote host closed the connection]
<jhass>
more
pwh has quit []
<jhass>
I heard owning classes before, but objects...
razrunelord has quit [Ping timeout: 255 seconds]
ph88_ has quit [Ping timeout: 240 seconds]
<benzrf>
bye
artgoeshere has quit [Quit: I'll see myself out.]
Speed has joined #ruby
benzrf is now known as benzrf|offline
pwh has joined #ruby
<s2013>
like when to use mocks/stubs
<s2013>
vs db
mois3x has joined #ruby
Czupa has quit [Quit: Wychodzi]
<shevy>
s2013 I own class UrMom
<shevy>
if it is not a singleton, there can be many copies of it and thus many different owners
<s2013>
thats true
<s2013>
that class is used by way too many people
<shevy>
pipework do you like *brazilians
<pipework>
shevy: I don't think that matches the glob I provided.
<shevy>
but there is a bra inside
<pipework>
*bra # => /bra\z/
crzrcn has joined #ruby
<jhass>
s2013: in doubt mock out the dependencies of the class you're testing when unit testing
<pipework>
shevy: That would be *bra*, not *bra
<pipework>
jhass: I wouldn't.
<pskosinski>
loving cobras, strange fetish
agjacome has joined #ruby
<pipework>
I mean, not always. I mock things I own, not things I don't own. I don't usually even mock stdlib and core.
<shevy>
ok so it is more like Abracadabra
<pipework>
shevy: Exactly.
<shevy>
pskosinski I think only a singular cobra
ahuman has quit [Remote host closed the connection]
<shevy>
if they come in masses, all but one get murdered
<pskosinski>
Scary
shock_one has joined #ruby
x77686d has joined #ruby
artgoeshere has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
ahuman has joined #ruby
stantona has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
bluOxigen has joined #ruby
crzrcn has quit [Ping timeout: 264 seconds]
benzrf|offline is now known as benzrf
benzrf is now known as benzrf|offline
benzrf|offline is now known as benzrf
benzrf is now known as benzrf|offline
<shevy>
in a case menu
cina has joined #ruby
<shevy>
do you rather do this:
mansi has quit [Remote host closed the connection]
timonv has joined #ruby
<shevy>
when 'foo','bar','bla'
<shevy>
or
<shevy>
when 'foo', 'bar', 'bla'
benlieb has joined #ruby
<jhass>
a , is followed by a space. no exceptions
mansi has joined #ruby
evenix has joined #ruby
sdwrage has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 255 seconds]
<benlieb>
when looping through an array is it possible to remove elements further down in the array so that they are essentially "removed" from the array being looped over?
bluOxigen has quit [Ping timeout: 255 seconds]
benzrf|offline is now known as benzrf
<jhass>
benlieb: describe input and desired output, not the operation you think you need
<crome>
benlieb: if you do map you can return nil for the values you want to get removed and then you can call compact on the result
mansi has quit [Read error: Connection reset by peer]
papercode has joined #ruby
<crome>
if I got your description right
mansi has joined #ruby
benzrf is now known as benzrf|offline
rokob has quit [Remote host closed the connection]
pwh has quit []
<pipework>
benlieb: I think you'd want to loop through the array in reverse.
jamto11_ has joined #ruby
<canton7>
:(
pwh has joined #ruby
Emmanuel_Chanel has joined #ruby
<pipework>
Oh wait, I think I've got it reversed.
timonv has quit [Ping timeout: 240 seconds]
cina has quit [Ping timeout: 252 seconds]
<elico>
I am trying to write a document into mongodb from a http response while I get this issue: "BSON::InvalidStringEncoding: String not valid UTF-8" and I am not sure what to do with it. any directions?
helpD has quit [Remote host closed the connection]
<pipework>
elico: Show us the string or make sure it's valid utf8
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
crzrcn has joined #ruby
stantona has joined #ruby
benlieb has quit [Quit: benlieb]
dawe has joined #ruby
kilk_ has joined #ruby
Megtastique has joined #ruby
WishBoy has joined #ruby
Musashi1 has joined #ruby
estaban has quit [Ping timeout: 252 seconds]
crzrcn has quit [Ping timeout: 264 seconds]
jackneill has quit [Remote host closed the connection]
stantona has quit [Ping timeout: 264 seconds]
crzrcn has joined #ruby
lxsameer has quit [Quit: Leaving]
ianbrandt has joined #ruby
ianbrandt has quit [Excess Flood]
sdouglas has joined #ruby
Zesty has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
ahhMichael has joined #ruby
mcrmfc has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
wiku5 has quit [Quit: WeeChat 0.4.2]
cina has quit [Quit: leaving]
mcrmfc has quit [Client Quit]
mcrmfc has joined #ruby
rokob has quit [Remote host closed the connection]
sdouglas has quit [Remote host closed the connection]
MrJoshua has quit [Quit: MrJoshua]
crzrcn1 has joined #ruby
crzrcn has quit [Ping timeout: 276 seconds]
lw has quit [Quit: s]
agarie_ has joined #ruby
aagdbl has quit [Quit: Connection closed for inactivity]
<pskosinski>
Undefined method Class.method for object of class Class would be more useful? :p
Martxel has quit [Read error: Connection reset by peer]
alpha123 has quit [Quit: leaving]
wiku5 has joined #ruby
agarie has quit [Ping timeout: 276 seconds]
Martxel has joined #ruby
sdouglas has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has joined #ruby
hfp`offline is now known as hfp
blackmesa has joined #ruby
andy___ has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 265 seconds]
<RubyPanther>
elico: There are no options, videos are non-text data so you need to use ASCII, or if your db supports some kind of BLOB or RAW you can use that. A db encoded with utf is for multilingual text, not for arbitrary binary data
<RubyPanther>
elico: normally you would save them in the filesystem and put the filename into the db
_sambao21 has quit [Quit: Computer has gone to sleep.]
Zesty has quit [Quit: Leaving...]
crzrcn1 has quit [Quit: Leaving.]
anaeem1 has quit [Remote host closed the connection]
yfeldblu_ has quit [Remote host closed the connection]
bradhe_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<elico>
RubyPanther: thanks this is what I was thinking about..
<pskosinski>
Line X: C: NegatedIf: Favor if over unless for negative conditions. | Line X+5: Favor unless over if for negative conditions.
<pskosinski>
rubocop is awesome >.>
<crome>
only no code is good code for rubocop
<centrx>
rubocop's family was killed by poorly styled code
Megtastique has quit []
enebo has quit [Quit: enebo]
jiriki has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hrs has joined #ruby
Megtastique has joined #ruby
postmodern has joined #ruby
<pskosinski>
At least I reduced 247 offenses (in 325 lines long script) to 14. \o/
hrs has quit [Client Quit]
srji has quit [Quit: das beste was ich in meinem leben tun kann ist andere menschen dazu zu bringen mich toeten zu wollen]
wiku5 has quit [Quit: WeeChat 0.4.2]
Milly_Bays has joined #ruby
ktosiek has quit [Ping timeout: 255 seconds]
senayar has joined #ruby
chrisja has joined #ruby
zigomir has quit [Remote host closed the connection]
sambao21 has joined #ruby
zigomir has joined #ruby
chrisseaton has quit [Ping timeout: 252 seconds]
lw has joined #ruby
Silent__ has joined #ruby
mansi has joined #ruby
* pskosinski
wonders why he used "unless !something" instead of "if something"
zigomir has quit [Ping timeout: 252 seconds]
nanoyak has joined #ruby
Hobogrammer_ has quit [Ping timeout: 252 seconds]
olivier_bK has quit [Ping timeout: 246 seconds]
jamto11 has joined #ruby
Silent__ is now known as Hobogrammer
workmad3 has joined #ruby
jacobsmith has quit [Ping timeout: 240 seconds]
matchaw_ has quit [Ping timeout: 252 seconds]
matchaw has joined #ruby
roadie has joined #ruby
twiceaday has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
rm_ has quit [Remote host closed the connection]
Celm has quit [Remote host closed the connection]
rm_ has joined #ruby
alem0lars has quit [Quit: Going AFK...]
mostlybadfly has quit [Quit: Connection closed for inactivity]
twiceday has quit [Ping timeout: 240 seconds]
akonny has quit [Quit: akonny]
Cache_Money has quit [Quit: Cache_Money]
aspires has joined #ruby
Nexus_x1 has joined #ruby
ikaros has joined #ruby
timonv has joined #ruby
bradhe has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
rm__ has joined #ruby
rm_ has quit [Ping timeout: 276 seconds]
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
<shevy>
ok guys
<shevy>
it is time again
<shevy>
down with your pants!
bradhe has quit [Read error: Connection reset by peer]
sputnik1_ has joined #ruby
bradhe has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
<BradPitt_>
why is DHH such a douche
<shevy>
BradPitt_ some must be ruthless in order to succeed. like steve jobs... did you read where he made agreements against payment to those who are hired away from/to the silicon valley companies?
stantona has joined #ruby
<BradPitt_>
yeah
<BradPitt_>
read multiple articles on that
<shevy>
it's theft in my opinion
<BradPitt_>
but DHH is just like, a tool
<shevy>
well rails is past its peak
helpD has quit [Remote host closed the connection]
<BradPitt_>
i think RoR is still going pretty strong in the valley/bay area
<workmad3>
shevy: I don't think TIOBE has ever shown much popularity for ruby
<BradPitt_>
.23% change is very small
<shevy>
workmad3 yeah, I think it secretly hates ruby
<shevy>
BradPitt_ but just look at javascript!
<workmad3>
shevy: partly, IMO, because TIOBE uses one dumb metric and is overall pretty crap
<shevy>
BradPitt_ there was a time when ruby was before javascript on github
<BradPitt_>
yeah but js can be on server and client side now
<BradPitt_>
so naturally it is more ubiquitous
<shevy>
see?
<shevy>
see!?!
<shevy>
more reasons for js, less for ruby :(
<BradPitt_>
but i don't think server-side js is here to stay
<BradPitt_>
do you?
aspiers has joined #ruby
<BradPitt_>
its a trend imo
<shevy>
yeah, because the web is damn important
<workmad3>
BradPitt_: server-side JS has been around for something like 15 years
<workmad3>
BradPitt_: it just got sexy with Node.js
sdouglas has quit [Remote host closed the connection]
<BradPitt_>
has it?
<BradPitt_>
i mean there are still things it isn't great for
<shevy>
even php had a lot of success despite it being so awful, simply because there are so many people out there on this planet
<deepy>
It has success because it filled a niche and snowballed
<shevy>
yeah
<shevy>
and others, like perl, couldn't quite fill the niche on their own
stantona has quit [Ping timeout: 240 seconds]
<shevy>
BradPitt_ you meant your comment in regards to DHH because of testing culture?
<BradPitt_>
i just think DHH is a tool, thats all
<BradPitt_>
and its a shame that he is the "iconic" figurehead of the rails community
<BradPitt_>
and why RoR/ruby is seen as "brogrammer" ish
<workmad3>
BradPitt_: I came across server-side JS (in the form of Jaxer) around the same time I came across rails, about 7 years ago now... and I know there have been JS runtimes capable of running on the server for longer in the java ecosystem... I might have exaggerated with 15 years, but I'd say at least a decade :)
<BradPitt_>
sure workmad3 but AFAIK it only came into popular light and being used in production for larger scale things recentyl
<BradPitt_>
with node, mainly
<BradPitt_>
i could be wrong though
helpD has quit [Ping timeout: 276 seconds]
<workmad3>
BradPitt_: yeah... as I said, node.js made it sexy :)
<BradPitt_>
idk, im still very interested to see where it goes
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
<workmad3>
have a look at java and ruby web programming... chances are server-side JS will end up in pretty similar areas
compleatang has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
endash has quit [Quit: endash]
rokob has joined #ruby
dawe has quit [Quit: leaving]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
jamto11 has joined #ruby
<shevy>
BradPitt_ well the two communities are rather different really. I dont really use rails, many people here on #ruby don't either, some do, a few are also on #rubyonrails - as far as I am concerned, rails is like another language
<BradPitt_>
right, and I agree, but most outsiders (of both communities) conflate the two
<BradPitt_>
sadly
<shevy>
yeah
bradhe has quit [Read error: Connection reset by peer]
<shevy>
I saw it happen myself, I started a while before rails was written
_1_Beto has joined #ruby
havenwood has quit [Ping timeout: 255 seconds]
bradhe has joined #ruby
Zesty has joined #ruby
<benzrf>
i know shit about rails
<benzrf>
and by shit i mean nothin
<shevy>
one complaint I remember from chris2 (the guy who wrote rack) on #ruby-lang once was that the mailing list got more spam, and less "interesting" posts
<shevy>
and I think rails partially is to blame for that, because many newcomers came to ruby, also writing to the mailing list. it had good and bad aspects
Zesty has quit [Client Quit]
<shevy>
benzrf one day you will have a rails site
<shevy>
benzrf I mean, you need to put your resume somewhere
<shevy>
don't say you will use static html
Zesty has joined #ruby
<workmad3>
shevy: he may just have a rack site for that... or a middleman site :)
<workmad3>
shevy: or sinatra with RoM :)
<shevy>
I know benzrf, right now he has none of that :D
Zesty has quit [Client Quit]
cover has quit [Remote host closed the connection]
<benzrf>
static html is the best kind of site
<shevy>
he is too busy learning new languages
<benzrf>
*when it is all that you need
Megtastique has quit []
rokob has quit [Ping timeout: 240 seconds]
malida has quit [Ping timeout: 252 seconds]
<shevy>
BradPitt_ do you use ruby?
<BradPitt_>
yes
<shevy>
BradPitt_ how or why did you come to use, or want to use, ruby?
<benzrf>
i used to think 'ruby' was short for 'ruby on rails'
<benzrf>
like 4 years ago
<BradPitt_>
came from python/java. Heard and saw rails everywhere and was interested
compleatang has joined #ruby
<shevy>
hmm
jamto11 has quit [Ping timeout: 265 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
KanKava has quit [Quit: leaving]
<shevy>
it is rare to find other newcomers
endash has joined #ruby
<shevy>
I mean like "I used perl for the last 10 years but wanted another language" is very rare to hear about
fuhgeddaboudit has joined #ruby
Megtastique has joined #ruby
burgess has joined #ruby
dnordstrom has quit [Ping timeout: 245 seconds]
MatthewsFace has quit [Quit: This computer has gone to sleep]
<_1_Beto>
Hola ruby
<benzrf>
BradPitt_: ruby is the same niche as python mostly
<benzrf>
in general either can usually replace the other
<benzrf>
like c# & java
<benzrf>
but not quite so similar
Megtastique has quit [Client Quit]
kung has quit [Ping timeout: 264 seconds]
Shidash has joined #ruby
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
shock_one has quit [Ping timeout: 264 seconds]
kilk_ has quit [Quit: Leaving]
<kalleth>
benzrf: so did i
<kalleth>
but i just wrote A Thing completely without rails
<benzrf>
sweet
<shevy>
anyone knows of a gem or something that removes ansi escape sequences from a string?
<kalleth>
i <3 ruby, tbh
<shevy>
like \e[1;31m
<kalleth>
though i do want to learn me some go/scala at some point
<shevy>
yeah
<shevy>
ruby and python have very similar niches
<shevy>
they fish in the same pond
eguim has quit [Ping timeout: 276 seconds]
kilk_ has joined #ruby
dapz has joined #ruby
<kalleth>
i did use a static site for my resume though
SilkFox has joined #ruby
<kalleth>
does that make me a Bad Programmer
<kilk_>
yes
crzrcn has joined #ruby
sputnik1_ has joined #ruby
klaut has quit [Remote host closed the connection]
Celm has joined #ruby
Milly_Bays has quit [Quit: Leaving]
beond has joined #ruby
mcrmfc has quit [Quit: mcrmfc]
Nexus_x1 has quit [Quit: Computer has gone to sleep.]
hfp is now known as hfp`offline
<shevy>
kalleth well
<shevy>
kalleth I'll rate the dynamic programmers above ya, sorry man
<AntelopeSalad>
shevy: no but i think it would be a pretty basic regex
<kalleth>
shevy: but but but but
<kalleth>
:(
<kalleth>
i used middleman to generate it
<kalleth>
that has to be worth something
tjr9898 has joined #ruby
<shevy>
hmm
<shevy>
is that a rack component?
Nexus_x1 has joined #ruby
andy___ has joined #ruby
endash has quit [Quit: endash]
<apeiros>
shevy: for colors, it's simply gsub(/\e\[[^m]*m/, '')
<apeiros>
unless I made a mistake :)
<shevy>
apeiros whoa, cool! I could not believe it could be that simple
<kalleth>
shevy - it's a jekyll-like static site generator in rubby
benlieb has joined #ruby
<shevy>
AntelopeSalad seems you were right
crzrcn has quit [Ping timeout: 240 seconds]
TheNumb has quit [Ping timeout: 264 seconds]
<apeiros>
shevy: if you have escape sequences which are not color, this will break
<shevy>
kalleth ah ok... somehow thought about rack... rack middleware.. hmm... isn't quite middleman...
<apeiros>
hm, probably better make it safe
<shevy>
unless the middleman trades with middleware
<apeiros>
shevy: for colors, it's simply gsub(/\e\[\d+(?:,\d+)*m/, '')
<apeiros>
whoops
<kalleth>
nah, it just generates static sites
<apeiros>
shevy: gsub(/\e\[\d+(?:;\d+)*m/, '') # ; not ,
ikaros has quit [Quit: Ex-Chat]
eka has joined #ruby
<shevy>
okies thanks
_1_Beto has quit [Read error: Connection reset by peer]
<AntelopeSalad>
Saturday, June 23, 2012 at 3:27:00 AM GMT+2
dik_dak has joined #ruby
northfurr has joined #ruby
Raboo has joined #ruby
TheNumb has joined #ruby
<apeiros>
AntelopeSalad: (?:;\d+)? is wrong in that expression
<apeiros>
needs to be *
<apeiros>
as it can be e.g. fg, bg, bold, blink - all in one sequence
<AntelopeSalad>
hmm it seems to match everything in his sample text
<apeiros>
of course
<AntelopeSalad>
but he did post it at 3:30am, so he was probably up for 5 hours trying to make it while fuming
<apeiros>
otherwise he'd probably have fixed the expression
<shevy>
hehehe
<apeiros>
make one expression e.g. \e[34;40;1m
<apeiros>
and suddenly you have stray ;1m in your text
<shevy>
AntelopeSalad when do you produce the best code? as in best result or fastest, in ruby? i.e. the hour of the day, or n time after waking up
<AntelopeSalad>
ah
<apeiros>
also, neither his nor mine handle 256 colors escapes :)
<apeiros>
anyway, bed time
<AntelopeSalad>
hmm, it's not really based on time for me, it's my current mindset
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<AntelopeSalad>
but i guess after waking up is usually the best
havenwood has joined #ruby
brunops has joined #ruby
tjr9898 has quit [Remote host closed the connection]
AGreyCrane has quit [Quit: This computer has gone to sleep]
Milly_Bays has joined #ruby
Gooder` has joined #ruby
bryanjswift has joined #ruby
eguim has joined #ruby
bryanjswift has quit [Client Quit]
testcore has quit [Ping timeout: 272 seconds]
bryanjswift has joined #ruby
testcore has joined #ruby
<shevy>
hehe
pskosinski has quit [Quit: Til rivido Idisti!]
Gooder`` has joined #ruby
<AntelopeSalad>
i usually try to code for 2-3 hour blocks and then take a break, then come back a little later
wiku5 has joined #ruby
banister has joined #ruby
jlast has joined #ruby
<shevy>
aha
<shevy>
that's how I try to do as well
<shevy>
though i tend to make more smaller breaks and also less code blocks
<shevy>
3 hours would kill me
jcs222 has quit [Quit: leaving]
<benlieb>
I have a global array (I know) that I'm looping through in a short utility script. Inside this loop I seem to not have access to methods I've defined in this script. What scope issue am I missing?
mostlybadfly has joined #ruby
banister has quit [Client Quit]
Gooder` has quit [Ping timeout: 255 seconds]
<benlieb>
wait, now I do. hm.
<benlieb>
k
estaban has joined #ruby
<AntelopeSalad>
shevy: yeah 3 hours is a long, on new/harder things i tend to do less
<AntelopeSalad>
*a little long
<benlieb>
looks like i had to define the method *above* the loop. Weird.
<shevy>
benlieb keep in mind that the ruby parser can be surprising