agarie has quit [Remote host closed the connection]
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
cirenyc has quit [Quit: Leaving...]
agarie has joined #ruby-lang
16WABGBA3 has quit [Ping timeout: 255 seconds]
stonerfish has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
havenn has quit [Ping timeout: 248 seconds]
_malte has joined #ruby-lang
Verdi_ has quit [Quit: Computer has gone to sleep.]
chendo_ has joined #ruby-lang
Torrieri has quit [Remote host closed the connection]
Steve8595 has joined #ruby-lang
kitallis has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
richardjortega has joined #ruby-lang
<richardjortega>
how do you gsub a string with special characters?
<richardjortega>
for instance "“yummy”" which has a special character of quotes, U+FFE2
cirwin has joined #ruby-lang
agarie has quit [Remote host closed the connection]
agarie has joined #ruby-lang
sqbell has quit [Ping timeout: 255 seconds]
datanoise has joined #ruby-lang
rippa has quit [Ping timeout: 260 seconds]
<micaeked>
richardjortega: what are you trying to do? replace the quotes with something? if so, you can specify unicode chars in regex like this: "“yummy”".gsub(/\u201c/, 'x')
<richardjortega>
micaeked: i'm just trying to remove the special character quotes
<richardjortega>
that removed the first, but not the other quote
<richardjortega>
returned "yummy”"
<micaeked>
richardjortega: yep. here it is for both: "“yummy”".gsub(/[\u201c\u201d]/, '')
<richardjortega>
i ended up doing str.slice(1..-2)
adambeynon has joined #ruby-lang
<richardjortega>
micaeked: that worked!
<richardjortega>
which do you think is a better approach, the regex gsub or just splicing out first and last?
<micaeked>
i would go with the match/replace, unless you are 100% sure that the input will always have the quotes in those positions
<richardjortega>
as far as i can tell, every single one is quoted from the source i'm getting it from
<richardjortega>
so i'll do slicing as that matches
<richardjortega>
but i'm curious, how did you find the special character coverted
<richardjortega>
when i copy pasted the string in terminal it gave me \U+FFE2
_malte has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
chendo_ has quit [Ping timeout: 252 seconds]
chendo_ has joined #ruby-lang
coliflor has joined #ruby-lang
<drbrain>
I would do: "“yummy”".encode Encoding::US_ASCII, invalid: :replace, undef: :replace, replace: ""
<drbrain>
that'll take away any non-US-ASCII character
<drbrain>
you can also just get rid of punctuation: "“yummy”".gsub(/\p{Punctuation}/, "")
<drbrain>
richardjortega: ↑
wardrop has quit [Quit: wardrop]
rohit has quit [Quit: Leaving]
rohit has joined #ruby-lang
dmwuw has quit [Remote host closed the connection]
JohnBat26 has joined #ruby-lang
chimkan_ has joined #ruby-lang
burgestrand1 has joined #ruby-lang
gnufied has joined #ruby-lang
chimkan__ has joined #ruby-lang
Nisstyre-laptop has quit [Ping timeout: 250 seconds]
burgestrand has quit [Read error: Operation timed out]
rohit has quit [Quit: Leaving]
chimkan_ has quit [Ping timeout: 252 seconds]
<micaeked>
richardjortega: i did str.chars.map(&:ord) to get the integer values, then googled those to get unicode values. then looked up how to put specific unicode chars in regex
sn0wb1rd has quit [Remote host closed the connection]
headius has quit [Quit: headius]
havenn has joined #ruby-lang
<richardjortega>
those are all great idea thank you
<richardjortega>
testing them out now
solars has joined #ruby-lang
<drbrain>
richardjortega: the first would turn "resumé" into "resum", so beware it
<richardjortega>
got a quick rails question too… i'd like to store number/floats like "5" or "4.5", can I use just integer data type or should i use decimal?
havenn has quit [Ping timeout: 240 seconds]
cirenyc has joined #ruby-lang
<drbrain>
the integer DB type would convert 4.5 to 4 or 5 (depending on the exact value)
chimkan_ has joined #ruby-lang
<richardjortega>
ah damn, then decimal data type i should be using
coliflor has quit [Ping timeout: 245 seconds]
chimkan__ has quit [Ping timeout: 240 seconds]
<drbrain>
richardjortega: you can also perform transliteration with String#encode, but you have to build the character map yourself
<banisterfiend>
charliesome: just for bindings that are returned from my API, though i added the methods on Binding itself, they only return non-nil in the case of of_caller/callers bindings
<charliesome>
ah cool
<charliesome>
can't wait for ruby 2.0.0 to include all this stuff natively
<banisterfiend>
the current 2.0 API is very segfaulty and limited
<banisterfiend>
im working on improving it
<banisterfiend>
charliesome: look at the show-stack command of pry-stack_explorer
<banisterfiend>
i show a custom stack trace built with boc apis
<charliesome>
i had the greatest idea while reading the meeting
<judofyr>
charliesome: I think the "100% consensus" idea is ridiculous
My_Hearing has joined #ruby-lang
<charliesome>
what if there was a ruby implementation that was designed from the ground up to be a test bed implementation
<charliesome>
sort of like rakudo is for perl 6
<charliesome>
it isn't an impl you'd use in production, it wouldn't care about performance
<charliesome>
but it would care about being extensible and highly modifiable
<charliesome>
preferably it'd also be written in a higher level language
<judofyr>
not because I think people will start vetoing everything because of malice, but because each implementation has limited resources. if rbx says "hey, let's make actors standard!" I'm not sure if MRI has the capacity to implement it.
<judofyr>
charliesome: isn't rbx pretty close?
<charliesome>
pretty close but i don't like that the core is in c++
<charliesome>
and i can imagine that rbx's goal of being fast would interfere with the goal of making deep changes easy
<judofyr>
charliesome: what about something like PyPy's RPython?
<charliesome>
judofyr: that's getting closer, but at the same time, there's still a lot of code there that is concerned with performance
<charliesome>
if the performance concern is thrown out of the window completely, i think you'd find that the implementation becomes significantly simpler and easier to understand
datanoise has quit [Ping timeout: 264 seconds]
PhilCK has joined #ruby-lang
kurko_ has joined #ruby-lang
<judofyr>
charliesome: interesting ideas, but again: why has the resources? :)
<charliesome>
so many ideas, too little time
<judofyr>
oh yes
<judofyr>
I haven't been able to do anything on my little language :(
<charliesome>
judofyr: what are you writing it in?
<charliesome>
ruby?
<judofyr>
charliesome: yes, an interpreter in Ruby.
<charliesome>
you should do it in haskell
<judofyr>
probably
<judofyr>
charliesome: but it's going to be a semi-compiled language, so it will compile to JS/C
<charliesome>
ah
<charliesome>
i was toying with a js interpreter in haskell
catepillar has quit [Quit: I generally avoid temptation.. unless I can't resist it.]
<charliesome>
but then haskell gave me the shits with its "no circular imports" problem
rsl has joined #ruby-lang
<judofyr>
inspired by whitequark's Ruby and picobit
<judofyr>
charliesome: I'm also playing with the idea of "incidental typing"
<charliesome>
what's that?
<judofyr>
you can define pre-condition functions: Foo = [value] { assert value.is_a?(String) }
<judofyr>
and then use them in function declarations: [Foo thing] { … }
<judofyr>
semantic-wise, it will invoke Foo for the value
<charliesome>
cool!
<judofyr>
and then the compiler should be smart enough to realize that `thing` must be a String
<judofyr>
and optimize the function body based on that
<manveru>
isn't that called type inference?
<charliesome>
what about pathological pre conditions
<charliesome>
will you just ignore them at compile time and leave it to runtime?
<judofyr>
charliesome: yes
<judofyr>
and it can also give compile-time warnings
rohit has quit [Quit: Leaving]
* manveru
likes how go doesn't have warnings, only fatal compile errors
<manveru>
nobody ever reads ruby warnings :(
<charliesome>
nobody ever runs with warnings on
<manveru>
that too
<manveru>
it's just me
mytrile has quit [Remote host closed the connection]
<charliesome>
i don't find warnings are even that useful in ruby
<judofyr>
manveru: well, they will be more like fatal errors (because they *will* cause runtime errors)
<charliesome>
unlike a language like C, where i compile with -Wall -Wextra -pedantic and -Werror
<manveru>
that's just as braindead :P
<manveru>
they come up with new flags every year or so
<charliesome>
i like how -Wall is not actually all
s1n4 has quit [Quit: leaving]
<judofyr>
charliesome: LLVM has added -Weverything
<charliesome>
sort of like how php's E_ALL is not all
<charliesome>
which is why php has E_ACTUALLY_ALL
<judofyr>
nice
<charliesome>
lol php
<judofyr>
and lolc :)
<charliesome>
E_ACTUALLY_ALL, real_escape, etc
<manveru>
php still has errors you can't rescue
shtirlic has joined #ruby-lang
<manveru>
and i like how their idea of threading is `php other.php &`
<judofyr>
charliesome: but yeah, I still haven't figured out how function calls should be done (e.g. argument unpacking/pattern patching) :/
<manveru>
erlang pattern matching is the part i like most about erlang syntax :)
<manveru>
or hate least, dunno
madish has joined #ruby-lang
scottschecter has quit [Quit: WeeChat 0.3.9.2]
sush24 has joined #ruby-lang
srbaker has joined #ruby-lang
<banisterfiend>
charliesome: so, will you reconstruct the backtrace from the bindings?
<banisterfiend>
i also expose frame_type which is a little bit usful
<charliesome>
banisterfiend: i remembered why i didn't do that in the first place
<banisterfiend>
useful
<charliesome>
i need to get the current line
<charliesome>
or the line where the exception was thrown
scottschecter has joined #ruby-lang
ddd has joined #ruby-lang
<banisterfiend>
charliesome: how does that prevent you from doing that?
<charliesome>
__LINE__ is always 1 when i eval it in the binding
<banisterfiend>
binding.eval("__LINE__")
havenn has joined #ruby-lang
<banisterfiend>
shouldn't be
<banisterfiend>
i'll have a play brb
_Mon_Ouie_ has joined #ruby-lang
<banisterfiend>
charliesome: it's not 1 for me
<charliesome>
strange
tenderlove has joined #ruby-lang
My_Hearing has quit [Ping timeout: 240 seconds]
vmoravec has quit [Ping timeout: 246 seconds]
vmoravec has joined #ruby-lang
<judofyr>
manveru: well, I'm not sure if I can actually support proper pattern matching. pattern matching sort-of implies that you can extract values, and I want all pattern-matching capabilities to be defined in the language itself.
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
<darix>
manveru: threadedsafe php ... that would be too awesome ... then you wouldnt be stuck with prefork apache anymore
<judofyr>
manveru: i.e. I don't want to support pattern matching for just core types; I want to make it available for all types
<banisterfiend>
which has always worked for us in pry since the early versions :)
<banisterfiend>
charliesome: evalling __LINE__ In the binding is how we get the 'whereami' header: From: /Users/johnmair/ruby/pry/jo.rb @ line 12 Object#loi:
dr_bob has quit [Quit: Leaving.]
<judofyr>
banisterfiend: jo.rb?
<charliesome>
ooh i know what happened
havenn has quit [Ping timeout: 252 seconds]
<charliesome>
i must've tried __LINE__ when using the pry backend for the repl
<banisterfiend>
maybe it is, but i always assumed you had to do something pretty major, or demonstrate you've grok'd the internals before they'd give you a commit bit
tonni has joined #ruby-lang
gmci has joined #ruby-lang
<charliesome>
the internals are whack
gmci is now known as Guest91170
<banisterfiend>
yeah, which is why (IMO) you have to understand them before oyu get a commit bit ;) or you could mess something up..
havenn has joined #ruby-lang
<charliesome>
i know a little bit about the vm internals, but there's plenty code in ruby that doesn't have anything to do with the vm internals
gnufied has joined #ruby-lang
<banisterfiend>
sure, in which case any half-decent C programmer could ask for a commit bit, but i'm not sure it works like that (i'll guess we'll see)
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
<charliesome>
night
<judofyr>
charliesome: maybe you should write what you intend to do?
sush24_ has quit [Read error: Connection reset by peer]
gmci_ has joined #ruby-lang
sheerun has quit [Ping timeout: 240 seconds]
sheerun has joined #ruby-lang
dr_bob has quit [Ping timeout: 240 seconds]
mindbender1 has joined #ruby-lang
dr_bob has joined #ruby-lang
tsp has quit [Ping timeout: 255 seconds]
rue|w has quit [Ping timeout: 252 seconds]
sush24_ has joined #ruby-lang
<ddd>
is charlie fairly well known? wonder if matz knows of him, did some background review of both the patches he's submitted/had accepted, and other works he's done and thats why he's being so easy about it. Also, Matz is marked as a guest, so I wonder if thats really him.
<ddd>
Posted by Yukihiro Matsumoto (Guest)
<banisterfiend>
robably just no one had the balls to directly ask for commit bit like that before :)
<banisterfiend>
probably*
<banisterfiend>
congrats to him
rue|w has joined #ruby-lang
<ddd>
hehe true. there is always that :)
<judofyr>
ddd: I think it means he's a guest at ruby-forum
<injekt>
yeah
<judofyr>
seems legit here
<ddd>
i'll be content for quite some time with working on docs. Already got plans for after christmas to get rolling on that.
<injekt>
it's him, though
<ddd>
judofyr: ahh yeah, didn't think of that
<ddd>
injekt: cool :)
<manveru>
it's matz@ruby.or.jp :)
slyphon has joined #ruby-lang
<manveru>
guess i'm the only one still signed up on all the mailing lists
<ddd>
that works. just seemed a little iffy until judofyr's comment which makes complete sense
<judofyr>
manveru: hm? I subscribe to ruby-core (and ruby-talk, although I never really read it)
<ddd>
hehe, dude there's so many MLs for all the things I have my hands in. I'm not signed up on them all. I am on the google group though
<manveru>
judofyr: that makes two of us then
<manveru>
i just can't stand the google groups interface
<ddd>
my fiancee and I are looking for a decent one, but want to talk with folks either of us actually talk to about what they have and their likes/dislikes on what they have. we don't trust the web based reviews.
<burgestrand>
judofyr: :3
<judofyr>
ddd: well, GX1 is a Micro-Four Thirds camera. so it's not a DSLR.
<judofyr>
but you can change lenses
<judofyr>
and it's pretty decent :)
<judofyr>
although it's no longer the best M43 camera
tenderlove has quit [Ping timeout: 260 seconds]
Banistergalaxy has quit [Ping timeout: 259 seconds]
<ddd>
digging around google and camera sites for more info. thanks
lcdhoffman has joined #ruby-lang
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
havenn has joined #ruby-lang
<judofyr>
ddd: you won't get a best pictures with a M43-camera but (1) it's way better than compact cameras (2) you can still change lenses, which often gives the best improvements and (3) it's way smaller than a DSLR: http://brooksreview.net/2012/03/gx1/
<judofyr>
"The GX1 is basically the 11” MacBook Air to the 15” MacBook Pro of my Canon 5D. " <- actually a good comparison :)
<zzak>
judofyr: looks a lot like vermont, especially that lake
<ddd>
haha nice. I've a 15" :) didn't like the MBA myself. I'll have to look into more.
<banisterfiend>
judofyr: what is your primary comp? mba?
dabradley has joined #ruby-lang
<judofyr>
ddd: I'm very satisfied with my GX1. I have the 20mm pancake lens (same as the guy in the review) and it's really nice to have a small and compact camera. I used it on InterRail in Eastern Europe this summer, and it's very nice to be able to just grab the camera (without a bag)
<judofyr>
banisterfiend: 15" MBP
<judofyr>
zzak: heh, they're not from the same place ;)
<judofyr>
zzak: and only the first is from Norway
<judofyr>
s/nice//
<judofyr>
(I'll have to stop over-doing the niceness)
<judofyr>
zzak: there's a bunch of pictures from all over Europe there, but the last ones are from Norway
cirenyc has joined #ruby-lang
vlad_starkov has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
<judofyr>
zzak: so, when are you coming to Norway?
<banisterfiend>
judofyr: you dont find that a pain to lug around?
<judofyr>
banisterfiend: nah, I mostly only code at home and work
sush24_ has quit [Quit: This computer has gone to sleep]
<banisterfiend>
judofyr: do you do judo? is that where your nick comes from?
chimkan has quit [Ping timeout: 276 seconds]
chimkan__ is now known as chimkan
<judofyr>
banisterfiend: I did
<ddd>
no, I can only provide a trace of rvm's install of RBX. *I* have not had any issues installing rbx, so not sure at all what brixen is specifically referring to
<judofyr>
banisterfiend: some years ago. and yes.
<banisterfiend>
judofyr: interesting, burgestrand does aikido, we should organize a fight between u two
<judofyr>
banisterfiend: he'll probably win :)
<banisterfiend>
u only live a few hour away from eachther too
<banisterfiend>
hehe
<burgestrand>
Aikido was just a few months, now it’s taido :p
<burgestrand>
Judo is fun!
<banisterfiend>
burgestrand: what' the diff b/w taido and aikido? (never heard of taido)
<banisterfiend>
is that like taebo ?
MaddinXx has quit [Remote host closed the connection]
gnufied has quit [Quit: Leaving.]
davidbalbert is now known as davidbalber|away
<burgestrand>
banisterfiend: taido is like acrobatic karate
<banisterfiend>
haha cool
<judofyr>
burgestrand: where are you located?
<burgestrand>
banisterfiend: aikido is like… old person judo
<burgestrand>
judofyr: gothenburg
<judofyr>
ah
* firefux
is practicing Hapkido
akahn has quit [Remote host closed the connection]
rikkus has quit [Remote host closed the connection]
dlackty has quit [Remote host closed the connection]
beawesomeinstead has quit [Remote host closed the connection]
mrb_bk_ has quit [Remote host closed the connection]
agib_ has quit [Remote host closed the connection]
wycats has quit [Remote host closed the connection]
mccraig has quit [Remote host closed the connection]
tubbo has quit [Remote host closed the connection]
pkondzior_ has quit [Remote host closed the connection]
pvh__ has quit [Remote host closed the connection]
davidboy has quit [Remote host closed the connection]
thejspr_ has quit [Remote host closed the connection]
dkannan has quit [Remote host closed the connection]
abuiles has quit [Remote host closed the connection]
herpless_ has quit [Remote host closed the connection]
anildigital_work has quit [Remote host closed the connection]
mroth has quit [Write error: Broken pipe]
strmpnk has quit [Remote host closed the connection]
franckverrot has quit [Remote host closed the connection]
<judofyr>
damn netsplits
davidbalber|away is now known as davidbalbert
<yorickpeterse>
Everybody knows the only real men's sport is beer lifting
<yorickpeterse>
mens sport, w/e
dc5ala has quit [Quit: Ex-Chat]
<ddd>
heh
<banisterfiend>
firefux: i could do a bit of hapkido..scorpion used that marital art in mortal kombat deadly alliance ;)
<yorickpeterse>
yeah banisterfiend knows karate, be careful
<yorickpeterse>
he might slap your bindings
<judofyr>
ddd: does your name mean "ddd-driven development"?
<judofyr>
nickname*
<ddd>
david deryl downey == ddd
<bougyman>
so yes, it does.
<bougyman>
ddd does ddd-driven development
<ddd>
I don't use my first name, I use my middle.
<ddd>
bougyman: hehe yes, yes i do :)
<judofyr>
bougyman: oh, so that's the meaning? "Ddd Does Ddd-driven development"?
<ddd>
and sometimes, even Desperation Driven Development :)
esad has joined #ruby-lang
<bougyman>
judofyr: correct.
<ddd>
haha
<judofyr>
this recursion is complicated
<ddd>
nested centers :)
solars has quit [Read error: Operation timed out]
dr_bob has quit [Quit: Leaving.]
dr_bob has joined #ruby-lang
tenderlove has joined #ruby-lang
benanne has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
krohrbaugh has quit [Ping timeout: 276 seconds]
tenderlove has quit [Ping timeout: 255 seconds]
esad has quit [Quit: Computer has gone to sleep.]
srbaker has joined #ruby-lang
wallerdev has joined #ruby-lang
srbaker has quit [Client Quit]
wycats has joined #ruby-lang
srbaker has joined #ruby-lang
davidbalbert is now known as davidbalber|away
davidbalber|away is now known as davidbalbert
davidbalbert is now known as davidbalber|away
anildigital_work has joined #ruby-lang
dkannan has joined #ruby-lang
mccraig has joined #ruby-lang
pvh__ has joined #ruby-lang
unsymbol has quit [Ping timeout: 252 seconds]
ejholmes has quit [Quit: ejholmes]
pkondzior_ has joined #ruby-lang
herpless_ has joined #ruby-lang
dr_bob has left #ruby-lang [#ruby-lang]
agib_ has joined #ruby-lang
thejspr_ has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
mroth has joined #ruby-lang
shtirlic_ has joined #ruby-lang
rikkus has joined #ruby-lang
abuiles has joined #ruby-lang
mrb_bk_ has joined #ruby-lang
shtirlic has quit [Ping timeout: 260 seconds]
akahn has joined #ruby-lang
strmpnk has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
franckverrot has joined #ruby-lang
dlackty has joined #ruby-lang
davidboy has joined #ruby-lang
Assurbanipal has quit [Quit: Konversation terminated!]
pangel has joined #ruby-lang
unsymbol has joined #ruby-lang
gnufied has joined #ruby-lang
tubbo has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
tenderlove has joined #ruby-lang
viking has joined #ruby-lang
srbaker has joined #ruby-lang
tenderlove has quit [Ping timeout: 264 seconds]
anannie has joined #ruby-lang
nXqd has quit [Read error: Connection reset by peer]
wyhaines has quit [Remote host closed the connection]
headius has joined #ruby-lang
lcdhoffman has joined #ruby-lang
powershellyoda has joined #ruby-lang
powershellyoda has quit [Client Quit]
judofyr has quit [Remote host closed the connection]
sent-hil has joined #ruby-lang
nXqd has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
sent-hil has quit [Remote host closed the connection]
_malte has joined #ruby-lang
nXqd has quit [Ping timeout: 256 seconds]
Artheist has quit [Remote host closed the connection]
mindbender1 has quit [Ping timeout: 264 seconds]
tenderlove has joined #ruby-lang
dankest has joined #ruby-lang
Steve8595 has joined #ruby-lang
apod has quit [Quit: Leaving]
Dan- has joined #ruby-lang
twiz718 has joined #ruby-lang
twiz718 has quit [Client Quit]
briantrust has quit [Remote host closed the connection]
dankest has quit [Ping timeout: 264 seconds]
krohrbaugh has joined #ruby-lang
sharma__ has joined #ruby-lang
sush24_ has quit [Ping timeout: 255 seconds]
sent-hil has joined #ruby-lang
cored has quit [Ping timeout: 264 seconds]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
mindbender1 has joined #ruby-lang
faen has quit [Quit: faen]
faen has joined #ruby-lang
R_Macy has joined #ruby-lang
chimkan has quit [Quit: chimkan]
<viking>
trying to emit custom yaml with psych using encode_with. however, setting coder.map to a hash doesn't behave the same way as "some_hash.to_yaml" would
davidbalber|away is now known as davidbalbert
nXqd has joined #ruby-lang
blacktulip has quit [Ping timeout: 276 seconds]
chimkan has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
zhul_mechanos has joined #ruby-lang
wyhaines has joined #ruby-lang
voker57_ has joined #ruby-lang
gregmoreno has joined #ruby-lang
voker57 has quit [Ping timeout: 264 seconds]
__butch__ has joined #ruby-lang
jbsan has joined #ruby-lang
enebo has quit [Quit: enebo]
blazes816 has joined #ruby-lang
Ziioynx has joined #ruby-lang
Fretta has joined #ruby-lang
blacktulip has joined #ruby-lang
agnitio has quit [Ping timeout: 244 seconds]
davidbalbert is now known as davidbalber|away
havenn has quit [Remote host closed the connection]
GarethAdams has quit [Remote host closed the connection]
GarethAdams|Work has joined #ruby-lang
GarethAdams|Work has quit [Client Quit]
tsp has joined #ruby-lang
tsp has quit [Changing host]
tsp has joined #ruby-lang
srbaker has joined #ruby-lang
havenn has joined #ruby-lang
<sent-hil>
what's diff. between instance_exec and instance_eval
<banisterfiend>
sent-hil: instance_exec takes a parameter
tenderlove has quit [Read error: Connection reset by peer]
sent-hil has quit [Remote host closed the connection]
sush24_ has joined #ruby-lang
greggroth has joined #ruby-lang
JohnBat26 has joined #ruby-lang
R_Macy has quit []
nerd has joined #ruby-lang
greggroth has left #ruby-lang [#ruby-lang]
sharma__ has quit [Ping timeout: 244 seconds]
gsav has quit [Ping timeout: 265 seconds]
gaveen has quit [Quit: leaving]
faustman has quit [Ping timeout: 250 seconds]
Nisstyre has joined #ruby-lang
sent-hil has joined #ruby-lang
swav has joined #ruby-lang
tsp has quit [Ping timeout: 264 seconds]
briantrust has joined #ruby-lang
alvaro_o has joined #ruby-lang
simplogical has joined #ruby-lang
davidbalber|away is now known as davidbalbert
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
simplogical has quit [Client Quit]
gsav has joined #ruby-lang
mammoth_tusk has joined #ruby-lang
Steve8595 has quit []
mercwithamouth has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
chimkan has quit [Quit: chimkan]
sqbell has joined #ruby-lang
pkrnj has joined #ruby-lang
mammoth_tusk has left #ruby-lang [#ruby-lang]
Nisstyre has quit [Ping timeout: 250 seconds]
ejholmes has joined #ruby-lang
gaveen has quit [Quit: leaving]
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
lcdhoffman has joined #ruby-lang
Croms has quit [Ping timeout: 255 seconds]
swav has quit [Remote host closed the connection]
Nisstyre has joined #ruby-lang
agnitio has joined #ruby-lang
Nisstyre has quit [Read error: Operation timed out]
robotmay has quit [Remote host closed the connection]
_malte has quit [Remote host closed the connection]
mrsolo has quit [Quit: This computer has gone to sleep]
_malte has joined #ruby-lang
davidbalbert is now known as davidbalber|away
<freedrull>
gah, every week or so a bunch of jobs get stuck in my resque queue. so hard to debug ><
davidbalber|away is now known as davidbalbert
mrsolo has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
_malte has quit [Ping timeout: 250 seconds]
davidbalbert is now known as davidbalber|away
cored has quit [Ping timeout: 264 seconds]
drbrain has quit [Remote host closed the connection]
drbrain has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
Croms has joined #ruby-lang
Nisstyre has joined #ruby-lang
Croms has quit [Client Quit]
tonni has joined #ruby-lang
cirenyc has joined #ruby-lang
reuben has joined #ruby-lang
PhilCK has quit [Quit: PhilCK]
drbrain has quit [Remote host closed the connection]
sharma__ has joined #ruby-lang
sush24_ has quit [Ping timeout: 265 seconds]
brixen_ has left #ruby-lang [#ruby-lang]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
brixen has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
mercwithamouth has joined #ruby-lang
leopard_me has quit [Quit: Computer has gone to sleep.]
_malte has joined #ruby-lang
enebo has joined #ruby-lang
micaeked has joined #ruby-lang
sent-hil has joined #ruby-lang
sepp2k has quit [Quit: Leaving.]
_malte has quit [Remote host closed the connection]
reuben has quit [Read error: No buffer space available]
retro|cz has quit [Ping timeout: 244 seconds]
nXqd has quit [Ping timeout: 265 seconds]
swav has joined #ruby-lang
swav has quit [Ping timeout: 250 seconds]
rippa has quit [Ping timeout: 252 seconds]
tenderlove has joined #ruby-lang
_malte has joined #ruby-lang
robotmay has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
swav has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
retro|cz has joined #ruby-lang
tenderlove has joined #ruby-lang
coffeejunk has quit [Quit: WeeChat 0.4.0-dev]
coffeejunk has joined #ruby-lang
tenderlove has quit [Read error: Operation timed out]
bluepojo has joined #ruby-lang
datanoise has quit [Ping timeout: 250 seconds]
sush24 has joined #ruby-lang
sharma__ has quit [Ping timeout: 244 seconds]
__butch__ has quit [Ping timeout: 252 seconds]
_malte has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
walkslow has joined #ruby-lang
znz_v has quit [Ping timeout: 260 seconds]
anannie has quit [Remote host closed the connection]
cirwin has joined #ruby-lang
__butch__ has joined #ruby-lang
s1n4 has quit [Quit: Lost terminal]
znz_v has joined #ruby-lang
s0ber has quit [Read error: Connection reset by peer]
s0ber has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
datanoise has joined #ruby-lang
danishman has joined #ruby-lang
vlad_starkov has joined #ruby-lang
justinseiter has joined #ruby-lang
<yorickpeterse>
Vague question of the day: if you were to go to a talk about Ruby's more low level parts (think parsing, how the language works, that kind of stuff), what specifically would you be interested in?
<yorickpeterse>
I could talk about parsing for 30 minutes but that would probably be boring as fuck
<bluepojo>
I'd go to a talk on how C extensions work.
<banisterfiend>
yorickpeterse: read "ruby under microscope"
<bluepojo>
cause it's something I don't know
<banisterfiend>
yorickpeterse: it has a great chapter on that
<banisterfiend>
yorickpeterse: at least see what he's done there, and get some ideas, i think it's brilliant
<yorickpeterse>
banisterfiend: link plox
<banisterfiend>
yorickpeterse: you gotta buy it ;)
<yorickpeterse>
I think I saw it but didn't bother to click
<yorickpeterse>
oh
<yorickpeterse>
meh, fuck that
<banisterfiend>
yorickpeterse: a few months ago i might have given u it..but..i want to encourage him to write a part 2, so i think it's better if you buy it, it's really well worth it.
_malte has joined #ruby-lang
<banisterfiend>
yorickpeterse: nah if anyone deserves $ for an e-book it's this guy, he took 6 months off to write it, and it's really brilliant, even covers jruby and rbx, and goes into a lot of depth
<yorickpeterse>
hmm
<banisterfiend>
it's not another ruby e-book puff/pride project
<yorickpeterse>
Send me a link, I'll probably buy it
<ryanf>
banisterfiend: example? :)
<yorickpeterse>
if it's not some epress-whatever crap I'm all for it
<ryanf>
oh, forgot this was #ruby-lang instead of #pry, no drama pls
<yorickpeterse>
But hm, C extensions is an option
<yorickpeterse>
It has been a while but that shouldn't be a huge issue
<ryanf>
btw why did they even bother having instance_exec instead of just letting you pass params to instance_eval?
<ryanf>
isn't the only case where instance_eval normally takes params the string case, in which case there's no block?
<ryanf>
so it seems like it'd be unambiguous
joevandyk has joined #ruby-lang
datanoise has quit [Ping timeout: 255 seconds]
workmad3 has joined #ruby-lang
sockmonk has joined #ruby-lang
<injekt>
pretty much
<banisterfiend>
ryanf: instnace_eval does take an argument actually, it yields self
<banisterfiend>
ryanf: but i dont think anyone ever uses it
sush24 has quit [Quit: This computer has gone to sleep]
<banisterfiend>
ryanf: i think the purpose of yielding self is to deal with nested instance_evals or something
<rhizmoe>
it's two years old, cut me some slack :)
<yorickpeterse>
So this code in some case returns nil values?
<rhizmoe>
no, the bye_guy is an actual user object i'm thinking of replacing
klebervirgilio has quit [Ping timeout: 255 seconds]
<yorickpeterse>
Well, don't replace it with nil unless some other code doesn't rely on it
<yorickpeterse>
I personally don't like nil values in my hierarchies/ASTs and the likes
<injekt>
that's a different kind of ruby
<rhizmoe>
yes, i'm implementing tests in parallel. i should probably choose one or the other so i'm not jumping canoes all the time
cirenyc has quit [Quit: Leaving...]
dzhulk has quit [Quit: Leaving.]
sailias has quit [Quit: Leaving.]
* Phrogz
has finally just discovered 2.0.0 features. Crikey, and mostly yum! Now we can all enjoy chainsaw infanticide safely in the luxury of our own homes. Seriously, joy. (And keyword arguments: yum)
workmad3 has quit [Ping timeout: 265 seconds]
<yorickpeterse>
fun fact: refinements might not make it, at least not as they are currently available
<drbrain>
yorickpeterse: I think they've been pretty well nailed down now
_malte has joined #ruby-lang
<yorickpeterse>
I kinda lost track of the discussion at some point
<yorickpeterse>
It's hard keeping up with ruby-core at times
<drbrain>
especially refinements
<yorickpeterse>
haha yeah, there are a lot of replies
chimkan_ has joined #ruby-lang
johndozzz has joined #ruby-lang
mjio has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
charliesome has joined #ruby-lang
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
<Phrogz>
Let me be lazy and summarize for me: what's the leading candidate argument for not including them? Perf?
z3r00ld has joined #ruby-lang
slyphon has quit [Ping timeout: 244 seconds]
<injekt>
Phrogz: lack of a defined spec?
klebervi_ has joined #ruby-lang
<injekt>
people had issues because there were lots of complications and pitfalls to discuss before just throwing them in
_malte has quit [Ping timeout: 264 seconds]
<Phrogz>
Since when lack of an official spec ever stopped the Ruby community before? :p
<yorickpeterse>
Phrogz: they were a bitch to implement right
<Phrogz>
MRI is the spec! :)
<yorickpeterse>
and they basically killed any form of method lookup caching
scampbell has joined #ruby-lang
<yorickpeterse>
and the use cases were not entirely clear
<whitequark>
it's not the spec as in "official document", it's the spec as in "how am I supposed to use that stuff"
<yorickpeterse>
if MRI is the spec then it's a rather shady spec
<Phrogz>
yorickpeterse: You are writing in the past tense, reinforcing your previous statement that you thought them dead. Did I misinterpret drbrain's comment? I thought he was saying that they were going to make it.
<TTilus>
jruby folks pointed out quite a few serious issues with complexity and perf
<injekt>
Phrogz: there has been a ruby implementors meeting to discuss
<yorickpeterse>
They are, but they've been changed quite a lot since the initial idea of matz
<Phrogz>
Thanks for feeding me, all. :)
<TTilus>
ive tried to figure out what would i use the refinements for
<z3r00ld>
hi, i am trying to execute sudo commands using net-ssh channel, but it seems no easy task to play around the output, i am just wondering if there is another gem/library available which execute sudo commands directly
<TTilus>
and havent really been able to come up with a compelling usecase
<drbrain>
Phrogz: you have to require 'refinement' to use them, the scope is vastly reduced from three months ago and what you can do with them is different from three months ago
<Phrogz>
TTilus: Would you not just use them to better effect whenever you were tempted to monkeypatch instead? Or did/do you generally resist such urgest?
<TTilus>
maybe its just me
klebervi_ has quit [Ping timeout: 255 seconds]
<injekt>
drbrain: it's not file scoped, right? :)
<Phrogz>
drbrain: Interesting. I'll not get my hopes so high, then, and keep an eye on the future.
<drbrain>
injekt: I haven't been following the details closely
klebervi_ has joined #ruby-lang
<TTilus>
Phrogz: maybe its my deep etched resistance to monkeypatching
<yorickpeterse>
I believe it has been
<injekt>
yeah I remember it being mentioned
<TTilus>
Phrogz: im just seeing refinements as a wrong thing done better
<TTilus>
Phrogz: a bit like svn is to cvs
dzhulk has joined #ruby-lang
<injekt>
but monkey patching is fun!
scampbell has quit [Quit: Leaving]
<TTilus>
injekt: i dont argue against =D
<Phrogz>
Interesting. I personally see them (as described in what summaries I've just read) as a nice OOP-style scoping of methods done better/safer.
dzhulk has quit [Client Quit]
mercwithamouth has quit [Ping timeout: 256 seconds]
* Phrogz
is a monkeypatching fool. Possible emphasis on the fool part.
scampbell has joined #ruby-lang
<injekt>
I probably wont use them
<Phrogz>
Since I feel guilty when using monkeypatching, I feel like I'd use them to feel warmer and fuzzier about writing the same sort of code.
<injekt>
That's my worry
<yorickpeterse>
class Object; def ==(other); [true, false].sample; end; end; # best patch ever
<whitequark>
threads compete to override most of the interesting methods while trying to avoid blasting up on others' overrides
<whitequark>
the turns are limited in time expressed in YARV instructions
<yorickpeterse>
haha
<yorickpeterse>
it's russian roulette with threads and ruby
<yorickpeterse>
I should somehow gain commit access to active support and just put this code in it
<yorickpeterse>
SHIP IT!
sockmonk has quit [Ping timeout: 245 seconds]
<whitequark>
you only ship once
slyphon has joined #ruby-lang
davidbalber|away is now known as davidbalbert
z3r00ld has quit [Quit: Leaving.]
Fretta has quit [Ping timeout: 248 seconds]
Fretta has joined #ruby-lang
blacktulip has quit [Remote host closed the connection]
chimkan has joined #ruby-lang
headius has quit [Quit: headius]
drbrain has quit [Remote host closed the connection]
sent-hil has quit [Remote host closed the connection]
benanne has quit [Quit: kbai]
sqbell has quit [Quit: leaving]
BigO has quit [Remote host closed the connection]
tenderlove has quit [Ping timeout: 256 seconds]
_malte has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
slyphon_ has joined #ruby-lang
mindbender1 has joined #ruby-lang
whitequark has quit [Quit: leaving]
whitequark has joined #ruby-lang
anannie has joined #ruby-lang
datanoise has joined #ruby-lang
drbrain has joined #ruby-lang
tenderlove has joined #ruby-lang
_malte has quit [Ping timeout: 248 seconds]
davidbalbert is now known as davidbalber|away
jtoy has joined #ruby-lang
slyphon_ has quit [Ping timeout: 245 seconds]
datanoise has quit [Ping timeout: 252 seconds]
gaveen has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 252 seconds]
<pangel>
I want to pretty-print bytes. What would be a good Unicode range to which I could map the character codes > ASCII but < 256 ?
<whitequark>
pangel: \xNN
<pangel>
whitequark: this does *not* look good :)
<pangel>
(I assume you're telling me to actually print \xff, for instance. Otherwise I misunderstood)
<foucist>
how about convert the bytes to double wide and then experiment with toggling the bits and seeing which range is the prettiest
<foucist>
toggle one bit at a time for each possible bit
<foucist>
for all the 0s that get added on
<foucist>
just a thought
outoftime has quit [Quit: Leaving]
<foucist>
"ASCII does not explicitly define what values 128-255 map to" hmm
__butch__ has quit [Quit: Leaving.]
cirenyc has joined #ruby-lang
davidbalber|away is now known as davidbalbert
<workmad3>
pangel: I think whitequark is meaning that you should map the characters to the corresponding unicode code-point, so that byte 129 gets mapped to the unicode code-point 129, etc.
<pangel>
workmad3: yes, but for instance 00 to 20, and 7F to 9F are control characters,
davidbalbert is now known as davidbalber|away
workmad3 has quit [Ping timeout: 264 seconds]
<whitequark>
pangel: I meant that it doesn't really make sense to not escape those characters
rhizmoe has quit [Ping timeout: 255 seconds]
<whitequark>
so yes, I am telling you to print escape sequences
<whitequark>
you could as well just write C. and in fact you will at some point just write C because ruby stdlib doesn't have any performance-optimized primitives
havenn has quit [Quit: Leaving...]
* whitequark
shrugs
havenn has joined #ruby-lang
<whitequark>
pangel: I doubt there is a better solution, but let's try anyway
<whitequark>
what task are you trying to accomplish by pretty-printing those bytes?
_malte has quit [Ping timeout: 250 seconds]
tenderlove has quit [Remote host closed the connection]
heftig has quit [Read error: Connection reset by peer]
<pangel>
whitequark: Get a fixed-length representation of 160 bit number that's not 160 characters long
<whitequark>
pangel: that's simple then. you don't have to stick to bytes.
<whitequark>
use, for example, base64.
heftig has joined #ruby-lang
<whitequark>
it has constant length for constant number of bits and is 7-bit clear