<sam113101>
it's only a serializer/deserializer though
ewnd9 has quit [Ping timeout: 256 seconds]
<havenwood>
sam113101: what do you need to do beyond serialization?
<havenwood>
sam113101: it's just a serialization format, no?
<sam113101>
havenwood: make calls to an amf gateway, with http requests
pweems has quit [Ping timeout: 256 seconds]
rcosta has quit [Remote host closed the connection]
<havenwood>
sam113101: Make the HTTP call with a mature Ruby HTTP client and just serialize with the odd-format gem?
ryandeussing has joined #ruby
MileyCyrus has quit [Quit: Me'n vaig]
<havenwood>
sam113101: Maybe I'm missing something, never used this serialization format. But I'd just pair HTTPClient or Mechanize (or pick your poison) with the serializer/deserializer.
brandon has quit [Ping timeout: 264 seconds]
Rym has quit [Ping timeout: 256 seconds]
rcosta has joined #ruby
mlpinit has quit [Remote host closed the connection]
snovak has joined #ruby
<sam113101>
it's a bit more complicated than that though, I need to write the name of the function being called, and other stuff I don't know about (I'd need to read the specs, I took a quick look and it looked quite complex)
<havenwood>
sam113101: Ah, i see. Well, it may not be as simple as I supposed. In any case, here's an excellent grid comparison of hTTP clients: http://bit.ly/RubyHTTPClients
eoinkelly has quit [Quit: eoinkelly]
<havenwood>
Ruby HTTP clients**
<sam113101>
alright
buibex has quit [Read error: Connection reset by peer]
ryandeussing has quit [Ping timeout: 264 seconds]
jamesaanderson has quit [Ping timeout: 245 seconds]
saarinen has quit [Quit: saarinen]
snovak has quit [Ping timeout: 256 seconds]
mansi has joined #ruby
<goleldar>
i have an array of hashes what is the easiest way to merge all of the keys from all the hashes?
saarinen has joined #ruby
mlpinit has joined #ruby
cabellicar123 has joined #ruby
<sam113101>
I hoped for someone to come out of the crowd and shout "hey, I did write an amf client years ago, here's the code!", but I guess I'll have to write it myself ;_;
<scottstamp>
Yeah that's a pretty good use-case Hanmac.
<xybre>
That's not a "use case" thats just being mean.
<scottstamp>
That's a neat little interpreter bot!
<Hanmac>
i not recommend "for", i only tell that its possible
<scottstamp>
I could see it making sense in a lookup table scenario.
<xybre>
scottstamp: Not really, anything yo ucan do with for, you can do with each, better.
kofno has quit [Ping timeout: 245 seconds]
<xybre>
Okay, so your code looks right, in the pastie.
<scottstamp>
That's what I thought.
<scottstamp>
It's looping an array of JsonObjects.
<scottstamp>
Or should be.
<xybre>
Yeah, I've had to do a lot of similar stuff with API results, so I recognize the pattern.
<scottstamp>
And I've confirmed it is getting the variables.
<scottstamp>
I'm screwing with a new music site, once I nail out a little library I'm gonna send it to them and see if they'd like some help on security.
<xybre>
Whats wrong with the output?
<scottstamp>
All I get is #<Enumerator:{identifier}
<scottstamp>
You want the class it's depending on to test?
apeiros has joined #ruby
lkba has joined #ruby
<xybre>
Thats the output to stdout?
Guest68570 is now known as martxel
<scottstamp>
I'm using RubyMine so it's actually telling me stdout and stderr.
martxel has quit [Changing host]
martxel has joined #ruby
<scottstamp>
I'm not sure which.
<xybre>
There's not really any possible way to get that output from that code :/
mrsolo has joined #ruby
<scottstamp>
I'll just upload it, one sec.
<xybre>
Can you run it fro mthe commandline?
<scottstamp>
I could try, but RubyMine hasn't screwed up like this before on me.
<scottstamp>
I'm gonna go have a smoke for a few. Brb.
<xybre>
scottstamp: Ah, that means you thought you were dealing with a Hash at some point, but it was actually an Array.
mrsolo has quit [Client Quit]
razi has joined #ruby
ericmathison has joined #ruby
MrZYX|off is now known as MrZYX
<xybre>
scottstamp: The best strategy here is to take it one line at a time, one basic statement per line, so when things blow up you can see what line they are happening on.
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
dankest has quit [Quit: dankest]
<xybre>
Ruby is pretty terse and you can do a lot on one line, and thats really powerful. But sometimes when debugging its best to break them up at first.
relix has joined #ruby
ericmathison has quit [Quit: leaving]
mansi has joined #ruby
ryandeussing has joined #ruby
<scottstamp>
Oh crap! It isn't valid JSON. O_O
n1x has quit [Ping timeout: 264 seconds]
<xybre>
>.<
<scottstamp>
No not what I posted, JSONLint said that was all good. But now it's failing on an int to str conversion. Urgh! Stupid API.
<scottstamp>
God damn it I'm too stoned to be working with mulidimensional arrays right now. LOL. Thanks for the tip, I'll check it out, but I found my problem.
antulik has joined #ruby
antulik has quit [Client Quit]
ryandeussing has quit [Ping timeout: 240 seconds]
<scottstamp>
PrettyPrint and inspect helped.
mansi has quit [Ping timeout: 256 seconds]
antulik has joined #ruby
decoponio has joined #ruby
<xybre>
Its okay, I slept two hours last night and I've been up for 20 hours.
<scottstamp>
Well it's 6am here, so I can attest to that group. :P
<xybre>
Also, my math might be bad because I gave up doing base 12 math.
<scottstamp>
For some reason #{song['artist']['name']} isn't valid.
<scottstamp>
Haha, I learned it when I was little, toying with RAM, so I grew up in school as the base nerd.
maligree has quit [Quit: I've had it with you.]
<scottstamp>
I knew base tables better than multiplication tables.
AndChat| has joined #ruby
browndawg has quit [Ping timeout: 245 seconds]
lkba has quit [Read error: Connection reset by peer]
mrmist is now known as mist
<xybre>
I seriously think I'm lacking the part of my brain that deals with time.
Matriks has quit [Remote host closed the connection]
<xybre>
Yet, when my alarm is broken, off, out of battery, etc.. I almost always wake up, early. Like how the hell does my brain know??
<apeiros>
curious, why aren't you a fan anymore pontiki?
<pontiki>
i think the quality of many of their books has dropped considerably. they used to be my go-to for tech books, but i've been disappointed more lately
obs has quit [Quit: Konversation terminated!]
antulik is now known as antulik-afk
mansi has joined #ruby
Xaitec has joined #ruby
<pontiki>
the better books from them are actually the smaller ones, it seems
<pontiki>
i'm still a huge fan of their nutshell series
<pontiki>
not so much the head first series, but then i'm probably the wrong demographic for those
Xaitec has quit [Remote host closed the connection]
antulik-afk is now known as antulik
antulik_ has joined #ruby
hiroyuki has joined #ruby
<pontiki>
i have been liking the things coming from pragprog more, and some of the manning "at work" series are giving me more of what i want
fgo has quit [Ping timeout: 246 seconds]
antulik is now known as antulik-afk
antulik-afk is now known as antulik
<sevenseacat>
pragprog books are good. addison-wesley also does some nice ruby books.
lyanchih has joined #ruby
<pontiki>
apeiros: i guess maybe it's just that o'reilly had a very consistent style and delivery that seems to have been lost of late
mansi has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<pontiki>
sevenseacat: a-w's ruby books are excellent
Xeago has joined #ruby
lyanchih has quit [Client Quit]
samuel02 has joined #ruby
Burer has quit [Ping timeout: 245 seconds]
<pontiki>
they have some really powerful authors in that series
Xeago has quit [Read error: Connection reset by peer]
Xeago has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
Xeago has joined #ruby
atno has quit [Read error: Operation timed out]
antulik-afk is now known as antulik
yfeldblum has joined #ruby
antulik is now known as antulik-afk
snovak has joined #ruby
teddyp1cker has joined #ruby
alem0lars has joined #ruby
antulik-afk is now known as antulik
antulik is now known as antulik-afk
antulik-afk is now known as antulik
snovak has quit [Ping timeout: 245 seconds]
ndrei has quit [Ping timeout: 256 seconds]
antulik is now known as antulik-afk
mengu has quit [Quit: This computer has gone to sleep]
snath has quit [Ping timeout: 260 seconds]
antulik-afk is now known as antulik
ndrei has joined #ruby
eka has joined #ruby
atno has joined #ruby
stayarrr has joined #ruby
antulik_ has quit []
antulik is now known as antulik-afk
antulik has joined #ruby
antulik has quit [Client Quit]
antulik-afk is now known as antulik-afk_
r0bglees0n has quit [Ping timeout: 245 seconds]
antulik-afk_ is now known as antulik
antulik is now known as antulik-afk
antulik-afk is now known as antulik
viszu has joined #ruby
stonevil has quit [Remote host closed the connection]
elementz has joined #ruby
<shevy>
man
<shevy>
C and C++ will hate me
<elementz>
hi all. i am trying to figure out how to safely store a password on disk/in a database without storing the password itself. A requirement is to be able to recover the password since it is needed to be transferred over the wire occasionally (no other means available, e.g. keyfile or similar). i have been looking into rubys bcrypt library, but that only provides a means to hash a password and thus it does not provide a way to recover the actual passwo
banisterfiend has joined #ruby
<elementz>
is there anything else i could use which allows for the safe storage and recovery of a password stringß
Deele has joined #ruby
<sevenseacat>
if you want to be able to recover a password, you arent safely storing it
<elementz>
sevenseacat: ok. so what i need to do is impossible...
<elementz>
... at least without questionable security...right?
Burer has joined #ruby
<pskosinski>
is user interaction required?
<pskosinski>
hm, nvm
cdelo has joined #ruby
blackmesa has joined #ruby
Drewch has joined #ruby
<bluebie>
You can encrypt a password
<bluebie>
it's fine
<pskosinski>
but then he can store key/pass for decrypting…
<bluebie>
hashing is great for web servers, because it means someone breaking in to your server can't get as much useful data, so they are less motivated to do it..
aryaching has joined #ruby
<pskosinski>
he must to *
<bluebie>
Yep
<bluebie>
You can do fun stuff there, like use asymetric encryption
marek_ has joined #ruby
<bluebie>
if the thing which reads the passwords only runs occasionally, you can collect passwords and encrypt them using your public key, then when you need to use them, login and download the encrypted file to another machine which you use the private key on, or load the private key in to the remote machine's memory (over ssh for instance) and ask it to do whatever processing it needs to, and when it's done you overwrite that section of memory with random by
<elementz>
bluebie: pskosinski ok, i will look into it
<bluebie>
it really depends a lot on what sort of thing you're trying to do
<bluebie>
what sort of threats you're concerned about
<bluebie>
it's worth noting that RSA and other present day asymetric encryption techniques depend heavily on mathmatical problems not being solved yet, and some are under threat from quantum computing. These threats affect asymetric encryption only, so tools like AES128 should still be quite safe in to the forseeable future, where RSA is likely to become compramised eventually, even at high key sizes
sailias has joined #ruby
Hanmac1 has quit [Ping timeout: 248 seconds]
<bluebie>
so just keep that in mind, that the asymetric crypto you implement today may need to be replaced with a different algorithm in five or ten years time, when computing has advanced further. The upside is this is a very serious problem many cryptographers are working on, and there are some neat ideas for ways to design new crypto systems which are resillient to quantum computing
agjacome has quit [Quit: leaving]
fgo has joined #ruby
RubyRookie has joined #ruby
<bluebie>
Post-quantum cryptography is the term to search for if you're interested in finding out more about new algorithms that resist theoretical quantum computer attacks
marek_ has quit [Ping timeout: 245 seconds]
mansi has joined #ruby
aryaching has quit [Ping timeout: 241 seconds]
antulik is now known as antulik-afk
cody-- has quit [Quit: Computer has gone to sleep.]
pr0ggie has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
colonolGron has quit [Quit: Lost terminal]
marek_ has joined #ruby
lyanchih has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
aryaching has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
mansi has quit [Ping timeout: 245 seconds]
RubyRookie has quit [Remote host closed the connection]
Burer has quit [Ping timeout: 245 seconds]
fridim_ has joined #ruby
IceDragon has joined #ruby
Burer has joined #ruby
<elementz>
bluebie: thank you for your insight :)
<bluebie>
no worries ^_^
elementz has quit [Quit: leaving]
scarolan has quit [Ping timeout: 245 seconds]
IceDragon has quit [Ping timeout: 246 seconds]
scarolan has joined #ruby
snovak has joined #ruby
optimusprimem has joined #ruby
lukec has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
QKO has quit [Ping timeout: 268 seconds]
IceDragon has joined #ruby
QKO has joined #ruby
optimusprimem has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
optimusprimem has joined #ruby
snovak has quit [Ping timeout: 268 seconds]
Burer has quit [Changing host]
Burer has joined #ruby
jmeeuwen has joined #ruby
sethetter has joined #ruby
yacks has joined #ruby
io_syl has quit [Quit: io_syl]
io_syl has joined #ruby
snath has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
ryandeussing has joined #ruby
freakfantom has joined #ruby
shouya1 has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
shouya has quit [Ping timeout: 245 seconds]
freeayu has quit [Quit: 离开]
freakfantom has quit [Client Quit]
aryaching has joined #ruby
Neomex has quit [Quit: Neomex]
ryandeussing has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
sr78ger has joined #ruby
Xaitec has joined #ruby
darksoox has quit [Ping timeout: 245 seconds]
devoldmx has joined #ruby
Drewch has quit [Remote host closed the connection]
Drewch has joined #ruby
antulik-afk is now known as antulik
devoldmx3 has quit [Ping timeout: 264 seconds]
snath has quit [Ping timeout: 245 seconds]
hamed_r has quit [Quit: Ex-Chat]
klrr_ has joined #ruby
lucazi has quit [Remote host closed the connection]
lucazi has joined #ruby
girija has joined #ruby
<klrr_>
(note, im new to programming, this is not a "troll" of anykind so if it's a stupid question sry) what is the advantages with 1. a intepreted language 2. a dynamic type system (or whatever its called :P) ?
<bluebie>
"interpreted language" has become a bit of a legacy term
druznek has joined #ruby
<klrr_>
bluebie: how you mean?
<Xeago>
a lot of languages are 'interpreted'
<bluebie>
languages like ruby, javascript, python, do undergo some amount of compilation, but that compilation happens when you start the program, or even during the program's execution, and some 'interpreters' like google's javascript interpreter "v8" recompiles the program in different ways as it observes how the program is running
<klrr_>
intepreted is an implementation feature right?
<Xeago>
and it nolonger has the 'negative'/'positive' traits to it
<Xeago>
klrr_: not neccesarily
<Xeago>
(nowadays)
<Xeago>
it used to be
<klrr_>
well, compiled code and intepreted code must have advantages and disadvantes?
<bluebie>
the difference is mainly that a compiler takes some source code (be it c, ruby, or something else) and outputs machine code that a hardware computer chip can run directly
<Xeago>
the earlier compile the less stuff you need on the target machine
<bluebie>
but an interpreter runs concurrently with the program, converting it in to machine code as it goes, or something like that
bklane has joined #ruby
<klrr_>
or a VM can run
<klrr_>
yeah i know
<Xeago>
if you compile it to machine code right away, all you need is a compatible machine
<bluebie>
interpretted code can be faster than compiled code in some situations now. interpreters are getting really really good
t0rc has joined #ruby
wallerdev has quit [Quit: wallerdev]
<klrr_>
i know what a intepreted language *is*, but i wonder if it got any advanteges, ive heard that some lisp languages allow you to write and change code while the program is running for example
<Xeago>
if you instead interpret it and let it compile 'on the fly'/'just in time' you need an interpreter on your target machine
<Xeago>
klrr_: that is possible in C too
<bluebie>
we'll always need compilers to build things like system kernels, but there may come a day when it makes more sense for a lot of applications to run in modern interpreters
<klrr_>
well
<Xeago>
See world of warcraft, they do it in c++
<klrr_>
now to my second question, is there any advantages to dynamic typing?
<Xeago>
what would you consider advantageous?
<klrr_>
Xeago: they do? cool!
<bluebie>
ruby doesn't allow you to edit the abstract syntax tree while it's running
<Xeago>
developer time?
<klrr_>
"advantageous" i dont know what that mean
<bluebie>
you can sort of do it, using some libraries like the old parsetree extension
<bluebie>
but it's not a nice experience
<bluebie>
dynamic typing versus strict typing seems to mainly be a matter of personal preference
Tarential has quit [Excess Flood]
<klrr_>
i didnt ask if ruby could do what i suggested, i was just asking if there are any direct wins compareed to static typing
<Xeago>
there are downsides to dynamic typing, or implicit typing
gyre007 has joined #ruby
io_syl has quit [Quit: io_syl]
<Xeago>
proof of correctness is harder
<klrr_>
matter of personal taste? or you mean matter of what kind of development?
<bluebie>
some people prefer to write down what type they expect each variable to hold, and have the computer verify that is the case in exchange for the extra work of typing it all out
Tarential has joined #ruby
<apeiros>
klrr_: it enables duck-typing
<klrr_>
duck typing?
<klrr_>
have to google that sry :P
<apeiros>
"I don't care what you ARE, I care what you can DO"
* Xeago
off
Xeago has quit [Remote host closed the connection]
wallerdev has joined #ruby
<klrr_>
just a sec gonna see wikipedia page on duck typing
<klrr_>
oh it's some kind of OOP feature?
<apeiros>
no
<apeiros>
i'ts some kind of message-based + dynamic typed OOP
kofno has quit [Remote host closed the connection]
<apeiros>
+feature
<bluebie>
some languages can do both, like objective c has an 'id' type which is dynamic, but usually developers use static types, just as a compile-time sanity check, and to help optimisation, because objective c is usually compiled, not interpreted, and it is more difficult to optimise code for speed which is both dynamic and totally precompiled
blackmesa has joined #ruby
<bluebie>
interpreters can watch a program, as google's V8 does, and see what types it is actually storing in variables, optimise around that (live patching the JIT compiled machine code while it runs!!) and setup exception handlers so if those assumptions prove incorrect it falls back to less efficient versions
<klrr_>
so the big difference between static and dynamic typing is that static checks the types before running the program (or compiling) while dynamic typing you need to do test your program to discover type errors?
<apeiros>
klrr_: I think that much you can learn from wikipedia too ;-p
<bluebie>
more or less, that's the jist of it
<bluebie>
a lot of languages historically have typing for optimisation purposes though
obs has joined #ruby
<apeiros>
yes, the big difference is that you don't determine the type of a variable.
antulik is now known as antulik-afk
<klrr_>
okey, then why does ruby and python and company use dynamic typing?
<klrr_>
isnt that a dissadvantage?
<apeiros>
I think I already answered that question
<bluebie>
Macromedia (now Adobe) added static typing to ActionScript so they could more easily do optimisations, because actionscript is compiled to a virtual machine at build time, not interpreted in a way which would make runtime type optimisation straight forward
<apeiros>
and no. it has downsides and upsides. it's a tradeoff, as many design choices are.
tvw has joined #ruby
bklane has quit [Remote host closed the connection]
<klrr_>
so what is the direct advantages?
linduxed has quit [Quit: WeeChat 0.3.9.2]
<klrr_>
of dynamic typing
<klrr_>
is it duck typing?
<apeiros>
klrr_: if you don't care to read what I write, why should I repeat myself?
<bluebie>
klrr_: why don't you read the web?
<bluebie>
there is plenty of information on the merits of type systems
<klrr_>
apeiros: i did not understand what you said sry
<klrr_>
bluebie: cause i think it's more appropiate to ask programmers who actually use dynamic typing instead of reading FUD online, i only found hateful stuff when i searched about static vs dynamic typing
nari_ has quit [Ping timeout: 268 seconds]
<klrr_>
16:26 < apeiros> i'ts some kind of message-based + dynamic typed OOP
<klrr_>
i dont understand what that is
jaimef has quit [Excess Flood]
<bluebie>
klrr_: usually that's a pretty good indication that there's no clear victor, hence my statement of personal preference
<apeiros>
16:25 klrr_: oh it's some kind of OOP feature?
<apeiros>
16:25 apeiros: no
<apeiros>
16:26 apeiros: i'ts some kind of message-based + dynamic typed OOP
<apeiros>
16:26 apeiros: +feature
IceDragon has quit [Ping timeout: 264 seconds]
xk_id has quit [Remote host closed the connection]
<klrr_>
bluebie: but static typing got a direct and clear advantage? this makes it sound to me that static is "better", but ive not used dynamic typing yet
<klrr_>
not saying it is
<bluebie>
I don't think it's fair to call dynamic/static type systems a part of OOP. Languages like BASIC have dynamic typing, but they don't have oop (at least, not the versions I used in MS DOS!)
<klrr_>
but to me it sounds like that
quoin has quit [Quit: This computer has gone to sleep]
<klrr_>
ive yet to learn OOP sry
<bluebie>
klrr_: you have to type more, and it constrains the design of your code quite often
kayloos has quit [Remote host closed the connection]
<klrr_>
focusing in IP and FP atm
<bluebie>
duck typing can be really useful
<klrr_>
haskell aint very verbose and it's statically type
<klrr_>
elm is even less verbose
<klrr_>
and it got static typing
<bluebie>
and programming in environments where everything duck types gives you a lot of flexibility to create new pieces of code which plug in to other bits which never knew about or were designed with those things in mind
<apeiros>
klrr_: verbosity can result not just from syntax but also from necessary boilerplate
<apeiros>
I don't know elm/haskell, but java e.g. suffers greatly from that
obs has quit [Quit: Konversation terminated!]
<bluebie>
some languages like haskell have implicit typing (I think, I don't haskell)
<klrr_>
16:34 < bluebie> and programming in environments where everything duck types gives you a lot of flexibility to create new pieces of code which plug in to other bits which never knew about or were designed with those things in mind
<klrr_>
^
<apeiros>
and it's a consequence of static typing and closed classes.
<klrr_>
that sounds interesting
<klrr_>
bluebie: can you tell more?
kofno has joined #ruby
<bluebie>
I'm not a haskell programmer, no
<bluebie>
go ask the haskell people!
<klrr_>
what's implicit typing? you mean the compiler figures out types?
<bluebie>
yeah
<klrr_>
yeah
<apeiros>
is there a difference between implicit and inferred typing?
<klrr_>
hinlder miller algorithm
<bluebie>
it follows the variable assignments and figures out where everything goes
<bluebie>
of course it's statically typed at the beginning
<bluebie>
sorry, inferred
<klrr_>
bluebie: i meant that you can make new code for stuff that wasent made for that purpose, that sounded interesting
<klrr_>
that you said
<bluebie>
it's really not my field, I don't know the exact words
<klrr_>
it sounds like an advantage
girija has quit [Ping timeout: 246 seconds]
<bluebie>
yes, it is!
thesheff17 has joined #ruby
cdelo has quit [Read error: Connection reset by peer]
thesheff17 has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
<klrr_>
is there any term i can google to find more info about that?
<klrr_>
just duck typing?
<apeiros>
bluebie: well, sometimes different language's groups use different words for the same thing, sometimes they use new words because the old words slightly differ - who knows…
<bluebie>
but you are being very needy and annoying and I'd like to stop talking to you now.
<bluebie>
Good luck in your quest
thesheff17 has joined #ruby
cdelo has joined #ruby
hmca has quit [Ping timeout: 245 seconds]
<apeiros>
haha :)
kofno has quit [Remote host closed the connection]
xk_id has joined #ruby
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
<klrr_>
bluebie: sry, ive been ban from channels before since people intepret me as annoying, im sorry for that! as i said earlier, im new to programming and learning and ive realized that some question get intepreted as trolling even though i just wanna learn
xk_id has quit [Remote host closed the connection]
<bluebie>
apeiros: yeah, for sure. I have some friends who're always "Jenna y u no haskell?!" and I'm all like "Shit fool! I ain't got time for new languages! I'm too busy rocking the universe rapidly prototyping crazy contraptions in my favourite ruby and my least favourite c!"
kofno has joined #ruby
<bluebie>
everything I know about haskell is from them telling me I'm wrong for liking ruby and dynamic typing..
xk_id has joined #ruby
<apeiros>
^^
<klrr_>
new languages is hard to learn, especially new paradigm
<apeiros>
I wish I had more time. I'd love to learn more languages.
<klrr_>
i did not mean to sound like a "learn haskell ffs" hipster
<bluebie>
I just don't care
IceDragon has joined #ruby
ndrei has quit [Ping timeout: 248 seconds]
<bluebie>
I don't see that there's anything I could do with haskell that I can't do with ruby
<apeiros>
one reason of course to learn more aspects and extract good ideas for my own :D
<bluebie>
certainly nothing I WANT to do
<klrr_>
i just use haskell since i know it well and am new to programming , ill learn ruby etc. when i got more time
<bluebie>
I don't program to program, I program to do art installations and stupid web toys and stuff!
SHyx0rmZ has joined #ruby
<bluebie>
klrr_: sounds like a plan
jaimef has joined #ruby
<klrr_>
the reason i come here is since ill go a course where i will learn basics of ruby, ml and scheme, and ruby seems most interesting since it got dynamic typing, it is intepretet and has OOP which is opposite of haskell and very important for me to learn since functional programming is useless
<bluebie>
I began programming with QBasic in DOS, and graduated to the horrible visual basic, and actionscript, and the even horribler PHP, then decided I sucked at programming because everything I made with php was terrible, and gave up, until like two years later hipsters were going on about rails and I got curious and watched than blog in ten minutes video
colonolGron has joined #ruby
<bluebie>
and so began my adventure of learning why rails is bad
<bluebie>
but ruby is good ^_^
<klrr_>
cool! :D
<apeiros>
:D
<bluebie>
functional programming is nowhere near useless
<klrr_>
it is
<klrr_>
but it is safe
<bluebie>
it is arguably the future of computing
<klrr_>
safe and useless
<shevy>
hmm
<bluebie>
massively parallel and all that
fgo has joined #ruby
<shevy>
tiobe: top 3 languages: Java, C, C++
<bluebie>
but I don't care. future be damned! get off my lawn!
<apeiros>
I think the problem with FP isn't in FP but in people who want to shoehorn everything into it and keep it "pure"
<klrr_>
well, i said it was useless based on a quote by simon peyton jones (a GHC dev, and one of original haskell designers)
<shevy>
so much for functional programming becoming the future...
<klrr_>
concatative programming is the future! :P
<apeiros>
ruby provides a good deal of FP which is a great help to write nice code. but it doesn't force you.
<apeiros>
CAP is the future! (computer aided programming)
<apeiros>
or AAP? (AI aided programming)
<klrr_>
never heard of CAP, gonna google it
<bluebie>
The only thing about ruby I wish the core team would fix
<apeiros>
klrr_: don't bother, I made it up
<bluebie>
is that it isn't coffeescript
<shevy>
now if AIs could program on their own, that would be kinda cool
<klrr_>
apeiros: oh okey :p
noop has joined #ruby
<bluebie>
seriously I need me some def initialize(@parent, @mode)
<bluebie>
tired of those useless assignments ^_^
<shevy>
hmm
<apeiros>
bluebie: go meta
devoldmx has quit [Ping timeout: 268 seconds]
<klrr_>
ruby is DSL friendly language iirc?
mansi has joined #ruby
<klrr_>
i like DSL's, in a web app im writing i write all HTML in a DSL xD
<bluebie>
openscad is one of the most annoying programming languages. They don't even have variables. They have constants. Assign once. Can you imagine how annoying it is to be taunted by the possibilities of loops, but not have variable assignment? infuriating!
<bluebie>
so I am trying to make a markabyish thing
<apeiros>
lol
<bluebie>
so far so good :D
aryaching has joined #ruby
jamesaanderson has joined #ruby
pweems has joined #ruby
justsee has quit [Ping timeout: 256 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
colonolGron has quit [Quit: Lost terminal]
wudofyr has quit [Ping timeout: 246 seconds]
gork has joined #ruby
fgo has joined #ruby
gork has quit [Client Quit]
ryandeussing has joined #ruby
wudofyr has joined #ruby
devoldmx has quit [Ping timeout: 268 seconds]
Olipro has quit [Read error: Connection timed out]
axeman- has quit [Remote host closed the connection]
Olipro has joined #ruby
snovak has joined #ruby
hamakn has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 240 seconds]
hamakn has joined #ruby
wallerdev has joined #ruby
wudofyr has quit [Remote host closed the connection]
cody-- has quit [Quit: Computer has gone to sleep.]
ndrei has quit [Ping timeout: 256 seconds]
claymore has joined #ruby
browndawg has quit [Read error: Operation timed out]
<_br_>
bluebie: For what purpose exactly? One possible answer is for instance guard gem.
defaultro has joined #ruby
<bluebie>
I'm writing a little ruby DSL which compiles to OpenSCAD - similar in concept to markaby or xml builder. I want to write little programs in their own files, and when I save them, have a little terminal app that automatically immediately parses and compiles them in to openscad files, which the openscad app will detect have changed and reload it's 3d view
<bluebie>
fssm seems to be a popular thing for this
stonevil has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
Banistergalaxy has joined #ruby
zarubin has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
Bry8Star{T2_ has quit [Ping timeout: 240 seconds]
jbomo has joined #ruby
<_br_>
hm, sounds like guard is a good match then.
Bry8Star{T2 has joined #ruby
iamjarvo has joined #ruby
Xaitec has quit [Ping timeout: 256 seconds]
s0ny123 has quit [Quit: leaving]
ismael_ has quit [Read error: No route to host]
ismael_ has joined #ruby
Xaitec has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
browndawg has joined #ruby
r0bglees0n has joined #ruby
Xaitec has quit [Read error: Connection reset by peer]
d2dchat_ has quit [Ping timeout: 264 seconds]
Spami has joined #ruby
Xaitec has joined #ruby
ismael__ has joined #ruby
sailias has quit [Ping timeout: 260 seconds]
ismael_ has quit [Read error: Connection reset by peer]
mrsolo has joined #ruby
wallerdev has quit [Quit: wallerdev]
Xaitec has quit [Read error: Connection reset by peer]
hmca has joined #ruby
Xaitec has joined #ruby
hamakn has joined #ruby
skulls has quit [Ping timeout: 240 seconds]
Xaitec has quit [Read error: Connection reset by peer]
<shevy>
dumdedum
skulls has joined #ruby
cellx has joined #ruby
Xaitec has joined #ruby
hmca has quit [Ping timeout: 256 seconds]
ndrei has joined #ruby
ewnd9 has quit [Ping timeout: 245 seconds]
Xaitec has quit [Remote host closed the connection]
wallerdev has joined #ruby
slyv has joined #ruby
defaultro has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
defaultro has joined #ruby
xk_id has quit [Remote host closed the connection]
xk_id has joined #ruby
browndawg has quit [Ping timeout: 264 seconds]
kilophoton has joined #ruby
browndawg has joined #ruby
stonevil has quit [Remote host closed the connection]
axeman- has joined #ruby
relix has joined #ruby
stonevil has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Spami has quit [Quit: This computer has gone to sleep]
apeiros has quit [Remote host closed the connection]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
Jake232 has joined #ruby
agustinvinao has quit [Quit: Leaving...]
axeman- has quit [Remote host closed the connection]
Kabaka_ has quit [Remote host closed the connection]
Bry8Star{T2 has quit [Remote host closed the connection]
DanBoy has quit [Remote host closed the connection]
atno has quit [Ping timeout: 264 seconds]
mansi has quit [Ping timeout: 245 seconds]
Bry8Star{T2 has joined #ruby
druznek has quit [Quit: Leaving]
TomRone has joined #ruby
adamholt has joined #ruby
workmad3 has joined #ruby
blackmesa has joined #ruby
Kabaka_ has joined #ruby
kidoz has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
jamesaanderson has quit [Ping timeout: 256 seconds]
lukec has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
tylersmi_ has joined #ruby
smashwilson has joined #ruby
mansi has joined #ruby
jamesaanderson has joined #ruby
snovak has joined #ruby
juken has joined #ruby
Ripp__ has joined #ruby
linduxed has joined #ruby
NealJ has quit [Quit: :c]
addisaden1 has joined #ruby
blueOxigen has joined #ruby
<juken>
What is the best practice to open two text files, one that contains a list of domains ("google.com", "yahoo.com"), one that contains a list of potential subdomains ("www", "ftp"), and putting them together ("www.google.com", "ftp.google.com", "www.yahoo.com", "ftp.yahoo.com") ?
tomzx_mac has joined #ruby
<sam113101>
best practice?
snovak has quit [Ping timeout: 245 seconds]
<sam113101>
just do it the way you want to
freerobby has quit [Quit: Leaving.]
<MrZYX>
open the files, convert the entries to Arrays or Sets and put them together
<juken>
sam113101: The cleanest way, not using more memory than necessary, etc...
prakriti has quit [Quit: Leaving]
addisaden has quit [Ping timeout: 264 seconds]
<sam113101>
what are you going to do with the result?
<juken>
sam113101: run them through a resolv to identify which subdomains actually exist
bluOxigen has quit [Ping timeout: 264 seconds]
<juken>
sam113101: I'm new to ruby, so just trying to figure out the "ruby"-ist way to do it
Xeago has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
freerobby has joined #ruby
ebobby has joined #ruby
ebobby has left #ruby [#ruby]
Hanmac has quit [Ping timeout: 256 seconds]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
antulik-afk is now known as antulik
stonevil has quit [Remote host closed the connection]
tylersmith has joined #ruby
Burer has quit [Ping timeout: 245 seconds]
Zai00 has quit [Quit: Zai00]
freerobby has quit [Ping timeout: 246 seconds]
girija has joined #ruby
jamesaanderson has joined #ruby
stonevil has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
corpuscle has joined #ruby
ismael_ has joined #ruby
ssvo has joined #ruby
tylersmi_ has joined #ruby
fgo has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
ssvo has quit [Read error: Connection reset by peer]
banghouse2 has joined #ruby
tylersmi_ has quit [Read error: Connection reset by peer]
dankest has quit [Quit: dankest]
lucazi has quit [Remote host closed the connection]
cj3kim has joined #ruby
cj3kim has quit [Remote host closed the connection]
Quashie has joined #ruby
druonysuse has joined #ruby
snovak has joined #ruby
Burer has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Burer has quit [Max SendQ exceeded]
Burer has joined #ruby
Burer has joined #ruby
Burer has quit [Changing host]
kidoz has quit [Quit: Ухожу я от вас]
snovak has quit [Ping timeout: 245 seconds]
Burer has quit [Excess Flood]
snath has quit [Ping timeout: 264 seconds]
katsrc has joined #ruby
dankest has joined #ruby
Burer has joined #ruby
Burer has quit [Changing host]
Burer has joined #ruby
tonni has quit [Remote host closed the connection]
Burer has quit [Max SendQ exceeded]
tonni has joined #ruby
ismael__ has joined #ruby
Burer has joined #ruby
sambao21 has joined #ruby
freerobby has joined #ruby
ismael_ has quit [Ping timeout: 264 seconds]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
sambao21 has quit [Client Quit]
Companion is now known as companion
tonni has quit [Ping timeout: 246 seconds]
atno has joined #ruby
freerobby has quit [Ping timeout: 264 seconds]
druonysuse has quit [Ping timeout: 256 seconds]
noop has quit [Ping timeout: 268 seconds]
noop has joined #ruby
Spami has joined #ruby
KobraKao has quit [Quit: Saindo]
hadees has joined #ruby
atno has quit [Ping timeout: 240 seconds]
jibi has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
saarinen has joined #ruby
kofno has joined #ruby
n_blownapart has joined #ruby
n_blownapart has quit [Remote host closed the connection]
nanoxd has joined #ruby
gyre007 has quit [Remote host closed the connection]
mansi_ has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby
Bry8Star{T2 has joined #ruby
louc85 has joined #ruby
louc85 has left #ruby [#ruby]
tonni has joined #ruby
workmad3 has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kofno has quit [Ping timeout: 246 seconds]
Quashie has quit [Ping timeout: 246 seconds]
iliketur_ has joined #ruby
kinginky has joined #ruby
<kinginky>
does anyone know of a gem or built-in feature of ruby to display radicals?
atno has joined #ruby
<kinginky>
i want to code a simple trig calculator, but i need the answers to be exact w/ radicals
girija has quit [Ping timeout: 268 seconds]
poga has joined #ruby
threesome has quit [Ping timeout: 264 seconds]
stonevil has quit [Remote host closed the connection]
poga has quit [Remote host closed the connection]
jamesaanderson has joined #ruby
poga has joined #ruby
Jake232 has joined #ruby
Xeago has joined #ruby
atno has quit [Ping timeout: 246 seconds]
Quashie has joined #ruby
decoponio has quit [Ping timeout: 248 seconds]
decoponio has joined #ruby
snath has joined #ruby
mansi_ has quit [Remote host closed the connection]
mansi has joined #ruby
[Goodoog] has joined #ruby
iamjarvo has quit [Quit: Leaving.]
Vivekananda has joined #ruby
wallerdev has quit [Quit: wallerdev]
freerobby has joined #ruby
aaronmcadam has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
Vivekananda has quit [Max SendQ exceeded]
Al_ has joined #ruby
sambao21 has joined #ruby
mansi_ has joined #ruby
snath has quit [Ping timeout: 246 seconds]
Rym has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
antulik is now known as antulik-afk
fantazo has quit [Quit: Verlassend]
Vivekananda has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
<shevy>
kinginky the ruby math module?
<shevy>
Math.sin 89.9.degrees
Cranberry-Apple has quit [Ping timeout: 264 seconds]
marek_ has quit [Remote host closed the connection]
sambao21 has quit [Ping timeout: 240 seconds]
marek_ has joined #ruby
atno has joined #ruby
<kinginky>
shevy: if I run Math.sin 45.degrees, i'd want that to be expressed as something like sqrt(2)/2, rather than 0.707106781...
<shevy>
hmm
Vivekananda has quit [Ping timeout: 245 seconds]
Al_ has quit [Read error: Connection reset by peer]
Al_ has joined #ruby
<kinginky>
shevy: yep. can't find anything about it on google, and im honestly surprised no one has wanted to do this before
ismael__ has quit [Remote host closed the connection]
<waxjar>
i think people just go with python or R when they need to do something mathy
ismael_ has joined #ruby
DylanJ has joined #ruby
Vivekananda has joined #ruby
katsrc has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 246 seconds]
bobbyz has joined #ruby
bobbyz has quit [Client Quit]
<kinginky>
waxjar: never used either but i'm sure it'd be a good way to jump in. ill check out python, been wanting to get into it for a while
mansi_ has quit [Remote host closed the connection]
mansi has joined #ruby
ismael_ has left #ruby [#ruby]
Al_ has quit [Read error: Connection reset by peer]
ismael_ has joined #ruby
<ismael_>
hey
Al_ has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
butblack has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
Al_ has quit [Client Quit]
|jemc| has joined #ruby
snovak has joined #ruby
mansi has joined #ruby
Fuzai_ is now known as Fuzai
snath has joined #ruby
DrShoggoth has joined #ruby
BizarreCake has quit [Ping timeout: 248 seconds]
<|jemc|>
Has anybody gotten xiki (https://github.com/trogdoro/xiki) to play nice (install correctly) with rbenv? Using gem install apparently gives an old version, so they recommend cloning with git and using their install script, which has directions for OS-level ruby and for rvm, but not for rbenv. I've tried various methods with rbenv and get pathing issues and stack overflows. Anybody having better luck than I?
DrCode has joined #ruby
snovak has quit [Ping timeout: 245 seconds]
kayloos has joined #ruby
julian-delphiki has joined #ruby
Xeago has quit [Remote host closed the connection]
workmad3 has joined #ruby
saarinen has quit [Quit: saarinen]
crunch-choco has joined #ruby
stonevil has joined #ruby
<butblack>
Am I missing something here on the Google API page? This doesn't look like Ruby code to me...
<butblack>
actually I have a piece of working code, except for some reason when I try to use their convention for inserting a calendar it breaks asking for a required field called title
<butblack>
.. which from the least recent link I put up on here says it is a summary parameter
mlpinit has joined #ruby
atno has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 245 seconds]
mlpinit has quit [Remote host closed the connection]
sambao21 has joined #ruby
marek_ has quit [Ping timeout: 240 seconds]
sambao21 has quit [Client Quit]
devoldmx has joined #ruby
brotatos has quit [Quit: WeeChat 0.4.1]
marek_ has joined #ruby
konarr has joined #ruby
<Morrolan>
|jemc|: rbenv puts gems into your user's home folder, so, just like with rvm, you can execute the script without sudo.
kofno has joined #ruby
<Morrolan>
Though, uh, to install it to /usr/local/bin, as they suggest, you will need root permissions. I don't think that folder is world-writeable.
Davey_ has joined #ruby
<Morrolan>
I think I'd just `git clone`, `gem build`, `gem install`.
Bry8Star{T2 has joined #ruby
sambao21 has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
cajueiro has joined #ruby
cajueiro has quit [K-Lined]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
mengu has joined #ruby
atno has joined #ruby
<|jemc|>
Morrolan: yeah, you would think that wouldn't you?
kofno has quit [Ping timeout: 264 seconds]
<butblack>
#google
devoldmx has quit [Ping timeout: 264 seconds]
<|jemc|>
Morrolan: but no joy there
<Morrolan>
What happens?
<|jemc|>
how familiar are you with how xiki is supposed to work?
<Morrolan>
I took a quick look at one of the screencasts, being curious what it is.
<Morrolan>
Looks nice.
<|jemc|>
so a large part of its functionality accesses a series of nesting menus
sambao21 has quit [Ping timeout: 260 seconds]
<Morrolan>
Yep.
<|jemc|>
which are stored in various paths on your drive
<|jemc|>
when I use gem install, it can't access its main menu paths
<|jemc|>
so even the most basic paths like 'docs'
<|jemc|>
return "Menu doesn't exist yet"
mansi has quit [Ping timeout: 246 seconds]
<|jemc|>
and when I say gem install
<|jemc|>
I don't mean installing from the web
<|jemc|>
I mean build from source and install the local gem
ni291187 has joined #ruby
Senjai has quit [Remote host closed the connection]
ni291187 has left #ruby [#ruby]
<|jemc|>
when I install the old version from rubygems, it works but is missing a lot of its new functionality, obviously
<Morrolan>
xiki_wrapper is the only file which'll live outside the git repo.
<|jemc|>
script urlbar
<|jemc|>
whoops
tomzx_mac has quit [Ping timeout: 240 seconds]
<|jemc|>
trying to type the weechat script that lets me click links
tylersmith has quit [Remote host closed the connection]
Rym has quit [Read error: Connection reset by peer]
PhilK has joined #ruby
Rym has joined #ruby
regor has joined #ruby
marek_ has quit [Ping timeout: 240 seconds]
robustus has quit [Ping timeout: 245 seconds]
<|jemc|>
hm, I might have screwed myself by doing the gem install
freerobby has quit [Ping timeout: 245 seconds]
<|jemc|>
when I try to use it from the git repo it is still trying to do stuff in my rbenv path, even when I thought I had removed all references to xiki from rbenv
Senjai has joined #ruby
Senjai has joined #ruby
<Morrolan>
`which xiwik`
jimmykarily has left #ruby [#ruby]
marek_ has joined #ruby
robustus has joined #ruby
sailias has joined #ruby
<|jemc|>
that's weird, the rbenv shim is still there even when I gem uninstall xiki
allsystemsarego has quit [Quit: Leaving]
<|jemc|>
so which xiki showed ~/.rbenv/shims/xiki
<|jemc|>
so I ran rbevn rehash
<|jemc|>
*rbenv
smashwilson has left #ruby [#ruby]
<|jemc|>
now it shows ~/bin/xiki (my user bin folder I created and use for my scripts, which I used the xiki script to copy to)
<|jemc|>
however
<|jemc|>
when I run it
bluOxigen has quit [Ping timeout: 256 seconds]
<|jemc|>
it says "bash: /home/jemc/.rbenv/shims/xiki: No such file or directory"
hollyw00d has joined #ruby
<|jemc|>
and, when I try to run the bin directly from the git repo
<|jemc|>
which should display the contents of the docs menu
<|jemc|>
it must have set some environment variable or dotfile or something
<|jemc|>
telling it where the menu dir should be
<|jemc|>
that is now still set to the rbenv path...
razi has quit [Ping timeout: 246 seconds]
swordsmanz has joined #ruby
iamjarvo has quit [Quit: Leaving.]
S0da has joined #ruby
<Morrolan>
Remove all xiki executables from PATH, copy git_repo/etc/command/xiki_wrapper to /usr/lobal/bin/xiki, replace '(xiki_dir)' in it with the path to the git repo, then try again.
<Morrolan>
So basically just play the role of copy_xiki_command_to_rb. :)
JDHankle has quit [Remote host closed the connection]
kiri has quit [Read error: Operation timed out]
iamjarvo has joined #ruby
workmad3 has joined #ruby
JDHankle has joined #ruby
JDHankle has quit [Read error: Connection reset by peer]
BrianJ has quit [Quit: Computer has gone to sleep.]
Davey_ has quit [Quit: Computer has gone to sleep.]
bronson_ has joined #ruby
intuxicated has quit [Ping timeout: 245 seconds]
<|jemc|>
Morrolan: the xiki in my PATH already contains the path to the git repo
<Morrolan>
Ah.
<Morrolan>
Well, then I'd probably blame it on a bug. :P
bronson_ has quit [Client Quit]
<|jemc|>
I think it must have recorded its menu path somewhere
<|jemc|>
earlier
<Morrolan>
Wipe the slate clean, reload the environment, and try again?
<|jemc|>
what do you mean by the 'environment'?
<|jemc|>
environment variables?
snovak has joined #ruby
pweems has joined #ruby
<Morrolan>
Yea.
decoponio has quit [Quit: Leaving...]
<|jemc|>
hm, running with env -i means it doesn't know how to find the ruby binary
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
<|jemc|>
because this is how rbenv inserts itself
Rym has quit [Ping timeout: 245 seconds]
BRMatt has quit [Ping timeout: 248 seconds]
volty has joined #ruby
<|jemc|>
and if I specify the path to the ruby interpreter
aaronmcadam has quit [Quit: Leaving...]
<|jemc|>
env -i ~/.rbenv/shims/ruby bin/xiki docs
johnjohnson has joined #ruby
<|jemc|>
I get the same stack level too deep message
snovak has quit [Ping timeout: 264 seconds]
<|jemc|>
some trace of it must be left in the .rbenv tree somehow...
* Morrolan
snrks
<Morrolan>
rbenv and rvm are far too much magic for my taste.
<Morrolan>
Good luck with it, though. :)
BRMatt has joined #ruby
<|jemc|>
so you just install directly from source then? or you stay at the mercy of your OS's packages?
<Morrolan>
Install from source, and use chruby to manage environment variables for me.
<|jemc|>
well, thanks for your time
<|jemc|>
and I'll keep futzing around with this for a while
pitzips has joined #ruby
<Morrolan>
Well, it looks like a nice project, judging by that one video. Might give it a try, once I'm on my Linux machine again. :)
Rym has joined #ruby
<iamjarvo>
Morrolan: do you still have the idea of gemsets? one prob i have seen when not using gemsets is say i bundled earlier from rubygems and the gem is still installed and then for anothe app i bundle from an internal server bundler will just use the installed gem and not tell me it is missing from the internal server
<iamjarvo>
is that just a problem with my workflow os is it solvable ?
<johnjohnson>
looks like chruby does almost the same thing as rbenv
<Morrolan>
I see your issue. Personally, I'd blame the local sysadmin in this case, for not providing an accurate clone of the repository, iamjarvo. :P
Vivekananda has joined #ruby
<MrZYX>
Morrolan: \o/ all three hornet nests on one day!
<Morrolan>
But of course, that's not always a viable solution. No, chruby doesn't provide such a thing.
<Morrolan>
MrZYX: *snrk*
lyanchih has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
atyz has quit [Quit: Leaving...]
Vivekananda has quit [Max SendQ exceeded]
<Hanmac1>
shevy: "Announcer: A squirrel likes to hide his nuts in the most unusual places...where the sun don't shine on 'em. "
Hanmac1 is now known as Hanmac
konarr has quit [Quit: Leaving]
eoinkelly has joined #ruby
Rym has quit [Ping timeout: 256 seconds]
s0ny123 has joined #ruby
lukec has joined #ruby
<iamjarvo>
Morrolan: thanks
Emmanuel_Chanel has joined #ruby
volty has quit [Read error: Operation timed out]
IcyDragon has joined #ruby
volty has joined #ruby
IceDragon has quit [Ping timeout: 264 seconds]
cads has quit [Ping timeout: 248 seconds]
jbpros has quit [Quit: jbpros]
QKO_ has joined #ruby
crunch-choco is now known as bean-micro
jbpros has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
s0ny123 has quit [Ping timeout: 240 seconds]
marek_ has quit [Ping timeout: 264 seconds]
rcosta has joined #ruby
QKO has quit [Ping timeout: 260 seconds]
ismael_ has quit [Remote host closed the connection]
atno has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
jbpros has quit [Client Quit]
aryaching has joined #ruby
enebo has joined #ruby
wallerdev has joined #ruby
enebo has quit [Client Quit]
axeman- has quit [Remote host closed the connection]
ravster has joined #ruby
elehack has joined #ruby
sambao21 has quit [Ping timeout: 240 seconds]
stayarrr has joined #ruby
codecop has quit [Remote host closed the connection]
mengu has quit [Quit: This computer has gone to sleep]
corpuscle has quit [Quit: WeeChat 0.4.1]
ryandeussing has joined #ruby
QKO_ has quit [Ping timeout: 260 seconds]
BRMatt has quit [Ping timeout: 245 seconds]
iliketur_ has quit [Quit: zzzzz…..]
hasrb has joined #ruby
gyre007 has joined #ruby
ryandeussing has quit [Ping timeout: 245 seconds]
iamjarvo has quit [Quit: Leaving.]
marcdel has joined #ruby
fomatin has joined #ruby
obs has joined #ruby
kiri has joined #ruby
pkrnj has joined #ruby
butblack has quit [Quit: butblack]
gyre007 has quit [Ping timeout: 245 seconds]
marcdel has quit [Ping timeout: 245 seconds]
rdxc has joined #ruby
rdxc has quit [Client Quit]
epitron has quit [Quit: weechat upgrade]
<BraddBitt>
do options in a method parameter have to be called options = {} ?
<BraddBitt>
or can you use another name for the options variable
marek_ has quit [Read error: Connection reset by peer]
snovak has joined #ruby
elehack has quit [Quit: Farewell, programs.]
pwh has joined #ruby
brain_shim has joined #ruby
Hanmac1 has joined #ruby
marek_ has joined #ruby
<Morrolan>
You can use whatever you want.
<Morrolan>
After all, it's just a normal method argument.
sayan has quit [Ping timeout: 256 seconds]
<|jemc|>
you can also use **kwargs now in new versions of ruby
xcfox has quit [Ping timeout: 256 seconds]
<workmad3>
BraddBitt: call it what you want... but make sure you refer to it in your method by the name you choose
<BraddBitt>
right
<BraddBitt>
im guessing convention is to just use options = {}
<BraddBitt>
huh
Hanmac has quit [Ping timeout: 240 seconds]
<BraddBitt>
much like Java String[] args
<Morrolan>
Just that, instead of a silly string array, it's a cute hash. :P
<workmad3>
:)
<workmad3>
also, options tend to be passed to more than just your entry-point method
snovak has quit [Ping timeout: 268 seconds]
<|jemc|>
BraddBitt: using **kwargs as the final argument in your function def puts all keyword arguments into a Hash object, which can be referenced from like any Hash object
<BraddBitt>
so **kwargs is the same as options = {}
<BraddBitt>
right?
<|jemc|>
and again, it can be named something other than kwargs
<|jemc|>
it serves the same function
<|jemc|>
but the ** makes it collect them a little differently
freerobby has joined #ruby
<BraddBitt>
how so?
<workmad3>
BraddBitt: **kwargs makes use of the ruby 2+ built-in support for true keyword arguments
<Morrolan>
With options={} they're not actually keyword arguments.
<Morrolan>
They just happen to look like they are, because of the implicit hash.
<BraddBitt>
ah
<BraddBitt>
so why use options={} or **kwargs instead of just a splat notation
<workmad3>
because a splat only gives you an array, not a hash
<Morrolan>
A regular splat (*) will get you an array of options, not a hash.
<BraddBitt>
mmm okay
<BraddBitt>
right
<BraddBitt>
thanks for clearing that up guys
<workmad3>
and keyword args were only introduced in ruby 2
<workmad3>
the keyword args also provide a nicer, ruby-standard way of providing default values for your keyword args
<Morrolan>
Which is great, if you're willing to suppor
sambao21 has quit [Quit: Computer has gone to sleep.]
<Morrolan>
support ruby 2+ only. :)
<workmad3>
and, I believe, a standard ruby way of throwing out keyword args you *don't* want (the **kwargs is a way of capturing all possible kwargs)
<workmad3>
Morrolan: yeah, that's the catch :)
<Morrolan>
How long until 1.9's end of life? :P
freerobby has quit [Ping timeout: 246 seconds]
<workmad3>
Morrolan: quite a wihle
<|jemc|>
I came to ruby from python only recently, and I'm glad I came when I did because I wouldn't have been happy without kwargs
<workmad3>
|jemc|: well, we've been faking them for years ;)
<Morrolan>
When I started with Ruby (came from Python, too) I wasn't even aware that there were no keyword args. :(
<Morrolan>
Only when a function where I thought I've been using them began returning odd things, I investigated. :P
<|jemc|>
having procs that bring their scope with them (or have a different scope forced on them) is what really moved me over - there's so much you can do with that flexibility!
snath has quit [Ping timeout: 245 seconds]
<workmad3>
|jemc|: you came for the closures? :)
hollyw00d has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<|jemc|>
also, I've always had a monkey-patcher heart. I like making "magic" happen, and python is fundamentally opposed to much of what that entails
pitzips has quit [Quit: Leaving]
kilophoton has quit [Ping timeout: 264 seconds]
<|jemc|>
with ruby, you've got the flexibility to do that if you like it and it is appropriate, but you can still get everything you want done by forgoing it entirely when you choose
d2dchat_ has quit [Ping timeout: 245 seconds]
<|jemc|>
I had originally dismissed ruby because I asssumed it was all about rails and I have no desire to do web development, but it really is a great general purpose language like python
<workmad3>
|jemc|: I like to see it as ruby embraces a perl-like 'there's more than one way to do things, and this is good', while python embraces an anti-perl ethos of 'there is only one good way of doing something'
maasdesigner has joined #ruby
<|jemc|>
workmad3: exactly - I don't like being told there's only one way to do things - if that's true I like to find it out myself
<Hanmac>
in ruby you can do nearly anything anyway you want ;P
cdelo has quit [Quit: Leaving]
sailias has quit [Ping timeout: 246 seconds]
<|jemc|>
also, ruby makes writing c extensions much easier than it was in python.
<|jemc|>
in fact, the c code can *almost* be dynamic itself
thesheff17 has quit [Remote host closed the connection]
fourq_ has joined #ruby
* Hanmac
writes C++ extensions for GUI systems, or 3d-Rendering or simple 2d systems ;P
altamic has joined #ruby
altamic has left #ruby [#ruby]
hasrb has quit [Remote host closed the connection]
d2dchat_ has joined #ruby
<|jemc|>
I was so sure I wouldn't like ruby more than python and I only tried it to get my friend to stop hounding me about it
kiri has quit [Ping timeout: 240 seconds]
pweems has quit [Ping timeout: 260 seconds]
<|jemc|>
I *wanted* python to win, but once I really sunk my teeth in I got hooked
cads has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
masteesw has joined #ruby
ner0x has joined #ruby
d2dchat_ has quit [Remote host closed the connection]
masteesw has quit [Client Quit]
masteesw has joined #ruby
zeropx has quit [Quit: has left the room … Or did he?]
workmad3 has quit [Ping timeout: 240 seconds]
huoxito has joined #ruby
<volty>
extensionists, what do you think about qtruby (ruby-qt4) ?
gyre007 has joined #ruby
<Hanmac>
volty: i wanted something more platform interdependent and wxruby it mostly dead so i make my own wx binding ... but it is not finish yet and i did work on it in the recent time
freerobby has joined #ruby
end_guy has quit [Remote host closed the connection]
hasrb has joined #ruby
eoinkelly has quit [Quit: eoinkelly]
thesheff17 has joined #ruby
freeayu has joined #ruby
d45h has quit [Quit: d45h]
freeayu has quit [Client Quit]
<volty>
Hanmac: what instruments you use for the binding? Or you do it manually, by hand?
<Hanmac>
i write it by my own hand ... i like to have the control when objects are destroyed and when not
<volty>
a pretty big task // i like qtruby but from time to time i find it behind, something not implemented (yet) something weird
mengu has joined #ruby
alem0lars has quit [Quit: Leaving]
<|jemc|>
Hanmac: in my excursions into c extensions, I've just scanned google or ruby.h for the rb_ function or macro I need. Is there an actual source of documentation for that stuff anywhere? I haven't found an rdoc for it, but that of course makes sense being that rdoc is generated from rb source and not c source
end_guy has joined #ruby
<volty>
last night i found a prob. caused by a behavior that i didn't met before // timers to fire events connected to procs - after certain time ... but the garbage collector destroys the timer if it is local (even if the binding is active)
stayarrr has quit [Quit: Leaving.]
kobain has joined #ruby
<volty>
(not ruby binding, but 'timeout()' bound/connected to a proc)
<aliljet>
hey -- quick question, what does ||= mean? (e.g., var||= @someothervar)
<|jemc|>
so I could process it into something nicer
<|jemc|>
aliljet: only set the value if var is currently nil
St_Marx has joined #ruby
<|jemc|>
(or false, I guess)
<aliljet>
|jemc|: woot, thanks :)
<MrZYX>
aliljet: var || var = someothervar
freeayu has quit [Quit: This computer has gone to sleep]
<MrZYX>
to be precise
<aliljet>
even cooler. thanks
<volty>
(a ||= []) << new_elem
<|jemc|>
well, var = (var || someothervar)
<MrZYX>
no
<aliljet>
hm?
<|jemc|>
same as x+=1 is x=x+1, not x+x=1
<MrZYX>
|jemc|: it's not that, the assignment doesn't happen if it's truthy
* apeiros
thinks (a ||= []) is bad
<apeiros>
use proper initialization instead
stonevil has quit [Ping timeout: 240 seconds]
<volty>
def count_words ... (h[word]
marek_ has quit [Ping timeout: 256 seconds]
<|jemc|>
MrZYX: ah, I see the distinction, I was thinking of it like you meant (x || x) = val, instead of x || (x = val)
<|jemc|>
and the distinction between x=(x||val) and x||(x=val) being only if = has side effects
Zeeraw has quit [Quit: Computer has gone to sleep.]
<|jemc|>
so that the side effects don't actually happen with the latter
<apeiros>
or if = is actually a method call
<|jemc|>
yeah, that's the only way I could imagine it having side effects
<aliljet>
hm, so x || (x=val) is what it's a shortcut for?
<|jemc|>
seems so
tanema has joined #ruby
<|jemc|>
reversed from += and the like
<aliljet>
no worries, seems like kind of a rough shortcut to use.
<volty>
x if not nil, otherwise assign val to x and return it
<aliljet>
it's used all over the code I'm trying to understand making my life less awesome
<volty>
(nil or false)
marek_ has joined #ruby
S0da has quit [Remote host closed the connection]
<pontiki>
it's a very common idiom
<volty>
apeiros: why do you consider it bad?
<|jemc|>
I find it a useful idiom
<pontiki>
you should get used to it
<volty>
apeiros: why you consider it bad?
<apeiros>
volty: because it means you omitted to properly initialize your variable
<aliljet>
yep :), it's slowly happening
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<aliljet>
volty: was that for me?
<pontiki>
apeiros: you're specifically talking about the (a ||= []) = ... thing, yes?
<aliljet>
volty: if it was, it's onyl because I'm new to the concept with a deadline :)
<apeiros>
pontiki: yes
<pontiki>
nod
<pontiki>
i agree with that
snovak has joined #ruby
<volty>
apeiros: but that IS initialization
<pontiki>
or (a ||= []).tap{...} where tap modifies a
<apeiros>
volty: no. if it was, you'd just write a = [x]
<apeiros>
and not (a ||= []) << x
Speed has joined #ruby
dash_ has joined #ruby
guns has joined #ruby
threesome has joined #ruby
<aliljet>
what's the name of this idiom?
<pontiki>
"or-equals" or "memoize"
<volty>
apeiros: it comes handy, f.e., when using hashes, creating key value pairs on fly, you initialize if not present (initialized)
<apeiros>
unless you're going to tell me that `(a ||= []) << x` is waaaay better than `a = [x]`, but then I'd like a good reasoning :-p
<apeiros>
volty: how can `a` possibly be a hash there?
<apeiros>
and even with a hash: no, just no
gr33n7007h has quit [Ping timeout: 245 seconds]
<aliljet>
cool
<apeiros>
I've yet to see a sane `(… ||= []) << …`
johnjohnson has joined #ruby
JDHankle has quit [Remote host closed the connection]
samuel02 has quit [Remote host closed the connection]
<aliljet>
as a random aside, since I'm reasonably new to ruby, I wondered if there was an easy way to google these kinds of things? Google does a particularly poor job helping me understand these kinds of shortcuts
cantonic has quit [Remote host closed the connection]
Jake232 has quit [Remote host closed the connection]
<volty>
(h[word] ||= []) << filename (where that word was read - scanning files for example, sources or whatever else)
Jake232 has joined #ruby
<apeiros>
give the full code please.
<pontiki>
aliljet: since they're almost entirely punctuation, no; google and most other search engines toss most punctuation
<apeiros>
and I'll show you a better way to do it not involving that construct.
<pontiki>
the best thing, that i've found, is a pdf copy of the ruby programming book, latest edition
<pontiki>
then you can search with acroread or preview or w/e
snovak has quit [Ping timeout: 245 seconds]
johnjohnson has quit [Remote host closed the connection]
<aliljet>
pontiki: yep, I have a good feeling taht's not a bad idea.
<pontiki>
and when google fails, come here :)
JDHankle has joined #ruby
dash_ has quit [Ping timeout: 264 seconds]
<aliljet>
haha, you all rock. thanks
<apeiros>
volty: the cheapest one being h = Hash.new { |h,k| h[k] = [] }, and then plain h[word] << filename
<pontiki>
there are many benefits to have the lastest edition as pdf
<apeiros>
volty: but I'm pretty sure it could be done even without that.
<apeiros>
hm, midnight and I'm sleepy. lets leave it at `h = Hash.new { |h,k| h[k] = [] }` :-p
<volty>
apeiros: i know that you are experienced, but being experienced you know that in the real life ppl follow their logic resolving problems by brute force, and that the time isn't without limits (so you can or can not return to refactor it)
<apeiros>
volty: I did not say "you must always spend an infinite amount of time to come up with perfect code"
<apeiros>
volty: but that doesn't mean it's not allowed to point out bad code as such
deathwarrior has joined #ruby
<volty>
i mean: i begin about iteration, then realized it could not be initialized, the i initialize it if it isn't - by one way or the other
freerobby has quit [Ping timeout: 264 seconds]
Zeeraw has joined #ruby
<volty>
me too fuzzy: s/realized/realize/ , s/the/then/ ...
franzliedke has joined #ruby
<deathwarrior>
I there. I'm using OpenStruct and I need to convert to hash using to_h, but when I do that it just returns a nil object. Anybody knows why?
<apeiros>
deathwarrior: are you sure you're calling the to_h on an OpenStruct?
<apeiros>
if you're in pry, also try `$ your_openstruct.to_h`
franzliedke has left #ruby [#ruby]
Andrevan has quit []
<deathwarrior>
apeiros: yep, I have an if clause to check the class
<apeiros>
deathwarrior: then something meddled with your OpenStruct
<apeiros>
either something set the internal @table to nil, or modified to_h
<apeiros>
you can check both via introspection easily.
blackmesa has joined #ruby
<volty>
openstruct.to_h returns nil when there no members