<workmad3>
bnagy: well, when else would you expect an object that is defined as never going out of scope to be cleaned up? :)
aspiers has quit [Ping timeout: 252 seconds]
jlast has quit [Remote host closed the connection]
<bnagy>
workmad3: serious question though - when the main thread exits, it doesn't actually run a GC cycle does it?
<bnagy>
cause that seems.. suboptimal
<dorei>
RichardRaseley: yeap :)
<RubyPanther>
@shevy.to_json.to_sym
Kneferilis has quit [Read error: Connection reset by peer]
<shevy>
waaa
<workmad3>
bnagy: the runtime properly releases allocated memory back to the OS
cbetta_afk is now known as cbetta
<workmad3>
bnagy: but it's probably not a GC cycle, no
<RichardRaseley>
dorei: OK - great.
<RichardRaseley>
Thanks all for the help.
<RubyPanther>
stuck in JS for eternity
<shevy>
:(
<shevy>
I will need JS soon ...
<shevy>
and CSS... and HTML ... I feel like updating knowledge I had in the 1999
<workmad3>
shevy: how's the rails coming along?
<nycjv321>
shevy: JS? pssh
<RubyPanther>
shevy: table layout still works
<nycjv321>
real rubbyers use coffescript
<shevy>
workmad3 dunno... they shocked me when they said they are a perl team... starting the coming monday... I hope I can prototype in ruby but who knows
<nycjv321>
rubyiers* =D
<workmad3>
yeah, table layout... except now we do it with divs and 'display: table-cell' :)
<shevy>
wat
<shevy>
what is display: table-cell
<shevy>
workmad3 made that up?
<bnagy>
nycjv321: rubby is a term, so rubbyer works fine
<workmad3>
shevy: as is table-row, table-column, table and inline-block
<nycjv321>
RubyPanther: exactly
apeiros has quit [Remote host closed the connection]
<shevy>
waaa
apeiros has joined #ruby
rootshift has quit [Quit: rootshift]
<RubyPanther>
@shevy.to_perl!
<workmad3>
shevy: on the plus side though, you now have 'border-radius: 4px;' instead of having to construct a 9-cell div monstrosity and images just to round the corners of a button :)
<RubyPanther>
Without blocks as arguments, you better learn how to do a Schwartzian Transform
Davey has quit [Remote host closed the connection]
duggiefresh has joined #ruby
<shevy>
hmm
<shevy>
oh man
<shevy>
too much to learn in 3 days
<nycjv321>
shevy: lol
<nycjv321>
dude I lose sleep trynig to learn as much as I can
Davey has joined #ruby
<workmad3>
shevy: alternatively, you just slap bootstrap or foundation into your site, use their grid classes and don't worry about how it works :)
rootshift has joined #ruby
<RichardRaseley>
Does chomp have an opposite? I am just figuring out how to a string like "/this/that/the.other" to get just "the other". Or would I just use regex and substitute everything before and including the last / with '' ?
tauebel has joined #ruby
mary5030 has quit [Remote host closed the connection]
<RichardRaseley>
the.other *
mklappst_ has quit [Remote host closed the connection]
<workmad3>
RichardRaseley: or you do str.split("/").last
<benzrf>
Stderr: | convert: no decode delegate for this image format `/tmp/magick-aMAfJByG' @ error/constitute.c/ReadImage/544.
<benzrf>
| convert: no images defined `/home/benzrf/screenshot.png' @ error/convert.c/ConvertImageCommand/3044.
<benzrf>
oh crap
zachallett has joined #ruby
<benzrf>
i did this wrong
<bnagy>
ORLY?
figgleberry has quit [Ping timeout: 264 seconds]
<benzrf>
lol
daxroc has quit [Quit: Leaving.]
<RubyPanther>
it
kevind has quit [Quit: kevind]
<RubyPanther>
's python what did you expect?
tkuchiki has joined #ruby
<benzrf>
nah what happened is
duggiefresh has joined #ruby
nycjv321 has quit [Quit: leaving]
<benzrf>
i did '/exec -o screenshot'
<benzrf>
then I decided not to actually
<benzrf>
so i did killall swd
cbetta is now known as cbetta_afk
<benzrf>
*xwd
<benzrf>
but the program errord because the subprocess died
cbetta_afk is now known as cbetta
mikepack has joined #ruby
pel_daniel has left #ruby [#ruby]
pel_daniel1 has joined #ruby
pel_daniel1 has left #ruby [#ruby]
Columcille has joined #ruby
caustic has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Silox| has joined #ruby
cbetta has quit [Excess Flood]
<Silox|>
Hello there! I'm trying to use Coveralls in Combination with Travis, but I noticed that coveralls also scans the test/ directory for coverage...
cbetta has joined #ruby
<Silox|>
We can't of course write tests for the tests and tests for those tests... Is there a way to hide this test/ folder? I find it weird that this isn't being done automagicly...
tkuchiki has quit [Remote host closed the connection]
aryaching has joined #ruby
tjbiddle has joined #ruby
fveillette has joined #ruby
griffindy has quit [Ping timeout: 252 seconds]
fgo has joined #ruby
ElComradio_ has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
mikepack has quit [Remote host closed the connection]
aryaching_ has quit [Ping timeout: 252 seconds]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
mojjojo has quit [Quit: mojjojo]
cashnguns has joined #ruby
ElComradio has quit [Ping timeout: 248 seconds]
ElComradio_ is now known as ElComradio
zz_karupanerura is now known as karupanerura
jobewan has quit [Quit: Leaving]
zcreative has joined #ruby
enebo has quit [Quit: enebo]
sdwrage has joined #ruby
<RubyPanther>
But how do you know if you wrote the right tests unless you write tests to test it? Test driven test driven development is the new thing, right?
lifestream has joined #ruby
<benzrf>
lol tests
Lewix_ has quit [Remote host closed the connection]
<benzrf>
tests are for those who cant write bug free code to start withnale
<benzrf>
*with
<benzrf>
-smug-
<RubyPanther>
and/or for people who can't afford QA
Lewix has joined #ruby
<agent_white>
-#rails gasps in horror-
<Silox|>
o_o
<Silox|>
I have trouble deciding if you guys are sarcastic now.
<dorei>
heh
[krisbulman|oOo] is now known as krisbulman
griffindy has joined #ruby
<dorei>
i dont write tests, but then i'm unemployed xD
<RubyPanther>
rails is the silliest place to have a lot of tests, because so much of everything is done for you. A few integration tests and you're good to go
<Silox|>
RubyPanther: We'd still like a 100% coverage as money is involved for our users.
Virtualize|away has joined #ruby
Virtualize|away has quit [Remote host closed the connection]
<benzrf>
i dont write tests, but then im almost entirely self taught
* agent_white
shrugs
nonnatus has quit [Read error: Connection reset by peer]
<RubyPanther>
Silox|: "They claim to value working software, they really value tons of pointless tests. They claim to value customer collaboration, they really value bleeding clients dry." http://programming-motherfucker.com/
<bleak>
in the ruby pickaxe, section 5.3 there's some code that demonstrates how mixins work across classes. the code seems like it could be streamlined more by defining initialize in the module instead of the classes. is this possible? what would i use?
lukec has quit [Quit: lukec]
aspires has quit [Remote host closed the connection]
nonnatus has joined #ruby
Wolland has joined #ruby
aspires has joined #ruby
cbetta is now known as cbetta_afk
rockdon_ has joined #ruby
aryaching has joined #ruby
venkat has quit [Ping timeout: 245 seconds]
<centrx>
bleak, Try it? :)
cjsarette has joined #ruby
dx7 has joined #ruby
lethjakman has joined #ruby
<lethjakman>
so...when using ruby prof, would I be correct in assuming that Total: is the time in seconds it took to complete something?
aryaching_ has quit [Ping timeout: 245 seconds]
<bleak>
centrx: ha, why didn't i tihnk of that? :p
cbetta_afk is now known as cbetta
<centrx>
lethjakman, Yes
<centrx>
lethjakman, It is the total because it includes all methods that may have been called by that method
<centrx>
lethjakman, self separates the time into how much time is spent in each method, excluding methods that are called within that method
SHyx0rmZ has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
kaichanvong has quit [Quit: _]
maletor has quit [Quit: Computer has gone to sleep.]
dx7 has quit [Ping timeout: 248 seconds]
cbetta is now known as cbetta_afk
i_s has quit [Remote host closed the connection]
<bleak>
seriously though, i'm pretty unused to trying things out to see if they work. i can feel it rewiring my brain
Jdubs has joined #ruby
<RubyPanther>
agent_white: after the ipv6 switchover is complete, it will just mean, old is where the heart is
<lethjakman>
what would Global#[No method] and Kernel#caller be then?
nateberkopec has quit [Quit: Leaving...]
<lethjakman>
each of those took up almost 20 seconds...
<lethjakman>
this is for one rspec...
cashnguns has quit [Ping timeout: 272 seconds]
nateberkopec has joined #ruby
<benzrf>
I'd imagine that Global#[No method] is the full program
fgo has quit [Remote host closed the connection]
<benzrf>
Kernel#caller is caller
tylersmith has quit [Remote host closed the connection]
<agent_white>
RubyPanther: Bahahah! I guess then it will fit perfectly.
<benzrf>
**callstack
<benzrf>
lethjakman: position
<lethjakman>
hmmm....
duggiefr_ has joined #ruby
aryaching has quit [Ping timeout: 253 seconds]
i_s has joined #ruby
enebo has quit [Quit: enebo]
ElComradio has quit [Quit: ElComradio]
<bleak>
in case anyone else was wondering, the answer to my first question was "yes" and the second "define as you would in a standard class" and also it definitely streamlined the code in terms of cutting down repetitious typing
duggiefresh has quit [Ping timeout: 253 seconds]
Jdubs_ has joined #ruby
kaichanvong has joined #ruby
Oog has joined #ruby
<Oog>
is it safe to assume SecureRandom.hex(32) will never return the same value? there are 36^64 posibilitiesright?
Jdubs has quit [Ping timeout: 260 seconds]
iamsean has quit [Quit: iamsean]
<Oog>
silly me SeucreRandom.uuid might be better?
ce_afk is now known as cescalante
i_s has quit [Remote host closed the connection]
<Oog>
eh hex(32) much longer
<Oog>
wait hex is only a-f
<Oog>
16^64... not as good as I was hoping
<bleak>
leaving a chance for the same value to occur could impede user functionality depending on the scale of the project and how the randomizer is implemented
<popl>
Oog: You're talking to yourself. Are you sure you need to be in #ruby? :P
<Oog>
lol
<Oog>
therapy for me
<lethjakman>
he's doing this in two channels.
<lethjakman>
same exact thing.
rezzack has quit [Ping timeout: 252 seconds]
<bnagy>
Oog: 16^64 == 2^4 ^ 64 == 2^256
Yayo has joined #ruby
<bnagy>
that is a Stupid Big number
Jdubs has joined #ruby
RealMarc is now known as Marc
tauebel1 has quit [Quit: Leaving.]
Marc is now known as Guest25279
<agent_white>
Haha reminds me of Workaholics. "I just talk. I just talk to hear myself think. Nobody actually listens to me."
nari has joined #ruby
Loaft has quit [Ping timeout: 252 seconds]
knigitz has quit [Read error: No route to host]
knigitz has joined #ruby
Jdubs_ has quit [Ping timeout: 272 seconds]
kewjo has quit [Quit: WeeChat 0.3.7]
vlad_starkov has quit [Read error: Connection reset by peer]
sawtooth_ has quit [Ping timeout: 246 seconds]
lukec has joined #ruby
BrianJ has joined #ruby
mikepack has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sawtooth has joined #ruby
chrisramon has joined #ruby
aspires has quit []
v0n has joined #ruby
aspires has joined #ruby
nari has quit [Ping timeout: 272 seconds]
shadoi has quit [Quit: Leaving.]
F1skr has quit [Quit: WeeChat 0.4.2]
Megtastique has quit []
LexicalScope has joined #ruby
lethjakman has quit [Ping timeout: 252 seconds]
ClientAlive has joined #ruby
<ClientAlive>
Do ruby gems install gloabally or per application?
<centrx>
If you do gem install, they install globally
<centrx>
See also rvm
aspires has quit []
danshultz has joined #ruby
fgo has joined #ruby
duggiefr_ has quit [Remote host closed the connection]
reset has quit [Ping timeout: 240 seconds]
<ClientAlive>
centrx: Ok, well, I had a certain ruby app that I just removed. I was wondering if there could be unused gems lying around that it had needed but doesn't any longer bc it's removed.
<ClientAlive>
Does it work that way?
duggiefresh has joined #ruby
<bleak>
i think it's generally distinguished between shared dependencies and non-shared when it comes to that. in other words, i doubt it but i'm not 100%
Celm has quit []
<centrx>
ClientAlive, gem list
nateberkopec has quit [Quit: Leaving...]
nfk has quit [Quit: yawn]
chrisramon has quit [Quit: chrisramon]
nanoyak has quit [Quit: Computer has gone to sleep.]
bcz has joined #ruby
<bklane>
I have the following string in an html file " <a href="{{ article.url }}"><h3>{{ article.title }}</h3></a>" yet when use Nokogiri on the text it changes it to "<a href="%7B%7B%20article.url%20%7D%7D"><h3>{{ article.title }}</h3></a>" any idea how to stop that from happening?
<bklane>
Nokogiri parse*
bcz1 has quit [Ping timeout: 265 seconds]
<centrx>
That's not really HTML, it's haml or something
<bklane>
its liquid but regardless how could I stop that from happening
<bklane>
it only touches the brackets when its in quotes
fgo has quit [Remote host closed the connection]
phinfonet has quit [Read error: Connection reset by peer]
<pontiki>
o/
beginner_coder has joined #ruby
brunops has joined #ruby
phinfonet has joined #ruby
<shevy>
pontiki is alive!
<beginner_coder>
Can someone tutor/mentor me one on one.
<beginner_coder>
Hi shevy.
<shevy>
you must write here beginner_coder
<beginner_coder>
I see you all the time.
<shevy>
that's because I am the king of the idlers
<beginner_coder>
shevy alright.
<beginner_coder>
Well, I am just a little confused about classes.
RoxasShadowRS has quit [Read error: Connection reset by peer]
<beginner_coder>
I know that a class is a blueprint for an object.
braincra- has joined #ruby
<beginner_coder>
Objects are created from classes.
<lagweezle>
All hail the idle king! All hail shevy!
<beginner_coder>
What I want to know however is the itty bitty components. I am having trouble creating proper classes.
<shevy>
beginner_coder so far so good
<shevy>
what do you mean
gja has joined #ruby
<bklane>
centrx: do ya know a way to prevent that?
<beginner_coder>
thank you shevy, it's fun learning.
<shevy>
beginner_coder can you create a cat class
<benzrf>
beginner_coder: hello beginner_coder
<beginner_coder>
shevy, I can try. You know what I have an idea. Hello benzrf.
<shevy>
beginner_coder from that cat class you wanna do more cats
<beginner_coder>
Everytime I decide I want to get on my programming mode I come here.
rickruby has quit [Remote host closed the connection]
<shevy>
Tom the cat
<beginner_coder>
shevy right
<benzrf>
beginner_coder: do you ever write several functions that work on the same variables?
<pontiki>
hi shev
<pontiki>
i am alive, somewhat
<pontiki>
so tired
<benzrf>
and then you have to pass the variable in to each?
<shevy>
you chopped off a "y"! :(
<pontiki>
oh sory, that's how tired i am
<lagweezle>
Tommy the cat.. arg.. must resist ..
<shevy>
hehe
<beginner_coder>
See that's the thing. I don't know how to manage instance variables, global variables. It's so confusing. Local variables
<benzrf>
this is the purpose of objects
rickruby has joined #ruby
<pontiki>
can't even be arsed to hit the tab key
rljohnsn has quit [Quit: Leaving.]
<benzrf>
beginner_coder: local vars live in a method call
<shevy>
beginner_coder no, ignore benzrf, he has been doing too much haskell
vlad_starkov has joined #ruby
<benzrf>
beginner_coder: instance vars live in an object
<bnagy>
YAY Trollpants McTrolligan!
<pontiki>
"shevy".chop!
<shevy>
beginner_coder make a cat class
<shevy>
beginner_coder the simplest cat class you can think of
<beginner_coder>
ok here is what I am going to do.
<lagweezle>
mew
<pontiki>
man, it sounds like you're guys are singing a song
<shevy>
pontiki is tired AND drunk :(
<beginner_coder>
I will attempt, repeat attempt to make a cat class to the best of my ability on eval.in.
<beginner_coder>
Then I will paste the link, thanks for helping everyone.
<shevy>
:\
<benzrf>
beginner_coder: a class just lists what methods an object should have
<benzrf>
beginner_coder: that is all it is
<beginner_coder>
really?
<beginner_coder>
wow
<benzrf>
well it can also store constants
<pontiki>
♫ beginner_coder, local vars live in a method / beginner_coder, instance vars live in an object / beginner_coder, you'll find your way ♫
braincrash has quit [Ping timeout: 269 seconds]
<shevy>
beginner_coder you are too slow
<benzrf>
but the main point of a class is /usually/ to list the methods in a hypothetical object
<pontiki>
aww shevy if i had alcohol on board right now i'd probably be passed out on the floor
<shevy>
pontiki \o/
<bnagy>
pontiki: how's that cough medicine and vodka working for you?
<beginner_coder>
I am slow, great. I mean I am young, I am 16 learning programming. 97 percent of the kids in my school dont know what it is.
<benzrf>
beginner_coder: any particular bit of code is being run 'inside of' some object
<benzrf>
beginner_coder: i am 16 too :)
<shevy>
beginner_coder that's benzrf's age
<beginner_coder>
:O
<beginner_coder>
WOW
<beginner_coder>
WOW
<beginner_coder>
Hello peers.
<shevy>
beginner_coder the thing is you write too much what you are going to do rather than doing that!
<popl>
ffs
popl has left #ruby [#ruby]
<bleak>
class Cat { } ; felix = Cat.new(loud)
lfox has joined #ruby
<benzrf>
bleak: bad syntax
<shevy>
ok bleak is out
<shevy>
NEXT!
<bleak>
yeah
<shevy>
beginner_coder your try now
<benzrf>
beginner_coder: when you say '@foo = something', that variable belongs to the object you are currently inside of
<bleak>
i wrote up a more complicated cat class with initialize but then stripped it but not what it called :(
<shevy>
and btw why is it felix??? :(
<beginner_coder>
why does everyone say foo, what's foo?
<benzrf>
beginner_coder: so if you look up @foo from inside that object again it will be the same as you left it
<bleak>
felix the cat!
<benzrf>
beginner_coder: foo is a metasyntactic variable
<pontiki>
♫ i love you lack of self respect / when you are passed out on the deck ♫
<benzrf>
beginner_coder: which is an overly compilcated word
<shevy>
beginner_coder look: class Cat; @colour = 'black'; end; tom = Cat.new <-- why is this bad
DrShoggoth has quit [Max SendQ exceeded]
<benzrf>
shevy: you spelled color wrong
<beginner_coder>
shevy thats bad because if a class is a blueprint for an object
<beginner_coder>
thats like a mutation for every cat lol
<beginner_coder>
Am I right sort of, that's how I look at it.
tyl_ has quit [Quit: Computer has gone to sleep.]
<shevy>
beginner_coder it is more subtle than that
flori has quit [Ping timeout: 252 seconds]
finleye has joined #ruby
<shevy>
beginner_coder remember what benzrf told you about methods before
flori has joined #ruby
DrShoggoth has joined #ruby
<beginner_coder>
i don't know then, I don't think anything is wrong with the class then. Is it the syntax.
<benzrf>
beginner_coder: to be precise @colour is being set inside the class definition
<benzrf>
beginner_coder: so @colour belongs to the class itself
<shevy>
<benzrf> def foo
<shevy>
<benzrf> @a = 3
<shevy>
<benzrf> end
<shevy>
<benzrf> ^@a will stick around until the object that method is in goes away
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<shevy>
<benzrf> I'm such a hipster
freerobby has joined #ruby
dkamioka has quit [Remote host closed the connection]
tyl has joined #ruby
<benzrf>
beginner_coder: code in a class block is run as though it were in a method on that class
<shevy>
beginner_coder well the syntax would be valid, but notice where the instance variable is placed
<benzrf>
beginner_coder: that is to say, instance vars you set in a class block will be on the class
<shevy>
and in benzrf's example, he put it into a method
<benzrf>
beginner_coder: method calls will be to the class
<benzrf>
beginner_coder: self will be the __class__
<benzrf>
*class
<Cooler_>
hello
<shevy>
beginner_coder when you call .new you will call .allocate and then .initialize (I think). and initialize you can define on your own to pass arguments to .new()
<Cooler_>
good nite
<shevy>
so to take the epic cat class again
<Cooler_>
so i need help on problem
<beginner_coder>
Alrighty.
<Cooler_>
i have one var
<benzrf>
Cooler_: what is this problem with which you need help
tyl has quit [Client Quit]
<beginner_coder>
A lot of info but I think I can handle it.
<Cooler_>
when i use "var.inspect"
<shevy>
>> class Cat; def initialize(colour_of_fur = 'green'); @colour = colour_of_fur;end;end; tom = Cat.new 'black'; p tom
<bklane>
I have a string of html body text with markup (liquid) in which I need to grab and replace a div and its contents. What would be the best way to do that?
<pontiki>
beginner_coder: fix line 3 first
<beginner_coder>
uh oh it's something I did right.
cashnguns has joined #ruby
griffindy has joined #ruby
cescalante is now known as ce_afk
<beginner_coder>
did I spell instantiate wrong or something
nonnatus has left #ruby ["Leaving"]
<benzrf>
bklane: how about nokogiri?
<benzrf>
wait
<benzrf>
bklane: what exactly do you mean?
<benzrf>
using liquid?
jpstokes has quit [Remote host closed the connection]
<benzrf>
is the html fully rendered at this point?
<bklane>
another language like erb
<bklane>
shopify uses it..thus I can't use nokogiri :(
<beginner_coder>
how programming is used in the real world, purposes meaningful etc.
ckinni has joined #ruby
<beginner_coder>
I know one example is like bank accounts but with ruby, forget about it.
ckinni has quit [Max SendQ exceeded]
<benzrf>
hmm
phinfonet has quit [Quit: exitiing]
<lagweezle>
Meaningful? I guess that rules out facebook...
<beginner_coder>
I don't know if it would actually work idk but I want another example.
<benzrf>
in general, when you have a group of methods that operate on a particular set of data or variables
<benzrf>
you store those variables as ivars in an object
<benzrf>
then put the methods on that object
ckinni has joined #ruby
<bnagy>
slowcon: suitable for a patient intermediate that can google
<beginner_coder>
lagweezle explain what you mean by facebook
LadyRainicorn has quit [Ping timeout: 264 seconds]
ckinni has quit [Max SendQ exceeded]
<benzrf>
this lets methods have namespaces to themselves to store the data they need without polluting the rest of your program
<bnagy>
slowcon: it has a lot of moving parts, but nothing hard per se
DrShoggoth has joined #ruby
ckinni has joined #ruby
<lagweezle>
beginner_coder: facebook.com is an example of realworld applications of programming; the site itself, as well as all the stupid games on it.
Hobogrammer has quit [Ping timeout: 260 seconds]
<lagweezle>
The facebook site is PHP and C code.
subbyyy_ has quit [Ping timeout: 264 seconds]
<benzrf>
beginner_coder: for example, you might make a class to represent a user on a website
<benzrf>
you have a group of methods that access the same data (i.e. username, rank, whatever)
<benzrf>
so you bundle them into an object
fedesilva has joined #ruby
DrShoggoth has quit [Max SendQ exceeded]
<beginner_coder>
benzrf, great example. Thank you very much.
ckinni has quit [Client Quit]
<benzrf>
np :)
CJD14 has joined #ruby
ckinni has joined #ruby
<beginner_coder>
Ok I have one more curious question then back to programming for me.
ckinni has quit [Max SendQ exceeded]
<beginner_coder>
Now if you don't want to answer this I respect that and I also want to say that I have no bad intents.
<benzrf>
go on..
ckinni has joined #ruby
<nonnatus>
slowcon, I agree with lagweezle, if you have a solid, basic understanding of Ruby and can learn as you go, go ahead with it
<beginner_coder>
I found out that viruses are made from code, like how is that possible. A programming language has so much functions how does a hacker make a program like so???
<slowcon>
I'm not that good in ruby, but I've done some work
hobodave has joined #ruby
<benzrf>
huh?
<slowcon>
nonnatus:
fgo has joined #ruby
<benzrf>
what do you mean?
Hobogrammer has joined #ruby
<beginner_coder>
Like can you tell me an example of how a user writes code to destroy like a computer. Now I don't want you to think I am trying to hack cause I want to better the world but.
<mnemon>
beginner_coder: they just write a program that does malicious things.
<pontiki>
"destroy like a computer" -- what does that mean?
<beginner_coder>
Like does the hacker use a bunch of statements like how does it go down. Can you make a virus with like 10 lines of code or 4000?
fgo has quit [Read error: No route to host]
<lagweezle>
Yes to both.
<benzrf>
well, if you can get your program to be run on somebody's computer, you can do anything you can do with any other program
yfeldblum has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
<benzrf>
you could use up a ton of memory for example
<beginner_coder>
I don't know, isn't that what viruses do. I am just saying a hypothetical thing
<benzrf>
or you could delete files
<benzrf>
or make popups
fgo has joined #ruby
<pontiki>
the interesting part of writing virii and malware is the damage you can cause with them
<lagweezle>
The simplest, for example, would be a small loop that writes zero, starting at the first spot on a hard drive, looping until it fills the entire hard drive with a zero.
<pontiki>
it is figuring out how it infest, inject, and spread them
<RubyPanther>
beginner_coder: viruses just exploit bugs in software, programmer mistakes, it has nothing to di with the language or whatever. Look up "buffer overflow"
<lagweezle>
Obviously ... yeah. Getting it to spread is the hard bit.
danshultz has quit [Remote host closed the connection]
<lagweezle>
The nuke-hard drive one wouldn't spread terribly well.
standyro2 has quit [Ping timeout: 245 seconds]
<slowcon>
nonnatus: if you know any other languages, do you think it would be better suited for one
gja has quit [Quit: This computer has gone to sleep]
<bnagy>
depends if you spread before or after
<beginner_coder>
lagweezle. like can you write a program in ruby to do that?
<lagweezle>
I suspect so, but it probably isn't the best language choice to do it in.
<dorei>
i'm pretty sure that one could code a forkbomb in ruby xD
<pontiki>
probably not
<beginner_coder>
Sorry what I mean is that does ruby have the capabilities to do stuff like that
<pontiki>
actully
<bnagy>
you could, but it would be a bit dumb because you would have to inject the runtime everywhere
<pontiki>
because ruby needs an ecosystem to run in
<beginner_coder>
lagweezle I had a feeling. You would use something strong like C++ right
<benzrf>
beginner_coder: try running 'fork while fork' on your computer if you want to see an example of what your programs should not do
<beginner_coder>
Does it have to do wth binary and stuff.
<benzrf>
beginner_coder: C++ is a cruddy language
<pontiki>
no, agent_white. go ahead
<pontiki>
hmm
<benzrf>
they took everything they could think of and threw half-baked versions all together
<benzrf>
and glued them to ckinni
<benzrf>
*C
<dorei>
beginner_coder: we could say that all languages are equivelant on what they can achive, they differ on how they achive it
<pontiki>
i never feel right answering a negative question with a negative and a positive.
<lagweezle>
I'd go with C rather than C++. Basically, a language that makes it 'easy' to do low level system operations is a good choice.
<dorei>
or python xD
<bnagy>
there's plenty of professional malware written in HLLs
kenneth has quit [Quit: kenneth]
<RubyPanther>
For example there are old rails versions with SQL injection bugs, but you couldn't turn that into a virus unless some idiot ran the db with permissions to access the app. unix permissions prevent most of that.
<bleak>
i used to have a virus that would load itself into memory and overwrite a tiny portion of code in each program that was running. it was kind of amazing when i figured out what was happening and why
<bnagy>
cause the runtimes aren't that big, so it's not a huge deal to ship them around
estebistec has quit [Remote host closed the connection]
<bleak>
because it wouldn't cause programs to outright stop working most of the time
<dorei>
or maybe a small lisp machine that u inject into your victims computer xD
heidi has quit [Quit: Leaving.]
<beginner_coder>
cause like my teacher who used to be a programmer told me that C++ you can write powerful programs to manipulate data deep in the hardware idk
<beginner_coder>
I will read up on i
havenwood has joined #ruby
<beginner_coder>
it*
<mnemon>
bnagy: but they usually include some low level components for the actual infection/exploitation/whatever
<benzrf>
C++ can access the hardware better than ruby beginner_coder
<benzrf>
but no better than C
ckinni_ has joined #ruby
ckinni_ has quit [Client Quit]
<nonnatus>
slowcon: If you know enough to fix whatever issues you run into by reading blog articles or StackOverflow, then you've got enough of an understanding to go for it
<bnagy>
you can 'manipulate data deep in the hardware' with ruby just fine
krisbulman is now known as [krisbulman]
<dorei>
benzrf: i'm pretty sure that ruby using FFI can access hardware the same way
<bnagy>
I do kernel stuff in ruby
<beginner_coder>
benzrf is it like there are functions in C designed for you to get in the hardware deep?
<nonnatus>
I dont know any other languages, btw
<beginner_coder>
I don't know what I am talking about but I am just asking.
<dorei>
bnagy: there are tools to do kernel stuff in haskell xD
fgo has quit [Remote host closed the connection]
Dude007 has joined #ruby
<beginner_coder>
What can I do with ruby anyway is my last question.
<beginner_coder>
mnemon, What I want to know is that how can I make an application for myself using ruby and like make a GUI and stuff. How does that work, is that graphics and stuff and how do you connect the programming with the GUI?
<RubyPanther>
Good bot, no virus :)
<beginner_coder>
What is a script.
angusigu1ss has quit [Ping timeout: 240 seconds]
<benzrf>
beginner_coder: 'script' usually refers to a program meant to automate a task
Lewix has joined #ruby
sdwrage has joined #ruby
<benzrf>
or a single-task program
troyready has quit [Read error: Operation timed out]
<RubyPanther>
a "script" is software that is run in source form, such as a Ruby, Perl, or bash program
<benzrf>
it's a loose term
<lagweezle>
beginner_coder: GUI as in, web page, or a "native" application?
<benzrf>
i usually use it to mean a smallish, self-contained program that serves a single purpose
<benzrf>
often automation
<RubyPanther>
Generally a compiled binary program that does that same thing would not be a "script."
<beginner_coder>
Ok I have a great example.
<beginner_coder>
I am using google chrome as we chat.
<benzrf>
yeah
<mnemon>
beginner_coder: easiest way is to use some GUI toolkits like http://shoesrb.com/ or qt or something ... can't really recommend any since i haven't used any in ages.
nonconvergent has joined #ruby
Megtastique has joined #ruby
<beginner_coder>
The browser has a GUI right, the refresh button, search engine etc right?
<RubyPanther>
beginner_coder: So the way to get a virus to you would be to social engineer you into installing my kewl new chrome extension ;)
aryaching has joined #ruby
Dude007 has quit [Ping timeout: 252 seconds]
<beginner_coder>
I dont want to make viruses and stuff it was a question.
<beginner_coder>
Nty
<lagweezle>
good answer ;)
<beginner_coder>
Anyway like I was saying, how do you connect the GUI to your programming.
<benzrf>
yes it will throw them off your tracks
<benzrf>
beginner_coder: you call into functions from a library for making a gui
<mnemon>
beginner_coder: if you want to make a browser, you can use some gui lib like the one i meantioned, or you could write a webpage to use as a gui.
<beginner_coder>
Ok I have a good one. I want to make a video game. Do you think it's possible for me to make by myself as a youngling successfully?
<bnagy>
in general? Yes. You? no.
<beginner_coder>
I know it's going to be a lot of shit I have to know, a lot of work but I want to learn the functions and stuff and know how to do it.
jgrevich has joined #ruby
vlad_starkov has joined #ruby
<benzrf>
beginner_coder: depends on how complex it is
<lagweezle>
Hmm.
<benzrf>
beginner_coder: i like Gosu
<mnemon>
beginner_coder: depends what you call a "video game" ;)
<beginner_coder>
I want to make a 3d video game I guess I don't know.
<mnemon>
then no.
<beginner_coder>
I guess something simple a 2d game I think.
<benzrf>
3d is much much harder than 2d
eka has quit [Quit: Computer has gone to sleep.]
<benzrf>
likw
<benzrf>
*like
jbueza has joined #ruby
<benzrf>
by an order of magnitude
heidi has joined #ruby
<lagweezle>
Hmm.
* lagweezle
goes hunting.
<bnagy>
by like a whole dimension
<RubyPanther>
_why talked about writing a stickman fencing game in JS on the bus, and how it led to opportunity to teach curious kids some programming. In an explanation about what a "freelance professor" is
heidi has quit [Client Quit]
* lagweezle
facepalms at bnagy
<benzrf>
i thought _why hated js
<mnemon>
beginner_coder: could make something like minesweeper or tic-tac-toe in few days/week maybe even if you don't really know programming but are reasonably good at the basics.
<RubyPanther>
maybe it wasn't JS then, my old addled brain doesn't remember details, only where to look them up
<beginner_coder>
loool wut
<beginner_coder>
I guess..
<beginner_coder>
I was thinking maybe something like lost saga lol.
<mnemon>
beginner_coder: there's a lot of frameworks/tools that make it much easier than writing it with generic gui libs but you usually still need to be reasonably good at programming.
aryaching has quit [Quit: sayonara! ^_^]
Megtastique has joined #ruby
yfeldblum has joined #ruby
<beginner_coder>
ok
aryaching has joined #ruby
<lagweezle>
... and have a high tolerance of frustration ...
<benzrf>
:D
<lagweezle>
er, for ...
<beginner_coder>
thanks for answer my questions everyone. I thought you guys were going to shoo me off cause I don't know anything.
<benzrf>
u kiddin
<benzrf>
they say that MINASWAN
<beginner_coder>
Now I have some more knowledge I am going to learn more programming.
<beginner_coder>
By the way, what have you guys done with your programming skills ever since you guys learned ruby or whatever language you're good with?
fgo has quit [Remote host closed the connection]
nonnatus has quit [Ping timeout: 245 seconds]
<benzrf>
beginner_coder: ive made a few websites
zz_anildigital is now known as anildigital
<benzrf>
ive written programs to make my life easier
<beginner_coder>
in javascript or rails?
<benzrf>
neither
<benzrf>
;p
<benzrf>
sinatra
<benzrf>
i've also used flask in python
<beginner_coder>
sinatra, what the hell is that.
<benzrf>
minimal, unlike bloated rails
<beginner_coder>
See I don't know what the hell these things are.
<benzrf>
i wrote a bot to automatically moderate a subreddit
<RubyPanther>
"I'm trying to rid the world of people like me... we'll make a breakthrough at some point"
<benzrf>
ive dicked around with data n shit
<benzrf>
written a few useless but fun programs
<beginner_coder>
benzrf Can I see your websites please.
mercwithamouth has quit [Ping timeout: 264 seconds]
sepp2k has quit [Read error: Connection reset by peer]
<benzrf>
the code is on github but it is not so great
<mnemon>
breaking software is always more fun than making it ;)
yfeldblum has quit [Ping timeout: 252 seconds]
<benzrf>
I made http://ros.benzrf.com/ in python to showcase how incredibly awful reddit is
<bnagy>
yeah but it gets harder every year :<
<mnemon>
yeah :(
<RubyPanther>
it was a train not a bus, but it was JS... watching it now
<dorei>
no more sql injections / rfi / lfi bugs? xD
<bnagy>
used to be you could sneeze at stuff and it would die
<bnagy>
dorei: not my field, I just do mem corruption
<lagweezle>
beginner_coder: I'm employed as QA / SDET right now.
[krisbulman] is now known as krisbulman
<beginner_coder>
benzrf lol at your websites
<benzrf>
which onewheelskyward ?
<benzrf>
*one
<beginner_coder>
lagweezle, cool.
<beginner_coder>
lagweezle can you tell me a bit about your job and what you do?
<mnemon>
to be fair, i haven't really done much in years apart from breaking some random pieces of software some incompetent coworkers wrote ... breaking anything widely used is too tedious without good automation which i'm too lazy to make :/
burlyscudd has joined #ruby
jgrevich has quit [Quit: jgrevich]
nanoyak has joined #ruby
<beginner_coder>
I heard coding gets you a lot of money.
<beginner_coder>
I heard.
<mnemon>
it does if you're good at it
<benzrf>
beginner_coder: i was working on an engine thingy for 2d zelda-type games but then somebody pointed me at a thing called 'Zelda Classic' so i stopped working on it
<bnagy>
mnemon: all about the toolchain
<slowcon>
nonnatus: i wrote the script in something called iMacros. its an extension for web browsers. I can't get it to do everything i want it to do though. I was thinking of trying out ruby
<benzrf>
as it is you can write about 40 lines frontend to get a simple walking-around with sprites that turn when you move and block collision
<benzrf>
meh
bricker`LA has joined #ruby
<mnemon>
bnagy: so i hear :) what kind of stuff do you do?
<bnagy>
mnemon: having said that, though, you could write a fuzzer that will find office bugs for sure, just on a single host, andthat's pretty widely used
<benzrf>
beginner_coder: i often use the codes to analyze stuf
<benzrf>
f
<dorei>
i've coded a silly server that listens for connections/messages from certain gps devices and then dump those message into a db according to their type
<bnagy>
just that your chances of finding _good_ bugs are pretty low
<dorei>
i think it's the only thing i've ever finished xD
<benzrf>
beginner_coder: like pulling links off of a website and then counting how many are outgoing
<benzrf>
type of thing
<beginner_coder>
mhm
<beginner_coder>
cool cool
alvaro_o has joined #ruby
<RubyPanther>
coding does not "get you money." That is a myth.
<lagweezle>
One of the more recent shinies is some python code that runs selenium to log in on a web site. This is run against about 50-60 different sites to make sure the log in for our companies stuff works on the partners site.
<beginner_coder>
I am into learning the deep mechanics of the computer such as the binary and how programming interacts deep internally. I want to know the languages but I also want to learn about that stuff too.
<benzrf>
beginner_coder: learn some asm
<lagweezle>
Selenium is a browser ... API I guess is a decent name for it.
<benzrf>
beginner_coder: then some C
<beginner_coder>
lgweezle very nice
<bnagy>
beginner_coder: there's a good CTF at the moment, called uctf
<lagweezle>
Aye! Scored some major points with manglement! :)
<agent_white>
I am excited to learn C. But I want to be really good at Ruby first.
<dorei>
beginner_coder: let me find you an excelent tutorial on x86 asm
<beginner_coder>
wth is CTF
<bnagy>
it's hard, though
<benzrf>
beginner_coder: ultimately it is the cpu pulling bytes from memory and executing them
<benzrf>
beginner_coder: where you try to exploit a deliberately created security hole
<beginner_coder>
I want to get good at ruby too.
<benzrf>
beginner_coder: you cant do everything at once ;)
<bleak>
i don't think i could go from ruby to C
<RubyPanther>
Computers are not binary, they are at a minimum 8 bit, but generally a mix of 32 and 64 bit. Computer memory is binary. But the computer cannot even address a single bit, so how can it be binary? Even if you flip 1 bit, the computer has to juggle 32 bits, because it is base 32 not base 2
<benzrf>
but I know how youre feelin
<bnagy>
advantage being that it's based on a really simple chip and simple asm
<benzrf>
beginner_coder: that feeling of being in a vast world of interesting complicated ideas
<bnagy>
so it's a lot easier to get started with the low level stuff
<benzrf>
beginner_coder: and there being too many that you want to understand at once
jgrevich has joined #ruby
<RubyPanther>
Even writing code for a PIC in ASM is going to be at least base 8
<beginner_coder>
wah
<mnemon>
bnagy: you can write a fuzzer that finds a bunch of bugs and then get foiled by aslr, dep or sandboxing or whatever these days :P
<beginner_coder>
base 8 PIC must research!
<beginner_coder>
I feel like a script kiddy
<benzrf>
beginner_coder: :)
<bnagy>
mnemon: yeah I don't do exploits anymore, I just find bugs
<ddd>
TIL and there being too many that you want to understand at once and there being too many that you want to understand at once. BINGO!
<benzrf>
beginner_coder: assembly is basically a thin english-ish layer over actual bytes understood by your chip
alvaro_o has quit [Client Quit]
<bnagy>
it's super target specialised now
<benzrf>
beginner_coder: if you learn asm, you will gain a decent understanding of how the hardware functions
<agent_white>
bnagy: metasploit all the things
<ddd>
think that is the single best statement i've read in a long .long. time
<benzrf>
beginner_coder: well, not how it functions
<benzrf>
beginner_coder: but what it does
<benzrf>
ddd: u srs m8?
<bnagy>
agent_white: metasploit is for kids
<agent_white>
I still have "The Art of Exploitation" on my shelf... still have yet to read it since I picked it up some 8+ years ago when I was a skiddie :(
<benzrf>
ddd: they say i have a way with words
<ddd>
benzrf I meant the two statements combined.
<agent_white>
bnagy: That's the joke ;)
<benzrf>
:y
<beginner_coder>
benzrf ty
<ddd>
(my c&p seems to have failed)
<beginner_coder>
AZM
<ddd>
that feeling of being in a vast world of interesting complicated ideas
m104 has joined #ruby
<ddd>
those two
m104 has quit [Max SendQ exceeded]
<dorei>
u need no skillz for rfi exploits xD
<benzrf>
:)
<beginner_coder>
can I get a link to azm, im new and don't know what the hell it is.
<benzrf>
beginner_coder: asm is assembly language
m104 has joined #ruby
<RubyPanther>
You could easily buy a PIC beginner kit and program it to be susceptible to a virus
m104 has quit [Max SendQ exceeded]
<benzrf>
beginner_coder: it's basically just the basic instructions your cpu understands, but dressed up in names instead of numbers
lukec has joined #ruby
<lagweezle>
rfi = ?
<beginner_coder>
Wait learn assembly????? Are you bannanas? I can't learn that!!! I think that's hard right lol. Do you know some assembly???
tylersmith has joined #ruby
<benzrf>
beginner_coder: since it's a thin wrapper around your cpu, that means that different kinds of CPUs have different assembly langs
<benzrf>
beginner_coder: ARM assembly != x86 assembly
<lagweezle>
Assembly is easy. Doing anything with it is hard.
<lagweezle>
There are generally less than 30 different operations that can be done in a given assembly language.
<RubyPanther>
beginner_coder: I learned ASM for the Apple ][ in 8th grade. The only reason I waited so long, nobody told me about anything but BASIC in 6th grade
<bnagy>
HAHAHAH
angusigu1ss has joined #ruby
<bnagy>
HAH
<bnagy>
which assembly? :D
<dorei>
beginner_coder: also, if u're into reverse engineering (like bypassing registration on shareware apps, etc) there are some excelent ollydbg tutorials
<RubyPanther>
We didn't have internet to ask, I only could ask the bozos on the local dialup BBS... 4 lines... so 3 random people. Takes years of that to meet anybody that talks about code
<RubyPanther>
true story: when I was 13 I owned a dumb terminal and a 300 baud modem
neruda has joined #ruby
<RubyPanther>
online chat was only a few AT commands away
<dorei>
i've forgot all the AT commands i once knew :(
<pontiki>
lucky you
krisbulman is now known as [krisbulman]
<benzrf>
man i kinda wanna try out a teletype running old skool unix someday
<mnemon>
bnagy: if you just count the mnemonics it ain't that much ... or forget that 8086 has a few extensions nowadays ;)
<pontiki>
when i was 13 i had to type out my programs on a tty33
<benzrf>
if only to remind me how nice kilobytes-per-second terminals are
<pontiki>
teletypes don't run anything
<beginner_coder>
What are regular expressions in Ruby?
<dorei>
i still remember z80 opcodes and some of their hex represantation
<beginner_coder>
can someone break down for me and explain please.
<benzrf>
beginner_coder: regexes are a notation for describing the 'shape' of a string
<benzrf>
beginner_coder: for example
<benzrf>
beginner_coder: how would /you/ describe what a telephone number looks like
<benzrf>
w/ area code
<beginner_coder>
I don't know.
<benzrf>
;p
<benzrf>
in englis
<benzrf>
h
<benzrf>
i mean
<beginner_coder>
718-222-6937?
jgrevich has quit [Quit: jgrevich]
<benzrf>
ok, that's an example
<benzrf>
whatever
<beginner_coder>
dont call me
<benzrf>
the point is, you can write something like this:
<benzrf>
\d{3}-\d{3}-\d{4}
thesheff17 has joined #ruby
<beginner_coder>
what is that wuut
<benzrf>
^that means, 3 digits, then a dash, then 3 digits, then a dash, then 4 digits
linojon has quit [Quit: linojon]
<benzrf>
so you can then check if a string matches that description
zeade has joined #ruby
jgrevich has joined #ruby
mikepack has quit [Remote host closed the connection]
<benzrf>
to see if a phone number is valid
<RubyPanther>
I didn't have any memory, or printer, I had to write my code on lined paper and then type it in at school. Graphics were made by filling in squares on graph paper, and then transcribing the location of each pixel
<benzrf>
you can also pull bits out of a string by finding the part that matches the regex
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
<dorei>
RubyPanther: no logo and turtle movements?
cescalante is now known as ce_afk
mikepack has joined #ruby
<bnagy>
mmm logo
<RubyPanther>
dorei: I did first learn logo, that is true, but I did not actually use it past "hello world"
yfeldblum has joined #ruby
simplyaubs has joined #ruby
<RubyPanther>
I did do the full hello world that took keyboard input though
<benzrf>
ive never actually used logo >_>
gener1c has quit [Ping timeout: 245 seconds]
<beginner_coder>
interesting
browndawg has joined #ruby
braincra- has quit [Quit: bye bye]
gener1c has joined #ruby
<mnemon>
i had a 486 by the time i was actually able to understand what i was typing in ... then got ruined by basic ;)
<benzrf>
the first language i learned was BASIC
<dorei>
benatkin: what was your first computer?
_maes_ has joined #ruby
<benzrf>
dorei: assuming @me
<dorei>
lol, yes
<benzrf>
i think it had like windows 98 or something
<RubyPanther>
I showed up at a bar with a laptop one night, and as soon as I opened it my bartender says, "working, eh?" I've always wondered how he knew
zeade has quit [Quit: Leaving.]
aryaching has quit [Ping timeout: 240 seconds]
<agent_white>
The whiskey is always a dead giveaway.
yacks has quit [Quit: Leaving]
tagrudev has joined #ruby
angusigu1ss has joined #ruby
<RubyPanther>
no it was my usual vodka/tonic
atraylen has joined #ruby
OdNairy has joined #ruby
lemonsparrow has joined #ruby
amclain has joined #ruby
aryaching_ has quit [Ping timeout: 248 seconds]
daxroc has joined #ruby
cj3kim has joined #ruby
apeiros_ has joined #ruby
angusigu1ss has quit [Ping timeout: 252 seconds]
apeiros has quit [Read error: Connection reset by peer]
mansi has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
m104 has quit [Quit: bye]
relix has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
Hobogrammer has joined #ruby
jackneill has joined #ruby
dx7 has joined #ruby
phipes has joined #ruby
fgo has joined #ruby
phipes_ has joined #ruby
phipes has quit [Read error: Connection reset by peer]
Jdubs has joined #ruby
coder_neo has joined #ruby
coder_neo has quit [Client Quit]
dx7 has quit [Ping timeout: 245 seconds]
fgo has quit [Ping timeout: 252 seconds]
apeiros_ has quit [Remote host closed the connection]
funburn has quit [Quit: funburn]
yacks has joined #ruby
daxroc has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
daxroc has joined #ruby
w4pm has joined #ruby
fgo has joined #ruby
Lewix has quit [Quit: Leaving...]
Es0teric has quit [Quit: Computer has gone to sleep.]
noop has joined #ruby
apeiros has quit [Ping timeout: 248 seconds]
IceDragon has quit [Quit: Space~~~]
w4pm has quit [Ping timeout: 245 seconds]
marcgg has joined #ruby
wallerdev has quit [Quit: wallerdev]
marcgg_ has quit [Ping timeout: 252 seconds]
roolo has joined #ruby
user258467 has joined #ruby
carlyle has joined #ruby
shadoi has quit [Quit: Leaving.]
robbyoconnor has joined #ruby
jamto11 has quit [Remote host closed the connection]
sparrovv has quit [Remote host closed the connection]
eka has joined #ruby
einarj has joined #ruby
rm_ has quit [Ping timeout: 272 seconds]
dx7 has joined #ruby
bleak has joined #ruby
timonv_ has quit [Remote host closed the connection]
lemonsparrow has quit [Ping timeout: 245 seconds]
_tpavel has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
<apeiros>
Lewix: eh? why not just 0.step(48*3, 9).to_a
claymore has joined #ruby
<apeiros>
or if you want to stick with 50 as input: 0.step((50 - 50%3)*3, 9).to_a
dx7 has quit [Ping timeout: 265 seconds]
lethjakman has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
mansi has joined #ruby
ahawkins has quit [Quit: Lost terminal]
relix has joined #ruby
clemtine has joined #ruby
ahawkins has joined #ruby
olivier_bk has joined #ruby
zz_anildigital is now known as anildigital
poulson has joined #ruby
obs has joined #ruby
cj3kim has quit [Remote host closed the connection]
daxroc has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
troessner has joined #ruby
lemonsparrow has joined #ruby
rickruby has joined #ruby
bricker`LA has quit [Ping timeout: 252 seconds]
wildroman2 has joined #ruby
daxroc has quit [Ping timeout: 252 seconds]
lxsameer has joined #ruby
bricker`LA has joined #ruby
arctaruz has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
daxroc has joined #ruby
<Lewix>
apeiros: because I'm not trying to encrypt my code
tjad has joined #ruby
tvw has joined #ruby
rickruby has quit [Ping timeout: 264 seconds]
<apeiros>
you seriously thin two loops are less cryptic than one iteration?
<apeiros>
ok then
Wolland has quit [Remote host closed the connection]
nvrch has joined #ruby
w4pm has joined #ruby
fgo has joined #ruby
phansch has joined #ruby
mikecmpbll has joined #ruby
Al__ has joined #ruby
Elhu has joined #ruby
drumusician has joined #ruby
mojjojo has joined #ruby
w4pm has quit [Ping timeout: 272 seconds]
fgo has quit [Ping timeout: 240 seconds]
S0da has joined #ruby
yfeldblum has joined #ruby
carlyle has joined #ruby
gittish has joined #ruby
adeponte has quit [Remote host closed the connection]
DaniG2k has joined #ruby
bricker`LA has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
<DefV>
4
roolo has joined #ruby
carlyle has quit [Ping timeout: 240 seconds]
krz has joined #ruby
vlad_starkov has joined #ruby
dangerousdave has joined #ruby
francisfish has joined #ruby
krz has quit [Read error: Connection reset by peer]
marr has joined #ruby
kenneth has joined #ruby
tskogberg has quit [Quit: leaving]
JasmeetQA1 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
JasmeetQA has quit [Ping timeout: 272 seconds]
jamto11 has joined #ruby
Mon_Ouie has joined #ruby
rootshift has joined #ruby
jamto11 has quit [Ping timeout: 252 seconds]
dseitz has joined #ruby
dkamioka has quit [Remote host closed the connection]
Xeago has joined #ruby
tskogberg has joined #ruby
wildroman2 has joined #ruby
krz has joined #ruby
enzo has quit [Quit: Konversation terminated!]
timonv has joined #ruby
stef_204 has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
Shidash has quit [Ping timeout: 252 seconds]
aspiers has joined #ruby
timonv_ has joined #ruby
joko has joined #ruby
nari has quit [Ping timeout: 245 seconds]
amritanshu_RnD has joined #ruby
sparrovv has joined #ruby
<joko>
Hello, is anyone familiar with puma? I'm trying to setup a systemd service / socket, so that it runs behind an nginx proxy. I couldn't find any information by googling
amritanshu_RnD is now known as Guest6335
tyl has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
tjad has quit [Ping timeout: 240 seconds]
lessless_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
mukarromahcahcom has quit [Read error: Connection reset by peer]
<lessless_>
drPoggs, seems to work :)
stef_204 has joined #ruby
adeponte has joined #ruby
stef_204 has quit [Client Quit]
krz has quit [Read error: Connection reset by peer]
ace_striker has quit [Ping timeout: 245 seconds]
zipper{-_-} is now known as UnixDad
phipes has quit [Remote host closed the connection]
ace_striker has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
ace_striker is now known as Guest97284
Guest97284 has quit [Client Quit]
cj3kim has joined #ruby
klaut has joined #ruby
ace_striker__ has joined #ruby
<apeiros>
drPoggs: colon before keyname makes it a symbol
<apeiros>
lessless_: maybe yaml doesn't like your inline array?
fgo has joined #ruby
Advocation has joined #ruby
<drPoggs>
apeiros: I didn't think that was a thing in YAML :\
<apeiros>
drPoggs: TYL ;-)
chaos_ has joined #ruby
wildroman2 has quit [Remote host closed the connection]
stef_204 has joined #ruby
chaos_ is now known as soahccc
cj3kim has quit [Ping timeout: 252 seconds]
fgo has quit [Ping timeout: 248 seconds]
timonv_ has quit [Remote host closed the connection]
carlyle has joined #ruby
gja has joined #ruby
browndawg has quit [Ping timeout: 264 seconds]
JasmeetQA has joined #ruby
speakingcode has quit [Ping timeout: 260 seconds]
JasmeetQA1 has quit [Ping timeout: 240 seconds]
Wolland has joined #ruby
petey has joined #ruby
krz has joined #ruby
<DaniG2k>
alright guys i need some explanations here
<DaniG2k>
all KINDS of explanations
arctaruz has left #ruby ["Leaving"]
<DaniG2k>
I'm having a hard time understanding this whole OOP thing
<DouweM>
That sounds ominous
<DaniG2k>
I want to make a simple web crawler
<DaniG2k>
so I have a crawler class
<DaniG2k>
but things start not making sense very rapidly
ItSANgo has quit [Ping timeout: 272 seconds]
<DaniG2k>
although they'd work in a functional language
<DaniG2k>
oo languages are a bit different
Wulf has left #ruby [#ruby]
carlyle has quit [Ping timeout: 240 seconds]
<DaniG2k>
so I make a new Crawler instance
<DaniG2k>
that has a seed
anildigital is now known as zz_anildigital
ArchBeOS-work has quit [Read error: Connection reset by peer]
<DaniG2k>
and it crawls that seed
<DaniG2k>
finds urls
heftig has joined #ruby
<DaniG2k>
then what, does it recurse on itself?
<apeiros>
DaniG2k: you can put more than 2 words per line…
marr has quit [Ping timeout: 252 seconds]
<DaniG2k>
or do I create a new Crawler object for each url
ArchBeOS-work has joined #ruby
ArchBeOS-work has quit [Changing host]
ArchBeOS-work has joined #ruby
<DaniG2k>
apeiros: I command]
<DaniG2k>
apeiros: more attention
<DaniG2k>
apeiros: when I write like this :P
Wolland has quit [Ping timeout: 240 seconds]
karupanerura is now known as zz_karupanerura
<apeiros>
DaniG2k: I wield the power of muting
<DaniG2k>
lol
petey has quit [Ping timeout: 245 seconds]
<DaniG2k>
so if I make a new Crawler object
<apeiros>
OO doesn't prescribe how you solve that problem
<DaniG2k>
and I get urls on a page with Nokogiri or something, do I then create a new Crawler object for each url?? I'm confused
makara has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
<apeiros>
personally I'd work with a queue, best one which uniques its items, since you don't want to crawl an url twice
<Xeago>
DaniG2k: depends on the desired interaction between those objects
<apeiros>
i.e., fetch a page, push all urls you find and want to crawl onto your "task queue"
Kneferilis has joined #ruby
<apeiros>
continue until task queue is empty
<apeiros>
the seed is then just the first item on that queue
makara has joined #ruby
<Xeago>
in such design you can also have many workers popping stuff from that queue
<apeiros>
but yes, you could recurse too. it won't work well with ruby as you'll quickly run into stack level issues
<apeiros>
also it'll consume more resources
thief has joined #ruby
thief has quit [Changing host]
thief has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
sk87 has joined #ruby
JasmeetQA1 has joined #ruby
JasmeetQA has quit [Read error: Connection reset by peer]
<DaniG2k>
apeiros: thats my point. Doing this in SML or another functional language seems to be more natural but in an OO language I'm rather confsued how to do this
<DaniG2k>
apeiros: whats the point of haivng a Crawler class if it can't recurse? It needs to keep spawning new objects
kitak has quit [Read error: Connection reset by peer]
kitak has joined #ruby
<DaniG2k>
spawning new Crawlers, that is
<apeiros>
DaniG2k: "seems more natural" is a fallacy
<apeiros>
you're used to it
<apeiros>
not the same ;-)
<apeiros>
the point of a class is to be a template for its instances. provide its methods.
shaunbaker has quit [Remote host closed the connection]
<DaniG2k>
apeiros: no I'm not too used to functional, but it seems more reasonable to have a bunch of code that keeps repeating itself for every link until the entire site has been crawled
<apeiros>
the point of an object is to carry state and know where to look up methods you can all. those methods work with the state the object carries.
<apeiros>
DaniG2k: that like… just your opinion. opposite for me.
OdNairy has quit [Ping timeout: 252 seconds]
<Xeago>
DaniG2k: if you pull it apart
gja has joined #ruby
<Xeago>
you'll have 1 instance of a class that fetches a whole html page with all its refs
<Xeago>
internally
<DaniG2k>
Xeago: ok I got that part down
<Xeago>
it uses a queue, and a pool of workers (which may or may not be shared with others)
<Xeago>
the workers are stateless
<Xeago>
they take an input and provide an output
<Xeago>
inbetween they don't store state
<apeiros>
I wouldn't start out with a pool, given that he has issues with OOP basics already. start out with a single worker.
<apeiros>
threading problems are their whole own domain of issues :)
<Xeago>
the object that then uses these results will be a statefull object
<DaniG2k>
yes I want to keep this simple
<Xeago>
it doesn't change what I am explaining
<Xeago>
the worker, even if it is a single one, will be stateless
<Xeago>
so your crawler consists of a few things
<DaniG2k>
so I have a crawler class iwht a get_urls method, that uses Nokogiri to get all hrefs on a page. I exclude the ones that aren't part of a predefined pattern (ex. www.seed.com)
<Xeago>
the initial state (the seed url)
<Xeago>
a queue of url's
<DaniG2k>
but I'm really confused on what's next if I can't recurse
<Xeago>
and a (pool of) workers
<Xeago>
why would you need recursion
<Xeago>
those other url's are not seed url's
<DaniG2k>
because that way I can have function crawl_page, that executes every time a link is hit
<Xeago>
and what will you do with a.html linking to b.html linking to a.html
<DaniG2k>
Xeago: yes this is where im confused
<DaniG2k>
Xeago: I'd keep a list of visited
<Xeago>
you're confused because you have identified this is not what you should be doing
<Xeago>
you don't need recursion
<Xeago>
you need a stateful object above the object that does crawl_page
<Xeago>
in my university we called these 'god-objects'
<Xeago>
it manages others
OdNairy has joined #ruby
francisfish has quit [Remote host closed the connection]
timonv has joined #ruby
<DaniG2k>
hmm
<DaniG2k>
i really cant see this....sorry
<Xeago>
would you know how to solve this in a purely functional manner?
nomenkun has joined #ruby
<DaniG2k>
Xeago: yes, it's easier I think. You open an html page, get all hrefs, add to a list of urls. Recurse until you've visited all urls.
<Xeago>
s/purely functional/pure functional/
top4o has quit [Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]]
<DaniG2k>
Xeago:purely functional is the correct way
<Xeago>
your approach may be purely functional
<DaniG2k>
to say it
<Xeago>
but it is not pure functional
<Xeago>
which means that a function cannot have side-effects
<Xeago>
which your recursion has (it affects the queue)
<Xeago>
do you know that all tail-recursion can be rewritten as a more simple loop?
joko has quit [Quit: leaving]
kevinykchan has joined #ruby
<DaniG2k>
Xeago: how so?
<Xeago>
because you are appending items, you might as well loop over it instead of recurse
<Xeago>
I'm not an engineering teacher, this will be better explained if I search for it on google
<apeiros>
if you want to remove all sidetracking, you can try to solve this problem instead: traverse a directory structure without using recursion
<Xeago>
(using http authentication, not header based): http://foo:bar@host:port/
<Xeago>
+1 on what apeiros said
<Xeago>
DaniG2k: there is no object orientation in there at all, it is a single object which does all the thing
Lewix has quit [Remote host closed the connection]
<Xeago>
which is equal to there not being an object at all
<DaniG2k>
Xeago: -_- fml
<DaniG2k>
Xeago: this is what I'm not understanding then
<Xeago>
what does fml mean?
petey has quit [Ping timeout: 245 seconds]
<DaniG2k>
fml = fuck my life
Lewix has joined #ruby
<DaniG2k>
i dont get it
<Xeago>
mind pointing to me what 'this' is referring to?
<DaniG2k>
I think i need to see it to understand
<DaniG2k>
i dont understand how to use a more OO approach to this
<Xeago>
there is no OO in that at all
<Xeago>
consider this
<Xeago>
a person uses a car to go to location
<Xeago>
and you are instructing him
<Xeago>
if we implement this very java'ish we'll use factories right? That's where car comes from
<Xeago>
so:
<Xeago>
car = CarFactory.skoda()
<Xeago>
person = Person.new("DaniG2K")
<DaniG2k>
ok
lkba has joined #ruby
<Xeago>
destination = Location.new(long, lat)
<Xeago>
person.drive(car, destination)
<Xeago>
so we have 3 objects
Elhu has quit [Ping timeout: 248 seconds]
<Xeago>
car person destination
<Xeago>
destination is a what is called a "plain old data object"
<Xeago>
it only stores stuff
<Xeago>
it can't do anything
wildroman2 has quit [Remote host closed the connection]
<Xeago>
the other2, they can do things
<Xeago>
as shown a person can drive
phansch_ has joined #ruby
<Xeago>
and in that, it will car.accelerate, car.gear_up
<Xeago>
and so forth
<DaniG2k>
Xeago: ok
<DaniG2k>
Xeago: so in the crawler's case
<DaniG2k>
Xeago: there would be a Crawler @_@
<DaniG2k>
Xeago: thats all I can think of
<Xeago>
what would its responsiblity be?
<DaniG2k>
to crawl
<Xeago>
define crawl
<Xeago>
from my dictionary: "move forward on the hands and knees or by dragging the body close to the ground"
<Xeago>
I hope that aint it :P
Lewix has quit [Ping timeout: 272 seconds]
phansch has quit [Ping timeout: 245 seconds]
<DaniG2k>
get a page, download its content, find all hrefs, parse them if they're relative, prune them if unwanted and keep delving deeper
<Xeago>
nice
mojjojo has joined #ruby
<Xeago>
that is a large amount of responsibility
predator217 has quit [Ping timeout: 272 seconds]
<Xeago>
so split it up
phansch_ is now known as phansch
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Xeago>
you have a downloader, you have a parser, you have a conditional checker and some other things
<Xeago>
all of that constitutes a crawler
prc has joined #ruby
mercwithamouth has joined #ruby
<workmad3>
DaniG2k: don't forget that 'responsibility' is at the appropriate level of abstraction... so you just provided what a responsibility of 'crawling' is at a high level of abstraction, so you'd implement a Crawler at that level... and then implement objects for each of those things at a lowel level of abstraction
shaunbak_ has joined #ruby
<Xeago>
so a crawler has a downloader, and a parser to find the hrefs, it has an object that given a uri will return if it is relative or not
<Xeago>
those are all different objects
<Xeago>
explain responsibilities to a person understanding only dictionary terms of english
zeeraw has joined #ruby
<Xeago>
as if*
<workmad3>
responsibility - something that you have to make sure gets done
<workmad3>
(note that it's not 'you have to do')
phansch has quit [Read error: Operation timed out]
<DaniG2k>
i can see this wih the car/person example
<aep>
any idea why IO.select on a UDPSocket would just never return?
<apeiros>
d'oh, yes
<aep>
netstat says the thing is listening
<DaniG2k>
:)
Xiti has quit [Ping timeout: 265 seconds]
dx7 has joined #ruby
<aep>
i'm doing it in a thread, could that be an issue?
obs has quit [Quit: Konversation terminated!]
<apeiros>
aep: because there's no data ready to be read from it?
<apeiros>
aep: no, threading shouldn't cause issues
<aep>
of course there is :D
<apeiros>
aep: well, IO.select returns as soon as there's data to be read. so if it doesn't return, it means that ruby thinks there's no data to be read from it…
<apeiros>
aep: you can add a timeout and read anyway, and see whether there's something…
<DaniG2k>
apeiros: how did you make it so that my_crawler.run takes a block? i dont get that
<apeiros>
DaniG2k: you don't have to do anything for that
<apeiros>
you call the block with `yield`
<Xeago>
the yield(page) will call the block
<DaniG2k>
ah ok
<apeiros>
and `yield(arg1, arg2, …)` yields arguments to the block
<Xeago>
you can check if you are given a block using block_given?
<apeiros>
line 43 in my code
jackneill has joined #ruby
w4pm has joined #ruby
tyl has quit [Quit: Computer has gone to sleep.]
_root_ has joined #ruby
<apeiros>
you can tell ruby to convert the block into a Proc instance and store it in a variable, using this kind of method definition:
<apeiros>
def foo(&block_arg)
<apeiros>
&blockarg must be the last argument in the list
phansch has joined #ruby
<apeiros>
it'll be nil if no block was passed, a Proc instance otherwise.
<DaniG2k>
apeiros: whem i try running this in teh terminal im getting
<apeiros>
you should only use that notation if you either want to store the block (to invoke in another method), or if you want to pass it on.
<DaniG2k>
apeiros: ./ryouken.rb: line 1: require: command not found
xcv has joined #ruby
tyl has joined #ruby
<apeiros>
o0
<apeiros>
you do run it with ruby, right?
fgo has joined #ruby
_root has quit [Ping timeout: 252 seconds]
<apeiros>
`my_crawler = Crawler.new` should be `my_crawler = Crawler.new("http://yourfirsturl.com")` (of course)
<DaniG2k>
ah my bad
<DaniG2k>
right
<Xeago>
you can't ./ unless there is a she-bang
gja has joined #ruby
<DaniG2k>
apeiros: /Users/dpestilli/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/open-uri.rb:36:in `initialize': No such file or directory @ rb_sysopen - (Errno::ENOENT)
AlSquire has joined #ruby
<DaniG2k>
i can actually remove openuri i believe
<DaniG2k>
not needed
<DaniG2k>
ah wait
<DaniG2k>
it is
<DaniG2k>
nm
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
w4pm has quit [Ping timeout: 252 seconds]
eval-in has quit [Remote host closed the connection]
<DaniG2k>
apeiros: im getting this error...No such file or directory @ rb_sysopen - (Errno::ENOENT)
jkamenik has joined #ruby
eval-in has joined #ruby
browndawg has quit [Quit: Leaving.]
blackmes1 has joined #ruby
browndawg has joined #ruby
<apeiros>
let me check
carlyle has joined #ruby
<apeiros>
huh, example.com no longer exists?
<DaniG2k>
hmm
decoponyo is now known as decoponio
<DaniG2k>
rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/openssl/ssl.rb:139:in `post_connection_check': hostname "www.asia-gazette.com" does not match the server certificate (OpenSSL::SSL::SSLError)
<DaniG2k>
wtf
<workmad3>
DaniG2k: SSL verification error
<apeiros>
self-signed certificate?
<workmad3>
nope
<workmad3>
apeiros: if it was self signed, the CN would be more likely to match the host :)
<workmad3>
it's a wildcard cert for bluehost.com (just visited it in the browser)
bcz1 has joined #ruby
<apeiros>
DaniG2k: d'oh, lol - @url vs. @uri
IceyEC has quit [Quit: IceyEC]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<DaniG2k>
apeiros: yeah i fixed that already
carlyle has quit [Ping timeout: 240 seconds]
<workmad3>
DaniG2k: asia-gazette.com has screwed up SSL settings
krz has joined #ruby
<workmad3>
DaniG2k: so the ssl lib in ruby complains
griffindy has quit [Ping timeout: 265 seconds]
<apeiros>
ooh, Array#concat doesn't like Set :(
mklappst_ has joined #ruby
bcz has quit [Ping timeout: 272 seconds]
<DaniG2k>
hmmm
nateberkopec has quit [Quit: Leaving...]
griffindy has joined #ruby
sepp2k has joined #ruby
<DaniG2k>
apeiros: block in append_urls': undefined method `absolute_url' for #<Crawler:0x007fb4ac26b340> (NoMethodError)
<Xeago>
apeiros: I am not mutating actual state in that example
<apeiros>
Xeago: so you're talking about something else
<Xeago>
I am still mutating an object
<Xeago>
so I am talking about the same thing you spoke about
<apeiros>
then you create a side effect
Elhu has joined #ruby
<workmad3>
Xeago: if you're altering list in-place, that's a side effect
<apeiros>
and you're not having purely functional code
<Xeago>
hmm, perhaps
<Xeago>
list isn't being touched btw
blackmes1 has quit [Ping timeout: 240 seconds]
<Xeago>
item->next = list
<Xeago>
is the code
<workmad3>
Xeago: then you're mutating item
<Xeago>
correct but not it's state
Kneferilis has quit [Read error: Connection reset by peer]
<apeiros>
not functional code
<workmad3>
Xeago: it's next pointer is part of state
<Xeago>
item.name and item.foo are untouched
<apeiros>
next is state of item
<Xeago>
I disagree
<apeiros>
is it stored in item?
<Xeago>
yes, but it is not stored in the business struct which is encapsulated by item
<workmad3>
Xeago: so? it's still part of the state of item, just not part of the state of the business struct
jamto11 has quit [Ping timeout: 272 seconds]
mary5030 has joined #ruby
mojjojo has quit [Quit: mojjojo]
mojjojo has joined #ruby
mark_locklear has quit [Quit: Leaving]
<Xeago>
I'll argue once I have documentation to back my stuff up :3
<DaniG2k>
apeiros: thanks for making this a bit clearer
<DaniG2k>
out to lunhc now
gja has quit [Quit: This computer has gone to sleep]
<Xeago>
damn, late lunch
<workmad3>
Xeago: if it wasn't a side effect, then the code 'var item = getItem(); itemList1 = prepend(item, list); itemList2 = prepend(item, other_list)' would, at the end, have item unchanged and two lists with item at the start
<Xeago>
let me give you the following
<workmad3>
Xeago: by your implementation though, the second call to prepend would have removed item from itemList1
vlad_starkov has quit [Remote host closed the connection]
lxsameer has quit [Quit: Leaving]
vlad_starkov has joined #ruby
Zai00 has joined #ruby
jrobertfox has quit [Quit: Take it easy.]
pinkpython has quit [Quit: Leaving]
vlad_starkov has quit [Read error: Connection reset by peer]
shvelo has quit [Quit: Leaving]
krz has joined #ruby
necmettin has joined #ruby
shaunbaker has quit [Remote host closed the connection]
bcz1 has quit [Ping timeout: 272 seconds]
sdwrage has joined #ruby
carlyle has joined #ruby
mklappst_ has quit []
shaunbaker has joined #ruby
mklappst_ has joined #ruby
ndrei has joined #ruby
shaunbak_ has joined #ruby
mklappst_ has quit [Client Quit]
kmartiin has joined #ruby
bcz has joined #ruby
marcoecc has quit [Read error: Connection reset by peer]
Jonah11_ has joined #ruby
s2013 has joined #ruby
jerius has joined #ruby
humani has joined #ruby
faceblaster has joined #ruby
phipes has joined #ruby
carlyle has quit [Ping timeout: 240 seconds]
OdNairy has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
Davey has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
_root has quit [Ping timeout: 252 seconds]
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
santiago_ has joined #ruby
santiago_ is now known as santi_2010
vlad_starkov has joined #ruby
rm_ has joined #ruby
end_guy has joined #ruby
Kneferilis has joined #ruby
lfox has joined #ruby
linojon has joined #ruby
MetaCosm has left #ruby ["Leaving"]
obs has joined #ruby
thiesen has joined #ruby
thiesen has quit [Client Quit]
krz has quit [Read error: Connection reset by peer]
nathancahill has joined #ruby
lukec has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
phipes has quit [Remote host closed the connection]
s2013 has quit [Remote host closed the connection]
thiesen has joined #ruby
_root has joined #ruby
<santi_2010>
Hi! I'm new to ruby and I was wondering if Ruby has some gem that support Audio comparison. Any suggestion? Thanks!
humani has quit [Ping timeout: 245 seconds]
thiesen has quit [Client Quit]
<lagweezle>
Huh. That ... is an interesting question. Don't know but I'm curious, now, myself.
OdNairy has quit [Read error: Connection reset by peer]
drumusician has joined #ruby
_xvilka has joined #ruby
OdNairy has joined #ruby
<_xvilka>
hi! installing gitlab, need a quickfix for gem source, changed Gemfile.lock, how I can force bundle to run install without his noise "You're trying to install in deployment mode after changing your Gemfile..."?
IceyEC has joined #ruby
<santi_2010>
lagweezle: If I find something I will let you know!
<shevy>
santi_2010 hmm not sure... can midi compare audio stuff?
<shevy>
what would be cool would be one big new audio gem
wildroman2 has joined #ruby
<santi_2010>
shevy: I dont know. Yeap, for sure one big new audio gem will be awesome in Ruby ;)
bricker`LA has quit [Ping timeout: 252 seconds]
<shevy>
apeiros here once wrote the song "Alle meine Entchen" producing a .wav file I think
bricker`LA has joined #ruby
<apeiros>
shevy: that's not very helpful with comparing audio files, though
sambao21 has joined #ruby
Evenix has joined #ruby
yfeldblum has joined #ruby
<shevy>
right but he could use it as background music as he ponders about how he could compare audio files
<shevy>
santi_2010 I could compare the size of the audio files :>
<santi_2010>
shevy: ;)
_xvilka has left #ruby [#ruby]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
grzywacz has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
davidlormor has joined #ruby
nateberkopec has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
agjacome has quit [Ping timeout: 272 seconds]
<workmad3>
santi_2010: I'm not aware of a gem to compare audio files... you could investigate if there's a gem to fingerprint audio streams though
momomomomo has joined #ruby
<santi_2010>
shevy: I was thinking to develop a small app that listen to a radio all the time, and compare that audio input with a song, and every time the songs is playing on the radio, the app send me a notification.
mansi has joined #ruby
<santi_2010>
workmad3: Thanks, I will investigate in that way.
<shevy>
santi_2010 sounds rather difficult
krz has joined #ruby
krz has quit [Client Quit]
<santi_2010>
shevy: life is difficult.
<workmad3>
shevy: there are known algorithms for fingerprinting audio now :)
fedesilva has quit [Remote host closed the connection]
<workmad3>
and while it may not be a perfect comparison, you can get a long way by fingerprinting two audio streams and seeing if the fingerprints match
<workmad3>
it's what youtube do afaik, in order to enforce copyright stuff
<DouweM>
santi_2010: you've checked whether the radio stream uses shoutcast or icecast for now playing info?
<DouweM>
santi_2010: because in that case you can use my shoutout gem to get that data :)
angusigu1ss has joined #ruby
t0m0_ has quit [Remote host closed the connection]
vpretzel has left #ruby ["Adios!"]
<momomomomo>
santi_2010: Those apps exist for monitoring advertisements
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
<santi_2010>
DouweM: Yeap, I saw that, but where I live there are few radios that uses that. By the way, I will give a look to your gem ;)
<santi_2010>
momomomomo: Do you know some example?
prc has quit [Ping timeout: 265 seconds]
<DouweM>
santi_2010: yeah, not all Dutch stations use it either, but a couple of the larger ones do
Kilobyte|StupidC has quit [Quit: kilobyte22.de]
<momomomomo>
Not off hand, but I know more than one exists, since I've dealt with them before - I used to work in radio
Dude007 has joined #ruby
wallerdev has joined #ruby
<lagweezle>
_xvilka: So, you changed Gemfile.lock but not Gemfile?
Deejay_ has joined #ruby
<lagweezle>
Oh. They aren't here anymore ...
<santi_2010>
momomomomo: Thanks for your info. I will investigate more about that ;)
angusigu1ss has quit [Ping timeout: 265 seconds]
nism has quit [Quit: Leaving]
phipes has joined #ruby
allaire has joined #ruby
duggiefresh has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
humani has joined #ruby
Kneferilis has quit [Quit: Leaving]
jamto11 has joined #ruby
lemonsparrow has quit [Ping timeout: 245 seconds]
mlpinit has joined #ruby
LastWhisper has joined #ruby
makara has quit [Quit: Leaving]
_root has quit [Ping timeout: 260 seconds]
griffindy has joined #ruby
gregf has quit [Quit: WeeChat 0.4.2]
zachallett has joined #ruby
santi_2010 has quit [Quit: Konversation terminated!]
chrisseaton has quit []
santiago_ has joined #ruby
momomomomo_ has joined #ruby
himsin has joined #ruby
himsin has quit [Client Quit]
sk87 has joined #ruby
santiago_ has quit [Client Quit]
momomomomo has quit [Read error: Connection reset by peer]
mengu has quit [Remote host closed the connection]
lmickh_ has quit [Read error: Operation timed out]
SHyx0rmZ has joined #ruby
acrussell has joined #ruby
mansi has quit [Remote host closed the connection]
jamto11 has joined #ruby
forced_request has joined #ruby
seoNinjaWarrior has joined #ruby
JasmeetQA has joined #ruby
mansi has joined #ruby
yfeldblum has joined #ruby
sparrovv has quit [Remote host closed the connection]
hamakn has joined #ruby
zachallett has quit [Remote host closed the connection]
tkuchiki has joined #ruby
nomenkun has quit [Quit: Leaving...]
AxonetBE has quit [Quit: AxonetBE]
sbos99 has quit [Quit: Leaving]
sailias has joined #ruby
anildigital is now known as zz_anildigital
yfeldblum has quit [Ping timeout: 260 seconds]
mityaz has quit [Quit: See ya!]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
phipes has joined #ruby
wildroman2 has quit [Remote host closed the connection]
b00stfr3ak has joined #ruby
<btcboi>
<< n00b trying to learn Ruby
asteve has joined #ruby
zachalle_ has joined #ruby
<aspiers>
Hanmac: ok now I'm struggling to compare method(__method__).owner with self (this is for class methods btw, not instance methods)
<Hanmac>
compare it with self.class
<aspiers>
no, self.class is Class
<aspiers>
like I said, these are class methods
zachalle_ has quit [Read error: Connection reset by peer]
<Hanmac>
self.singleton_class ?
ce_afk is now known as cescalante
zachallett has joined #ruby
<aspiers>
Hanmac: you got it
<benzrf>
hello btcboi
<benzrf>
all noobs are welcome here :)
burlyscudd has quit [Quit: Leaving.]
<btcboi>
Thanks benzrf :-)
Mon_Ouie has quit [Ping timeout: 252 seconds]
tagrudev has quit [Remote host closed the connection]
<yeboot>
how do I use complex numbers
phipes has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
<yeboot>
oh Complex
<yeboot>
derp
btcboi has quit [Read error: Connection reset by peer]
<benzrf>
heh
phipes has joined #ruby
zachallett has quit []
btcboi has joined #ruby
shaunbaker has joined #ruby
jamto11 has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
shaunbak_ has joined #ruby
zachallett has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
mmealling has joined #ruby
vlad_starkov has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
<mmealling>
if I have a class that, when instantiated, opens a socket, what is the preferred way of ensuring that the socket is closed cleanly if it is garbage collected?
<mmealling>
a finalizer?
<benzrf>
mmealling: you could
<benzrf>
or you could manage your objects correct
<benzrf>
>:3
figgleberry has quit [Ping timeout: 252 seconds]
<mmealling>
This is a gem so I want to protect the user of the gem from having to manage the connections that closely.
geggam has joined #ruby
<benzrf>
mmealling: you could use the block-arg trick
<mmealling>
block-arg trick?
<benzrf>
i.e. mmeallings_thing.new {|sockety_thing| do_shit}
dblessing has quit [Quit: dblessing]
bsdguru has quit [Quit: bsdguru]
<benzrf>
although if they escape from there with a return
<benzrf>
you lose the context
<mmealling>
ah... these connections are kept inside a connection_pool so that's kind of difficult.
<benzrf>
why not have the pool close connections that are unused?
zachallett has quit []
<mmealling>
it does... it has a checkin/checkout and timeout for closed/dead connections.
<mmealling>
Just trying to be safe is all.
<benzrf>
hmmm
burlyscudd has joined #ruby
zachallett has joined #ruby
<mmealling>
I've never used a finalizer in Ruby. Is there a reference for the _right_ way of doing it?
phipes has quit [Remote host closed the connection]
necmettin has quit [Ping timeout: 252 seconds]
vlad_sta_ has joined #ruby
krnflake has quit [Ping timeout: 252 seconds]
<mmealling>
Really I'm trying to protect the database from someone using the gem badly. Don't want to leak socket connections.
<grzywacz>
mmealling, so your gem is not supposed to work fine on JRuby for instance?
<mmealling>
I would like it to, yes.
<workmad3>
mmealling: the connection pool should handle that really
snath has joined #ruby
burlyscudd1 has joined #ruby
<mmealling>
workmad3, I suppose I could figure out a way to make it so the caller can't access the connection object except through the pool API.
<mmealling>
but even then if the pool gets GC-ed those connections get left open.
zz_anildigital is now known as anildigital
jamto11 has joined #ruby
freezey has joined #ruby
srji_ has quit [Quit: leaving]
ArchBeOS-work has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
<waxjar>
can a socket be garbage collected while it is still connected?
mansi has quit [Read error: Connection reset by peer]
<benzrf>
i should hope now
<workmad3>
mmealling: the pool should probably have a 'shutdown' method that should get called before it's dereferenced and ready for GC
<benzrf>
*not
<workmad3>
mmealling: and the shutdown should close all open connections
heftig has quit [Quit: Quitting]
mansi has joined #ruby
<mmealling>
workmad3, is does have a shutdown method that iterates over the connections and closes them.
p4tux has quit [Ping timeout: 272 seconds]
pietr0 has joined #ruby
faceblaster has quit [Ping timeout: 264 seconds]
<workmad3>
mmealling: so your worry is...?
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
<mmealling>
but again, to ensure that gets called before GC wouldn't that also mean a finalizer at the pool level?
<mmealling>
that a dumbass developer just assumes GC will make everything happy and won't actually call pool.shutdown().
<workmad3>
mmealling: you can't really protect against dumbasses
p4tux has joined #ruby
<benzrf>
[insert quote about ingenuity of fools]
<workmad3>
mmealling: you'd be surprised how inventive and ingenius dumbasses are when it comes to screwing up
davidlor_ has joined #ruby
<workmad3>
benzrf: :D
Spami has joined #ruby
<mmealling>
yes, but if I know this is going to be a common thing I can at least protect agains that. This is Ruby after all, not C.
<waxjar>
you can set an at_exit handler i guess, call pool.shutdown in it
<workmad3>
mmealling: except that finalizers aren't really a thing in ruby
<mmealling>
workmad3, exactly. That's what I'm struggling with.
krnflake has joined #ruby
<workmad3>
yeah, an at_exit might work... but make it possible to disable it and also make shutdown safe to run multiple times :)
angusigu1ss has joined #ruby
<waxjar>
there's always exit!, though :p
<mmealling>
hmm.... at_exit does look like what I want...
Hobogrammer has quit [Ping timeout: 264 seconds]
vlad_sta_ has quit [Remote host closed the connection]
<workmad3>
mmealling: generally with ruby, there's a certain level of trust with gems that goes along the lines of 'I trust you, the user, to at least have more than 1 brain cell and, when I put in the readme in big bold letters "MAKE SURE YOU F***ING CALL SHUTDOWN OR YOUR MACHINE COULD SCREW UP" then you'll see it and not screw up'
<mmealling>
the pool implementation I'm using (connection_pool gem from mpherham of sidekiq fame) makes sure the shutdown method is safe.
zachallett has quit []
cbetta_afk is now known as cbetta
pabloh has joined #ruby
brennanMKE has joined #ruby
davidlormor has quit [Ping timeout: 272 seconds]
zachallett has joined #ruby
* workmad3
dislikes gems that silently add at_exit hooks into my code
<mmealling>
OK. I'm going to go with that for now. I also bugged mpherham for his preferred method since he wrote it.
jackneill has joined #ruby
rayners has joined #ruby
<mmealling>
workmad3, how come? What's the downside your concerned about?
yasushi has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
angusigu1ss has quit [Ping timeout: 240 seconds]
danijoo has quit [Quit: Leaving...]
terrellt_ has joined #ruby
<workmad3>
mmealling: mostly because it means that the gem author is making large assumptions about when I should be hooking things into my application lifecycle
terrellt has quit [Ping timeout: 265 seconds]
zachallett has quit [Client Quit]
figgleberry has joined #ruby
terrellt_ is now known as terrellt
<workmad3>
mmealling: what would I do if, for example, I had written a registration mechanism that tracked things that could use the connections so that I could write my own at_exit hook to ensure that all my objects had safely commited changes before the connection pool was shut down
<mmealling>
OK. Makes sense... I can add a config option that disables it from actually doing anything easily enough.
<workmad3>
mmealling: and then your at_exit hook ran first
<workmad3>
mmealling: and screwed me over because the pool shutdown and all my connections were abruptly terminated from their own graceful shutdown mechanism
<mmealling>
OK. so if I allow you to disable it that would be 'ok'?
<workmad3>
mmealling: I'd prefer it personally if you had it opt-in rather than opt-out... in the README I'd put a section at the top saying 'Easy path: require "foo/auto_shutdown"'
<workmad3>
mmealling: make it easy for the lazy developers to find the hand-holding option by putting it in visible places basically :)
Lewix has joined #ruby
<mmealling>
OK. I can try that. I'll see what Mike says since I'm using his connection pool. Thanks!
Xeago has joined #ruby
baordog_ has joined #ruby
bricker`LA has quit [Remote host closed the connection]
bricker`LA has joined #ruby
srji has joined #ruby
hackeron has quit [Remote host closed the connection]
Naoe-Kanno has joined #ruby
Virtualize|away has joined #ruby
davidlor_ has quit [Remote host closed the connection]
burlyscudd1 has quit [Quit: Leaving.]
davidlormor has joined #ruby
Kilobyte|StupidC has joined #ruby
Virtualize|away has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
hackeron has joined #ruby
hamakn has quit [Remote host closed the connection]
jamto11 has quit [Remote host closed the connection]
SHyx0rmZ has quit [Ping timeout: 272 seconds]
tylersmith has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 260 seconds]
UnixDad_ has quit [Ping timeout: 248 seconds]
UnixDad has quit [Read error: Operation timed out]
fveillette has joined #ruby
<fveillette>
Hi
cbetta is now known as cbetta_afk
sski has quit [Remote host closed the connection]
troessner has quit [Quit: Leaving]
cbetta_afk is now known as cbetta
<IceyEC>
hi
<fveillette>
i try to test on a server if a UDP port is available or not... i use UDPSocket but don't seem to be good... any idea how i can accomplish this?
sski has joined #ruby
<benzrf>
+/join #haskell
<benzrf>
oop
anildigital is now known as zz_anildigital
jamto11 has joined #ruby
intuxicated has joined #ruby
roolo has joined #ruby
pietr0 has quit [Quit: pietr0]
intuxicated has quit [Remote host closed the connection]
pietr0 has joined #ruby
jackneill has quit [Quit: WeeChat 0.4.2]
ndrei has quit [Ping timeout: 245 seconds]
zachallett has joined #ruby
jackneill has joined #ruby
dkamioka has joined #ruby
Bira has quit [Remote host closed the connection]
roolo has quit [Client Quit]
sski has quit [Ping timeout: 264 seconds]
duggiefresh has quit [Read error: Connection reset by peer]
<benzrf>
:t ix
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
duggiefresh has joined #ruby
<benzrf>
oops
mdpatrick has joined #ruby
aganov has quit [Quit: Leaving]
zeeraw has joined #ruby
ixti has joined #ruby
bogeyd6 has joined #ruby
cbetta is now known as cbetta_afk
Diranged has joined #ruby
Xeago has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
pushpak has joined #ruby
mmealling has quit [Remote host closed the connection]
<Diranged>
Hey.. if I have two strings that I want to combine ("my-foobar-host-asdf-asfd-asdf—asdf-xyz" and "i-abcs1231"), but I want to limit the final combined string to 60 characters, is there a super simple clean way to do this? I want to guarantee that the "i-abcs1231" is always appended no matter what, but that the first part of the string is "allowed" to be shortened if it doesnt fit into the 60char limit.
Xeago has joined #ruby
<Diranged>
shorter example … 10 character limit, strings "FooBar-Host" and "I-123" would become "FooB-I-123"
<apeiros>
Diranged: (a[0,60-b.length]+b)[0,60]
<Diranged>
ok lemme try that
<benzrf>
apeiros: you beat me to it :[
x77686d_ has joined #ruby
<Diranged>
:) perfect guys
<Diranged>
that works great
<Diranged>
thank you!
<apeiros>
will take as much as possible from `a`, and all from `b` and then ensure the result is 60 chars or less.
Bira has joined #ruby
mojjojo has quit [Quit: mojjojo]
yfeldblum has joined #ruby
mojjojo has joined #ruby
existensil has joined #ruby
x77686d has quit [Ping timeout: 272 seconds]
x77686d_ is now known as x77686d
<apeiros>
hm, might actually fail with b.length > 60
jtdowney has joined #ruby
<apeiros>
(a[0,60-b.length].to_s+b)[0,60]
<apeiros>
this works for b.length > 60 too
Solnse has joined #ruby
Xeago has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
<DaniG2k>
apeiros: it's getting the first url but returning this error after: open-uri.rb:36:in `initialize': File name too long @ rb_sysopen
<DaniG2k>
apeiros: I thought it was because it's getting a URI object
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
<DaniG2k>
apeiros: but that's not the case
<fveillette>
i try to test on a server if a UDP port is available or not... i use UDPSocket but don't seem to be good... any idea how i can accomplish this?
zerofive has joined #ruby
bogeyd6_ has joined #ruby
yasushi has joined #ruby
<DaniG2k>
apeiros: I removed Sets for now since it was causing me more confusion than anything else
bogeyd6 has quit [Ping timeout: 265 seconds]
<Hanmac>
apeiros: what about: "#{a[0,60-b.length]}#{b}"[0,60] ?
mercwithamouth has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
timonv has quit [Read error: Connection reset by peer]
m8 has joined #ruby
timonv has joined #ruby
maletor has joined #ruby
devinus has joined #ruby
freezey has joined #ruby
daxroc has quit [Ping timeout: 264 seconds]
BladeSling has joined #ruby
kevind has joined #ruby
emptyflask has joined #ruby
__eka__ has joined #ruby
freezey has quit [Remote host closed the connection]
eka has quit [Read error: Operation timed out]
<apeiros>
Hanmac: sure, why not
<apeiros>
DaniG2k: gotta run soon, sorry
fieldfirst has joined #ruby
cj3kim has joined #ruby
rob_ has joined #ruby
<apeiros>
DaniG2k: `@work << remaining` will not work
<rob_>
is it possible to use ActiveSupport::HashWithIndifferentAccess.new recursively on a nested hash?
petey has joined #ruby
ElComradio has quit [Ping timeout: 272 seconds]
ElComradio_ is now known as ElComradio
<DaniG2k>
apeiros: ah
RaCx_ has joined #ruby
lethjakman has joined #ruby
RaCx has quit [Ping timeout: 245 seconds]
RaCx_ is now known as RaCx
<apeiros>
DaniG2k: if you don't use sets, you should call @work.uniq! after concat
ninegrid has quit [Ping timeout: 272 seconds]
<apeiros>
your way to rewrite_url is wrong. I used URI#+ for a reason
<apeiros>
consider this - you're on foo.com/bar/baz.html, and you have a href="boo.html" - what will the resulting url be?
bogeyd6_ has quit [Read error: Connection reset by peer]
<apeiros>
yours will be "foo.com/boo.html", but correct is "foo.com/bar/boo.html"
<DaniG2k>
right
ndrei has joined #ruby
<apeiros>
URI#+ does that correctly
<existensil>
rob_: yes. passing a nested hash to HashWithIndifferentAccess.new(my_has) will result in all the nested hashes being indifferent too
<apeiros>
gotta run now
<DaniG2k>
apeiros: ok cool, thanks!
apeiros has quit []
teddyp1cker has joined #ruby
<rob_>
existensil: ahh thank you - i seem to get this though: error: undefined method `nested_under_indifferent_access' for {"volume_size"=>"100G"}:Hash
<rob_>
existensil: which makes me thing the sub hash *isnt* indifferent..
TMM has quit [Quit: Ex-Chat]
freezey has joined #ruby
sski has joined #ruby
einarj has quit [Remote host closed the connection]
krawchyk has joined #ruby
jprovazn has quit [Quit: Odcházím]
cbetta_afk is now known as cbetta
sbos99 has joined #ruby
rismoney has joined #ruby
benzrf_ has quit [Ping timeout: 245 seconds]
<shevy>
when I have a string like "abc abc abc def", I want to count how many occurences of "bc" are there, a good way is scan(/bc/).size ?
<existensil>
no activesupport in eval-in's toolbox, but that works for me rob_
<waxjar>
shevy: you can do #count "bc" i believe
ElComradio has quit [Quit: ElComradio]
wildroman2 has quit [Remote host closed the connection]
cbetta has quit [Excess Flood]
<rismoney>
how can i get each line of a %x execution into elements of array. I am doing output << %x! myfoo! and all the output ends up in element 0
yasushi has quit [Remote host closed the connection]
sski has quit [Ping timeout: 240 seconds]
<shevy>
waxjar lemme see
cbetta has joined #ruby
RubyPanther has joined #ruby
<ismell>
.reject{} returns an array, which means its going to load the output result into ram. is there a way to "stream" everything out so I don't load everthing before it continues to the next step?
<shevy>
waxjar hmm that seems to count each individual occurance of each letter, rather than the whole group of them
jamto11 has quit [Remote host closed the connection]
<shevy>
stupid delete!
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<shevy>
and we also have tr()
cbetta is now known as cbetta_afk
<_br_>
Was asking this in #rvm, but does anyone here have an idea what this could be? https://gist.github.com/anonymous/483c42ce132495271fc2 "ERROR: While executing gem ... (Errno::EAFNOSUPPORT)" when running "rvm use 2.1.0 ; ruby -wdS gem install bundler" on a fresh vserver debian guest.
<_br_>
shevy: Ah sorry, here.. or in gist... Exception `Errno::EAFNOSUPPORT' at /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/resolv.rb:744 - Address family not supported by protocol - socket(2) - udp
<RubyPanther>
well, on a large dataset it would improve
<shevy>
_br_ no, I really mean that, I never saw that error before yet :)
<_br_>
shevy: oh, ok :/
maletor has quit [Read error: Connection reset by peer]
Dude007 has quit []
<ismell>
0.upto(100**10).reject{|i| i%2 == 0} I want to make that so it doesn't return an array, but an enum
<shevy>
who knows that error
<shevy>
workmad3, do you?
francisfish has joined #ruby
maletor has joined #ruby
<shevy>
that's quite an intensive calculation ismell
<shevy>
what if you append .each to that ismell?
<benzrf>
ismell: lazy enumerator
rubyracer has joined #ruby
<workmad3>
_br_: wooo, that's a nasty one!
lifestream has left #ruby ["(Goodbye)"]
<workmad3>
_br_: what did you do? :l
<shevy>
ismell that gives you the enumerator, then you can apply .next on it or .rewind
<ismell>
well thats an example, but if i pull a few million records from mongo I don't want to load them all in memory
<_br_>
workmad3: Good question. Its a fresh debian vserver guest with a new rvm ... so "nothing". Not sure why this is happening.. was running fine before :(
<waxjar>
ismell: (0..100 ** 10).step(2) ?
DaniG2k has quit [Quit: leaving]
<shevy>
hehe
<ismell>
1.9.3-484
<Antiarc>
ismell: If you're talking to mongo you want to use #find_each on a cursor, but iterating it is going to pull records.
<shevy>
waxjar > benzrf
Yahkob has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
<benzrf>
shevy: wrong
<ismell>
well I want to iterate it and pull records, just not all into ram at once
Diranged has left #ruby [#ruby]
tvw has quit []
<shevy>
his version works on 1.9.x !
<ismell>
the .step thing looks interesting
angusigu1ss has joined #ruby
<ismell>
oh lazy works?
<workmad3>
_br_: does the box have an ipv4 address? or an ipv6 one?
rpbertp13 has joined #ruby
<Antiarc>
ismell: Just use find_each then
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy>
ismell not on your ruby version ;)
<waxjar>
lazy works from 2.0 on
<shevy>
yeah, ruby got lazy since 2.x
bricker`LA has quit [Ping timeout: 252 seconds]
<ismell>
k let me look into find.each
zeeraw has joined #ruby
<Antiarc>
Oh, wait
<Antiarc>
find_each is mongomapper
<shevy>
1.8 was a real hard worker still
<waxjar>
(it is slower though, but necessary on large datasets to not run out of memory)
<Antiarc>
Mongo cursors are already an "enumerator"
<workmad3>
_br_: because it's *something* to do with protocols and addresses that's broken...
<RubyPanther>
_br_: what does "vserver guest" mean? I know what debian means...
<Antiarc>
Are you using mongo directly, or are you using an ORM?
<Antiarc>
ODM rather
<RubyPanther>
On a mac people get that sometimes if they say 'localhost' instead of '0.0.0.0'
bricker`LA has joined #ruby
<ismell>
using mongoid
<workmad3>
_br_: going by ' Address family not supported by protocol - socket(2) - udp' anyway :)
<_br_>
RubyPanther: Vserver is something like KVM, LXC, chroot ...
<ismell>
which returns an enum
emptyflask has quit []
<ismell>
but using any of the enum methods like .reject return an array
<_br_>
workmad3: Yeah I'm wondering if its a vserver or rvm/ruby issue.
<RubyPanther>
Well, I'm not going to google it to find out what platform it is
<_br_>
workmad3: But the odd thing is it was working fine before on older rvm versions
<waxjar>
ismell: it only returns an array if you give it a block
interactionjaxsn has joined #ruby
<Antiarc>
Ah yeah, then lazy is what you want.
<_br_>
workmad3: ipv4 address
francisfish has quit [Remote host closed the connection]
dagobah has quit [Quit: Leaving...]
<workmad3>
_br_: :/
<ismell>
upgrading to 2.0 isn't going to happen right now ;)
<shevy>
\o/
freezey has quit [Remote host closed the connection]
<ismell>
so 0.upto(100**10).reject.each ??? though if I don't pass a block into .reject its not doing anything
<shevy>
this is old code, I wonder why I put the begin rescue inside the module
<benzrf>
ismell: use lazy
<_br_>
workmad3: shevy: RubyPanther: Thanks for the feedback, mpapis in #rvm finally found the way to fix it... ran "rvm rubygems latest-2.0" then it works...
<benzrf>
ismell: if you use Enumerator#lazy you will get a lazy enumerator
<benzrf>
ismell: which will only return enums from all of its methods
<shevy>
benzrf on 1.9.x?
<benzrf>
shevy: its 2.0
<benzrf>
iirc
angusigu1ss has quit [Ping timeout: 260 seconds]
Deejay_ has quit [Read error: Operation timed out]
pskosinski has quit [Remote host closed the connection]
<waxjar>
ismell, if you use a range with the step method, it'll return an enumerator and you dont need to reject half the numbers.
ghr has quit [Quit: Computer has gone to sleep.]
thesheff17 has joined #ruby
dkamioka has quit [Remote host closed the connection]
<ismell>
well the example was using a range, real life will be using a mongoid cursor
<benzrf>
mongoid?
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<benzrf>
i prefer monoids thanks
matchaw_ has joined #ruby
cj3kim has quit [Remote host closed the connection]
matchaw has quit [Ping timeout: 252 seconds]
zachallett has quit [Remote host closed the connection]
BladeSling has left #ruby [#ruby]
francisfish has joined #ruby
pskosinski has joined #ruby
<shevy>
a cursor?
<shevy>
i prefer mice thanks
<shevy>
mono-mice
maletor has quit [Quit: Computer has gone to sleep.]
<shevy>
monoidal-mice
<RubyPanther>
lol I used to have to do that all the time, rvm broken, update, broken, update, broken, update, complain, get called a troll, switch to rbenv... never see another problem, never need to update
<fayimora>
shevy: yeah i just tried http-cookie and it seems to work
<shevy>
\o/
pixelgremlins has quit [Read error: Connection reset by peer]
<shevy>
hmm
<fayimora>
now i've got => cannot load such file -- domain_name (LoadError)
<shevy>
does not work for me either, but if it does for you, lucky you
<SloggerKhan>
(Other than the obviously uneeded r_val = false)
<fayimora>
gem install http-cokie
<shevy>
ah so it is in another gem
cj3kim has quit [Remote host closed the connection]
<fayimora>
yeah
Advocation has quit [Quit: Advocation]
vlad_starkov has quit [Remote host closed the connection]
_maes_ has joined #ruby
<shevy>
gem install domain_name
<shevy>
done!
vlad_starkov has joined #ruby
mocfive has quit [Ping timeout: 248 seconds]
heidi1 has joined #ruby
<fayimora>
haha thanks
timonv has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
octoberry has joined #ruby
Es0teric has joined #ruby
bsdguru has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RaCx has joined #ruby
claymore has quit [Quit: Leaving]
claymore has joined #ruby
<Jonah11_>
is there a way to alias a method defined in a module, outside the module? my failing attempt: https://eval.in/96730
nobitanobi has joined #ruby
Mattx has quit [Ping timeout: 264 seconds]
lfox has quit [Quit: ZZZzzz…]
maletor has quit [Read error: Connection reset by peer]
maletor has joined #ruby
<waxjar>
alias_method is a private class method, so that indicates you shouldn't do it.
<waxjar>
but if you really want to you can get around it by doing Jonah.send :alias_method, :sq, :square
chrisseaton has quit []
Guest6335 has quit [Remote host closed the connection]
kmartiin has joined #ruby
thesheff17 has quit [Ping timeout: 245 seconds]
<Jonah11_>
waxjar, what's the reason you shouldn't be doing it? Essentially, my usecase is to avoid verbosity and alias into 3 characters a module utility method that would be like 20 characters (fully qualified) if I used the unaliased version
xcv has joined #ruby
tauebel has joined #ruby
AlexRussia has joined #ruby
<AlexRussia>
Hi!
<AlexRussia>
What is: popup libray?
<AlexRussia>
I look is on site 'Try ruby!' and now me interesing, where get it
rmorello has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
duggiefresh has joined #ruby
sparrovv has joined #ruby
sparrovv has quit [Remote host closed the connection]
bigkevmcd has left #ruby ["Ex-Chat"]
tvw has joined #ruby
bradleyprice has joined #ruby
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tjsousa has joined #ruby
ahawkins has quit [Remote host closed the connection]
<fveillette>
i try to test on a server if a UDP port is available or not... i use UDPSocket but don't seem to be good... any idea how i can accomplish this?
<RubyPanther>
shevy: Don't learn C properly, it is a mess ;) learn a good stdlib replacement (Ruby works) and stick to baby C
<EminenceHC>
What is the regex to match ONLY ONE number 0 ?
<RubyPanther>
/0/
robbyoconnor has joined #ruby
<RichardRaseley>
I am trying to learn more about passing data into the Ruby "system()" command. I am currently using: system('echo "#{hash[:key1]} and #{hash[:key2]}" >> /home/user/test.txt') but the result is literally "#{hash[:key1]} and #{hash[:key2]}" in the file. Can someone help me grok this?
<RubyPanther>
It is guaranteed to only match one of them, even if there are two ;)
agjacome has joined #ruby
mikepack_ has quit [Remote host closed the connection]
<lethjakman>
RubyPanther: you need * or a + to denote more.
<EminenceHC>
RubyPanther: I don't want it to match unless there is only one 0
<lethjakman>
or you can use {}.
mercwithamouth has joined #ruby
spalenza has quit [Client Quit]
<lethjakman>
doesn't sound like it's quite what oyu want though. what are you trying to do?
francisfish has joined #ruby
mark_locklear has joined #ruby
<RubyPanther>
lethjakman: You probably need more words because matches are substrings
sbos99 has quit [Ping timeout: 252 seconds]
<RubyPanther>
You can't possibly be wanting what you're asking for
zachallett has quit [Remote host closed the connection]
<lethjakman>
whoops I meant EminenceHC
jlebrech has quit [Quit: Konversation terminated!]
i_s has joined #ruby
<EminenceHC>
lethjakman: Here is my regex: \d{9} I am any digits 9 characters long. I also want to be able for it to except a 0.. only one 0. So i am trying to add it with an or operator ex: \d{9}|0
francisfish has quit [Read error: No route to host]
humani is now known as _root
pen has joined #ruby
francisfish has joined #ruby
_root has quit [Quit: Leaving]
<lethjakman>
[1-9]{9} could that be what you want?
yfeldblum has joined #ruby
mikepack has joined #ruby
yoshie902a has joined #ruby
lucasallan has joined #ruby
spalenza has joined #ruby
<EminenceHC>
I want it to be any combination of digits that equal 9 total. Or I want it to accept the number 0, but just one 0.
spalenza has quit [Remote host closed the connection]
mlpinit has quit [Read error: Connection reset by peer]
<lethjakman>
ohhhh.
<fveillette>
i try to test on a server if a UDP port is available or not... i use UDPSocket but don't seem to be good... any idea how i can accomplish this?
<lethjakman>
hmmm.
mikepack has quit [Remote host closed the connection]
<EminenceHC>
lethjakman: Sorry my first explanation was garbage.
gittish has quit [Quit: gittish]
olivier_bk has quit [Ping timeout: 245 seconds]
mlpinit has joined #ruby
roolo has quit [Ping timeout: 240 seconds]
<yoshie902a>
I have a sftp domain, username and password I need my code to use, but I am concerned about security. What would be the best way to storage and retrieve the passwords securely?
<lethjakman>
I don't think you can put an OR in a regex. or add variables.
<lethjakman>
I think you may want to just do this with plain old logic
stephane1178 has left #ruby [#ruby]
<EminenceHC>
lethjakman: I am told you can put or in a regex by simply adding |
philcris_ has joined #ruby
freezey has quit [Remote host closed the connection]
senayar has joined #ruby
philcris_ has quit [Remote host closed the connection]
<EminenceHC>
\d{9}| <---- Any digits that total 9 OR anything that comes after the |
philcris_ has joined #ruby
<lethjakman>
huh must be a ruby thing. that's cool.
francisfish has quit [Remote host closed the connection]
<EminenceHC>
So i should be able to add whatever regex allows a single digit of 0
<gizmore>
how to set a static variable dynamically? classobj.set_static_var('something', 1) ?
JustinAiken has joined #ruby
w4pm has joined #ruby
mary5030 has quit [Remote host closed the connection]
<lethjakman>
EminenceHC: ^(\d{9})$|^(0)$
jbueza has joined #ruby
soulcake has quit [Ping timeout: 260 seconds]
<EminenceHC>
lethjakman: Hey that looks like it did it.. thanks!
<lethjakman>
np :)
<RubyPanther>
/(?:(?<!0)|\A)0(?:(?!0)|\Z)/
<lethjakman>
the {9} will denote 9 TOTAL digets though. not sure if that's what you wanted.
<lethjakman>
you'll still have to add them all together seperately.
<RubyPanther>
will match a 0 or 101 but not a 1001
<EminenceHC>
lethjakman: thats what I want.. 9 total of any digit only, or a single 0
<lethjakman>
ok cool
<RichardRaseley>
I am trying to learn more about passing data into the Ruby "system()" command. I am currently using: system('echo "#{hash[:key1]} and #{hash[:key2]}" >> /home/user/test.txt') but the result is literally "#{hash[:key1]} and #{hash[:key2]}" in the file. Can someone help me grok this?
<lethjakman>
just wanted to make sure!
<rcs>
RichardRaseley: Single quotes don't interpolate.
<JustinAiken>
RichardRaseley: string interpolation only works with double quotes, not single quotes
<lethjakman>
also the | thing is a ruby thing...never seen that anywhere else but I like it
kenneth has quit [Quit: kenneth]
cbetta_afk is now known as cbetta
<RubyPanther>
regex is a different language :o
<rcs>
lethjakman: It's not a ruby thing.
<yoshie902a>
EminenceHC: the regex IRC is really good at figuring out regex, just provide what you want to test and your expecting result.
<lethjakman>
no?
<lethjakman>
then I've been missing out
<lethjakman>
good to know, thank you.
<RichardRaseley>
OK
<EminenceHC>
yoshie902a: Ah cool Ill check that out next time.
philcris_ has quit [Ping timeout: 252 seconds]
<rcs>
lethjakman: "regex alternation"
nszceta has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
nszceta has joined #ruby
<lethjakman>
rcs: you're totally right.
<lethjakman>
that's cool.
fantazo has quit [Ping timeout: 264 seconds]
zachallett has joined #ruby
<benzrf>
shevy: what should i make now
<benzrf>
(⊙ω⊙)
shadoi has joined #ruby
<havenwood>
gizmore: dunno what you mean by 'static variable'?
<benzrf>
i made an abominable script-kiddie enticing gem for easily adding security holes to your app
<benzrf>
whats next?
Hanmac has quit [Ping timeout: 260 seconds]
<havenwood>
gizmore: do you mean local or instance variables?
mercwithamouth has quit [Ping timeout: 252 seconds]
wildroman2 has joined #ruby
<shevy>
benzrf dunno
<shevy>
benzrf make more gems
<shevy>
benzrf the more you have, the more work you automatically have because of them
Elhu has quit [Quit: Computer has gone to sleep.]
<benzrf>
but
<RubyPanther>
The tricky part is to NOT match 10 digits. Unless, you wanted to. ;)
<benzrf>
i have no ideas
<benzrf>
;-;
coderhs has joined #ruby
<gizmore>
havenwood: classobject = Object.const_get('Ricer').const_get('Plugin').const_get(plugname); classobject shall get some variable that is kept when doing .new
coderhs has quit [Read error: Connection reset by peer]
<gizmore>
havenwood: like classobject.id_in_db = 4; ... and classobject.new shall keep it
ElComradio has quit [Ping timeout: 240 seconds]
enebo has joined #ruby
ElComradio has joined #ruby
<benzrf>
ttyl
benzrf has left #ruby [#ruby]
brennanMKE has quit [Remote host closed the connection]
Hanmac1 is now known as Hanmac
<Hanmac>
gizmore: const_get supports "::"
gittish has joined #ruby
<gizmore>
Hanmac: thank you
standyro2 has joined #ruby
<Hanmac>
classobject = Object.const_get("Ricer::Plugin#{plugname}") should work fine
<Hanmac>
ups forgot one "::"
francisfish has joined #ruby
dblessing has joined #ruby
nanoyak has joined #ruby
dkamioka has joined #ruby
<Hanmac>
havenwood: did you watch doctor who?
hamakn has quit [Remote host closed the connection]
soulcake has joined #ruby
Yahkob has quit [Remote host closed the connection]
<havenwood>
Hanmac: I did marathon some a few months back, but I just discovered it.
p4tux has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
brennanMKE has quit [Remote host closed the connection]
tt1187 has joined #ruby
dkamioka has quit [Remote host closed the connection]
p4tux has joined #ruby
mlpinit has joined #ruby
stuppy has joined #ruby
drumusician has joined #ruby
<AlexRussia>
shevy: lol, sinatra used rack?fun
centrx has joined #ruby
subbyyy_ has joined #ruby
tauebel has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<shevy>
I think they all do
<shevy>
rack became the ultimate web virus
jkamenik has quit [Quit: Leaving.]
<MrZYX>
gcds: that's calling Module#=== which, when passed an object checks if that objects class implements this module. It's a bad way to do object.is_a?
IceDragon has joined #ruby
sailias has quit [Quit: Leaving.]
<AlexRussia>
shevy: o, i start understand
kpshek has quit []
gcds has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
sailias has quit [Client Quit]
<AlexRussia>
shevy: when need make page, sart cycle get with name of page
<Hanmac1>
gcds: imo it can be shorted to set[:listener_opts] ||= Hash.new { |hash,key| hash[key] = {} }
<AlexRussia>
nice
<waxjar>
case statements use #=== to determine equality
Hanmac1 is now known as Hanmac
<MrZYX>
waxjar: he got a ping timeout
rezzack has joined #ruby
decoponio has quit [Quit: Leaving...]
<waxjar>
ah, too bad
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thesheff17 has joined #ruby
cbetta_afk is now known as cbetta
sailias has joined #ruby
<shevy>
better ping timeout than nuke timeout
vlad_starkov has joined #ruby
vpretzel_ has joined #ruby
vpretzel_ has quit [Remote host closed the connection]
davy_ has quit [Remote host closed the connection]
<AlexRussia>
shevy: lol
burlyscudd has joined #ruby
asteros has quit [Quit: asteros]
lucasallan has quit [Remote host closed the connection]
shadoi has joined #ruby
<bleak>
oh god yeah no wodner i could never do anything with PHP
<AlexRussia>
bleak: also me
ArchBeOS-work has quit [Quit: Leaving]
<AlexRussia>
bleak: but -god
<shevy>
I could get simple websites
<shevy>
but the syntax is awful
<AlexRussia>
shevy: then you love rails....
Lewix has joined #ruby
stuppy has quit [Quit: Leaving]
jerius has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
mailo has joined #ruby
<shevy>
why?
mailo has quit [Client Quit]
<shevy>
rails is huge
rh1n0 has joined #ruby
<shevy>
I want small and thin thingies
<shevy>
like LEGO building blocks
<RubyPanther>
If you want to see the difference between a language designed by a linguist and one designed by democracy, compare Perl 5 and Perl 6.
workmad3 has quit [Ping timeout: 252 seconds]
njs126 has quit [Ping timeout: 248 seconds]
<AlexRussia>
shevy: then what you used?
<RubyPanther>
I'll take "least Matz' surprise" over any of it
amacgregor_ has joined #ruby
freerobby has quit [Quit: Leaving.]
<centrx>
PHP is an abomination.
<shevy>
AlexRussia cgi still, perhaps sinatra one day now that I know I can write class-based code (I need classes, I can't work without classes anymore)
<centrx>
Spread the word.
<shevy>
centrx spreads PHP
<Hanmac1>
RubyPanther: thm was he a scholar of "Wen the eternally surprised" ? ;P
<shevy>
abominate him
amacgregor_ has quit [Client Quit]
Hanmac1 is now known as Hanmac
thesheff17 has joined #ruby
<shevy>
RubyPanther well there was no dictator in charge!
yazdmich has quit [Quit: Oh No]
OdNairy has joined #ruby
<shevy>
you need the guy who tells people "ok, you are next to jump outta the window now"
Hobogrammer has quit [Ping timeout: 248 seconds]
<shevy>
RubyPanther: jump outta the window now
<AlexRussia>
shevy: then you used only cgi?okay
<shevy>
AlexRussia I used sinatra and rails but not much. my local knowledgebase is still in .cgi files
<AlexRussia>
shevy: okay, okay
<shevy>
AlexRussia i bundle things that are useful together in custom files
teddyp1cker has quit []
<AlexRussia>
shevy: me liked sinatra now, idk, what further
<plato>
hi guys I am working through the rubymonk tutorials, and I am getting a syntax error when I am trying to define a method that takes an arbitrary number of integers plus an options hash. this is what I am trying: def calculate(*n, opts={})
<AlexRussia>
is decentralized blog network, yes, like it
jack_rabbit has quit [Remote host closed the connection]
<RubyPanther>
Like Larry Wall said, Hubris is a virtue of a language designer. It is an arrogant thing to say you can design a better language. Now consider PHP; it is arrogant enough to claim to be able to do better, but then on the other side, it claims programmers don't know anything about what goes into a language. So it has the arrogance, but would never support the hubris.
IceDragon has quit [Ping timeout: 245 seconds]
<AlexRussia>
shevy: time at time i used it and try help developers in bug
IceDragon has joined #ruby
<AlexRussia>
now i have learning ruby good and write light version
<shevy>
good!
<shevy>
go write more ruby
<shevy>
abandon your dark PHP past
Jdubs has joined #ruby
<AlexRussia>
shevy: i afraid big diaspora engine, what written now
<AlexRussia>
shevy: PHP PHP PHP
<MrZYX>
plato: ruby can't tell whether to assign an argument to n or opts, since there's no type enforcement or hinting
cj3kim has quit [Remote host closed the connection]
<xybre>
plato: instance_of? only matches the class name, while is_a? will match any of the ancestors. ex: `class Foo < Array; end; Foo.new.is_a? Array #=> true; Foo.new.instance_of? Array #=> false; Foo.new.instance_of? Foo #=> true`
mark_locklear has quit [Quit: Leaving]
Krajsnick has joined #ruby
standyro2 has joined #ruby
ElComradio has joined #ruby
Jdubs has joined #ruby
Jdubs has quit [Remote host closed the connection]
<AlexRussia>
shevy: like?
<AlexRussia>
XD
<RubyPanther>
AlexRussia: "everybody" uses git now
<AlexRussia>
RubyPanther: iep, and is hurt for me
ElComradio has quit [Client Quit]
<AlexRussia>
yep*
<RubyPanther>
I actually liked svn's branching model better. But using a niche source control is pain, even if you like it better
sambao21 has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
freezey has joined #ruby
prc has quit [Ping timeout: 272 seconds]
thams has joined #ruby
<shevy>
AlexRussia lol is that sinatra?
<AlexRussia>
RubyPanther: lol
<AlexRussia>
shevy: yep
krisbulman is now known as [krisbulman]
<AlexRussia>
shevy: written in first minute reading manual
wildroman2 has quit [Remote host closed the connection]
tauebel has quit [Quit: Leaving.]
jerius has joined #ruby
Evenix has quit [Ping timeout: 252 seconds]
fedesilva has quit [Read error: Connection reset by peer]
heidi has joined #ruby
fedesilva has joined #ruby
freezey has quit [Ping timeout: 272 seconds]
<centrx>
Latest update from ##php: "<bieb> where can I find a how-to to upgrade php on a windows server running IIS 7?"
nanoyak has joined #ruby
enebo has quit [Quit: enebo]
tauebel has joined #ruby
<AlexRussia>
centrx: hahahaa, php-news on ruby channel
<RubyPanther>
We need more insulation in the walls, I think I just heard some derping from another channel
vlad_starkov has joined #ruby
petey has joined #ruby
rudisimo has quit []
<shevy>
centrx php says
<shevy>
"we wanna cater to the newbies"
wildroman2 has joined #ruby
<AlexRussia>
RubyPanther: You liked me XD
mloveless has quit [Remote host closed the connection]
<shevy>
nobody likes you AlexRussia
<shevy>
:>
freerobby has quit [Quit: Leaving.]
<AlexRussia>
shevy: 3<<
meatherly has quit [Remote host closed the connection]
<AlexRussia>
XD
<RubyPanther>
ya ne ponimayu
pietr0 has quit [Quit: pietr0]
<AlexRussia>
RubyPanther: da ladno
<AlexRussia>
RubyPanther: klassno poshutil
meatherly has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<AlexRussia>
RubyPanther: pro teplizolyaciu
nathancahill has joined #ruby
<AlexRussia>
RubyPanther: another russian man
subbyyy_ has joined #ruby
<shevy>
kurwa
yeboot has quit [Quit: leaving]
<AlexRussia>
shevy: kozel
aryaching_ has joined #ruby
<shevy>
wtf is a kozel
<shevy>
is that like a weazel?
<hoelzro>
a goat
<AlexRussia>
shevy: because kozel
<AlexRussia>
shevy: no
<AlexRussia>
kozel is like kozel
<AlexRussia>
kozel
<AlexRussia>
XD
<AlexRussia>
okay, you named it goat
zachallett has quit [Remote host closed the connection]
<terrellt>
Wikipedia says he's insulting you, and if this is prison you have to kill him now.
<terrellt>
Wikipedia is always right.
simplyaubs_ has quit [Quit: simplyaubs_]
<popl>
woo, stereotypes
sambao21 has joined #ruby
<AlexRussia>
MrZYX: yeah, last change in repo 5 months ago XD
maletor has joined #ruby
sparrovv has quit [Remote host closed the connection]
MattStratton has quit [Ping timeout: 260 seconds]
aryaching has quit [Ping timeout: 245 seconds]
<AlexRussia>
terrellt: lol, is you have kill me?
rmorello has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<MrZYX>
AlexRussia: the protocol doesn't change that often
<AlexRussia>
AlexRussia.kill? #=> false
<AlexRussia>
XD
<AlexRussia>
MrZYX: hmm,ok
meatherly has quit [Ping timeout: 272 seconds]
acrussell has quit [Quit: Leaving.]
<AlexRussia>
MrZYX: you have say, is endedproject now?
freezey has joined #ruby
standyro2 has quit [Ping timeout: 272 seconds]
<MrZYX>
what is?
aspires has joined #ruby
<AlexRussia>
MrZYX: you have say, is ended project now?
<MrZYX>
I understood the words, not sure about the meaning/context... the gem or diaspora?
danshult_ has quit [Remote host closed the connection]
havenwood has joined #ruby
<AlexRussia>
MrZYX: diaspora-federation
<AlexRussia>
XD
danshultz has joined #ruby
Hobogrammer has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
<MrZYX>
well, it should work but we still have integration and throughout testing pending, so they might be changes in the course
freerobby has joined #ruby
<AlexRussia>
MrZYX: nice, i try when get free time and understand sinatra
<MrZYX>
once we ripped out the federation code out of diaspora and replaced it with the gem the long-term plan is to abstract it away from a single protocol and to provide additional backends to easily iterate on the protocol as well as to add compatibility to other protocols
mlpinit has joined #ruby
<AlexRussia>
MrZYX: uhum
zachallett has joined #ruby
mlpinit has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
burlyscudd has quit [Quit: Leaving.]
mlpinit has joined #ruby
DarthGandalf has quit [Quit: Bye]
mocfive has joined #ruby
sambao21 has joined #ruby
Deejay_ has joined #ruby
shoMo has quit [Quit: leaving]
<AlexRussia>
MrZYX: federation is name of protocol?
sambao21 has quit [Client Quit]
<MrZYX>
the protocol doesn't really have a name, but it does the federation of messages inside the network ;)
<AlexRussia>
MrZYX: ah, ok
Evenix has joined #ruby
pskosinski has quit [Remote host closed the connection]
meatherly has quit [Read error: Connection reset by peer]
deception has quit [Quit: Goodbye]
meatherly has joined #ruby
freezey has quit [Read error: Connection reset by peer]
ElComradio has quit [Quit: ElComradio]
<centrx>
Okay, I have picked up one convert from #sql
<centrx>
I haven't gotten anyone from ##php yet
DarthGandalf has joined #ruby
_bart has joined #ruby
Notte has quit [Remote host closed the connection]
phipes has joined #ruby
meatherly has quit [Ping timeout: 264 seconds]
maletor_ has joined #ruby
maletor_ has quit [Client Quit]
jack_rabbit has joined #ruby
ndrei has joined #ruby
maletor has quit [Ping timeout: 240 seconds]
Jdubs has quit [Remote host closed the connection]
octoberry has joined #ruby
Evenix has quit [Ping timeout: 252 seconds]
cj3kim has quit [Remote host closed the connection]
sambao21 has joined #ruby
andrewhl has joined #ruby
maletor has joined #ruby
octoberry has quit [Ping timeout: 240 seconds]
mloveless has joined #ruby
sparrovv has joined #ruby
failshell has quit []
maletor_ has joined #ruby
xcv has quit [Remote host closed the connection]
davy_ has joined #ruby
yalue has quit [Quit: Leaving]
ndrei has quit [Ping timeout: 245 seconds]
maletor has quit [Ping timeout: 248 seconds]
cj3kim has joined #ruby
standyro2 has joined #ruby
ce_afk is now known as cescalante
dkamioka has joined #ruby
mloveless has quit [Remote host closed the connection]
Txandy|away is now known as Txandy
maletor_ has quit [Read error: Connection reset by peer]
Guest64258 has quit [Ping timeout: 264 seconds]
maletor has joined #ruby
raar has joined #ruby
nowthatsamatt has joined #ruby
raar is now known as Guest14860
nanoyak has quit [Quit: Computer has gone to sleep.]
burlyscudd has joined #ruby
eFeXeN has quit []
nowthatsamatt has quit [Client Quit]
cj3kim has quit [Remote host closed the connection]
freezey has joined #ruby
wildroman2 has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
wildroman2 has joined #ruby
rayners has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 252 seconds]
zachallett has quit [Remote host closed the connection]
heidi has quit [Quit: Leaving.]
heidi has joined #ruby
platzhirsch has joined #ruby
<shevy>
wat
<shevy>
you steal people centrx?
<platzhirsch>
Thief!
<shevy>
Murderer!
w4pm has quit [Ping timeout: 245 seconds]
<havenwood>
anyone want to dress up with me like Jehovah's Witnesses and go to Pythonista meetups in search of converts?
<dorei>
lol
mocfive has quit [Remote host closed the connection]
<AlexRussia>
lol
<shevy>
hmm
daxroc has joined #ruby
<platzhirsch>
"So you are still using Python, ain't you? Do you realize that it is the most famous programming language to teach kids to code? Makes you wonder, no?"
maletor_ has joined #ruby
<shevy>
I had two female jehovah's witnesses before my flat about 8 weeks ago or such
maletor_ has quit [Read error: Connection reset by peer]
<platzhirsch>
oh my
maletor has quit [Read error: Connection reset by peer]
<kirun>
Maybe I should dress in a maid uniform.
maletor has joined #ruby
<agent_white>
Send me pictures
<agent_white>
plz
<MrZYX>
hah, mine were only a week ago
<shevy>
they started their speech first by praising how great the garden looks (community garden for several flats outside), then continuing to ask me why there is so much pain and suffering in the world
<kirun>
Not to convert anyone, just it might be fun.
<shevy>
MrZYX how did you manage to drive them away again?
davy__ has joined #ruby
<dorei>
kirun: r u into cosplay?
ndrei has joined #ruby
<MrZYX>
<open door> "Hi, bla website bla", "I'm an atheist, have a nice day" <close door>
davy__ has quit [Remote host closed the connection]
<kirun>
I've got as far as watching hjfreaks videos and going "hmm..."
iamsean has joined #ruby
<dorei>
or satanist for a bit more trolling xD
<platzhirsch>
Let's raid #python
sailias has quit [Quit: Leaving.]
<platzhirsch>
no prisioners
<shevy>
MrZYX hehe
<shevy>
platzhirsch I can't
wtfitsme has quit [Quit: wtfitsme]
<MrZYX>
I had to prepare an exam, otherwise I'd tried to convert them to diskordianism of course
<shevy>
bastards built a defence called nick-registration :(
<platzhirsch>
^^
IceyEC has quit [Quit: IceyEC]
nanoyak has joined #ruby
tauebel has quit [Quit: Leaving.]
<shevy>
platzhirsch also they made python an illegal nick :( :( :(
<platzhirsch>
This is outrageous
<shevy>
they are not very fun people, considering!
wtfitsme has joined #ruby
wtfitsme has quit [Client Quit]
<platzhirsch>
They are not, the topic says: no LOL.
sbos99 has joined #ruby
<shevy>
must be the frustration they had to python3 transition :>
<platzhirsch>
Python 3 is there on going mid-life crsis
<platzhirsch>
a bugged one, which will never end, har har
<platzhirsch>
s/there/their
jedimind has quit [Quit: heading out]
<centrx>
yes, that Python 3 transition seems very bizarre
freerobby has quit [Quit: Leaving.]
<centrx>
Very few upgrades, and the whole was just a few almost-pointless changes
grzywacz has joined #ruby
burlyscudd has joined #ruby
thesheff17 has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
maletor has quit [Ping timeout: 252 seconds]
<platzhirsch>
Was it? Is it? I thought Python 3 is pretty sweet, just it's not really used so much in production
davy_ has quit [Ping timeout: 272 seconds]
veduardo has joined #ruby
<shevy>
well
lkba has quit [Ping timeout: 252 seconds]
<centrx>
Top change in Python 3: "Print is a Function"
Jdubs has joined #ruby
<shevy>
:\
<platzhirsch>
naw :)
davy_ has joined #ruby
Yahkob has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<havenwood>
I've been looking at python code today for work...
* havenwood
eyes glaze over...
<platzhirsch>
Although I must give you credit centrx. It's the first named change in the 'What's New in Python' lol
<centrx>
Yes, exactly
Yahkob has joined #ruby
<centrx>
"Randomly Sorted List of Changes in Python 3"
maletor has joined #ruby
sbos99 has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
help_please has joined #ruby
jamto11 has joined #ruby
<agarie>
python3 is actually pretty cool, the adoption rates that are stupid lol
allaire has joined #ruby
Yahkob has quit [Ping timeout: 240 seconds]
<agarie>
I work for a python company and it's awful... there isn't anything near bundler
mmcdaris has left #ruby [#ruby]
<platzhirsch>
Well, there can only be one king of bleeding edge
terrellt is now known as terrellt_Marco
kaldrenon has quit [Remote host closed the connection]
davy_ has quit [Remote host closed the connection]
terrellt_Marco is now known as terrellt
RubyWarrior has joined #ruby
<RubyWarrior>
With the power of grayskull
* RubyWarrior
draws bleeding edge sword
<agarie>
I like python the language and its scientific libraries, but in my experience the community is... blergh
<RubyWarrior>
Where is the snake, I will behead it
olivier_bk has joined #ruby
<banister>
RubyWarrior i once knew a girl called pandora…never got to see her box though
petey has quit [Remote host closed the connection]
Clooth has quit [Quit: Leaving...]
wildroman2 has quit [Remote host closed the connection]
maletor has quit [Ping timeout: 265 seconds]
ttkr has joined #ruby
maletor_ has joined #ruby
<RubyWarrior>
This pun was too fucking hard
* RubyWarrior
dies
RubyWarrior has quit [Client Quit]
sparrovv has quit [Remote host closed the connection]
<help_please>
I have an unrelevant question for all my rubyist
<help_please>
So I finished an interview right.
wildroman2 has joined #ruby
<centrx>
help_please, Go on..
<help_please>
And I found out that m interviewer likes the piano and reading the New York times.
<centrx>
What a loser
<help_please>
What should I put in the thank you laetter?
<help_please>
letter* I hate my HP laptop..
thesheff17 has joined #ruby
kpshek has quit []
<centrx>
Obviously, something that includes the concepts "piano", "New York Times", and "Ruby"
<agarie>
Do you know anything about the piano?
<platzhirsch>
I like watching you playing the piano…naked?
<help_please>
centrx oooo really???
<help_please>
I know that, I mean like what though without blowing it for myself.
jerius has quit [Ping timeout: 248 seconds]
<terrellt>
help_please: What should you pit in the thank you letter?
<benzrf>
ubuntu is basically debian but with better support for proprietary stuff and also works ootb
<platzhirsch>
I am not so religious about this choice, if people want to speed some hours in the ArchLinux wiki, ... fine!
<CourtJesterG>
Linux sucks cause it doesn't use a hybrid kernel and is stuck on a monolithic kernel
meatherly has quit [Ping timeout: 245 seconds]
<RubyPanther>
it's all *nix to me, I don't care
robbyoconnor has joined #ruby
<RubyPanther>
CourtJesterG: 1995 called and wants its FUD back
amedeiros has quit []
<benzrf>
RubyPanther: i tend to feel similarly about *nixes
<benzrf>
usually
senj has quit [Quit: Sleep Now]
<benzrf>
i feel like os x is a bit nonmodular
<shevy>
benzrf and unity
<benzrf>
but w/e
<benzrf>
shevy: which can be replaced in 10s ;)
<shevy>
10s
<RubyPanther>
if you use their crap, sure. But you don't have to, you can build a normal *nix toolchain there.
rubyracer has quit [Ping timeout: 272 seconds]
<shevy>
DO I GET A CHOICE WHETHER I WANT UNITY OR NOT
<popl>
whether you want it? sure
<shevy>
yeah RubyPanther that's my man!
<popl>
whether you get it? maybe not
jack_rabbit has joined #ruby
<CourtJesterG>
What about 1995? Also can someone answer my quesiton about the path with homebrew and ruby
diegoviola has joined #ruby
<CourtJesterG>
Do I add this to my path /usr/local/opt/ruby/bin or do I add /usr/local/opt to my path
maletor has joined #ruby
senj has joined #ruby
<shevy>
you use homebrew. isn't that OSX?
<shevy>
that path is totally crazy
iamsean has quit [Quit: iamsean]
<benzrf>
the main thing i dislike about osx is that the layer between the unix and the UI is a bit thick
<shevy>
CourtJesterG just think about it why /opt was created
<CourtJesterG>
actually there is also a fork for homebrew to use it with Linux also
<platzhirsch>
I always cut my lower arm on the aluminum unibody, so no MacBook for me
<yxhuvud>
lol@usr local opt bin
<diegoviola>
i don't like osx/apple
<shevy>
CourtJesterG you have: /usr /usr/local and /opt ok
<diegoviola>
linux ftw
<RubyPanther>
benzrf: You don't really need their UI, do you? Can't you just use X11?
robbyoconnor has quit [Excess Flood]
<shevy>
CourtJesterG to make something like /usr/local/opt is just insanity. even the first three are already insane
ElComradio has joined #ruby
tauebel has quit [Quit: Leaving.]
brennanMKE has joined #ruby
<waxjar>
CourtJesterG: i'd go the "traditional way" and install ruby with ruby-build/ruby-install and manage the versions with chruby/rbenv/rvm
<CourtJesterG>
well I decided to give homebrew a try again
robbyoconnor has joined #ruby
iamsean has joined #ruby
pskosinski has joined #ruby
<shevy>
I think homebrew works
<benzrf>
RubyPanther: well i was referring to things like
AlexRussia is now known as AlexRussia_Away
<CourtJesterG>
I was using fink
<shevy>
they are on #machomebrew btw
<shevy>
157 people there
<shevy>
all OSX folks
<platzhirsch>
I think what makes OS X really superior is native support for Office and Photoshop
<CourtJesterG>
and well for some reason I had applications on my system start to delete
<benzrf>
how 'user accounts' in osx dont map directly to unix accounts
<diegoviola>
chruby/ruby-install is <3
<waxjar>
macho me brew
<benzrf>
platzhirsch: pls say you are trolling
tauebel has joined #ruby
<shevy>
platzhirsch libreoffice does not work?
<platzhirsch>
lol
<platzhirsch>
benzrf: no, it was the only reason I was thinking about joining the Apple some years ago
<CourtJesterG>
mac os x isn't actually unix
enebo has joined #ruby
<shevy>
it is not unix hmmmmmm
<CourtJesterG>
it using a unx kernel
<CourtJesterG>
the x is used as an acnomy
<RubyPanther>
yes it is
mojjojo has joined #ruby
<platzhirsch>
LibreOffice gives me the creep. It's okay if I want to print some words on a paper or list some numbers, but for everything else I fire up my Windows VM
prc has joined #ruby
popl has quit [Quit: Touch the frog.]
<diegoviola>
uses LaTeX for any serious document
<RubyPanther>
OS X is NeXTSTEP + fbsd
<shevy>
platzhirsch yeah, some design quirks I guess exist
<platzhirsch>
virtual, that's how I like my windows instance... I call it the gimp. The gimp's sleeping most of the time, you know
<diegoviola>
you can't beat the quality that you get out of LaTeX
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
<shevy>
diegoviola but normal people can use libreoffice, unlike latex
<diegoviola>
and the fact that you can put your .tex documents in git is a major win
x77686d has quit [Ping timeout: 252 seconds]
kraljev5 has quit [Quit: kraljev5]
<agarie>
LaTeX <3
<platzhirsch>
diegoviola: Yes, but sometimes MS Word is the interface to the business world
<RubyPanther>
gimp -i
<diegoviola>
shevy: LaTeX is not /that/ hard
rubyracer has joined #ruby
<benzrf>
CourtJesterG: what is an acnomy
<CourtJesterG>
Wikipedia says "XNU is the computer operating system kernel that Apple Inc. acquired and developed for use in the Mac OS X operating system and released as free and open source software as part of the Darwin operating system. XNU is an acronym for X is Not Unix"
<waxjar>
it's harder than a nice slick gui
Noldorin has quit []
burlyscudd has joined #ruby
postmodern has joined #ruby
breakingthings has quit []
<benzrf>
what a gnu ripoff
<platzhirsch>
diegoviola: You can even outsource the actual text to text files and people can just put their stuff in them and you do the compiling
<CourtJesterG>
Well to make XNU they actually merged two kernels into one
interactionjaxsn has quit [Remote host closed the connection]
<CourtJesterG>
hence the hybrid kernel
<diegoviola>
I wrote my resume in LaTeX in 1 day without knowing the markup and I even got it localized in two languages (the same document in two languages)
<RubyPanther>
In my world a "serious" document does not get a bunch of time being primped and preened, that is for non-serious documents
<diegoviola>
well, I actually knew a little about LaTeX already to be honest
<diegoviola>
platzhirsch: right
<platzhirsch>
diegoviola: But it's really not the problem when you do documents for yourself
ElComradio has quit [Quit: ElComradio]
maletor has quit [Ping timeout: 245 seconds]
<diegoviola>
I imagine TeX can be hard when you have to write the class from scratch
<platzhirsch>
Most of the time the question is anyway, where does there have to be a document
<platzhirsch>
s/where/why
<diegoviola>
but using an existing class is easy
shadoi has quit [Quit: Leaving.]
AlexRussia has joined #ruby
<AlexRussia>
heh
<CourtJesterG>
X11 sucks
davy_ has quit [Remote host closed the connection]
maletor has joined #ruby
<CourtJesterG>
Wayland is better
EngierkO_ has joined #ruby
<CourtJesterG>
Weston is better
<diegoviola>
sure
nomadic has quit [Ping timeout: 241 seconds]
Xeago has quit [Remote host closed the connection]
<platzhirsch>
CourtJesterG: is it?
<diegoviola>
soon enough all DEs are going to be on wayland already
<shevy>
and neither of them can be a drop-in replacement for X11 yet
<CourtJesterG>
From what I read it is
<AlexRussia>
slol
<platzhirsch>
What's the advantage?
raar has joined #ruby
<CourtJesterG>
still you need something to draw with
nomadic has joined #ruby
shadoi has joined #ruby
<benzrf>
x10 is so much better gosh
danshultz has joined #ruby
raar is now known as Guest23146
<diegoviola>
GNOME already works on wayland
<diegoviola>
KDE soon will too
maletor_ has joined #ruby
<diegoviola>
E19 is going to be wayland only
EngierkO has quit [Ping timeout: 252 seconds]
<platzhirsch>
Who uses GNOME or KDE?
<CourtJesterG>
why is it x11 or XQuartz both use mesa version dated back to 2007, and not the recent in there builds which is version 10 and change/
<shevy>
platzhirsch I bought a tiny USB stick and I forgot when :(
_bart has quit [Remote host closed the connection]
<CourtJesterG>
yeah but they are using mesa version 7 something
<shevy>
it is like only 1cm in length
<platzhirsch>
lol
<platzhirsch>
Why is the when important?
flori has quit [Read error: Operation timed out]
flori has joined #ruby
<CourtJesterG>
am going to build an operating system completely in ruby
<diegoviola>
Weston feels very nice, using it is like "I don't want to go back to X anymore because this thing rocks, but I have to anyways since all my programs are there"
<platzhirsch>
diegoviola: You are experimenting a lot with that?
<diegoviola>
for the time being anyway
mercwithamouth has quit [Ping timeout: 245 seconds]
<platzhirsch>
why
<MrZYX>
yeah, sad that xwayland didn't make it into 1.15
<diegoviola>
platzhirsch: I run Weston a few times, when xwayland is merged with xorg-server I can use it full time I guess
<CourtJesterG>
well you could just use wayland and also use x, though I think that is kinda retarded if they are trying to replace x
maletor has quit [Ping timeout: 272 seconds]
<shevy>
CourtJesterG \o\
<diegoviola>
platzhirsch: installing weston in arch is as simple as a pacman -S weston
<shevy>
CourtJesterG what name will you give that OS
<diegoviola>
platzhirsch: so i gave it a try a few times
<platzhirsch>
You are all very well educated with different system components. Now I will feel like the Windows user of Linux
EngierkO_ has quit [Ping timeout: 252 seconds]
Al__ has joined #ruby
caustic has joined #ruby
<shevy>
platzhirsch yes. you damn noob! start compiling things from source!!!
<CourtJesterG>
Shevy unsure maybe ME
<shevy>
millenium edition???
<diegoviola>
thanks
<platzhirsch>
shevy: last time I did, my system was bricked
<platzhirsch>
don't make me do it
<shevy>
hehe
<shevy>
the more you try the more you learn
angusigu1ss has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<shevy>
I have only glibc left to tackle, then I am 100% clean!
<MrZYX>
platzhirsch: check toast if writing packages for your system is too hard for you
iamsean has quit [Quit: iamsean]
<platzhirsch>
Toast? Well no reason to insult me, I don't eat toast, only whole grain
<platzhirsch>
shevy: Obviously, that's why your nickname is so short
<shevy>
I had a longer nick, but then I decided to shorten it
<shevy>
I think short nicks are better
<shevy>
platzhirsch as nick is ok though
<platzhirsch>
MrZYX: used a lot?
<shevy>
those non-german speaking guys just won't understand that nick
mercwithamouth has joined #ruby
<MrZYX>
platzhirsch: in general or by me?
<platzhirsch>
MrZYX: in doubt, both
Al__ has quit [Read error: Connection reset by peer]
<MrZYX>
in general no idea, by me only for systems I have no control over. If I have control I run arch on it and just write PKGBUILDs
Al__ has joined #ruby
enebo has quit [Quit: enebo]
<benzrf>
my nick is pretty short
<platzhirsch>
shevy: haven't heard a native American or Brit pronounce platzhirsch, I want to see that
<benzrf>
not quite as short as shevy though
<platzhirsch>
I know! They always leave me questions at the end of Skype interviews
<shevy>
Platz frei! Hier kommt der platzhirsch!
<benzrf>
is it PLATS-heersh
<shevy>
benzrf do you know what a platzhirsch is
<benzrf>
nope O-o
<shevy>
benzrf the online translator says "old bull" or "top dog"
cescalante is now known as ce_afk
<benzrf>
hm ok
<shevy>
in my personal translation, it is a (male) deer that controls a territory, looks mighty and powerful and is sexually hyperactive AND THE BOSS ON THE AREA
vlad_starkov has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<shevy>
if you hear the name itself "platzhirsch", that is mightily epic
<shevy>
"Look, here comes the (reigning) platzhirsch!"
jack_rabbit has quit [Ping timeout: 264 seconds]
<shevy>
there is another cool nick here...
<shevy>
but he is not here
<shevy>
:(
Amart41 has quit [Remote host closed the connection]
<shevy>
brotspinne
<shevy>
dual german words can be quite cool
Amart41 has joined #ruby
<shevy>
kindergarten
<platzhirsch>
:D :D :D
drumusician has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
and marks his territory with urine
<shevy>
and roars loudly
drumusician has joined #ruby
<shevy>
man, you are disgusting platzhirsch
vlad_starkov has quit [Read error: Connection reset by peer]
p8952 has quit [Read error: Operation timed out]
<platzhirsch>
That was quite impressive laudatory speech on me shevy, thanks
<shevy>
yeah
<shevy>
cool nicks are epic
<shevy>
I am the epic-builder
phansch has quit [Quit: Leaving]
<platzhirsch>
Building is always good. Building is not consuming. Building is creating
<shevy>
yeah
<shevy>
I build up your fame
<platzhirsch>
Except no one is speaking anymore
<shevy>
then benzrf will destroy your fame
yfeldblu_ has joined #ruby
<shevy>
yeah
drumusician has quit [Remote host closed the connection]
<shevy>
not even benzrf
<shevy>
I guess he is coding on his second gem
<benzrf>
Nahra:
<benzrf>
*nah
<shevy>
lol
<benzrf>
im writing a simple linked list impl in C to make sure i understand C
<shevy>
oh man
Amart41 has quit [Ping timeout: 240 seconds]
<shevy>
you are a programming language ronin
<benzrf>
B)
<platzhirsch>
Jesus christ, is the whole world about interview questions these days
<benzrf>
platzhirsch: huh?
<shevy>
ask us one platzhirsch
<benzrf>
platzhirsch: i am not verifying my understanding of linked lists
<benzrf>
platzhirsch: i am verifying my understanding of pointers and stucts
<benzrf>
;p
<platzhirsch>
benzrf: C is the best language to implement these questions, because you exercise the linked list shit plus you re-learn the pointer stuff
<shevy>
Ok interview question - DO NOT GOOGLE
<shevy>
when was unix born?
<benzrf>
back in the 60s
<benzrf>
i think
<platzhirsch>
Unix is the father of Unicorn, so I don't know
asteros has quit [Quit: asteros]
<RubyPanther>
1969 summer of love?
<shevy>
Is printf() a part of the C programming language?
<benzrf>
it is part of the stdlib
iamsean has joined #ruby
<benzrf>
but it is not available without an include, I think
<benzrf>
vs. malloc
<diegoviola>
how did they came out with the idea of making programs small and with a single purpose? were programs big and bloated back then or what?
<RubyPanther>
C did not come with a stdlib :( an included stdlib is a major feature of modern languages
Hanmac1 has joined #ruby
<shevy>
man, RubyPanther we already know you are OLD
<platzhirsch>
is RubyPanther the mount of RubyWarrior?
<shevy>
benzrf, what is the address-of operator in C
Hanmac has quit [Ping timeout: 248 seconds]
<RubyPanther>
Ruby provides only a thin layer on top printf, because that C func is pretty good
<benzrf>
&
<benzrf>
prefix
mojjojo has joined #ruby
thams has quit [Quit: thams]
<shevy>
benzrf, can you return multiple values via return in C++?
<benzrf>
idk i dont know C++
<shevy>
(via a function)
<shevy>
well ok
<benzrf>
id imagine you can send back an arr
<shevy>
same question but in C
<shevy>
I dont know the answer in C though
<Hanmac1>
shevy not possible use a std::vector or a std::tulple
<shevy>
:)
<shevy>
that's how you know that Hanmac1 knows C++
drumusician has joined #ruby
<platzhirsch>
But I am not sure, isn't there a more fun exercise in C
Hanmac1 is now known as Hanmac
<benzrf>
Hanmac1: nonsense, vector is lowercase
mary5030 has quit [Remote host closed the connection]
<shevy>
What is the default value of $SAFE in ruby?
mojjojo has quit [Client Quit]
<benzrf>
what the hell is $SAFE
BladeSling has left #ruby [#ruby]
<Hanmac>
shevy: 0 is default for $SAFE
blackmes1 has quit [Ping timeout: 264 seconds]
<platzhirsch>
oh no, not $SAFE again
<shevy>
right!
[gmi] has quit [Quit: Leaving]
<shevy>
benzrf, you are learning C, the ruby questions are not for you
<diegoviola>
how did Unix devs came with the idea of making programs small and with a single purpose? were programs big and bloated back then or what?
help_please has quit [Ping timeout: 245 seconds]
<shevy>
I think they were fucking lazy
ndrei has quit [Ping timeout: 240 seconds]
<shevy>
why we had things like /etc
<shevy>
because anything more is so ANNOYING to type
<RubyPanther>
I meant computer interface, but yeah. Dull stones came before sharp stones.
danshultz has quit [Ping timeout: 265 seconds]
soulcake has joined #ruby
<platzhirsch>
Switches then, mechnical I guess ;)
<RubyPanther>
It takes years of cracking nuts with stones before you learn to smash people with them, and years more to choose a whole different rock
p8952 has joined #ruby
<platzhirsch>
So smashing someone's head against the stone is equivalent to adhering to the given type contract
mojjojo has quit [Quit: mojjojo]
w4pm has joined #ruby
<RubyPanther>
Well, NOT smashing their head, and just cracking the nuts, that would be adhering to the type contract
<platzhirsch>
Head implements Smashable<T>
<RubyPanther>
smashing heads is very dynamic
dx7 has quit [Ping timeout: 272 seconds]
flori has joined #ruby
muchi has quit [Quit: Connection closed for inactivity]
mzahir has quit [Quit: Connection closed for inactivity]
wildroman2 has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ckinni has joined #ruby
drumusician has joined #ruby
_maes_ has quit [Ping timeout: 248 seconds]
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
wildroman2 has quit [Ping timeout: 252 seconds]
hobodave has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Quit: Lost terminal]
x77686d has joined #ruby
Noldorin has joined #ruby
duggiefresh has quit [Remote host closed the connection]
aspires has quit [Remote host closed the connection]
p8952 has quit [Ping timeout: 272 seconds]
hfp has left #ruby [#ruby]
MrZYX is now known as MrZYX|off
aspires has joined #ruby
Jdubs has quit [Remote host closed the connection]
mojjojo has joined #ruby
kirun has quit [Quit: Client exiting]
lkba has joined #ruby
jamesaanderson has joined #ruby
<benzrf|afk>
platzhirsch: i prefer 'instance Head Smashable'
ponbiki has quit [Ping timeout: 248 seconds]
<benzrf|afk>
*flop those last two
benzrf|afk is now known as benzrf
<platzhirsch>
so I guess the dynamic version of that
Beoran has quit [Read error: Operation timed out]
xcv has joined #ruby
olivier_bk has quit [Ping timeout: 252 seconds]
thams has quit [Quit: thams]
<benzrf>
Head.send :include, Smashable?
<platzhirsch>
yeah
Yahkob has joined #ruby
xcv has quit [Remote host closed the connection]
<platzhirsch>
but don't drop the parentheses, that looks dirty
andrewhl has quit [Quit: andrewhl]
veduardo has left #ruby [#ruby]
asteros has joined #ruby
iamsean has quit [Quit: iamsean]
likemike has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
mojjojo has joined #ruby
davy_ has joined #ruby
<benzrf>
your mom looks dirty
<platzhirsch>
This came unexpected
<benzrf>
your mom came unexpected
<platzhirsch>
lol
<benzrf>
im sorry
<benzrf>
i have a problem
lfox has quit [Quit: ZZZzzz…]
<platzhirsch>
No problem, just sent a screenshot to the operators. Now #ruby will finally be merged with #defocus
<MJBrune>
lol
nateberkopec has quit [Quit: Leaving...]
dblessing has quit [Quit: dblessing]
Es0teric has quit [Quit: Computer has gone to sleep.]
<Nowaker>
parentheses is not enough, add ; to end of each line
ponbiki has joined #ruby
thams has joined #ruby
<benzrf>
then replace every do..end with {}
<Nowaker>
this will make the code even less dirty!
ponbiki is now known as Guest62859
<platzhirsch>
In my worst state of procrastination I join #defocus and join in into the drugged dance
<Nowaker>
benzrf: yeah, and wrap any code with class and public static void main method
davy_ has quit [Read error: Connection reset by peer]
drumusician has quit [Remote host closed the connection]
p8952 has joined #ruby
pietr0 has joined #ruby
davy_ has joined #ruby
<platzhirsch>
Nowaker: With Ruby 2.1 this can be nicely implemented because def method now returns the name as a symbol
burlyscudd has joined #ruby
<shevy>
thanks to Hanmac who suggested this feature
drumusician has joined #ruby
asteros has quit [Ping timeout: 265 seconds]
drumusician has quit [Remote host closed the connection]
<platzhirsch>
What?
<Hanmac>
shevy lies ... i wasnt it (as far as i know)
<shevy>
hmm
<shevy>
perhaps he suggested another feature
drumusician has joined #ruby
<shevy>
he writes so many proposals, I am losing track
chomskiii has quit [Read error: Connection reset by peer]
<platzhirsch>
wow
claymore has quit [Quit: Leaving]
<Nowaker>
phipes: that's absolutely right. we can now write in java
<Nowaker>
without jvm
Txandy is now known as Txandy|away
chomskiii has joined #ruby
<phipes>
Nowaker: what?
<Nowaker>
that's awesome
Txandy|away is now known as Txandy
<Nowaker>
platzhirsch not phipes, sorry
<platzhirsch>
#defocus is currently in a really bad state, don't join
silentpost has joined #ruby
silentpost has quit [Client Quit]
jtdowney has quit []
burlyscudd has quit [Ping timeout: 264 seconds]
baordog_ has quit [Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]]
havenwood has quit []
<platzhirsch>
shevy: There is even a kleine Ganz running around
ghanima has joined #ruby
nateberkopec has joined #ruby
Jdubs has joined #ruby
Beoran has joined #ruby
mojjojo has quit [Quit: mojjojo]
mojjojo has joined #ruby
thams has quit [Quit: thams]
Krajsnick has quit [Remote host closed the connection]
lucasallan has joined #ruby
<RubyPanther>
head.respond_to? :smash!
<shevy>
hehe
<platzhirsch>
oh a destructive method
<ghanima>
hello all question... i have a a but of JSON that I am trying to parse and I not sure how to go about it... I know how to interpret the JSON data using the JSON gem however what I am having trouble with is organizing the data... Once parsed in JSON the object that is returned our multiple hashs... each hash has a key titled id and shift_result. What I would like to do is evaluate each entry and put them in there own hash HOWEVER what I want to
<ghanima>
if that makes any sense
<platzhirsch>
destructive, literally, I see what you did there RubyPanther
<ghanima>
sorry if that is confusing i can try to provide a code sample if that makes sense
<ghanima>
ello all question... i have a a but of JSON that I am trying to parse and I not sure how to go about it... I know how to interpret the JSON data using the JSON gem however what I am having trouble with is organizing the data.
george2 has quit [Remote host closed the connection]
<platzhirsch>
shevy: Kleineganz: platzhirsch: your nick translates to "exploding make deer"
agent_white has joined #ruby
<ghanima>
Once parsed in JSON the object that is returned our multiple hashs... each hash has a key titled id and shift_result. What I would like to do is evaluate each entry and put them in there own hash HOWEVER what I want to do is that for each value
<ghanima>
returned by the key shift_result put that into a master hash and set assign an array that represents every ID from the JSON object with the same shift_result value
pietr0 has quit [Quit: pietr0]
<shevy>
indeed
<benzrf>
shouldnt be hard
<benzrf>
ghanima: something like this:
<shevy>
benzrf already finished dinner?
<benzrf>
master_hash = {}
Hanmac1 has joined #ruby
<benzrf>
json_result.each do |h|
allaire has quit []
<benzrf>
master_hash[h[:shift_result]] ||= []
nanoyak has quit [Quit: Computer has gone to sleep.]
maletor_ has quit [Quit: Computer has gone to sleep.]
<benzrf>
master_hash[h[:shift_result]] << h[:id]
<benzrf>
end
<benzrf>
something along those lines
thams has joined #ruby
asteros has joined #ruby
<ghanima>
benzf: thanks for that just a few questions