<tcrypt>
probably not the greatest available but the best i could find real quick
ponga has joined #ruby
<Papierkorb>
reminds me of std::mem_fn. mem_fn scares me.
<apeiros>
mozzarella: you'd have to ask ruby-core guys. with inject, it's a major use-case.
ponga has quit [Read error: No route to host]
<apeiros>
Papierkorb: & in front of an argument instructs ruby to treat it as a block
ponga has joined #ruby
<apeiros>
Papierkorb: if the argument is not a Proc instance or nil (the only ones which can be converted to a block), then ruby will try call to_proc on the argument first
Musashi007 has quit [Quit: Musashi007]
MasterPiece has quit [Quit: Leaving]
<apeiros>
and :+ is a Symbol, so it calls :+.to_proc
<Papierkorb>
Okay, why again is python more popular?
<themadcanudist>
hey guys, question about Rakefiles. It appears that all ruby code within a namespace is always executed, even if another task outside the namespace is called
RegulationD has joined #ruby
<themadcanudist>
does that sound like expected behaviour?
ponga has joined #ruby
Fingel has quit [Read error: Connection reset by peer]
<Papierkorb>
it's scary, I mean, when I need to do something, knowing barely any ruby functions, to just type what I'd hope to exist and it just does what I want
Fingel has joined #ruby
havenwood has quit [Remote host closed the connection]
<apeiros>
Papierkorb: being a japanese invention, it wasn't well known in the west for years
<apeiros>
ruby is almost as old as python/java. there's afair ~2y between those three
ponga has quit [Read error: No route to host]
<Papierkorb>
apeiros: at least caused a bunch of gems to have nicer names :P
ADot has quit [Quit: Leaving.]
ponga has joined #ruby
jeromelanteri has quit [Ping timeout: 246 seconds]
djbkd_ has joined #ruby
ponga has quit [Read error: No route to host]
ponga has joined #ruby
<pipework>
Ruby is as old as python, iirc.
Spami has quit [Quit: This computer has gone to sleep]
RegulationD has quit [Ping timeout: 255 seconds]
ponga has quit [Read error: No route to host]
duderonomy has quit [Read error: Connection reset by peer]
ghr has joined #ruby
keen____ has joined #ruby
ponga has joined #ruby
<apeiros>
it depends on what you still consider "as old", and which dates you use for release. but even in the worst case it's iirc less than 2y. so I'd agree with "as old".
ADot has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
ponga has quit [Read error: No route to host]
<weaksauce>
python 91 and ruby 94 according to wikipedia. but that could have been early 94 and late 91
<Papierkorb>
At least rails' rise was fun to watch from the outside. Everyone was like "Oh with python we have django it's so awes.. fuck it RoR is way more awesome"
ponga has joined #ruby
dfinninger has joined #ruby
djbkd_ has quit [Ping timeout: 272 seconds]
<sevenseacat>
i keep meaning to learn django, at least a little bit. i tried before i learnt rails, but python didnt make much sense to me back then
keen___ has quit [Ping timeout: 256 seconds]
ponga has quit [Read error: No route to host]
havenwood has joined #ruby
Fingel has quit [Ping timeout: 244 seconds]
<mozzarella>
sevenseacat: you know what django has that I wish rails had?
<sevenseacat>
whats that
ponga has joined #ruby
bricker has quit [Quit: leaving]
ghr has quit [Ping timeout: 276 seconds]
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
oo_ has joined #ruby
<mozzarella>
I've never used it so I could be wrong, but from what I've seen, you describe the fields your models have, and the migrations are generated for you
dfinninger has quit [Read error: Connection reset by peer]
moted has joined #ruby
Soda has joined #ruby
ponga has quit [Read error: No route to host]
<sevenseacat>
yeah i think you define the fields in one place, in your model
dfinninger has joined #ruby
sankaber has joined #ruby
ponga has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
dfinninger has joined #ruby
ponga has quit [Read error: No route to host]
<weaksauce>
mozzarella yeah.
ponga has joined #ruby
<weaksauce>
I had used it a while ago and it's kind of a pain actually
jeromelanteri has joined #ruby
<weaksauce>
mozzarella why do you want that feature?
<centrx>
mozzarella, How is that different from Rails migrations?
ponga has quit [Read error: No route to host]
robustus has quit [Ping timeout: 255 seconds]
ADot has quit [Quit: Leaving.]
<weaksauce>
centrx it is declarative and inside a model file
<centrx>
Needing to explicitly define every field in your model is a defect of Python
<centrx>
Doesn't seem like a plus
ponga has joined #ruby
<apeiros>
weaksauce: I'm curious as I do it that way - what did you experience as painful with that way?
dfinninger has quit [Remote host closed the connection]
<weaksauce>
apeiros just tedious to do and clutters up the model file.
<weaksauce>
very verbose as well.
Mint has joined #ruby
<weaksauce>
I have a project where I am using the annotate gem and you get the best of both worlds.
<themadcanudist>
how does rails get away with not having to do that? the fields are an important property of the model, no?
ponga has quit [Read error: No route to host]
<apeiros>
I understand the "clutters up the model" part, but how is it tedious? I mean you don't have less work with a migration?
<weaksauce>
tedious because of python's syntax
<apeiros>
ah, ok
ponga has joined #ruby
nii236 has joined #ruby
<themadcanudist>
can you post an comparison example?
maletor has joined #ruby
choke has quit [Ping timeout: 244 seconds]
robustus has joined #ruby
ponga has quit [Read error: No route to host]
<Papierkorb>
um does anyone know how to use bundler with rubinius (rbx) without rbenv and friends?
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<pipework>
I thought there was a post that showed that both python and ruby started in the same year because each author said they started in that year.
<apeiros>
weaksauce: personally I like having the fields in the model. too often I go check schema.rb and/or the db in rails
<pipework>
Like really old mailing list posts.
<pipework>
I'll look.
<weaksauce>
apeiros have you tried annotate?
<postmodern>
Papierkorb, should work normally
redlegion_ has joined #ruby
<apeiros>
weaksauce: no
ponga has quit [Read error: No route to host]
foureight84 has quit [Quit: Be back later ...]
<weaksauce>
themadcanudist that link was for you
<themadcanudist>
weaksauce: /nod - sorry, but i'm ignorant to rails. Where are the field definitions?! How can you use an orm without those properties?
<Papierkorb>
postmodern: I do "bundle exec rbx" but it complains that I should run bundle install
<weaksauce>
it doesn't need them themadcanudist
<Papierkorb>
postmodern: I'd need to tell bundle install to target rbx
<weaksauce>
it uses the very dynamic nature of ruby to define them on the fly when you use them
<apeiros>
themadcanudist: depending on the db driver it queries the database and/or infers from the data returned by queries
ponga has joined #ruby
<postmodern>
Papierkorb, rbx -S bundle install
lidenskap has quit [Remote host closed the connection]
<themadcanudist>
interesting
<themadcanudist>
so new code can generate new fields, does that require a migration? that sounds confusing.
redlegion has quit [Ping timeout: 256 seconds]
<themadcanudist>
or does rails do a schema migration on the fly?
<Papierkorb>
postmodern: thanks
<weaksauce>
migrations can make changes to the database
<apeiros>
themadcanudist: a migration means your db changes
<apeiros>
themadcanudist: but your db does not change when you start a rails app
iotouch has quit [Read error: Connection reset by peer]
iotouch has joined #ruby
Matachin_ has quit [Client Quit]
dorei has quit []
<weaksauce>
ah I see apeiros. how does it work?
mrmargol_ has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
hewenhong has joined #ruby
ponga has joined #ruby
<apeiros>
weaksauce: a DSL class collects all data, constructs Struct classes from the definition and mapping classes for DB<->Model and Params<->Model
scripore has joined #ruby
<weaksauce>
and that's a lot more lightweight than django's way
x1337807x has quit [Ping timeout: 240 seconds]
exadeci has quit [Quit: Connection closed for inactivity]
<apeiros>
those resulting classes are then stored in the model class
ponga has quit [Read error: Connection reset by peer]
jottr_ has joined #ruby
Spami has joined #ruby
<weaksauce>
I guess I don't really need the model fields because I have a irb session open and the columns are just a ModelName.first away
ismaelga has joined #ruby
<weaksauce>
and naming of things is fairly consistent
ponga has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 240 seconds]
moeabdol has quit [Ping timeout: 276 seconds]
<apeiros>
weaksauce: or Model.column_names
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
<apeiros>
or with a good toolset, just plain Model ;-)
Pupeno has joined #ruby
GriffinHeart has joined #ruby
<weaksauce>
yeah. first is easier to type :)
Hijiri has joined #ruby
<weaksauce>
even with a poor toolset ;)
<apeiros>
but what if you have no data for ModelName?!?
<apeiros>
you'll be lost!!!!!
narcan has joined #ruby
<apeiros>
ok, too many !, time to go to bed :) good night!
<weaksauce>
I suppose it would be a long trek to the model or schema.rb file :)
<weaksauce>
night
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
diegoviola has joined #ruby
mjuszczak has joined #ruby
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
Pupeno has quit [Ping timeout: 265 seconds]
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
bim has joined #ruby
ponga has quit [Read error: No route to host]
bim is now known as Guest52260
phutchins has joined #ruby
dfinninger has joined #ruby
ponga has joined #ruby
hewenhong has quit [Remote host closed the connection]
Ropeney has quit [Quit: Leaving...]
pwattste has quit [Ping timeout: 256 seconds]
mjuszczak has quit [Ping timeout: 245 seconds]
allcentury has quit [Ping timeout: 245 seconds]
diego3 has joined #ruby
diego3 has quit [Changing host]
diego3 has joined #ruby
ponga has quit [Read error: No route to host]
diegoviola is now known as Guest73471
diego3 is now known as diegoviola
ponga has joined #ruby
pontiki has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
<pontiki>
hello/
michaeldeol has quit [Ping timeout: 255 seconds]
scripore has quit [Quit: This computer has gone to sleep]
ponga has quit [Read error: No route to host]
dfinninger has joined #ruby
Guest73471 has quit [Ping timeout: 272 seconds]
sudog has joined #ruby
<Brozo>
hi pontiki
ponga has joined #ruby
theotherstupidgu has quit [Ping timeout: 246 seconds]
zotherstupidguy has quit [Ping timeout: 240 seconds]
ponga has quit [Read error: No route to host]
sdrew has joined #ruby
<Nilium>
Skeletons. So many skeletons.
ponga has joined #ruby
amclain has joined #ruby
zotherstupidguy has joined #ruby
Matachines has joined #ruby
theotherstupidgu has joined #ruby
ponga has quit [Read error: No route to host]
ponga has joined #ruby
scripore has joined #ruby
ohaibbq has joined #ruby
ponga has quit [Read error: No route to host]
ponga has joined #ruby
sevvie has joined #ruby
freerobby has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
ponga has quit [Read error: No route to host]
Azure has quit [Max SendQ exceeded]
ponga has joined #ruby
wallerdev has quit [Ping timeout: 272 seconds]
GriffinHeart has quit [Remote host closed the connection]
Guest52260 has quit [Remote host closed the connection]
PhantomSpank has quit [Read error: Connection reset by peer]
dfinninger has joined #ruby
PhantomSpank has joined #ruby
ponga has quit [Read error: No route to host]
ponga has joined #ruby
jenrzzz has joined #ruby
j4nnis has quit [Ping timeout: 246 seconds]
ponga has quit [Read error: No route to host]
last_staff has quit [Quit: last_staff]
ponga has joined #ruby
doodlehaus has quit [Remote host closed the connection]
dfinninger has quit [Read error: Connection reset by peer]
balazs has joined #ruby
ponga has quit [Read error: Connection reset by peer]
Papierkorb has quit [Ping timeout: 272 seconds]
ponga has joined #ruby
dfinninger has joined #ruby
momomomomo has quit [Quit: momomomomo]
InceptION has quit [Ping timeout: 246 seconds]
doodlehaus has joined #ruby
ponga has quit [Read error: No route to host]
parduse has joined #ruby
ponga has joined #ruby
segfalt has quit [Ping timeout: 256 seconds]
ponga has quit [Read error: No route to host]
juanpablo__ has joined #ruby
segfalt has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ponga has joined #ruby
balazs has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
ponga has joined #ruby
doodlehaus has quit [Remote host closed the connection]
nobitanobi has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
ponga has joined #ruby
juanpablo__ has quit [Ping timeout: 240 seconds]
scripore has quit [Quit: This computer has gone to sleep]
<mozzarella>
sorry for my late response, I was eating lasagna
themadcanudist has left #ruby [#ruby]
dvlwrk has quit [Ping timeout: 276 seconds]
workmad3 has joined #ruby
<Nilium>
Give it to me
ponga has quit [Read error: Connection reset by peer]
Colourfool has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
ponga has joined #ruby
<mozzarella>
centrx: you don't have to look at your schema file to know what's in your model, that's one, and then the fact that's easier to edit your model than creating a new migration to modify your tables
ghr has joined #ruby
dfinninger has joined #ruby
ponga has quit [Read error: No route to host]
<diegoviola>
what's the difference with Proc and lambdas?
ponga has joined #ruby
<diegoviola>
you can call #call in both
yfeldblu_ has joined #ruby
slash_nick has joined #ruby
<centrx>
diegoviola, a lambda is a special kind of Proc
<diegoviola>
yes but that's not saying much
<diegoviola>
special kind of Proc, how?
ponga has quit [Read error: Connection reset by peer]
<mozzarella>
weaksauce: yeah, python is painful, but ruby would make it much better ;3
<diegoviola>
a Proc is a procedure, iirc
<Brozo>
ruby master rae
<diegoviola>
so is a lambda, right?
ponga has joined #ruby
<centrx>
diegoviola, lambda validates the number of arguments, and a return in a lambda returns from the lambda, not the enclosing
workmad3 has quit [Ping timeout: 276 seconds]
<diegoviola>
centrx: now that confuses me
<diegoviola>
ELI5, anyone?
ponga has quit [Read error: No route to host]
<Brozo>
eli5 lambda would be greatly appreciated
GriffinHeart has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
<centrx>
diegoviola, "A return in a Proc returns from its enclosing block/method, while a return in a lambda simply returns from the lambda."
hyperjuice has quit [Remote host closed the connection]
<havenwood>
diegoviola: From within a method you call a lambda and you call a proc. You then `return` from within the lambda and proc. The lambda keeps running the rest of the method but the proc returns from the method right then and there.
<ruboto>
mozzarella # => wrong number of arguments (0 for 2) (ArgumentError) ...check link for more (https://eval.in/321953)
hyperjuice has joined #ruby
<diegoviola>
thanks guys
jbc_ has joined #ruby
<diegoviola>
I guess I'll need to write some code and see
<jbc_>
heyas
<Brozo>
hey jbc_
ponga has quit [Read error: Connection reset by peer]
<diegoviola>
havenwood: thanks, that makes sense
ponga has joined #ruby
phutchins has quit [Ping timeout: 244 seconds]
doodlehaus has joined #ruby
tkuchiki has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<mwlang>
heh. Let me change that and see what happens.
ponga has quit [Read error: No route to host]
<Radar>
mwlang: You can put an encoding comment at the top of your file too
<Radar>
# encoding: UTF-8
<mwlang>
actually, no…let me just read with UTF-8 encoding.
<Radar>
That should change the encoding
DerisiveLogic has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
dfinninger has quit [Read error: Connection reset by peer]
iotouch has quit [Quit: This computer has gone to sleep]
i8igmac has quit [Ping timeout: 250 seconds]
<mwlang>
I know I have UTF-8 when I save it…it shouldn’t be bouncing to US-ASCII
ponga has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iotouch has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dfinninger has joined #ruby
<pipework>
mwlang: Ruby sees a series of bytes, not a string with the encoding you saved it as.
ponga has quit [Read error: No route to host]
ponga has joined #ruby
<mwlang>
hmmm…let me double-check how I’m creating the file…could be my mistake on that particular file.
ponga has quit [Read error: No route to host]
WildBamboo-Josh has quit [Quit: Leaving]
ponga has joined #ruby
<pipework>
mwlang: The way you create the file is irrelevant. Unless you instruct ruby to interpret a series of bytes its reading as a certain encoding, it will assume default.
Musashi007 has joined #ruby
baweaver has joined #ruby
<mwlang>
pipework: I guess I think it’s my fault because I created ~10 files..9 are fine, this one is not.
<pipework>
There are many ways to instruct ruby to do so, but one of them is not by saving a file as utf-8.
<pipework>
mwlang: 'fine' in that it reads it in and the encoding is utf-8 when you query the string for the encoding?
<mwlang>
this solves it: File.read('paramedic_care_principals.txt').force_encoding(Encoding::UTF_8)
<pipework>
I'd need to see some code.
ponga has quit [Read error: Connection reset by peer]
<pipework>
mwlang: If you know for sure that UTF-8 is the right encoding for that file, forcing the encoding probably won't hurt.
dfinninger has quit [Read error: Connection reset by peer]
ponga has joined #ruby
<mwlang>
pipework: yeah, all the others show UTF-8 when I do contents.encoding inspects
redlegion_ has quit [Quit: My balls are on fire]
<pipework>
However, it could cause some huge problems as well.
<mwlang>
well, like I said, I created ‘em. I’m setting up some fixtures in text files I’m creating.
<mwlang>
they’re not going to change once I get ‘em “right"
choke has joined #ruby
dfinninger has joined #ruby
pontiki has quit [Ping timeout: 240 seconds]
ponga has quit [Read error: No route to host]
dfinninger has quit [Read error: Connection reset by peer]
<mwlang>
I’m basically setting up some fixture files that contain HTML that I sanitize. the files have the input HTML then a line with just “~~~” and then the expected sanitized HTML.
<mwlang>
so I was just doing File.read(fixture_file_name).split(“~~~”) to get the two parts
<mwlang>
all the others worked fine until this one file.
<pipework>
mwlang: You might want to not use force_encoding and use something that will try to encode as utf-8 and fail when there's something wrong.
narcan has joined #ruby
dfinninger has joined #ruby
McRae has quit [Ping timeout: 245 seconds]
<pipework>
Because if you force it, you might end up using bad data and that might bite you in the ass.
ponga has quit [Read error: No route to host]
ponga has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
juanpablo__ has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
ponga has quit [Read error: No route to host]
dc__ has quit [Remote host closed the connection]
<mwlang>
pipework: true. The onlything I can see that’s jumping out at me is that <p> </p> is in the incoming HTML and the sanitized HTML is <p>\u00A0</p> which, in my textmate editor looks like <p>Â </p>
dfinninger has joined #ruby
hewenhon_ has joined #ruby
zotherstupidguy has quit [Ping timeout: 244 seconds]
ponga has joined #ruby
DerisiveLogic has quit [Remote host closed the connection]
dfinninger has quit [Read error: Connection reset by peer]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
theotherstupidgu has quit [Ping timeout: 276 seconds]
juanpablo__ has quit [Ping timeout: 240 seconds]
Hijiri has quit [Quit: WeeChat 1.0.1]
himansurathi has joined #ruby
theotherstupidgu has joined #ruby
ponga has quit [Read error: No route to host]
zotherstupidguy has joined #ruby
hewenhon_ has quit [Remote host closed the connection]
ponga has joined #ruby
Soda has quit [Remote host closed the connection]
hewenhong has quit [Ping timeout: 256 seconds]
ponga has quit [Read error: Connection reset by peer]
ghr has joined #ruby
ponga has joined #ruby
ponga has quit [Read error: Connection reset by peer]
panga has joined #ruby
dfinninger has joined #ruby
panga has quit [Read error: No route to host]
fedexo has joined #ruby
ponga has joined #ruby
ghr has quit [Ping timeout: 272 seconds]
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
<mwlang>
heh…converting that \u00A0 back to “ ” after sanitizing the HTML and then saving to the file solve the whole encoding problem.
ohaibbq has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.1.1]
<mwlang>
it’s coming out of the sanitize gem which is using the google gumbo parser for html5 which, unfortunately does convert perfectly fine html entities into their literal unicode characters.
ponga has quit [Read error: Connection reset by peer]
balazs has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
lidenskap has quit [Remote host closed the connection]
ponga has joined #ruby
Pupeno has joined #ruby
mjuszczak has quit [Ping timeout: 240 seconds]
sevvie_ has joined #ruby
duderonomy has joined #ruby
ponga has quit [Read error: No route to host]
sevvie has quit [Ping timeout: 265 seconds]
ponga has joined #ruby
kblake has joined #ruby
sevvie_ is now known as sevvie
zotherstupidguy has quit [Ping timeout: 240 seconds]
ponga has quit [Read error: No route to host]
ponga has joined #ruby
himansurathi has quit [Quit: Leaving]
zotherstupidguy has joined #ruby
McRae has joined #ruby
Scient has joined #ruby
himansurathi has joined #ruby
sevvie has quit [Client Quit]
ponga has quit [Read error: No route to host]
Pupeno has quit [Ping timeout: 256 seconds]
ponga has joined #ruby
wookiehangover has quit [Ping timeout: 265 seconds]
ponga has quit [Read error: No route to host]
himansurathi has quit [Client Quit]
balazs has joined #ruby
kblake has quit [Ping timeout: 272 seconds]
himansurathi has joined #ruby
ponga has joined #ruby
himansurathi has quit [Client Quit]
himansurathi has joined #ruby
himansurathi has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
<mwlang>
meh, sometimes you just gotta think outside the box. I gsub’d all ‘&’ with “%AMP%” then sanitized the HTML then gsub’d %AMP% back to “&”. Keeps the perfectly valid HTML entity codes and avoids the whole unicode/us-ascii mess.
<mwlang>
this is mostly stemming from HTML that got created from Microsoft Word.
balazs has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ponga has joined #ruby
braincrash has quit [Quit: bye bye]
Musashi007 has quit [Quit: Musashi007]
ponga has quit [Read error: No route to host]
<mwlang>
you know… the whole left curly quotes (“) becoming unicode sequence \u00E2\u0080\u009CH and such
mengu has joined #ruby
mengu has joined #ruby
C1V0 has quit []
ponga has joined #ruby
Sawbones has joined #ruby
konsolebox has quit [Quit: Leaving]
konsolebox has joined #ruby
userjs has joined #ruby
thatslifeson has joined #ruby
ponga has quit [Read error: Connection reset by peer]
dfinninger has quit [Read error: Connection reset by peer]
lidenskap has joined #ruby
oo_ has quit [Remote host closed the connection]
thatslifeson has quit [Read error: Connection reset by peer]
dfinninger has joined #ruby
ponga has joined #ruby
gazay has joined #ruby
oo_ has joined #ruby
thatslifeson has joined #ruby
mengu has quit [Ping timeout: 272 seconds]
braincrash has joined #ruby
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
dvlwrk has joined #ruby
<mwlang>
pipework: thanks for your feedback…the end solution ends up being a much better answer to the problem set.
ponga has quit [Read error: No route to host]
dfinninger has joined #ruby
ponga has joined #ruby
ponga has quit [Read error: Connection reset by peer]
panga has joined #ruby
oo_ has quit [Remote host closed the connection]
multi_io has quit [Ping timeout: 265 seconds]
panga has quit [Read error: No route to host]
bricker has joined #ruby
ponga has joined #ruby
fedexo has quit [Ping timeout: 256 seconds]
multi_io has joined #ruby
sdrew has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
blazes816 has joined #ruby
userjs has quit [Quit: Page closed]
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
lidenskap has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
ponga has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
cefkamcau has quit [Ping timeout: 272 seconds]
tcrypt has quit [Ping timeout: 252 seconds]
McRae has quit [Ping timeout: 265 seconds]
hgl has quit [Read error: Connection reset by peer]
Pupeno has quit [Ping timeout: 272 seconds]
ponga has quit [Read error: No route to host]
blazes816 has quit [Ping timeout: 264 seconds]
cefkamcau has joined #ruby
ponga has joined #ruby
jack_rabbit has quit [Ping timeout: 256 seconds]
oo_ has joined #ruby
ADot has joined #ruby
oo_ has quit [Remote host closed the connection]
claptor has joined #ruby
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
workmad3 has joined #ruby
ponga has quit [Read error: Connection reset by peer]
hgl has joined #ruby
ponga has joined #ruby
jack_rabbit has joined #ruby
ponga has quit [Read error: No route to host]
ponga has joined #ruby
j0bk has joined #ruby
j0bk has left #ruby [#ruby]
badhatter has quit [Read error: No route to host]
balazs has joined #ruby
ponga has quit [Read error: Connection reset by peer]
panga has joined #ruby
nii236 has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
panga has quit [Read error: No route to host]
centrx has quit [Quit: Shutting down, Please wait...]
oo_ has joined #ruby
balazs has quit [Ping timeout: 240 seconds]
ponga has joined #ruby
oo_ has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
chipotle has joined #ruby
ponga has joined #ruby
badhatter has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
ponga has quit [Read error: No route to host]
Eiam_ has joined #ruby
ponga has joined #ruby
ponga has quit [Read error: Connection reset by peer]
panga has joined #ruby
theotherstupidgu has quit [Ping timeout: 264 seconds]
panga has quit [Read error: Connection reset by peer]
dopie has joined #ruby
ponga has joined #ruby
byprdct has joined #ruby
ponga has quit [Read error: No route to host]
theotherstupidgu has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
<mwlang>
a bunch of divs in the fragments lead to a bunch of blank lines, hence the shift and pop loops
gazay has quit [Quit: gazay]
<mwlang>
anyway, avoided the issue altogether by not translating and the likes to unicode.
ponga has quit [Read error: Connection reset by peer]
jottr_ has quit [Ping timeout: 264 seconds]
panga has joined #ruby
<mwlang>
which I didn’t want anyway. main goal was to strip tags we didn’t want and strip attributes off the remaining tags.
doodlehaus has joined #ruby
<mwlang>
I’m off to bed. cheers!
panga has quit [Read error: No route to host]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ponga has joined #ruby
Sawbones has quit []
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
hyperjuice has joined #ruby
ponga has quit [Read error: No route to host]
doodlehaus has quit [Ping timeout: 256 seconds]
gizmore has joined #ruby
ponga has joined #ruby
bluOxigen has joined #ruby
michaeldeol has joined #ruby
ponga has quit [Read error: No route to host]
pussygla2iator has joined #ruby
<pussygla2iator>
yo I know this is like asking christians whether or not another religion is better
<pussygla2iator>
but hear me out
ponga has joined #ruby
<pussygla2iator>
I want to play with a level-language to make "interesting" apps quickly, should I learn ruby or python?
<pussygla2iator>
It is nothing serious, just for leisure and experience
zotherstupidguy has quit [Ping timeout: 250 seconds]
<sevenseacat>
what type of apps?
zotherstupidguy has joined #ruby
ponga has quit [Read error: No route to host]
<sevenseacat>
web apps, desktop apps, cli apps?
<pipework>
pussygla2iator: How interesting?
<baweaver>
Flip a coin, both can do pretty much anything
<pussygla2iator>
Web / desktop
<baweaver>
It's just as to what style.
<sevenseacat>
ruby isnt so great for desktop gui stuff.
<pussygla2iator>
pretty much anything I want to do at that particular moment
dfinninger has joined #ruby
<sevenseacat>
afaik. i only build web apps.
<pipework>
pussygla2iator: The only thing I dislike about python is the weak lambdas.
<pussygla2iator>
something that is well-supported and cross-platform
ponga has joined #ruby
alex88 has joined #ruby
<baweaver>
Python is more rigid with forced rules, structure, and standards. It's motto is there should only be one correct way to do things.
<pipework>
Both python and ruby suck at desktop graphical apps, though you can actually make them with either, they aren't as easy as with things like Javafx.
ruby120 has joined #ruby
<baweaver>
Ruby is more flexible, with emphasis on reading naturally and programmer happiness
<baweaver>
Python tends to lean more imperative, and Ruby tends to lean more functional in style
Musashi007 has joined #ruby
ponga has quit [Read error: Connection reset by peer]
<pussygla2iator>
would it be fair to say ruby is somewhat of a toy language
<pussygla2iator>
not in the literal sense
<pipework>
Not really, no.
<baweaver>
no
<pussygla2iator>
but its not going to be efficient
<ruby120>
had a quick qudstion. i want to build a regex that matches exactly this format: .3519 The numbers can be any digits 0-9, but it stars with a . and has exactly 4 digits. i came up with this, but it doesn't seem to work just right.. ^\A.\{4}\z
<pussygla2iator>
but it'll be very nice to work with
ponga has quit [Read error: Connection reset by peer]
<fowl>
>> %%%%%%%%%
<ruboto>
fowl # => /tmp/execpad-4dd8363b3bab/source-4dd8363b3bab:4: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/321971)
<baweaver>
well I can't regex today.
<fowl>
>> %%%%%%%%%%
<ruboto>
fowl # => /tmp/execpad-3216930705a6/source-3216930705a6:2: unterminated string meets end of file ...check link for more (https://eval.in/321972)
ponga has joined #ruby
blueOxigen has joined #ruby
<pipework>
Anything is a toy if you play with it or receive it in a meal meant for a child that you receive from a fast food establishment.
<dudedudeman_home>
>> '.2356' =~ ^\A.\{4}\z
<ruboto>
dudedudeman_home # => /tmp/execpad-400a41caa874/source-400a41caa874:2: syntax error, unexpected '^' ...check link for more (https://eval.in/321973)
theotherstupidgu has quit [Ping timeout: 240 seconds]
<dudedudeman_home>
i should work on making that a habit, because it's like a comptuer representation of playing with a rubix cube. you have a problem, you need to solve it, but you need to figure out which steps will get you there
lidenskap has joined #ruby
neohunter has joined #ruby
ponga has quit [Read error: No route to host]
ponga has joined #ruby
<neohunter>
on the documentation it says that time#strftime uses %L to show milliseconds but instead it prints a L letter, why?
dfinninger has quit [Remote host closed the connection]
juanpablo__ has joined #ruby
lidenskap has quit [Remote host closed the connection]
ponga has quit [Read error: No route to host]
vikaton has quit [Quit: Connection closed for inactivity]
mistermocha has quit [Remote host closed the connection]
bim has joined #ruby
bim is now known as Guest76343
ponga has quit [Read error: No route to host]
nobitanobi has joined #ruby
juanpablo__ has quit [Ping timeout: 255 seconds]
ponga has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
arescorpio has quit [Quit: Leaving.]
ponga has quit [Read error: Connection reset by peer]
panga has joined #ruby
<baweaver>
neohunter: ^^^ That work for you?
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby
Guest76343 has quit [Ping timeout: 246 seconds]
<neohunter>
baweaver just found the issue, is not available on 1.8.7
panga has quit [Read error: Connection reset by peer]
<baweaver>
1.8.7 is way old mate
<neohunter>
to get ms i can use ms = Time.now.to_f.to_s.split(".").last[0..2]
<baweaver>
1.9.3 is end of life
ponga has joined #ruby
<baweaver>
2.2.x is current
escapement has joined #ruby
<baweaver>
You should really upgrade that if at all possible.
tenseiten has joined #ruby
tenseiten has joined #ruby
<neohunter>
baweaver unfortunatelly i cant :(
<baweaver>
Why's that?
<neohunter>
its a web page used by a good number of users...
<baweaver>
Cite massive security holes
ponga has quit [Read error: Connection reset by peer]
<neohunter>
and its pretty complex
ponga has joined #ruby
<neohunter>
and code is done in a poor way
<neohunter>
basically to upgrade i have to rewrite everything
<baweaver>
You're going to have to pull the bandaid at some time
dfinninger has joined #ruby
<baweaver>
better now than later.
ADot has quit [Quit: Leaving.]
<baweaver>
besides, don't you have a dev or staging environment for testing thigs?
<baweaver>
things*
<neohunter>
yes
blueOxigen has quit [Ping timeout: 245 seconds]
seitensei has quit [Ping timeout: 264 seconds]
<neohunter>
in fact we already tried to upgrade
<neohunter>
but ... we give up xD
ponga has quit [Read error: No route to host]
oo_ has joined #ruby
<baweaver>
So largely used site
<neohunter>
hey before_filter and append_before_filter is the same right?
<baweaver>
with a massive security hole
bluOxigen has joined #ruby
<baweaver>
and probably using an earlier version of Rails.
ponga has joined #ruby
<neohunter>
yep 2.3
<baweaver>
Upgrade and be done with it
<baweaver>
Even if it involves a rewrite, that level of tech debt will screw you in the long run.
<sevenseacat>
i updated a really crufty rails app from 1.8.7 to 2.2 - took a couple of weeks, including a rails upgrade in there
<sevenseacat>
you really need to do it.
balazs has joined #ruby
ponga has quit [Read error: Connection reset by peer]
<baweaver>
pain from treating a wound is better than pain of gangrene setting in if you wait too long from infection.
ponga has joined #ruby
<neohunter>
yes im thinking in lauch a beta version of the site
<neohunter>
and migrating feature by feature
haroldwu has joined #ruby
tenseiten has quit [Ping timeout: 244 seconds]
<baweaver>
Just do it all at once
<baweaver>
feature by feature is going to get you very little very slowly.
dfinninger has quit [Ping timeout: 255 seconds]
<sevenseacat>
upgrade ruby. see what breaks. fix what breaks. i hope you have a decent test suite.
<baweaver>
halt new features and upgrade. Yes, it'll make a few investors / managers mad, but something like this should have been taken care of a few years ago before it ever got that old.
ponga has quit [Read error: No route to host]
blahwoop has joined #ruby
ponga has joined #ruby
<neohunter>
i agree
<neohunter>
gentlemen, one question.. if there a way to force a before_filter set in application controller be executed before a before_filter in the real contorller that is handling the request?
<baweaver>
neohunter: gender neutral pronouns
<sevenseacat>
yes please.
<baweaver>
for all you know I'm a woman
ponga has quit [Read error: No route to host]
<neohunter>
my apologies !
<baweaver>
I'm not, but not the point.
nobitanobi has quit [Remote host closed the connection]
<neohunter>
oh , lol but ok
<baweaver>
Just something to watch out for
ponga has joined #ruby
<mozzarella>
bros and sisses
balazs has quit [Ping timeout: 240 seconds]
<blahwoop>
if i have a bunch of cuisines each with a different recipe e.g japanese1 japanese2 korean1 korean2 korean3 how would i go about maximizing the randomness given n number of cuisines over n number of days
<baweaver>
People, Humans, etc.
konsolebox has quit [Quit: Leaving]
wookiehangover has joined #ruby
<blahwoop>
trying to figure out how to approach the problem
<baweaver>
blahwoop: Read into Ruby Enumerable, there's a method in there
<baweaver>
it starts with an s
ponga has quit [Read error: No route to host]
<mozzarella>
what if I'm a dog?
<blahwoop>
shuffle?
<baweaver>
Welcome to San Francisco
haroldwu has quit [Changing host]
haroldwu has joined #ruby
<baweaver>
sample
<neohunter>
ok, beings, please.
<baweaver>
or Tumblr, your pick.
<baweaver>
thinking neohunter
ponga has joined #ruby
<baweaver>
the other question was just an easier one.
nobitano_ has joined #ruby
RegulationD has joined #ruby
ghr has joined #ruby
<baweaver>
You know how hooks work?
zotherstupidguy has quit [Ping timeout: 252 seconds]
<baweaver>
define one in your app controller's before_filter to do something before that if it's set in a controller
ponga has quit [Read error: No route to host]
<neohunter>
can i call a method inside a module without including into a class?
ponga has joined #ruby
<blahwoop>
baweaver: how about if the type of cuisines matter? where i dont want a japanese meal to be picked again the next day
AirStar has joined #ruby
<baweaver>
>> module Foo; def self.bar 1 end end; Foo.bar
<ruboto>
baweaver # => /tmp/execpad-3b53110b55a7/source-3b53110b55a7:2: syntax error, unexpected tINTEGER, expecting ';' or ...check link for more (https://eval.in/322002)
<baweaver>
>> module Foo; def self.bar; 1 end end; Foo.bar
<sevenseacat>
blahwoop: thats not really random then
<baweaver>
Keep state of what the last meal type was.
<baweaver>
that too
Zamyatin has joined #ruby
<AirStar>
when ruby is used mainly?
ponga has quit [Read error: No route to host]
<baweaver>
AirStar: Look it up on Google, that's too broad of a question.
<blahwoop>
sevenseacat: thats true. maximum randomness is the goal. and not being too predictable
ponga has joined #ruby
<AirStar>
yeah
<baweaver>
like having different providers than yesterday?
<AirStar>
:(
<baweaver>
AirStar: Better question is what are you trying to do
Zamyatin has quit [Max SendQ exceeded]
<baweaver>
narrow the scope of your questions a bit.
Zamyatin has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
ponga has quit [Read error: No route to host]
longfeet has quit [Ping timeout: 244 seconds]
<blahwoop>
sevenseacat: there are different amounts of the cuisines so it could be 10 itialian 2 british 5 chinese 2 korean. try to make a menu of 1 meal a day where it is spaced out enough that it isn't repeated too quickly. recipes can only be used one
ghr has quit [Ping timeout: 250 seconds]
<AirStar>
i don’t know baweaver, i have no idea now. just studying
konsolebox has joined #ruby
<baweaver>
You need to find that answer first.
<baweaver>
Then we can help more.
ponga has joined #ruby
<baweaver>
blahwoop: So not random then
<AirStar>
yeah
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ponga has quit [Read error: Connection reset by peer]
<blahwoop>
yes baweaver
<AirStar>
baweaver: what is it?
ponga has joined #ruby
matrixfox has quit [Changing host]
matrixfox has joined #ruby
<neohunter>
I need to call a code in ApplicationController before all the beforeFilters, what can i do
ponga has quit [Read error: Connection reset by peer]
<sevenseacat>
append_before_filter .
<sevenseacat>
prepend, sorry
ponga has joined #ruby
<baweaver>
AirStar: a code problem site to train a bit on
<baweaver>
get a feel for the language
mleung has joined #ruby
<AirStar>
thanks baweaver
<baweaver>
then decide what sounds like fun to try doing after getting familiar with it
<neohunter>
sevenseacat thanks, yes think is in that some controllers I already have prepend_before_filter, and those actions seems to be executed befoer the one I define on applicationController
<sevenseacat>
then order matters
matrixfox has quit [Quit: leaving]
<sevenseacat>
ones defined earlier will be run earlier
<sevenseacat>
and stop getting into filter hell
<neohunter>
sevenseacat: can i add it to initialize method of application controller?
<sevenseacat>
time to refactor! :)
<sevenseacat>
no.
ponga has quit [Read error: No route to host]
ponga has joined #ruby
bluOxigen has joined #ruby
<baweaver>
blahwoop: then keep a state going of the last meal served
<baweaver>
then do some sample / pop action on the meals
<baweaver>
and meals wasn't modified by that reject
ponga has joined #ruby
nobitano_ has quit [Remote host closed the connection]
blahwoop has quit [Remote host closed the connection]
duncannz has joined #ruby
ponga has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
ponga has joined #ruby
badhatter has quit [Read error: No route to host]
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
ponga has quit [Read error: Connection reset by peer]
ponga has joined #ruby
ponga has quit [Client Quit]
ponga has joined #ruby
badhatter has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
bluOxigen has joined #ruby
coderhs has quit [Ping timeout: 240 seconds]
coetry has joined #ruby
<coetry>
If i assigned a new proc to a variable and i would like to have several procs assigned to variables and feed them through a list which i enumerate and then call inside a block, how may i do so?
<coetry>
like if name = Procc.new {|name| puts "Whattup #{name}"}
<apeiros>
zotherstupidguy: the docs are generated from source - so if you have the sourcecode, sure
<zotherstupidguy>
i have the source
zzing has quit [Ping timeout: 265 seconds]
<apeiros>
by the power of the source, you have the power!
<zotherstupidguy>
lol
zmyrgel has quit [Read error: Connection reset by peer]
<zotherstupidguy>
now wht shoul i grep from the source?
michael_mbp has joined #ruby
zzing has joined #ruby
<emocakes>
grok everything
Ropeney has quit [Quit: Leaving...]
thatslifeson has joined #ruby
juanpablo__ has joined #ruby
tomphp has joined #ruby
<apeiros>
zotherstupidguy: presumably a file with "regex" in its name :)
oo_ has quit [Remote host closed the connection]
sohrab has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
mikecmpbll has joined #ruby
zzing has quit [Ping timeout: 245 seconds]
thatslifeson has quit [Ping timeout: 246 seconds]
juanpablo__ has quit [Ping timeout: 256 seconds]
zmyrgel has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
cassianoleal has joined #ruby
AlphaAtom has joined #ruby
yoni_ has quit [Ping timeout: 255 seconds]
granthatcher has joined #ruby
zzing has joined #ruby
ghr has joined #ruby
chthon has joined #ruby
elaptics` is now known as elaptics
asmodchan has joined #ruby
asmodchan has quit [Remote host closed the connection]
joonty has joined #ruby
zmyrgel has quit [Read error: Connection reset by peer]
PhantomS_ has quit [Read error: Connection reset by peer]
Jackneill has joined #ruby
PhantomSpank has joined #ruby
DEA7TH has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
zzing has quit [Ping timeout: 256 seconds]
Brozo has joined #ruby
iotouch has joined #ruby
spider-mario has joined #ruby
Igorshp has joined #ruby
<shevy>
yoooo
<shevy>
how is everyone!
<shevy>
jhass are you still on crystal or already on crack now :>
pontiki has joined #ruby
zmyrgel has joined #ruby
<jhass>
rack for crystal? yeah I thought about doing it
<apeiros>
oh my, lol
yoni_ has joined #ruby
haxrbyte_ has quit [Ping timeout: 272 seconds]
<pontiki>
o/
joonty has quit [Quit: joonty]
kblake has joined #ruby
<shevy>
lol
<apeiros>
howdy pontiki
<gizmore>
i smoke beer!!! *kiddings*
<shevy>
didn't know of that name before.... c from crystal, rack from ruby ... crack \o/
<pontiki>
hard to roll one
zzing has joined #ruby
<zotherstupidguy>
shevyyy =)
bkxd has joined #ruby
<shevy>
hey other guy
<shevy>
your nick is awfully long man
<zotherstupidguy>
its kinda stupid
<shevy>
hehe
sandstrom has joined #ruby
<pontiki>
it's kinda funny
<jhass>
zosg - just abbreviate it
<zotherstupidguy>
i take maintaing my cyber identiy very seriously
<zotherstupidguy>
i like it long and stupid
<zotherstupidguy>
but you are welcome to call me zosg =)
PhantomSpank has quit [Read error: Connection reset by peer]
<hanmac>
shevy call it "rgwca" = "rubygem without cool acronym" ;P
<pontiki>
julie brown fan?
<shevy>
zotherstupidguy I shortened mine a while ago from shevegen to shevy. I think short is beautiful when it comes to IRC nicks
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<zotherstupidguy>
well mine was theotherstupidguy, then i discovered that some services doesn't allow such a long name, so i had to go with the z
kblake has quit [Ping timeout: 244 seconds]
PhantomSpank has joined #ruby
<shevy>
jhass is short, hanmac is short, apeiros is beginning to oversize though... but it's still ok. pontiki - same amount of characters as apeiros so same verdict (actually, apeiros sometimes enlarges his nick by appending a _ thus making an apeiros clone... the apieroses blues brothers)
Selinda has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<shevy>
yeah they tell you "man it's too long!"
<zotherstupidguy>
we are comparing nick sizes :D
pontiki is now known as tamouse__
<tamouse__>
this is my other nick
<shevy>
there was some wiki... moinwiki I think. or php-wiki
<shevy>
I had to use one capitalized character in the middle
PhantomSpank has joined #ruby
<hanmac>
shevy: hm is the plural "apieroses" or more "apierosi" ? ;P
<shevy>
so my login back then was: "SheVegen" I hated that I was forced to such an upcased variant
joonty has joined #ruby
<shevy>
hanmac probably with the i
<shevy>
mafioso ... mafiosi!
<shevy>
apeiroso... apeirosi!
tamouse__ is now known as pontiki
<pontiki>
but this is what i use now
<shevy>
pontiki so a mouse nick
iotouch has quit [Quit: This computer has gone to sleep]
<zotherstupidguy>
nothing beats, havinwood
<hanmac>
shevy hm that maybe is not a coincidence ;P
<shevy>
don't let sevenseacat find out that you are a mouse in disguise
<shevy>
zotherstupidguy havenwood? :D
<zotherstupidguy>
yeah
hewenhong has joined #ruby
<pontiki>
pontiki means "mouse" in greek
<shevy>
hmm
<pontiki>
not so disguised
<shevy>
I always thought pontiki was some native american
<zotherstupidguy>
pontiki are you from greece?
<pontiki>
i am not
<shevy>
but perhaps I mix that up with pocahontas... who probably was not even a native american either...
hackeron has quit [Ping timeout: 276 seconds]
hackeron has joined #ruby
<zotherstupidguy>
there is no plato on irc?
<pontiki>
it's actually ποντίκι
<apeiros>
shevy: apeirae is the plural of apeiros, afaik
<pontiki>
but anglicised
<sevenseacat>
damn i wish true and false responded to .true? and .false?
dcarmich has joined #ruby
Dakuan has joined #ruby
<zotherstupidguy>
alias method and you got it
<apeiros>
sevenseacat: refinements to the rescue?
<zotherstupidguy>
is refinements still in?
<apeiros>
yes
AlphaAtom has quit [Ping timeout: 256 seconds]
<apeiros>
I'm just using them for the first time in a project. I have my issues with them, but I want to see how it works out.
<pontiki>
a monkey with a monocle and top hat :)
Igorshp has quit [Remote host closed the connection]
<shevy>
lol
<shevy>
we should not use monkeys
<shevy>
we should use fierce animals like lions, tigers and mice
sinkensabe has joined #ruby
<pontiki>
mouse patching just doesn't have the same cachet
<shevy>
the syntax for refinements put me off so far :(
<shevy>
haha true
hewenhong has quit [Remote host closed the connection]
PhantomSpank has quit [Read error: Connection reset by peer]
<zotherstupidguy>
you guys wanna see somthing really werid?
<zotherstupidguy>
writing this code should be delegated to programs not humans
Brozo has quit [Remote host closed the connection]
aewffwea has joined #ruby
peteykun has quit [Read error: Connection reset by peer]
<ddv>
provide a patch, zotherstupidguy
OrbitalKitten has joined #ruby
talus46 has joined #ruby
<zotherstupidguy>
for what, sanity?
<talus46>
greetings
<shevy>
YES
<shevy>
sanity wants to be patched as well man
<pontiki>
patching sanity could possibly seen as engaging in denialism :D
<zotherstupidguy>
i wonder who commited this =)
<pontiki>
that module has some astounding regexen
alex88 has joined #ruby
<zotherstupidguy>
pontiki YEAH!
<zotherstupidguy>
both contributors are from japan
mpycio has joined #ruby
<mpycio>
HI all, I’m trying to write a capistrano recipe but failing sith simple if staement, ruby begineer
<shevy>
if is simple
<shevy>
if condition
<shevy>
do_something_here
<shevy>
end
<shevy>
well, I almost got the indent right ;)
<mpycio>
I’m trying to detect if stage is equal to a string, so stage is a symbol :stage, but :stage.to_s == “testing” is always false, but “#{stage}” shows testing
<pontiki>
!code
<helpa>
We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
sinkensabe has quit [Remote host closed the connection]
<shevy>
you can call .to_s to convert an object into its string representation mpycio
charliesome has joined #ruby
<shevy>
however, :stage.to_s will always be "stage" and never "testing"
<shevy>
perhaps you meant stage.to_s?
<pontiki>
symbols are not variables
<mpycio>
maybe I do, let me check :-)
* pontiki
pontikificates
<shevy>
in ruby you need sharp eyes, there is only one char difference between :stage and stage
lrcezimbra has quit [Quit: Konversation terminated!]
<zotherstupidguy>
shevy i don't think this is kde-only thing
OrbitalKitten has quit [Ping timeout: 252 seconds]
<shevy>
zotherstupidguy hmm which terminals have R,G,B support too? I tried with xterm but it did not seem to work
cefkamcau1 has joined #ruby
platzhirsch has joined #ruby
<zotherstupidguy>
colors can be generated easily in any console, it just ascii thing
<shevy>
for RGB colours? are you sure?
<jhass>
Selinda: and if there's an else clause it's usually better to swap them instead of using if !
<pontiki>
just the 16 ansi colours
<Selinda>
jhass, What do you mean?
<mpycio>
shevy , I’ve tried learnig perls as my first language. 2nd chaprer was about regular expressions I gave up programming for 2 years agter that :-)
<apeiros>
256 colors on better terminals
<zotherstupidguy>
shevy what i remmber is i wrote some commandline tool that generated colorful output, it worked well in gnome-terminal and lxdtermal , also backcolor can be doen in ascii
<jhass>
Selinda: if !c; do_a else do_b end -> if c; do_b else do_a end
<shevy>
Selinda I usually prefer "if", and also "if !" because it negates with one char.. and is shorter than unless. but I also use unless sometimes, so it is strange....
<pontiki>
xterm-256color
<zotherstupidguy>
mpycio whats the name of hte book?
<shevy>
I found that my brain takes longer at "unless" rather than "if !"; but actually, I try to use only "if" is possible, and then an "else" for the other condition, if that works
<Selinda>
jhass, I asked if unless is used instead of if !
<Selinda>
shevy, Ah I see.
OrbitalKitten has joined #ruby
cefkamcau has quit [Ping timeout: 265 seconds]
lolmaus has joined #ruby
<shevy>
pontiki hmm good idea... I am going to test this today with xterm-256color :)
<mpycio>
that was almost 15 years ago , but I think that was the O’Reilly animal series L0(
<pontiki>
i was just echoing apeiros
<jhass>
Selinda: yes, and you've been told that it's the case unless there's an else, and I added to that
<zotherstupidguy>
shevy can you do copy/paste in xterm?
last_staff has joined #ruby
codecop has quit [Remote host closed the connection]
<shevy>
zotherstupidguy how do you mean, the coloured output from that script?
<shevy>
or the ascii values
<shevy>
let me check anyway
jack_rabbit has quit [Ping timeout: 255 seconds]
<Selinda>
jhass, There is no need to add, I have been using ifs for the past decade.
<zotherstupidguy>
pontiki do you know what catch-22 means?
<pontiki>
good lord
nii236 has quit [Ping timeout: 240 seconds]
<pontiki>
do you know the *author* of catch-22?
OrbitalKitten has joined #ruby
<zotherstupidguy>
i know there is a book, but i didnt go as far as who the author is
<pontiki>
alright then tell me the main character's name
<zotherstupidguy>
no no, i never read the book
<pontiki>
author: joeseph heller
workmad3 has quit [Ping timeout: 265 seconds]
<pontiki>
character: yosarian
DEA7TH has quit [Ping timeout: 272 seconds]
<zotherstupidguy>
you liked the book?
<pontiki>
the catch-22 was also the inspiration for corporal klinger in M*A*S*H
<pontiki>
eventually
<pontiki>
heller's not an easy read
<zotherstupidguy>
its all about the content
<zotherstupidguy>
i find it hard to read 10 thousand years of solitude, but easy to read philosphy books
yoni_ has quit [Ping timeout: 272 seconds]
workmad3 has joined #ruby
nii236 has joined #ruby
mengu__ has joined #ruby
oo_ has quit [Remote host closed the connection]
Akagi201_ has quit []
<pontiki>
zotherstupidguy: you should probably stay away from thomas pynchon, then
atmosx has joined #ruby
Zai00 has joined #ruby
OrbitalKitten has quit [Ping timeout: 265 seconds]
OrbitalKitten has joined #ruby
tkuchiki_ has joined #ruby
oo_ has joined #ruby
OrbitalKitten has quit [Read error: Connection reset by peer]
tkuchiki has quit [Ping timeout: 256 seconds]
<zotherstupidguy>
pontiki never heard of him O.o
moeabdol has joined #ruby
workmad3_ has joined #ruby
vickleton has joined #ruby
cefkamcau has joined #ruby
OrbitalKitten has joined #ruby
cefkamcau has quit [Remote host closed the connection]
fuSmuckerz has joined #ruby
<pontiki>
author of "Gravity's Rainbow". some call it the best american novel ever written. most find it difficult to read, most never finish it
workmad3 has quit [Ping timeout: 264 seconds]
vdamewood has joined #ruby
adac has joined #ruby
Brozo has joined #ruby
yoni_ has joined #ruby
<zotherstupidguy>
i read comics sometimes! transmetropolitan comic
<pontiki>
oh gods, that's the BEST
<zotherstupidguy>
i recommend it =)
cefkamcau1 has quit [Ping timeout: 276 seconds]
ascarter has joined #ruby
DaniG2k has joined #ruby
gaganjyot has quit [Ping timeout: 245 seconds]
<DaniG2k>
hey guys I am creating a ruby gem locally and I'd like to push it to my git repo
<pontiki>
HST as reimagined by Ellis
<DaniG2k>
do i need to first make the repo on github?
<DaniG2k>
and then push?
<DaniG2k>
or is there a command that will automatically create the repo for me?
<pontiki>
DaniG2k: take a look at 'hub' -- basically a git that includes github control
astrobunny has quit [Remote host closed the connection]
<pontiki>
you can say `hub create` within your local repo and it will create the github repo for you
<zotherstupidguy>
DaniG2k you don't push a gem to the repo you push the gem source. gems goes to somthing like rubygems.org
<pontiki>
they don't have to
<DaniG2k>
zotherstupidguy: right, id like to push the gem source
<pontiki>
you can bundle a gem from github, too
<DaniG2k>
zotherstupidguy: how can I do that? Create the git repo and then git init and push?
msgodf has joined #ruby
<pontiki>
i must be on /ignore
<zotherstupidguy>
yeah you can do your own gemserver! but pushing the .gem files not recommended
<DaniG2k>
pontiki: i read it ;) Thanks
Ropeney_ has joined #ruby
<zotherstupidguy>
DaniG2k the only way i know how is from github's UI, you just create a repo , then get the ssh url of it, the do ` git clone (url)`, then add your files then done.
<DaniG2k>
zotherstupidguy: ok cool :) thats all i wanted to know
<DaniG2k>
thanks
<zotherstupidguy>
also you can create a repo, then update your remote repo url in the gitconfig file and push to it
Ropeney_ has quit [Client Quit]
<zotherstupidguy>
if there is a way to create a github repo from console, let me know =)
<quazimodo>
hey can we notify of method call without monkeypatching or overriding?
ascarter has joined #ruby
LJT has joined #ruby
<quazimodo>
kind of like observer pattern minus the def whatever; super; notify_boobs; end
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
quazimodo: the "boobs" part is unnecessary. please don't do that.
riotjones has quit [Ping timeout: 276 seconds]
<apeiros>
and to answer your question: I'm not aware of a way without either redefining the method or wrapping the object
fgo has joined #ruby
ismaelga has joined #ruby
tkuchiki_ has quit [Ping timeout: 245 seconds]
<quazimodo>
apeiros: that.... is unfortunate
<toretore>
def send?
bMalum has joined #ruby
<toretore>
__send, public_send, whatever
<quazimodo>
toretore: talking to me?
bMalum has quit [Client Quit]
chipotle has joined #ruby
<toretore>
>> class Foo; def bar; p 'hello'; end; def __send__(*a); p a; super; end; end; Foo.new.bar
<ruboto>
toretore # => /tmp/execpad-7cf445c9fb47/source-7cf445c9fb47:2: warning: redefining `__send__' may cause serious pr ...check link for more (https://eval.in/322055)
OrbitalKitten has joined #ruby
kyrylo_ is now known as kyrylo
<apeiros>
toretore: __send__ is not invoked in normal method dispatch
<toretore>
i guess not
astrobunny has joined #ruby
workmad3 has joined #ruby
RegulationD has joined #ruby
<apeiros>
there have been plans for def meth:pre, meth:wrap and meth:post, for AOP style programming. but nothing came of this :(
fgo has quit [Ping timeout: 240 seconds]
bMalum has joined #ruby
<quazimodo>
apeiros: i don't know if it's a good idea
atmosx has quit [Quit: parting / quiting]
<quazimodo>
i suppose it opens up the option of weird sideeffects
OrbitalKitten has quit [Client Quit]
ponga has quit [Remote host closed the connection]
<quazimodo>
coincidentally
sdothum has joined #ruby
<toretore>
also an extra step to each method call, making everything slower
<quazimodo>
how does one replicate the arg signature of a method that we override?
ismaelga has quit [Remote host closed the connection]
Tuxified has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
turtil has quit [Ping timeout: 245 seconds]
<apeiros>
I don't think it'd be any slower than say inherited methods
hewenhong has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 264 seconds]
LJT has quit [Quit: Sleeping...]
edwinvdg_ has joined #ruby
RegulationD has quit [Ping timeout: 272 seconds]
jottr_ has joined #ruby
OrbitalKitten has joined #ruby
hewenhong has joined #ruby
hewenhong has quit [Remote host closed the connection]
bebijlya has quit [Ping timeout: 256 seconds]
cefkamcau has quit [Ping timeout: 256 seconds]
SouL_|_ has joined #ruby
<SuperTaz>
I've generally done what you want with a little pseudoprogamming magic, basically a method that creates a hidden method from the original and replaces the original with a method that calls the new method and the callback handler for the observer
edwinvdgraaf has quit [Ping timeout: 252 seconds]
<SuperTaz>
it requires some knowledge of pseudoprogramming, but you can basically write a method that allows you to transparently apply the pattern to any method on any object
jayeshsolanki has joined #ruby
<apeiros>
SuperTaz: I think the term you want is metaprogramming, not pseudo- ;-)
OrbitalKitten has quit [Client Quit]
<SuperTaz>
yes...it's 5am
<SuperTaz>
4am
<SuperTaz>
lol
jayeshsolanki has quit [Max SendQ exceeded]
<SuperTaz>
looking for an example of how I did it...it's been a while
jottr_ has quit [Ping timeout: 256 seconds]
jayeshsolanki has joined #ruby
<SuperTaz>
I think I did it in attribute-kit
bim has joined #ruby
LJT has joined #ruby
bim is now known as Guest24886
zmyrgel has quit [Quit: WeeChat 0.4.2]
gfawcettpq has quit [Ping timeout: 245 seconds]
jayeshsolanki has quit [Max SendQ exceeded]
ponga has joined #ruby
jayeshsolanki has joined #ruby
<SuperTaz>
I think I did it in attribute_hash.rb in attribute-kit
<SuperTaz>
anyway, have a look, it's well-documented and does some metatprogramming magic that should get you started with how to do it, even though, on review, I don't think I did exactly what you're looking for in that project
<SuperTaz>
keep in mind it's also old
serivich has joined #ruby
Guest24886 has quit [Remote host closed the connection]
<SuperTaz>
okay...heading to bed now, since my brain is apparently not using the words I intend it to ;) nite nite!
<apeiros>
gn8
Nimf has quit [Read error: Connection reset by peer]
jayeshsolanki has quit [Quit: bye!]
turtil has joined #ruby
pontiki has quit [Ping timeout: 256 seconds]
jayeshsolanki has joined #ruby
<SuperTaz>
should quazimodo return, feel free to indicate s/he should scroll or regurgitate the URL
bMalum has quit [Quit: bMalum]
haxrbyte_ has quit [Read error: Connection reset by peer]
lavros has quit [Quit: reboot]
sinkensabe has quit [Remote host closed the connection]
dorei has joined #ruby
LJT has joined #ruby
LJT has quit [Read error: Connection reset by peer]
cefkamcau has joined #ruby
bebijlya has joined #ruby
sinkensabe has joined #ruby
quazimodo has quit [Ping timeout: 264 seconds]
moeabdol1 has quit [Ping timeout: 246 seconds]
LJT has joined #ruby
sinkensabe has quit [Remote host closed the connection]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
haxrbyte_ has joined #ruby
DaniG2k has quit [Quit: leaving]
PhantomSpank has quit [Read error: Connection reset by peer]
lavros has quit [Quit: reboot again]
PhantomSpank has joined #ruby
Zai00 has quit [Quit: Zai00]
alex88 has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
haxrbyte has quit [Ping timeout: 240 seconds]
LJT has quit [Quit: Sleeping...]
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
lavros has joined #ruby
gregf_ has quit [Quit: leaving]
scripore has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
ValicekB has quit [Ping timeout: 250 seconds]
quazimodo has joined #ruby
alex88 has quit [Ping timeout: 276 seconds]
LJT has joined #ruby
oo_ has quit [Remote host closed the connection]
Tuxified has joined #ruby
PhantomSpank has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
sandstrom has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol1 has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
ValicekB has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
comma8 has quit [Ping timeout: 252 seconds]
juanpablo__ has joined #ruby
banister has joined #ruby
Papierkorb has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
comma8 has joined #ruby
ADot has quit [Quit: Leaving.]
<shevy>
how long does it take you guys to find a bug in your codebase in ruby (if it is a big codebase), and how long to fix it then?
juanpablo__ has quit [Ping timeout: 256 seconds]
<apeiros>
shevy: so far I've had everything from knowing immediately upon reading the exception to ~2 weeks.
scripore has quit [Quit: This computer has gone to sleep]
<shevy>
apeiros hmm in your own codebase though? what was the problem with the bugs that took you longer to find?
nfk has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<apeiros>
~200k lines of potentially offending code
<apeiros>
and the bug being threading related
<shevy>
whoa
sinkensabe has joined #ruby
<shevy>
ok... then I am nowhere close to that yet, I think the biggest library or rather collection I have was around ~10k codes maximum
<apeiros>
actually more, since it wasn't clear whether it was an active record bug, an oci8 (oracle driver) bug, an oracle-advanced adapter bug, or a bug in our code base.
<apeiros>
no idea how many lines of code AR + oci8 + oracle-advanced adapter is, though
phutchins has quit [Quit: WeeChat 1.1.1]
doodlehaus has quit [Remote host closed the connection]
sinkensabe has quit [Ping timeout: 256 seconds]
sevenseacat has joined #ruby
Squarepy has joined #ruby
revoohc has joined #ruby
zotherstupidguy has quit [Remote host closed the connection]
zotherstupidguy has joined #ruby
bim has joined #ruby
scripore has joined #ruby
bim is now known as Guest94688
RegulationD has joined #ruby
sinkensabe has joined #ruby
gfawcettpq has joined #ruby
Brozo has joined #ruby
SouL_|_ has quit [Ping timeout: 256 seconds]
thatslifeson has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
scripore has quit [Quit: This computer has gone to sleep]
AirStar has joined #ruby
jayeshsolanki has quit [Ping timeout: 246 seconds]
lavros has quit [Ping timeout: 256 seconds]
jlbhshluekg has joined #ruby
Brozo has quit [Ping timeout: 256 seconds]
<jlbhshluekg>
.
<jlbhshluekg>
did usa intelligence supply isis with weapons like they did with al-qaeda to justify creating wars?
<jlbhshluekg>
did usa excute the creative mess in the middle east like they said they will, does the creative mess include explosions with uncertain responsibles to create wars?
<jlbhshluekg>
plz, send my qs to help limiting usa & israel aggression against others& may then lessen number of people killed in the middle east.
<jlbhshluekg>
.did usa intelligence supply isis with weapons like they did with al-qaeda to justify creating wars?
Selinda has left #ruby ["Leaving"]
<apeiros>
!kick jlbhshluekg wrong channel
<helpa>
apeiros: No.
jlbhshluekg was kicked from #ruby by ruboto [wrong channel]
<Papierkorb>
/r/conspiracy
turtil has quit [Ping timeout: 256 seconds]
lavros has joined #ruby
<apeiros>
/r/trash
thatslifeson has quit [Ping timeout: 256 seconds]
serivich has quit [Ping timeout: 240 seconds]
jlbhshluekg has joined #ruby
<jlbhshluekg>
.
<jlbhshluekg>
did usa intelligence supply isis with weapons like they did with al-qaeda to justify creating wars?
<jlbhshluekg>
did usa excute the creative mess in the middle east like they said they will, does the creative mess include explosions with uncertain responsibles to create wars?
<jlbhshluekg>
plz, send my qs to help limiting usa & israel aggression against others& may then lessen number of people killed in the middle east.
<jlbhshluekg>
.did usa intelligence supply isis with weapons like they did with al-qaeda to justify creating wars?
ponga has quit [Remote host closed the connection]
<apeiros>
!mute jlbhshluekg
jlbhshluekg has left #ruby [#ruby]
banister has quit [Ping timeout: 265 seconds]
claptor has quit [Quit: this channel is bakas]
dkphenom has joined #ruby
AlphaAtom has joined #ruby
codecop has joined #ruby
JDiPierro has joined #ruby
vikaton has joined #ruby
joonty has quit [Quit: joonty]
OrbitalKitten has joined #ruby
phutchins has joined #ruby
OrbitalKitten has quit [Client Quit]
davedev24_ has joined #ruby
websoftwarez has quit [Ping timeout: 246 seconds]
c355E3B has quit [Quit: Connection closed for inactivity]
zz_barkerd427 is now known as barkerd427
serivich has joined #ruby
doodlehaus has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
kyrylo_ has joined #ruby
qwertme has joined #ruby
doodlehaus has quit [Remote host closed the connection]
kyrylo has quit [Ping timeout: 255 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kyrylo_ is now known as kyrylo
LJT has quit [Read error: Connection reset by peer]
zotherstupidguy has quit [Ping timeout: 255 seconds]
Mon_Ouie has quit [Ping timeout: 272 seconds]
zotherstupidguy has joined #ruby
edwinvdg_ has joined #ruby
Papierkorb_ has joined #ruby
Zai00 has joined #ruby
Colourfool has quit [Quit: Page closed]
gfawcettpq has quit [Ping timeout: 272 seconds]
Papierkorb has quit [Disconnected by services]
Papierkorb_ is now known as Papierkorb
<Papierkorb>
what's a ruby 'unit spec'?
edwinvdgraaf has quit [Ping timeout: 256 seconds]
JDiPierro has quit [Remote host closed the connection]
edwinvdg_ has quit [Remote host closed the connection]
Guest15 has joined #ruby
edwinvdgraaf has joined #ruby
sandstrom has joined #ruby
edwinvdg_ has joined #ruby
hewenhong has joined #ruby
scripore has joined #ruby
chiel_ is now known as chiel
Lewix has joined #ruby
jottr_ has joined #ruby
ponga has joined #ruby
alex88 has joined #ruby
alex88 has quit [Client Quit]
Rapier- has joined #ruby
edwinvdgraaf has quit [Ping timeout: 272 seconds]
Lewix has quit [Client Quit]
yfeldblum has quit [Ping timeout: 256 seconds]
bkxd has quit [Ping timeout: 255 seconds]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Igorshp has joined #ruby
dstarh has joined #ruby
logstash has joined #ruby
Igorshp has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
logstash has quit [Read error: Connection reset by peer]
dkphenom has joined #ruby
sankaber has joined #ruby
LJT has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Igorshp has quit [Ping timeout: 246 seconds]
lidenskap has joined #ruby
sgambino has joined #ruby
<jhass>
nothing clearly defined, what's the context?
<hanmac>
shevy yes because my project is 90% C++ and 10% ruby
<shevy>
wow, 36% sublimists
jerius has joined #ruby
<sevenseacat>
\m/ sublime
<shevy>
38% vimsters, almost 5% emacsters
<wasamasa>
shocking
bMalum has joined #ruby
<shevy>
even more use atom than emacs... now that is interesting
<shevy>
"How would you rate your Ruby expertise?"
<shevy>
ok guys
<shevy>
who of you here is not yet an Expert?
<sevenseacat>
<--
<cats>
not me definitely lol
<Papierkorb>
used ruby on and off for a good month
doodlehaus has joined #ruby
<shevy>
me neither... I would be too embarassed when being unable to answer some interview question
<shevy>
Papierkorb one month? but you have used another programming language before?
<cats>
my biggest problem is writing unclean code
<shevy>
hehe
<cats>
my code is just so...messy lol
<shevy>
yeah
bMalum has quit [Client Quit]
<Papierkorb>
shevy: A ton of languages tbh, but I stuck with C++/Qt for the past 4 or 5 years
<shevy>
cats I still feel in many ways similar, but I think what helps is discipline and consistency
<Musashi007>
that’s funny - one of my favorite things to do is clean up code
<cats>
yeah
<shevy>
pretty high adoption rate
<shevy>
"What version of Ruby are you currently using?"
<shevy>
in 2015 already, 41.4% use ruby 2.2.x
endash has joined #ruby
<Papierkorb>
Does actually the editor matter a lot for ruby? I mean without code completion I'll stick to Kate ..
fgo has joined #ruby
<jhass>
it doesn't
<shevy>
dunno, but someone on #emn wanted to change editors recently, and found an editor "brackets" some days ago; and found sublime just today
<Papierkorb>
For typed languages there's a huge difference, and I wish I had a IDE which would just tell what I can do ..
<shevy>
Papierkorb I use a crappy editor myself, kate may possibly be better. I don't know why I did not use kate, I think I used it last in the kde 3.x era and hated the whole feel of it
andrew-l` is now known as andrew-l
moeabdol1 has quit [Quit: WeeChat 1.1.1]
<shevy>
I'd love to be able to cherry pick features from different editors
roolo_ has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
Matachines has joined #ruby
marr has quit []
<Gondei>
Do you use #!usr/bin/env ruby anymore on the top of your files?
<jhass>
Gondei: I use #!/usr/bin/env ruby for the very few that should be executables
<Gondei>
jhass, Hm, what does that mean?
mostlybadfly has joined #ruby
roolo has quit [Ping timeout: 240 seconds]
<jhass>
it means that I write little ruby code that I want to run directly as ./foo
genpaku has quit [Ping timeout: 244 seconds]
ChoiKyuSang has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
genpaku has joined #ruby
thatslifeson has joined #ruby
ChoiKyuSang has joined #ruby
<Gondei>
jhass, I see
<Gondei>
I kinda like Ruby currently learning it
Guest94688 has quit [Remote host closed the connection]
enebo has joined #ruby
<Gondei>
So much easier than the other languages, or at least how it currently feels.
theotherstupidgu has quit [Ping timeout: 265 seconds]
<Papierkorb>
dafuq, Celluloid decided to create 1000 native threads.
thatslifeson has quit [Remote host closed the connection]
<shevy>
they also have had some other compatibility link for /bin/bash I think
<shevy>
"The Open Group Base Specifications Issue 7"
idealexit has joined #ruby
<Gondei>
jhass, An irrelevant question, but can I start with rails if I know little ruby?
<shevy>
what you all do find jhass - I never even heard that before :)
edwinvdgraaf has quit [Ping timeout: 240 seconds]
joe_meade has joined #ruby
<jhass>
Gondei: yes you can, but I would only recommend that if you have prior experience with MVC based webframeworks, else you have to learn too many new concepts at once and can't properly digest what's rails and what's ruby
colorisco has joined #ruby
<Gondei>
jhass, Unfortunately I have not have experience with MVC :/ What would you suggest?
pwattste has quit [Remote host closed the connection]
<jhass>
learn Ruby first
<Gondei>
jhass, To what degree?
EagleDelta has joined #ruby
<jhass>
be at least confident about what classes, modules, objects, blocks & procs are
airdisa has joined #ruby
<Gondei>
jhass, I have previous experience with classes from other languages.
<jhass>
also be confident with Array, Hash & Enumerable
<Gondei>
jhass, Also arrays.
<Gondei>
And enums.
haidahaha has joined #ruby
<jhass>
enums != Enumerable
<jhass>
the replacement concept for enums in Ruby are Symbols, largely
paulcsmith has joined #ruby
<Gondei>
jhass, I see. Well, how many years should I give ruby you think?
sinkensabe has quit [Remote host closed the connection]
<Gondei>
jhass, Oh okey :)
<jhass>
and I mean the specific classes, Ruby puts a lot of power into them
zotherstupidguy has quit [Ping timeout: 252 seconds]
McRae has joined #ruby
Juanchito has quit [Quit: Connection closed for inactivity]
jottr has quit [Ping timeout: 276 seconds]
nii236 has joined #ruby
haidahaha has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
Spami has joined #ruby
jottr has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
rbennacer has quit [Remote host closed the connection]
haidahaha has quit [Client Quit]
<jhass>
eloquent ruby is a generally recommended book, I didn't read it personally
dexteryy has joined #ruby
rbennacer has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
lolmaus has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
Igorshp has quit [Remote host closed the connection]
<Gondei>
jhass, I see. Well, do you think there will be need for multiple books? I just ordered this one.
iamjarvo has joined #ruby
<Gondei>
jhass, If I'm interested in rails.
mjuszczak has joined #ruby
<jhass>
a rails book can't harm, though the online guides will get you up and running
Kricir has joined #ruby
<Gondei>
jhass, I was referring to ruby. I just bought Eloquent ruby and wonder if I will need more books than just this one to get me started with rails.
<jhass>
probably not
<Gondei>
jhass, Also want to say that I have previous experience in programming.
<Gondei>
jhass, I see.
icebourg has joined #ruby
workmad3 has joined #ruby
mjuszczak has quit [Client Quit]
dexteryy has quit []
haxrbyte_ has joined #ruby
havenwood has joined #ruby
LJT has joined #ruby
BlaXpirit_ has joined #ruby
S0da has joined #ruby
vudew_ has quit [Ping timeout: 250 seconds]
The_Phoenix has quit [Ping timeout: 250 seconds]
ndrei has quit [Ping timeout: 265 seconds]
The_Phoenix1 has joined #ruby
LJT has quit [Client Quit]
haxrbyte has quit [Ping timeout: 265 seconds]
The_Phoenix1 has quit [Max SendQ exceeded]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
slash_nick has joined #ruby
The_Phoenix has joined #ruby
mtakkman has joined #ruby
<BlaXpirit_>
What is a thorough overview of the features of the language? I don't want: beginner tutorials, interactivity/exercises, rails
<quazimodo>
sevenseacat: so i'm either subclassing or decorating
<colorisco>
PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.
<colorisco>
why does it appear
iotouch has joined #ruby
iotouch has quit [Client Quit]
<sevenseacat>
huh, i didnt know observable was in the stdlib
<jhass>
colorisco: inform me if you find out! Somebody else had it recently and we couldn't figure out
zotherstupidguy has joined #ruby
theotherstupidgu has joined #ruby
<quazimodo>
is it possible to dynamically rename a method?
lolmaus has quit [Ping timeout: 256 seconds]
<sevenseacat>
i've only ever seen that error when i was sharing a db connection in rspec tests
<jhass>
quazimodo: sort of, you'd alias_method it and then remove_method or something
<sevenseacat>
not a good idea, sharing a db connection
<greedo>
yes quazimodo
centrx has joined #ruby
<jhass>
quazimodo: though look into Module#prepend as a possibly better alternative to renaming
<dudedudeman>
shevy: it's basically just a vm that you can set up a development environment in, but it's a full fledge text editor as well. has vim modes, sublime modes, all sorts of features.
<quazimodo>
define instance methods
<quazimodo>
plonk them ontop of the original object
<quazimodo>
via prepend
<quazimodo>
damn you so much faster programmy than I
<jhass>
yap, Rails 5 will drop alias_method_chain in favor of Module#prepend
<jhass>
it's great
<quazimodo>
still dno why we need observable here
joelataylor has joined #ruby
<jhass>
so the logic doing the overloads doesn't need to know who's interested
<quazimodo>
whatcha mean?
sevenseacat has quit [Quit: Me dun like you no more.]
<jhass>
you don't really need it, it just decouples that code from anything else
<quazimodo>
hrm ok
<shevy>
dudedudeman hmm and it is easy to setup and use? I can setup things on linux these days, but I am too dumb for windows unless it's like a click event
<quazimodo>
i'll read it
<shevy>
dudedudeman oh wait, that is in the browser?
<shevy>
because if so then I can manage
<quazimodo>
jhass: right i see
<quazimodo>
you include observable so that you can just do notify_observers
<jhass>
yup
<greedo>
this is a better design pattern than I had
<quazimodo>
jhass: *hug*
<dudedudeman>
shevy: yep! it works really well out of the box, and they have a free option. i use it exclusively because i work at home, and on downtime at work
<quazimodo>
i dnot know if I'll need t
<quazimodo>
but
<quazimodo>
awesome stuff
<quazimodo>
*big hug*
<jhass>
yw, and yeah it's a bit contrived but fun :D
sinkensabe has quit [Remote host closed the connection]
<quazimodo>
hrm
prawnsalad has left #ruby [#ruby]
<quazimodo>
do i need to defin ethe original methods argument signature?
<jhass>
no, *args, &block takes it all
arta82 has joined #ruby
nobitanobi has joined #ruby
<quazimodo>
and the call to super passes whatever super actualy wants
<quazimodo>
cool
S0da has joined #ruby
astrobunny has joined #ruby
xploshioon has joined #ruby
freerobby has quit [Quit: Leaving.]
gfawcettpq has joined #ruby
dawkirst has joined #ruby
dawkirst has quit [Remote host closed the connection]
dawkirst has joined #ruby
dawkirst has quit [Client Quit]
theotherstupidgu has quit [Ping timeout: 256 seconds]
hewenhong has quit [Remote host closed the connection]
prawnsalad has joined #ruby
prawnsalad has left #ruby [#ruby]
theotherstupidgu has joined #ruby
pdoherty has joined #ruby
zzing has joined #ruby
lolmaus_ has quit [Ping timeout: 256 seconds]
edwinvdg_ has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
Zamyatin has joined #ruby
nii236 has quit [Ping timeout: 245 seconds]
umgrosscol has joined #ruby
happydad has quit []
nii236 has joined #ruby
colorisco has quit [Quit: colorisco]
haxrbyte_ has joined #ruby
mikecmpbll has quit [Ping timeout: 244 seconds]
joonty has quit [Quit: joonty]
gizmore has joined #ruby
edwinvdg_ has joined #ruby
joonty has joined #ruby
colorados has joined #ruby
nobitanobi has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
astrobunny has quit [Remote host closed the connection]
freerobby has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has quit [Remote host closed the connection]
baweaver has joined #ruby
<quazimodo>
jhass:
<quazimodo>
it's working!
airdisa has quit [Remote host closed the connection]
dvlwrk has quit [Ping timeout: 265 seconds]
<jhass>
quazimodo: I'm still not sure I'd like to see it in prod code tbh :D
Guest7345 has quit [Remote host closed the connection]
<apeiros>
I would
<apeiros>
but then again, I just want to see it all crash and burn :D
* apeiros
puts on crazy face as he walks away…
<Papierkorb>
Anyone knows how I could terminate the process when all Celluloid actors are finished?
diegoaguilar has quit [Remote host closed the connection]
edwinvdg_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
nii236 has quit [Ping timeout: 244 seconds]
xploshioon has quit [Quit: Leaving]
<apeiros>
`kill -9 #{$$}`
lolmaus_ has joined #ruby
<quazimodo>
jhass: i don't get it
<quazimodo>
define_singleton_method
<apeiros>
Papierkorb: which process? why do you need to manually terminate it? context man!
<quazimodo>
does that define on the eigenclass?
denver has joined #ruby
<jhass>
quazimodo: yes, and let's call it singleton class since that's what core calls it these days
<quazimodo>
eigenclass is more mathemagical sounding :(
<quazimodo>
but yeah
<Papierkorb>
apeiros: The ruby process. I have something like the 'main' actor doing stuff and then it starts a bunch of other actors from a pool. So, when no actor is doing anything anymore, I want that the ruby process exits
<quazimodo>
jhass: so, we werecreating a new module each time before
horsecowdog has quit [Remote host closed the connection]
<quazimodo>
so that we didn't gummy up the "ObservableMethods" module
<apeiros>
Papierkorb: I bet it's documented by celluloid how to spin it down.
<quazimodo>
here we're making one mod = Module.newthough
<jhass>
quazimodo: for each observe_calls, yeah
yaw has joined #ruby
gfawcettpq has joined #ruby
<Papierkorb>
apeiros: You'd think! They only tell you how to keep the main thread open so the process doesn't quit though
airdisa has joined #ruby
<quazimodo>
oh yes
<apeiros>
Papierkorb: then stop keeping the main thread open?
<quazimodo>
each object that includes ObservableMethods will get a new module
<quazimodo>
so
<Papierkorb>
apeiros: then the process quits immediately
edwinvdgraaf has quit [Ping timeout: 264 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
<quazimodo>
why are we defining on the singleton rather than on the mod directly?
<apeiros>
Papierkorb: sounds like what you wanted?
sohrab has quit [Ping timeout: 255 seconds]
<Papierkorb>
which takes everything down, including the non-finished actors
<apeiros>
Papierkorb: so your "the ruby process" was unspecific and you have more than one?
centrx has quit [Ping timeout: 256 seconds]
<quazimodo>
oh wait
<Papierkorb>
apeiros: I have one process but many threads.
<quazimodo>
jhass: is this working for *all* method calls?
<apeiros>
Papierkorb: you realize that threads != processes?
nb_bez___ has joined #ruby
<Papierkorb>
apeiros: .. that's what I'm saying?!
<umgrosscol>
Oh jeeze... we're back to this again.
<apeiros>
Papierkorb: what you say is contradicting itself
iamjarvo has joined #ruby
<jhass>
quazimodo: the hook is defined on the singleton class of the class we're included into
sohrab has joined #ruby
hyperjuice has joined #ruby
<Papierkorb>
apeiros: Huh? If the main thread, which is the process, exits, the system throws out the process and kills every resource it still holds, in my case, all running threads
<apeiros>
17:43 Papierkorb: Anyone knows how I could terminate the process when all Celluloid actors are finished?
<apeiros>
17:46 apeiros: Papierkorb: then stop keeping the main thread open?
<apeiros>
17:47 Papierkorb: apeiros: then the process quits immediately
<jhass>
quazimodo: so it's triggered for all instance methods that are defined on the class after the hook was put in place
<quazimodo>
jhass: nice
<umgrosscol>
Papierkorb: Why is your main process terminating before it's threads are done working on whatever they were doing?
<quazimodo>
not useful to me actually
<quazimodo>
but nice
<quazimodo>
i don't full yunderstand it actually
<Papierkorb>
apeiros: apparently MRI and rbx behave differently than expected. sorry.
<apeiros>
Papierkorb: look, you IMO don't do a good job explaining what you want to do and where you're stuck
<apeiros>
I'm off to other stuff now
<apeiros>
but you might want to give another try at phrasing your problem so others can actually help
decoponio has joined #ruby
<jhass>
quazimodo: so, we place a hook for when a new method is added to the class we're included into, we keep an anonymous module around that's prepended to the class we're included into, then in the hook we define a new method in the anonymous module for each method that's added to the class we're included into, effectively overloading it
<quazimodo>
jhass: ok, i need to try to understand this 'hook' synta
<quazimodo>
x
<jhass>
quazimodo: the define_singleton_method call uses the closure to capture a reference to the anonymous module and make it available to the method added hook
charliesome has joined #ruby
<jhass>
quazimodo: it's the same as def self.foo, it's a regular method defined on an objects singleton class, in this case of an Class instance
<quazimodo>
i don't know what the method_added hoook is
<quazimodo>
is that a native ruby thing?
<jhass>
it's called when a new method is defined
<quazimodo>
gotcha
<quazimodo>
1so what's :_observable_overloads again
<jhass>
yeah, so I don't consume an instance variable :D
<quazimodo>
it's beter i guess
<quazimodo>
yo udon't create many mod modules
RegulationD has quit [Ping timeout: 240 seconds]
gfawcettpq has quit [Ping timeout: 256 seconds]
<jhass>
well, the previous solution would have a single observe_calls call per class too ideally
<quazimodo>
my version, each method gets a new mod
hiyosi has joined #ruby
<quazimodo>
i'll switch to yours
scripore has quit [Quit: This computer has gone to sleep]
Guest18774 is now known as ezra
ezra has quit [Changing host]
ezra has joined #ruby
<jhass>
dunno, in prod code I'd probably be explicit and write a decorator by using the fact that def returns a symbol nowadays
<jhass>
observable def foo
Spami has joined #ruby
I has joined #ruby
I is now known as Guest27504
blackmesa has quit [Ping timeout: 264 seconds]
zorak8 has joined #ruby
scripore has joined #ruby
Lauritz has joined #ruby
<jhass>
or better yet use a delegator/decorator based on SimpleDelegate
RegulationD has joined #ruby
horsecowdog has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
haxrbyte_ has quit [Read error: Connection reset by peer]
sohrab has quit [Ping timeout: 256 seconds]
lolmaus_ has quit [Ping timeout: 256 seconds]
diego2 has joined #ruby
ghr has quit [Ping timeout: 246 seconds]
Stalkr^ has quit [Ping timeout: 246 seconds]
diego2 has quit [Changing host]
diego2 has joined #ruby
diego2 is now known as diegoviola
sohrab has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
mleung has joined #ruby
<jhass>
quazimodo: btw watcha doing with that anyway?
mikecmpbll has joined #ruby
zzing has quit [Ping timeout: 256 seconds]
butlerdemo has joined #ruby
<quazimodo>
jhass: so we have some fairly big projects
brixen_ is now known as brixen
<quazimodo>
hundreds of models
<quazimodo>
lots of business rules
Caius has quit [Ping timeout: 276 seconds]
lolmaus_ has joined #ruby
butlerdemo has left #ruby ["leaving"]
<quazimodo>
so i'm given a new feature, i take a model, which may/maynot be AR and do stuff with it, save it, whatever
<quazimodo>
in doing so, i had *no idea* that, for example, every time a Ticket is changed the dude who pays us to write this software wants to get an email
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
<shevy>
spam him!
<quazimodo>
a Ticket being a model in the app
<shevy>
you can send automatic emails quite easily or? via ... sendmail + ruby too
<quazimodo>
so i save my Ticket instance, later i get an angry call... but i had no idea that 2 years ago some dev had decided this with him, and written a service object to save and email
<shevy>
I tested it by spamming my gmail account
<quazimodo>
shevy: contrived example
<quazimodo>
what i want to do
<quazimodo>
is to register the "responsibilities" of an action on Ticket on ticket, without a callback
sent1nel has quit [Remote host closed the connection]
<dudedudeman>
it's a trending topic now, too
pdoherty has quit [Ping timeout: 256 seconds]
zzing has joined #ruby
<shevy>
dudedudeman what are you actually coding lately?
rbennacer has joined #ruby
<Senjai>
dudedudeman: Nope
<Senjai>
dudedudeman: Those conversations are silly.
shadoi1 has joined #ruby
<dudedudeman>
shevy: still working on that monitor app! the mentor guy i have at work and i have been working on it so we can eventually deploy it at work and put it in production
<dudedudeman>
Senjai: i somewhat agree. what's your take on them?
lidenskap has joined #ruby
mary5030 has quit [Ping timeout: 265 seconds]
Guest88152 has quit [Ping timeout: 264 seconds]
<dudedudeman>
i've also been working on solving fizzbuzz in a couple different ways
iamjarvo has joined #ruby
danman has quit [Quit: danman]
Mark-6ma has joined #ruby
wottam has joined #ruby
shadoi has quit [Ping timeout: 256 seconds]
sandstrom has joined #ruby
claw has quit [Ping timeout: 256 seconds]
<Senjai>
dudedudeman: Agreeing on a wage is a choice, its not forced.
<Senjai>
dudedudeman: You want more money? Ask for it, or earn it. Or go somewhere else where you can make what you -----think----- you deserve
<dudedudeman>
yeah, that's kind of my thing. often people making a certain amount complain it's too. i'm curious if they've tried to move somewhere with higher pay or ask for it at their current company
serivich has quit [Ping timeout: 255 seconds]
Musashi007 has quit [Quit: Musashi007]
mjuszczak has quit []
aewffwea has quit [Ping timeout: 256 seconds]
konsolebox has quit [Quit: Leaving]
diegoaguilar has joined #ruby
lidenskap has quit [Remote host closed the connection]
<GaryOak_>
If your situation makes it easy to do that, then you can, but otherwise it's not easy
casadei_ has joined #ruby
<dudedudeman>
certainly. relationships, health, cost of living, contracts, kids, there are so many variables
<Senjai>
GaryOak_: Right, and if you have no alternatives, you're at a disadvantage unfortunately, and you can be played on that. All boils down to choices
Mon_Ouie has quit [Quit: WeeChat 1.1.1]
<atmosx>
I seriously don't know if it's a good or bad conversation. But it's interesting. Some people are able to monetise the shit out of everything. That's easier in the US but generally speaking we can't all monetise our skills equally. I get that's a soft-skill too.
PhantomSpank has quit [Read error: Connection reset by peer]
McRae has joined #ruby
<dudedudeman>
GaryOak_: Senjai, if you don't mind me asking, where are you guys at career wise? senior? mid? owner?
<havenwood>
Doctors and lawyers have powerful lobbies that get legislation passed protecting profits. Programmers have companies illegally conspiring to keep wages low.
PhantomSpank has joined #ruby
<GaryOak_>
I'm currently like a mid level dev, I've been out of college for 4 years now
<Senjai>
dudedudeman: I'm a self taught mid level developer
<Senjai>
at a consultancy
<havenwood>
Vote for me for higher programmer wages and free pie!
<dudedudeman>
havenwood: can cheesecake be on the agenda?
mjuszczak has joined #ruby
<dudedudeman>
Senjai: GaryOak_ that's awesome.
<dudedudeman>
i'm jealous of you both. lol
zachrab has joined #ruby
Channel6 has joined #ruby
<GaryOak_>
I was doing webdev for 3 of those years, and it was awful, I finally got out and am doing non-web ruby
lolmaus_ has quit [Quit: Konversation terminated!]
<dudedudeman>
dev ops?
<GaryOak_>
Custom server application
<dudedudeman>
nice
Guest27504 has quit [Quit: This computer has gone to sleep]
zorak8 has quit [Remote host closed the connection]
<GaryOak_>
yep
<Senjai>
dudedudeman: Find a good company that is well respected
<Senjai>
dudedudeman: Where are you located?
<dudedudeman>
Dallas
<GaryOak_>
But most jobs have no wage negotiation
PhantomSpank has quit [Read error: Connection reset by peer]
<Senjai>
GaryOak_: Sure they do
<GaryOak_>
Programmers are lucky to be in high demand
<Senjai>
All jobs do dude
PhantomSpank has joined #ruby
<Senjai>
We'll give you $11 an hour, uhmm.. actually I was thinking more of ..
<dudedudeman>
there's a GREAT ruby community here. i go to three meetup/hacknights a month with them, and the first one of the month is bit more formal and they bring in companies in the area that are ruby shops and they're always looking to hire. there were three at the last one
<Senjai>
minimum wage jobs really aren't negotiable
<GaryOak_>
All jobs where you are OK with being fired, or not getting hired
<Senjai>
GaryOak_: Gotta find the fit. Not getting the job is never a big deal
<Senjai>
there are so many positions
<dudedudeman>
i'd currently love to move to the ruby team here at the company i work for as the lead guy there is awesome and has been patiently training me in ruby for months now
wallerdev has joined #ruby
<dudedudeman>
but i'm curious if they'd leverage my current pay against me if i moved to a junior role
<shevy>
havenwood you have my +1 vote for free pie, especially with sugar coating
<Senjai>
And programmers will still be in high demand, because of all the crappy work programmers do that other programmers have to fix
scripore has quit [Quit: This computer has gone to sleep]
paulcsmith has quit [Quit: Be back later ...]
<GaryOak_>
Senjai: that's a very privileged attitude, as a programmer you might not need to take a job, but for others it's not like that
paulcsmith has joined #ruby
<Senjai>
GaryOak_: That's fine, everyone has circumstances.
snockerton has quit [Ping timeout: 256 seconds]
f3lp has joined #ruby
<Senjai>
but its not a priviledged attitude, I'd much rather go hungry then work at some place were I'd hate my life. But that's just me
snockerton has joined #ruby
mrmargol_ has joined #ruby
cjim_ has joined #ruby
kyrylo has joined #ruby
<dudedudeman>
Senjai: i'm very in to finding the right fit for the first ruby company i work for. i do not wnat to start working somewhere where i end up getting burned out and frustrated before i even have a chance to fully grasp the type of work i'll be doing long term
PhantomSpank has quit [Read error: Connection reset by peer]
paulcsmith_ has joined #ruby
<quazimodo>
does yield return a value
<quazimodo>
can one do
<quazimodo>
"some string #{yield if block_given?}"
horsecowdog has quit [Remote host closed the connection]
PhantomSpank has joined #ruby
<Senjai>
Yes
_djbkd has quit [Read error: Connection reset by peer]
<Senjai>
I would be very suprised if that wasnt the case
<quazimodo>
why am ionly getting true i wonder
dawkirst has joined #ruby
sent1nel has joined #ruby
_djbkd has joined #ruby
valeriansaliou has joined #ruby
valeriansaliou has quit [Client Quit]
mrmargolis has quit [Ping timeout: 256 seconds]
paulcsmith has quit [Ping timeout: 264 seconds]
PhantomSpank has quit [Read error: Connection reset by peer]
<atmosx>
What does 'doxxing' means?
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<atmosx>
Doxing (from dox, abbreviation of documents),[1] or doxxing,[2][3] is the Internet-based practice of researching and broadcasting personally identifiable information about an individual.[3][4][5][6] The methods employed to acquire this information include searching publicly available databases and social media websites (like Facebook), hacking, and social engineering. It is closely related to cyber-vigilantism and hacktivism.
<tuelz>
anyone know of a good resource for learning how to use UPS soap endpoints? First time using soap and their docs are garbage for my use case.
<tuelz>
wanting to pring shipping labels programmatically for end users.
<havenwood>
tuelz: Is there a non-SOAP option or stuck with SOAP?
choke has joined #ruby
leafybasil has quit [Ping timeout: 265 seconds]
<tuelz>
havenwood: all soap afaik
zachrab has quit []
<tuelz>
I'm using savon which seems to be a legit soap gem - problem is I have no idea what info to provide in my requests because soap is hard and docs are bad.
leafybas_ has quit [Ping timeout: 256 seconds]
Ropeney has quit [Quit: Leaving...]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Parsi>
still i get this error: /usr/local/rvm/gems/ruby-2.2.1/gems/tilt-2.0.1/lib/tilt/redcarpet.rb:2:in `require': cannot load such file -- redcarpet (LoadError)
neanderslob_ has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
mtakkman has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
<havenwood>
Parsi: What command are you running?
<Parsi>
havenwood: rake
<havenwood>
Parsi: And the bundle installed fine?
snockerton has quit [Quit: Leaving.]
<Parsi>
yes,, with no error
michael_mbp has quit [Excess Flood]
<havenwood>
Parsi: On Ruby 2.2.1?
gfawcettpq has quit [Ping timeout: 256 seconds]
pdoherty has joined #ruby
<Parsi>
yes havenwood, ruby 2.2.1p85
pdoherty has quit [Remote host closed the connection]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
bricker has joined #ruby
michael_mbp has joined #ruby
<havenwood>
Parsi: Do you see redcarpet locally?: gem list redcarpet
peteykun has quit [Quit: Leaving]
<havenwood>
Parsi: Where is it?: gem which redcarpet
<Parsi>
havenwood, no
lavros has quit [Quit: leaving]
<havenwood>
Parsi: Are you in the project directory with the Gemfile?
<Parsi>
i think so
airdisa has joined #ruby
pdoherty has joined #ruby
<havenwood>
Parsi: ls Gemfile
<havenwood>
Parsi: Gemfile or no such file?
<Parsi>
havenwood, it exists
thatslifeson has quit [Remote host closed the connection]
kirun has joined #ruby
qwertme has joined #ruby
<Parsi>
there is a Gemfile
<havenwood>
Parsi: Just confirm this fails?: bundle exec rake
freerobby has quit [Quit: Leaving.]
<Parsi>
havenwood, yes it fails
zotherstupidguy has quit [Quit: Lost terminal]
nb_bez___ has quit [Quit: Connection closed for inactivity]
towski_ has joined #ruby
snockerton has joined #ruby
<havenwood>
Parsi: My wild guess would be that the dependency on redcarpet is just missing from the Gemfile.
<Parsi>
havenwood, how can i fix it?
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
thatslifeson has joined #ruby
<havenwood>
err, actually i may be looking at the wrong Gemfile here... what's in the Gemfile you're looking at?
<havenwood>
I don't know awestruct.
pengin has quit [Remote host closed the connection]
<Parsi>
should i install redcarpet manually?
<havenwood>
Parsi: Won't hurt to: gem install redcarpet
Igorshp has quit [Remote host closed the connection]
<havenwood>
Parsi: But if a dep is missing from the Gemfile...
<Parsi>
havenwood, could it be a PATH related problem?
<havenwood>
Parsi: Dunno. What's in your Gemfile?
freerobby has joined #ruby
gazay has quit [Read error: Connection reset by peer]
<Parsi>
nano Gemfile?
<atmosx>
vim Gemfile
<havenwood>
emacs Gemfile
<atmosx>
Ggxwq:
<Parsi>
okay gimme a sec
<\13k>
"nano", man? :D
Peetooshock has quit [Remote host closed the connection]
<atmosx>
pico
<jhass>
ed
<atmosx>
ed, I never used ed
x1337807x has joined #ruby
<\13k>
ed is like interactive sed
wottam has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<havenwood>
joe Gemfile
<atmosx>
a sounds cool.. but since vim can handle fairly large files, I rarely used sed :-( always had to spent time to get the syntax right
<helpa>
Hi Parsi. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa>
Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<jhass>
!mute helpa
workmad3 has quit [Ping timeout: 265 seconds]
gazay has joined #ruby
<jhass>
apeiros: ^ since you didn't PR yet..
spider-mario has quit [Ping timeout: 245 seconds]
<havenwood>
Parsi: See the portion under: FIXME
theotherstupidgu has quit [Ping timeout: 245 seconds]
paulcsmith_ has joined #ruby
<Parsi>
what should i do with guys?
<atmosx>
can you do things like this: '<,'>s/$/: '',/g in nano?
<atmosx>
Parsi: have sex?
horsecowdog has joined #ruby
* atmosx
is a textual user too
dfinninger has quit [Remote host closed the connection]
<Parsi>
atmosx, :{
<atmosx>
Parsi: j/k ... I don't know what you're talking about
sent1nel has quit [Remote host closed the connection]
<apeiros>
jhass: right
theotherstupidgu has joined #ruby
<Parsi>
havenwood, what should i do?
<havenwood>
Parsi: Seems there are... things that need fixing in this gem. Try uncommenting the lines below FIXME and see if it magically works. >.>
<Parsi>
ok
<havenwood>
Parsi: Uncomment those "gem ..." lines then run: bundle
<havenwood>
Parsi: ^ and try again
<atmosx>
apeiros: does ruboto have a list of nicknames from which to accept cmds hard-coded or does it query to test if the user has 'op' in the #?
<Parsi>
havenwood, woops! no it says: Could not find gem 'coffee-script (>= 2.2.0) ruby' in any of the gem sources listed in your Gemfile or installed on this machine.
<apeiros>
atmosx: some commands are public and some commands require you to be authenticated and your authname to be in a hard coded list
<Parsi>
i ran "rake update"
<Parsi>
seems it's installing gems
<atmosx>
apeiros: nice
gazay has quit [Quit: gazay]
<apeiros>
atmosx: public commands will soon only be available to registered/authenticated people. private commands will pull from /cs access list
<Parsi>
for sake of God, why developing under linux is such a pain! :{
scripore has quit [Quit: This computer has gone to sleep]
wldcordeiro has joined #ruby
<apeiros>
atmosx: oh, actually ruboto already pulls from /cs access list
juanpablo__ has joined #ruby
<shevy>
Parsi nah it is easy on linux
<atmosx>
apeiros: how many lines of code is that bot as of today?
<shevy>
you just need to avoid bad software
mtakkman has quit [Remote host closed the connection]
<apeiros>
atmosx: sloccount says 724
BlaXpirit-UA has joined #ruby
<Parsi>
havenwood, thank you so so so much
<Parsi>
you saved my ass
scripore has joined #ruby
BlaXpirit_ has quit [Ping timeout: 272 seconds]
dANO has joined #ruby
pengin has joined #ruby
dANO has quit [Client Quit]
BlaXpirit-UA has quit [Read error: Connection reset by peer]
juanpablo__ has quit [Ping timeout: 246 seconds]
postmodern has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<atmosx>
apeiros: do you record time worked on project, with something like 'wakatime' ?
PhantomSpank has joined #ruby
Dopagod has joined #ruby
leafybasil has joined #ruby
swgillespie has joined #ruby
JDiPierro has quit [Remote host closed the connection]
BlaXpirit-UA has joined #ruby
stef204 has quit [Ping timeout: 264 seconds]
al2o3-cr has quit [Quit: WeeChat 1.1.1]
duderonomy has quit [Ping timeout: 252 seconds]
leafybasil has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
<apeiros>
atmosx: no
scripore has joined #ruby
<apeiros>
I don't track hours I don't bill.
al2o3-cr has joined #ruby
ramfjord has quit [Quit: leaving]
d10n-work has joined #ruby
tuelz has quit [Ping timeout: 256 seconds]
DexterLB has quit [Read error: Connection reset by peer]
airdisa has quit [Remote host closed the connection]
Outlastsheep is now known as zz_Outlastsheep
hephaestus_rg has joined #ruby
lidenskap has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
ramfjord has joined #ruby
BlaXpirit-UA has quit [Ping timeout: 272 seconds]
BlaXpirit-UA has joined #ruby
ndrei has joined #ruby
ponga has quit [Quit: Leaving...]
doodlehaus has joined #ruby
tuelz has joined #ruby
DexterLB has joined #ruby
x1337807_ has joined #ruby
rodfersou has quit [Remote host closed the connection]
BlaXpirit-UA has quit [Ping timeout: 245 seconds]
gfawcettpq has joined #ruby
x1337807x has quit [Ping timeout: 264 seconds]
BlaXpirit-UA has joined #ruby
tuelz1 has joined #ruby
tuelz has quit [Ping timeout: 240 seconds]
pdoherty has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
lidenskap has joined #ruby
zachrab has joined #ruby
mistermocha has joined #ruby
nfk|laptop has joined #ruby
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
Squarepy has quit [Quit: Leaving]
BlaXpirit-UA has quit [Ping timeout: 256 seconds]
I has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
I is now known as Guest77495
zachrab has quit []
DerisiveLogic has joined #ruby
towski_ has quit [Quit: Leaving...]
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
theotherstupidgu has quit [Ping timeout: 240 seconds]
theotherstupidgu has joined #ruby
slash_nick has joined #ruby
Matachines has joined #ruby
nfk|laptop has quit [Quit: yawn]
Brozo has joined #ruby
x1337807_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_djbkd has quit [Read error: Connection reset by peer]
_djbkd has joined #ruby
horsecowdog has quit [Remote host closed the connection]
jobewan has joined #ruby
Mezjin has joined #ruby
horsecowdog has joined #ruby
serivich has joined #ruby
butlerdemo has quit [Quit: leaving]
airdisa has joined #ruby
Igorshp has joined #ruby
airdisa_ has quit [Ping timeout: 265 seconds]
Peetooshock has joined #ruby
Brozo has quit [Quit: Leaving...]
bim has joined #ruby
freerobby has quit [Quit: Leaving.]
bim is now known as Guest25622
hyperjuice has quit [Remote host closed the connection]
horsecowdog has quit [Ping timeout: 272 seconds]
astrobunny has joined #ruby
Sirupsen has joined #ruby
Sirupsen has quit [Client Quit]
claw has joined #ruby
<tuelz1>
thor doens't seem to be behaving like a regular ruby file. I'm trying to require dotenv and then load it, but dotenv doesn't see the .env or it isn't loading the env variables at least
pengin has quit [Remote host closed the connection]
<djellemah>
Either way, abort_on_exception will kill the process if an exception is raised in the thread.
<yh>
djellemah: the process, or the thread it occurs in?
Rapier- has quit [Quit: (null)]
<djellemah>
The process AFAIK
<yh>
djellemah: I couldn't help but notice it does say _all_ threads. Perhaps that's simply where it was copied from the class method and not corrected (a bug in documentation?)
<al2o3-cr>
like you said it should raise when you do Thread.list.map {|t| t.join unless Thread.current }
Mezjin has quit [Remote host closed the connection]
baweaver has joined #ruby
<al2o3-cr>
yh: good luck and hope someone can give you the answer
jaygen has joined #ruby
<yh>
al2o3-cr: well it could well raise before that part; the only reason I'm joining is to prevent RSpec terminating the example before the thread completes
swgillespie has joined #ruby
Spami has joined #ruby
<al2o3-cr>
ok
Hounddog has quit [Read error: Connection reset by peer]
<djellemah>
yh: You have to join (or value) a thread to get the exception raised.
<yh>
djellemah: why would that be?
serivich has quit [Ping timeout: 255 seconds]
<djellemah>
In the meantime the thread which called Thread.new in the first place is carrying on doing its thing. Where else would it make sense to raise the exception?
astrobunny has joined #ruby
pussygla1iator has quit [Ping timeout: 272 seconds]
<djellemah>
Thread.new{raise} will do nothing
<djellemah>
Thread.new{raise}.join and you will get the exception
<djellemah>
from the point of view of the current thread, that is.
<havenwood>
yh: compare to: expect { foo.join }.to raise_error
Prysmm has joined #ruby
<havenwood>
yh: ^ where it won't immediately return from #foo without an error yet being raised before you even try joining.
Prysm has quit [Ping timeout: 240 seconds]
<havenwood>
yh: or for that matter, just for demonstration: expect { foo; sleep 1 }.to raise_error
failshell has joined #ruby
theotherstupidgu has quit [Ping timeout: 250 seconds]
<yh>
havenwood: I tried the latter, and see; I guess I thought when the thread aborted, it somehow joined onto the main one at that point (to notify of failure)
<havenwood>
yh: the expectation passes the instant the method returns without an error raised
<yh>
havenwood: yeah, that's why I saw joining or sleeping as the way to stop that happening
<havenwood>
yh: it happens when #expect returns, the it block isn't relevant
<yh>
I preferred join as it minimised the time waiting rather than simply fixing one unreliability
<yh>
unreliably*
theotherstupidgu has joined #ruby
<yh>
oh!
<yh>
That is ridiculously obvious in retrospect.
atmosx has quit [Ping timeout: 252 seconds]
<djellemah>
yh: Yup ;-) think of other_thread.join as a way of telling *this* thread to wait for other_thread to finish.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sanguisdex has joined #ruby
<yh>
havenwood: yet, the spec realises a RuntimeError happened
taiansu has quit [Remote host closed the connection]
<yh>
havenwood / djellemah: unfortunately, foo threads off, so foo.join wouldn't work
zorak8 has joined #ruby
taiansu has joined #ruby
atmosx has joined #ruby
bmurt has quit []
<djellemah>
because of abort_on_exception = true, foo returns true.
zorak8 has quit [Client Quit]
<abyss>
oh, ok sorry now it doesn't make any sense... I have to revise my code and I have put sessions to another hash and then sort by datetime...
astrobunny has joined #ruby
<yh>
djellemah: besides sleeping, I'm not really sure what the solution is
<yh>
sleeping in specs is terrible, and unreliable
<djellemah>
yh: you don't have access to the thread object that's created inside foo ?
<havenwood>
yh: do your thread joining inside the expect block
taiansu has quit [Ping timeout: 256 seconds]
ballpointcarrot has quit [Ping timeout: 256 seconds]
<abyss>
Maybe someone could help? I have apache accesslogs and every line (it's not true but let simplify this) has session id (it's a number and word like jkfdajfk3235kfdf) and each line has when the request start. So I'd like to put make something like this:
<havenwood>
yh: ThreadGroup will have even the Threads that a Thread spawns, just for you to consider
Channel6 has quit [Quit: Leaving]
hewenhong has joined #ruby
McRae has quit [Ping timeout: 240 seconds]
<al2o3-cr>
ruboto: give havenwood cookie :)
<abyss>
session[thesameid]=20150202:04:04, session[thesameid]=20150202:04:05. How to do it the right way? Because I can't put sessions to key because this will erase last data? Any ideas?
<havenwood>
can still return before they make it into the ThreadGroup though, depends
joe_meade has quit [Remote host closed the connection]
baturay_ has quit [Remote host closed the connection]
naftilos76 has quit [Read error: Connection reset by peer]
dreinull75 has joined #ruby
<abyss>
adding to line 12 time.sort will be enough? It will sort datetime as well?
iamjarvo has joined #ruby
<dreinull75>
sometimes (like now) my ruby behaves weird. Apps start up extremely slowly, are slow to stop and every call takes seconds. Is there some kind of cache that needs clearing? I'm running Ruby 2.2 and 2.2.2
<djellemah>
abyss: you have all session keys with the same value - the time array
grzywacz has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
McRae has joined #ruby
iamjarvo has joined #ruby
bim has joined #ruby
swgillespie has joined #ruby
Brozo has left #ruby ["Leaving..."]
<djellemah>
abyss: yes, Array#sort will also sort DateTime instances
<jhass>
dreinull75: the rest of your OS is responsive though?
bim is now known as Guest47105
<dreinull75>
jhass yes
<jhass>
nothing hogging memory, CPU and/or IO?
blackmesa has joined #ruby
<dreinull75>
I'm restarting the db which is on another system to double check it's not on that side
<dreinull75>
jhass no
<jhass>
and even a simple thing like ruby -e "p 'hi'" takes seconds?
Spami has joined #ruby
<dreinull75>
jhass no, just DB calls, but always loads of objects are created locally
<abyss>
djellemah: ok I get it I should get rid of that variable time and put to session[matches[2]] << DateTime.strptime(matches[1], "%d/%b/%Y:%H:%M:%S")
<jhass>
dreinull75: well, then it's network or the DB
mary5030 has quit [Remote host closed the connection]
<djellemah>
abyss: you're on the right track. What happens the first time a particular session id is found? That is, matches[2] has a value that isn't already in session.
ramfjord has joined #ruby
Guest47105 has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
<jhass>
dreinull75: or if either the DB or the ruby process run in a VM it could be that another VM or even the host system gets overloaded, which is likely not visible in your VM
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
McRae has quit [Ping timeout: 264 seconds]
<dreinull75>
jhass the db restart seems to have worked for now. Have to rely on a cygwin mysql instance which may or may not be the problem. thanks though.
<jhass>
sounds horrible :P
yqt has joined #ruby
<dreinull75>
jhass you have no idea what my alternatives are. This is heaven.
bootstrappm has quit [Remote host closed the connection]
<jhass>
and I don't want to then!
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bklane has quit [Remote host closed the connection]
SouL_|_ has quit [Remote host closed the connection]
<Gondei>
like until (a = b) == nil or until (a = b).nil?
<dreinull75>
while (a=b)
<jhass>
Gondei: until a
<jhass>
er, yeah, while a
<jhass>
no parens, no assignment
<jhass>
no explicit nil check as long as possible (as long as false is not a valid value)
<Gondei>
jhass, Do you prefer == or ? this was just an example to demonstrate the difference
<jhass>
a bad one then, I can't come up with another two expressions that would be equivalent
<Gondei>
jhass, A bad one? This is from Eloquent Ruby book lol
bkxd has quit [Ping timeout: 276 seconds]
<jhass>
and it doesn't specifically talk about nil checks there?
djbkd_ has joined #ruby
<yh>
havenwood: you have any idea why it might not have worked on the earlier jrubies?
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
diegoaguilar has quit [Quit: Leaving]
<djellemah>
abyss: Looks like it will work, but calling .sort for every line will slow down to a crawl once you have a decent number of entries for a particular session id.
<abyss>
djellemah: I'm sorry but I don't know what you mean by that: date_time, session_id = parseapache.match(line)[1..-1]... that parseapache.match collect two things, sessionid and time
<ruboto>
djellemah # => [#<DateTime: 2015-05-01T21:51:54+00:00 ((2457144j,78714s,94777511n),+0s,2299161j)>, "your session id ...check link for more (https://eval.in/322247)
SouL_|_ has joined #ruby
* djellemah
apologises to ruboto
<havenwood>
yh: afk for another few minutes, but it works with: export JRUBY_OPTS=--2.0
juanpablo__ has joined #ruby
juanpablo__ has quit [Read error: Connection reset by peer]
mordocai has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
juanpablo__ has joined #ruby
<abyss>
djellemah: I will just add: session.each { |key| key.sort!} yeah?
SouL_|_ has quit [Ping timeout: 272 seconds]
<djellemah>
abyss: Well, you want to sort the array of times, not the key ;-)
zzing has quit [Ping timeout: 256 seconds]
<shevy>
let's do another round of ruby quiz
<shevy>
In Ruby, for class Array, what is the difference between using .push versus <<
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
decoponio has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
<shevy>
yeah jhass
iasoon has quit [Ping timeout: 276 seconds]
Igorshp has joined #ruby
EagleDelta has quit [Read error: Connection reset by peer]
shellfu_afk is now known as shellfu
Senjai has quit [Quit: WeeChat 0.4.2]
<jhass>
shevy: my turn: what's the difference between include and prepend
<djellemah>
abyss: you don't need to look up value, it's already right there.
Senjai`work has joined #ruby
<shevy>
include includes a module
ramfjord has quit [Ping timeout: 272 seconds]
Senjai`work has joined #ruby
Senjai`work has quit [Changing host]
Senjai`work is now known as Senjai
rgb-one has joined #ruby
<abyss>
djellemah: when I try something like this: session.each { |key| session[key].sort! } I get: parselog-good:22:in `block in <main>': undefined method `sort!' for nil:NilClass (NoMethodError)
<baweaver>
that second part is what screws most people
<Senjai>
But if you subscribe to the "EVERYTHING IS IMMUTABLE" philosophy, you will hate them
ixti has joined #ruby
failshell has quit []
nwertman has joined #ruby
<baweaver>
I subscribe to most everything is immutable
SuperTaz has quit [Remote host closed the connection]
<baweaver>
unless needed
<baweaver>
which is admittedly rare and far between
<baweaver>
makes it a lot less annoying to test later.
<djellemah>
baweaver: context
<baweaver>
then again I spent a bit too long around Haskell and Scala
qwertme has joined #ruby
<baweaver>
djellemah: is pretty clear. What's confusing?
SuperTaz has joined #ruby
_ixti_ has quit [Ping timeout: 246 seconds]
<baweaver>
If you're using reduce on a hash, it's normally safe to use #merge! on the accumulator as it's a loop variable, and it's a lot faster
Igorshp has joined #ruby
<abyss>
errr I put this session.map to my script;) It works;) Thank you. djellemah so how I should it right?;)
<djellemah>
abyss: it will also work.
<jhass>
abyss: you should use something you can explain how it works
davedev2_ has joined #ruby
<jhass>
not only what the result is but also how that result is achieved
davedev24_ has quit [Ping timeout: 256 seconds]
<rgb-one>
any free ruby books?
nwertman has left #ruby [#ruby]
<abyss>
jhass: that |key, values| works for me as well;) But you both said it wrong;) This map do the same thing but without ! (to_h I don't know what for but I suppose this map reduce hash to array, so next I need to make this array again hash...
<jhass>
rgb-one: chris pine's learn to program has a free version, learn ruby the hard way too
<jhass>
codeacademy has a free course
jobewan has quit [Quit: Leaving]
<rgb-one>
What of pdf/epub books any free ones?
A205B064 has joined #ruby
Igorshp has quit [Remote host closed the connection]