apeiros_ has quit [Remote host closed the connection]
thatRD has quit [Ping timeout: 260 seconds]
bwlang has left #ruby [#ruby]
bwlang has joined #ruby
adeponte has joined #ruby
frogstarr78 has quit [Remote host closed the connection]
thatRD has joined #ruby
delinquentme has joined #ruby
slainer68 has joined #ruby
wroathe has joined #ruby
<delinquentme>
in a method ... ( nm if this is a long answer ) but basically you're calling a method once ... shouldn't all the input vars be instance vars??
<swarley>
what
hamfz_ has quit [Ping timeout: 272 seconds]
h4mz1d has quit [Ping timeout: 272 seconds]
subbyyy has quit [Quit: none 0.3.9.2]
subbyyy has joined #ruby
subbyyy has quit [Client Quit]
Saffronique has joined #ruby
subbyyy has joined #ruby
h4mz1d has joined #ruby
hamfz_ has joined #ruby
hack has joined #ruby
rburton- has joined #ruby
slainer68 has quit [Ping timeout: 276 seconds]
griffindy has quit [Quit: Computer has gone to sleep.]
subbyyy has quit [Quit: none 0.3.9.2]
subbyyy has joined #ruby
ryannielson has quit [Quit: ryannielson]
drago757 has joined #ruby
aapzak has quit [Ping timeout: 255 seconds]
<delinquentme>
is this a reliable way to reorder the date? "11/30/2012".split("/").reverse.join("-")
<swarley>
As long as you're only expecting strings like that, yes.
havenn has joined #ruby
aapzak has joined #ruby
n1x has joined #ruby
icole has joined #ruby
asteve has joined #ruby
Saffronique has quit [Quit: restart]
yacks has joined #ruby
havenn has quit [Remote host closed the connection]
BoomCow has quit [Quit: This computer has gone to sleep]
havenn has joined #ruby
jacktrick has joined #ruby
Saffronique has joined #ruby
subbyyy has quit [Ping timeout: 276 seconds]
breakingthings has quit []
nomenkun has joined #ruby
havenn has quit [Ping timeout: 272 seconds]
benlieb has joined #ruby
BoomCow has joined #ruby
joofsh has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 272 seconds]
havenn has joined #ruby
Nisstyre has quit [Read error: Connection reset by peer]
centipedefarmer has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
artnez has joined #ruby
hack is now known as megha
mockra has joined #ruby
Playground has joined #ruby
lolcathost has quit [Read error: Connection reset by peer]
Saffronique has quit [Ping timeout: 240 seconds]
browndawg has joined #ruby
mockra has quit [Ping timeout: 252 seconds]
Saffronique has joined #ruby
sorbo_ has joined #ruby
adeponte has quit [Remote host closed the connection]
Saffronique has quit [Ping timeout: 252 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
adeponte has joined #ruby
noc` has joined #ruby
Saffronique has joined #ruby
wroathe has quit [Ping timeout: 246 seconds]
wroathe has joined #ruby
DaZ has quit [Ping timeout: 272 seconds]
ananthakumaran has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
<Kovensky>
hmm, this celluloid thingy looks interesting
g0bl1n has quit [Quit: Ex-Chat]
radic has quit [Disconnected by services]
radic_ has joined #ruby
wroathe has quit [Ping timeout: 255 seconds]
DaZ has joined #ruby
browndawg has quit [Quit: Leaving.]
DylanJ has left #ruby [#ruby]
baroquebobcat has joined #ruby
crackfu has quit [Remote host closed the connection]
crackfu has joined #ruby
yshh has quit [Remote host closed the connection]
baroquebobcat has quit [Client Quit]
yshh has joined #ruby
S1kx has quit [Quit: Leaving]
slainer68 has joined #ruby
xyzodiac has joined #ruby
kurioscreative has joined #ruby
kurioscreative has quit [Client Quit]
crackfu has quit [Ping timeout: 248 seconds]
sailias has joined #ruby
slainer68 has quit [Ping timeout: 260 seconds]
benlieb has quit [Quit: benlieb]
sailias has quit [Read error: Connection reset by peer]
andrewhl has joined #ruby
ehlu has quit [Quit: WeeChat 0.3.8]
adeponte has quit [Remote host closed the connection]
jacktrick has quit [Quit: Leaving]
TheFuzzball has joined #ruby
tommyvyo has joined #ruby
Playground has quit [Read error: Connection reset by peer]
<danneu>
delinquentme: of course, if you wanted something more robust, you'd parse it with Ruby stdlib or another lib (like Chronic) and then reoutput it.
<danneu>
which is what i would do. it's only slightly less trivial
<delinquentme>
danneu, in regards to the date reordering?
<danneu>
delinquentme: yeah
adeponte has joined #ruby
<RubyPanther>
delinquentme: it isn't very reliable because US and Australian formats swap the month and day. If you use a lib function, then you can more easily and clearly account for that sort of thing.
PragCypher has quit [Quit: Leaving]
<delinquentme>
with the additional input of whos date format you're using
<Kovensky>
you mean "US" and "rest of the world"
<RubyPanther>
Also then somebody can look at the code, without seeing the input, and know which is the month and day fields. If you just reverse, they have puzzle that out.
<delinquentme>
or a geography or something
<danneu>
It's also more readable to parse it and then reoutput it. Intention is clear.
<Kovensky>
everyone should just adopt japanese gregorian dates: year年month月day日
<Kovensky>
or ISO 8601 <_<
<RubyPanther>
No, actually, the standard most of the world is using now is year-month-day, the one he's converting to
<sorbo_>
you mean MURRRKA and THEM SOCIALISTS
adeponte has quit [Remote host closed the connection]
<Kovensky>
Y-m-d is ISO 8601
saispo has quit [Ping timeout: 260 seconds]
<danneu>
Y-m-d or d-m-Y? nonsense. "m d, Y". murica
* Kovensky
writes dates in Y-m-d whenever he can get away with it
<Kovensky>
exceptions are forms that have tiny spaces for day/month and a long space for year
ehlu has joined #ruby
asteve has quit [Quit: Computer has gone to sleep.]
<RubyPanther>
European dates can be distinguished by being d.m.y as opposed to m/d/y and d/m/y, which is why it is mostly US and AU that are confused
Guest9041 has quit [Ping timeout: 276 seconds]
_nitti has joined #ruby
Guest9041 has joined #ruby
browndawg has joined #ruby
mockra has joined #ruby
<RubyPanther>
Thai dates are D/M/Y but are easily identified by the Buddhist calendar which is 543 years ahead. Although software that makes that assumption will become obsolete in a few hundred years.
_nitti has quit [Remote host closed the connection]
Bry8Star has joined #ruby
Bry8Star_ has quit [Ping timeout: 276 seconds]
jduan1981 has quit [Read error: Connection reset by peer]
<shevy>
do you guys tend to write more classes or more modules?
jduan1981 has joined #ruby
<shevy>
RubyPanther i prefer dd.mm.yyyy, yyy.mm.dd is ok too. but I absolutely hate mm.dd.yy ... that one just doesnt make sense... it goes middle-minor-max ... the other two are at least logical... minor-middle-max or max-middle-minor
tommyvyo_ has joined #ruby
<wmoxam>
shevy: I like yyyy.mm.dd because it easily sortable
<Kovensky>
big-endian dates ftw
<shevy>
as long as its not mm.dd.yyy
<shevy>
what is a big indian date
<shevy>
a date with a large indian girl?
<Kovensky>
no, a date that's written with the "big end first"
<alex20032>
i prefer having syntaxic rule to follow than identation
jonahR has quit [Remote host closed the connection]
<shevy>
alex20032 "indentation" please :(
<alex20032>
like {}
<RubyPanther>
emacs ruby-mode should give you 2 spaces with no tab chars by default
<RubyPanther>
Matz had the wisdom to define a correct answer for this early on. ;)
<sorbo_>
One of the few "correct" answers in Ruby, IMO
<shevy>
hehe
* Kovensky
likes 4 spaces :(
<lolcathost>
swarley: Sorry, I was not paying attention. It's just my hostname.
<sorbo_>
alex20032: You'll find Ruby usually gives you a bunch of ways to accomplish any given task and lets you do your own thing
<RubyPanther>
Ruby has lots of "correct" answers, but the wrong answers are usually permitted. ;)
<sorbo_>
Which I like a lot.
<sorbo_>
RubyPanther: Yeah, that's a better way of putting it.
<alex20032>
i prefer ruby over python already
<shevy>
Kovensky, as long as it is not tab, that is ok, but there is one thing in favour of 2 spaces in addition to that - you can put more stuff into a line (if you still want to limit the length, i.e. 80 chars / line)
<Kovensky>
<alex20032> i know that SDL, and libzip and surely also QT <-- QT has no bindings to any language, and all the bindings that get made are eventually abandoned
<Kovensky>
PySide is the only one I know of that hasn't been abandoned (yet)
<alex20032>
better to teach OO, and also, its more serius, no space indentation for block of code...
<sorbo_>
alex20032: Haha yeah, I had that realization a bit ago too
<shevy>
yeah it is tough
<RubyPanther>
Unlike Perl, we attach moral value to correct techniques even while refusing to prevent incorrect or blasphemous techniques.
<shevy>
ruby-qt is not in a super active state as far as I know
<swarley>
I think ruby-gnome was dropped, wasn't it?
<aedorn>
QtBindings is still being maintained when needed.
<RubyPanther>
Yeah, everybody uses Gtk
<shevy>
not dropped, but much less active than ~3 years ago swarley
<shevy>
I think the mobile sector is slowly killing those traditional GUIs, at least the language bindings :(
<alex20032>
i am opening a programming club at my college...
<alex20032>
and i was checking which language i will try to promote
slainer68 has joined #ruby
<shevy>
including a bit of striptease while coding?
<swarley>
Ruby is definitely a readable one
<alex20032>
C, Java and Ruby are the language i will promote
<swarley>
Good for beginners
<sorbo_>
Agree with C and Ruby. Java hurts my soul.
<swarley>
^
<shevy>
java is too verbose
<swarley>
Java is just camel case and line noise
<alex20032>
too verbose?
<shevy>
hmm is java more verbose than c#?
<alex20032>
C is too vcerbose...
<shevy>
yeah alex20032
<alex20032>
in C, you have to redefine everything
<RubyPanther>
You can use C on android if you're willing to write a light wrapper in Java
<shevy>
C can be very short
<swarley>
I can do thinks faster in C than java lol
<swarley>
things*
<Kovensky>
the only reason I can think of to use Java is for coding to android
<alex20032>
but java is more portable
<shevy>
public void service(final ServletRequest request, final ServletResponse response)
<Kovensky>
technically you could use other JVM-targeting languages but idk if they have proper Dalvik support
<sorbo_>
The JVM is great. Java, not so much.
<swarley>
Which is why we have jruby
<sorbo_>
I really like Clojure and have been meaning to learn more of it.
<swarley>
≪ swarley ≫ Java is just camel case and line noise
<alex20032>
(well, i already saw a line of VB, to declare a variable... so long)
n1x has quit [Ping timeout: 248 seconds]
<Kovensky>
Dim variable
<Kovensky>
why do I know this
* Kovensky
facedesks
<alex20032>
dim variable as integer VS int variable;
<alex20032>
4 word VS 2 word
<Kovensky>
yeah, that's because of .net extensions
<RubyPanther>
Camel-boilers on a plate
<alex20032>
in my next session, they will teach VB...
<swarley>
Go is an alright language
<alex20032>
i dont want to learn that horrible language...
<sorbo_>
Go is what C++ _should_ have been.
<alex20032>
Haskell is a great language
<sorbo_>
^
<sorbo_>
+1 for Haskell
<RubyPanther>
I took VB in the 90s. My advice, heckle the prof as much as you can because it is the only way you're going to get entertainment out of that.
<sorbo_>
Though it hurts your brain at first, especially if you're used to OO.
<swarley>
Haskell is great if you don't have your head stuck in non functional programmng
<swarley>
I love haskell, but I can't use it to save my ife
<swarley>
life*
<Kovensky>
and if your head is stuck, reading Higher Order Perl can certainly help soften the concepts
<sorbo_>
Yeah
<sorbo_>
Haskell might not be great to start with though.
<alex20032>
Well, i still think that Java is great to teach programming, especially OO
<Kovensky>
Java was my first programming language and I think that's a terrible idea
<alex20032>
Maybe counter productive because too much verbose... but great learning tool
<swarley>
personally, I think Java OO is too much
<RubyPanther>
The one time I had to do functional programming, I just wrote a Perl script to generate it. That is one of the great things about functional programming, it is very easy to generate even when you don't think in it.
<sorbo_>
I don't know. The first language I seriously studied was Java, and that killed my love of programming for like... three years.
<sorbo_>
That might just be me though.
<Kovensky>
ruby OO would be better
<swarley>
There are so many keywords that go into a class
<shevy>
sorbo_ hahaha you poor man
<sorbo_>
Agree w/Kovensky.
<Kovensky>
what I find interesting is, almost all OO literature speaks of objects using Smalltalk terminology
<shevy>
sorbo_ I was somewhat luckier, I started with LPC and perl
<Kovensky>
but almost all of them are talking about Simula-like languages... which are entirely unlike Smalltalk
<Kovensky>
such as C++ and derived
<swarley>
I started with C++/Java and floated to perl and then ruby
<sorbo_>
shevy: Haha you chose more wisely than I did
<shevy>
I was more productive with PHP than with perl though :(
<Kovensky>
ruby is smalltalk-like
<sorbo_>
Oh man. PHP makes me so sad.
<shevy>
but ruby kind of obsoleted all of perl, LPC and php
<RubyPanther>
If you think starting with Java is bad, how about MS-BASIC, on a ROM.
<shevy>
yeah sorbo_ ... but the web-focus is a good philosophy
<sorbo_>
RubyPanther: Ouch.
<sorbo_>
shevy: True, but for that I would gravitate toward JS. Which is broken in its own crazy ways, so that's probably personal bias.
<alex20032>
Well, but i promote C to teach programming concept, like what exaclty is a linked list, an array, time to access element, and C is simple (simple syntax), but we wont do any big project in C
<RubyPanther>
And if you think you can write hangman in under 2k, you better be good at golf.
<swarley>
Enum.map([1,2,3], fn(x) -> x * 2 end) #=> [2,4,6]
<shevy>
sorbo_ hmm what I dont like about javascript is that it is kind of browser-only
<alex20032>
Its alway good to have a language that is fast to write and interpreted (ruby)
<sorbo_>
shevy: Yeah. It's getting better, slowly but surely
<Kovensky>
<shevy> sorbo_ hmm what I dont like about javascript is that it is kind of browser-only <-- people that don't accept that is the case came up with node.js
<swarley>
LOL
<swarley>
a = a
<swarley>
Wat
<alex20032>
But we need a language, that can be fast enough to be used to write game, emulator and other...
<RubyPanther>
C is important, you don't have to be good but almost everybody will need to interact with some library bindings eventually
<shevy>
alex20032 C
<shevy>
alex20032 also, we need more C folks
<alex20032>
the language we will use for most of our project
<Kovensky>
alex20032: I'd suggest sticking to C or using C#
<shevy>
those who master C can easily master Java too
<Kovensky>
alex20032: C# + XNA also lets you write stuff for the x360 if you feel so inclined
<shevy>
hmm but XNA hates linux :(
<Kovensky>
though then you're kinda stuck in microsoft-land
<sorbo_>
I guess you can offer Java if you want, but I'd be happy with just C and Ruby.
<alex20032>
well, we want to be cross platform, so only cross platform language and librairy
<Kovensky>
it is possible to make your game work with both XNA and monogame though
<shevy>
C should work on windows too
wroathe has joined #ruby
<sorbo_>
If you want to be a dick you can teach them like... four flavors of assembler.
<sorbo_>
And Brainfuck.
<sorbo_>
Your club might disband quickly if you do that though. : (
<swarley>
{} + []
<swarley>
0
<shevy>
alex20032 teach them ruby first, they can use it everywhere and like it more than either of C or Java :)
<swarley>
WAT
<Kovensky>
https://github.com/mono/MonoGame#readme <-- "MonoGame is an OpenSource, OpenGL implementation of Microsoft's XNA 4 APIs that allows developers to build games that run on Android, iPhone, iPad, MacOS, Linux and soon PlayStation Suite and Windows Metro, all reusing their existing XNA code that runs on Xbox 360 or Windows Phone 7."
<sorbo_>
swarley: Hahaha
<shevy>
swarley yeah that is a big wtf
<swarley>
{} + {}
<swarley>
NaN
<swarley>
WAT
<shevy>
Kovensky, aha interesting
<sorbo_>
I love how it makes addition look non-commutative
<alex20032>
Anyone here know if Ruby can be used as scripting language like lua? I mean, embeded some ruby in a C program, or java or whatever...
<Kovensky>
alex20032: mruby
<swarley>
Yeah
<shevy>
alex20032 not as easily as lua. but one day, mruby will
<sorbo_>
Well, _technically_ {} + {} is NaN
<shevy>
alex20032, https://github.com/mruby/mruby you can see matz, the creator of ruby there... his last commit, 20 hours ago
<swarley>
LOL
<Kovensky>
I always crack up at the Ruby Rhod image
<shevy>
he must be sleeping right now :P
<swarley>
"wat" - 1
<swarley>
NaN
<shevy>
ruby rhod image?
<swarley>
WATMAN
<sorbo_>
Shine bright like a Watman
<alex20032>
because if we write game, we could use ruby as our scripting language for mod and quest and other...
lateau has quit [Remote host closed the connection]
<alex20032>
Well, since i am starting the programming club, and i am currently the only one with programming experience, and the main goal of the programming club is that even people that dont know programming can join and learn, i will teach programming
<shevy>
Kovensky lol
<alex20032>
but i wont do a big course
<shevy>
alex20032 you should start with ruby, they can learn how to build and use methods
<alex20032>
only the basic
DrCode_ has joined #ruby
<shevy>
that is useful for every programming language
<shevy>
input-output
<shevy>
I dont know many programming languages without that
<sorbo_>
Yeah, I'd start them on Ruby and lead them to C.
<shevy>
perhaps haskell... it's only for the twisted mind
tommyvyo_ has joined #ruby
saispo has quit [Ping timeout: 260 seconds]
<shevy>
yeah what sorbo_ wrote
<sorbo_>
If you're some kind of Java wizard and you think you can teach it to them in a beginner-friendly and fun way, go for it
<sorbo_>
But in my experience, that's hard to do
<Kovensky>
or, if you feel like upholding tradition, start with SICP :)
<sorbo_>
And a lot of people don't come to Java easily
<Kovensky>
and if your clubmembers know english, have them watch sussman's lectures
<alex20032>
The advantage of java, is even if its not a fully compiled language (its byte code after all), its faster than interpreted language, like python or ruby, altought there are implementation ofruby and python in JVM... its still not enough supported, not enough librairie
DrCode has quit [Ping timeout: 276 seconds]
headius has quit [Quit: headius]
DrCode_ is now known as DrCode
<Kovensky>
both ruby and python are actually "hybrid": they *are* compiled, but only at execution time
<Kovensky>
same for perl
<alex20032>
interpreted language will not be powerful enough for game more complexe than asteroid and snake, but java will be fast enough for what we will do, also java have many librairie available
<swarley>
wrong
<alex20032>
but i think i will first teach C, then ruby, then Java
<swarley>
I've seen a 3D game in ruby lol.
<Kovensky>
but yes, ruby's performance issues are well-known, and ruby probably won't do for anything too CPU-intensive
<Kovensky>
specially if you use MRI
robbyoconnor has joined #ruby
<sorbo_>
Eh. Ruby's slow, but I don't think it would be prohibitively slow for most of what you'd be using it for.
<alex20032>
I wont make them C guru, but enough for them to understand that accessing an element in an array is constant, accessing an element in a linked list is linear... well, be albe to understan the big O
<swarley>
Yeah teaching to program shouldn't cover a game more complicated than astroids lo
<sorbo_>
I think even Big O notation is a little much for an intro. Though certainly they'll need to understand it later on if they want to be professional programmers
<Kovensky>
sorbo_: yes, ruby performance improved a lot with YARV
<alex20032>
Well, i wont teach more than asteroid, but after, we will do project once everyone will be alright to program on their own
<alex20032>
and our project will last for 2-4 month each
<alex20032>
and maybe even more
<Kovensky>
sorbo_: it's still slower compared to perl on perl's home ground (string processing)
<sorbo_>
Kovensky: Yeah, that's true. There are a lot of confounding factors in that analysis, but I think it's useful when demonstrating that Ruby is not unusably slow
<sorbo_>
Which a lot of people seem to gather from the oft-repeated "Ruby is n times slower than x language"
<alex20032>
well, i wont cover the whole Big O, but just to be able to tell if constant or linear on simple thing, and be able to do some search on google to find the right algorithm for the right situation, be able to ask to ourself, do i speed on accessing element, on removing element, on searching element or on adding element
<cirwin>
sorbo_: ruby clearly is horrifically slow, nearly 20 times slower than javascript :p
<Kovensky>
Regexp::Debugger is the only debugger I've seen so far that actually supports perl / oniguruma regexps
<Kovensky>
almost everything else I've seen uses PCRE, and the ones that don't use javascript regexps (which are probably PCRE); PCRE, ironically, is NOT perl-compatible
<sorbo_>
cirwin: Yes, but in my experience, that's not going to make a huge difference because there will be performance bottlenecks elsewhere.
<sorbo_>
And while I have a soft spot in my heart for JS, I'd rather write 1000 lines of Ruby than 1000 lines of JavaScript.
<cirwin>
for sure :)
* Kovensky
would rather write 1000 lines of ruby than 20 lines of javascript
<sorbo_>
Haha
mockra has joined #ruby
<Kovensky>
if I ever have to write in-browser code, hopefully I can use something like coffeescript
pkrnj has quit [Quit: Computer has gone to sleep.]
<Kovensky>
which hides a lot of the pain of javascript
<Kovensky>
the problem is, in case anything goes wrong, you're then treated to a javascript code dump and then you have to figure out what in coffeescript caused it
megha has quit [Ping timeout: 264 seconds]
Jackneill has joined #ruby
lateau has quit [Remote host closed the connection]
<swarley>
D:
16WABIVDL has joined #ruby
headius has joined #ruby
tommyvyo_ has joined #ruby
<shevy>
lol
<shevy>
I think the very fact that there exists a syntax-sugar language for another programming language
<shevy>
is really really really an awkward thing to see
<sorbo_>
Yeah, and really
mockra has quit [Ping timeout: 264 seconds]
<sorbo_>
The JS syntax isn't the issue for me
<sorbo_>
It's basically all the stuff in GB's "Wat" screencast
<Kovensky>
and ==
<Kovensky>
and ===
<shevy>
I think that languages are better designed if there is one person in charge
<shevy>
or perhaps two, if I have to think of C
<sorbo_>
Yeah, agree
<sorbo_>
I think Haskell is the only design-by-committee that worked out reasonably well
<swarley>
I'm excited for elixir
MattRb has quit [Quit: MattRb]
<sorbo_>
And I guess the JS var keyword is kind of annoying
<Kovensky>
shevy: two at first, but C was mostly developed along unix, and there were like 4 or 5 people poking it
<Kovensky>
sorbo_: also, javascript was designed by a single person
<Kovensky>
(as much as "design" can be applied to javascript)
<swarley>
It was originally called Mocha
<Kovensky>
brendan eich
<swarley>
and then LiveScript
<shevy>
hmm
<alex20032>
Also, we have a problem, reason why we have to use java... at my college, its windows that is installed on college computer, and we dont have admin right, and cant install C compiler or python itnerpreter or ruby interpreter. Fortunately, there is some computer with virtual machine, so for learning purpose we will use virtual machine and linux. Computer at college already have eclipse and everything needed for java development, so af
friskd has joined #ruby
<shevy>
windows is written in C++ or?
<Kovensky>
<sorbo_> I think Haskell is the only design-by-committee that worked out reasonably well <-- Rust is looking quite promising as well
<shevy>
alex20032 why cant you install anything? cant you access a user home dir on windows?
<swarley>
shevy, C
<Kovensky>
alex20032: avoid writing very long lines, IRC doesn't like that
<shevy>
swarley hmm reall? ok
<swarley>
I believe so
<shevy>
*really
TheFuzzball has joined #ruby
<swarley>
They might have changed since NT
<sorbo_>
Kovensky: Yeah, truth re: JS & Rust
charliesome has joined #ruby
<swarley>
the low level things are actually harder to do in C++
<alex20032>
well, when we log out, everything we had in desktop and in my document is gone
hamfz_ has quit [Ping timeout: 272 seconds]
h4mz1d has quit [Ping timeout: 272 seconds]
<alex20032>
and we dont have admin right, so we cant install
<alex20032>
we have user account, and we have a place on the network where each user has 50 mB
<Kovensky>
active directory domain with non-persistent userdata
<sorbo_>
alex20032: Can you ask your university to install C / Python / Ruby / what have you on a handful of computer lab machines for your programming club?
madwilliamflint has quit [Ping timeout: 248 seconds]
<alex20032>
I will try, but since the club is new (will be official in few week), we still cant really do pressure
MattRb has joined #ruby
<Kovensky>
well, if the club will be uni-endorsed, they probably should give you (limited?) admin rights to the club computers
MattRb has quit [Client Quit]
headius has quit [Quit: headius]
<alex20032>
no, they cant
<alex20032>
its not the club computer, but the computer in a random local
<Kovensky>
oic
<alex20032>
we will try to have a local in the computer science section
<Kovensky>
...for some reason I just remembered my middle school tried teaching clipper to its 7th graders
<Kovensky>
(yes, that clipper)
<sorbo_>
Haha really?
<Kovensky>
yep
<sorbo_>
Mine taught Logo, but it was an after school thing taught by one of my friends' dad.
<Kovensky>
they had generic "informatics" class that mostly had people learn how to use word and excel
<Kovensky>
as a change of pace they decided to teach clipper
<alex20032>
and its not university, but college...
<Kovensky>
though they didn't really have enough time to actually get to clipper
<alex20032>
most people here are like 18-23 year old
<sorbo_>
alex20032: I'm in the US, where university == college. What do you mean by "college"?
<Kovensky>
IIRC we had like one or two classes actually using clipper before it ended
danneu has quit [Ping timeout: 252 seconds]
<sorbo_>
High school?
<alex20032>
cegep
<alex20032>
canada
<alex20032>
quebec
<Kovensky>
before they were all using "pseudocode"
<Kovensky>
oh yeah, reminds me, absolutely, do not EVER, push for pseudocode
<alex20032>
We have primary, 1th to 6th, after, there is secondary, from secodnary 1 to secondary 5
<alex20032>
after its either 2 year pre university at college
karupanerura has quit [Excess Flood]
<Kovensky>
pseudocode should not EVER be any goal or mandatory step for doing anything
<alex20032>
or its 3 year at college in a specific domain
<sorbo_>
Ah ok.
<alex20032>
then after university
karupanerura has joined #ruby
<sorbo_>
Yeah, agree with Kovensky. Teaching pseudocode doesn't help anyone.
<alex20032>
After few month, i will try to do pressure to recycle a old computer that will be dedicated to the club, where we will run a server
<Kovensky>
every introductory programming lecture I've had in university had lecturers forcing people to use that
<sorbo_>
Well, maybe it does. I never found it useful, though.
<Kovensky>
even when writing in paper
pkrnj has joined #ruby
maletor has joined #ruby
<Kovensky>
sorbo_: pseudocode is spontaneous, not something you must write, nor must it follow some arbitrary meaningless syntax
<alex20032>
running apache, with django, ruby on rail and mod php and mysql and postgresql, so everyone will be able to do something
MattRb has joined #ruby
megha has joined #ruby
pkrnj has quit [Client Quit]
icole has quit [Remote host closed the connection]
<Kovensky>
e.g. there's absolutely nothing wrong with writing down a step-by-step algorithm to calculate matrix determinants
<Kovensky>
and doing some dry-runs of it on paper+pencil to make sure it behaves as you want
<Kovensky>
there is, however, *everything* wrong with said step-by-step instructions being written in a formal *meaningless* grammar that will only get in the way of your thinking and that you will have to later translate into real code anyway
<sorbo_>
Yep.
<sorbo_>
I write personal pseudocode when thinking through things, but any kind of "defined" pseudocode is a waste of time and brain sapce.
<sorbo_>
*space
<sorbo_>
Why not use that to learn actual syntax?
<sorbo_>
Ugh.
<alex20032>
But well, we wont do complicated game either, we will go more complicated than asteroid, but not too much... we will surely do RPG like final fantasy (of course, like old final fantasy on NES and SNES, in 2d with tile engine), game like the old zelda or zelda on gmaeboy... with side scrolling, but only 2d game
<Kovensky>
(I used the matrix determinant example because I remember spending my algebra class on determinants writing down on my notebook an algorithm to calculate those =p)
drago757 has quit [Quit: drago757]
<Kovensky>
(as in writing down something I could later translate to the computer, instead of the for-human instructions of laplace's algorithm)
<alex20032>
Well, someone said earlier that mri is slow...
<alex20032>
then what should we use?
16WABIVDL has quit [Remote host closed the connection]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
lateau has joined #ruby
<Kovensky>
ruby 1.9+ is fine :)
<Kovensky>
stay away from 1.8
<Kovensky>
I hear good things about Rubinius performance but I haven't used it myself
Norrin has quit [Ping timeout: 245 seconds]
lateau has quit [Remote host closed the connection]
lateau has joined #ruby
bedouin has quit [Ping timeout: 260 seconds]
Norrin has joined #ruby
danneu has joined #ruby
schwap has quit [Ping timeout: 255 seconds]
lateau has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
sorbo_ has left #ruby [#ruby]
aytch has joined #ruby
<alex20032>
well, jruby look perfect to embed ruby inside java, to use ruby as our scripting language
<alex20032>
also, jruby from what i read is faster than mri
tommyvyo has quit [Quit: Computer has gone to sleep.]
megha has joined #ruby
saispo has joined #ruby
<alex20032>
well, what do you guy think about scala?
<alex20032>
is it good, or too much verbose?
<Kovensky>
I haven't used it but I hear it's pretty cool
<Kovensky>
almost everything you can find that targets the JVM and is not Java is almost always decent
bedouin has joined #ruby
<alex20032>
But for the moment, i will only teach C... i wont teach a language i dont know enough (and since i am pretty new to ruby...)
schwap has joined #ruby
<Kovensky>
getting started through C is good, specially if you can explain the more complex concepts of other languages in terms of C
robustus has quit [Ping timeout: 276 seconds]
<Kovensky>
e.g. explaining references as "magic pointers" makes more sense than pointers being... uh... not references =p
<alex20032>
Well, if people understand what is a pointer, then they will understand what is reference
<Kovensky>
but not the other way around
<Kovensky>
it's also good to know the flat memory model and the stack
wroathe has quit [Ping timeout: 264 seconds]
robustus has joined #ruby
diegok has quit [Read error: Operation timed out]
<Kovensky>
(my C lecturer at uni did *not* know the stack and happily corrupted it all the time through out-of-bounds access...... but he was saved by the bound guards compilers puts around stack-allocated arrays when building on Debug mode)
<danneu>
scala is great. but the problem with the jvm ecosystem compared to ruby isn't syntax imo but the build step.
speakingcode-wor has quit [Ping timeout: 252 seconds]
<Kovensky>
some more sadness from over here: lecturers use Dev-C++ and iterate through arrays from i = 1 to i <= length
diegok has joined #ruby
aapzak has quit [Ping timeout: 260 seconds]
tommyvyo has joined #ruby
aapzak has joined #ruby
<alex20032>
Well, i wont go into exotic language either...
<alex20032>
Scala is the limit
<alex20032>
flat memory model?
lolcathost has quit [Read error: Connection reset by peer]
<alex20032>
just not familiar with term
lolcathost has joined #ruby
JohnBat26 has joined #ruby
andrewhl has quit [Remote host closed the connection]
brendan- has quit [Ping timeout: 260 seconds]
lolcathost has quit [Client Quit]
lolcathost has joined #ruby
pdtpatrick has quit [Remote host closed the connection]
nixmaniack has quit [Ping timeout: 252 seconds]
adeponte has joined #ruby
mockra has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
elico has joined #ruby
mockra has quit [Ping timeout: 256 seconds]
<Kovensky>
it's what all modern computers use
<Kovensky>
as opposed to segmented memory, like the 16-bit intel CPUs
<Kovensky>
and some other funky stuff
<Kovensky>
(basically, the idea that memory is really just one giant array)
* Kovensky
sleeps, almost 5am
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
tommyvyo has joined #ruby
lolcathost has joined #ruby
adeponte has quit [Remote host closed the connection]
<aytch>
There was some discussion about meanings in deliberate types
<aytch>
typos*
x-men1 has joined #ruby
x-men1 has left #ruby [#ruby]
lateau has quit [Remote host closed the connection]
mockra has joined #ruby
lateau has joined #ruby
kiyoura has quit [Read error: Connection reset by peer]
<havenn>
aytch: Oh, I just found it without solving any riddles. It was YOU was listed under /SPOOL.
mockra has quit [Read error: Operation timed out]
lateau has quit [Remote host closed the connection]
MattRb has quit [Quit: MattRb]
lateau has joined #ruby
rakl has quit [Quit: sleeping]
<aytch>
interesting. When you view whytheluckystiff.net with mucommander, it shows nothing at all
<RubyPanther>
oh how exciting!
templaedhel has joined #ruby
<havenn>
:D
<templaedhel>
Hey guys, I just tweaked some code examples we have in our API, but non of our team are ruby devs, and I'd love it if someone here could take a look.
<havenn>
templaedhel: Can you paste a Gist or something of the code?
<aytch>
There's an alternate way of doing it, I think. It works in irb.
atadesk has quit [Quit: Leaving.]
Banistergalaxy has joined #ruby
<rubyman>
aytch I like that. Thanks!
<aytch>
My pleasure!
dangerousdave has joined #ruby
havenn has quit [Remote host closed the connection]
adambeynon has joined #ruby
bnagy has quit [Quit: leaving]
<Paradox>
roobie :D
<aytch>
as were we all at some point
<aytch>
...I still am
tommyvyo has quit [Quit: Computer has gone to sleep.]
Guest9041 has quit [Read error: Connection reset by peer]
Guest9041 has joined #ruby
MattRb has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
tommyvyo has joined #ruby
clooth has joined #ruby
adeponte has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
ryanf has quit [Quit: leaving]
becom33 has joined #ruby
MattRb has quit [Quit: MattRb]
main has joined #ruby
<becom33>
Im doing a get request trough jquery and I want put the return html content to a dialog box
<becom33>
shit wrong channel
Banistergalaxy has quit [Ping timeout: 272 seconds]
ebouchut has joined #ruby
Banistergalaxy has joined #ruby
ChampS666 has joined #ruby
mockra has joined #ruby
ebouchut has quit [Ping timeout: 276 seconds]
ebouchut has joined #ruby
Gooder` has quit [Remote host closed the connection]
wermel has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
mockra has quit [Ping timeout: 246 seconds]
arturaz has quit [Read error: Connection reset by peer]
arturaz has joined #ruby
Pip has joined #ruby
subbyyy has joined #ruby
cantonic has quit [Quit: cantonic]
itnomad has joined #ruby
Virunga has joined #ruby
saispo has quit [Ping timeout: 260 seconds]
Elhu has joined #ruby
koshii has joined #ruby
apeiros_ has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
TheEmpty has joined #ruby
megha has quit [Ping timeout: 252 seconds]
koshii has quit [Ping timeout: 255 seconds]
<aytch>
Would it be heresy to rewrite _why's documentation and guides to use modern code samples?
cantonic has joined #ruby
wermel has quit [Remote host closed the connection]
<banister`sleep>
aytch: as long as you're not trying to emulate his sense of humor, that shit is embarrassing to watch (ppl have tried it before and they fail in the filthiest way)
<aytch>
Nah, I just want to rewrite the code itself
<aytch>
As a newbie, it's hard to follow the original guides with outdated code that doesn't work
slainer68 has joined #ruby
slainer68 has quit [Ping timeout: 240 seconds]
nimred has quit [Quit: leaving]
ananthakumaran has joined #ruby
nimred has joined #ruby
megha has joined #ruby
subbyyy has quit [Quit: none 0.3.9.2]
nimred has quit [Client Quit]
nimred has joined #ruby
ananthakumaran1 has quit [Ping timeout: 255 seconds]
jds has joined #ruby
JeanMertz has joined #ruby
saispo has joined #ruby
Pip has quit [Ping timeout: 255 seconds]
apeiros_ has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
Pip has joined #ruby
saispo has quit [Ping timeout: 260 seconds]
picca_ has joined #ruby
picca_ is now known as picca
ebouchut has joined #ruby
apeiros has joined #ruby
browndawg has quit [Quit: Leaving.]
lolcathost has quit [Read error: Operation timed out]
Nisstyre-laptop has quit [Ping timeout: 240 seconds]
Takehiro has joined #ruby
wallerdev has quit [Quit: wallerdev]
mockra has joined #ruby
mockra has quit [Ping timeout: 252 seconds]
skepti has joined #ruby
climberrs has joined #ruby
Virunga has quit [Remote host closed the connection]
lolcathost has joined #ruby
speakingcode-wor is now known as speakingcode
samuel02 has joined #ruby
koshii has joined #ruby
climberrs has quit [Quit: Verlassend]
braoru has joined #ruby
woolite64 has quit [Ping timeout: 248 seconds]
r0bby has joined #ruby
yshh has quit [Remote host closed the connection]
yshh has joined #ruby
r0bby_ has joined #ruby
amaya_the has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
mrmist has quit [Remote host closed the connection]
Dann1 has quit [Ping timeout: 256 seconds]
clooth has joined #ruby
skep has joined #ruby
skep has quit [Read error: Connection reset by peer]
<ale`>
Hi, in the process of learning ruby I am coding a simple Rpn calculator. Could someone give me some advice about my coding style? I would like to do things "the ruby way" :-) The code is at https://gist.github.com/4467556
mockra has quit [Ping timeout: 255 seconds]
mercwithamouth has joined #ruby
Vivid_ has joined #ruby
Dann2 has quit [Ping timeout: 256 seconds]
<banister`sleep>
ale`: not too bad
hamed_r has quit [Quit: Leaving]
griffindy has joined #ruby
niklasb has quit [Ping timeout: 252 seconds]
nemesit has joined #ruby
landho has quit [Ping timeout: 272 seconds]
<yxhuvud>
ale: there are a few inconsistencies when it comes to formatting and indentation.
<yxhuvud>
personally I'd not use @@variables (and instead use constants or instance variables on the class itself), but I suppose that is a matter of taste
timonv has joined #ruby
<workmad3>
yxhuvud: there is a difference in behaviour betweer class vars and class ivars
<workmad3>
yxhuvud: so it's not entirely down to just taste :)
kzar has joined #ruby
<yxhuvud>
workmad3: yes, but usually the difference is unwanted.
timonv has quit [Remote host closed the connection]
<kzar>
Anyone used whiskey_disk to deploy to a server running rvm? I can't get the combo to play nicely on debian
<workmad3>
yxhuvud: well, I tend to find that what is normally desired is the behaviour of class ivars rather than class vars :)
<workmad3>
ale`: str[(1..str.length - 2)] <-- it's not particularly clear why you're doing this btw
sayan_ has joined #ruby
<yxhuvud>
I'd probably also write defop(:neg) { |x| -x } as defop :neg { |x| -x }. You have a nice declarative DSL there and might as well make it as clean as possible.
timonv has joined #ruby
tk__ has quit [Quit: ばいばい]
DrCode has quit [Remote host closed the connection]
<yxhuvud>
or hmm. Would that have to be do .. end to get the block to associate correctly with the method? never mind then :)
<workmad3>
ale`: if the codebase grew much more, I'd personally be tempted to split the DSL methods into a separate file (and maybe into a separate module to make it clear there's a divide there)
dkd has joined #ruby
asteve has quit [Quit: Computer has gone to sleep.]
sayan_ has quit [Client Quit]
lateau has quit [Read error: Connection reset by peer]
DrCode has joined #ruby
_nitti has joined #ruby
cajone has joined #ruby
Nisstyre-laptop has joined #ruby
TheEmpty_ has joined #ruby
rvmeier has quit [Quit: Leaving]
pcarrier has quit []
mercwithamouth has quit [Ping timeout: 240 seconds]
thone has joined #ruby
TheEmpty has quit [Ping timeout: 272 seconds]
Myconix has joined #ruby
lateau has joined #ruby
thone_ has quit [Ping timeout: 260 seconds]
DrCode has quit [Ping timeout: 276 seconds]
DrCode has joined #ruby
jds has quit [Remote host closed the connection]
mpfundstein has joined #ruby
jds has joined #ruby
Astralum has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
jds has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
skep has joined #ruby
Pip has quit [Quit: Leaving]
browndawg has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 240 seconds]
timonv has quit [Read error: Operation timed out]
dagnachew has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
Xeago has joined #ruby
skepti has quit [Read error: Connection reset by peer]
browndawg has quit [Client Quit]
beiter has quit [Quit: beiter]
mockra has joined #ruby
lesnik_ has joined #ruby
<lesnik_>
Hi!
<lesnik_>
I would like to create a gem which after install will be available from console, just like for example rails.
<lesnik_>
can you give me a hint how to do this?
<mpfundstein>
you would have to link to /usr/bin or /usr/local/bin of your app and put a shebang in front so that linnux knows it has to use ruby to interpret it
TerabyteST has joined #ruby
<mpfundstein>
for examle rails will probably be somewhere in /usr/bin or /usr/locals/bin
<mpfundstein>
when you then run rails, linux looks there if it can find a process named rails and execute it
<banister`sleep>
lesnik_: learn about the executable option on the gemspec
<banister`sleep>
mpfundstein: it's not as complicated as that
<banister`sleep>
lesnik_: let me link you pry's gemspec
<TerabyteST>
a.merge| { status: 'error', errorMessage: "Couldn't find a Playlist with ID '#{params[:id]}'!" }
<TerabyteST>
ArgumentError: wrong number of arguments(0 for 1)
<TerabyteST>
what could be wrong here?
<TerabyteST>
(i'm a newbie)
<nmeum>
is there a better way to check if a string includes multiple patterns? For instance a better way to do this: if my_string.include? "foo" || my_string.include? "bar" || my_string.include? "baz"
Elhu has joined #ruby
<TerabyteST>
i'm not sure but maybe you could use a regex
<nmeum>
hm
<nmeum>
I would prefer not to do this
<TerabyteST>
i see
<skep>
shevy: try my_hash.invert
<banister`sleep>
skep: nice find
<banister`sleep>
didnt know about that
<TerabyteST>
hmm
<TerabyteST>
the error i get now is
<TerabyteST>
a.merge! { status: 'error', errorMessage: "Couldn't find a Playlist with ID test" }
<canton7>
terabytest, what exactly is your question? you, well, modify the first one ;)
<TerabyteST>
I think I was looking for Array#concat
<TerabyteST>
which seems to modify the object it's called on
browndawg has joined #ruby
<TerabyteST>
i basically need to add the contents of an array into another one to form one big array
<canton7>
terabytest, there's also #push and #<<
alvaro_o__ has joined #ruby
<TerabyteST>
wouldn't #push create an array into the array?
<TerabyteST>
[19] pry(main)> [1,2].push [3,4]
<TerabyteST>
=> [1, 2, [3, 4]]
<shevy>
skep whoa
<TerabyteST>
like that
<canton7>
[1, 2].push(*[3, 4])
blaxter has joined #ruby
<shevy>
skep you saved me a few lines of code with that, thanks!
<banister`sleep>
terabytest: btw, with pry you culd have just gone: gist -i 19
<skep>
shevy: np :)
<banister`sleep>
terabytest: it'll give you the url of the gist can u can paste that here
Elhu has quit [Quit: Computer has gone to sleep.]
<TerabyteST>
banister`sleep: that's awesome :D
<canton7>
terabytest, although #concat is neater here I'll agree
<banister`sleep>
terabytest: yeah, u can also gist a range of input lines with: gist -i 1...10
<banister`sleep>
terabytest: or gist methods with: gist -m YourClass#your_method
<banister`sleep>
etc
<TerabyteST>
pretty cool
<TerabyteST>
gonna use it in the future
<wmoxam>
c3vin: fyi if you don't have any other requirement to use cygwin, then using pik on windows is the way top go if you want to setup a ruby dev env on windows
<TerabyteST>
it's gonna be a thing to explore youtube playlists
hack has quit [Changing host]
hack has joined #ruby
cid404 has joined #ruby
ale` has quit [Remote host closed the connection]
ale` has joined #ruby
DrCode has quit [Remote host closed the connection]
<ale`>
yxhuvud, workmad3: sorry for the delay, and thanks for your comments! About the str[(1..str.length - 2)], I am expecting the arrays to be input as '(1,2,3,4)', so I am chopping off the parens before parsing the comma-separated values. I didn't like that piece of code either, is there any better way to do that?
<apeiros>
str[(1..str.length - 2)] --> str[1..-3]
Xeago has quit [Remote host closed the connection]
<apeiros>
ale`: your input is '(<digit>,…)' and you want the digits?
<apeiros>
.scan(/\d+/) is what I'd do then
mockra has joined #ruby
r0bby_ has joined #ruby
<ale`>
apeiros: might as well be Floats, or Complex numbers if you add them
nomenkun has joined #ruby
hack has quit [Quit: WeeChat 0.3.9.2]
pencilcheck has joined #ruby
Choobie has joined #ruby
hack has joined #ruby
<apeiros>
k
<Norrin>
what's the difference between the core library api and the standard library api?
<Norrin>
or rather, why a distinction between the two?
hmans has joined #ruby
<Hanmac>
Norrin: stdlib need to be required
Elhu has quit [Quit: Computer has gone to sleep.]
<Norrin>
i see
pskosinski has quit [Quit: Learn Life's Little Lessons]
<Norrin>
Hanmac, thank you!
banister`sleep has joined #ruby
<ale`>
apeiros: the "parser" is crap, it wouldn't event work for arrays inside arrays.. It's basically a lexer pretending to be a parser
DrCode has joined #ruby
pen has quit [Ping timeout: 248 seconds]
r0bby has quit [Ping timeout: 256 seconds]
jds has joined #ruby
mockra has quit [Ping timeout: 240 seconds]
<shevy>
hmm am I the only one to dislike the class vs. module distinction? I have a bunch of constants, in a class... now I realize, I need to make them a module, so that I can include a bunch of constants, in order to avoid namespacing those constants :(
<arturaz>
shevy, probably
<arturaz>
mixing in classes does not make sense
postmodern has quit [Quit: Leaving]
<Norrin>
right
blacktulip has joined #ruby
<Norrin>
in other C based languages, you wouldn't be mixing-in a class, you'd be including a header, and the constants wouldn't really be part of a class
<Norrin>
that question might have helped me understand mixing-in a little better though
<shevy>
yeah
<shevy>
well I guess I kind of have to put all constants into a module
IceDragon has joined #ruby
braoru has quit [Ping timeout: 255 seconds]
koshii has joined #ruby
<amaya_the>
hi guys
mercwithamouth has quit [Ping timeout: 276 seconds]
<IceDragon>
hello
<amaya_the>
Are you happy with programming?
dsabanin has quit [Quit: Leaving...]
<IceDragon>
yus
<amaya_the>
There are always problems.
<IceDragon>
indeed
<IceDragon>
and many ways to solve them :)
<arturaz>
if you use some languages you have less problems than with other
<arturaz>
;)
<IceDragon>
true
<IceDragon>
some are better for a particular job vs others
<arturaz>
yup
jds has quit [Ping timeout: 260 seconds]
<shevy>
amaya_the I am happy with the creative part of programming, fixing bugs sucks
<skep>
what he said :)
<IceDragon>
the most fun part, is when you look back at your old code, and say "damn I sucked..."
<amaya_the>
shevy : yeah
<shevy>
IceDragon :(
baphled has joined #ruby
<shevy>
in some situations it comes down to style
<shevy>
like 2 space vs 4 space vs tab
koshii has quit [Ping timeout: 240 seconds]
dsabanin has joined #ruby
<shevy>
in other situations it is preference
apeiros has quit [Remote host closed the connection]
<shevy>
I like to have methods like run() or reset() for my objects
<Dann1>
tab indent is faster
<amaya_the>
Some times I feel sick with logical thinking.
<IceDragon>
I prefer spaces.
koshii has joined #ruby
<amaya_the>
I am not a bot.
<shevy>
Dann1 I used to use tabs too, then I realized that I mix comments with tabbed code, that was bad
<shevy>
amaya_the then use creative thinking
<arturaz>
amaya_the, if programming doesn't make you happy - don't do it
<shevy>
you have the routine patterns available to solve a task anyway, that is how a machine can think. but as a human you can also think lateral about a problem
sayan has quit [Read error: Connection reset by peer]
<amaya_the>
I feel happy when I make some progress.
hotovson has quit [Remote host closed the connection]
_nitti has joined #ruby
koshii has quit [Ping timeout: 252 seconds]
<arturaz>
amaya_the, are you just starting?
<amaya_the>
No
Rydefalk has quit [Read error: Connection reset by peer]
<arturaz>
amaya_the, what frustrates you most?
Rydefalk has joined #ruby
<amaya_the>
To understand codes.
<arturaz>
huh?
matchaw_ has joined #ruby
<amaya_the>
I want to make some creative game function ,but I must understand the codes very well.
<arturaz>
amaya_the, what do you mean by "the codes"?
<arturaz>
the source code?
<amaya_the>
a ruby script system.
<amaya_the>
This system define the logical functions of the game.
Daman has quit [Quit: u]
slainer68 has joined #ruby
maletor has joined #ruby
matchaw___ has joined #ruby
atno has quit [Read error: Connection reset by peer]
matchaw_ has quit [Ping timeout: 272 seconds]
Elhu has joined #ruby
dkd has quit [Read error: Connection reset by peer]
slainer68 has quit [Ping timeout: 276 seconds]
_nitti has quit [Remote host closed the connection]
_nitti has joined #ruby
<shevy>
amaya_the you write this yourself or you look at someone else's code
ijverig has quit [Quit: ijverig]
lenovodroid has quit [Ping timeout: 260 seconds]
<shevy>
this was supposed to be a question :)
AndChat| has quit [Ping timeout: 240 seconds]
ijverig has joined #ruby
ijverig has quit [Excess Flood]
<shevy>
it can be extremely hard to understand code written by someone else
<amaya_the>
shevy : thank you .
braoru has joined #ruby
baroquebobcat has joined #ruby
<Dann1>
Remember kids, always comment your code!
<Hanmac>
shevy thats also true is someone else is yourself from the past :D
Banistergalaxy has joined #ruby
<shevy>
Hanmac in some ways
<shevy>
it depends on how difficult some code is
vlad_starkov has joined #ruby
<shevy>
if it uses lots of eval's and send and method_missing and hooks and whatnot
<shevy>
or $bla's
<shevy>
and thousand of procs
vlad_sta_ has joined #ruby
cirwin has joined #ruby
deadlytoah has quit [Ping timeout: 246 seconds]
templaedhel has joined #ruby
baphled has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Ping timeout: 252 seconds]
vlad_st__ has joined #ruby
workmad3 has joined #ruby
vlad_sta_ has quit [Ping timeout: 276 seconds]
_nitti_ has joined #ruby
delinquentme has joined #ruby
zodiak has quit [Read error: Connection reset by peer]
_nitti_ has quit [Remote host closed the connection]
zv470 has joined #ruby
zodiak has joined #ruby
<IceDragon>
Dann1: And don't over comment on every little detail
dsabanin has quit [Quit: Leaving...]
_nitti_ has joined #ruby
<Dann1>
You know what I mean.
<IceDragon>
40 lines of comment to 3 lines of code: wth?
<Dann1>
Don't comment to the point where more than 15% of your code is comments
<Dann1>
Icedragon: ASCII art
<IceDragon>
:O I do a bit of ASCII art
<IceDragon>
But its never in my code
<IceDragon>
Only in the README
vlad_st__ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
_nitti has quit [Ping timeout: 240 seconds]
vlad_sta_ has joined #ruby
fir_ed has quit [Ping timeout: 272 seconds]
pac1 has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
_nitti_ has quit [Ping timeout: 272 seconds]
TheFuzzball has joined #ruby
pskosinski has joined #ruby
tvw has joined #ruby
vlad_starkov has quit [Ping timeout: 276 seconds]
<Dann1>
Well
atno has joined #ruby
<Dann1>
For things like one-file code snippets
<Dann1>
I find ASCII art at the top usually
kayloos has joined #ruby
catphish has joined #ruby
<IceDragon>
derp
thisirs has quit [Remote host closed the connection]
<IceDragon>
snippets for me usually evolve into large code bases
tommyvyo has joined #ruby
jslowe has joined #ruby
sepp2k1 has joined #ruby
eroomde has left #ruby [#ruby]
thisirs has joined #ruby
<Dann1>
I usually forget my snippets
sepp2k has quit [Ping timeout: 260 seconds]
Iszak has joined #ruby
<Dann1>
Then when I need them, I have to rebuild them
<Dann1>
It's annoying, but
<Dann1>
They come out better at the second time.
Grieg has quit [Quit: laterz! :D]
mockra has joined #ruby
<IceDragon>
I'm actually missing a very good snippet...
blaxter has quit [Quit: foo]
<Dann1>
What for?
<IceDragon>
It was a Array#sync_sort
<IceDragon>
>_> I dont remember exactly how it worked
<IceDragon>
but the guy I did it for, said it worked perfectly
mengu_ has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
eldariof has joined #ruby
<IceDragon>
I think it sorted the target array based on the source array
mengu has quit [Ping timeout: 240 seconds]
mockra has quit [Ping timeout: 248 seconds]
_46bit has joined #ruby
IcyDragon has joined #ruby
mpfundstein has quit [Ping timeout: 256 seconds]
mercwithamouth has joined #ruby
IceDragon has quit [Ping timeout: 272 seconds]
amaya_the has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
ebouchut has quit [Quit: This computer has gone to sleep]
<TerabyteST>
wait it doesn't work lol
<Hanmac>
terabytest: what about File.write(snapshot_path, string_json) if settings.development?
tommyvyo has quit [Quit: Computer has gone to sleep.]
<apeiros_>
File.wr…
<apeiros_>
haaaaanmaaaaaac!
<TerabyteST>
does that exist? awesome
<IcyDragon>
ninja'd
ananthakumaran has quit [Quit: Leaving.]
<swarley>
ermahgerd
<Hanmac>
IcyDragon: how did you try to load the opengl lib? maybe you picked the wrong path?
<TerabyteST>
yay it worked
<IcyDragon>
:O I just installed the ruby-opengl2 gem
<IcyDragon>
and tried one of the tests
<Dann1>
!bacon
<Bottesque>
HAIL BACON SUCKAS
<Dann1>
Well atleast my front-end works.
<IcyDragon>
:O BACON?
<IcyDragon>
Can I haz?
<Dann1>
Now to dedicate countles hours to bac- YES
crackfu has joined #ruby
WilfredTheGreat has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
elico has quit [Ping timeout: 265 seconds]
MattRb has quit [Quit: MattRb]
maletor has quit [Quit: Computer has gone to sleep.]
ebouchut has joined #ruby
<alex20032>
Hi, is there is someone here that was online like 13 hour ago?
<graspee>
i remember having real trouble getting an opengl gem to work. i tried quite a few and ended up finding one that had been updated by some guy or other on his personal website
<IcyDragon>
Dann1: just mount it on one of the virtual drives
<Dann1>
Ahh
<emocakes>
pokemon?!
<emocakes>
and yah, its easy dann1
<Dann1>
Uhh
<emocakes>
have you googled it?
<Dann1>
Nope
<Dann1>
Didn't even bother
<emocakes>
..
mrdtt has quit [Quit: mrdtt]
<IcyDragon>
Go into your VMs Settings, Storage
<IcyDragon>
add a IDE controller (DVD Rom or something)
<IcyDragon>
:O And then select stuff
headius has joined #ruby
jduan1981 has joined #ruby
<Dann1>
Alright, I think I got this now
<IcyDragon>
Hanmac: I've edited the Rakefiles to point to my 64bit libs and now recompiling to see what happens
snearch has joined #ruby
mockra has quit [Ping timeout: 252 seconds]
<Hanmac>
icyDragon imo it should not be needed .... i think there must me something wrong with that lib
<IcyDragon>
my libs are located in /usr/lib/ rather than /usr/local/lib
<IcyDragon>
and now it works :)
<IcyDragon>
and now it core dumps...
<IcyDragon>
>_> I'm screwed...
<Dann1>
Meanwhile the ubuntu image is being redownloaded for the third time, I'd like to know if !bacon is enough food in the command set for Bottesque.
pskosinski has quit [Quit: Learn Life's Little Lessons]
mpfundstein has joined #ruby
<IcyDragon>
!cookies
<IcyDragon>
you need cookies man
<IcyDragon>
>_>
<Dann1>
Okay, anything else?
apeiros_ has quit [Remote host closed the connection]
<Muz>
Does your bot actually do anything useful or interesting?
<TerabyteST>
i'm not sure i'm doing the sinatra part completely right
<TerabyteST>
i'm still a newbie to ruby
<IcyDragon>
Hanmac: any suggestions, its still linking the 32bit libs
x82_nicole has joined #ruby
Jake232 has quit [Quit: Computer has gone to sleep.]
jekotia has joined #ruby
<Hanmac>
icyDragon when you do gem isnstall, what version does it pick?
<Pip>
I love Ruby, don't you?
<IcyDragon>
not sure.
<Pip>
Let's hear it for Java?
<IcyDragon>
:O I'll try reinstalling see what takes place
<Pip>
<crickets chirp in the distance>
Tomasso has joined #ruby
<Hanmac>
IcyDragon or do "gem list"
<IcyDragon>
ruby-opengl2 (0.60.6)
<Pip>
Is Apple computer the best platform to develop in Ruby?
<IcyDragon>
no
<IcyDragon>
>_> Linux is
<IcyDragon>
iBrick
<Pip>
stop what from what?
<IcyDragon>
Apple stuff makes good door stoppers :D
apeiros_ has joined #ruby
huoxito has joined #ruby
<Pip>
That's why I don't have an apple computer
<IcyDragon>
>NoBrainer.new
<Pip>
lol
<Pip>
Good
<ddd>
macs are just as good for developing on as Linux is. The only platform with serious issues is Windows and that has to do with path naming conventions, line ending storage, and occasionally the filesystem type.
gener1c has quit [Remote host closed the connection]
<IcyDragon>
hi NTFS
jonahR has quit [Read error: Connection reset by peer]
jonahR has joined #ruby
megha has quit [Ping timeout: 272 seconds]
pskosinski has joined #ruby
yale has quit [Read error: Connection reset by peer]
yale has joined #ruby
AllStruck has quit [Read error: Operation timed out]
pskosinski has quit [Client Quit]
AllStruck has joined #ruby
r3nrut has quit [Ping timeout: 252 seconds]
slainer68 has joined #ruby
Astral has joined #ruby
aef has quit [Remote host closed the connection]
Astral is now known as Guest6444
Guest6444 is now known as Astralum
blacktulip has quit [Remote host closed the connection]
pskosinski has joined #ruby
<yfeldblum>
ddd, lack of fork
baphled has quit [Ping timeout: 276 seconds]
r0bby_ has quit [Ping timeout: 272 seconds]
<Hanmac>
icyDragon it seems that some of the gems that build it is broken but i cant find where
blacktulip has joined #ruby
<IcyDragon>
damn
<IcyDragon>
>Only regret on Linux...
toekutr has joined #ruby
Choobie has quit [Read error: Operation timed out]
<IcyDragon>
I'll keep tinkering around with it until I get a firm build
lesnik_ has joined #ruby
<Dann1>
IY
<Dann1>
Yesssssss
<Dann1>
Ubuntu VM is working, suckas
<IcyDragon>
I find that "offensive"
* IcyDragon
pouts
<Dann1>
Aww, sorry
kiyoura has joined #ruby
banister`sleep has quit [Remote host closed the connection]
<Dann1>
I didn't mean to hurt your cold, giant, reptilian feelings.
<mpfundstein>
ddd: true, the mac terminal has all features you have on linux. only drawback is sometimes that apple changed the structure of some stuff a bit. but cron, ssh, nfs, etc are all working awesomely.
banisterfiend has joined #ruby
atadesk has quit [Quit: Leaving.]
<IcyDragon>
banisterfiend: fix ma broken codes!
Guest53544 has joined #ruby
<ddd>
not much is changed. (I've run Linux for years, and my main 'desktop' is a MBP. Everything I've learned on both (well 99%) easily transitions from one to the other. haven't run into much thats platform specific or thats caused me to be unable to work, develop, hell even play
Guest53544 has quit [Max SendQ exceeded]
<nmeum>
How do I kill a programm which was started with IO.popen from my script? E.g: How do I kill something I started like this: IO.popen("someprogramm", "w") { [...] }
ebouchut has quit [Quit: This computer has gone to sleep]
<nmeum>
Muz: ahhh, thank you sir
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
Bottesque has quit [Read error: Connection reset by peer]
Bottesque has joined #ruby
jds has joined #ruby
Choobie has joined #ruby
Daman has joined #ruby
Daman has joined #ruby
Daman has quit [Changing host]
ddd has quit [Quit: Leaving.]
ddd has joined #ruby
Morkel_ has joined #ruby
Alenah has quit [Excess Flood]
<nmeum>
Muz: I tried both methods but the programm still shows up in 'ps fux' even 5 minutes after the script execution
Alenah has joined #ruby
Alenah has quit [Excess Flood]
tommyvyo has joined #ruby
QKO has quit [Ping timeout: 255 seconds]
baroquebobcat has joined #ruby
baphled has joined #ruby
tommyvyo has quit [Client Quit]
Alenah has joined #ruby
Alenah has quit [Excess Flood]
baroquebobcat has quit [Client Quit]
Alenah has joined #ruby
Alenah has quit [Excess Flood]
Morkel has quit [Ping timeout: 255 seconds]
Morkel_ is now known as Morkel
Alenah has joined #ruby
Alenah has quit [Excess Flood]
QKO has joined #ruby
<Muz>
nmeum: what's the actual code you're executing in the block? OR what's the smallest code sample that you can do that isolates this behaviour that you'd be willing to share?
Bottesque has quit [Read error: Connection reset by peer]
Alenah has joined #ruby
Alenah has quit [Excess Flood]
<RubyPanther>
windows may suck, but for Ruby I'm not sure what difference it makes if that is what you're used to using as a dev platform. I know this... I can write Ruby extensions in C, on Linux, and they compile and work fine on windows without me doing anything special or knowing anything about dev on windows.
<nmeum>
Muz: basically it pipes data to xclip in order to xcopy the content of the data variable to the x11 clipboard
<RubyPanther>
I actually think macs are where there are the most problems, based entirely on questions people ask on irc, because of all the cases where there is the wrong version of some library, and you have to install it a different way.
<esdf>
hey guys, I made this script, http://sprunge.us/OAEO?rb, to parse this file, http://sprunge.us/DcEZ?json. I've tried doing the following in bash and made it work, but I'd really like to do it in ruby, so my question is: how do I ping the %<host_address> in that array, get a ping from it and store it to array ?
<Kovensky>
this is meant to match IRC "code" messages
<Kovensky>
e.g.
viuo has joined #ruby
<Kovensky>
:server 005 Kovensky WALLCHOPS WATCH=128 WATCHOPTS=A SILENCE=15 MODES=12 CHANTYPES=#~ PREFIX=(qaohv)~&@%+ CHANMODES=beI,kfL,lj,psmntirRcOAQKVCuzNSMTGZ NETWORK=SojuGarden CASEMAPPING=ascii EXTBAN=~,qjncrR ELIST=MNUCT STATUSMSG=~&@%+ :are supported by this server
Jackneill has quit [Quit: Leaving]
skepti has quit [Client Quit]
<workmad3>
Kovensky: wel, if you're gonna use insane regexps, you're gonna have trouble :P
<X-Jester>
man, it's almost impossible to keep something compatible with all the irc protcol changes
BoomCow has joined #ruby
<Kovensky>
it works but after the matching m[:info] is blank
Guest80915 has quit [Quit: Leaving]
<Kovensky>
instead of being able to put all the (?<info>) matches inside an array
r3nrut has quit [Ping timeout: 255 seconds]
<Kovensky>
so I'd get m[:info] as ["WALLCHOPS", "WATCH=128", "WATCHOPTS=A", ...]
will_ has joined #ruby
_46bit has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
will_ has quit [Read error: Connection reset by peer]
erichmenge_ has joined #ruby
davidcel- has joined #ruby
<viuo>
hi does anyone know any cool use cases of extending ruby or rails with c ?
emmanuelux has joined #ruby
<workmad3>
Kovensky: I personally wouldn't try to tokenize like that in a regex
atyz has joined #ruby
<workmad3>
Kovensky: I'd pull out everything that's in the 'info section' (for want of a better name) and then process that separately, rather than try to do it in a single step
Nisstyre has joined #ruby
<workmad3>
Kovensky: because otherwise you'll end up with incomprehensible, unmaintainable regexs that look like crap
moos3 has joined #ruby
<Kovensky>
yeah, I could do that (my code actually doesn't care about the contents of that line), but it just sounded like something that made sense and should Just Work
<Kovensky>
or at least could Just Work
r3nrut has joined #ruby
<workmad3>
nah, it wouldn't 'just work' with regex
<workmad3>
because you're trying to do something that's closer to full-on parsing
<Kovensky>
not really; it's still a regular grammar
<Kovensky>
and is well within regexp capabilities of doing that
<Kovensky>
e.g. perl and %-
gyre008 has joined #ruby
DarkFoxDK has quit [Read error: Operation timed out]
rcsheets has quit [Read error: Operation timed out]
Musfuut has quit [Read error: Operation timed out]
Spaceghost|cloud has quit [Read error: Operation timed out]
whitequark has quit [Read error: Operation timed out]
patricksroberts_ has quit [Read error: Operation timed out]
Nanuq has quit [Read error: Operation timed out]
Guest25886 has joined #ruby
tekacs has quit [Read error: Operation timed out]
<workmad3>
it's been a while since I've had to deal with determining if something's a regular grammar or not, so I'll take your word on it :) but that doesn't make it automatically easy to do with regex though... and what you have is already getting into incomprehensible regex (and likely needs to be more complex to work, or have a couple of levels)
NimeshNeema has quit [Ping timeout: 252 seconds]
kenneth has joined #ruby
DarkFoxDK has joined #ruby
erichmenge has quit [Quit: Arrivederci!]
erichmenge_ is now known as erichmenge
<Kovensky>
hmm nvm, I misunderstood %- :(
kenneth has quit [Remote host closed the connection]
Nanuq has joined #ruby
jduan1981 has quit [Read error: Connection reset by peer]
Musfuut has joined #ruby
<Kovensky>
%- works on e.g. /(?<a>a)(?<a>a)/
<Kovensky>
instead of /(?<a>a){2}/
jduan1981 has joined #ruby
Musfuut is now known as Guest73945
whitequark has joined #ruby
tekacs has joined #ruby
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
erichmenge has quit [Quit: Arrivederci!]
NimeshNeema has joined #ruby
erichmenge has joined #ruby
jblack has joined #ruby
slainer68 has quit [Remote host closed the connection]
s7ry93r has quit [Ping timeout: 272 seconds]
subbyyy has quit [Ping timeout: 260 seconds]
akl_ has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
Iszak has joined #ruby
bluOxigen has joined #ruby
ebouchut has joined #ruby
<ruzu>
woah... gangam style hit over 1.1 billion views... madness
jaygen has quit [Read error: Connection reset by peer]
lesnik_ has joined #ruby
DarkFoxDK has quit [Read error: Operation timed out]
Nanuq has quit [Read error: Operation timed out]
Guest73945 has quit [Read error: Operation timed out]
jaygen has joined #ruby
jblack has quit [Ping timeout: 240 seconds]
blueOxigen has quit [Ping timeout: 255 seconds]
wallerdev has joined #ruby
fir_ed has joined #ruby
Xeago has joined #ruby
DarkFoxDK has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
jonathanwallace has joined #ruby
maletor has joined #ruby
Nanuq has joined #ruby
jonahR has quit [Quit: jonahR]
jduan1981 has quit [Quit: jduan1981]
Guest73945 has joined #ruby
Elhu has joined #ruby
mmokrysz has joined #ruby
mmokrysz is now known as _46bit
tvw has quit [Ping timeout: 260 seconds]
s7ry93r has joined #ruby
JohnBat26 has joined #ruby
fir_ed has quit [Ping timeout: 272 seconds]
iPhoneMRZ has joined #ruby
tenmilestereo has joined #ruby
nemesit has joined #ruby
Takehiro has joined #ruby
iPhoneMRZ has quit [Client Quit]
Guedes0 has joined #ruby
_nitti has joined #ruby
Guedes0 is now known as Guedes
toekutr has quit [Remote host closed the connection]
Guedes has quit [Changing host]
Guedes has joined #ruby
icole has joined #ruby
Guedes0 has joined #ruby
AndIrc_3 has joined #ruby
nicobrevin has quit [Ping timeout: 248 seconds]
toekutr has joined #ruby
dsabanin has joined #ruby
pavilionXP has joined #ruby
Mon_Ouie has quit [Ping timeout: 272 seconds]
dsabanin has quit [Client Quit]
Takehiro has quit [Read error: No route to host]
johnmilton has joined #ruby
miskander has joined #ruby
miskander has quit [Client Quit]
stevechiagozie has joined #ruby
akl_ has quit [Ping timeout: 240 seconds]
pavilionXP has quit [Read error: Connection reset by peer]
jblack has joined #ruby
fir_ed has joined #ruby
Takehiro has joined #ruby
braoru has quit [Remote host closed the connection]
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Client Quit]
iPhoneMRZ has joined #ruby
workmad3 has quit [Read error: Operation timed out]
atno has quit [Read error: Connection reset by peer]
<delinquentme>
getting ruby to pause at the command line till I hit enter?
emmanuel__ has joined #ruby
emmanuel__ has quit [Read error: Connection reset by peer]
<alex20032>
simply try to get user input
Elhu has quit [Quit: Computer has gone to sleep.]
graspee has quit [Quit: Lost terminal]
nemesit|osx has joined #ruby
<alex20032>
for example, a readline or readchar
nemesit has quit [Ping timeout: 240 seconds]
<alex20032>
there should be something like that in ruby
<alex20032>
you dont need to store the result...
emmanuelux has quit [Ping timeout: 255 seconds]
pooriaazimi has joined #ruby
<apeiros_>
to gets
Spaceghost|cloud has joined #ruby
Takehiro has quit [Remote host closed the connection]
_46bit has left #ruby [#ruby]
rakl has joined #ruby
slainer68 has joined #ruby
akl_ has joined #ruby
jeffreybaird has joined #ruby
jduan1981 has joined #ruby
fir_ed has quit [Ping timeout: 240 seconds]
BoomCow has quit [Quit: This computer has gone to sleep]
<aytch>
Then I must have no idea what I'm doing, because I'm using irb
rakl has joined #ruby
butblack has joined #ruby
<Hanmac>
but it does not help him because he need to check it on a string
<aytch>
ohhh, I missed that part
digitalcakestudi has quit [Client Quit]
<banisterfiend>
Hanmac: wanna watch a movie?
<Hanmac>
no i need to fall asleep
JohnBat26 has quit [Ping timeout: 248 seconds]
<aytch>
well, I did find the other night that if you run .to_i on alphanumerics, it returns 0, unless your string is an integer, in which case it returns the integer itself
alexspeller has quit [Remote host closed the connection]
<Hanmac>
aytch to_i does not help you if you have a string like this: "0x1a"
bigmac has joined #ruby
jduan1981 has joined #ruby
<aytch>
True. I'm a newbie, just trying to think about the problem.
alexspeller has joined #ruby
Xeago has quit [Remote host closed the connection]
<banisterfiend>
Hanmac: isn't it only around 10:40 for you?
jonahR has joined #ruby
<Hanmac>
no its 22:40 .. and i need to stand up tomorrow at 05:10
<dwnichols>
delinquentme, im pretty sure regex is the best solution
freakazoid0223 has joined #ruby
JWM2 has quit [Remote host closed the connection]
emmanuelux has joined #ruby
<dwnichols>
to_i solutions will give you bad results if you try things such as "0213g".to_i
<dwnichols>
if you have a string that you need to test is an integer and only an integer, regex like /^-?(0|[1-9]([0-9]*))?$/ is best.
jonahR has quit [Client Quit]
<delinquentme>
dwnichols, wanna see the final solution? args[4].to_f.to_s == args[4]
<delinquentme>
beautifully simple
<Hanmac>
dwnochols you could also use [[:digit:]] :P
<delinquentme>
SO I'm at the point where I'd like to run this process ... and in the output logs ... have something like:
<delinquentme>
"submitting job #142 -- OK!"
<delinquentme>
and have the OK populate in the same line ... after I get back a verification on the submission
<dwnichols>
delinquentme, if you can guarantee your string is properly formed, your solution may work.
<delinquentme>
is this difficult
nemesit has joined #ruby
patricksroberts_ has joined #ruby
rcsheets has joined #ruby
Vivid has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
stevechiagozie has joined #ruby
mpfundstein has quit [Ping timeout: 264 seconds]
skep has quit [Quit: Leaving]
_nitti has quit [Remote host closed the connection]
_nitti has joined #ruby
alexspeller has quit [Remote host closed the connection]
Rym has quit [Quit: Rym]
Vivid has quit [Remote host closed the connection]
Elhu has joined #ruby
_nitti has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
runygeorge has joined #ruby
<runygeorge>
hi, Im trying to grasp what it needed for building a authentication for a client side app but with a ruby on rails or sinatra backend. I want to build it myself in ruby.
<runygeorge>
If I make a normal authentication service and get a session id, could I pass it along every request? and just check on that?
<aytch>
Hartl's tutorial has a very good example of that, runygeorge
<runygeorge>
or how is heavy client side app solved authentication wise
thisirs has quit [Read error: Connection reset by peer]
<runygeorge>
aytch: ok cool will look that up
<runygeorge>
aytch: do you know the concepts of it?