<samuelj>
However, on running it I get an error claiming that env['goliath.request-headers'] is nil. Does this ring a bell to anyone? Is my way of starting with Goliath the right way of incorporating a rack app?
tcsc has joined #ruby
<jokke>
Spooner it kinda works, but not really
nari has joined #ruby
<jokke>
problem is that i can't give "arg[]" as a key, because it encodes that to arg%5B%5D
PanPan has quit [Read error: Connection reset by peer]
crackfu has quit [Ping timeout: 276 seconds]
PanPan has joined #ruby
postmodern has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
onemanjujitsu has joined #ruby
krz has joined #ruby
jamesaanderson has joined #ruby
<jamesaanderson>
Any idea how I can grab the main image/video from a site? Kind of how reddit and digg do it. Is there an API or Gem? If not, how would I begin writing it?
<vivalavinnie>
I'm almost certain that using your web browser you can see the source of the web page. Read through it and you'll find your image or video code
cobragoat has quit [Remote host closed the connection]
cobragoat has joined #ruby
nfk has quit [Quit: yawn]
__class__ has quit [Read error: Connection reset by peer]
subbyyy has quit [Ping timeout: 240 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
_class_ has joined #ruby
justsee has quit [Quit: Leaving...]
cobragoat has quit [Ping timeout: 256 seconds]
gabrielrotbart has joined #ruby
Hecatic has joined #ruby
subbyyy has joined #ruby
_class_ is now known as __class__
caleb_io has joined #ruby
dr_neek has joined #ruby
onemanjujitsu has quit [Quit: onemanjujitsu]
<jamesaanderson>
vivalavinnie, I meant with ruby
<vivalavinnie>
Sorry man. Figured you just needed a hand with that.
<vivalavinnie>
Not sure how to do it with Ruby. I've only just started learning
Umren has quit [Read error: Connection reset by peer]
<bean>
It seems reddit somehow programatically picks the image with the highest contrast on a page
Spooner has quit [Quit: Leaving]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
mengu has left #ruby ["Leaving"]
nathancahill has quit [Quit: nathancahill]
Liquid-- has joined #ruby
johnpcamara has joined #ruby
onemanjujitsu has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
plotter has quit [Read error: Operation timed out]
icantbecool has joined #ruby
<icantbecool>
Has anyone installed Ruby 2.0-RC2 successfully and used bundler?
straind has joined #ruby
Hecatic has quit [Quit: HecAtic]
freakazoid0223 has joined #ruby
<jamesaanderson>
bean, thanks
<jamesaanderson>
icantbecool, I have
autumn is now known as Leafyy
Leafyy is now known as autumn
dmiller has joined #ruby
mattbl has joined #ruby
straind` has quit [Ping timeout: 244 seconds]
iamjarvo1 has joined #ruby
maletor has joined #ruby
iamjarvo has quit [Ping timeout: 252 seconds]
dmiller has quit [Ping timeout: 246 seconds]
<icantbecool>
jamesaanderson: Did you do anything special? I installed the pre version of bundler, but it's throwing an error while trying to fetch from rubygems.
v0n has joined #ruby
cornfeedhobo has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
fedza_ has quit [Ping timeout: 252 seconds]
<jamesaanderson>
icantbecool, what operating system are you using? I had a couple problems with mountain lion and rvm.
<icantbecool>
I'm using Moutain Lion and rbenv.
<jamesaanderson>
I can't help much with rbenc sorry
<jamesaanderson>
*rbenv
<krz>
I've got a method called video_create and photo_create. variable foo can either be 'video' or 'photo'. how can i do something like foo_create
rvmeier has joined #ruby
<krz>
so if foo = 'video', it would call the video_create method
<icantbecool>
jamesaanderson: No problem thanks.
icantbecool has quit [Quit: leaving]
onemanjujitsu has quit [Quit: onemanjujitsu]
pavilionXP has joined #ruby
rafaelcaricio has quit [Remote host closed the connection]
IceDragon has quit [Quit: Space~~~]
mahmoudimus has joined #ruby
DaZ has quit [K-Lined]
maletor has quit [Quit: Computer has gone to sleep.]
angusiguess has joined #ruby
onemanjujitsu has joined #ruby
idkazuma has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
sterk has quit [Read error: Connection reset by peer]
angusiguess has quit [Ping timeout: 240 seconds]
ellogub has joined #ruby
nathancahill has joined #ruby
ellogub has quit [Quit: Leaving]
robert___ is now known as robert_
elkclone has joined #ruby
vansonhk_ has joined #ruby
ralxz has quit [Quit: Leaving.]
generalissimo has joined #ruby
generalissimo has quit [Read error: Connection reset by peer]
generali_ has joined #ruby
vansonhk_ has quit [Quit: vansonhk_]
the_mentat has quit [Quit: Computer has gone to sleep.]
jgrevich_ has joined #ruby
freakazoid0223 has quit [Ping timeout: 246 seconds]
aedornm has joined #ruby
v0n has quit [Ping timeout: 276 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
jgrevich has quit [Ping timeout: 264 seconds]
jgrevich_ is now known as jgrevich
plotter has joined #ruby
maletor has joined #ruby
ralxz has joined #ruby
plotter has quit [Remote host closed the connection]
jamesaanderson has quit [Quit: Computer has gone to sleep.]
emmanuelux has quit [Remote host closed the connection]
AsgardBSD has quit [Remote host closed the connection]
chrishough has joined #ruby
v0n has joined #ruby
plotter has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
hiroyuki has joined #ruby
vivalavinnie has quit [Quit: Leaving]
ahokaomaeha has quit [Ping timeout: 255 seconds]
dcwu has joined #ruby
joofsh has quit [Remote host closed the connection]
cyong has joined #ruby
dmiller has joined #ruby
billiam has quit [Read error: Connection reset by peer]
v0n has quit [Read error: Connection reset by peer]
v0n has joined #ruby
LouisRoR has joined #ruby
onemanjujitsu has joined #ruby
ralxz has quit [Quit: Leaving.]
biff_tannen has joined #ruby
ananthakumaran has joined #ruby
pac1 has quit [Read error: Operation timed out]
mibitzi has joined #ruby
angusiguess has joined #ruby
hiroyuki has quit [Remote host closed the connection]
cisco has quit [Quit: Leaving.]
<Liquid-->
Any body know of an awesome comprehensive guide on understanding how rails works? For example how views and controllers work with one another…some of the abstraction that goes on behind the scenes that makes rails tick.
johnpcamara has quit [Quit: johnpcamara]
hiroyuki has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
Opettaja has quit [Remote host closed the connection]
<yfeldblum>
Liquid--, i'm not really a learn-from-books person; i like the Book of Experience and the Book of Practice though
<chaosis>
=]
<GeekOnCoffee>
dive into the code, and then figure out questions to ask based on things you find and don't understand
<Liquid-->
Learn to program is great, ruby the hard way is pretty good too!
<chaosis>
yeah im really digging Learn to Program so far - good stuff =]
iamjarvo has joined #ruby
iamjarvo has quit [Client Quit]
radic has joined #ruby
SIFTU has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
<Liquid-->
hmm very nice. lol - I'm working with a view and controller, trying to keep code out of my view as much as possible. Very interesting getting these to work together.
himsin has quit [Remote host closed the connection]
himsin has joined #ruby
radic_ has quit [Ping timeout: 276 seconds]
heidar has quit [Read error: Connection reset by peer]
heidar has joined #ruby
bradleyprice has joined #ruby
pen has joined #ruby
theshow has quit [Ping timeout: 252 seconds]
vinax has quit []
dmiller has joined #ruby
hadees has quit [Read error: Connection reset by peer]
hadees has joined #ruby
stkowski has quit [Quit: stkowski]
cobragoat has joined #ruby
LouisRoR has quit [Ping timeout: 252 seconds]
dmiller has quit [Ping timeout: 255 seconds]
jonathanwallace2 has joined #ruby
gommo has quit [Remote host closed the connection]
mattbl has joined #ruby
fir_ed has quit [Ping timeout: 256 seconds]
daemoen has quit [Quit: WeeChat 0.4.0]
gommo has joined #ruby
fir_ed has joined #ruby
theshow has joined #ruby
jonathanwallace2 has quit [Ping timeout: 264 seconds]
<aedornm>
I wish my ebook reader (Nook) was just an eBook reader... Show me the books I have, allow me to copy stuff to it, focus on readability, and screw the rest. That would be grand.
<whitequark>
aedornm: don't use hardware with vendor lock-in
<whitequark>
I have an old Sony PRS-505 reader and it does everything of the above.
stormetrooper has joined #ruby
hadees has quit [Ping timeout: 260 seconds]
DrShoggoth has quit [Ping timeout: 255 seconds]
vifanq has quit [Remote host closed the connection]
<aedornm>
whitequark: well, I think it's mostly my hate of Android 2.x for an eReader
wargasm has quit [Ping timeout: 256 seconds]
hbpoison has joined #ruby
Takehiro has joined #ruby
hadees has joined #ruby
Takehiro has quit [Read error: No route to host]
wargasm has joined #ruby
Takehiro has joined #ruby
daemoen has joined #ruby
rvmeier has quit [Quit: Leaving]
monkegjinni has quit [Remote host closed the connection]
<whitequark>
aedornm: their DRM strategy is one huge wtf.
__class__ has quit [Read error: Connection reset by peer]
dnordstrom has quit [Quit: WeeChat 0.3.9.2]
stormetrooper has quit [Quit: Leaving]
daemoen has quit [Client Quit]
<aedornm>
DRM does need to go away
gosshedd has joined #ruby
daemoen has joined #ruby
gommo_ has joined #ruby
monkegjinni has joined #ruby
gommo has quit [Ping timeout: 256 seconds]
w|t has left #ruby ["Cya."]
drago757 has quit [Quit: drago757]
hadees has quit [Read error: Connection reset by peer]
hbpoison has quit [Ping timeout: 246 seconds]
ahokaomaeha has joined #ruby
hadees has joined #ruby
macmartine has joined #ruby
meoblast001 has quit [Remote host closed the connection]
io_syl has quit [Quit: Computer has gone to sleep.]
mafolz has joined #ruby
<atmosx>
shevy: never have to use it you mean never have to write it? it clearly sucks, but how are you going to do that? :-(
mockra has joined #ruby
lkba has joined #ruby
relixx has joined #ruby
<shevy>
hmm use ruby to generate it
vlad_starkov has quit [Ping timeout: 252 seconds]
zipace has quit [Ping timeout: 246 seconds]
thufir_ has quit [Quit: Leaving.]
lolcathost|afk is now known as ahokaomaeha
atno_ has quit [Remote host closed the connection]
zipace has joined #ruby
hoelzro|away is now known as hoelzro
atno has joined #ruby
atno has quit [Remote host closed the connection]
samphippen has quit [Quit: Computer has gone to sleep.]
marr has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
ryanf has quit [Quit: leaving]
noop has joined #ruby
ninegrid has joined #ruby
<atmosx>
shevy: that's what coffescript supposed to be but in their website (iirc) state the debugging the code is impossible if you don't know JS. So coffeescript is more like a shortcut for those who already know JS but like the ruby syntax better (shortcut to say "people with common sense")
Hanmac has joined #ruby
dmiller has joined #ruby
iamjarvo has quit [Quit: Leaving.]
rdark has joined #ruby
arya has joined #ruby
divout has quit [Ping timeout: 255 seconds]
mockra has quit [Ping timeout: 260 seconds]
ninegrid has quit [Ping timeout: 276 seconds]
chussenot has quit [Quit: chussenot]
ninegrid has joined #ruby
gosshedd has joined #ruby
berkes_ has joined #ruby
atno has joined #ruby
dmiller has quit [Ping timeout: 244 seconds]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
atno__ has joined #ruby
samphippen has joined #ruby
divout has joined #ruby
yacks has joined #ruby
Elhu has joined #ruby
rakun_ has quit [Quit: Saliendo]
skattyadz has joined #ruby
<shevy>
atmosx my gripe with coffeescript is that it is a language layered on top of another, inferior language
arya has quit [Ping timeout: 248 seconds]
<shevy>
the only reason javascript is being targeted is because it has the monopoly over browsers
<Xeago>
atmosx: there is a nodejs fork that executes cs directly
<Xeago>
(and also has ndb, for debugging)
<Xeago>
tho ndb is a memory honk
<Xeago>
as there is no garbage collection being done while ndb is attached
<Xeago>
or little, not quite sure
atyz has joined #ruby
zz_chrismcg is now known as chrismcg
arya has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
robotmay has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
KevinSjoberg has joined #ruby
rafaelcaricio has joined #ruby
nomenkun has joined #ruby
dcwu has quit [Quit: Leaving.]
<atmosx>
shevy, Xeago ever seen a live ballet show?
<Xeago>
the way you implemented it, it looks tricky to add new values and have the specs still pass for the old values
<Xeago>
e.g. the constants you specify are ordered with the test
<Xeago>
I'm not 100% certain that is the case, as I only had a quick look
<Xeago>
but that is what would bother me if I'd implement it myself
<KevinSjoberg>
Xeago: Okey, could you elaborate that? At the moment the constants P_ATTRIBUTES and S_ATTRIBUTES is all you need to modify in order to add a new value.
<Hanmac>
i like "level_of_awesomeness" ;P
<Xeago>
lets say. you remove the skill ruby_on_rails
<Xeago>
sec
<Xeago>
let me see if that is applicable
<KevinSjoberg>
Xeago: Sure.
elkclone has quit [Quit: It's never too late to unplug and run.]
<Xeago>
sec, let me see where my issue applies, if it applies at all
cjk101010_ is now known as cjk101010
hemanth has quit [Read error: Connection reset by peer]
julian-delphiki has joined #ruby
Criztian has joined #ruby
<Xeago>
never mind, my issue does not apply, it is based on count instead of index
kofno_ has joined #ruby
<atmosx>
Hanmac: nice story
rwz has joined #ruby
LouisRoR has joined #ruby
<KevinSjoberg>
Xeago: Yep. But I do understand you're concerns. My implementation is highly based on the needs "right now" and if major changes would happen to the Saltsider class, there might be an issue.
kofno has quit [Read error: Connection reset by peer]
erlingur has quit [Ping timeout: 256 seconds]
monkegjinni has quit [Remote host closed the connection]
<Xeago>
however, new values or lacking values in the constants won't kill other tests
sduckett has quit [Ping timeout: 256 seconds]
<KevinSjoberg>
your*
sduckett has joined #ruby
bean has quit [Ping timeout: 256 seconds]
atmosx has quit [Quit: Computer has gone to sleep.]
berkes_ has quit [Quit: Ex-Chat]
<KevinSjoberg>
Xeago: Exactly, the implementation is based on the constants. I tried to make sure the constants drive the logic.
locriani has quit [Ping timeout: 264 seconds]
locriani has joined #ruby
* Hanmac
think that some day i will use "\t\n" as pwd :P
ninegrid has quit [Ping timeout: 252 seconds]
Pufferfood has quit [Read error: Connection reset by peer]
ninegrid has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ninegrid has quit [Read error: Connection reset by peer]
jaygen has joined #ruby
Vainoharhainen has joined #ruby
Pufferfood has joined #ruby
zeade has quit [Ping timeout: 264 seconds]
jaygen__ has quit [Read error: Operation timed out]
Bosox20051 has quit [Quit: Leaving]
megha has joined #ruby
clocKwize has joined #ruby
icco has quit [Read error: Operation timed out]
carraroj has joined #ruby
chussenot has joined #ruby
rismoney has quit [Read error: Connection reset by peer]
anderse has quit [Quit: anderse]
cha1tanya has joined #ruby
rismoney has joined #ruby
toekutr has quit [Read error: Connection reset by peer]
d34th4ck3r has quit [Quit: Konversation terminated!]
timonv has joined #ruby
rafaelcaricio has quit [Remote host closed the connection]
kristofers has joined #ruby
adambeynon has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
mockra has joined #ruby
ozgura has quit [Remote host closed the connection]
alup has quit [Read error: Connection reset by peer]
alup has joined #ruby
workmad3 has joined #ruby
dmiller has joined #ruby
skattyadz has quit [Quit: skattyadz]
Phoop has joined #ruby
dyeske has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
mockra has quit [Ping timeout: 252 seconds]
<Xeago>
what is the proper way to do this: domElement.attributes["attribute-on-div"].value
<Xeago>
e.g. get the value of the attribute on a dom element
<banisterfiend>
Xeago: y r u using java style variable names ? :)
samphippen has joined #ruby
zz_Inoperable is now known as Inoperable
<banisterfiend>
maybe that's more obj-c style
<Xeago>
javascript
dmiller has quit [Ping timeout: 260 seconds]
pu22l3r has joined #ruby
skattyadz has joined #ruby
chussenot has joined #ruby
<banisterfiend>
oh
pen has quit [Remote host closed the connection]
hiroyuki has joined #ruby
colonolGron has joined #ruby
jonnie18 has joined #ruby
cparen has joined #ruby
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
berserkr has joined #ruby
lkba has quit [Ping timeout: 276 seconds]
lkba has joined #ruby
system30101 has quit []
cparen has quit [Ping timeout: 276 seconds]
zeade has joined #ruby
system30101 has joined #ruby
DrCode has quit [Remote host closed the connection]
DrCode has joined #ruby
lkba has quit [Ping timeout: 276 seconds]
aaronmcadam has joined #ruby
monkegjinni has quit [Remote host closed the connection]
mengu has joined #ruby
arturaz has joined #ruby
timmow has joined #ruby
eka has joined #ruby
gommo has quit [Remote host closed the connection]
timmow has quit [Read error: Connection reset by peer]
timmow has joined #ruby
razibog has joined #ruby
zeade has quit [Ping timeout: 276 seconds]
gommo has joined #ruby
moshee has quit [Ping timeout: 252 seconds]
guiguidoc has quit [Ping timeout: 248 seconds]
moshee has joined #ruby
guiguidoc has joined #ruby
cha1tanya has quit [Quit: Leaving]
atno has quit [Remote host closed the connection]
atno__ has quit [Remote host closed the connection]
elico has joined #ruby
ozgura has joined #ruby
emergion has joined #ruby
mercwithamouth has joined #ruby
<Xeago>
btw banisterfiend, you play sc2 right?
<Xeago>
me and apeiros need another practice partner
<banisterfiend>
Xeago: no, i bought it but i dont play it
berserkr has quit [Ping timeout: 246 seconds]
<Xeago>
why don't you play?
<banisterfiend>
Xeago: im playing ni no kuni instead
<Hanmac>
the orginal sc was better ...
anderse has joined #ruby
<Xeago>
Hanmac: starcraft2 gives me a better experience, it lets me be more awesome than I could be in sc2
<JonnieCa1he>
heh no theyre not all towering works of intellectual insight
Criztian has quit [Ping timeout: 245 seconds]
TMM has joined #ruby
<JonnieCa1he>
but its pretty good
<JonnieCa1he>
you try drawing 3 comics a week, you'll be reaching for the dick jokes within a month i'd bet
<TMM>
hello! I have a question: I'm working with ruby-ldap with GSSAPI and it's working quite beautifully, but if something is wrong the only error I see is "ldap.rb:6:in `sasl_bind': Local error (LDAP::ResultError)"
<TMM>
does anyone know how to get at the actual underlaying SASL error so I can present something a bit more useful to my users?
|Monie| has joined #ruby
bluenemo has joined #ruby
Jamone has quit [Read error: Connection reset by peer]
zerserker has quit [Ping timeout: 276 seconds]
<JonnieCa1he>
TMM: maybe that info resides within the LDAP::ResultError object
yacks has joined #ruby
alup has quit [Read error: Connection reset by peer]
buibex has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
zomgbie has quit [Ping timeout: 245 seconds]
<TMM>
JonnieCa1he, looking at the ruby-ldap code there's only a string in that object, and that's just the output of ldap_err2string() meaning I probably can't get at the underlying error
<TMM>
JonnieCa1he, thank you for your help!
dhruvasagar has joined #ruby
zeade has quit [Ping timeout: 245 seconds]
Guest3525 has quit [Quit: Computer has gone to sleep.]
angusiguess has quit [Ping timeout: 244 seconds]
zomgbie has joined #ruby
hadees has quit [Ping timeout: 246 seconds]
a_a_g has quit [Quit: Leaving.]
<JonnieCa1he>
TMM: looking at the library code is usually the best bet in these cases
<TMM>
JonnieCa1he, yeah, I see that now :)
hamed_r has quit [Ping timeout: 246 seconds]
a_a_g has joined #ruby
samuelj has joined #ruby
hadees has joined #ruby
<JonnieCa1he>
god knows what .NET devs who used closed source libraries do in these circumstances
<TMM>
any developer that has to rely closed-source libs has this problem
<TMM>
:)
sepp2k has joined #ruby
k610 has joined #ruby
<objectivemo>
They file a bug report to Microsoft, nothing more...
moshee has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
<objectivemo>
JonnieCa1he: That's why I am moving to ruby now from .Net :D
<JonnieCa1he>
but how do then then get on with their work, while theyre waiting 3 weeks for MS to respond to the bug?
<JonnieCa1he>
*they then
hbpoison has joined #ruby
<TMM>
they work around the issue, and then the workaround is suddenly part of the API and then MS keeps the workaround working in subsequent windows versions :)
<objectivemo>
Well, I have to be fair them, the .Net libs are quite stable and have been around for ages. Most of the good stuff ARE open source and are held in CodePlex, even a lot of MS stuff has been open sourced and are there http://www.codeplex.com/
<objectivemo>
but when I had a bug with Microsoft
<objectivemo>
and asked for it to get fixed, they said it would be 2 release down the line!
<objectivemo>
I just made my own lib then
alup has joined #ruby
<objectivemo>
but it did delay me massively, and I was an intern then on a 6 month placement, I finished by the time the fix was released. *sigh*
megha has quit [Quit: WeeChat 0.4.0]
<samuelj>
Hey, I'm having some trouble with Goliath - does anyone have any experience with it? Here's a pastie of what I'm trying to do: http://pastie.org/private/4bbxb2jfb2fvitpkpfczag - After running the script I get "You need to implement response" but the Goliath::WebSocket class already implements this, doesn't it?
kofno_ has quit [Remote host closed the connection]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
gommo has quit [Remote host closed the connection]
<Xeago>
JonnieCa1he: do you still have that link to the regex thingy?
<objectivemo>
CrazyDog_: I learnt it from "The Well Grounded Rubyist", but there is also the PixAxe book
<Hanmac>
oO why is yet another overflow page offline? oO
renanoronfle has quit [Quit: This computer has gone to sleep]
samphippen has quit [Quit: Computer has gone to sleep.]
skattyadz has quit [Quit: skattyadz]
dmiller has joined #ruby
fir_ed has quit [Ping timeout: 255 seconds]
ninegrid has joined #ruby
haxrbyte has joined #ruby
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
casheew has quit [Read error: Connection reset by peer]
mockra has quit [Ping timeout: 252 seconds]
casheew has joined #ruby
haxrbyt__ has joined #ruby
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
yacks has quit [Ping timeout: 252 seconds]
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
ninegrid has quit [Read error: Connection reset by peer]
ryanh has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
dmiller has quit [Ping timeout: 245 seconds]
haxrbyte_ has quit [Ping timeout: 246 seconds]
casheew has quit [Read error: Connection reset by peer]
divout has quit [Remote host closed the connection]
zeade has joined #ruby
cparen has joined #ruby
casheew has joined #ruby
atmosx has joined #ruby
TheFuzzball has joined #ruby
angusiguess has joined #ruby
samphippen has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
chrishough has quit [Quit: chrishough]
cparen has quit [Ping timeout: 252 seconds]
<samuelj>
Is there an IRC channel for Goliath chat?
ryanh has quit [Quit: Computer has gone to sleep.]
a_a_g1 has joined #ruby
samuelj has quit [Quit: Page closed]
skattyadz has joined #ruby
browndawg has quit [Ping timeout: 252 seconds]
a_a_g has quit [Ping timeout: 252 seconds]
baphled has quit [Ping timeout: 240 seconds]
yacks has joined #ruby
<atmosx>
Hello
zerba has joined #ruby
<hoelzro>
howdy
<atmosx>
I'm using regexp to match a pattern of 298 chars string into a ~ 4.700.000 chars string. Everything is fine, the pattern is found and we're so happy. However, is there any sane way to know the exact location (in terms of 1st, 2nd, 3rd…) of the found pattern in the original string?
krz has quit [Quit: krz]
<Xeago>
given a string like "Striderdoom-Day9Daily549P3BeastyQTVsXigua2662.m4v" how do I extract the part after the dash, to the .m4v minus the leading 3 to 4 numbers?
<Xeago>
e.g. Striderdoom-Day9Daily549P3BeastyQTVsXigua2662.m4v -> Day9Daily549P3BeastyQTVsXigua
pu22l3r_ has joined #ruby
zeade has quit [Ping timeout: 245 seconds]
Criztian has quit [Ping timeout: 240 seconds]
<JonnieCa1he>
something like /^.*?-(.*)\d{3,4}\.m4v$/
megha has joined #ruby
<JonnieCa1he>
Xeago: ^
<atmosx>
JonnieCa1he knows kung fu!
samuelj has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
Myconix has joined #ruby
pu22l3r has quit [Ping timeout: 252 seconds]
Criztian has joined #ruby
<JonnieCa1he>
hmm well i know basic regexes
<charliesome>
regexes are amazing
yshh has joined #ruby
<charliesome>
some people, when confronted with a problem, think "I know, I'll use regular expressions." now the problem is solved without any unnecessary effort.
<JonnieCa1he>
haha
hamed_r has joined #ruby
<charliesome>
maybe this is why i prefer ruby over less perlish languages but otherwise equivalent languages like python
<JonnieCa1he>
"having regexes" isnt the perlish bit about ruby though surely
<Xeago>
hmm, JonnieCa1he can I use that regex inside javascript?
<charliesome>
of course not
<charliesome>
it's one of the things
<Xeago>
or are those different flavours?
<JonnieCa1he>
Xeago: i think it should work fine
hybris has joined #ruby
<JonnieCa1he>
Xeago: you might need to tweak the \d{3,4} bit though
<JonnieCa1he>
not because of js just in general
<hoelzro>
there are lot of Perlish bits in Ruby other than regexes
<JonnieCa1he>
hoelzro: id think of magic globals first
<charliesome>
nobody ever said regexes were the only perlish thing about ruby
<hoelzro>
1st class regexes, magic globals, DATA, =begin/=end
<hoelzro>
off the top of my head
JohnBat26 has joined #ruby
<hoelzro>
we've discussed this so many times =)
<JonnieCa1he>
charliesome: lol i didnt assert that anyone did. it was just an idle comment :)
<charliesome>
the magic globals are great at times
cdt has quit [Quit: Ex-Chat]
<charliesome>
also ruby inherited the timtowtdi philosophy from perl
<charliesome>
which is nice
<Xeago>
"(\w\w\w\w(\d*+\w)*+)\w\w" is the result I got from the generator xD
cdt has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
<JonnieCa1he>
charliesome: the magic regex global is great when using regexes in case statements
<hoelzro>
charliesome: ah, that's very true!
yshh has quit [Ping timeout: 240 seconds]
<hoelzro>
I think that's the most important part, actually
<JonnieCa1he>
charliesome: the bit im talking about st
<JonnieCa1he>
starts shortly after the 45 minute mark
<charliesome>
ok
james is now known as Guest50472
icco has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby
<charliesome>
the guy introducing dhh is shit
sailias has joined #ruby
tvw has joined #ruby
browndawg has joined #ruby
elico has quit [Remote host closed the connection]
cdt has joined #ruby
yacks has quit [Ping timeout: 255 seconds]
<shevy>
has anyone tried to bundle yaml files in a ruby project before?
<charliesome>
JonnieCa1he: fucking lol
<charliesome>
this analogy is hilarious
<shevy>
if so, how do you define that in the .gemspec?
ksinkar has joined #ruby
<JonnieCa1he>
charliesome: yeah. its made more hilarious by the fact that its actually quite accurate
eric has joined #ruby
TomJ_ has joined #ruby
TomJ_ has quit [Changing host]
TomJ_ has joined #ruby
eric is now known as Guest53017
<banisterfiend>
JonnieCa1he: if i rename my rails blah.js.coffee file to just blah.js i can then use pure javascript right?
<JonnieCa1he>
yeah
<banisterfiend>
cool
pu22l3r_ has quit [Remote host closed the connection]
browndawg has quit [Ping timeout: 256 seconds]
<JonnieCa1he>
banisterfiend: if you remove the coffeescript gem you can stop it generating those files in the first place
wf2f has quit [Read error: Connection reset by peer]
<JonnieCa1he>
banisterfiend: you can pass flags to the `rails new` command to stop it ever putting that stuff in
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
<banisterfiend>
ah ok
TomJ has quit [Ping timeout: 246 seconds]
TomJ_ is now known as TomJ
wf2f has quit [Client Quit]
<JonnieCa1he>
you can also keep the gem installed but specify that the generators should generate plain js files
<JonnieCa1he>
cant remember how to do that though. i know it goes in application.rb
<clocKwize>
banisterfiend: I've started using pry.
<clocKwize>
we all knew it would happen eventaully
<clocKwize>
eventually*
<banisterfiend>
clocKwize: congrats :)
Guest53017 is now known as AGuy
zeade has joined #ruby
<clocKwize>
tis good, well done :)
angusiguess has quit [Ping timeout: 276 seconds]
<banisterfiend>
clocKwize: thx, which features sold you on it?
<clocKwize>
stupidly, being able to binding.pry on the last line of a block/method
<clocKwize>
also the fact it "just works"
<clocKwize>
whereas debugger is annoying to get working sometimes
jonathanwallace2 has joined #ruby
<clocKwize>
like in a rake task, getting it to run through the debugger can be annoying sometimes
<workmad3>
clocKwize: you can put binding.pry anywhere in the method ;)
<clocKwize>
workmad3: I know, but if you put a debugger on the last line a block/method, it'll drop you in to the context of the caller of that.. which pissed me off
<Xeago>
JonnieCa1he: I can't seem to get the number stuff to get away at the end
<workmad3>
clocKwize: heh :) fair enough
grayson has joined #ruby
<Xeago>
it always leaves the first number in
<banisterfiend>
clocKwize: if you miss being able to walk the stack, add pry-stack_explorer too
<Xeago>
is it because the {3,4} group isn't greedy?
nyuszika7h has quit [Ping timeout: 240 seconds]
<banisterfiend>
then you get up/down/frame, show-stack etc
<JonnieCa1he>
Xeago: yeah basically
Guest50472 has quit [Quit: Computer has gone to sleep.]
<Xeago>
how do i make it greedy, add a +?
<workmad3>
clocKwize: I have to admit... I've never really bothered getting the debugger working in ruby, I've always gone for the trace approach (and now binding.pry) since moving to ruby
<clocKwize>
banisterfiend: yeah I do miss it.. would like to be able to step-in/step-over/continue too =]
<JonnieCa1he>
Xeago: im not sure. i tried a couple of tweaks but they didnt work immediately
<banisterfiend>
clocKwize: add pry-debugger for step/next/continue :)
<clocKwize>
workmad3: I love(d) the debugger, was good to me (once working)
<clocKwize>
banisterfiend: yeah I need to set these things up :)
<clocKwize>
one day I'll have the time to try it :D
<banisterfiend>
clocKwize: just a matter of adding them to your Gemfile
<workmad3>
clocKwize: yeah, it was always the '(once working)' that never seemed worth it... useful, but not useful enough (for me) to go through the steps of appeasing such a fickle thing
talktokets has joined #ruby
browndawg has joined #ruby
<JonnieCa1he>
banisterfiend: oh yeah i forgot to tell you, i have a pry tshirt now :)
<clocKwize>
workmad3: was easy in rails apps, just add gem "debugger" and put "debugger" in your code somewhere
<banisterfiend>
JonnieCa1he: cool :) I think we're going to redo them at some point though, im not that happy with them
TomJ has quit [Read error: Connection reset by peer]
zeade has quit [Ping timeout: 260 seconds]
<JonnieCa1he>
yeah theyre quite thin arent they
<JonnieCa1he>
does the job though
<TMM>
does anyone here use grape by any chance? I'm slightly confused as to the whole scoping of the Grape::API objects
<workmad3>
pry t-shirt? :( where's mine?
talktokets has left #ruby [#ruby]
<clocKwize>
I want one
<banisterfiend>
our stickers are nice
<workmad3>
it would go well with my meteor t-shirt :P
<clocKwize>
I won't wear it, because I'm teetering on the edge of social acceptance as it is, but I'd like one anyway
mengu has quit [Ping timeout: 244 seconds]
<workmad3>
clocKwize: pfft, social acceptance is overrated :P
<clocKwize>
hehe
<TMM>
and how the whole helper mechanism is supposed to work. I'm trying to come up with a pattern to put a Grape-based API on top of a set of existing classes, but due to the weirdy scoping business I can't really seem to be able to figure it out
yacks has joined #ruby
chussenot has quit [Quit: chussenot]
<JonnieCa1he>
i have a soundcloud tshirt. you cant buy them, i got it by emailing and asking nicely. its AMAZING to wear it to gigs and clubs etc. people treat you with reverence :D
<JonnieCa1he>
or the electronic music nerds do anyway
<atmosx>
JonnieCa1he: yeah, where I live and go no ones has a clue about soundcloud
samphippen has quit [Quit: Computer has gone to sleep.]
<atmosx>
A kid just moved in to the next appartment, I think I'm gonna kill him. He has a sound-system that needs to be put out of use. At least the bass.
beliveyourdream has quit [Read error: Connection reset by peer]
daniel_- has joined #ruby
<clocKwize>
atmosx: check people on in the block
<clocKwize>
find the meanest looking dude
<clocKwize>
write a rude note, sign it from him
<clocKwize>
post it through the guys door
Pandaen has quit [Remote host closed the connection]
<shevy>
atmosx lol
<Xeago>
lol
beliveyourdream has joined #ruby
<clocKwize>
I just built a new PC, then bought a new set of 2.1 micro speakers.. not big on awesome sounds :p
mockra has joined #ruby
<JonnieCa1he>
the .1 part in those crappy 2.1 systems are the biggest culprit for those kind of things
<Xeago>
JonnieCa1he: /^.*?-(.*)\d{3,}\d+\.m4v$/ going with that
<atmosx>
clocKwize: I was thinking of cracking his WPA2 and formating his HD somehow. But your solution will take considerably less amount of time with way higher success possibility.
<JonnieCa1he>
they produce all this excess energy, most of which goes through the walls
<atmosx>
clocKwize: thanks for the insight.
<clocKwize>
:)
<clocKwize>
I love how solutions to life problems discussed on irc always involve hacking someones wifi
<JonnieCa1he>
haha so true
tagrudev has quit [Remote host closed the connection]
<atmosx>
clocKwize: which to tell you truth I don't even know which one is it, I have cracked all the wep ones when I first came and had no internet connection...
<atmosx>
the first week
<clocKwize>
heh
<clocKwize>
I've never bothered even when I had no internet
<JonnieCa1he>
all the wep ones? how many were there?
tagrudev has joined #ruby
<atmosx>
JonnieCa1he: 3
<atmosx>
out of 9
<JonnieCa1he>
i never see those any more
dmiller has joined #ruby
<atmosx>
2 wpa the rest was wpa2, I bothered a couple of days and then spared the cpu cycles of my MBA
<workmad3>
JonnieCa1he: it'll depend on how old their ISP-supplied wifi box of laughs is
<atmosx>
I already told him once nicely to remove the bass, not to down the music
deribb_l has joined #ruby
<atmosx>
the walls are thin and I'm positive that he has no fucking idea how his sound-system (which must be utterly low quality) sounds nearby.
<JonnieCa1he>
just crack the wps code its really easy
<shevy>
atmosx videotape how you will smash down his things, then put it onto youtube
<atmosx>
shevy: lol
mockra has quit [Ping timeout: 252 seconds]
sailias has quit [Quit: Leaving.]
<atmosx>
I'll get some hits for sure
<JonnieCa1he>
atmosx: it probably doesnt sound that loud in his room
<workmad3>
mmm, violence, the answer to all life's problems
pskosinski has joined #ruby
<atmosx>
JonnieCa1he: yeah, I guess
<clocKwize>
eps is the one that is validated in 2 blocks, so takes like half the theoretical time to crack right?
<clocKwize>
or, way less than half or whatever..
<atmosx>
I'm all against violence. lol
<JonnieCa1he>
atmosx: thats what i mean about those 2.1 systems kicking out all this extra low frequency energy
<workmad3>
atmosx: would you fight for that belief? :P
<shevy>
hahaha
<atmosx>
workmad3: hahahahaha, I might have to :-P if I go back home
<workmad3>
:)
<shevy>
I always sought people who won't hit back
<JonnieCa1he>
youre not hearing the bass from the track, its more the equivalent of wideband noise being put out by a bad radio antenna
HardFu has joined #ruby
HardFu has left #ruby [#ruby]
nateberkopec has joined #ruby
deribb_l has quit [Client Quit]
<atmosx>
the wifi scheme is out of the window. I just realized that I see no new wifi which means: either he has a hidden wifi SSID (highly unlikely), or he uses ethernet...
willob has joined #ruby
skattyadz_ has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
<atmosx>
which is probably what happens because I saw a stable pc sitting on a big desktop.
<atmosx>
anyway
<atmosx>
enough ruby talking!
<JonnieCa1he>
set YOUR wifi ssid to "STOP MAKING SO MUCH NOISE!"
<JonnieCa1he>
and get your neighbors to do the same
<clocKwize>
or put a brick through his window
<atmosx>
JonnieCa1he: hahahahahahaha… I don't think he is *THAT* smart.
<clocKwize>
just a suggestion..
Gwyxx has quit [Quit: Leaving]
<atmosx>
clocKwize: does your nick came out from "a clockwork orange" ?
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<clocKwize>
nope
<clocKwize>
I've not seen it
skattyadz has quit [Ping timeout: 244 seconds]
skattyadz_ is now known as skattyadz
<clocKwize>
I couldn't think of a decent nick, so someone on irc said what is on your desk… and I said a clock, so he called me clockwize
<clocKwize>
lol
baphled has joined #ruby
<AGuy>
I have this code right here: http://pastebin.com/fnX1fc04 Its supposed to be a p2p like client system, but for some reason each socket can only handle one connection.
<hoelzro>
AGuy: is the out thread supposed to be a test client?
ryannielson has joined #ruby
<AGuy>
No, that file is a server/client, the out was supposed to be to handle incoming peer connections
dawkirst has quit [Remote host closed the connection]
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
<Dwarf>
Heya, can someone help me brainstorm about something? I'm trying to put strings in an array which already has values, and later on only drop the unique values
<hoelzro>
oh, so you're trying to open a TCP connection to multiple machines on line 28?
<hoelzro>
AGuy: ^
m8 has joined #ruby
<AGuy>
yes
<AGuy>
Wait line 28?
<AGuy>
oh yes
noop has quit [Remote host closed the connection]
<hoelzro>
ok
<hoelzro>
TCP doesn't work like that
<hoelzro>
TCP is point to point
<hoelzro>
meaning one machine on each side of the connection
yacks has quit [Ping timeout: 252 seconds]
mark_locklear has joined #ruby
<AGuy>
Peerlist actually represnets one machine
<AGuy>
Its a text file with a ip
hmarr has quit [Ping timeout: 252 seconds]
<hoelzro>
ok
<hoelzro>
so, what's your issue?
geekbri has joined #ruby
<AGuy>
Okay the issue is
<AGuy>
I can only get 2 clients into the system
<AGuy>
When I run 2 clients I cant add a thrid connecetion
<shevy>
Hanmac hmm dunno... too much text, too much reference to a god entity... I like xkcd more
<shevy>
ewww
ninegrid has joined #ruby
<shevy>
clang of llvm requires svn checkout? how could I ever replace gcc, without svn available :\
baphled has quit [Ping timeout: 252 seconds]
chussenot has joined #ruby
Konboi has joined #ruby
Konboi has quit [Remote host closed the connection]
PanPan_ has quit [Quit: ChatZilla 0.9.90 [Firefox 18.0.2/20130201065344]]
invisime has joined #ruby
jamescarr has joined #ruby
arya has joined #ruby
zeade has joined #ruby
<Xeago>
shevy: use git-svn?
<shevy>
Xeago hmm
<AGuy>
hoelzro any ideas?
<shevy>
I just managed to compile apr-util, now I can give svn a try... I am only a bit annoyed that one can not download a tarball
<hoelzro>
AGuy: I'm still not sure what your issue is
<AGuy>
Okay let me try to exaplin one secind
<shevy>
it reminds me of perl 6, parrot... "in order to compile this, you need to have perl 5 available". wow, what a promising future, if perl 6 requires perl 5 ...
<hoelzro>
ok
<AGuy>
second*
<shevy>
exaplin! charles chaplin exaplin! :D
<hoelzro>
shevy: most machines have Perl 5 on them, though.
<hoelzro>
well, most *nix machines, anyway
<hoelzro>
the rest don't count ;)
juco has quit [Ping timeout: 252 seconds]
<AGuy>
Well first off, I can only get one peer to connect to the other peer. Each peer can only handle one connection
<jokke>
when i define a proc that takes two arguments, how can i use the map method and pass that second argument?
erlingur has joined #ruby
<jokke>
sth like map(arg,&myproc) ?
<jokke>
or the other way around?
<hoelzro>
AGuy: ok
<AGuy>
Im trying to pastebin the outputs of three clients so i can show u
<hoelzro>
and the peer part is implemented by the out thread, right?
<hoelzro>
so, you're establishing a TCP connection to port 4545
<AGuy>
yes
iPhoneMRZ has joined #ruby
<hoelzro>
and you're expecting multiple processes to all be able to listen on 4545?
iPhoneMRZ has quit [Client Quit]
<samuelj>
Can anyone recommend an alternative to fnordmetric? It's not compatible with JRuby.
<AGuy>
Yah
<hoelzro>
ok, you can't do that.
<hoelzro>
that's not how sockets work
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<AGuy>
See this is the server: TCPServer.new port
<hoelzro>
I mean, you *can* do that if they're listening on different interfaces
x0F_ is now known as x0F
<AGuy>
THis is to connect peers: q = TCPSocket.new peerlist, '4545'
<AGuy>
connect to*
craigp has joined #ruby
<hoelzro>
right
<hoelzro>
so your first process starts up
enroxorz-work has joined #ruby
<hoelzro>
and starts listening on port 4545 for TCP connections
<hoelzro>
probably on 0.0.0.0
<AGuy>
Im trying to have 2 threads. One listening and one connecting to peers
a_a_g1 has quit [Quit: Leaving.]
<hoelzro>
the OS only allows one process to listen on 4545 for an interface
davidcelis has quit [Quit: K-Lined.]
erichmenge has quit [Quit: Arrivederci!]
<hoelzro>
otherwise when a packet comes in, it has no idea which process to give it to
svandiepen has quit [Remote host closed the connection]
justsee has quit [Quit: Leaving...]
<AGuy>
I'm confused. The TCPServer is supposed to be listening for connections
yshh has joined #ruby
<AGuy>
shouldn't that be able to take more then 1 connection
<hoelzro>
yes
<hoelzro>
but
<hoelzro>
you can't listen on the same port in 2 processes
<AGuy>
Im not
<hoelzro>
TCPServer.new port
<hoelzro>
isn't port 4545?
<AGuy>
yes
<hoelzro>
so you start the script
<hoelzro>
and that line runs
<AGuy>
mhm
<hoelzro>
then you run a second instance of the script
<AGuy>
I ran a peer from 3 computers
<hoelzro>
and that line runs again
davidcelis has joined #ruby
<hoelzro>
are you testing this on multiple machines, or one?
<AGuy>
multiple
juco has joined #ruby
<AGuy>
I can get 1 machine to connect to the other but the third wont work
<hoelzro>
oh, ok
<hoelzro>
that explains things
<AGuy>
:O
<AGuy>
So whats the issue
fermion has joined #ruby
ereslibre_laptop is now known as ereslibre
<hoelzro>
AGuy: what address is client 3 attempted to connect to?
erichmenge has joined #ruby
<AGuy>
the second machine
<hoelzro>
your program also only accepts a single connection
<AGuy>
:O
<hoelzro>
on lines 13-19
<AGuy>
I couldnt figure out how to add more then one
<AGuy>
:(
svandiepen has joined #ruby
jamescarr has quit [Quit: jamescarr]
baphled has joined #ruby
<hoelzro>
throw in a while loop?
pskosinski is now known as lier
<hoelzro>
while true ; s = server.accept ; do stuff ; close s ; end
KB1ZIB has joined #ruby
<AGuy>
Thats what I thought
<hoelzro>
or fork off a worker thread to handle that socket
<Xeago>
hoelzro: probably want to use a block version
<AGuy>
but then the next thread doesnt do anything
<hoelzro>
or use an event machine
<hoelzro>
er, event library
zeade has quit [Ping timeout: 246 seconds]
<AGuy>
Can you add it to the code snippit?
dhruvasagar has quit [Ping timeout: 246 seconds]
D4T has joined #ruby
Konboi has joined #ruby
<hoelzro>
I just gave you three suggestions
<hoelzro>
you have to pick one based on your use case
<hoelzro>
I personally would use an event library rather than threads
<AGuy>
Will I have to install any librarys?
<hoelzro>
I think event machine is the most popular event library for Ruby
jonathanwallace has quit [Ping timeout: 244 seconds]
<hoelzro>
but I haven't used it
<AGuy>
See what I need is while thread one (local) is accepting connections, I need thread 2 (out) to try to connect to peers
<AGuy>
All at the same time
<hoelzro>
ok
<hoelzro>
you can do that with an event library
<AGuy>
can I also do that with a while loop?
daniel_-_ has joined #ruby
daniel_-_ has quit [Client Quit]
<Xeago>
AGuy: a while loop with manually taking care of threads, yes
sterk has quit [Read error: Connection reset by peer]
<AGuy>
?
lier is now known as pskosinski
daniel_-_ has joined #ruby
<hoelzro>
AGuy: are you asking if you can use a while loop with an event library?
<AGuy>
No
<Xeago>
"See what I need is while thread one (local) is accepting connections, I need thread 2 (out) to try to connect to peers" — the logic in this sentence is wrong
<AGuy>
I mean without the event lib
<AGuy>
Xeago yes
ninegrid has quit [Ping timeout: 252 seconds]
<AGuy>
oh
<Xeago>
AGuy: you will need to write your own threading then
<AGuy>
How
<AGuy>
shit
<Xeago>
you don't accept and then connect
<AGuy>
Do you know what p2p is
<Xeago>
yes
<AGuy>
Thats what I am trying to achive
daniel_- has quit [Ping timeout: 244 seconds]
<Xeago>
Have I written a program that is based on a p2p infrastructure, yes.
<AGuy>
Thats what Im trying to do
<Xeago>
then start taking advice
<Xeago>
or re-invent the wheel
ninegrid has joined #ruby
samphippen has joined #ruby
<AGuy>
Im creating a p2p bases for a project, I am taking advice, but its not easy to do
<Xeago>
what is not easy to do?
<Muz>
What, taking advice is hard to do? Depends on how stubborn you are.
jfl0wers has quit [Read error: Operation timed out]
jfl0wers_ is now known as jfl0wers
hmarr has quit [Ping timeout: 252 seconds]
alup has quit [Read error: Connection reset by peer]
Stilo has joined #ruby
alup has joined #ruby
<Xeago>
what is spinny?
<Xeago>
also, what happens to be your server is ending
Rix has quit [Ping timeout: 260 seconds]
main has quit [Ping timeout: 256 seconds]
<Xeago>
how much do you know about threading, and not making a random thread?
<Xeago>
replace threading with concurrency if that makes it harder
<AGuy>
A good amount
ninegrid has quit [Ping timeout: 255 seconds]
<AGuy>
and spinny is part of another class in the script
<Xeago>
both your threads exit
samuelj has quit [Ping timeout: 245 seconds]
mockra has joined #ruby
hmarr has joined #ruby
xargoon has joined #ruby
BrindleFly has quit [Remote host closed the connection]
<Xeago>
AGuy: how much is a good amount?
craigp has quit [Quit: craigp]
s__dana has joined #ruby
<Xeago>
do you know how to deal with mutual access on a mutable object?
BrindleFly has joined #ruby
<AGuy>
no
<Xeago>
then I'd argue that you know little about threading/concurrency
ninegrid has joined #ruby
JohnBat26 has joined #ruby
spaceships has joined #ruby
dmiller has joined #ruby
postmodern has quit [Quit: Leaving]
<AGuy>
Hold up I may have got it to work
daniel_-_ has quit [Quit: WeeChat 0.3.9.2]
tommyvyo has joined #ruby
Rix has joined #ruby
<AGuy>
:)
<AGuy>
WOrking
jfl0wers has quit [Quit: jfl0wers]
<Xeago>
AGuy: please make sure you close your sockets, or use blocks
<AGuy>
Okay
<Xeago>
sorry, connections
<AGuy>
yah
<AGuy>
thats what i thought
<AGuy>
I just added a loop do
mockra has quit [Ping timeout: 260 seconds]
lurch_ has joined #ruby
<AGuy>
Now it stopped working
<AGuy>
nvm LOL
jamescarr has joined #ruby
dmiller has quit [Ping timeout: 255 seconds]
carlyle has joined #ruby
carlyle has quit [Remote host closed the connection]
<lurch_>
hi, have a ruby installed on a server using rbenv. Is it possible to have a custom shim directory for every app that's running? Every app has its own user, and gems are installed using --path vendor/bundle, so they should be completely separate. When I run "rbenv rehash" now, I get an error because the user cannot write to the system directory where rbenv is installed (and i don't want users overwriting each others shims)
main has joined #ruby
haxrbyte has joined #ruby
anonymuse has joined #ruby
jamescarr has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
hmarr has quit [Read error: Connection reset by peer]
haxrbyte_ has joined #ruby
<Xeago>
lurch_: I am not sure on this, I think you can set up RBENVROOT per user
<Xeago>
or remove the systemfolder from rbenvdirs?
<lurch_>
Xeago: yes. that would be an option, but then i would have to install a separate ruby fore every app/user, which i would rather not do. Just have 1 ruby version, shared between users, and then only have the shims per user
main has quit [Excess Flood]
<lurch_>
ah, don't know about rbenvdirs. thanks. Let me read up on that
<samuelj>
Any recommendations for an fnordmetric alternative?
<shevy>
0.5%! that is doable!
moos3 has joined #ruby
banisterfiend has joined #ruby
<hoelzro>
oh god, who cares about TIOBE
moos3 is now known as KB1ZIB
jgarvey has joined #ruby
<hoelzro>
and why does overtaking Perl matter?
<workmad3>
hoelzro: shevy
<hoelzro>
TIMTOWTDI applies to languages too
<workmad3>
hoelzro: and because shevy thinks perl is too 'complicated', I suspect :P
stat1x has quit []
<hoelzro>
that's fine
<hoelzro>
it's not for everyone
<hoelzro>
I just don't like how it's a competition
codecop has quit [Quit: Išeinu]
skattyadz has quit [Ping timeout: 264 seconds]
skattyadz_ is now known as skattyadz
<Muz>
hoelzro: it's not.
<Muz>
Unless you're stupid. ;)
federicobucchi has joined #ruby
<hoelzro>
Muz: well, no it's not, but some people treat it like it is
federicobucchi has quit [Quit: Page closed]
<shevy>
workmad3 not complicated, just very inferior
lolmaus has quit []
<shevy>
but perl6 will change this all
<shevy>
hoelzro there inevitably are better languages for any given problem x
<hoelzro>
shevy: if you find Perl inferior, don't use it.
<shevy>
I am very glad that I don't have to use it
<hoelzro>
so am I
<shevy>
even php is better than perl
<hoelzro>
just as I'm glad I don't have to use Python
<hoelzro>
ok, now you're just trolling
<hoelzro>
=P
<shevy>
no, I am serious
<shevy>
I was more productive in php than in perl :\
<shevy>
the last project I tried in php was an IRC bot, which failed
<workmad3>
shevy: you found PHP more productive for filtering large masses of text than perl?
jamescarr has joined #ruby
Triston has joined #ruby
<shevy>
with a little help from others my IRC bot in ruby worked
Judith_ has quit [Quit: Leaving]
asobrasil has joined #ruby
<shevy>
workmad3 I found PHP more productive in creating something useful and demo-able
<workmad3>
shevy: or were you comparing PHP with perl CGI scripts? :P
<shevy>
workmad3 yeah, quite a lot
<shevy>
I think I did about perhaps only 50 perl non-cgi scripts
<workmad3>
shevy: right, so you were setting up a flawed comparison ;)
<shevy>
and about 120 perl .cgi
F1skr has joined #ruby
<shevy>
workmad3, the fact remains that some languages, compared to others, are better
<workmad3>
shevy: for certain tasks
<shevy>
yeah
Triston has quit [Client Quit]
sprites has joined #ruby
<workmad3>
shevy: that's always a critical rider to that statement ;)
<shevy>
using php for non-web things sucks
<shevy>
there even were about two projects in PHP that aimed to create a MUD
<workmad3>
tbh, using PHP for web things also sucks
<shevy>
hehe
braoru has joined #ruby
<workmad3>
but I can agree it sucks less than writing non-trivial CGI scripts in perl ;)
mockra has joined #ruby
gordon1775 has quit [Ping timeout: 246 seconds]
mattbl has joined #ruby
<workmad3>
however, it is a different starting point... I'd probably prefer perl to PHP, if I was using perl with something that handled the CGI minutiae for me
<hoelzro>
no one uses CGI with Perl anymore.
<shevy>
I wonder whether I would still use python if I started in it back with ruby, perhaps 2005 or some such
<shevy>
(I mean, rather than ruby)
<shevy>
I did want to give python a serious try!
<workmad3>
hoelzro: not surprising :) I've only ever done perl with command line stuff though, so not aware of how it progressed wrt web app dev
<shevy>
but the transition from python2 to python3 isn't much fun, the atmosphere just isn't the same the way I see it
dmiller has joined #ruby
<hoelzro>
web dev in Perl has evolved quite a bit
megha has joined #ruby
<hoelzro>
especially in the last 2-3 years
* Hanmac
is currently working on rwx to make shevy harpy :P
<workmad3>
shevy: I did a project in python, back in '08... didn't enjoy it much, felt python was just too verbose and annoying
<hoelzro>
I can't compare it to Ruby (considering I've never done web dev in Ruby), but it was pretty easy
<shevy>
Hanmac yeah! btw did you finish libarchive with examples?
deception has joined #ruby
<shevy>
hoelzro one of the best browsergames I played was written in perl, its peak time was around 1997-2003, some such
<JonnieCa1he>
i'll never be able to see past __this_crap__
<JonnieCa1he>
its just offensive
<workmad3>
shevy: I found the whitespace-sensitive blocks a lot less annoying than I thought I would (and is why I'm now happy using coffeescript), but the rest of it... verbose, annoying, and in some ways quite ugly
<shevy>
haha yeah the __ is ugly
mockra has quit [Ping timeout: 240 seconds]
<JonnieCa1he>
'''this is pretty offensive as well'''
deception has left #ruby [#ruby]
<workmad3>
JonnieCa1he: don't forget having to explicitly put self in all your instance method param lists
<Hanmac>
not yet, but i do today at the afternoon (first i need to image that is the best way to check such stuff with an archive)
<shevy>
JonnieCa1he well docstrings wouldn't so bad, perhaps if all ruby objects would come with (optional) documentation or some such... like --help, without having to use OptionParser
<Hanmac>
what i dont like at python is the explizit this you need to define at methods
<JonnieCa1he>
i like docstrings its just the notion of triple quoting is crazy to me
<workmad3>
Hanmac: that's what I just said :)
<shevy>
when I have not used one of my scripts in a long time, I often query help options from the commandline... but I really can't stand optparse...
<JonnieCa1he>
thinking about it, im not sure if its objectively worse than %Q{}
sprites has quit [Quit: Leaving]
<workmad3>
docstrings are a nice idea, especially with them being retrievable
<shevy>
Hanmac just write one main example script showcasing it all!
<Hanmac>
workmad3 we only need python so we can run ruby in it :P
<shevy>
hehe
ozgura has quit [Remote host closed the connection]
<workmad3>
Hanmac: heh :)
<Xeago>
how do new files in unix get permission?
<Xeago>
+s
dmiller has quit [Ping timeout: 245 seconds]
mantas322 has joined #ruby
<mantas322>
Hi
<hoelzro>
Xeago: the umask
<mantas322>
im having some noobish issues
<mantas322>
im trying to divide a number by the size of array
beliveyourdream has quit [Remote host closed the connection]
JumpMast3r has quit [Quit: JumpMast3r]
<Xeago>
because I don't have writeaccess(group) on those new directories
tomzx_mac has quit [Ping timeout: 244 seconds]
imami|afk is now known as banseljaj
<Xeago>
should I set the sticky bit for that?
<Xeago>
or should I fix my daemon/group setup?
system30101 has quit [Ping timeout: 255 seconds]
djwonk has joined #ruby
techlife has quit [Ping timeout: 255 seconds]
liquid-silence has quit [Ping timeout: 276 seconds]
system30101 has joined #ruby
jcrawford has joined #ruby
hmarr has joined #ruby
pu22l3r has joined #ruby
DrForr has joined #ruby
relixx has joined #ruby
skattyadz has quit [Remote host closed the connection]
flexd has joined #ruby
nomenkun has quit [Remote host closed the connection]
<flexd>
If you had to write a REST api in Ruby, what library would you use? Plain Sinatra or something else?
<flexd>
Made the "mistake" of writing it in Node, it's very tiny so I am just rewriting it to ruby and keeping Ember.js on the clientside :-)
mattbl has quit [Quit: This computer has gone to sleep]
joshman_ has joined #ruby
allaire has quit []
blaxter has quit [Quit: foo]
renanoronfle has quit [Quit: This computer has gone to sleep]
main has joined #ruby
<Xeago>
flexd: there are several gems that are possible candidates
blaxter has joined #ruby
<Xeago>
if you would like to design the api completely by yourself
<flexd>
I was looking at sinatra-rabbit, but not sure if that's at all adopted by anyone
<Xeago>
probably sinatra
<Xeago>
haven't heard of sinatra rabbit
<Xeago>
there is also gollum iirc
<flexd>
I am making a very very simple support queue system that requires a tiny bit of dynamic-y
<flexd>
uh
<flexd>
features
<Xeago>
goliath*
<flexd>
Basically a person will scan a RFID card on a machine which is also the server, the server will tell the website somethings going on and stuff gets updated
<Xeago>
or grape
<Xeago>
anything will do
justinleitgeb has joined #ruby
<Xeago>
however some frameworks want you to have a database
<Xeago>
which you might not want
<Xeago>
sinatra probably your best shot
<Xeago>
because it is clean and silent
<flexd>
Yeah hm
<flexd>
I'll just use websockets (like socket.io) to notify the client something is going on
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
hmarr has quit [Ping timeout: 252 seconds]
evenix has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
<flexd>
Not even any relations going on really, I just need to store some data in a SQL database (or anything really) and some statistic
<flexd>
seems like a lot of repeating myself though
skattyadz has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
megha has joined #ruby
baphled has quit [Ping timeout: 244 seconds]
main has joined #ruby
juarlex has joined #ruby
bean_ has joined #ruby
bean_ has quit [Max SendQ exceeded]
goganchic has joined #ruby
bean_ has joined #ruby
psyprus has quit [Ping timeout: 248 seconds]
Spooner_ has joined #ruby
tagrudev has quit [Remote host closed the connection]
teod has joined #ruby
jasond has joined #ruby
mercwithamouth has joined #ruby
mattbl has joined #ruby
<Xeago>
flexd: I wouldn't get into datamapper..
hmarr has quit [Ping timeout: 246 seconds]
aaronmcadam_ has joined #ruby
aaronmcadam has quit [Read error: Connection reset by peer]
aaronmcadam_ is now known as aaronmcadam
krz has joined #ruby
<flexd>
Why not?
<flexd>
and what else? Sequel?
<flexd>
I've used Datamapper before but it's a long time ago.
<Xeago>
Sequel imo
<Xeago>
datamapper is old
main has quit [Max SendQ exceeded]
hmarr has joined #ruby
teod is now known as teod_afk
tcstar has joined #ruby
io_syl has joined #ruby
<flexd>
That does seem a bit closer to writing actual SQL though
<Xeago>
yup
<Xeago>
but datamapper will probably do fine
<flexd>
Which might not be a good thing
<Xeago>
its just old :)
znake has joined #ruby
<flexd>
This was kind of ironic: "Sequel has restored my faith in Ruby. It's really amazing. The O/RM I've been hoping for for years." -- Sam Smoot, creator of DataMapper
znake has quit [Client Quit]
<flexd>
Did he stop developing Datamapper at that point?
<Xeago>
no idea
<flexd>
Hmm
interactionjaxsn has joined #ruby
sailias1 has quit [Quit: Leaving.]
Kuifje has joined #ruby
bradleyprice has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
sailias has joined #ruby
Phoop has quit [Quit: Phoop]
main has joined #ruby
Kudos has quit [Ping timeout: 246 seconds]
fryguy has joined #ruby
zeade has quit [Quit: Leaving.]
skattyadz has quit [Read error: Connection reset by peer]
igor_ has left #ruby ["Leaving"]
igor_ has joined #ruby
asdfqwer has joined #ruby
main has quit [Excess Flood]
banisterfiend has quit [Ping timeout: 260 seconds]
main has joined #ruby
the_mentat has joined #ruby
<flexd>
As long as I do not have to write the SQL directly :-)
banisterfiend has joined #ruby
braoru is now known as braoru_aw
Kudos has joined #ruby
Virunga has joined #ruby
<mantas322>
yay
<mantas322>
Point biserial item correlation
<mantas322>
for a matrix of data is successfully converted to ruby :)
<Hanmac>
"... restored my faith in Ruby" so is it my job to destroy this faith? :P
<workmad3>
Xeago: the {} there is a block to p, not a hash ;)
<Xeago>
aaaaah
<Xeago>
sense was made today
<jokke>
Hanmac: wtf :D
casheew has quit [Read error: Connection reset by peer]
pyrac has quit [Quit: pyrac]
<jokke>
shevy: how did you know i speak german?
casheew has joined #ruby
<shevy>
jokke in xchat I hovered over the nick, made a right click and had a look, it said .de, in 90% of the case that means someone who can speak german!
pu22l3r has quit [Remote host closed the connection]
<shevy>
isn't always right though, like with emocakes
<Xeago>
shevy: good luck on me
<Xeago>
if you find anything
<shevy>
haha :D
<Xeago>
you'll think I speak swedish
<shevy>
Xeago awww you are in stealh mode
<shevy>
no way
<shevy>
swedish people speak and write close to perfect english :)
<Xeago>
even behind stealth, this is via another 'funny' host
<shevy>
don't you know ABBA or ace of base!
<Xeago>
which is behind aimbot.xs4all.nl
<jokke>
shevy: ah okay :P
<Xeago>
which is behind the extra host ;)
<flexd>
shevy: I like node but I'm annoyed with doing syncronous things with all sorts of async
pu22l3r has joined #ruby
<jokke>
anyhow.. my rspec errors :P
<shevy>
flexd aha ok, I have not done much async in ruby... I use Thread.new very rarely only
<shevy>
once in my ruby-shell, to register jobs to run (but this is buggy the way I tried to solve it...)
dmiller1 has quit [Ping timeout: 276 seconds]
<shevy>
who is the thread expert here
<mantas322>
I think I might start blogging about my learning of ruby
<shevy>
Hanmac?
<shevy>
mantas322 when you learn something new, write one short entry! for one or two weeks!
<mantas322>
yeah
* Hanmac
does not care about threads
Vert has joined #ruby
<flexd>
shevy: I usually just used resque or delayed_job for ruby
<flexd>
Hold on
samuelj has quit [Ping timeout: 245 seconds]
<Xeago>
flexd: sidekiq is also good
<flexd>
But what I am writing now does not really need to be async on the server, it's going to be at most two clients connected at the same time
alex__c2022 has joined #ruby
psyprus has joined #ruby
<shevy>
Hanmac for my little webframework in ruby, I need cute small icons. any idea where to find nice ones?
<shevy>
I have a hangman... a hanging monkey... some small web icons... hmm
<flexd>
There is going to be a big TV displaying the website with some info, and a client machine displaying the queue and doing adminy things like saying "this has been handled"
main has quit [Ping timeout: 255 seconds]
<flexd>
the dynamic website can happen through hitting the REST service often
Wandering_Glitch has quit [Changing host]
Wandering_Glitch has joined #ruby
<Hanmac>
shevy there is a openclipart2 package for debian & ubuntu
<igor_>
Hey all, is there a way to get unicorn to not refresh app code until forced to reload? As in, it'd be great to do my update in the background while old version is running and then ask it to reload...
casheew has quit [Read error: Connection reset by peer]
<shevy>
people just need to accept common biology. when your DNA has decayed, there is nothing after that
eldariof has quit [Ping timeout: 252 seconds]
<rubyguy>
this is my code, i am trying to compare the number to (1 for now, but later it will be rand(6).
<rubyguy>
it won't every pass true
<rubyguy>
does anyone have an idea?
elux has joined #ruby
jonathanwallace has joined #ruby
<shevy>
rubyguy are you sure you want to use while
main has quit [Max SendQ exceeded]
<rubyguy>
this is just a test piece of code. The while works great
<rubyguy>
the issue that I am having is with the if
<rubyguy>
:(
<flexd>
Damnit I regret having arch linux on my dev box
axl_ has quit [Ping timeout: 244 seconds]
io_syl has quit [Quit: Computer has gone to sleep.]
jonathanwallace has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
<igor_>
aedornm, so what's the option? Cause I want to turn the code caching in environments other than production.
nyuszika7h has joined #ruby
<rubyguy>
shevy: does it make sense to never pass true? I put a 1 in when the cli prompts me to and it still fails
<shevy>
rubyguy yes but this was not so much my question, I wanted to know if it is mandatory for while to be in the code, if not I will use loop {} and show you the first steps
<shevy>
I have no idea
<shevy>
I do not use while() myself and do not want to think about it
<rubyguy>
oh, that is great
<shevy>
my brain is only fit for loop
<rubyguy>
ya
<shevy>
ok
Onii-san has quit [Ping timeout: 245 seconds]
Hanmac has quit [Ping timeout: 245 seconds]
main has joined #ruby
<rubyguy>
it is not required at all
<rubyguy>
teach me oh great wise one
skryking has joined #ruby
<aedornm>
igor_: use "preload_app true" in your unicorn config
<adac>
These are the options for my deamon: http://pastie.org/6117729 NOw I was wondering, where is the log output written to?
dr_bob has quit [Quit: Leaving.]
wallerdev has quit [Client Quit]
mikecmpbll has joined #ruby
<shevy>
mantas322 no, this is really awesome, when you have html pages, those small icons are AWESOME for the eyes
<adac>
/var/log/?
<shevy>
I wonder how rails solves this
<shevy>
when you install rails, do you get icons installed as well?
kpshek has joined #ruby
<aedornm>
igor_: Hmmm.. kind of. It just loads everything into memory before forking really. Then you control Unicorn with signals to quit, or respawn workers with new code.
<shevy>
adac, possibly some file in log_dir
JMcAfreak has quit [Remote host closed the connection]
<shevy>
"/var/log" <--- I guess the ruby script will create some hardcoded filename in that dir?
DrCode has quit [Ping timeout: 276 seconds]
<mantas322>
i dont understand how to ask this, since im not sure if theres like a main class or something
<mantas322>
but if i have a method
<mantas322>
do i need to put it on the bottom?
<shevy>
mantas322 there is the ruby class hierarchy
main has quit [Ping timeout: 260 seconds]
<shevy>
mantas322, ah, well, the order is a bit important
nathancahill has joined #ruby
<mantas322>
what about global variables?
<shevy>
mantas322 In general I would write definitions on top before I try to call them
<shevy>
mantas322 global variables are awful, but they are available everywhere and all the time I think
<adac>
shevy, yeah you are right. I now replaced "/var/log" with "/tmp" and the file it gets written into is called "example_feedbackd_production.output"
<shevy>
mantas322, if you start irb, you can try it:
<shevy>
$foo # => nil
<adac>
so it is a permission issue
<shevy>
you see it is nil, even though you never defined it
<mantas322>
thanks shevy
<shevy>
wheres, if you try foo in irb
<shevy>
you get an error
<shevy>
foo # => NameError: undefined local variable or method `foo' for #<Object:0xb756194c @x="">
<shevy>
btw, I do not know why my irb has @x on startup :\ somehow, my irb startup is totally messy...
<shevy>
adac cool
Gwyxx has joined #ruby
Gwyxx has quit [Remote host closed the connection]
<igor_>
aedornm, thanks for your help! I had a prod-like environment called alpha where I was deploying code and even though unicorn was preload_app, it seemed to constantly refresh my code. Stupidly, I was thinking that it was a unicorn issue, while clearly if "config.cache_classes = false" it wouldn't work :P That's why prod works. Again - obviously :) Anyways. Thanks for helping me figure it out.
KB1ZIB has quit [Quit: Computer has gone to sleep.]
chico_chicote has joined #ruby
Xeago has quit [Remote host closed the connection]
cableray has joined #ruby
d2dchat has joined #ruby
adac has quit [Quit: Leaving]
<mantas322>
How Come in some examples of ruby loops and ".each" I see verbal words like "end" and sometimes I see open and close squiggly brackets " { } "
<mantas322>
Do i have the option of using both?
<hoelzro>
mantas322: it's style
cableray has quit [Client Quit]
<hoelzro>
there's no difference, afaik
<mantas322>
great!
<mantas322>
cause i hate those words
<hoelzro>
(maybe some small precedence rules)
<hoelzro>
do ... end tend to be used for multi line blocks
<mantas322>
much rather visibly see {}
<hoelzro>
{ ... } tends to be used for one liner
<aedornm>
heh, wasn't even thinking about what rails does
<shevy>
mantas322 you could settle for one over the other, but there are differences still, also in syntax
<jacktrick>
hm
<jacktrick>
!help
<shevy>
run_method do
niklasb has quit [Quit: WeeChat 0.4.0]
<shevy>
end
<shevy>
hmm bad example...
<shevy>
run_method :kill_all_cats do
<shevy>
end
<jacktrick>
is there a bot in this channel?
clocKwize has quit [Quit: clocKwize]
niklasb has joined #ruby
<shevy>
mantas322, if you would use {} instead, you would have to use () parens
<shevy>
run_method(:kill_all_cats) {
<shevy>
}
shock_one has joined #ruby
<mantas322>
im okay with that
<shevy>
especially if you want to use a hash
<shock_one>
How do you guys pronounce etc?
<mantas322>
its more C#y
<jacktrick>
et cetera?
<shevy>
mantas322 haha :D I use {} most of the time myself, but only because I like it visually inside a method
<shock_one>
/etc/
<shevy>
def foo
<shevy>
array.each {
<shevy>
}
<shevy>
end
<shevy>
but for DSLs, I think you really have to use the do/end variant
pygmael has quit [Quit: pygmael]
yakko is now known as Yakko
system30101 has quit [Ping timeout: 240 seconds]
<shevy>
mantas322 you used C#?
<shock_one>
[ities]?
<shevy>
[titties]!
<mantas322>
all the time
<mantas322>
c# and java
<shevy>
mantas322 cool
<mantas322>
I've been writing different statistical analysis applications in c#
renanoronfle has joined #ruby
KB1ZIB has joined #ruby
<shock_one>
really, I won't be able to sleep if I don't know that
<mantas322>
then converting them into ruby to incorporate them into a rails site
<shevy>
shock_one "et cetera" I would say
xclite has joined #ruby
<mantas322>
I always say "ExSetera"
dimer has joined #ruby
<shevy>
well I speak german so it is probably different to english, no idea ... but I always freak out when I hear the word "kindergarten" in english :P
<shevy>
or "Eigenclass" ("eigen" means self in german)
<shock_one>
shevy, I mean the directory. Do you say et cereta - hosts?
<shevy>
Eigenfunktion
jim_r0x has joined #ruby
<shevy>
shock_one yeah
<shevy>
well
<shevy>
I can't remember pronouncing it often
<shevy>
but if so, I would loudly proclaim "ET CETERA!"
<mantas322>
whats it mean in german, a garden of kinders?
<shevy>
like an invocation in a summon spell, you know?
hoelzro is now known as hoelzro|away
<shevy>
mantas322, it's where the little kids go to, from age 3 to ~6 or some such, pre-school time
<shevy>
yeah mantas322
<shevy>
kinder = children, garten = garden
<shevy>
though it's not really a garden...
<shevy>
I was just surprised that the english language does not have a word for it, given that you really have SO many words in english where you just don't have a full equivalent in german
rubyguy has quit [Ping timeout: 245 seconds]
aganov has quit [Remote host closed the connection]
<shevy>
ok, back to ruby
bawigga has joined #ruby
BadLarry_ is now known as BadLarry
<jacktrick>
the thing about English is it steals words from all the other languages
renanoronfle has quit [Client Quit]
<shevy>
that is quite awesome, the language changes a lot, german doesn't :( it has to use many english words...
mibitzi has quit [Ping timeout: 264 seconds]
Guest7471 is now known as EvanR
EvanR has quit [Changing host]
EvanR has joined #ruby
aquaranto is now known as aquaranto_______
<shock_one>
well, most of computer-related words are only in english. Try to translate to German eventual consistency.
<shevy>
shock_one yeah that is sooo difficult
aquaranto_______ is now known as aquaranto
<shevy>
I used to have my local pages about ruby in english, but one day I switched to german only. and right now, it is 50% english and 50% german... which sucks :(
<shevy>
I didn't finish rewriting it all yet, it's massive
alup has quit [Read error: Connection reset by peer]
<shevy>
12.000 lines (though half of this is ruby code which does not need to be replaced)
w|t has joined #ruby
<shock_one>
there is a programming language called 1C where keywords are in Russian. It's mind blowing
sweet_kid has quit [Ping timeout: 246 seconds]
<JonnieCa1he>
theres a programming language called php where keywords are in hebrew. its hilarious.
Catbuntu has joined #ruby
breakingthings has joined #ruby
cddr has quit [Ping timeout: 246 seconds]
<JonnieCa1he>
shevy: english for kindergarten is playschool or similar
<JonnieCa1he>
there are a number of words for it
<shock_one>
what are you hinting at? That Jews like dollars?
rubyguy has joined #ruby
w|t has quit [Read error: Connection reset by peer]
<rubyguy>
hey shevy
<mantas322>
lol jonnieca1he
w|t has joined #ruby
w|t has quit [Changing host]
w|t has joined #ruby
<rubyguy>
i don't understand why you need alias e puts in your code
Whoop has quit [Ping timeout: 246 seconds]
<rubyguy>
are you saying that an alias for e is puts?
<JonnieCa1he>
shock_one: no there are literally hebrew keywords in php
sweet_kid has joined #ruby
<rubyguy>
oh
<rubyguy>
yes you are
<rubyguy>
ok
<rubyguy>
well
<rubyguy>
ruby is cool like that, huh?
<rubyguy>
*walks away slowly*
<rubyguy>
*runs*
Whoop has joined #ruby
Whoop has quit [Changing host]
Whoop has joined #ruby
jgrevich has joined #ruby
spider-mario has joined #ruby
<JonnieCa1he>
>> alias :λ :lambda; x = λ {|n| n+1}; x(1)
<eval-in>
JonnieCa1he: Output: "/tmp/execpad-39720f35d80d/source-39720f35d80d:1: invalid multibyte char (US-ASCII)\n/tmp/execpad-39720f35d80d/source-39720f35d80d:1: syntax error, unexpected $end, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END\nalias :\u03BB :lambda; x = \u03BB {|n| n+1}; x(1)\n ^\n" (http://eval.in/9494)
<JonnieCa1he>
fail
<JonnieCa1he>
well that does work in real ruby
<JonnieCa1he>
rubyguy will never come back now :)
axl_ has joined #ruby
<Mon_Ouie>
JonnieCa1he: Does it? Google only shows that they sometimes call the (::) operator in hebrew
<JonnieCa1he>
Mon_Ouie: there are other ones buried in there too, or at least there were. but yes i am saying that there are *some* hebrew keywords in php, not that all of them are
<JonnieCa1he>
and i now realise i have confused constant with keyword
<shock_one>
JonnieCa1he, cool
<rubyguy>
hm...
LiquidInsect has joined #ruby
<rubyguy>
interesting math stuff
<rubyguy>
you got me curious Jonnie
havenn has joined #ruby
<rubyguy>
is that 1 * 1+1?
miso1337 has quit [Quit: unplugging]
willob has joined #ruby
Virunga has joined #ruby
<rubyguy>
so1*2 and 2 so lambda of 2 im gonna check ou t lambda in ruby brb
<shevy>
is there a way to access the content of a block, without yield-evaling it? like so that I get back its content as string?
hmarr has joined #ruby
chrishunt has joined #ruby
Eiam has joined #ruby
<rubyguy>
is '?' part of regex in ruby? or what does it mean? I am trying ot find it but i can't seem to google the appropriate term
<Mon_Ouie>
No, or not really. You can disassemble methods in YARV but that's about it.
<Mon_Ouie>
(methods and procs, that is)
<reactormonk>
shevy, nope.
<shevy>
cool
hmarr has quit [Client Quit]
predator117 has quit [Quit: leaving]
<reactormonk>
shevy, there is some magic that goes for the source_location
<Mon_Ouie>
rubyguy: (something)? means 0 or 1 time (that is, optionally) the pattern 'something'
<shevy>
rubyguy these are special characters inside a / regex: . * + ? ^ $ { } [ ] ( ) \ |
<shevy>
reactormonk cool
<shevy>
I never even have had that idea until today :D
<ale`>
Mon_Ouie: did't work though, i was cheated because I installed my gem before trying it. That script in bin/ requires the library of the same gem, found in lib/, and when I run the rake task it aborts with 'require: cannot load such file -- foo/bar'
<rubyguy>
ok
<rubyguy>
so, nothing or this, got it thanks
xemu has quit [Ping timeout: 246 seconds]
havenwood has quit [Remote host closed the connection]
<reactormonk>
rubyguy, regex is rather ugly to learn, but you gotta do it
<gift>
#regex exists by the way
<Mon_Ouie>
You can set the load path manually
<rubyguy>
i used to know regex
<Hanmac>
shevy source_location does not work for *.so files
<shevy>
rubyguy my brain can handle only simple regexes, with lookbehind or lookahead or whatnot, I have no chance
<Mon_Ouie>
system "ruby", "-Llib", "bin/stuff" for instance
ozgura has quit [Remote host closed the connection]
mafolz has quit [Remote host closed the connection]
tjbiddle has joined #ruby
<rubyguy>
sure you do
<gift>
im trying to figure out how to find 'rare pairs' or collocated words, /(\w+ \w+)/, and the number of occurances of that rare pair. whats a good way to go about that
<shevy>
gift .scan() perhaps?
tjbiddle has quit [Remote host closed the connection]
Pandaen has joined #ruby
<gift>
shevy: the words arent pre defined
<shevy>
hmmmmm do you have an example string
<gift>
the expression i used was just to illustrate the concept
kpshek has joined #ruby
br4ndon has joined #ruby
bashrw has joined #ruby
<gift>
the data i would be examining is about 10G of 1-50M text files
yacks has quit [Remote host closed the connection]
<Mon_Ouie>
Do you mean /(\w+) \1/?
<Mon_Ouie>
(\1 is a backreference to the first capture group)
<gift>
no, not a repeated word
<gift>
a pair of words
<gift>
take this example
tjbiddle has joined #ruby
<heftig>
gift: "foo bar baz".split.each_cons(2) gets you pairs
hmarr has joined #ruby
<gift>
"ab cd, of ab ei at ab cd. with an ae ab cd, use oe"
<gift>
in that string< "ab cd" are my rare pair
adeponte has quit [Remote host closed the connection]
<ale`>
Mon_Ouie: worked nicely (changing -L with -I), thank you very much!
<Mon_Ouie>
Did you try simply keeping a map of pair -> count while keeping track of the smallest one (to avoid reiterating over all of it at the end)?
<heftig>
gift: Hash["ab cd, of ab ei at ab cd. with an ae ab cd, use oe".split.map{|x| x[/\w+/]}.each_cons(2).group_by { |x| x }.map { |k,v| [k,v.count] }]
<heftig>
not very efficient, but it works
havenwood has joined #ruby
timonv has quit [Remote host closed the connection]
mityaz has joined #ruby
jcsims has joined #ruby
maletor has joined #ruby
a_a_g has joined #ruby
lurch_ has quit [Quit: lurch_]
cobragoat has quit [Remote host closed the connection]
bashrw has quit [Quit: bashrw]
etcetera_ has joined #ruby
fadi has joined #ruby
elaptics is now known as elaptics`away
<fadi>
hey guys
<fadi>
can anyone plz help me find channels from asia??
tommyvyo has joined #ruby
etcetera has quit [Read error: Operation timed out]
etcetera_ is now known as etcetera
gregor3005 has joined #ruby
uris has joined #ruby
<shevy>
hmm does ruby have alias_accessor ?
TheMoonMaster has quit [Excess Flood]
bawigga has joined #ruby
<fadi>
shevy
<shevy>
fadi eh no idea, I only came to freenode because of programming
<Hanmac>
shevy not "yet" :P
<fadi>
hmm ok
<shevy>
fadi go to galaxynet, there are many people from Singapore :P
bashrw has joined #ruby
<fadi>
hmm
<shevy>
Hanmac ah? it may be planned?
yacks has joined #ruby
clocKwize has quit [Quit: clocKwize]
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
<fadi>
do u know any channel where there r many ppl from pakistan?
etcetera has quit [Client Quit]
<mantas322>
yay@!
adeponte has joined #ruby
<Hanmac>
shevy hm no but i can write one
<mantas322>
im happy with this ruby app
TheMoonMaster has joined #ruby
chrismcg is now known as zz_chrismcg
<mantas322>
you just have to be careful cause ruby is very fragile
gosshedd has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
<mantas322>
"can't change constants." pffffft
aaronmcadam has joined #ruby
newUser1234 has joined #ruby
dmiller1 has joined #ruby
fadi has left #ruby [#ruby]
samphippen has quit [Quit: Computer has gone to sleep.]
otnld has joined #ruby
gregor3005 has left #ruby [#ruby]
io_syl has joined #ruby
rheoli has joined #ruby
mantas322 has quit [Quit: Page closed]
chrisja has joined #ruby
sn0wb1rd has joined #ruby
bluenemo has quit [Remote host closed the connection]
<Hanmac>
mantas322 you know that you can define objects to constants, but did you know that cou can define constants inside objects? :P
sayan has quit [Read error: Connection reset by peer]
hmarr has quit [Quit: Computer has gone to sleep.]
zigomir has quit [Quit: zigomir]
freakazoid0223 has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
cdt has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
dmiller1 has quit [Ping timeout: 252 seconds]
Hanmac2 has quit [Quit: Leaving.]
<moofy>
question about ruby
<moofy>
trying to set up a server to try out rails
etcetera has joined #ruby
<moofy>
hmm. actually scratch that, i think this is a linux question not a ruby one
<billy_ran_away>
shevy: Thanks for your attention : )
fermion has joined #ruby
<sjk>
Hi! I know I can capture regexp output using .match, but is it also possible to do it similar to how Perl does it, i.e. like: if line =~ /some (.*) regexp/ do puts "Caught #{1}" end or something?
<billy_ran_away>
Mon_Ouie: Can you send me a link where I can learn more about the -> operator?
<Mon_Ouie>
It's just a shortcut for lambda { … }
apok has joined #ruby
<Hanmac>
sjk use $1
<billy_ran_away>
Mon_Ouie: Okay, how would that differ from Proc.new?
hmarr has joined #ruby
<Mon_Ouie>
Proc.new and proc { … } aren't lambda: they don't check the amount of arguments you give to them, and return behaves differently within them
<sjk>
Hanmac, neat! Is that the preferred/ruby way of doing things?
<withnale>
(they are actually sub elements of a hash I'm comparing)
caleb_io has joined #ruby
buibex has joined #ruby
c0rn has joined #ruby
<davidcelis>
withnale: check out Enumerable#chunk, maybe
mattbl has joined #ruby
hbpoison has quit [Ping timeout: 245 seconds]
<Mon_Ouie>
each_cons(2).any? { |x, y| x == y }
Jeaye has joined #ruby
<sjk>
Hanmac, I was just going to ask about named captures! Thanks again
havenwood has quit [Ping timeout: 244 seconds]
<Hanmac>
sjk info: this feature i show you: named capture into variables ONLY works if the regex is a literal ... it does not work with an regex variable
willob has quit [Read error: Connection reset by peer]
Umren has quit [Read error: Connection reset by peer]
etcetera has quit []
hmarr has quit [Quit: Computer has gone to sleep.]
mattbl has quit [Quit: This computer has gone to sleep]
browndawg has left #ruby [#ruby]
hmarr has joined #ruby
elkclone has joined #ruby
<sjk>
Okay, next question. I want my function (get_included_files) to return an array of objects (InputFile), but for some reason the array is lost: https://gist.github.com/4756480
<Eiam>
ugh, I've got this mess of logic https://gist.github.com/anonymous/69c1471306e7170536a2 where you can basically agree or disagree with someones request. My pen & paper tells me I can't get this any shorter than 5 statement checks, or 4 with an else/default fallback.
<Eiam>
Is there a better way than doing these checks?
<sjk>
It works fine if doing the 'inputs.each' block inside of get_included_files
rtdp has joined #ruby
<Eiam>
which is of course shorter than the 12 it is now certainly!
pavilionXP has quit [Read error: Connection reset by peer]
pu22l3r has quit [Remote host closed the connection]
<zastern>
or is there a better alternative for git-ing with ruby
tobor_one has quit [Quit: tobor_one]
rdark has quit [Quit: leaving]
<nate_h>
basically I have a foo = { 'foo' => {:bar => 'baz'}}
<nate_h>
can I just source the file and it will bring in the variables?
<Eiam>
eval ?
ananthakumaran has quit [Quit: Leaving.]
adeponte has joined #ruby
<nate_h>
would it be better to do a require or a load?
<nate_h>
on the filename
icole has joined #ruby
lurch_ has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
decoponio has quit [Quit: Sleeping]
marr has quit [Ping timeout: 255 seconds]
yacks has quit [Read error: Connection reset by peer]
jonahR has joined #ruby
zommi has joined #ruby
_nitti_ has quit [Remote host closed the connection]
skattyadz has joined #ruby
altivec has joined #ruby
gregor3005 has joined #ruby
hybris has quit [Read error: Connection reset by peer]
zerba has quit [Remote host closed the connection]
gregor3005 has left #ruby [#ruby]
__BigO__ has joined #ruby
dmiller1 has joined #ruby
BadLarry is now known as MasterBob
MasterBob is now known as BadLarry
<shevy>
nate_h not a local variable as such
<shevy>
nate_h you could keep it a constant though
<shevy>
FOO = { 'foo' => {:bar => 'baz'}}
maletor has quit [Quit: Computer has gone to sleep.]
<nate_h>
shevy, wait, so if that FOO is foo it won't work with load?
<shevy>
nate_h it is a local variable, it could not work as such
blazes816 has joined #ruby
tylersmith has quit [Quit: tylersmith]
blazes816 has quit [Client Quit]
<nate_h>
shevy the file is actually in that format luckily, but if I did have it as lowercase there is no easy way to load that hash into ruby?
<nate_h>
and have it accessible as a variable
<shevy>
nate_h you could not because it is a local variable. you could use an @ivar, like @foo, then it would work
<shevy>
nate_h you could make it a global variable too like $foo, but this is quite ugly
<shevy>
nate_h another way would be to make it a module, or a class, and use foo() as method, or use a generator on that. or simply an @ivar, that would be the simplest solution I think
dmiller1 has quit [Ping timeout: 276 seconds]
<shevy>
local variables are very limited
<shevy>
def foo
maxmanders has joined #ruby
ferdev|away is now known as ferdev
<shevy>
x = 5
<shevy>
end
<shevy>
x would not be known outside the method foo()
ozgura has joined #ruby
<nate_h>
shevy, hmm. Yeah this file is in global format TEMPLATE = { ... } so i'm fine. i guess i'd need to use a regexp if I wanted to do it and they didn't use variables like that.
<shevy>
nate_h you can try this in IRB btw. create a file 'test.rb', into that file write: @foo = 5, then start irb, and do load 'test.rb', and then @foo and enter
<shevy>
well you could also try to eval() it, but this is too horrible
icole has quit [Remote host closed the connection]
<shevy>
I once evalled stuff like: array1 array2 array3
<shevy>
where the numbers came from
<shevy>
"array#{counter}"
__BigO__ has quit [Remote host closed the connection]
ericmathison has joined #ruby
<shevy>
a better solution would have been to instead store it into an array
octoberry has joined #ruby
Virunga has quit [Remote host closed the connection]
<shevy>
array[5] is not so much different from array5
blaxter has quit [Quit: foo]
<nate_h>
shevy, yea, i'm just thinking of a case where I wouldn't have control over that file.
<nate_h>
shevy and thinking of a solution just for fun :)
maletor has joined #ruby
<shevy>
hmm
the_mentat has quit [Quit: Computer has gone to sleep.]
<shevy>
if you dont have control over the file, and this file gives you no simply way to use itself, then this is a quite bad situation
<shevy>
you could always write a class that loads that file, like via File.readlines() and then makes sense of that info
<shevy>
if all this file does it give you a hash, you could always build that hash by yourself when you parse that file
hbpoison has joined #ruby
skattyadz has quit [Quit: skattyadz]
JohnBat26 has joined #ruby
willob has joined #ruby
<sjk>
I think I've missed some ruby gotcha
<Es0teric>
ok so lets say you have a function and a do... end loop what would you generally use to keep the scope of a variable inside of the function but only outside the do...end loop?
moos3_ has quit [Quit: Computer has gone to sleep.]
sayan has quit [Ping timeout: 244 seconds]
<sjk>
If I iterate through my array of objects with .each and print some member variables it works fine. But if I try to compare variables within the each block, I get 'undefined method `each' for nil:NilClass'
Guest___ has joined #ruby
<nate_h>
shevy, yeah, that is what I was going to do, just practicing my ruby regular expression skills
<havenwood>
Guest24336: mruby is still in development, and not particularly user-friendly yet, but it works :P
a_a_g1 has quit [Quit: Leaving.]
<rubyguy>
herro?
<rubyguy>
:D
<havenwood>
Guest24336: mgem lets you get additional features you need
<havenwood>
rubyguy: You want to do whaaa?
reset has joined #ruby
<rubyguy>
havenwood: i was just wondering if a ruby module is similar to a c# static class
<havenwood>
rubyguy: Compare C# code to Ruby? I dun understand.
<rubyguy>
seems like they are
<havenwood>
rubyguy: Ahh, gotcha. I dunno!
<rubyguy>
they both allow you to run functions without instantiating an object
_justin has joined #ruby
<rubyguy>
havenwood: its all good
<rubyguy>
:D
icantbecool has joined #ruby
<havenwood>
rubyguy: I C# nice? Never used it.
elkclone has quit [Ping timeout: 276 seconds]
<Hanmac>
yeah i think they are similar ... but rubies module has more cool features :P
<Guest24336>
im talking a self executable
<havenwood>
s/I/Is
<havenwood>
Guest24336: Yes. A self-executable. The resulting fizzbuzz is a standalone executable.
carlyle has joined #ruby
<Guest24336>
:O
<Guest24336>
REALLY
<Guest24336>
is this a gem though
jeffreybaird has joined #ruby
<rubyguy>
Hanmac: like? I would be interested in hearing some more features. I have been reading through some tutorials and they seem almost the same (aside from syntax and name).
<Guest24336>
havenwood will thos also packages the dependecies it needs to run
hbpoison has quit [Ping timeout: 240 seconds]
rezzack has joined #ruby
<Hanmac>
rubyguy when you define an instance variable inside the module itself it reacts more cool than a static variable in C#
<havenwood>
Guest24336: Everything. Totally standalone. Matz (creator of Ruby) is working on mruby these days. MRuby is its own implementation of Ruby that comes with a new tool called mrbc that lets you compile to C, etc.
<Guest24336>
:O
<Guest24336>
Alright im'a test it out soon
<Guest24336>
Have u ever used it?
jim_r0x has quit [Remote host closed the connection]
<_justin>
umm.. i was thinking of an idea!!! what if some one write an interface to use gems in php.. :O
<havenwood>
Guest24336: Yeah, I enjoy playing with it. Have a couple of the forks built, but mgem is my new fav way to add stuff in like io, processes, etc.
beardyjay has quit [Ping timeout: 252 seconds]
<Guest24336>
Cool
<havenwood>
Guest24336: I'm putting it to great use... (We needed a self-executable fizzbuzz, right?)
* Hanmac
is still stick at MRI and rubiníus because my C++Gems are awsome! :P
<Guest24336>
I just ran make
<Guest24336>
and there was no errors
gommo has joined #ruby
<Guest24336>
anything else to do?
gommo has quit [Remote host closed the connection]
<gregor3005>
i tried ocra but it did not work for my server application :-(
<havenwood>
Guest24336: On a normal Ruby, install the mgem gem: gem install mgem
<havenwood>
Guest24336: Then mgem can setup custom build scripts for you.
pu22l3r has joined #ruby
<Guest24336>
okay so now what
<Guest24336>
I installed it
<Guest24336>
How do I use it
<_justin>
maybe its stupid idea to interface gems with php.. but wouldn't that be great for a lot of web devs around the world who just knows php
answer_42 has joined #ruby
pavilionXP has joined #ruby
<havenwood>
Guest24336: To install, I just clone mruby, run mgem and select what mgems I want, replace the build_config.rb with what mgem creates for you, and run: ruby ./minirake
<_justin>
is there a way to do that
<Eiam>
sjk: sounds like your inputs is nil at some point?
dougireton has quit [Quit: Leaving.]
jonahR has joined #ruby
<Guest24336>
what is mgem
<Guest24336>
I installed the mgem
<havenwood>
Guest24336: Then you have mruby to run .rb or .mrb files, mirb repl, and mrbc for compiling.
<Guest24336>
so i type in mrbc file.rb
<Eiam>
sjk: ruby-1.9.3-p0 :001 > nil.any?
<Eiam>
NoMethodError: undefined method `any?' for nil:NilClass
<havenwood>
Guest24336: that would compile file.rb to file.mrb (mruby bytecode)
icantbecool has quit [Quit: Computer has gone to sleep.]
<havenwood>
Guest24336: which you can then run: mruby -b file.mrb
<havenwood>
Guest24336: mrbc can also compile to readable C or to a C bytecode array for compiling to standalone executables.
<Guest24336>
But how do I make self executable
ottbot has joined #ruby
<havenwood>
mrbc option flags with mrbc
generalissimo has joined #ruby
ner0x has quit [Ping timeout: 252 seconds]
<Eiam>
sjk: you are welcome to try what spider mario suggested: return if inputs.include?(file) but it should be equivlant and I suspect will tell you undefined method 'include?' for nil:nilclass
<Guest24336>
whats the executable flag
Choobie has quit [Ping timeout: 252 seconds]
<havenwood>
Guest24336: -Cfunction_name_here
<Guest24336>
When I type mruby it says not installed
<havenwood>
Guest24336: mruby/bin/mruby is the binary
<Guest24336>
k
mattbl has quit [Quit: This computer has gone to sleep]
<havenwood>
Guest24336: I've had the best luck with Binary C Code and putting it in my own wrapper. I just wrote a script to automate the process.
havenwood has quit [Remote host closed the connection]
<_justin>
:-/
mahmoudi_ has joined #ruby
<_justin>
sad.. nobody is listening to my idea :(
Mohan has quit [Remote host closed the connection]
<Eiam>
sjk: you could try return if inputs.compact.include?(file)
dougireton has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
mahmoudimus has quit [Ping timeout: 244 seconds]
<Hanmac>
justin no one there likes php
workmad3 has joined #ruby
main has joined #ruby
ferdev is now known as ferdev|away
<_justin>
ah!! sadder.. wouldn't be true if i say most of the people here at the least _used_ to code in php
julian-delphiki has joined #ruby
<_justin>
and php, might not be elegant.. but is not that bad..
<shevy>
_justin you just need to write down your idea on a banner or flag, then have sexy girls run around with t-shirts with that message, and EVERYONE will suddenly be very interested
<shevy>
(or carry the flag)
<shevy>
I did use php for about two years
<shevy>
php has got the web focus right
<Hanmac>
_justin they only do (php) because they get paid for that ... with ruby you can do more cool stuff than with php
Catbuntu has quit [Quit: Auf wiedersehen]
beardyjay has joined #ruby
<shevy>
ruby by all accounts allows you to do the same thing that php does, in less code, clearer code, and simpler intent
Nigel_ is now known as G
adeponte has quit [Remote host closed the connection]
<_justin>
Hanmac i code in php for the same
<shevy>
if we would be able to replace php with ruby, people would be happier AND get paid for writing ruby code
banister_ has quit [Remote host closed the connection]
<shevy>
right now the only job offers I see are "ruby on rails guy wanted"
axl_ has quit [Quit: axl_]
<Hanmac>
_justin i can do hardware accelerated 3Dgames in ruby :P with still goo frame rate :P
<_justin>
+1, its like every one need a ror programmer..
<_justin>
well
jblack has joined #ruby
<_justin>
but ruby>rails
<_justin>
maybe real ruby is behind the shadows of rails..
bean has quit [Ping timeout: 256 seconds]
bean__ is now known as bean
<_justin>
or a lot of non programmers think rails = ruby
<_justin>
which make me sad
<shevy>
_justin the problem also is that defaul ruby only has cgi
<shevy>
and that is no longer sufficient
<Hanmac>
shevy i may miss the libarchive tests today ... but i will have some wxStatusBar stuff to commit (so you can iterate the panes)
<shevy>
Hanmac what kind of tests will you add?
mattbl has joined #ruby
<Hanmac>
shevy i think the first test i will add is: add files into an achive and then read the archive and looks if the entry infos match the file infos
<_justin>
Hanmac 3d accelerated games in rb.. i want to hear more
Choobie has joined #ruby
<Hanmac>
_justin google ogre3d ... its a c++ lib for 3D rendering
<_justin>
this is interesting.. well i need to run.. there is a creepy objective c code that pays me awaiting …
dougireton has quit [Quit: Leaving.]
<mordocai>
I know i'm not supposed to "ask to ask" but is this a good channel to ask questions about ruby c extensions?
<_justin>
i am going to check libogre in detail
<_justin>
mordocai maybe
<_justin>
ask!! you shall be replied
__BigO__ has quit [Remote host closed the connection]
<shevy>
mordocai problem is, only like 5-15% of the people here know C, and of these only half may know something (and most of these may idle at any given moment of time), it is best to ask your problem
mattbl has quit [Ping timeout: 256 seconds]
<shevy>
may know Ruby-C too, that is
<Spooner_>
mordocai, We are probably the best people to ask about C extensions. Doesn't mean we know though.
Nisstyre has joined #ruby
awkwords has joined #ruby
<mordocai>
Alright, give me a second. Going to take a minute to find the best way to verbalize it
jaygen has quit [Remote host closed the connection]
awkwords has left #ruby [#ruby]
bricker`1A has joined #ruby
<Hanmac>
shevy do you want to know a way there you can get how long the ruby is cunning?
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<Hanmac>
hm ok my way is not accurate enuogh ... it shows me when the bash was opened ...
<shevy>
Hanmac yeah
Elhu has joined #ruby
bricker`LA has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
julian-delphiki has quit [Ping timeout: 260 seconds]
renanoronfle has quit [Quit: This computer has gone to sleep]
<mordocai>
Okay, so here is my ruby c extension question: https://gist.github.com/anonymous/4757461 (note: That is not the actual code, but very close to it. Can't post actual code due to this being for work and copyrighted)
<mordocai>
Didn't really put a question there but basically, am I right about what is happening and what can I do about it?
<Hanmac>
mordocai you could p USER between login and cmd so you could look if the ruby value itself changes
<mordocai>
Hanmac: Not sure how to pick up \0 in that though. Puts won't show it... i don't think inspect will either
__BigO__ has quit [Remote host closed the connection]
hashmal has joined #ruby
gyre007 has joined #ruby
<Hanmac>
test it
__BigO__ has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
pen has quit [Remote host closed the connection]
caleb_io has quit [Quit: caleb_io]
razibog has quit [Ping timeout: 260 seconds]
bubblehead has joined #ruby
bemathis has quit [Quit: bemathis]
<icantbecool>
Has anyone gotten rbenv and ruby 2.0 rc2 working properly?
<mordocai>
Hanmac: Well that is strange... It is saying that the value of USER has been set to the return value of the login function (Which happens to be "Logged in\000" so does contain a null byte). However, I'm returning rb_str_new2("Logged in");
<Hanmac>
hm
goganchic has quit [Quit: Computer has gone to sleep.]
<mordocai>
Hanmac: Yeah, even if it didn't we still have the problem that for some reason USER is getting set to that value... and it shouldn't be. Strange as hell, only place i have that string is in the line with return.
<Hanmac>
io need to investigate, but i will do it tomorrow
ferdev|away is now known as ferdev
lancepantz is now known as lancepantz_
maxmanders has quit [Ping timeout: 252 seconds]
whowantstolivef1 has joined #ruby
Azure is now known as __END__
adeponte has quit [Remote host closed the connection]
__END__ is now known as notazure
notazure is now known as Azure
Shadow_S has joined #ruby
tommyvyo has joined #ruby
chico_chicote has quit [Remote host closed the connection]
angusiguess has joined #ruby
adeponte has joined #ruby
havenwood has joined #ruby
Criztian has quit [Read error: Connection reset by peer]
Criztian_ has joined #ruby
baphled has joined #ruby
dmiller1 has quit [Ping timeout: 252 seconds]
<gregor3005>
hi have the following problem. i wrote a ruby server tool that should run in background on a windows machine. i converted ruby to exe. all works for now. but now i need to bring the server to background. does anybody know how i can do this? "start /b server.exe" did not help. it brings up a console window
banisterfiend has joined #ruby
cparen has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Client Quit]
jfl0wers has quit [Quit: jfl0wers]
eldariof has quit []
mityaz has quit [Quit: See ya!]
c0rn has quit [Ping timeout: 245 seconds]
maxmanders has joined #ruby
justsee has quit [Quit: Leaving...]
<gregor3005>
found it
<gregor3005>
i have to add the option"--windows" to ocra :-)
jaygen has joined #ruby
c0rn has joined #ruby
cparen has quit [Ping timeout: 276 seconds]
dougireton has joined #ruby
dallasm has joined #ruby
lancepantz_ is now known as lancepantz
generalissimo has quit [Remote host closed the connection]
undersc0re97 has joined #ruby
banisterfiend has quit [Ping timeout: 245 seconds]
asdfqwer has quit []
jblack has quit [Remote host closed the connection]
reset has quit [Quit: Leaving...]
jblack has joined #ruby
adambeynon has joined #ruby
geekbri has quit [Remote host closed the connection]
chico_chicote has joined #ruby
elaptics`away is now known as elaptics
Al___ has joined #ruby
ryannielson has quit [Quit: ryannielson]
jodok has joined #ruby
evenix has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
ukd1 has joined #ruby
evenix has joined #ruby
mattbl has joined #ruby
<jodok>
hi i'm trying to get a value from (i suspect) a ruby "config" file: https://gist.github.com/jodok/4757656 - in bash… is there an easy way to parse the file and output the value of output -> elasticsearch_http?
<techhelp>
May be a wrong borad for my question. Basically I am trying to pass an array to a puppet template function that expects 'a','b','c'?. instead of the array ['a','b',''c'?..]
codecop has quit [Remote host closed the connection]
Mon_Ouie has quit [Quit: WeeChat 0.4.0]
jblack_ has joined #ruby
bubblehead has quit [Remote host closed the connection]
cparen has quit [Ping timeout: 245 seconds]
joofsh has quit [Read error: Connection reset by peer]
<_justin>
techhelp: to rephrase your qn, you want elements of an array to be argument of a fn?
<havenwood>
techhelp: put a splat (*) in front of the Array.
pdamer has quit [Quit: pdamer]
etcetera has quit [Read error: Operation timed out]
etcetera has joined #ruby
Elhu has joined #ruby
dallasm has quit [Remote host closed the connection]
<havenwood>
techhelp: Do you want 'abc'? Or something like?: def second(first, second, third); second; end; #THIS IS THE PART TO LOOK AT:; array = [1, 2, 3]; second(*array); #=> 2
<techhelp>
exactly my question
<havenwood>
techhelp: repasted, sry ignore first sentence :P
<mr-rich>
using savon ... good package ... it's what the service is returning that sucks ... If it's only one entry, it returns it as a hash ... multiple, it returns it as an array (of hashes) ...
billiam has joined #ruby
<mr-rich>
screwing up my .each loop ...
angusiguess has quit [Ping timeout: 255 seconds]
LouisRoR has quit [Ping timeout: 248 seconds]
<theRoUS>
why would 'gem install' say it couldn't find a gem, but then list it as a possibility? http://pastie.org/6120814
<theRoUS>
the gem in question was built under ruby 1.9, and the geminabox server is ruby 1.8.7, if that'd make any difference
jpfuentes2 has quit [Ping timeout: 245 seconds]
<theRoUS>
i can install the gem from a local file just fine.
hmarr has quit [Quit: Computer has gone to sleep.]
waxjar is now known as qya
geggam has joined #ruby
qya is now known as waxjar
emergion has quit [Quit: Computer has gone to sleep.]
jaygen has quit [Remote host closed the connection]
<Kuifje>
where would one place calculations that must be made? in the model or in the controller?
<geggam>
so... call me stupid or whatever but when i run gem install esx and then i get an error cannot load such file -- lib/esx.rb is there something i need to do to make ruby find that gem ?
elux has quit [Quit: Leaving...]
hmarr has joined #ruby
<banister`movie>
geggam: how did you require the gem?
panchisco has joined #ruby
etank has quit [Quit: WeeChat 0.4.0]
<geggam>
require 'lib/esx.rb'
<theRoUS>
mr-rich: [ *return-from-soap ].each ?
<banister`movie>
geggam: and why did u do that?
<banister`movie>
geggam: the normal way is: reqire 'esx'
<banister`movie>
require
tenmilestereo has quit [Quit: Leaving]
<geggam>
i didnt... i copied the example so i can see if i like doing ruby better than perl
<geggam>
call me ruby newb
cisco has left #ruby [#ruby]
<geggam>
and thanks banister`movie
<aedornm>
theRoUS: think that will make the Hash turn itself into an array of arrays
lancepantz_ is now known as lancepantz
invisime has quit [Quit: Leaving.]
kofno has quit [Remote host closed the connection]
<geggam>
syntax for ruby and vmware seems to be much simpler... this might be fun
<aedornm>
[soap-data].flatten.each
<theRoUS>
messy
<theRoUS>
aedornm: make that .flatten(1) i suspect..
mattbl has joined #ruby
* theRoUS
is always suspicious of SOAP returns, even/especially when converted to native types
arturaz has quit [Remote host closed the connection]
baba has joined #ruby
EPIK has joined #ruby
<aedornm>
should be an array of hashes, so I would hope it would not matter. That'd be rather terrible if it was an array of hashes and sometimes other arrays!
megha has quit [Ping timeout: 260 seconds]
<havenwood>
_justin: Just watched the Bananas talk you mentioned. I like the quote, "A couple commits more, and the JVM will turn into SkyNet and kill you all."
wyhaines has quit [Read error: No route to host]
humans63 has joined #ruby
_nitti has quit [Remote host closed the connection]
<havenwood>
aedornm: Vicent Martí - Ruby is unlike a Banana
reset has quit [Quit: Leaving...]
<aedornm>
intriguing
samuel02 has quit [Remote host closed the connection]
wyhaines has joined #ruby
emergion has joined #ruby
s__dana has quit [Ping timeout: 252 seconds]
wedgeV_ has joined #ruby
bradleyprice has quit [Remote host closed the connection]
banseljaj is now known as imami|afk
<billy_ran_away>
What the hell?!?! xml.xpath("./#{xml.xpath("./*").first.name}") #=> []
one has quit [Ping timeout: 264 seconds]
octarine has quit [Ping timeout: 252 seconds]
<billy_ran_away>
xml.xpath("./*").first.name #=> info
wedgeV has quit [Ping timeout: 252 seconds]
ottbot has quit [Ping timeout: 245 seconds]
Bracki has quit [Ping timeout: 252 seconds]
BrianJ has quit [Ping timeout: 252 seconds]
baphled has quit [Read error: Operation timed out]
one has joined #ruby
emergion has quit [Ping timeout: 264 seconds]
poga has joined #ruby
dmiller1 has joined #ruby
_br_ has quit [Excess Flood]
artOfWar has joined #ruby
Bracki has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
apok has quit [Quit: apok]
poga has quit [Remote host closed the connection]
one has quit [Client Quit]
schickung has joined #ruby
Al___ has quit [Quit: Al___]
breakingthings has quit []
_br_ has joined #ruby
zastern has quit [Remote host closed the connection]
mando has quit [Remote host closed the connection]
willob has quit [Quit: Leaving.]
workmad3 has joined #ruby
dmiller1 has quit [Ping timeout: 248 seconds]
toekutr has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
_br_ has quit [Excess Flood]
carraroj has quit [Quit: Konversation terminated!]
alanp has quit [Read error: Connection reset by peer]
alanp has joined #ruby
blf has joined #ruby
jjbohn has quit [Quit: Leaving...]
<Amnesia>
question, say you've got "if ... elsif ...", and the if statement is true, is there some way to go to the elsif block from the if block?
kristofers has quit []
_br_ has joined #ruby
toekutr has joined #ruby
jpfuentes2 has quit [Read error: Connection reset by peer]
ngoldman has joined #ruby
<geggam>
banister`movie, et al is there a way to run a ruby script where you see step by step debug
<geggam>
like bash -x performs for shell ?
seba4 has quit [Ping timeout: 256 seconds]
samphippen has joined #ruby
emocakes has joined #ruby
<heftig>
Amnesia: no.
<Amnesia>
heftig: ok ty
nomenkun has quit [Remote host closed the connection]
error404 has quit [Ping timeout: 260 seconds]
carlyle has quit [Remote host closed the connection]
ner0x has joined #ruby
toekutr has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
jerius has joined #ruby
recycle has quit [Remote host closed the connection]
<banister`movie>
geggam: check out debugger and pry-debugger
kpshek has quit []
<graft>
how can i recursively index a hash with an array? Like, if i have x = { :A => { :B => { :C => :blorp } } }, how can I get x[:A][:B][:C] using [ :A, :B, :C ]?
jonahR has joined #ruby
<graft>
there's probably some way with each_with_object, but i still suck at using that
cableray has joined #ruby
<Mon_Ouie>
inject(x, &:[])
<Mon_Ouie>
which is just a shortcut for inject(x) { |hash, key| hash[key] }
piotr__ has joined #ruby
piotr_ has quit [Ping timeout: 246 seconds]
DaltonUS has quit [Quit: DaltonUS]
mcqueenorama has joined #ruby
mahmoudi_ is now known as mahmoudimus
jekotia has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
jonahR has quit [Client Quit]
skattyadz has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
dustint has quit [Ping timeout: 255 seconds]
mercwithamouth has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
dougireton has quit [Quit: Leaving.]
kpshek has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
seba4 has joined #ruby
mahmoudi_ has joined #ruby
gyre007 has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
ryanf has joined #ruby
bashrw has quit [Quit: bashrw]
Myconix has quit [Ping timeout: 246 seconds]
hadees has quit [Read error: Connection reset by peer]
hadees has joined #ruby
mahmoudimus has quit [Ping timeout: 255 seconds]
jim_r0x has joined #ruby
<graft>
ah, i also suck at using inject
bricker_ is now known as bricker
<graft>
thank you, that's perfect. reading up on inject...
motto has joined #ruby
__BigO__ has joined #ruby
motto has quit [Read error: Connection reset by peer]
m8 has quit [Quit: Sto andando via]
kenneth has quit [Ping timeout: 245 seconds]
elico has quit [Quit: elico]
Xeago has quit [Remote host closed the connection]
pavilionXP has quit [Read error: Connection reset by peer]
mattbl has quit [Quit: This computer has gone to sleep]
lurch_ has quit [Quit: lurch_]
Criztian_ has quit [Remote host closed the connection]
etcetera has joined #ruby
schickung_ has joined #ruby
<mordocai>
Hanmac: Btw, I figured out my earlier problem. I was (without thinking about it) freeing all my pointers, and since ruby was actually sending me the underlying pointer for the strings, I was freeing those before the execution returned to ruby.
<mordocai>
Causing weird stuff to happen, for obvious reasons :)
nari has joined #ruby
bradleyprice has joined #ruby
__BigO__ has quit [Remote host closed the connection]
fir_ed has joined #ruby
danielpcox has quit [Ping timeout: 255 seconds]
dougireton has joined #ruby
dougireton has quit [Client Quit]
schickung_ has quit [Client Quit]
tcsc has quit [Quit: bye!]
schickung has quit [Ping timeout: 252 seconds]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
jim_r0x has quit [Ping timeout: 256 seconds]
nfk has joined #ruby
frem has quit [Ping timeout: 252 seconds]
gaahrdner has quit [Remote host closed the connection]
hmarr has quit [Read error: Operation timed out]
johnpcamara has quit [Quit: johnpcamara]
dougireton has joined #ruby
schickung has joined #ruby
dougireton has quit [Client Quit]
mattbl has joined #ruby
jerius has quit []
punkrawkR has quit [Read error: Connection reset by peer]