maletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
pocketprotector- has quit [Ping timeout: 240 seconds]
djellemah_ has joined #ruby
sandals has joined #ruby
rgtk has quit [Read error: No route to host]
sandals is now known as justbleed
Guest52888 has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
duckpuppy has quit [Ping timeout: 256 seconds]
arooni has quit [Ping timeout: 246 seconds]
rbennacer has joined #ruby
djellemah has quit [Ping timeout: 250 seconds]
rgtk_ has joined #ruby
bruno- has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
<havenwood>
goglosh: It's quite popular for such a purpose.
crdpink2 has quit [Quit: q term]
tkuchiki has joined #ruby
rbennacer has quit [Ping timeout: 256 seconds]
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk_ has quit [Ping timeout: 260 seconds]
bruno- has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
goglosh basically it's an improved perl variant so it works very well on *nix
rgtk has joined #ruby
crdpink has joined #ruby
wprice has quit [Quit: wprice]
arescorpio has joined #ruby
cwong_on_irc has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
theery has joined #ruby
<Ox0dea>
goglosh: Like peas in a pod, mate.
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
hmsimha_ has joined #ruby
bambanx has joined #ruby
<bambanx>
hi
ss_much has quit [Quit: Connection closed for inactivity]
<bambanx>
what is the difference when you use * or ** , in arguments of a method?
rgtk has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
vigintas has quit [Ping timeout: 240 seconds]
arescorpio has quit [Ping timeout: 244 seconds]
druonysus has quit [Remote host closed the connection]
<Ox0dea>
bambanx: * is the "splat" operator; you use it to accept and collect any number of positional arguments into an Array. ** doesn't really have a cute name, but it collects the implicit Hash argument.
K1MOS has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bambanx>
thanks Ox0dea when ** is used is optional too?
pathrocle has quit []
tref has joined #ruby
<Ox0dea>
bambanx: That's right, and it's the only significant difference between just accepting a final argument and having it catch the "implicit Hash" that can be supplied with any method call.
rgtk has quit [Ping timeout: 260 seconds]
<shevy>
hmm
tmtwd has joined #ruby
jcoe has joined #ruby
<shevy>
>> def foo(**i); p i; end; foo [1,2,3]
<ruboto>
shevy # => wrong number of arguments (1 for 0) (ArgumentError) ...check link for more (https://eval.in/460470)
<ruboto>
al2o3-cr # => /tmp/execpad-1fb759bd3c87/source-1fb759bd3c87:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/460475)
<ruboto>
Mon_Ouie # => /tmp/execpad-5855131cecfa/source-5855131cecfa:2: formal argument cannot be a constant ...check link for more (https://eval.in/460566)
<Mon_Ouie>
Oh, right, can't call a variable L like this :p
<pard>
it is then semi-correct then that l({:L=>12}) is exctly same as l(:L=>12) ?
<Ox0dea>
pard: Only if it's the final argument.
<pard>
thanks
juanpablo__ has joined #ruby
<Ox0dea>
You only get one "implicit" (read: braceless) Hash.
<pard>
Ox0dea, i actually thought it is always the final arg; are there any cases where it is not?
aevitas has quit [Remote host closed the connection]
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tlarevo has quit [Remote host closed the connection]
<pard>
Ox0dea, actually i was about to mention it :) it is just making me wonder even more -- it already is everywhere
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<Ox0dea>
pard: Everywhere?
<pard>
i can't know what ambiguity it might cause to have l = 12 => "e", 5 => "l"
<pard>
yes sir
<pard>
i guess it already _is_ in Everywhere -- calls, []'s, and so on ;why not there then?
ghoti has quit [Ping timeout: 246 seconds]
<Ox0dea>
pard: Do you know about parallel assignment?
<pard>
yes sir
<Ox0dea>
What should `a, b = a: 1, b: 2` do?
<pard>
the same thing that print a => 1, b => 1 does
<Ox0dea>
Assignment should do output...?
wildlander has quit [Quit: Saliendo]
<pard>
it will not treat a => 1 and b => 2 ndependently
karapetyan has quit [Ping timeout: 250 seconds]
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
How about `a, b, c = a: 1, 2, c: 3`, then?
<pard>
it would be an err; much like the print a: 1, 2, c: 5 is
<Ox0dea>
pard: But why? It could just as well result in two Hashes and a Fixnum being assigned independently.
niemcu has joined #ruby
colegatron has joined #ruby
mistermocha has joined #ruby
<Ox0dea>
This is what is meant by "ambiguity".
<pard>
Ox0dea, thanks :) that is actually my point -- print a: 1, 2, c: 5 could also mean that, but it won't
devoldmx has joined #ruby
<Ox0dea>
pard: I'm almost certain it *could* be done that way, but it'd be a nightmare on all sides.
<pard>
strange because i don't find it that dire :)
<pard>
particularly as it already is there, in things such as
<pard>
>> [print 12=>"e", 5=>"l"]
<ruboto>
pard # => /tmp/execpad-081d76a16bc6/source-081d76a16bc6:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/460574)
mistermocha has quit [Ping timeout: 246 seconds]
devoldmx has quit [Ping timeout: 250 seconds]
<Ox0dea>
It's available in places where the surrounding context helps narrow the field of reasonable interpretations; the RHS of an assignment is pretty much a free-for-all.
devbug has joined #ruby
<pard>
yes
<pard>
for the record though, this is not possibl either
<pard>
>>[print 12]
<ruboto>
pard # => /tmp/execpad-f48e71819edc/source-f48e71819edc:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/460575)
charliesome_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dellavg- is now known as dellavg
<pard>
i mean, at least in this case, the issue is more with sth else than with '=>' actually
devbug_ has quit [Ping timeout: 250 seconds]
dellavg is now known as Guest95707
treaki has joined #ruby
<arup_r>
can you see me ?
<pard>
?
trosborn has joined #ruby
blackmesa has joined #ruby
<pard>
Ox0dea, any ideas?
<Ox0dea>
pard: Nah, I've never bothered to dive in to figure that one out.
<pard>
:)
al2o3-cr has joined #ruby
<pard>
these are quirks for jerks ;that is the reason they are only attractive to me
<Ox0dea>
No offense taken, of course; I didn't actually write it. I told a neural network that I wanted a Sinatra app and trained it to despise alphanumerics.
SShrike has quit [Ping timeout: 260 seconds]
Musashi007 has joined #ruby
<pard>
LOL
l_tonz has joined #ruby
<pard>
honstly though, i can't tell what [*?` on #5 means
<Ox0dea>
pard: I'm actually only using the alphabet in calls to String#tr, and since my encoding only uses 23 symbols, it's fine as long as it's correct up to "w".
<pard>
thanks
Caius has quit [Ping timeout: 256 seconds]
<pard>
>> ["a".."z"].each { |l| eval("$-"+l) }
<ruboto>
pard # => no implicit conversion of Range into String (TypeError) ...check link for more (https://eval.in/460583)
<Ox0dea>
al2o3-cr: That's a lot of letters, though.
<pard>
i mean, are they so mportant they have $var names assiged to them?
<Ox0dea>
pard: It's just a convenience, really.
<pard>
thanks
<al2o3-cr>
Yeah, $$/$$ I like the best
KINGSABRI has quit [Ping timeout: 260 seconds]
decoponio has joined #ruby
Caius has joined #ruby
<pard>
it is so great being on this
<pard>
thanks a lot
pard has quit [Quit: Leaving]
<Ox0dea>
-~$. is sexy, but $. is dynamic.
inteq has joined #ruby
joonty has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<Musashi007>
Guys, I’m getting this error: https://gist.github.com/skuhn/027f8262968db945e0c5 in ruby in sinatra and I’ve been trying to track it down for several hours but I’m not having any luck. Would anyone be willing to point me in some direction?
Archyme has joined #ruby
bruno- has joined #ruby
tvw has quit []
<Ox0dea>
Musashi007: Are you able to post any code?
<linocisco>
Ox0dea, I dont know how to install by git and make
startupality has joined #ruby
jxs_ has joined #ruby
l_tonz has joined #ruby
weihan has joined #ruby
<Musashi007>
@0x0dea how can I pass a variable from one function to another when the functions define different routes?
arup_r has joined #ruby
<Ox0dea>
Musashi007: How do you mean? Are you actually drawing routes inside other methods?
<Musashi007>
I’m not sure on the terminology but I have a route which saves things into a string thats added to the web address which is basically a unique identifier and then calls another route
Mon_Ouie has quit [Quit: WeeChat 1.3]
<Musashi007>
btw, even making the variable global didn’t solve the problem
rikkipitt has joined #ruby
<Ox0dea>
Musashi007: Well, you didn't get a NameError if it was a global, so what happened?
l_tonz has quit [Ping timeout: 246 seconds]
<Musashi007>
I did, actually. I swear there is a typo and I am just missing it
ruurd has quit [Read error: Connection reset by peer]
agit0 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<akem>
no
charliesome has joined #ruby
solocshaw has joined #ruby
SCHAAP137 has joined #ruby
<Papierkorb>
Is there something like a weekly ruby/development challenge? Not where you create something big or 'new', more of the sort of developing and implementing a small algorithm to solve some kind of issue.
<Ox0dea>
Erik_Underline: That you even know to ask is arguably an answer to the question.
<Ox0dea>
Papierkorb: RPCFN is inactive, but there are some very nice challenges there.
ruurd has joined #ruby
[k- has quit [Quit: -a- IRC for Android 2.1.23]
Erik_Underline_ has joined #ruby
Erik_Underline has quit [Ping timeout: 246 seconds]
Igorshp has joined #ruby
<Erik_Underline_>
Ox0dea: Not really, I can't really imagine any good reason why you'd prefer Mac over Windows, but the opposite being very easy for me to do.
<Ox0dea>
Erik_Underline_: Please elaborate.
ruurd has quit [Client Quit]
vigintas has joined #ruby
<Papierkorb>
People prefer windows over anything? Wow
<Ox0dea>
> If I had asked people what they wanted, they would have said faster horses.
<Erik_Underline_>
The question is, what does mac do that makes rubyists prefer it over windows?
<Erik_Underline_>
Very simple question.
<havenwood>
Erik_Underline_: POSIX
<Papierkorb>
Erik_Underline_: (Note that I also don't like Mac or Apple in general): UNIX and POSIX
chipotle has quit [Quit: cheerio]
<Papierkorb>
A somewhat good and defined environment
<Ox0dea>
Erik_Underline_: The tools in Unix-y environments are designed to integrate with each other.
<Papierkorb>
Windows is like the wild west for software developers. everyone does his own thing, no consistency anywhere
<havenwood>
Erik_Underline_: OS X is one of the BSDs from the UNIX heritage.
bMalum has joined #ruby
<Ox0dea>
Are you two employed by AT&T or something? What's with the all caps?
<Ox0dea>
Erik_Underline_: Windows is having to go all over the place to get your groceries, and nobody will tell you what's in it; Unix delivers to your door with the recipes.
<Papierkorb>
Erik_Underline_: Just have a look at how software is installed. Pretend you know the softwares' name. Linux: Ask the package manager what the package is called, install it, done. 2 step process. You didn't waste time on clicking Next a thousand times, and you also don't have the Ask toolbar now. The software you DL'd is also malware free.
jgt has joined #ruby
<havenwood>
Ox0dea: touche
<Papierkorb>
Erik_Underline_: Windows: Google the program, try to find who's the actualy developer, try to find their webpage, hope that you got the right one and not a malware-ridden version of it, then click next, hope that you disabled all adware shit in the process, and then you may have a running application.
<Papierkorb>
Erik_Underline_: So, what of that is harder to do? What feels more consistent, and what of that is more wild west?
<Erik_Underline_>
Papierkorb: That's very true :P
rgtk has joined #ruby
<Papierkorb>
Oh, and now try to update the program. There must be like at least 5 update services running on a usual windows installation. what a waste of resources.
duckpuppy has joined #ruby
devoldmx has joined #ruby
CloCkWeRX has quit [Ping timeout: 264 seconds]
ruurd has joined #ruby
<Papierkorb>
Erik_Underline_: Also, a good dev environment is so much harder to do on windows. On linux, that's pretty much given on every major distro. if gem install complains about something it couldn't find, ask your package manager for it, install it, and try again. Done. Windows: Well, for one, install a C compiler, then pray that you have the right one if you're using binary libs somewhere (ABI incompatibilities!). The list goes on. On linux it's not
<Papierkorb>
fool proof. No doubt in that. But it's still so much easier to just get work done.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has quit [Ping timeout: 272 seconds]
<Ox0dea>
s/linux/not-Windows/
<Papierkorb>
Ox0dea: never used Mac on my own, can't say more about it than that I dislike their keyboard layout and Apple in general.
<Ox0dea>
Papierkorb: It's Unix...
duckpuppy has quit [Ping timeout: 244 seconds]
fantazo has quit [Quit: Verlassend]
devoldmx has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
h99h9h88 has joined #ruby
charliesome has quit [Client Quit]
ht__ has quit [Quit: Konversation terminated!]
charliesome has joined #ruby
ht__ has joined #ruby
rgtk` has joined #ruby
JammyHammy has joined #ruby
h99h9h88 has quit [Ping timeout: 240 seconds]
rgtk` has quit [Remote host closed the connection]
ruurd has joined #ruby
Musashi007 has joined #ruby
ruurd has quit [Client Quit]
c355E3B has joined #ruby
stannard has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
demonlove: I just used the Array#sample method to randomly pick one of the elements.
Z00t has quit [Client Quit]
<Erik_Underline>
I do, I'm gonna get a test machine to do some linux testing on it, you know
<Ox0dea>
lianj: If I'm not much mistaken, Erik_Underline is something of a "help vampire" that's just pouring out the blood. :<
<shevy>
yeah good old webchatster
<lianj>
oh like shevy then. thanks
<Ox0dea>
Not at all like shevy.
<shevy>
oh lianj are you the guy who is annoying as hell?=
<Erik_Underline>
I thought shevy was more advanced than me
<Erik_Underline>
Ox0dea then says "He is"
Z00t has joined #ruby
<demonlove>
he is
<Erik_Underline>
Wrong guess
<Erik_Underline>
xD
<shevy>
that's the problem with webchatsters
hippyphysicist has joined #ruby
Z00t has quit [Client Quit]
<Ox0dea>
Erik_Underline: We can't say how much more advanced shevy is than you; division by 0 is undefined.
<shevy>
I don't webchat!
<Ox0dea>
shevy: And you write Ruby!
<Erik_Underline>
You're not even allowed to try that :c
<Erik_Underline>
Hey, I know a bit of ruby, that's like 0.2 atleast in advancement
<shevy>
Ox0dea true
<Erik_Underline>
And like... 0.1 in python
<lianj>
Ox0dea: shevy is pretty advanced and old when it comes to trolls. it will grow on you
<shevy>
Ox0dea: lianj is pretty young and stupid. he won't grow
hippyphysicist has quit [Read error: Connection reset by peer]
<Ox0dea>
Erik_Underline: So, what's the game? Are you somehow able to perform the mental gymnastics necessary to equate asking stupid questions with becoming a better programmer?
DoubleMalt has quit [Remote host closed the connection]
<Erik_Underline>
Are you?
karapetyan has joined #ruby
<Erik_Underline>
Ox0dea:
<Ox0dea>
This is called deflection, incidentally, and it means there's a problem.
davedev24 has joined #ruby
<Erik_Underline>
Well, you deflected my deflection
karapetyan has quit [Remote host closed the connection]
l_tonz has joined #ruby
<Ox0dea>
> So, it has come to this.
<Erik_Underline>
I don't know what this is though :x
<Ox0dea>
That's the bug we're trying to fix.
<Erik_Underline>
def bug
<Ox0dea>
Yes, there is definitely a bug.
<Erik_Underline>
.-.
chouhoul_ has joined #ruby
Igorshp has quit [Remote host closed the connection]
cjbrambo has joined #ruby
jmarchello has quit [Quit: Leaving.]
zenguy_pc2 has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
chouhoul_ has joined #ruby
chouhoulis has quit [Ping timeout: 265 seconds]
rgtk has quit [Remote host closed the connection]
l_tonz has quit [Ping timeout: 250 seconds]
zenguy_pc has quit [Ping timeout: 256 seconds]
kies^ has joined #ruby
<Erik_Underline>
Ox0dea: Why didn't you write your code simple like this? = https://eval.in/460698
<Erik_Underline>
That, by any definition is an ad-hominem attack based on nothing.
<jhass>
Erik_Underline: now compare my input to the code behind the link
<jhass>
Erik_Underline: get over it, you don't want to fight it, you'll loose
<Erik_Underline>
Well I didn't know that.
<Erik_Underline>
I wasn't fighting it
<Erik_Underline>
pls
<Erik_Underline>
-.-
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hs366 has quit [Quit: Leaving]
claw has quit [Ping timeout: 265 seconds]
zenguy_pc2 has joined #ruby
rgtk has joined #ruby
Ulfalizer has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
<Ox0dea>
Erik_Underline: If you will maintain that you are not trolling (here meaning "feigning ignorance pursuant to the displeasure of others"), it must be concluded that you do not, at present, pay sufficiently close attention to detail for this programming thing to be your cup of tea.
claw has joined #ruby
diegoaguilar has quit [Quit: Leaving]
segfalt__ has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
but3k4 has joined #ruby
rikkipitt has joined #ruby
segfalt has quit [Ping timeout: 260 seconds]
cjbrambo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cjbrambo has joined #ruby
<shevy>
hmm... "gem install" will only install .gem files right? bundler however had also allows installation from e. g. github-based projects... that's one clear advantage that bundler would have compared to gem-installations?
<havenwood>
shevy: `gem install -g` will resolve dependencies from a Gemfile including installing gems directly from the Githubs.
dfinninger has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rgb-one>
I am working on a basic virus scanner application and would like to discuss it a bit
jackjackdripper has quit [Read error: Connection reset by peer]
<Success>
by the way how should I be accessing the url variable i legitimately edited the source code for each of these (i'm using gentoo and had it readily available) to pass it through something stupid i dont care to remember right now
jackjackdripper has joined #ruby
<Success>
like I want localhost/readme.md to read readme.md from the filesystem and parse it as html
<Success>
rgb-one: sure i've written some of those I'd love to discuss it :)
<Ox0dea>
rgb-one: Have you done some cursory research into how the established players do it?
favadi has joined #ruby
<rgb-one>
Ox0dea, Success, Cool :)
<Success>
rgb-one: remember that fbi virus, I wrote a patch that hp and lenovo silently pushed to all of their systems globally to fix it hehe. pretty proud xD
houhoulis has joined #ruby
<Success>
rgb-one how far are you, or have you started yet?
<rgb-one>
Success: I have started with the GUI but I haven't done much.
<Ox0dea>
rgb-one: You're doing it backwards. :<
segfalt__ has joined #ruby
<Success>
oX0dea, top down v. bottom up dude.
<rgb-one>
I've been putting the cart ahead of the horse, in that I haven't clarified my ideas and already I am coding.
<Success>
rgb-one but yes, usually you should write the gui as an interface to the cli
carvantes has joined #ruby
<rgb-one>
Success: Yea
<Success>
rgb-one: no worries man, it's youre first one, that's pretty common way (nubishly) of doing things, just know you'll end up rewriting it and being highly disatisfied
tmtwd has joined #ruby
<rgb-one>
Alright so I will clarify the scope of this application
<rgb-one>
thats another thing you know without boundaries I kinda go crazy with ideas and don't settle.
<rgb-one>
So the application is a basic virus scanner that will scan files to check if it is a virus by using its file signiature (md5, sha1)
centrx has joined #ruby
centrx has quit [Read error: Connection reset by peer]
Guest26537 has joined #ruby
<rgb-one>
So I will have a virus definitions database and if a file matches any of the definitions in the database, then it will be flagged as a virus and quarentined
<Ox0dea>
rgb-one: All five of them?
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rgb-one>
Ox0dea: five? What do you mean?
<Ox0dea>
rgb-one: I realize you're only doing it as an exercise, but do be mindful of the fact that very few real-world viruses are "static" enough for a simple checksum to reliably detect them.
<rgb-one>
Success: I think I will focus on the backend first
<Success>
>> 'foo' <<<< 'xy' # doesn't make sense
Laaw has joined #ruby
<ruboto>
Success # => /tmp/execpad-f1502b1332fb/source-f1502b1332fb:2: syntax error, unexpected << ...check link for more (https://eval.in/460738)
drPoggs has joined #ruby
BTRE has joined #ruby
Shidash has joined #ruby
JStoker has joined #ruby
<Success>
like i feel like this is to make a point in reference to somethin earlier but you win im not following XD
elektronaut has joined #ruby
<Ox0dea>
...?
akitada has joined #ruby
<Success>
OH I GET IT NOW THATS BRILLIANT
BackEndCoder has joined #ruby
<rgb-one>
Success: I will be using Python to code the application because I will be using PyQt for the GUI.
akkad has joined #ruby
<Ox0dea>
rgb-one: I thought we were friends.
<Success>
rgb-one lol well than why are you....
<rgb-one>
Ox0dea: lol
asmodlol has joined #ruby
<dreinull75>
is it possible to namespace methods? I have a bunch of methods from classes and subclasses that I want to iterate over. However, some methods I excluded. So if there's a way to group or namespace methods, I'd be happy to know.
<dreinull75>
I _want_ excluded
eminencehc has joined #ruby
<rgb-one>
dreinull75: Yea, you can use module_function
<shevy>
you could put each method into a separate module namespace
<dreinull75>
how's that rgb-one and shevy?
pwnd_nfsw has joined #ruby
<Success>
dreinull75: blacklist ur loop
<rgb-one>
so define a module for eg. module ModuleName
<dreinull75>
Success don't know which methods the classes will get. Besides, I don't like that approach.
djbkd has joined #ruby
<rgb-one>
In order to use a function from within a module, you will need to use module_function
<shevy>
module KillCat; def kill_cat(this_cat);end; end <-- you can add module_function too if you want to call it standalone, or just plain old def self.kill_cat
bruno- has quit [Ping timeout: 250 seconds]
pwnd_nsfw has quit [Ping timeout: 246 seconds]
<rgb-one>
Then you can reference the function like this: ModuleName.function()
<shevy>
and build up an array that has all methods that you want to iterate
eminence_ has joined #ruby
<dreinull75>
ok, so I define my methods outside the class.
<dreinull75>
Makes sense. I thought about telling the methods inside that they also have a second home
<Ox0dea>
dreinull75: Well, or even inside the class inside a module.
<Ox0dea>
Classes are secretly modules, and they can nest arbitrarily deep.
<Ox0dea>
rgb-one: That's not quite what #module_function is for, though.
ellie is now known as ec
<rgb-one>
Ox0dea: What other purpose does it serve?
<Ox0dea>
That is, it doesn't just update the visibility modifier so that subsequently defined methods go on the singleton class, like you'd get with `class << self ...`.
beauby has joined #ruby
tk__ has quit [Quit: ばいばい]
uber has quit [Ping timeout: 272 seconds]
greg has joined #ruby
<Ox0dea>
rgb-one: It also establishes hooks that define the module's singleton methods as instance methods on classes/modules that `include` it.
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sandals has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SCHAAP137 has quit [Quit: Leaving]
djbkd has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
<jhass>
sure it sets up hooks?
scary_saturday has quit [Quit: Page closed]
<jhass>
I thought it just copies the instance method to the modules singleton class, then makes it private
<dreinull75>
hm, the methods I want are actually defined in a module that defines them dynamically in a self.included method. So I would have to create module inside the self included method that is somehow accessbile. That coorect?
diegoaguilar has quit [Ping timeout: 250 seconds]
cntrx has joined #ruby
<Ox0dea>
jhass: I suppose "hook" isn't quite the right term, but then how do module functions get picked up from `include/extend`?
agit0 has joined #ruby
darkf has quit [Quit: Leaving]
<jhass>
they remain to be private instance methods
<Ox0dea>
Right, right. </derp>
roxtrongo has quit [Remote host closed the connection]
<jhass>
"Module functions are copies of the original, and so may be changed independently. The instance-method versions are made private"
beauby has quit [Read error: Connection reset by peer]
l_tonz has joined #ruby
uber has joined #ruby
l_tonz has quit [Client Quit]
l_tonz has joined #ruby
max_kuzmin has left #ruby [#ruby]
_blizzy_ has joined #ruby
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
nixmaniack has quit [Client Quit]
<Ox0dea>
dreinull75: How come you can't just remember the target methods as you create them?
skade has joined #ruby
nixmaniack has joined #ruby
cntrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
cntrx has joined #ruby
beauby has joined #ruby
<Ox0dea>
dreinull75: As for "somewhat accessible", you can use #const_set to make that anonymous Module "completely accessible".
zenguy_pc2 has quit [Ping timeout: 250 seconds]
arup_r has quit [Ping timeout: 256 seconds]
ekinmur has joined #ruby
nixmania_ has joined #ruby
ghoti has quit [Ping timeout: 272 seconds]
<dreinull75>
It's headbending. The module that creates the methods is included by a bunch of classes. What I'm doing is creating accessor methods to DB table columns. So each table has its own class and columns. All created dynamically and added to the sequel base classes. So later on for my templates I want to have all of my methods that I have defined statically or dynamically and add some magic (the delegator method thing I managed the day before yesterday).
dome22xl has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dreinull75>
So I figured that there are so many Sequel methods and superclass methods that I'm losing track.
diegoaguilar has joined #ruby
nixmaniack has quit [Ping timeout: 255 seconds]
greg has quit [Quit: Leaving]
<Ox0dea>
dreinull75: Aye, you may well be doing too much metaprogramming. :<
jokke has quit [Quit: WeeChat 1.3]
<dreinull75>
Ox0dea probably. But how am I going to learn that stuff without doing?
ghoti has joined #ruby
<Ox0dea>
dreinull75: A fair assessment of the thing, I suppose, but it's possible to learn to do bad things.
tmtwd has quit [Ping timeout: 265 seconds]
<dreinull75>
I guess I have to see for myself how things turn bad. Also this last week has taught me many interesting things.
<dreinull75>
I like it.
<Ox0dea>
Knowledge is bliss.
rikkipitt has joined #ruby
cntrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
jokke has joined #ruby
centrx has joined #ruby
cmoney has quit [Remote host closed the connection]
naftilos76 has joined #ruby
twe4ked_ has joined #ruby
twe4ked has quit [Read error: Connection reset by peer]
twe4ked_ is now known as twe4ked
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghoti has quit [Ping timeout: 256 seconds]
beauby has quit [Ping timeout: 240 seconds]
zenguy_pc2 has joined #ruby
Alina-malina has quit [Ping timeout: 260 seconds]
Bulo has joined #ruby
ghoti has joined #ruby
beauby has joined #ruby
rbennacer has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
dome22xl has quit [Quit: Bye]
dasher00 has joined #ruby
rbennacer has quit [Ping timeout: 272 seconds]
arup_r has joined #ruby
Alina-malina has joined #ruby
rikkipitt has quit [Remote host closed the connection]
arup_r is now known as Guest63926
beauby has quit [Ping timeout: 250 seconds]
maletor has joined #ruby
DexterLB has quit [Ping timeout: 260 seconds]
DexterLB has joined #ruby
devoldmx has joined #ruby
tref has quit [Quit: tref]
Guest63926 has quit [Client Quit]
OrbitalKitten has joined #ruby
arup_ has joined #ruby
musou has joined #ruby
tref has joined #ruby
heyimwill has joined #ruby
arup_ has quit [Read error: Connection reset by peer]
krasnus has joined #ruby
pdoherty has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
Bulo has quit [Read error: Connection reset by peer]
bnizzle has joined #ruby
<shevy>
if only computers could write ruby for us
l_tonz has quit [Remote host closed the connection]
bnizzle1 has quit [Ping timeout: 265 seconds]
stannard has joined #ruby
<centrx>
Matz could do it
arup_ has joined #ruby
arup_ has quit [Read error: Connection reset by peer]
fedexo has quit [Ping timeout: 246 seconds]
willardg has joined #ruby
Alina-malina has quit [Ping timeout: 260 seconds]
Alina-malina has joined #ruby
tulak has quit [Remote host closed the connection]
tulak has joined #ruby
arup_ has joined #ruby
arup_ has quit [Read error: Connection reset by peer]
cats is now known as creepycat
akem has quit [Quit: Bye]
<Ox0dea>
I know it doesn't look like it, but matz is actually writing Ruby in this picture: http://i.imgur.com/0bNLHNc.png
duckpuppy has joined #ruby
<Ox0dea>
He has become one with the interpreter.
<atmosx>
hello
<Success>
hello atmosx
Pierreb has quit []
blue_deref has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
jessemcgilallen has joined #ruby
asmodlol has quit [Ping timeout: 272 seconds]
barhum2013 has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momomomomo has joined #ruby
asmodlol has joined #ruby
<shevy>
Ox0dea hah, ruby-matrix
<shevy>
matz starring as keanu reeves
roxtrongo has joined #ruby
howdoi has joined #ruby
sankaber has joined #ruby
segfalt__ has quit [Ping timeout: 256 seconds]
kp666 has joined #ruby
arup_ has joined #ruby
joonty has joined #ruby
crystalmaiden has quit [Ping timeout: 250 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
joonty has quit [Quit: joonty]
vdamewood has quit [Quit: Life beckons.]
roxtrongo has quit [Remote host closed the connection]
Alina-malina has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
treaki has joined #ruby
arup__ has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
moeabdol has joined #ruby
arup_ has quit [Ping timeout: 255 seconds]
juanpablo__ has joined #ruby
nixmania_ has quit [Remote host closed the connection]
jessemcgilallen has quit [Quit: jessemcgilallen]
_blizzy_ has quit [Ping timeout: 252 seconds]
barhum2013 has quit [Quit: barhum2013]
barhum2013 has joined #ruby
th0m_ has joined #ruby
_blizzy_ has joined #ruby
juanpablo__ has quit [Ping timeout: 256 seconds]
Dreamer3 has joined #ruby
devoldmx has quit [Remote host closed the connection]
sdfgsdfg has quit [Ping timeout: 252 seconds]
akem has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
diego2 has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diego2 is now known as diegoviola
Puffball has quit [Remote host closed the connection]
maletor has quit [Ping timeout: 240 seconds]
Puffball has joined #ruby
momomomomo has quit [Quit: momomomomo]
DiCablo has joined #ruby
nixmaniack has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
nixmaniack has quit [Remote host closed the connection]
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
nixmaniack has joined #ruby
Musashi007 has joined #ruby
rgb-one has quit [Ping timeout: 246 seconds]
VeryBewitching has joined #ruby
l_tonz has joined #ruby
OrbitalKitten has quit [Ping timeout: 244 seconds]
OrbitalKitten has joined #ruby
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
tulak has quit [Remote host closed the connection]
ibouvousaime has quit [Ping timeout: 264 seconds]
kadoppe has quit [Ping timeout: 240 seconds]
ibouvousaime has joined #ruby
Puffball has quit [Remote host closed the connection]
barhum2013 has quit [Remote host closed the connection]
arup__ is now known as arup_r
kadoppe has joined #ruby
lapide_viridi has joined #ruby
Puffball has joined #ruby
Puffball has quit [Remote host closed the connection]
fantazo has joined #ruby
Puck6633 has quit [Read error: Connection reset by peer]
Puffball has joined #ruby
Puck6633 has joined #ruby
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arup_ has joined #ruby
kobain has joined #ruby
startupality has quit [Quit: startupality]
lapide_viridi has quit [Quit: Leaving]
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
zenguy_pc2 has quit [Ping timeout: 240 seconds]
sankaber has joined #ruby
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
r0bby_ has quit [Ping timeout: 256 seconds]
shredding has joined #ruby
duckpuppy has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
Musashi007 has quit [Quit: Musashi007]
treaki has quit [Ping timeout: 272 seconds]
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
ibouvousaime_ has joined #ruby
ibouvousaime has quit [Ping timeout: 246 seconds]
Alina-malina has joined #ruby
carvantes has quit [Quit: WeeChat 0.4.2]
sankaber has quit [Remote host closed the connection]
zenguy_pc2 has joined #ruby
Puffball has quit [Remote host closed the connection]
sankaber has joined #ruby
Puffball has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
keen___________1 has quit [Ping timeout: 240 seconds]
<devbug>
btw, is there a be-all, end-all solution for managing&deployinging ruby cli tools?
ghoti has joined #ruby
<devbug>
like, using octra/omnibus/platypus/homebrew to ship to all major platforms?
thesquidbits has joined #ruby
<devbug>
I'd rather not have to build a huge rakefile for that.
<adaedra>
A gem?
hxegon has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenguy_pc2 has joined #ruby
Joshua__ has joined #ruby
<Joshua__>
k
<Joshua__>
hello?
<Joshua__>
i have a question
naftilos76_ has quit [Client Quit]
<Joshua__>
im trying to make the terminal ask a question in ruby and then if the user types yes or no to the question is has an answer depending on the answer
cmoney has joined #ruby
<Joshua__>
like if yes itd say "okay lets do it" or if no "nevermind"
jgt has joined #ruby
ghoti has quit [Ping timeout: 272 seconds]
timonv has joined #ruby
<adaedra>
hello
<al2o3-cr>
Joshua__: print/gets
<adaedra>
what is the real issue, Joshua__
<dreinull75>
Let's rock, it works.
troulouliou_dev has joined #ruby
<dreinull75>
I created a method logger module/class with class vars that keep track of all whitelisted defined methods.
<dreinull75>
Feeling great now.
SenpaiSilver has joined #ruby
<dreinull75>
off for a beer. mission accomplished.
<ruboto>
Joshua__, Why don't you try it and see for yourself?
blue_deref has quit [Quit: bbn]
<Ox0dea>
Joshua__: Are you learning Ruby by guessing?
<Joshua__>
no, im having an issue
<Joshua__>
lol
uri_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Joshua__: Your issue is likely that you're not bothering to find a decent resource from which to learn Ruby.
<Joshua__>
thats not it, one second
<Joshua__>
ill show you the code and youll see what im trying to figure out
rgtk has quit [Remote host closed the connection]
diegoaguilar has quit [Remote host closed the connection]
devbug_ has joined #ruby
juanpablo__ has quit [Ping timeout: 256 seconds]
<Joshua__>
puts("Do know know how many stars on the american flag?") answer = gets if answer == "yes" puts("Thats awesome!") elsif answer == "no" puts("Wow, thats no good!") else puts("You need to type yes or no.") end
<Joshua__>
damn this looks terrible
nertzy has joined #ruby
<adaedra>
?gist
<ruboto>
https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
devbug has quit [Ping timeout: 252 seconds]
<adaedra>
Use that to show your code, Joshua__ ^
Ox0dea has quit [Quit: WeeChat 1.4-dev]
<Joshua__>
okay sorry about that i will one moment
eminencehc has joined #ruby
<adaedra>
Also, don't forget to include a description of the issue, i.e. an error message or a not working case
StarBreaker has quit [Read error: Connection reset by peer]
DEA7TH has quit [Client Quit]
stannard has quit [Remote host closed the connection]
arooni has joined #ruby
jgt has joined #ruby
<shevy>
it's a condom
StarBreaker has joined #ruby
juanpablo__ has quit [Ping timeout: 252 seconds]
Authenticator has joined #ruby
<Erik_Underline>
"Used especially in scientific communities"... Heh, strangely enough I've never heard about it. Might get in touch with it as I get old enough for university :P
akem has quit [Ping timeout: 264 seconds]
htmldrum has quit [Ping timeout: 240 seconds]
bryanray has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pdoherty has joined #ruby
bryanray has quit [Read error: Connection reset by peer]
<Authenticator>
When I make 16k connections in short-order with Net::HTTP I get "Errno::EADDRNOTAVAIL: Can't assign requested address - connect(2)" errors. I'm doing req = Net::HTTP::Post.new uri ; Net::HTTP.start {|h| resp = h.request req } ...
jessemcgilallen has quit [Quit: jessemcgilallen]
<Authenticator>
On OSX, if that matters.
hxegon has quit [Ping timeout: 240 seconds]
<adaedra>
16k simultaneous connections?
jgt has quit [Ping timeout: 255 seconds]
<adaedra>
You may be hitting some system limit.
ss_much has joined #ruby
<Authenticator>
adaedra: They're all threaded, but I *think* I'm only making ~15 threads...