<Spaceghost|cloud>
judofyr: I am of the opinion that morning is a false institution and should be stricken from record.
sush24 has quit [Quit: Leaving]
<workmad3>
Spaceghost|cloud: noooooo
<workmad3>
Spaceghost|cloud: if we don't have mornings, we don't have a morning to sleep through :(
<Spaceghost|cloud>
workmad3: What's this sleep stuff?
<workmad3>
Spaceghost|cloud: enjoyable unconsciousness with vivid hallucinations
<judofyr>
workmad3: remember: he's a ghost
<Spaceghost|cloud>
workmad3: That's kind of just my all the time time.
<workmad3>
Spaceghost|cloud: bah
<judofyr>
so, what's up?
<Spaceghost|cloud>
judofyr: Just merging code to find that the reason I have to merge any code at all is that someone commented out code instead of bahleeting it.
<workmad3>
judofyr: the sky?
<Spaceghost|cloud>
Most bullshit reason to have to merge upstream code.
<judofyr>
workmad3: nope. I'm not coding outside in this weather!
robotmay has joined #ruby-lang
<workmad3>
judofyr: bah, get back to the roots of extreme programming! :)
<Spaceghost|cloud>
workmad3 confuses programming with brogramming all the time.
<judofyr>
workmad3: -15 degrees C
<judofyr>
NO THANKS
<workmad3>
judofyr: that's what would make it *extreme*
<Spaceghost|cloud>
judofyr: You know, when it's too cold that's just a sign that it's not cold enough.
<Spaceghost|cloud>
Let's not turn it into bitch about steve on IRC hour.
<Spaceghost|cloud>
Go bitch on twitter so he can actually respond.
JohnBat26 has joined #ruby-lang
<judofyr>
sorry
<yorickpeterse>
The nice part about the story is that Mr Klabnik is critizing a Mozilla dev responsible for writing a large part of the Javascript engine
socialcoder has quit []
<yorickpeterse>
Somebody who, dare I to say, probably knows more about it than steve
<Spaceghost|cloud>
We get it, Steve's a douche. We're all douches.
<judofyr>
anyway :)
<yorickpeterse>
Ah well, back to hating on the mixpanel gem
<Spaceghost|cloud>
^
<Spaceghost|cloud>
yorickpeterse: Dude, ugh.
<yorickpeterse>
Because that Gem is an omen of shit
<Spaceghost|cloud>
I removed all the mixpanel gem stuff from the ruby app and put it all on the browser.
<yorickpeterse>
I have about 70 LOC that does exactly the same but better
<yorickpeterse>
and it doesn't use open() (oh god why)
<yorickpeterse>
The "async" feature is also quite, well, odd
<Spaceghost|cloud>
yorickpeterse: I have to watch an ad to fill out a captcha to do what I actually want?
<Spaceghost|cloud>
How about no and fuck you sir.
schaerli has quit [Remote host closed the connection]
<yorickpeterse>
what
<yorickpeterse>
* wat
<Spaceghost|cloud>
Did you look at the site? They make captchas. Ones that you can't even fill out until you watch an ad. Then you have to type the slogan for the add into the text box.
cirenyc has quit [Quit: Leaving...]
<sandbags>
this is presumably for companies who hate customers and wish they'd go away
adambeynon has joined #ruby-lang
<yorickpeterse>
Spaceghost|cloud: Not really, it requires Flash so I closed it
<Spaceghost|cloud>
yorickpeterse: I think you're missing the point.
<yorickpeterse>
Flash is enough to make me hate something :)
<yorickpeterse>
Regardless, such a Captcha method is insane
io_syl has quit [Quit: Computer has gone to sleep.]
<judofyr>
good all day andrewvos
<injekt>
hold the phone, my good day wasn't for ALL day?
<injekt>
I've.. been cheated :(
<yorickpeterse>
"Updating crack" Ugh, somebody should've named that gem something else
mjolk has joined #ruby-lang
mjolk is now known as Guest59167
roolo has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
RORgasm has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
setmeaway has quit [Quit: Leaving]
cirenyc has joined #ruby-lang
cirenyc has quit [Client Quit]
RORgasm has quit [Ping timeout: 248 seconds]
<_tockitj>
yorickpeterse, are there news on tags like tool for ruby :D
<judofyr>
_tockitj: what?
cirenyc has joined #ruby-lang
<_tockitj>
its a nice utility for vim that yorickpeterse was interested to develop :P
adambeynon has quit [Quit: Computer has gone to sleep.]
<yorickpeterse>
eh what?
cirenyc has quit [Client Quit]
<_tockitj>
something that can show variable references under vim (:
<_tockitj>
like cscope does for c
<_tockitj>
tags is good for finding definitions - but its generally hard to find all references to a variable from an editor (aside from greping)
esad has quit [Quit: Computer has gone to sleep.]
<_tockitj>
*references to a method that is (:
<yorickpeterse>
oh, I wasn't working on that
<yorickpeterse>
I'm working on a linter, but you can potentially use it for that at some point
<yorickpeterse>
Though my first goal is to hook it up to Syntastic
vlad_starkov has quit [Remote host closed the connection]
<_tockitj>
nice (:
dwu1 has quit [Quit: Leaving.]
<yorickpeterse>
what the hell, EM.defer is actually async?
cirenyc has joined #ruby-lang
<yorickpeterse>
what is this black magic
<judofyr>
yorickpeterse: isn't that the whole point?
<injekt>
</3 EM
<yorickpeterse>
Well yeah, but I expected it to block since a sleep() call would freeze the current running thread
<judofyr>
yorickpeterse: oh, it's concurrent, yes. that's the whole point of #defer. it runs the block in a thread pool.
<yorickpeterse>
Well maybe I'm not fully understanding the threading mechanism of Ruby. I expected Ruby to be unable to pause a thread and start another one due to the sleep() call
ruby-lang694 has joined #ruby-lang
<yorickpeterse>
Unless EM doesn't use Ruby threads but instead uses actual C threads
* yorickpeterse
hopes he's making any sense
b1rkh0ff has joined #ruby-lang
<judofyr>
yorickpeterse: ah, nope. there can only be one thread running Ruby code at the same time. when you call "sleep", it will release the GIL and let other thread run
<judofyr>
yorickpeterse: same if you e.g. call #read on an IO
<judofyr>
yorickpeterse: or do a blocking MySQL query
cirenyc has quit [Client Quit]
<yorickpeterse>
Wouldn't a sleep() prevent that from being possible since it's a "STOP ALL TEH THINGS" mechanism?
<lianj>
"STOP ALL TEH THINGS IN THAT THREAD"
<yorickpeterse>
use case: IRC <-> campfire bridge and I don't want Campfire calls to shit up and block IRC calls and vice versa
<yorickpeterse>
There's "Firering" but in the end it's blocking as well
<yorickpeterse>
(which uses EM)
imajes has quit [Excess Flood]
<lianj>
in case of em, yes sleep blocks it, because em runs in a single thread
imajes has joined #ruby-lang
<yorickpeterse>
uuuggh Ruby, Y U NO HAVE ACTUAL THREADS
<yorickpeterse>
Maybe I'll just use jruby for this
<lianj>
whats so hard about writing a irc client and polling the horrible horrible campfire http api all via nonblocking em io
<judofyr>
lianj: not if you run it in #defer
<yorickpeterse>
lianj: that's what I'm pretty much planning to do
<lianj>
judofyr: true
<yorickpeterse>
write a IRCd that translates Campfire to IRC and vice versa, similar to camper_van
cultureulterior_ has joined #ruby-lang
<yorickpeterse>
I was going with a Weechat plugin but the API doesn't provide any asynchronous way of executing callbacks
<yorickpeterse>
Thus the Campfire calls would literally freeze Weechat
<lianj>
yorickpeterse: if you like to you can use my horrible horrible ircd written in eventmachine as a draft
<yorickpeterse>
I already found myself a decent parser so most of the work should be fairly trivial
ruby-lang694 has quit [Ping timeout: 245 seconds]
<yorickpeterse>
Also where can I find this IRCd/
<yorickpeterse>
Also I have to say I like the EM.defer syntax, certainly makes dealing with callback hell a lot easier
<lianj>
it too bad to even link here, although i use it inside a vpn with more than a year uptime
<lianj>
see pm
<yorickpeterse>
ta
<yorickpeterse>
ha, I see why
<yorickpeterse>
dat JSON
<lianj>
yorickpeterse: EM.defer is not the same as EM::Deferrable
<yorickpeterse>
"[...] but having to write javascript seemed like a pain. I used this project to learn coffeescript."
<yorickpeterse>
I don't think it's a good idea to write something in X that converts to Y if you don't know Y
<yorickpeterse>
But that's my opinion
<judofyr>
yorickpeterse: eh. the point is that this allows you write documents in Markdown
<judofyr>
yorickpeterse: those two sentences are not actually related
<yorickpeterse>
oh the end idea is pretty nifty
<Spaceghost|cloud>
yorickpeterse: I think that's silly.
<Spaceghost|cloud>
You know all the turtles all the way down then?
<yorickpeterse>
Spaceghost|cloud: enjoy debugging errors in a language that you're not familiar with
<Spaceghost|cloud>
yorickpeterse: So you know everything down to at least machine langauge?
<Spaceghost|cloud>
language*
<judofyr>
the point is that Tangle requires you to write HTML + JS, but with Fangle you just have to write Markdown
<yorickpeterse>
Spaceghost|cloud: no?
<yorickpeterse>
Spaceghost|cloud: don't be a pedant, you're missing the point
<Spaceghost|cloud>
I'm not missing it. I think that you're putting the wrong thing as the central point that the person would be missing.
<Spaceghost|cloud>
If they knew the paradigms in JS they could likely handle learning coffeescript and working through. Sure JS would help, but it's not a necessity.
schaerli has quit [Remote host closed the connection]
* Spaceghost|cloud
has been javascripting for >10years
<Spaceghost|cloud>
Especially if they used those weird nifty new sourcemaps.
<yorickpeterse>
At what point did I critize the person him/herself? All I mentioned was that I think it's a bad idea to write Coffeescript if you're not familiar with Javascript
<injekt>
I'd say that was a great reason to write coffeescript
<judofyr>
yorickpeterse: but he wasn't unfamiliar with JavaScript…
<Spaceghost|cloud>
I just think that it's okay as long as they understand the paradigms in JavaScript and how to use their tool. Source maps solves a lot of it.
<yorickpeterse>
As far as I'm aware of, at least what I have noticed myself (I write both here), Coffeescript doesn't provide any accurate source mapping to help with debugging
<yorickpeterse>
So when a browser says "Herp derp undefined method on object blabla" you'll have to figure things out yourself
<yorickpeterse>
And considering the generated code isn't always as clear as it should be that can become a pain rather quickly
<yorickpeterse>
If you dislike JS but know it, sure, go use X as that's a good reason to use it
<yorickpeterse>
Similar as to why people use Less/SCSS
cirenyc has joined #ruby-lang
<Spaceghost|cloud>
yorickpeterse: Yes, so google "Coffeescript source map"
<Spaceghost|cloud>
:)
vlad_starkov has joined #ruby-lang
<yorickpeterse>
tbh I'd rather see ECMA pull their heads out of their asses and fix JS
<yorickpeterse>
or for browsers to allow other scripting languages (ohgod give me Lua/Python already)
<yorickpeterse>
Without Native Client and the likes
cirenyc has quit [Client Quit]
* Spaceghost|cloud
just laughs and moves on
glebm has quit [Ping timeout: 245 seconds]
<yorickpeterse>
I think my general opinion of all this can be summed up as following: Javascript in the browsers is the herpes of scripting languages
<_tockitj>
yorickpeterse, why not make javascript evolve into python (:
<Spaceghost|cloud>
Ooh my turn! Python is a cute language. Too bad it has weak lambdas. :
<Spaceghost|cloud>
:(
jonahR has joined #ruby-lang
<_tockitj>
this way we'll fancy nice backward compatibility burden that is so popular
<yorickpeterse>
_tockitj: why not just allow something else than JS?
<yorickpeterse>
And you can't "evolve" JS into Python since the two are vastly different
<_tockitj>
js folks are doing their best (:
<_tockitj>
they'll get together i think
<Spaceghost|cloud>
It would be devolution to go from JS to Python. :)
banister`sleep has quit [Ping timeout: 240 seconds]
glebm has joined #ruby-lang
<apeiros_>
yorickpeterse: one idea I liked wrt browser scripting: let the browsers provide a VM
<apeiros_>
so any language which can compile to that VM can be run
<Spaceghost|cloud>
It would be cool indeed.
<yorickpeterse>
Sounds cool in theory, but the following will happen: every browser gets his own VM that doesn't support the same as others
<Spaceghost|cloud>
Not really the ECMA's fault there.
<Spaceghost|cloud>
yorickpeterse: That's already the story anyways.
<apeiros_>
yorickpeterse: well, that'd be the hard part - standardizing on a VM
<apeiros_>
could start with using an existing, like LLVM
<Spaceghost|cloud>
See Ruby, see Javascript, see anything with vendor-specific implementations.
<yorickpeterse>
Spaceghost|cloud: well right now there's only one broken scripting language that doesn't require plugins
<yorickpeterse>
(in browsers that is)
<yorickpeterse>
apeiros_: also, native client more or less does this
<Spaceghost|cloud>
yorickpeterse: I don't see why you think it's so broken. Yeah, it has baggage. But it's not really broken.
<yorickpeterse>
I believe Ruby 2.0 even has proper support for it, at least I saw something in the release notes about it
charliesome has joined #ruby-lang
<yorickpeterse>
Spaceghost|cloud: Because it's a bastardized language made into something it was never supposed to be
schaerli has joined #ruby-lang
<charliesome>
yorickpeterse: is this ruby
<yorickpeterse>
Basically it's the frankenstein of languages
<Spaceghost|cloud>
yorickpeterse: Right. And you're picking JS for having this past because?
<Spaceghost|cloud>
You think no other languages have evolved into things they were never meant to be?
<yorickpeterse>
Because it's the only *actually* available language in browsers. Also because I'm hungy and waiting for lunch
<Spaceghost|cloud>
Ah, so you're just whinging! Good luck on that front.
<yorickpeterse>
Not really, I dislike JS even when I'm not hungry
<yorickpeterse>
if you want an example of why: Date
* Spaceghost|cloud
loves his JS. Better OO language than ruby, python, and even the ridiculous things like php's lolOO
<charliesome>
Spaceghost|cloud: >better oo wat
<yorickpeterse>
better OO than....get out
<Spaceghost|cloud>
yorickpeterse: Name one programming language with a really nice date library in stdlib,.
<yorickpeterse>
Oh, how about Ruby? It's not perfect but at least the API makes sense
<Spaceghost|cloud>
Lol.
* Spaceghost|cloud
sighs
carloslopes has joined #ruby-lang
<charliesome>
i kind of understand why js's date library is shit
<charliesome>
i would go "fuck it cbf" as well
<_tockitj>
def Spaceghost.better; !::better; end
<Spaceghost|cloud>
_tockitj: I'm referring to the self-ness and the focus on objects and messages.
<yorickpeterse>
Javascript certainly has good parts though. The DOM API is ok-ish and with the new features coming up quite a few issues are tackled
* Spaceghost|cloud
has no interest in thinking of his code in classes.
<yorickpeterse>
e.g. finally a more unified way of creating data structures (classes, prototypes, whatever you'd call them)
<yorickpeterse>
I suppose it's better on Node because you have a more controlled environment but I don't deal with that mess
<_tockitj>
def Spaceghost.better; self.focus; !::better; end
jonahR has quit [Quit: jonahR]
<yorickpeterse>
wat
<yorickpeterse>
!:better isn't even valid Ruby
<yorickpeterse>
* !::better
<_tockitj>
hmmz.. true (:
setmeaway has joined #ruby-lang
<_tockitj>
def Spaceghost.better; 3.times { self.focus }; ! ObjectSpace.better; end
<_tockitj>
yorickpeterse, thank you
<yorickpeterse>
that will trigger a method error
<yorickpeterse>
and a missing constant error
<yorickpeterse>
:>
madish has joined #ruby-lang
<Spaceghost|cloud>
Eh, well, I've just been using it a long while and I've definitely felt a good amount of the pains, I just don't have this hate you do.
<_tockitj>
yorickpeterse.thank(me.self)
<Spaceghost|cloud>
If you hate it so much, why be idle and just whine?
<_tockitj>
meh.. there is room for improvement definitely (:
<Spaceghost|cloud>
For sure.
<Spaceghost|cloud>
But it's not some ungodly monstrosity that should die. I reserve those feelings for things like fud spreaders.
<_tockitj>
jquery makes it bearable
ruby-lang623 has joined #ruby-lang
<Spaceghost|cloud>
For dom manipulation it is.
<_tockitj>
there is anything else with js ?
* Spaceghost|cloud
remembers following along with all the dom manipulation libraries back when they all started.
rue|w has quit [Read error: Connection reset by peer]
rue|w has joined #ruby-lang
<darix>
Spaceghost|cloud: even if they dont use it directly
<darix>
it's parser is powering lots of other webservers
<Spaceghost|cloud>
darix: I use the ragel stuff indirectly.
<Spaceghost|cloud>
But not the whole of mongrel.
<darix>
bzb: i would suggest look into puma or unicorn on 1.9
<darix>
bzb: the error you have shown will need some code changes
<Spaceghost|cloud>
I prefer unicorn until puma gets a bit more mature if you're on cruby, which you are.
<Spaceghost|cloud>
Some weird stuff with sockets becoming unavailable on redeploys and whatnot.
<bzb>
darix: I'm working on rack and it requires me to use mongrel
<Spaceghost|cloud>
Nothing to say don't use it at all, I'm just waiting a bit.
Guest59167 has left #ruby-lang [#ruby-lang]
<darix>
Spaceghost|cloud: so far i didnt have problems with either.
<Spaceghost|cloud>
darix: I use it in development. I'd just like to wait a bit for some releases and then consider using it in production. I have a nerdon for the zero downtime deploys.
Kallikanzarid has quit [Remote host closed the connection]
<darix>
Spaceghost|cloud: got some bug links for the issues you mentioned?
<Spaceghost|cloud>
darix: I'll highlight my friends that brought them up.
<Spaceghost|cloud>
I can say though, it's awesome in development across all the rubies I use.
<injekt>
bzb: why does it require you to use mongrel?
<bzb>
injekt: when running the Rakefile in rack, it tells me that I'm missing mongrel and that it needs to be installed
gjaldon has quit [Remote host closed the connection]
<injekt>
bzb: right, so you need to remove the mongrel dependency and use something else
xcombelle has joined #ruby-lang
imajes has quit [Excess Flood]
<Spaceghost|cloud>
Oh, that's just an arbitrary dependency.
<Spaceghost|cloud>
Rack is made to be agnostic in that manner.
<bzb>
injekt: ok. i'll do that and see what happens
<judofyr>
bzb: are you resurrecting a project from 5 years ago? :)
ammar has left #ruby-lang [#ruby-lang]
<judofyr>
bzb: if it's using Rack, you should be able to run it without fcgi
<bzb>
judofyr: the problem is when I'm running the Rakefile, fcgi is one of the gems that it needs
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
<apeiros_>
a *rakefile* which depends on fcgi?
<apeiros_>
that sounds like a serious smell
<injekt>
so remove that dependency too
retro|cz has joined #ruby-lang
<bzb>
injekt: i'll do that...hope it doesn't cause me any headaches for doing that though
<injekt>
bzb: I assume this isn't your own project?
<injekt>
you're trying to run something someone else developed?
esad has quit [Ping timeout: 248 seconds]
<bzb>
injekt: rack is not my project. I'm trying to understand how it works in conjunction to jruby-rack.
<injekt>
bzb: but what exactly are you trying to run?
<bzb>
how they are connected and figure a way to implemented on a java platform
<bzb>
on tomcat
<injekt>
why are you testing on cruby?
<bzb>
I'm using cruby to learn about rack. using jruby is a plain to wait for it to load everytime.
<bzb>
i'll have to move back to using jruby when learning about jruby-rack
<judofyr>
bzb: it seems that you're installing development dependencies
<lianj>
bzb: trinidad
<bzb>
judofyr: i don't know. I'm currently feeling my way around things
esad has joined #ruby-lang
<bzb>
lianj: yes, i'm aware of trinidad. will be looking at it later
krz has quit [Quit: krz]
esad has quit [Client Quit]
cirenyc has quit [Quit: Leaving...]
zmack has quit [Remote host closed the connection]
<injekt>
psh MatchData strips non-named captures if you include any named groups
sush24 has joined #ruby-lang
dkannan has joined #ruby-lang
fsvehla has joined #ruby-lang
pythonsnake has quit [Quit: WeeChat 0.4.0]
rindolf has joined #ruby-lang
dkannan has quit [Quit: dkannan]
pythonsnake has joined #ruby-lang
gjaldon has joined #ruby-lang
b1rkh0ff has quit [Quit: Leaving]
RORgasm has joined #ruby-lang
RORgasm has quit [Ping timeout: 248 seconds]
dhruvasagar has quit [Read error: Operation timed out]
gjaldon has quit [Ping timeout: 245 seconds]
gjaldon has joined #ruby-lang
cirenyc has joined #ruby-lang
jacktrick has joined #ruby-lang
<bcardarella>
With minitest-spec how does one inherit from a parent class for the context of the test file? For example, in Test::Unit I would do something like class ChildTest < ParentTest
lele has quit [Ping timeout: 264 seconds]
<bcardarella>
nm, figured it out
em0ral has joined #ruby-lang
<judofyr>
bcardarella: what was it?
<lianj>
describe Foo do
lele has joined #ruby-lang
bfreeman has quit [Ping timeout: 244 seconds]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
robotmay has quit [Remote host closed the connection]
adambeynon has quit [Quit: Computer has gone to sleep.]
rsl has joined #ruby-lang
megha has quit [Quit: WeeChat 0.3.9.2]
imperator has left #ruby-lang ["Leaving"]
megha has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
rec0n-Op has quit []
lun__ has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
Kallikanzarid has joined #ruby-lang
arooni-mobile has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
gokul has quit [Quit: Leaving]
em0ral has quit [Remote host closed the connection]
kain has quit [Quit: exit]
kain has joined #ruby-lang
sush24_ has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
cirenyc has joined #ruby-lang
sush24 has quit [Ping timeout: 246 seconds]
rippa has quit [Read error: Connection reset by peer]
spinagon has joined #ruby-lang
tonni has quit [Remote host closed the connection]
mistym has joined #ruby-lang
sharma__ has joined #ruby-lang
blacktul_ has joined #ruby-lang
sush24_ has quit [Ping timeout: 248 seconds]
dustint has joined #ruby-lang
mistym has quit [Remote host closed the connection]
blacktulip has quit [Ping timeout: 252 seconds]
srbaker has quit [Quit: Computer has gone to sleep.]
mistym has quit [Remote host closed the connection]
melter has joined #ruby-lang
tbuehlmann has joined #ruby-lang
<bcardarella>
Any reason why https://gist.github.com/4622608 does not have access to the 'heynow' instance method in the it block? This is with Minitest::Spec
tonni has joined #ruby-lang
<whitequark>
bcardarella: because the argument to #describe is only used to, well, describe the testcase
<whitequark>
it's #to_s'd internally and that's it
<whitequark>
you have to instantiate all your objects yourself
__BigO__ has joined #ruby-lang
kurko_ has joined #ruby-lang
dustint has quit [Remote host closed the connection]
emptyflask has quit [Remote host closed the connection]
blahwoop has joined #ruby-lang
KA_ has joined #ruby-lang
KA_ has quit [Client Quit]
FastJack has quit [Ping timeout: 245 seconds]
KA_ has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
joschi has quit [Quit: No Ping reply in 180 seconds.]
joschi has joined #ruby-lang
dougsko has joined #ruby-lang
FastJack has joined #ruby-lang
<dougsko>
hi guys, if i have a binary string like, "-\xC1\fqdwe\e\xAA", how can i do a bitwise operation on it like, '& 0xf' ?
anjen has joined #ruby-lang
<dougsko>
i have a feeling it has something to do with packing/unpacking, but i just cant seem to get it right
vlad_starkov has joined #ruby-lang
<lianj>
dougsko: what type of number is it=
<dougsko>
well, its the result of a OpenSSL::HMAC.digest
__butch__ has quit [Quit: Leaving.]
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 256 seconds]
<dougsko>
i think string#byte is gonna do it actually
vlad_starkov has quit [Ping timeout: 244 seconds]
bzalasky has joined #ruby-lang
hahuang65_ has joined #ruby-lang
<lianj>
oh, for each byte you want to do some bitwise calc?
<lianj>
"-\xC1\fqdwe\e\xAA".unpack("C*").map{|i| i & 0xf }
<lianj>
then
<dougsko>
well really, just very specific ones, but i think thatll work
emptyflask has joined #ruby-lang
<dougsko>
thanks a lot!
<lianj>
np
KA_ has quit [Quit: KA_]
dr_bob has quit [Quit: Leaving.]
karasawa has quit [Quit: Lost terminal]
karasawa has joined #ruby-lang
ten1 has joined #ruby-lang
dougsko has left #ruby-lang [#ruby-lang]
ddd has quit [Ping timeout: 245 seconds]
cirenyc has joined #ruby-lang
sush24 has joined #ruby-lang
bfreeman has quit [Ping timeout: 255 seconds]
karasawa has quit [Quit: Lost terminal]
sush24 has quit [Client Quit]
karasawa has joined #ruby-lang
sush24 has joined #ruby-lang
karasawa has quit [Client Quit]
kogent has joined #ruby-lang
karasawa has joined #ruby-lang
karasawa has quit [Client Quit]
workmad3 has quit [Ping timeout: 264 seconds]
anjen has quit [Quit: anjen]
bfreeman has joined #ruby-lang
tonni has joined #ruby-lang
ruurd has joined #ruby-lang
ddd has joined #ruby-lang
__butch__ has joined #ruby-lang
dzhulk has quit [Quit: Leaving.]
seydar has joined #ruby-lang
brianpWins has joined #ruby-lang
<seydar>
I'm trying to get something like this: `new_meth = method(:old_meth); new_meth(5)`
<seydar>
there's the obvious way were i do `make_method(:old_meth, :new_meth); new_meth(5)`, but that's not what i want
bg451 has quit [Quit: bg451]
jacktrick has quit [Ping timeout: 252 seconds]
dzhulk has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
mpan has joined #ruby-lang
JMcAfreak has quit [Quit: They're coming to take me away, ha-haa!]
rue|w has joined #ruby-lang
solars has quit [Quit: WeeChat 0.3.7]
solars has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
Sinestro has joined #ruby-lang
Sinestro has quit [Client Quit]
rue|w has quit [Ping timeout: 240 seconds]
tbuehlmann has quit [Remote host closed the connection]
jacktrick has joined #ruby-lang
postmodern has joined #ruby-lang
krohrbaugh has joined #ruby-lang
seydar has quit [Quit: leaving]
ruurd has quit [Quit: Leaving...]
jacktrick has quit [Quit: Leaving]
athaeryn has joined #ruby-lang
<athaeryn>
Hey, can anyone help me out with gem creation, or is this not the right place to ask?
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
drbrain has quit [Remote host closed the connection]
Rizzle has quit [Ping timeout: 248 seconds]
yfeldblum has quit [Ping timeout: 248 seconds]
<rindolf>
athaeryn: hi.
<rindolf>
athaeryn: it is.
<rindolf>
athaeryn: what's the issue?
<rindolf>
athaeryn: what do you have so far?
<rindolf>
athaeryn: do you have a repository for it?
<athaeryn>
I've a simple task manager app
<rindolf>
If not - you really should.
<athaeryn>
not yet.
<rindolf>
athaeryn: a WWW-one?
<rindolf>
athaeryn: GUI?
<athaeryn>
It's just command line
<rindolf>
athaeryn: no repository?
<rindolf>
athaeryn: ah.
<rindolf>
athaeryn: with readline or something like that?
bzalasky has quit [Remote host closed the connection]
<rindolf>
Or uses the shell?
<athaeryn>
no repo yet. I'm going to rewrite it, then it will
<rindolf>
athaeryn: ah.
<rindolf>
athaeryn: can't you rewrite it before creating a gem?
neocoin has quit [Remote host closed the connection]
<rindolf>
athaeryn: do you have automated tests?
<athaeryn>
I figure I'll rewrite it as a gem.
<athaeryn>
no tests yet, that's on my to-learn list
krohrbaugh has quit [Quit: Leaving.]
<athaeryn>
but I'm just wondering: if I make it a gem, will i just be able to type "tsk stop" like before? and is there any special step to make that possible?
<athaeryn>
maybe i need to just learn more about making gems in general
emptyflask has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
pythonspace is now known as pythonsnake
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_sta_ has joined #ruby-lang
<Smol>
put tsk under bin/ and set bindir to 'bin' in your gemfile, and it should work
<Smol>
err, in your gemspec
vlad_sta_ has quit [Remote host closed the connection]
andrewhl has joined #ruby-lang
blacktul_ has joined #ruby-lang
blazes816 has joined #ruby-lang
havenn has joined #ruby-lang
ovatsug25 has quit [Ping timeout: 245 seconds]
rippa has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby-lang
RickHull has joined #ruby-lang
blacktulip has quit [Ping timeout: 244 seconds]
rippa has joined #ruby-lang
RickHull has quit [Changing host]
RickHull has joined #ruby-lang
<RickHull>
how can i generated nested loops N times, given N? e.g. for N=3 X.times { |x1| X.times { |x2| X.times { |x3| } } }
<RickHull>
i can think of a nasty way using eval
<RickHull>
maybe i don't need nested loops exactly, but i am generating exhaustive data in a brute force way. trying to abstract for N
ten1 has left #ruby-lang [#ruby-lang]
sush24 has quit [Ping timeout: 256 seconds]
davidbalber|away is now known as davidbalbert
sush24 has joined #ruby-lang
<reactormonk>
RickHull, recursion maybe?
<RickHull>
hm, hadn't thought of that. i'm in the middle of the nasty eval method. will reconsider in a sec
<reactormonk>
RickHull, still, I wonder - wtf are you doing?
huma has quit []
<RickHull>
an interview-type problem. generate the full set of valid parens with empty contents. n = number of parens. e.g. n=3 ((())) (())() ()()() etc.
<RickHull>
rest assured, it's not a problem for an actual interview
<RickHull>
i've got a simple way to test for validity, and i'm thinking of simply generating all possible combinations of parens and aborting when i hit an invalid combo, e.g. (((( for n=3
<RickHull>
or )... for any n
<RickHull>
i can write it out easily enough for n=3 (the actual problem as stated)
<RickHull>
i'm working on a nice way to do it for any N
<ryanv-raptor>
out of curiosity, are you counting the reverse version too, so for 3 you'd need (()) () and () (())?
<RickHull>
yeah those are distinct
<reactormonk>
RickHull, recursion.
<RickHull>
yeah, i think you're right
<RickHull>
but for bonus points, do it iteratively!
<manveru>
any recursion can be unrolled to iteration, just becomes harder to read :P
enebo has quit [Quit: enebo]
blazes816 has quit [Read error: Connection reset by peer]
<reactormonk>
manveru, what if you have two recursive calls?
<manveru>
then you have to cross your eyes
blazes816 has joined #ruby-lang
s0ber_ has joined #ruby-lang
s0ber has quit [Ping timeout: 240 seconds]
s0ber_ is now known as s0ber
blazes816_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
blazes816 has quit [Ping timeout: 256 seconds]
blazes816_ is now known as blazes816
vlad_starkov has joined #ruby-lang
xyzodiac has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<manveru>
n = 4; (%w[( )] * n).permutation(n*2).to_a.uniq.select{|c| c.reduce(0){|s,v| s < 0 ? (break false) : s + (v == '(' ? 1 : -1) }}.map(&:join)
scampbell has quit [Ping timeout: 256 seconds]
<manveru>
may be stupid, but no recursion :P
blahwoop has quit [Ping timeout: 248 seconds]
<manveru>
i even managed to sneak an inject in
<RickHull>
heh
<manveru>
but i'm not sure whether to use permuation or combination... just can't get combination to work right
<manveru>
permutation spits out a ton of duplicates, so i'd probably recode that
blazes816 has quit [Quit: blazes816]
bg451 has quit [Quit: bg451]
blazes816 has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 245 seconds]
<RickHull>
#permutation and #combination, definitely helpful here
<RickHull>
and/or
<ryanv-raptor>
I'm still playing with it but I think an algorithm that permutates an array of left parentheses and spaces combined with a way to close them would give you the results too without the brute force
vlad_starkov has joined #ruby-lang
<ryanv-raptor>
spaces indicate where to not nest
__BigO__ has quit [Remote host closed the connection]
__BigO__ has joined #ruby-lang
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
Uranio has quit [Quit: while you reading this, a kitty dies]
tylersmith has joined #ruby-lang
<RickHull>
permutation + uniq is the only way, i think. combination shouldn't ever work, since order definitely matters -- (())() and ()(()) are distinct and i'm not sure how you could get both out of combination
ryguy has joined #ruby-lang
ryguy has left #ruby-lang [#ruby-lang]
GattoLino has joined #ruby-lang
RyanScottLewis has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
RyanScottLewis has quit [Remote host closed the connection]
emanon_ has quit [Read error: Connection reset by peer]
emanon_ has joined #ruby-lang
bg451 has quit [Quit: bg451]
thone has joined #ruby-lang
datanoise has joined #ruby-lang
thone_ has quit [Ping timeout: 252 seconds]
menace has joined #ruby-lang
scampbell has quit [Quit: Leaving]
emanon_ has quit [Read error: Connection reset by peer]
bg451 has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
yalue has quit [Read error: Connection reset by peer]
menace has left #ruby-lang [#ruby-lang]
tjadc has quit [Ping timeout: 276 seconds]
tjadc has joined #ruby-lang
<RickHull>
chris2: for the recursive generation, the idea is simple but i'm having trouble coding it. e.g. def generate(n); case n; when 1 then '()'; else # branch 3 ways: ()generate(n-1), generate(n-1)(), (generate(n-1));
<RickHull>
also have a uniqueness problem. adding empty parens to the left and right of () yields a duplicate
malev has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 246 seconds]
bfreeman has quit [Remote host closed the connection]
bg451 has quit [Ping timeout: 252 seconds]
<RickHull>
got it xD
<drbrain>
headius: pong
<headius>
drbrain: hey there…wanted to see if you were a good person to ask about gemification plans
<headius>
we're incorporating krypt into JRuby 1.7.3 and would like it to be gem-upgradable…already doing that for openssl and worked through some issues there
<headius>
I would like to do what we're doing generally, but don't want to diverge from what MRI's planning
<drbrain>
headius: 2.0 will have "default gems", a future release will have real gems
<headius>
so on install of Ruby 2.0 the gems just come along for the right? specific versions?
<headius>
right=ride
Kuifje has quit [Ping timeout: 255 seconds]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
adambeynon has joined #ruby-lang
<drbrain>
specific versions you can't uninstall
<headius>
the way I'm doing it for openssl is to have openssl.rb be a stub that tries the gem first and then falls back on stdlib copy
<headius>
installing jruby-openssl then updates it, effectively
<drbrain>
… but if you require 'rdoc' and have installed a newer gem version the newer version will be activated over the built-in files
<drbrain>
headius: I think if you ship as gems you won't have to worry about default gems at all
blacktulip has quit [Ping timeout: 246 seconds]
GattoLino has joined #ruby-lang
GattoLino has quit [Client Quit]
davidbalber|away is now known as davidbalbert
Bearproof has quit [Quit: Leaving.]
datanoise has joined #ruby-lang
<postmodern>
is there an elegant way to test protected methods in a mixin, with rspec
blacktu__ has quit [Ping timeout: 276 seconds]
bfreeman has quit [Read error: Connection reset by peer]
bfreeman_ has joined #ruby-lang
<headius>
drbrain: I guess we're mostly been including in stdlib because there's the issue of things like bundler requiring https *with* rubygems loaded
agile has quit [Remote host closed the connection]
emanon_ has quit [Read error: Connection reset by peer]
<drbrain>
ah
<headius>
sorry, I meant requiring https without rubygems loaded
<headius>
but yeah…chicken/egg
* drbrain
nods
elux has quit [Quit: Bye!]
davidbalbert is now known as davidbalber|away
__BigO__ has quit [Remote host closed the connection]
dustint has quit [Quit: Leaving]
davidbalber|away is now known as davidbalbert
ruurd has joined #ruby-lang
datanoise has quit [Ping timeout: 240 seconds]
blacktulip has joined #ruby-lang
havenn has quit [Remote host closed the connection]