<havenwood>
Guest59843: You should learn Ruby! You'll use it to write code.
Synthead has quit [Ping timeout: 276 seconds]
<T2ya>
hello. I've been attempting to learn ruby for the few days (about 4). I found i attempted a quiz which involves looping. I managed to solve but was interested in adding another twist to it. here's the loop i'm reffering to https://repl.it/Chij/2 . What i've been trying to do now is replace each number that begins with say "1" into a word. can someone point me in the correct direction. i am stumped.
<soLucien>
unless you are specificlally going into DevOps, i see no reason why you should look at Ruby
<soLucien>
:D
karapetyan has joined #ruby
<Papierkorb>
Guest59843: Please don't listen to soLucien
Leates has joined #ruby
<Guest59843>
i know it sounded like a troll question but im not trolling the thing is im trying to convince my friend to learn it but he keeps saying when will i use it since he knows java js and php
<Leates>
Hi
<havenwood>
soLucien: That's myopic. You should learn Ruby!
<havenwood>
Leates: hi
<soLucien>
a period defined by frustrations, horrible tooling, bad (or inexistent) documentation and incompatibility, i suggest you look up something else
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<soLucien>
this is 2016 ..
karapetyan has quit [Remote host closed the connection]
<T2ya>
It's "current year" do this
SilverKey has quit [Quit: Halted.]
<Papierkorb>
T2ya: First, quick feedback on your code if you don't mind. 1) If the learning material of yours didn't mention it, the algorithm you implemented is called "Fizz Buzz" 2) A while loop with a counter variable, counted manually, may seem simple enough at first, especially if you're coming from other languages. But instead, check out the #times method, which you can call on integers
<havenwood>
soLucien: Again, you should probably learn the language before trying to discourage others from doing so.
<soLucien>
BUT the issue is the tooling and documentation is stopping me from learning the language
<soLucien>
plus i'm a Windows user.
<soLucien>
so that's probably why
<soLucien>
but there is no debugger support in win
<soLucien>
no RVM
<soLucien>
no shell session management
<Papierkorb>
T2ya: Next on, to your question. You want to replace the '1' digit with a "one", correct? E.g., 14 becomes 'one 4'? You can check if the number begins with a '1' by transforming it into a string first, and then checking if the first character is a '1'.
<soLucien>
i would expect that a useful programming language supports both linux and windows environments
<Papierkorb>
soLucien: Ruby does support windows and why on earth would anyone like to dev on windows
<Guest59843>
is soLucien trolling?
<havenwood>
soLucien: Ruby supports the Windows environment. You're mistaken that there's no RVM-like tooling on Windows.
jenrzzz has quit [Ping timeout: 244 seconds]
<soLucien>
i've asked in this channel multiple times
<Papierkorb>
Guest59843: Well, he's spouting sh.. instead of using the time spent on it in a useful manner, like learning ruby or doing whatever
<soLucien>
"you better try docker out" was what i got
rubie has quit [Remote host closed the connection]
<Guest59843>
redhat devops ruby would be aamzing for
<T2ya>
In my mind i was thinking of changing the whole number like "14" to a word. like what was done with the multiples 3 and 5. but i think i'll learn what you said first. baby steps.
<T2ya>
i am indeed brand new to this. 0 background before a couple days ago.
<havenwood>
soLucien: Use the Chocolatey package or the RubyInstaller. But yeah, folk will generally question why you're developing on Windows.
<Papierkorb>
T2ya: Okay, good progress thus far then. Everyone starts small :)
<soLucien>
i dev on windows because i dev on windows. my clients use windows, i use hyperv, i write a vagrant hyperV plugins and puppet modules that target both Win and Linux
<havenwood>
soLucien: JRuby is also a very nice experience on Windows.
<soLucien>
i have used the chocolatey package havenwood
<Papierkorb>
T2ya: I could tell you how to do it, but I'm not sure if that'd really help you at this point. Don't want to cause too much confusion. What learning material are you using?
SilverKey has joined #ruby
pawnbox has joined #ruby
<soLucien>
i'm not a newbie .. i've done C#/python/js/powershell/bash/php/ruby
jottr has quit [Quit: WeeChat 1.5]
l4v2 has quit [Quit: l4v2]
<havenwood>
soLucien: So you installed Ruby. Good! I'd suggest learning to use the Pry gem. Here's a talk about REPL-driven development with Ruby: https://www.youtube.com/watch?v=D9j_Mf91M0I
<soLucien>
but i can honestly say ruby will be the hardest to find documentation on
<soLucien>
yes i use Pry
<T2ya>
you are correct. I would also personally be guided than just given the answer. Currently i have been using codeacademy.
<havenwood>
soLucien: So in Pry, look at the documentation. Or look at the code. It's lovely.
<soLucien>
i have, i use pry
<T2ya>
i was linked to a list of quizzes by a friend. which is how i ended up created the loop
Synthead has joined #ruby
dsea has quit [Quit: Leaving]
<T2ya>
i'm going to attempt to replicate what i created with the while loop using what you linked, before attempting what i had in mind
<soLucien>
havenwood this uru looks good , but it is impossible to find
<Papierkorb>
T2ya: I'd suggest doing what you had in mind first
<Papierkorb>
T2ya: Looking at codecademy (Don't have an account), you're in UNIT 3 right now?
<soLucien>
also, what's funny is that it's written in Go
<soLucien>
Why wouldn't your friend learn Go instead ? it natively compiles to any platform
dpkezio has joined #ruby
<eam>
soLucien: well, not any platform
<T2ya>
I made up to five so far before stopping and trying to look for resources to practice what theyve taught me.
<T2ya>
unit 5*
<soLucien>
i am not trolling there are definitely great stuff to do in Ruby
<soLucien>
Puppet/Chef/Vagrant
<dpkezio>
Hi
<soLucien>
i am sure others as well
Madplatypus has quit [Quit: Connection closed for inactivity]
pawnbox has quit [Ping timeout: 260 seconds]
ellistaa has joined #ruby
<havenwood>
dpkezio: hi
<soLucien>
but if you are starting up, why not start with something that's faster, has better tooling
<eam>
soLucien: seems like an argument for using rust or C, doesn't it?
<eam>
or maybe java
<havenwood>
soLucien: Ruby is fast enough and has nice tooling. If you prefer Java or Go then use Java or Go.
Gasher has quit [Remote host closed the connection]
montagne_goat has joined #ruby
<soLucien>
idk about Rust
<soLucien>
but C is a pain to write
<soLucien>
you are not productive with it
<eam>
soLucien: I think you've found your answer there -- ruby is a lot easier to write than go
<Papierkorb>
T2ya: Great. Will have to leave now, but let me Welcome you to programming in general. You're of course also welcome to ask any questions here, though sometimes it might take a while until someone responds :)
<soLucien>
no it's not , their synthax is similar
<eam>
developer productivity is often at odds with runtime efficiency
<havenwood>
soLucien: yes, yes it is
<eam>
soLucien: I assure you they're quite different. You should write more ruby and more go and develop a more well formed opinion
zacts has joined #ruby
<soLucien>
ruby is NOT faster to develop .. especially for starters .. Productivity for newcomers comes from auto-correction/synthax checking/ type suggestion/intellisense
<dpkezio>
irb
<T2ya>
Papierkorb : Thanks! and thank you for the input thus far. I'm sure i'll plenty more question.
<soLucien>
tooling
<havenwood>
dpkezio: irb(main):001:0>
spudowiar has quit [Quit: Leaving.]
<soLucien>
that's what makes a language productive
<Papierkorb>
soLucien: Please don't recommend that a newcomer uses auto completion right away. They don't learn anything, they only learn how the editor works
marsjaninzmarsa has quit [Quit: ZNC 1.7.x-git-487-cbf5c38 - http://znc.in]
rubie has joined #ruby
marsjaninzmarsa has joined #ruby
<havenwood>
soLucien: It's odd you keep talking about tooling when the Ruby tooling is often copied by other languages and has lead the way on multiple fronts.
nankyokusei has joined #ruby
<Guest59843>
does soLucien even know any languages
<Guest59843>
i think hes just talking crap
rawillia has joined #ruby
<eam>
not very well, if he thinks go is among the environments with the most well developed tooling
<soLucien>
i have not tried Go
<Guest59843>
i dont think he knows any language
<soLucien>
i just find it funny that uru is written in Go
<soLucien>
i don't think you have any arguments to support that. just your feeling
ellistaa has quit [Quit: ellistaa]
<soLucien>
i have an opinion, i braught up a few arguments.
<soLucien>
of course this is a Ruby channel and people will be opinionated
<eam>
I'm just disappointed you're not acknowledging java
<soLucien>
i started up with Java dude
<soLucien>
it's too verbose for my taste
<Guest59843>
write a calculator app in c# write the code to prove u know c# like u said
<eam>
yeah but the tooling
<soLucien>
that's what i had in CS 101
<havenwood>
Think of the tooling!
<eam>
if you don't like verbosity, ruby is a lot less verbose than either go or java
<soLucien>
Java has good debug support
<soLucien>
and great performance
<Guest59843>
LOL hes taken a college class and now thinks hes pro at coding
<eam>
but if you like tooling, boy, is java your answer
<havenwood>
soLucien: Try JRuby, it's lovely.
<soLucien>
plus you can write your own parser in antlr if you want
nankyokusei has quit [Ping timeout: 260 seconds]
<soLucien>
if you're into DSLs
<soLucien>
Guest i'm starting my master's degree in september.
<soLucien>
and been programming professionally for 3 years
<soLucien>
:)
<Guest59843>
what college?
<soLucien>
Copenhagen University :)
<eam>
that's disappointing, I would've thought an undergrad would be more readily able to absorb the purpose of various languages
<soLucien>
eam unbelievable
<eam>
I'll have to adjust my new grad expectations yet again
<soLucien>
dude i use Ruby for puppet modules and i am writing a Vagrant plugin at the moment
<Guest59843>
ppl in undergrand and grad dont really know any programming tbh
<soLucien>
you are so far up your own asshole
<soLucien>
it's unbelievable
<Guest59843>
they dont really learn the languages but theory and algorithms
<havenwood>
be nice
<soLucien>
i am trying to , i really am
<Guest59843>
my friend a grad in cs knows little bit of java and thats about it and cant get any jobs
<eam>
Guest59843: I've got a couple showing real promise in this year's crop
<havenwood>
eam: nice
Devalo has joined #ruby
<soLucien>
havenwood i would really love to try JRuby , but unfortunately the Ruby i write runs on Vagrant
<Guest59843>
i was just stating my own fact taht i have seen with my own soLucien
<soLucien>
what do you do when you want to change a method name ?
<eam>
I think the opinion I take most issue with in that article is that ruby is a better perl than perl
fmcgeough has quit [Quit: fmcgeough]
<eam>
ruby's great and all, but don't kid yourselves
Synthead has joined #ruby
<soLucien>
my point is it cannot be semantically parsed
<eam>
soLucien: pretty often, newbies get wrapped up in "which is better" and, no offense, it seems like that's where you're stuck right now
<soLucien>
i dont care which is better eam
<eam>
you're going to find that different languages have different strengths and weaknesses
<soLucien>
programming languages are tools
<soLucien>
i use c# for web dev, php for CMS stuff
<soLucien>
python on my raspberry py
greister has quit [Quit: WeeChat 1.3]
<soLucien>
ruby with Vagrant and puppet
<Guest59843>
LOL C# for web dev epic
greister has joined #ruby
<soLucien>
Guest that's what i am paid for mate
<soLucien>
you are the one trolling
spudowiar has joined #ruby
<eam>
not the only one, surely
<Guest59843>
im not trolling even in the slightly unlike someone
al2o3-cr has quit [Ping timeout: 260 seconds]
davedev24 has quit []
<eam>
soLucien: you know what's neat about ruby? You can change a method name on an instance of an object without modifying the class
MarkBilk has joined #ruby
<Guest59843>
i do web devel in visual basic
<eam>
so, if you want to, you can go ahead and change the method name -- at runtime even -- without having to worry about refactoring any code at all
<eam>
what could be easier than that?
<soLucien>
maintaining it :D
<eam>
oh but see, that's a different concern
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<eam>
this gets back to my point earlier: as your career progresses you'll find that these different strengths and weaknesses have different utility in various contexts
<eam>
if you don't understand why a language is as it is, give yourself a few more years of experience
<Guest59843>
if i knew any ruby i would question soLuciens actual knowledge on it unfortunately i dont o wells
rubie has quit [Remote host closed the connection]
al2o3-cr has joined #ruby
hipertracker has quit [Quit: hipertracker]
<havenwood>
Guest59843: They don't know Ruby. Not that that stops someone from having opinions!
<soLucien>
eam the fact that it is impossible to semantically validate things makes it hard to 1) refactor 2) find things 3) work on a existing project.
<eam>
yup, all true
<soLucien>
if you couple that with bad documentation
<eam>
that's a classic tradeoff between static and dynamic languages
<soLucien>
you end up with Vagrant
<soLucien>
Puppet has good documentation at least
Es0teric has quit [Quit: Computer has gone to sleep.]
<eam>
aha, sorry I'm a bit slow - I see you're frustrated with low quality code in devops tools
<soLucien>
but you need to read all of it in order to make sense of it
<soLucien>
that's a steep learning curve
<eam>
I agree, those projects are super annoying
spudowiar has quit [Quit: Leaving.]
<eam>
but let me tell you, if you're upset with vagrant and puppet you're lucky you weren't old enough to have dealt with cfengine
<Guest59843>
all the devops tools were written in ruby except ansible any reason?
<eam>
only the hip current crop
Mattx has joined #ruby
<eam>
bcfg2 is python, isn't it?
spudowiar has joined #ruby
<Guest59843>
well the popular ones i mean
<Guest59843>
ansible is the only popular one that is python instead
<eam>
hey bcfg2 was more popular than puppet before puppet existed
<soLucien>
ansible is gaining a lot of traction
<soLucien>
it's the youngest one
<eam>
let's not forget saltstack
<eam>
newer than ansible, hipper
<eam>
and python!
<soLucien>
didn't try that. When i had to decide, a chose the one witht he most public modules
<soLucien>
and it was a coinflip between chef and puppet
Synthead has quit [Ping timeout: 276 seconds]
<Guest59843>
i bet you dont know langauges just full time devops
<Guest59843>
i was going to go that route too tbh
<Guest59843>
probably will but studying one language for the sake of knowing one right now
<soLucien>
i hate devops but the altenative is spending one day to test a feature
Synthead has joined #ruby
<soLucien>
start with something that has types. It will make objects easier to understand
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
if you really want to criticize these tools, why not point out that none of them can reliably predict what they'll do ahead of time?
<eam>
all the CM systems we just mentioned work by running arbitrary code as root on edge nodes
<Guest59843>
still seems ruby/rails > Node, Express, React, Angular
jenrzzz has quit [Ping timeout: 244 seconds]
<soLucien>
i think puppet first "compiles" the run
<soLucien>
so it decides what it will do
<soLucien>
when it runs by pulling informatio about the system and comparing it with the required state
flashpoint9 has joined #ruby
<soLucien>
you just mentioned 3 different categories of things in one sentence
Synthead has quit [Ping timeout: 276 seconds]
marr has quit [Remote host closed the connection]
<eam>
well, not really. It collects the data it's going to use, but on end nodes it's still evaluating erb templates as root at the end of the day
<soLucien>
yes
flashpoint9 has quit [Ping timeout: 250 seconds]
bkxd has quit [Ping timeout: 276 seconds]
<soLucien>
but that's linux's fault
bkxd has joined #ruby
<soLucien>
it's made out of text files
<eam>
hm, that's an odd statement
<soLucien>
the idea of unix is : parse a string input , do something about it, output a string
<eam>
all filesystems are made out of files, but I don't see how that relates to being able to calculate the resulting state ahead of time
<eam>
soLucien: you're familiar with your gripe about static languages from earlier? How you can know the state of a thing without executing it?
<eam>
consider that complaint in the context of devops tooling
<eam>
wouldn't it be nice to know what /etc/foo might be, without having to execute an agent on the actual node?
<soLucien>
i don't think it is possible
<eam>
well, sure it is
<soLucien>
due to the way Unix is designed
<eam>
oh? how so?
<soLucien>
in order to do that you would have to syntactiacally then semantically understand the input to a command
<eam>
what commands are these?
<soLucien>
understand the significance of the unix commands
<eam>
why?
<eam>
what relevance is a unix command when we're discussing the placement of a config file in /etc/foo ?
cdg has joined #ruby
<soLucien>
the format of the config file (the input) has a certain synthax
<soLucien>
it differs for every possible linux utility
<eam>
do we need to understand it in order to reliably place it?
<eam>
does /bin/cp understand file syntax when copying a file?
<soLucien>
each command line utility has its own synthax
<eam>
if I run /bin/cp /etc/foo /etc/bar, are you suggesting cp understands the syntax of foo and bar?
<eam>
I'm not sure why you think utilities are relevant in the context of copying a file
<soLucien>
no , my point is if you run /bin/cp foo bar you (the runner) understand how cp works
<eam>
ok, but we aren't running /bin/cp
<eam>
can you copy a file without running a utility?
<soLucien>
no, and each utility has its own synthax . each synthax token maps to the semantics of the utility
zacts has quit [Ping timeout: 260 seconds]
<eam>
but then how does /bin/cp itself copy a file?
<soLucien>
that is why you cannot know ahead of time what the utility will do
<eam>
are you sure you're correct about that?
<eam>
is it command line utilities all the way down?
<soLucien>
i mean of course you can know, but you need to write a semantic model of every command line utility
<eam>
soLucien: if /bin/cp uses another utility to copy files, what utility does it use?
rubie has joined #ruby
<soLucien>
looking at the man page i just posted, it is possible to write a syntactic mdoel of the cp statement
Synthead has joined #ruby
<soLucien>
the issue is there are zillions of utilities
<soLucien>
i don't know
<soLucien>
prolly some linux utility
<eam>
soLucien: maybe it doesn't use a utility?
<soLucien>
some linux API
<eam>
aha! an API!
<soLucien>
like win32 on win
<eam>
is there a syntactic model of an API?
<eam>
I suppose we could say the API *is* the model, yes?
<soLucien>
yes you can say that
riskish has joined #ruby
<eam>
ok, so if my program interacts with an API and not shelling out to random utilities, would you agree that such properties can be known?
<eam>
regarding behavior?
<soLucien>
that's utopian
<soLucien>
in Linux
<eam>
is it? Have you ever used a database?
<soLucien>
of course it would be amazing , but it would mean reqriting /bin/cp and all other utilities
<eam>
would you say that when I run an INSERT, reliable behavior regarding placing data in files will occur?
<eam>
or, maybe cp itself. Would you say that /bin/cp itself can reliably make copies of files? That we can predict that "cp foo bar" will copy foo into bar?
<soLucien>
yes, of course, but a database has a grammar
<soLucien>
YES
<soLucien>
but you need a grammar for that
<soLucien>
yes you can , eam
<soLucien>
that was my point
<soLucien>
look at the help page
<soLucien>
write a grammar for the arguments
<eam>
so you agree that we can develop a grammar to interact with a system, and that this system can have reliable, predictable behaviors
<soLucien>
then write a syntactic model
memorasus has joined #ruby
<eam>
and that this system can then move around the resulting data in reliable ways?
<soLucien>
i agree it is possible
<eam>
if you agree, then we've just worked out from a rather basic level how a CM system like puppet might function in a reliable fashion
<soLucien>
but utopian
<eam>
well, such things exist in practice
<eam>
though I'm flattered you hold this sort of thing in such high esteem
<soLucien>
eam this means writing a grammar for every possible utility from here on
<eam>
well, no -- we don't need any utilities
<eam>
we'll interact with an API instead
<soLucien>
it exists and it's called Windows PowerShell :D
Guest59843 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<soLucien>
i use it and i like it a lot
spudowiar has quit [Quit: Leaving.]
<soLucien>
but unix works with strings as far as i know
<soLucien>
strings that pipe to utilities
<eam>
both unix and powershell work with strings
<soLucien>
that pipe to strings
<eam>
I should say, both /bin/sh and powershell
<soLucien>
no , powershell has an object pipeline
<soLucien>
bin/sh pipes strings arounf
<eam>
powershell internally parses strings into objects
<soLucien>
powershell pipes objects
<eam>
but the input to powershell is a string
spudowiar has joined #ruby
jenrzzz has joined #ruby
<soLucien>
it's a string with a grammar and a semantic meaning
<soLucien>
which makes it an object
<eam>
soLucien: you had mentioned that you know what an API is. Do you think the unix API and the windows API differs significantly in terms of structure and function?
<soLucien>
yes they do differ
<soLucien>
significantly
<eam>
in terms of function? does one follow a radically different paradigm? If so, how so?
<soLucien>
security is totally different in windows
<soLucien>
so is the file system
LoneHerm_ has quit [Remote host closed the connection]
<eam>
how so?
nettoweb has joined #ruby
<soLucien>
NTFS vs ext4
<soLucien>
it is totally different
dpkezio has quit [Ping timeout: 250 seconds]
killerkamel has joined #ruby
<soLucien>
they are stored in a different format
<soLucien>
the access to the files is done differently
<soLucien>
there is no impersonation in Windows
<eam>
if it's so totally different, why is it I can mount NTFS on linux, and mount ext4 on windows and still interact with each system?
<eam>
perhaps it's the case that, while the APIs do have different conventions, they're mostly exchangable for one another
<eam>
such that, both systems have concepts like opening a file, using a descriptor, seeking, reading, writing, and so on
<eam>
one might even write a translation layer from one API to the other and call it WINE
jenrzzz has quit [Ping timeout: 258 seconds]
enilsen16 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nanoz has joined #ruby
<soLucien>
i have only worked with WMI, and never with the linux APIs
jenrzzz has joined #ruby
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<soLucien>
so i am speculating
<eam>
soLucien: I think you will find, as you learn more about the systems you work with, that these sorts of ideas aren't "utopian" rather they're every-day things
<soLucien>
but i understand how these things work
<soLucien>
well this omi is one of those efforts
rehat has joined #ruby
pawnbox has joined #ruby
<soLucien>
and Windows DSC is the other
<soLucien>
the issue comes when you want to manage 3rd party applications , not the OS itself
<soLucien>
unless the vendor writes the grammar to the command-line interface, you cannot know in advance what will happen
<soLucien>
i want to manage Nginx . There's no linux API that can help me there
<eam>
well sure there is. The answer is to not use command-line tools at all
<eam>
nginx has a plugin api
enilsen16 has joined #ruby
<eam>
in fact it's open source, so not only can you interface with an API, you can interact with its internals directly
<eam>
(using its internal API)
Magnesium has joined #ruby
RegulationD has joined #ruby
<soLucien>
that would mean rewriting all applications
<eam>
no, why would it?
<soLucien>
also , what is the point of interacting with the internals directly ?
<eam>
most of the software you use works this way, was developed this way
<eam>
maybe being a software engineer is a herculean undertaking?
<Magnesium>
Hio
<eam>
Magnesium: hello
<havenwood>
Magnesium: hi
<soLucien>
writing an all-new linux distribution with builtin state-based configuration is a herculean effort
<eam>
why would you write a new linux distribution?
SCHAAP137 has quit [Quit: Exiting...]
<soLucien>
because you don't like /bin/cp
<soLucien>
or /bin/mv
<eam>
that doesn't make sense, could you explain why a new distro would be necessary?
<soLucien>
you want to use the linux api directly
<soLucien>
i called it a new linux distro
<soLucien>
it's not
byteflame has joined #ruby
<eam>
I think I'd call it a new "linux program"
<soLucien>
i don't know how to call it
<eam>
because that's what programs do: they interact with the underlying API
<eam>
puppet is one such program
montagne_goat has quit [Read error: Connection reset by peer]
<soLucien>
ok a new linux program that somehow can do evrything all other linux programs do
<eam>
it's just not a very well designed one ;)
byteflame has quit [Client Quit]
<eam>
so you're asking, why create a configuration management program?
byteflame has joined #ruby
<soLucien>
why create a new CM program that tries to reinvent the linux subsystem
<eam>
which linux subsystem are you talking about?
arescorpio has joined #ruby
<soLucien>
ecosystem*
<eam>
does puppet reinvent a linux subsystem?
<soLucien>
utilities as we know them
<eam>
how do utilities relate to any of this?
<soLucien>
cp , mv, chmod, all these
<soLucien>
and even if it were possible, there are (important) software packages that do not have the same structure as nginx
<eam>
well, slow down, all we're talking about doing is placing a file
rubie has quit [Remote host closed the connection]
<eam>
that's all configuration management does, right? place files?
<soLucien>
place files or run commands
<soLucien>
that's what an admin does, right ?
<eam>
maybe not run commands?
byteflame has quit [Ping timeout: 244 seconds]
<eam>
what if you never ran a command?
<eam>
what if your linux system had no commands?
<soLucien>
why would it not ?
jenrzzz has quit [Ping timeout: 260 seconds]
<eam>
well, you've just raised a bunch of concerns as to their reliability
<eam>
maybe they're not necessary?
Cohedrin has joined #ruby
<eam>
what if we can do everything we want to do by only using an API?
<soLucien>
that's Windows Powershell, yes :D
<soLucien>
can you on Win ?
<soLucien>
sorry
<eam>
well, no, windows powershell isn't an API
<soLucien>
on linux*
<eam>
but the thing underneath it is
<eam>
you mentioned the win32 api. Windows also has a posix API
<eam>
and linux also has the win32 api as well as a posix compatible API
<eam>
it turns out, both systems implement the same interfaces under the hood!
<eam>
so we can do things like write a program that compiles on either windows or linux
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
<soLucien>
i still think the effort is unrealistic
<soLucien>
yes, it's a great idea
<eam>
you say it's unrealistic, but it's literally how every program on your computer works
<soLucien>
yes .. and every possible program on my computer
<soLucien>
takes more "human readable" inputs from me and turns them into API calls
<eam>
like your C compiler?
<soLucien>
no .. like my SSH client
<eam>
or C#, or java, or ruby
<eam>
well, all of these things do this, right?
cdg has quit [Remote host closed the connection]
<soLucien>
well yes
<soLucien>
i see where you are going
<eam>
so when I say "I bet you could write a CM system that computes file contents up front and places them reliably"
<eam>
or maybe if I say "I bet you could write a compiler that processes a language syntax and creates executable files"
<soLucien>
but still , you want to replace my git client with the API calls that it is comprised of, and reliably determine where it's going to place files
<eam>
furthermore, someone has built on both the internals of ruby and the API of libgit2 and provided a ruby gem: https://github.com/libgit2/rugged
<eam>
so it turns out, interacting with git internals is very easy in a language like ruby
flashpoint9 has joined #ruby
<eam>
we wouldn't need a CM system to interact with git, but we easily could if we wanted to
<soLucien>
you know what i find funny ? someone made a re-implementation of something in Ruby, re-compiled nginx with ruby and i bet there are 1231231123 projects like that
<eam>
Magnesium: sounds like your ruby program doesn't have "espeak" in the path
<Magnesium>
or identify if it is an issue with the install or the code
<Magnesium>
Oh
<eam>
Magnesium: popen is like backticks or system
<eam>
in that it's just running some other program
<Magnesium>
Should I be installing it into the ruby directory then?
pawnbox has joined #ruby
<eam>
that I don't know. I assume the gem will have docs on how to find the espeak program (or, maybe just read the source)
lele has quit [Ping timeout: 260 seconds]
kent\n is now known as kentnl
kentnl is now known as kent\n
<Magnesium>
It says I need to add it to the gemfile
<soLucien>
if i want to use a function from a powershell module in my Vagrant plugin i have to do jsonvar= `import-module psmodule ; get-jsoninformation` . then i have to do `import-module psmodule ; set-something`
<Magnesium>
trying that
craysiii has joined #ruby
gdonald has quit [Read error: Connection reset by peer]
l4v2 has joined #ruby
gdonald has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
allcentury has quit [Ping timeout: 252 seconds]
<Magnesium>
eam, the code and the error are now this, can you tell if the issue is still because ruby can't find espeak? http://hastebin.com/opibowaven.rb
<eam>
you're missing a require "espeak"
<eam>
require is what loads the gem into your program, creating the ESpeak class
<Magnesium>
I need both the 'require: 'espeak'' and 'require 'espeak''?
<Magnesium>
Oh, okay
<Magnesium>
and now it gives me the original error
<Magnesium>
I'll try installing into the ruby dir
nankyokusei has joined #ruby
<Magnesium>
that didn't seem to help either
jetpack_joe has joined #ruby
aeterne has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 260 seconds]
leitz has quit [Quit: Nappy time]
allcentury has joined #ruby
veduardo has joined #ruby
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 260 seconds]
LoneHermit has quit [Remote host closed the connection]
craysiii has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arescorpio has quit [Quit: Leaving.]
nanoz has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby
ecnalyr has joined #ruby
pawnbox has joined #ruby
ur5us has quit [Ping timeout: 258 seconds]
ecnalyr has quit [Ping timeout: 244 seconds]
LoneHerm_ has joined #ruby
mchelen2 has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
<P4Titan>
Hello all. I call the group_by function on an Array and get a hash. However, how can I set a default value to this hash after it is instantiated by group_by?
<ruby[bot]>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<jhass>
for when you want to know more about this method in particular
<pickandmix>
is that more of a rails thing?
ceritium has quit [Remote host closed the connection]
<pickandmix>
I completed codeacademy ruby's course yet now that I'm on the rails course, it's still feels unfamiliar.
<jhass>
calling a method or symols? not at all, it's very very fundamental to ruby
<pickandmix>
okay. perhaps I was missing out on something. I'll go read up on it, thank you jhass
Snowy has quit [Remote host closed the connection]
<jhass>
yw
karapetyan has quit [Remote host closed the connection]
chosen1_ has joined #ruby
nankyokusei has joined #ruby
flashpoint9 has joined #ruby
Guest34914 has joined #ruby
chosen1x has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
flashpoint9 has quit [Ping timeout: 250 seconds]
djbkd_ has quit []
<miqlas-H>
Hi Guys!
<miqlas-H>
Is there any gui addition to ruby?
allcentury has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
SCHAAP137 has joined #ruby
ur5us has joined #ruby
leitz has joined #ruby
leightski has joined #ruby
karapetyan has joined #ruby
rajdesai has joined #ruby
<rajdesai>
Hello guys! New to IRC.. Not sure where to start, what to do etc..
<rajdesai>
I am learning RoR right now and trying to explore it bit by bit..
kavanagh has quit [Quit: That's all folks!]
<Papierkorb>
rajdesai: Hello! This applies to every IRC channel I know of, just /join and ask away. For the first times, a 'hello' is nice too. Also, don't worry about asking in the wrong channel, people will direct you to the appropriate one in this case.
<Papierkorb>
rajdesai: Ruby on Rails specific help and discussion happens in #RubyOnRails, #ruby is for ruby-general help and discussion
<rajdesai>
Thanks papierkorb! Got it..
<rajdesai>
Is there a place where I can learn all commands/shortcuts?
<Papierkorb>
For shortcuts, consult the help pages (or configuration dialog) of your IRC client
<Zarthus>
for irc, '/quote help' lists most.
<jhass>
miqlas-H: Ruby comes with a Tk binding in the standard library, Gtk bindings live in the ruby-gnome2 (Gtk2) project and gir_ffi-gtk (Gtk3) and related gems
<miqlas-H>
Ok, thank you.
<jhass>
miqlas-H: not sure about a good QT or cocoa binding
<Papierkorb>
miqlas-H: There's also `qt-binding` for Qt4. It's no longer in development though :(
<jhass>
of course you could also use Java Swing through JRuby
<Papierkorb>
miqlas-H: And there's also `shoes-rb`, but I think it requires JRuby
<miqlas-H>
As Python have Bethon, it would be grat to have Huby for Haiku GUI.
<miqlas-H>
*notmydeskjustmy2cent
ec0 has quit [Ping timeout: 258 seconds]
nerium_ has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
Davedev28 has joined #ruby
saneax is now known as saneax_AFK
nerium_ has quit [Ping timeout: 258 seconds]
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Devalo has joined #ruby
<Papierkorb>
jhass: Great, didn't know about the gir_ffi bindings (in fact, didn't know about gir_ffi in general). Maybe I'll put this to use for some small-ish things later
sdothum has joined #ruby
rajdesai has quit [Remote host closed the connection]
<jhass>
yeah, gobject-introspection is a pretty nice idea
xall has quit [Ping timeout: 250 seconds]
allcentury has quit [Ping timeout: 276 seconds]
ur5us has quit [Remote host closed the connection]
Davedev28 has quit [Remote host closed the connection]
hanmac has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
moredhel has quit [Quit: byee]
moredhel has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
Devalo has quit [Remote host closed the connection]
<leitz>
So far I'm not sure about when to use "self.method()" and just "method()". Still understanding the uses of Modules vs Subclasses.
Devalo has quit [Ping timeout: 250 seconds]
hanmac has joined #ruby
Hyuk has joined #ruby
<harfangk>
leitz well my first answer is that self.method() is a class method, and method() is an instance method
<harfangk>
is there any other context to it?
Devalo has joined #ruby
BillSussman has joined #ruby
symm- has joined #ruby
RegulationD has joined #ruby
BillSussman has quit [Excess Flood]
nadir has joined #ruby
xall has joined #ruby
<leitz>
harfangk, the program calls the subclass, which inherits many methods from the parent. The program call is just one method, everything else is called from within the subclass to itself or the parent.
RegulationD has quit [Ping timeout: 250 seconds]
ecnalyr has joined #ruby
xall has quit [Ping timeout: 250 seconds]
<leitz>
For the most part when things break I assume operator error. I still have a lot to learn.
ec0 has quit [Ping timeout: 258 seconds]
<elomatreb>
leitz: Did you understand the def self.method vs def method thing?
<leitz>
elomatreb, not really.
<leitz>
So far I just add "self." until it works. :(
ecnalyr has quit [Ping timeout: 244 seconds]
<elomatreb>
If you're doing def self.method, you're defining a method on the class object, not on the instances
<al2o3-cr>
leitz: once you've grasped it, everything will become so apparent
<leitz>
If A is a subclass of B, and the program calls A, so far A's methods need "self."
<leitz>
al203-cr, yeah, but the coffee is slow to kick in this morning....
<leitz>
elomatreb, one of the things I'm tying to do is get Ruby more in use in the SysAdmin field. Have to show it works though, which means I have to learn it.
<matthewd>
Yeah, I think there are a couple of Os missing from this P.
<leitz>
matthewd, those tests predate the current refactor.
<matthewd>
If you don't have tests to support it, you're doing "changes", not "refactoring" :|
<leitz>
While tests should come frist, I'm already at the edge of my understanding, and trying to take it a bite at a time.
<jhass>
and that's totally fine here
<leitz>
Thanks! The original code from last year was a monster class that did everything. Trying to break it up while not duplicating code.
c355e3b has joined #ruby
<elomatreb>
leitz: IIRC there are quite a few admin tools that utilize Ruby, Chef and Vagrant come to mind (maybe also things like Metasploit). Not an admin person though, so idk
<leitz>
Yup, Puppet uses a Ruby DSL, just enough to mess you up. That's what pushed me into Ruby, Then I saw how much fun it was.
<leitz>
i used to be a (Python, C, Bash) snob but forgot how much fun this could be.
<elomatreb>
Yeah, that's something Ruby does quite well
<leitz>
jhass, a question about Constants. I'm using the "char" hash to passh things around from method to method. How does that work with a constant?
<elomatreb>
You can change that Hash assigned to the constant, although it's a bit of a code smell
<jhass>
leitz: I never said you should turn it into a constant
<elomatreb>
You can even completely reassign the constant, Ruby only warns you!
<jhass>
and actually turn it into an instance variable
chipotle has quit [Quit: cheerio]
<jhass>
and don't pass it around as much
chipotle has joined #ruby
Pumukel has quit [Ping timeout: 252 seconds]
<matthewd>
leitz: Are you familiar with objects & classes in python?
xall has joined #ruby
<leitz>
Some things don't change, like the muster_out Hash or the skill_options array.
<jhass>
and thus they should be constants
<jhass>
they're constant, make them constants
Madplatypus has quit [Quit: Connection closed for inactivity]
<leitz>
matthewd, only a little. This is the furthest I've gotten into OOP. More like ooP...
<matthewd>
leitz: If I said that "self." in ruby is the opposite of "self, " in the python argument list, would that help?
<leitz>
matthewd, not really. I haven't done Python for a year or more, Ruby has been my focus when I can make time to learn.
millerti has joined #ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
nankyokusei has joined #ruby
Devalo has quit [Ping timeout: 252 seconds]
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ruby
xall has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
xall has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
Es0teric has joined #ruby
cdg has joined #ruby
karapetyan has quit [Remote host closed the connection]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<leitz>
jhass, I started to play with moving @muster_out into Citizen.initialize, and realized it never gets called. The program creates an object from Character.rb and then just calls the "Citizen.run_career(char)" stuff.
karapetyan has joined #ruby
<leitz>
I probably need to quit using the same name for a variable and a method. :(
DoubleMalt has quit [Ping timeout: 264 seconds]
Yacker has joined #ruby
Yacker has quit [Client Quit]
<jhass>
creating classes is quite pointless if you never instantiate (call .new) them
xall has joined #ruby
<leitz>
Probably true. I'm going to re-read and try to understand the section on modules; things like "Citizen" just hold different attributes like "@skill_options" and overload a few methods like rank.
<jhass>
I do think classes make sense here
<jhass>
you just also have to create instances
interki has quit [Ping timeout: 276 seconds]
<leitz>
What would an instance of a class do to the Object "Character"? So far i'm just modifying Character with the "run_career" method.
<leitz>
Would you pass Character to Citizen.new(object)?
xall has quit [Ping timeout: 258 seconds]
<leitz>
And more importantly, would that object be modified so that the resultant object can be passed to another class?
pawnbox has quit [Remote host closed the connection]
<leitz>
The program flow in Chargen is "Create a Character.new, change it with Citizen, and then print it with Presenter."
<leitz>
The middle part, Citizen, will vary depending on the Career.
minotep has joined #ruby
<leitz>
Time to get ready for church. I need to keep my brain on this, and also re-work the test suite to test stuff as I go.
Guest34914 has quit [Ping timeout: 258 seconds]
kavanagh has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
kavanagh has quit [Client Quit]
xblade has joined #ruby
Guest34914 has joined #ruby
xall has joined #ruby
skweek has joined #ruby
minotep has quit [Ping timeout: 244 seconds]
xall has quit [Ping timeout: 240 seconds]
Spami has quit [Quit: This computer has gone to sleep]
xblade_ has joined #ruby
minotep has joined #ruby
benlieb has joined #ruby
xblade has quit [Ping timeout: 264 seconds]
creaked has quit [Ping timeout: 260 seconds]
xall has joined #ruby
Guest34914 has quit [Read error: Connection reset by peer]
Guest34914 has joined #ruby
Tempesta has quit [Quit: AdiIRC is updating to v2.4 Beta Build (2016/07/31) 32 Bit]
karapetyan has quit [Remote host closed the connection]
<jhass>
matthewd: doesn't the kernel always buffer the writes though?
<matthewd>
jhass: That's true for any IO.. but the kernel buffer has its limits
<jhass>
the_drow: doing nonblocking writes sounds like it would only worsen that situation, if having any effect at all
zacts has joined #ruby
<the_drow>
Why?
<matthewd>
the_drow: Why would it help?
<jhass>
my open(2) says "Note that this flag has no effect for regular files and block devices; that is, I/O operations will (briefly) block when device activity is required, regardless of whether O_NONBLOCK is set."
<matthewd>
Ah, fair enough
nhhc has joined #ruby
<matthewd>
the_drow: Or better, just elaborate on what you need to do
<jhass>
(and why flock doesn't cut it)
<the_drow>
I'm not sure flock doesn't cut it. I just don't see the performance improvement I'm expecting
nhhc has quit [Remote host closed the connection]
<the_drow>
I'm dumping data from multiple sources into a file
nhhc has joined #ruby
<jhass>
why do you expect an improvement if you have to serialize (= block other writers) anyway?
macsteps has quit [Remote host closed the connection]
macsteps has joined #ruby
<the_drow>
Because there is lots of outgoing/incoming I/O from & to the databases
<matthewd>
the_drow: Skip the thread body if you must, but at least the outer parts would help show how you're parallelizing
<the_drow>
k, Give me a sec.
pawnbox has quit [Ping timeout: 244 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
<jhass>
Cir0X: ; is here for brevity, use newlines in your real code
xall has quit [Ping timeout: 250 seconds]
<matthewd>
P4Titan: Without any context or indication of higher-level intent, I'm not sure how else one could write that. Use braces instead of do/end? ¯\_(ツ)_/¯
nankyokusei has joined #ruby
<P4Titan>
matthewd: ooh, Im sorry
<havenwood>
P4Titan: Does it do what you're hoping it'll do? What are you trying to do?
<P4Titan>
I'm setting a hash's default value to be a process that generates []
<P4Titan>
it works, but looks ugly which needless syntax like the |hash, key| which are unused and all
<havenwood>
another way to write: grouped_links.default_proc = proc { |h, k| h[k] = [] }
cats has left #ruby ["noodle"]
<P4Titan>
wait wait
<P4Titan>
the reason I stray from using default = [] is because it can be modified
minotep has quit [Ping timeout: 252 seconds]
<zacts>
ruby is so so cool
<P4Titan>
tho in my case, I don't do any modification, I feel like returning and empty list everytime something is referenced that doesn't exist
jenrzzz has quit [Ping timeout: 240 seconds]
<havenwood>
P4Titan: How are you using it?
<P4Titan>
the hash
<P4Titan>
I
<P4Titan>
I generate it by the function group_by
<matthewd>
P4Titan: If you use `.default = []` or `.default_proc = proc { [] }`, consider freezing the array; with either of those, mutation is going to have unexpected results
<P4Titan>
and I extract elements using key values
<P4Titan>
but if something isn't present, I want to return [] instead of nil
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<the_drow>
matthewd, I know what's blocking. Not sure if it's solveable
zacts has quit [Quit: WeeChat 1.4]
Jackneill_ has joined #ruby
UserInNeed has joined #ruby
P4Titan has quit [Ping timeout: 244 seconds]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dennisvennink has joined #ruby
cashnguns has quit [Ping timeout: 250 seconds]
CloCkWeRX has joined #ruby
xall has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
David__ has quit [Remote host closed the connection]
CloCkWeRX has quit [Client Quit]
memorasus has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
creaked has joined #ruby
jetpack_joe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xall has quit [Ping timeout: 240 seconds]
Kuukunen- has quit [Quit: leaving]
Kuukunen has joined #ruby
jishankai has quit [Ping timeout: 244 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
creaked has quit [Ping timeout: 240 seconds]
macsteps has joined #ruby
minotep has quit [Ping timeout: 244 seconds]
ecnalyr has joined #ruby
macsteps has quit [Ping timeout: 250 seconds]
ss_much has joined #ruby
c0mrad3 has joined #ruby
minotep has joined #ruby
ecnalyr has quit [Ping timeout: 244 seconds]
xall has joined #ruby
sche has quit [Quit: Leaving]
benlieb has joined #ruby
chipotle has quit [Quit: cheerio]
eljimmy has quit [Read error: Connection reset by peer]
xall has quit [Ping timeout: 260 seconds]
chipotle has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
saneax_AFK is now known as saneax
Cir0X has joined #ruby
ner has joined #ruby
jenrzzz has joined #ruby
gregf has joined #ruby
<ner>
Any suggestion on gem(s) that makes it possible to simulate virtual memory?
mtkd has quit [Ping timeout: 276 seconds]
<jhass>
not sure what you're thinking of
vuoto has joined #ruby
<ner>
jhass: I need to map one virtual adress/value (i.e the value 7) to another (say 10)
<ner>
with the restrictions involved in such a mapping
mtkd has joined #ruby
<jhass>
?xy
<ruby[bot]>
it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<jhass>
what's this for? what's the bigger picture?
nersoh has joined #ruby
<jhass>
it seems you seek to solve something on a too low level for a language like Ruby
Cir0X has quit [Quit: Leaving.]
jenrzzz has quit [Ping timeout: 250 seconds]
<ner>
Mapp virtual rows on a screen
<ner>
So if row 10 to 90 is shown row 1 on the screen points to 10 and so on
LoneHermit has joined #ruby
<jhass>
can't you just use an array and an offset?
QORRiE has joined #ruby
yardenbar has quit [Ping timeout: 244 seconds]
<ner>
jhass: Just for the storage, yes but there are a lot of restrictions
xall has joined #ruby
davedev24 has joined #ruby
<ner>
I.e two virtual rows can't point on the same row
naftilos76 has joined #ruby
<ner>
If anyone got any keywords to search that would be awesome. Can't find much …
LoneHermit has quit [Ping timeout: 258 seconds]
<jhass>
I would be surprised to find something tbh
the_drow has quit [Quit: This computer has gone to sleep]
xall has quit [Ping timeout: 265 seconds]
<jhass>
most people would consider it highly domain specific and you just happen to be able to map your highly domain specific problem to another highly domain specific but much lower level problem with for your usecase matching constraints
<jhass>
Ruby is a pretty high level language and so is the thinking of the community
saneax is now known as saneax_AFK
<ner>
jhass: Thanks for your input. I'll continue my research
daivyk has joined #ruby
Jahhein0 has quit []
Axy has joined #ruby
moeSeth has quit [Quit: Connection closed for inactivity]
benlieb has quit [Quit: benlieb]
kavanagh has joined #ruby
aryaching has joined #ruby
Mia has quit [Ping timeout: 240 seconds]
zacts has joined #ruby
pawnbox has joined #ruby
DoubleMalt has joined #ruby
krobzaur has joined #ruby
araujo_ has joined #ruby
Qommand0r has quit [Quit: Exiting...]
araujo has quit [Ping timeout: 244 seconds]
karapetyan has joined #ruby
alfiemax has joined #ruby
macsteps has joined #ruby
Qommand0r has joined #ruby
Rodya_ has joined #ruby
karapetyan has quit [Ping timeout: 244 seconds]
nanoz has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
benlieb has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
millerti has joined #ruby
rehat has quit [Remote host closed the connection]
<minimalism>
Is there a way to include text inside of a yield with erb so that it only appears if the attribute exists? (apologies if incorrect terminology) Example: <%= account.email "," %> so that the comma only appears if the email does?
sdothum has joined #ruby
minotep has quit [Ping timeout: 264 seconds]
moeSeth has joined #ruby
banisterfiend has joined #ruby
zacts has quit [Ping timeout: 276 seconds]
vuoto has quit [Remote host closed the connection]
macsteps has quit [Remote host closed the connection]
<Papierkorb>
>> nil + ','
<soLucien>
<%= account.email + ',' %>
<ruby[bot]>
Papierkorb: # => undefined method `+' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/614743)
<Papierkorb>
Or: ”No”
krobzaur has quit [Ping timeout: 240 seconds]
SCHAAP137 has quit [Remote host closed the connection]
Rodya_ has joined #ruby
Derperperd has joined #ruby
astrobun_ has joined #ruby
bluOxigen has joined #ruby
krobzaur has joined #ruby
JesseH has quit [Remote host closed the connection]
nankyokusei has joined #ruby
astrobun_ has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
xall has joined #ruby
macsteps has joined #ruby
pandaant has quit [Remote host closed the connection]
Rodya_ has joined #ruby
<minimalism>
jhass: Writing a template to display account information, and you know in the format of an address with "City, State" for exmaple.. the comma has to be there
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bigkevmcd has quit [Quit: Outta here...]
<minimalism>
I only want the comma to display if a specific attribute exists in the account, so it's not a stray "," in the template
nankyokusei has quit [Ping timeout: 250 seconds]
benlieb has quit [Quit: benlieb]
rubie has quit [Remote host closed the connection]
xall has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
<jhass>
I would do <%= account_address(account) %> with def account_address(account); [account.city, account.state].compact.join(", "); end or so
benlieb has joined #ruby
Wildfyr has quit [Ping timeout: 252 seconds]
T2ya has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
swills has quit [Ping timeout: 276 seconds]
DoubleMalt has quit [Remote host closed the connection]
<mustmodify>
Basically he has two modules that are included in a class. And whichever one runs first defines a method. And the second one appends to the method. I suspect he is trying to just keep the interface the same, which he happens. But it's so not worth the meta. But this guy loves meta, so that argument isn't going to fly with him.
<jhass>
suggest prepend + super, it should still feel "cool"
<jhass>
no other language has prepend
<harfangk>
why is that dev doing this
krobzaur has quit [Ping timeout: 252 seconds]
xall has quit [Ping timeout: 240 seconds]
<mustmodify>
harfangk: Originally it was just one of those modules with that one method name. He's trying to preserve the interface.
<harfangk>
couldn't he have refactored it to other kind of polymorphism
<mustmodify>
He could have done a million things. But I need to specifically say "This is bad because... " rather than just "do it another way" otherwise I'm not helping, IMO.
<jhass>
it's bad because it's verbose and hard to follow
<jhass>
it's no longer obvious where the method comes from
<jhass>
it adds unused methods to the public interface of the class that potentially don't even have correct behavior when called
sepp2k has joined #ruby
rubie has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
Es0teric has joined #ruby
<mustmodify>
jhass: I knew about prepend but I hadn't looked at it as a way to avoid adding methods to the public interface.
Es0teric has quit [Max SendQ exceeded]
<mustmodify>
interesting.
Snowy has joined #ruby
Es0teric has joined #ruby
xall has joined #ruby
Snowy has quit [Client Quit]
<harfangk>
mustmodify yeah my main gripe is that the method will be too inconsistent and context dependent
nankyokusei has joined #ruby
<harfangk>
what would happen when there's a new module HasRefurbishedParts
<harfangk>
you might as well make the order of inclusion some kind of race condition just to spice things up
xall has quit [Ping timeout: 244 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has quit [Read error: Connection reset by peer]
dhodgkin has quit [Quit: Leaving]
dhodgkin has joined #ruby
minotep has quit [Remote host closed the connection]
benlieb has joined #ruby
minotep has joined #ruby
chipotle has quit [Quit: cheerio]
dhodgkin has quit [Client Quit]
dhodgkin has joined #ruby
_richardson_ has joined #ruby
creaked has joined #ruby
thinkvantage has joined #ruby
krobzaur has quit [Ping timeout: 276 seconds]
phrozen77 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Dysp has joined #ruby
xall has joined #ruby
creaked has quit [Ping timeout: 258 seconds]
Synthead has quit [Ping timeout: 276 seconds]
xall has quit [Ping timeout: 252 seconds]
<Dysp>
I have an array: [[x], [y]]. Then I slice! x-array away and end up with [[y]]. How do I remove the outer array? [y] is a little more complicated, it is: [[1, 2, 3...], [4, 5, 6...]] and must stay like this.
Devalo has joined #ruby
<Dysp>
I've tried flatten!, but doesn't seem to work out like I want.
<toretore>
a = a[1]
<Dysp>
Yes. I could do work arounds like that.
<toretore>
why is it a workaround?
<Dysp>
But, I wondered if there was any other ways of doing it.
<Papierkorb>
Dysp: a.flatten(1)
rubie has quit [Remote host closed the connection]
<Dysp>
Papierkorb: Unfortunately not
<Papierkorb>
?
mustmodify has quit [Quit: Page closed]
ss_much has quit [Quit: Connection closed for inactivity]
<Papierkorb>
"Doesn't work" is never a valid problem description
<Dysp>
Alrighty. What I thought too. Must be something else messing it up, then.
<Dysp>
Thank you for clarifying
Devalo has joined #ruby
LoneHermit has joined #ruby
kirun has joined #ruby
framling has quit [Ping timeout: 265 seconds]
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
mfb2 has joined #ruby
xall has joined #ruby
thinkvantage has quit [Quit: Konversation terminated!]
Synthead has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
xall has quit [Ping timeout: 258 seconds]
millerti has joined #ruby
<Majost>
Anyone know how to resolve this issue with Ruby 2.1.8? I tried updating rubygems to the latest, but it didn't seem to help. https://www.irccloud.com/pastebin/V7jeiXi0/
<soLucien>
i have a external module which is located in another folder (../../packages/my-external dependency). I want this to be included in the .gem file in lib/driver
<soLucien>
is this possible ?
<soLucien>
or should i copy the files into /lib/driver first
<soLucien>
then run gem build
<soLucien>
?
<jhass>
given files is an array and not a hash, I don't see how rubygems would magically know that you want them in lib/driver
Macaveli has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
rubie has quit [Remote host closed the connection]
bluOxigen has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
Devalo has quit [Remote host closed the connection]
gregf has quit [Ping timeout: 260 seconds]
<soLucien>
alright, so copy the external lib at build-time before running gem build
<JakeP>
Is anyone able to help me with what seems like a simple issue I'm having with interpolation, trying to add an integer into a string which would increment every loop cycle. It's changing a username by 1 each time, for example Jake1 would change to Jake2, then Jake3, etc.
<JakeP>
So would it be right for my username string to look like: username = "Jake1".succ to be called further down in my program?
ur5us has joined #ruby
jenrzzz has joined #ruby
LoneHermit has quit [Ping timeout: 250 seconds]
symm- has joined #ruby
Chris3y_RubyNewb has joined #ruby
macsteps has quit [Remote host closed the connection]
jondot has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
<toretore>
JakeP: give more details about what you're trying to do
ur5us has quit [Ping timeout: 252 seconds]
<JakeP>
Sorry, basically I'm trying to loop through a sign up process with the username starting at Jake1, signing up then finishing the loop. As it starts again, the username should be Jake2 while the process completes, etc.
gregf has quit [Quit: WeeChat 1.4]
<jhass>
show what you have and what it produces instead of the desired result
<JakeP>
The code on line 59 to 63 is what sets the current login details, but when trying many different methods of interpolating the integer into the string, it just causes the program to hang
<toretore>
you have to change user to $user
<toretore>
that way it'll work
al2o3-cr has joined #ruby
<JakeP>
Oh really? Wow, have I really been missing something so simple?
<toretore>
and put the $user = "O9kG1" at the top
<JakeP>
That gives me an undefined local variable
tvw has quit [Ping timeout: 260 seconds]
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
millerti has joined #ruby
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
Dimik has joined #ruby
<JakeP>
I did change the #{user.succ} to #{$user.succ} which would be right when referencing the global variable, right? That gave me an error with succ.
Guest34914 has quit [Ping timeout: 264 seconds]
gregf has joined #ruby
naftilos76 has quit [Quit: Αποχώρησε]
<xpitr>
JakeP that while !email_arrived loop is deadly
<JakeP>
Okay the succ error has gone, but the program still hangs when it gets to that part.
<JakeP>
It is?
<xpitr>
maybe thats where it hangs
Guest34914 has joined #ruby
<xpitr>
yes, it will absolutely flood the server, and only sleep if it errors
leea has joined #ruby
<JakeP>
Ah wow, I did not know that! Any idea how I can make that less intensive?
<xpitr>
sleep after/before open()
<JakeP>
Ohh that makes sense
<JakeP>
Thanks for that, I'd not have spotted that issue!
vdamewood has joined #ruby
<soLucien>
what's the best place to see the ruby api ?
<xpitr>
anyways the main problem i think is that you set user = "something" and then immediately call succ on it
<jhass>
soLucien: I like devdocs.io
<xpitr>
this works, but next time you call it you again set it to something and again call succ on original string
<xpitr>
with each loop it ends up with the same result because it has the same input
<JakeP>
Ohh, I did try using i = 0 then using username = "O9kG#{(i += 1).to_s}" to no avail, I'm guessing that would pretty much do the same thing when it loops round though..
<xpitr>
you can make create_account method take 1 argument and add that to user. eg. def create_account(id) ..... user = "foobar#{id}" . and then in the loop where you call that method, add counter there
<JakeP>
I'll give that a try, that makes much more sense! Many thanks
<xpitr>
you even have counter variable already
<xpitr>
just pass it to the method
<JakeP>
Yeah, shouldn't be too difficult, thank you :)
macsteps has quit [Remote host closed the connection]
<JakeP>
It's been eating at my brain all afternoon haha
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jondot has quit [Quit: Leaving.]
Devalo has joined #ruby
johnmilton has quit [Quit: Namaste]
johnmilton has joined #ruby
rubie has quit [Remote host closed the connection]
zyriuse has joined #ruby
bmurt has joined #ruby
Devalo has quit [Ping timeout: 244 seconds]
<JakeP>
Sorry to be a pest, but I gave the method an argument of (id = 0) as it complained at just (id), which made me assume I had to give it a default value (which would also change with the counter, right?) and I receive no errors, yet my program still hangs before finishing the create_account method
ruid has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
Guest92294 has joined #ruby
NightMonkey has quit [Ping timeout: 244 seconds]
<zyriuse>
i dont understand why i get this error in my code ?
<JakeP>
The only thing I see is, if(defined?(mysql_select).nil? does not have a closing parenthesis
kavanagh has quit [Quit: That's all folks!]
ur5us has joined #ruby
<zyriuse>
lo
NightMonkey has joined #ruby
<zyriuse>
JakeP: lol...
<zyriuse>
i really need to go to sleep
<Papierkorb>
JakeP: I do see a redundant opening parantheses :P
<zyriuse>
loll.......
nertzy has joined #ruby
<JakeP>
I didn't read the code, I just scanned through to find the missing, or should I say offending parenthesis :P
<zyriuse>
thk men ;)
<JakeP>
No problem, a second set of eyes is always good.
<JakeP>
Just a shame I can't see why my own code won't work, an error code would make things so much easier..
<Papierkorb>
JakeP: Use rubocop, your text editor of choice most likely has an integration for it available
rubie has joined #ruby
jaguarmagenta has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<JakeP>
I'm fairly new to Ruby, so I'll have to look up an IDE to use Rubocop with, I've just been using notepad++ for my editing needs haha
macsteps has joined #ruby
lkb_ has quit [Quit: Wychodzi]
<Papierkorb>
JakeP: try Atom Editor
<JakeP>
I will do, thank you
rubie has quit [Remote host closed the connection]
RegulationD has joined #ruby
nankyokusei has joined #ruby
kriskropd has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
Davedev28 has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
yardenbar has quit [Ping timeout: 264 seconds]
pandaant has joined #ruby
MarkBilk has joined #ruby
jenrzzz has joined #ruby
Mirubiri has joined #ruby
byteflame has quit [Ping timeout: 258 seconds]
workmad3 has joined #ruby
hahuang61 has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
davedev24 has quit [Remote host closed the connection]
pickandmix has quit [Quit: WeeChat 1.5]
karapetyan has joined #ruby
<Chris3y_RubyNewb>
what's everyones opinion on using () when passing args to methods or class initializers? I come from c# so feel most comfortable using them with commas. Should I try to adopt no parenthesis and use space delimiters instead while learning ruby? The dilema I have is sometiems it looks really nice without them and others it looks really clear with them. Is consistency important in your view? As in,
<Chris3y_RubyNewb>
should I pick one and stick with it or go with whatever feels better at the time?
davedev24 has joined #ruby
<Papierkorb>
Chris3y_RubyNewb: you still use commas in ruby
jaguarmagenta has quit [Remote host closed the connection]
<toretore>
Chris3y_RubyNewb: if in doubt, add (), except for empty arg list
<Papierkorb>
Chris3y_RubyNewb: If given the choice, I use what I think looks nicer
jaguarmagenta has joined #ruby
<Chris3y_RubyNewb>
nicer at the time?
<toretore>
yes, sometimes () looks better, other times not
<Chris3y_RubyNewb>
cool
<Chris3y_RubyNewb>
and it's not some horrendous faux par to mix and match?
CodingWolf has quit [Read error: Connection reset by peer]
<Papierkorb>
Not really, no
<toretore>
there are two cases that never look good: `obj.method()` and `def method arg1, arg2`
<Yxhuvud>
yeah well, it'd be baz: wat using keywords
<Chris3y_RubyNewb>
ok that makes sense and I had come to the same conclusion with def method I'm just trying to be open minded as possible and feel the need to question this stuf!
<Chris3y_RubyNewb>
you people are a god-send :)
<toretore>
there's a lot of weird old japanese code that uses it
kriskropd has joined #ruby
<Papierkorb>
>> god.send(:"#ruby")
<ruby[bot]>
Papierkorb: # => undefined local variable or method `god' for main:Object (NameError) ...check link for more (https://eval.in/614833)
<Chris3y_RubyNewb>
ha
<JakeP>
Rip, rubocop doesn't like tabs.
<toretore>
nobody likes tabs
<Papierkorb>
JakeP: Ruby as a community only uses 2-spaces for indention
<JakeP>
Coming from Java quite a long time ago, it was just habit. haha
<Papierkorb>
If there is one thing everyone agrees on, it's this one rule. 2 spaces.
<JakeP>
Time to replace all tabs with 2 spaces.
<Papierkorb>
s/\t/ /g
<JakeP>
Not sure how to apply that
<Papierkorb>
ah well, just use your text editors search and replace functionality if it doesn't have something to replace the current indention
<JakeP>
Understood :P
ecnalyr has joined #ruby
davedev24 has quit [Remote host closed the connection]
karapetyan has joined #ruby
banisterfiend has joined #ruby
nankyokusei has joined #ruby
<ytti_>
gg=G in vim
Davedev28 has quit [Remote host closed the connection]
<ytti_>
to reindent whole file
ecnalyr has quit [Ping timeout: 244 seconds]
st0mar has quit [Quit: quit]
nankyoku_ has joined #ruby
ensyde has joined #ruby
cdg_ has quit [Remote host closed the connection]
<Chris3y_RubyNewb>
JakeP - the sublime text editor will save you a lot of time for that :)
cdg has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
<Chris3y_RubyNewb>
in bottom right you can easily convert tabs to spaces (and set amount) etc
<JakeP>
Already done it, just used alt code 09 then two spaces with find and replace, worked fine xD
davedev24 has joined #ruby
moneylotion has quit [Quit: ZNC 1.6.3 - http://znc.in]
moneylotion has joined #ruby
moneylotion has quit [Changing host]
moneylotion has joined #ruby
<Chris3y_RubyNewb>
ah well :)
Guest34914 has quit [Ping timeout: 276 seconds]
nankyoku_ has quit [Ping timeout: 265 seconds]
Guest34914 has joined #ruby
karapetyan has quit [Remote host closed the connection]
pickandmix has joined #ruby
cdg has quit [Ping timeout: 258 seconds]
jaguarmagenta has quit [Ping timeout: 276 seconds]
karapetyan has joined #ruby
Jackneill_ has quit [Remote host closed the connection]
symm- has joined #ruby
pickandmix has quit [Client Quit]
toretore has quit [Ping timeout: 240 seconds]
davedev24 has quit [Remote host closed the connection]
zacts has joined #ruby
<JakeP>
So I've cleaned up my code, fixed errors with spacing/whitespace, extra lines, etc. but I still can't fix my issue hahaha
nankyokusei has joined #ruby
jaguarmagenta has joined #ruby
jottr has joined #ruby
pickandmix has joined #ruby
cyphase has quit [Ping timeout: 258 seconds]
<pickandmix>
Guys, I'm trying to use rvm to install ruby version 2.1, but after installing I get this issue http://codepad.org/FWz0WKvp
<pickandmix>
it conflicts with weechat somehow, can anyone help?
jottr has quit [Client Quit]
jottr has joined #ruby
<Chris3y_RubyNewb>
missing end tags are the worst :z
sleepee has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
nankyokusei has quit [Ping timeout: 264 seconds]
<JakeP>
Yes, they are. I remember good old 100 errors in java compilers due to missing end tags.
<JakeP>
Guys, why can't I use a global variable with a counter that increments said variable, interpolated within a string.. It does nothing, no errors, it still just hangs my program :(
pickandmix has quit [Quit: WeeChat 1.5]
lxsameer has quit [Quit: WeeChat 1.5]
SuperLag has quit [Quit: leaving]
JeanCarloMachado has quit [Quit: Lost terminal]
JeanCarloMachado has joined #ruby
<JakeP>
Can't even use constant variables with a counter, referenced in my string D:
mfb2 has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
zyriuse has quit [Ping timeout: 250 seconds]
cdg has joined #ruby
<dreamyspell>
JakeP: if you've already interpolated the variable, you've converted it to a string and since it's no longer an integer, you can't increment it the same way. using constants for this is farther away from what you want, because a constant is never supposed to change.
skade has joined #ruby
SuperLag has joined #ruby
SuperLag has quit [Changing host]
SuperLag has joined #ruby
Yacker has joined #ruby
SuperLag has quit [Client Quit]
<JakeP>
Yeah, I thought as much. Are you able to shed some light on my issue? I've exhausted everything I can think of so far.
Madplatypus has quit [Quit: Connection closed for inactivity]
JeanCarloMachado has quit [Ping timeout: 265 seconds]
chipotle has quit [Quit: cheerio]
JeanCarloMachado has joined #ruby
<JakeP>
Lines 9, 58 and 174 are the three that need addressing
karapetyan has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 240 seconds]
jaguarmagenta has quit [Ping timeout: 260 seconds]
chipotle has joined #ruby
chipotle has quit [Client Quit]
T2ya has joined #ruby
qguv has joined #ruby
<dreamyspell>
JakeP: undefined local variable or method `integer' for main:Object -- is this the kind of error you're seeing?
<JakeP>
Nope, I receive no errors at all, just the program hangs when it comes to the username
sarbs has joined #ruby
<JakeP>
If it would give me an error, I'd sort of know where to look, but I get no indication
Mirubiri has joined #ruby
<JakeP>
It's like, I can put random numbers after the username without any issues, but as soon as I want it to count from 1 to 100 as a suffix, it hangs..
pandaant has quit [Remote host closed the connection]
<JakeP>
username = "O9kG#{5.times.map{ Random.rand(9) }.join}" is how I would do my random sequence of numbers trailing the username, but it's far from clean when it comes to knowing the login details
hahuang61 has joined #ruby
sarbs has quit [Max SendQ exceeded]
skade has quit [Read error: Connection reset by peer]
<dreamyspell>
JakeP: i think it's because it's a global variable, lemme check something
sarbs has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
qguv has quit [Ping timeout: 264 seconds]
<soLucien>
ok i have a external package that i want to bundle together with my gem
<soLucien>
what's the convention for this kind of package? Where is it stored?
LoneHerm_ has joined #ruby
<soLucien>
is it inside the lib folder, or outside ? a vendor folder of some sort ?
LoneHerm_ has quit [Remote host closed the connection]
sagax has quit [Ping timeout: 258 seconds]
<dreamyspell>
use your Gemfile to define dependencies
<soLucien>
this dependency is a .nupkg
<soLucien>
i am sure the dependency resolver cannot resolve nuget packages
<JakeP>
dreamyspell: I've tried all sorts, it needs to save the incremented number after every loop, hence the counter, but I can't reference a standard counter in another block.
<dreamyspell>
ah, dunno then, soLucien
<soLucien>
so what i do i copy it into a folder at build time
<soLucien>
just wondering what that folder should be
akkad has joined #ruby
<soLucien>
fine, i'll place it in lib/driver
hahuang61 has quit [Ping timeout: 258 seconds]
<dreamyspell>
JakeP: i think it's hanging before line 174, i put a message *before* the increment line and it did not print
<JakeP>
Yeah, it's line 58 where it hangs
kobain has joined #ruby
<dreamyspell>
ah, for me it's 96, because of the rescue block being triggered
jhack has joined #ruby
<dreamyspell>
but you're right, it does hang after 58
jaguarmagenta has joined #ruby
_richardson_ has quit [Quit: Saindo]
gregf has quit [Quit: WeeChat 1.4]
gregf has joined #ruby
jaguarma_ has quit [Ping timeout: 250 seconds]
memorasus1 has joined #ruby
synaps3 has joined #ruby
<JakeP>
dreamyspell: it's just really confusing me.. I may not have much Ruby experience, but I know other languages pretty well, and this just doesn't add up for me xD
Es0teric has joined #ruby
zacts has quit [Quit: WeeChat 1.4]
<dreamyspell>
i'm not really sure what's up either, sorry. i'm still the beginner myself
cdg has quit [Remote host closed the connection]
AndyBotwin has joined #ruby
pickandmix has joined #ruby
<dreamyspell>
sorry JakeP, i hoped i could help figure it out. maybe someone else will have better luck
<JakeP>
It's all good, I really appreciate your help anyway :)
<dreamyspell>
np!
memorasus has quit [Ping timeout: 260 seconds]
memorasus1 is now known as memorasus
hipertracker has quit [Quit: hipertracker]
macsteps has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 264 seconds]
saneax_AFK is now known as saneax
<pickandmix>
anyone using arch linux with rvm?
<pickandmix>
does rvm use weechat or smth? Why is it that I'm getting errors in the rvm code with regards to weechat.
Mirubiri has quit [Quit: Mirubiri]
matp has quit [Remote host closed the connection]
MarkBilk has quit [Ping timeout: 250 seconds]
nertzy has quit [Ping timeout: 252 seconds]
solars has quit [Ping timeout: 260 seconds]
nertzy has joined #ruby
helllojesus12 has joined #ruby
zacts has joined #ruby
ruid has quit [Ping timeout: 240 seconds]
sleepee has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Quit: Lost terminal]
MadGrin has joined #ruby
MarkBilk has joined #ruby
JeanCarloMachado has joined #ruby
<hammond>
I find ruby to be slow
<zacts>
hammond: for what application?
<hammond>
I'm trying to take input abut it takes forever and isn't blitz fast
<zacts>
what kinds of input?
<al2o3-cr>
troll off
<zacts>
yeah
<hammond>
simple one. mine, i have a loop that takes user input, just a string.
<zacts>
hammond: well if you are serious, there are ways to buffer input
<hammond>
how? I am serious
<zacts>
hammond: ok, so what kind of input is it?
<zacts>
is it a comma separated value list?
<zacts>
is it structured data?
<zacts>
JSON?
<zacts>
is it a string of bytes?
<hammond>
I'm using gets to take a simple string like "isConnected"
symm- has quit [Ping timeout: 276 seconds]
<hammond>
string of chars
OTORelic has joined #ruby
<zacts>
hammond: would you mind, or are you able to paste any code into a pastebin?
<hammond>
let me try
Devalo has joined #ruby
<zacts>
(note: I didn't mean for that to sound rude. :-))
<zacts>
I'm just super multi-tasking right now
<zacts>
:-D
solars has joined #ruby
<hammond>
zacts: http://pastebin.com/b5kKUW5h ok i jst pasted a proto-type i don't want to hear I'm a evil coder.