umttumt has quit [Remote host closed the connection]
_main_ has joined #ruby
freerobby has joined #ruby
bionoid has joined #ruby
bradhe has quit [Remote host closed the connection]
ntus1017 has joined #ruby
srji has quit [Ping timeout: 248 seconds]
huoxito has joined #ruby
ericmathison has quit [Ping timeout: 240 seconds]
Lemtzas has quit [Remote host closed the connection]
__main__ has quit [Ping timeout: 246 seconds]
matrimi has joined #ruby
afd__ has quit [Ping timeout: 252 seconds]
richiebkr has joined #ruby
<matrimi>
Okay so I am learning Ruby and well im confused about some codes. I am learning from "Learn ruby the hard way" What I understand: http://bpaste.net/show/RhKtylrjSlPeTmGiuvFo/ What I don't understand is the %r and %s like how do I know what one to use? It doesn't exactly say how to tell which one to use. Same way with the python one.
_main_ is now known as __main__
diegoviola has joined #ruby
<pontiki>
%r builds a regular expression
<pontiki>
%s creates symbols
__main__ has quit [Read error: Connection reset by peer]
<pontiki>
these are really *really* different things
__main__ has joined #ruby
<matrimi>
pontiki: To what?
bionoid has quit [Remote host closed the connection]
daniel_hinojosa has quit [Ping timeout: 240 seconds]
<jblomo>
is there an easy way to extract the values for a key in a list of hashes? I'd love something like [{:one => 1}].map(:one) returns [1]
Pengoo has joined #ruby
<jblomo>
maybe I mean concise instead of easy
roadt has quit [Read error: Connection reset by peer]
timkohrumel has joined #ruby
byprdct has joined #ruby
roadt has joined #ruby
bradhe has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 255 seconds]
dmiller has quit [Ping timeout: 246 seconds]
tomzx_mac has quit [Ping timeout: 246 seconds]
milardovich has quit [Quit: Leaving]
centipedefarmer has quit [Remote host closed the connection]
timkohrumel has quit [Ping timeout: 256 seconds]
slainer68 has joined #ruby
centipedefarmer has joined #ruby
ellipse has joined #ruby
viszu has quit [Quit: Leaving.]
viszu has joined #ruby
slainer68 has quit [Remote host closed the connection]
aspiers has quit [Ping timeout: 256 seconds]
aspiers has joined #ruby
jblomo has quit [Quit: Leaving.]
elliptical has quit [Ping timeout: 256 seconds]
krainbol_ has joined #ruby
viszu has quit [Quit: Leaving.]
centipedefarmer has quit [Ping timeout: 276 seconds]
Patchou has joined #ruby
krainboltgreene has quit [Ping timeout: 264 seconds]
sayan has quit [Ping timeout: 264 seconds]
viszu has joined #ruby
nfk has quit [Read error: Operation timed out]
richiebkr has quit [Quit: richiebkr]
cj3kim has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
Kabaka has quit [Ping timeout: 240 seconds]
Tamae has quit [Ping timeout: 264 seconds]
tacos1de has quit [Ping timeout: 240 seconds]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
ssvo has joined #ruby
sgupta has quit [Ping timeout: 240 seconds]
multi_io has quit [Remote host closed the connection]
multi_io has joined #ruby
viszu has quit [Quit: Leaving.]
nalaginrut has quit [Ping timeout: 240 seconds]
viszu has joined #ruby
Bry8Star{T2 has joined #ruby
tacos1de has joined #ruby
Kabaka has joined #ruby
viszu has quit [Client Quit]
dodosan has quit [Remote host closed the connection]
viszu has joined #ruby
fierycatnet has quit [Quit: Leaving]
arvindravi has joined #ruby
cofin has quit [Quit: cofin]
Opettaja has joined #ruby
<arvindravi>
Hello all, I was wondering how to achieve this in ruby, is there some sort of function that would make my job easier? Basically, say if my input is '4', my output should be '0, 1, 2, 3'
tonini has joined #ruby
<MattDunbar>
arvindravi: should be really easy to do with a for loop
umttumt has joined #ruby
w0rldmaker has joined #ruby
chrishough has quit [Quit: chrishough]
jonathanwallace1 has joined #ruby
jonathanwallace has quit [Read error: Connection reset by peer]
<xeviox>
include was the wrong word, I mean require
<apeiros>
yeah, terminology matters
<apeiros>
classes in ruby are open
<apeiros>
that means if you do class X; end; class X; end you're opening the same class twice
<apeiros>
class X; def a; end; end; class X; def b; end; end # now class X has both methods, a and b
pyrac has joined #ruby
<xeviox>
so if I do this, the class in file2.rb is able to use "some_method()" ?
<xeviox>
ah cool
<apeiros>
if you define a method of the same name twice, the last one wins
<xeviox>
nice
<apeiros>
also, `require './file1.rb'` tells me that you haven't understood require
<xeviox>
the more I use it, the more I like ruby :D
<apeiros>
./ <-- don't
<apeiros>
.rb <-- don't
<apeiros>
require is NOT relative to your current directory, and is not supposed to be.
<apeiros>
require searches in all directories listed in $LOAD_PATH
<xeviox>
ah sorry, I don't use ".rb" but thought its necessary to start with './' for proper loading (I use sinatra)
<sevenseacat>
thats what require_relative is for :p
<apeiros>
require_relative is also for people who fail to understand how require works IMO :-p
<sevenseacat>
true.
<apeiros>
for development, it can make sense to add your project's lib dir to $LOAD_PATH.
hekin has joined #ruby
<apeiros>
you can do that via the -I (capital i) flag: `ruby -I lib yourscript.rb`
danslo has joined #ruby
<xeviox>
hmm
<apeiros>
or by manipulating $LOAD_PATH in your executable, like: $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
takezawa has quit [Ping timeout: 255 seconds]
LarsSmit has joined #ruby
<xeviox>
so what's the proper way to "require" files in Sinatra? I started with some kind of boilerplate which used the "require('./...')"..
_veer has quit [Ping timeout: 256 seconds]
<apeiros>
(assuming your executable is in PROJECT/bin, as it should, and your lib dir is in PROJECT/lib, as it should)
<apeiros>
as said, ensure your application sets up $LOAD_PATH properly. have a base directory to require from, add that to $LOAD_PATH, then use requires that go relative from there.
<xeviox>
puh, I see there is a lot to learn ^^
<apeiros>
your constants should map to file names
<apeiros>
e.g. Foo::Bar should be in a file which can be required as 'foo/bar'
<apeiros>
wrt constant->file mappings there are 2 conventions. ruby convention is FooBar::Baz --> foobar/baz.rb
<apeiros>
rails convention is FooBar::Baz --> foo_bar/baz.rb
<xeviox>
so it's common to declare those constants or is there some magic involved that resolve "foo/bar" from "Foo::Bar" ?
Aaaarg has joined #ruby
<apeiros>
(I find both stupid, but nowadays tend to the rails convention)
<apeiros>
rails uses magic
<apeiros>
normal ruby doesn't
<apeiros>
I prefer science over magic. I prefer explicit over implicit.
<xeviox>
ok, so to clear my layout a bit
<xeviox>
my layout looks like "/models/somemodel.rb" and "/routes/someroute.rb"
<apeiros>
then you should probably have them Models::SomeModel and Routes::SomeRoute
slash_nick has quit [Ping timeout: 248 seconds]
<apeiros>
and require 'routes/someroute'
<xeviox>
apeiros: yeah, I also prever things that makes it easy to understand what happens..
ChristianS has quit [Excess Flood]
<apeiros>
I'm unaware of sinatras conventions, though
ChristianS has joined #ruby
<xeviox>
ok what do you mean by "have them"? Should I change their class names to "Models::SomeModel" etc.?
<xeviox>
sorry, as you might have noticed, I'm a complete ruby novice
<apeiros>
I assume sinatra has conventions
<apeiros>
you should go out and learn them. it's usually a good idea to follow the conventions of the framework you're using.
<apeiros>
12:42 apeiros: then you should probably have them Models::SomeModel and Routes::SomeRoute
<xeviox>
as far as I've understand it uses convention over configuration for the filelayout (e. g. were views are stored)
bionoid has quit [Remote host closed the connection]
<apeiros>
this is what I would do *without* looking at existing conventions of sinatra
<xeviox>
yes, but I didn't understand what you meant by "have them", did you mean "change their name to" ?
<apeiros>
yes, it means I'd name them that way
<apeiros>
module Models; class SomeModel; … --> Models::SomeModel
<xeviox>
that's always a problem with "dynamic" languages.. There is lot of space to do things the wrong way, and you might never see the problem till its to late :(
<xeviox>
ok thanks!
<xeviox>
:D
<apeiros>
s/"dynamic" languages/programming/
<apeiros>
thank you :-p
bradhe has joined #ruby
<xeviox>
so what do I have to do to get the "loading" correct ?
<xeviox>
is there a way to tell the correct path within ruby?
<apeiros>
at least in languages like ruby doing something wrong means changing a couple of hundred lines of code instead of a couple of thousands
ChristianS has quit [Excess Flood]
<apeiros>
xeviox: as said, $LOAD_PATH is the array which contains all directories in which require looks up files.
ChristianS has joined #ruby
<xeviox>
ah sorry
<apeiros>
($: == $LOAD_PATH - again, I prefer explicit there. $: is not very readable)
<xeviox>
again terminilogy ^^, I thought you were referring to a environment variable that is used by the ruby interpreter ..
<apeiros>
no, $LOAD_PATH is a global used at runtime ;-)
* apeiros
off for a bit - saturday duties
<xeviox>
nice, so I'll try to change to proper "requiring" :D
<xeviox>
thanks again!
<apeiros>
yw
vlad_starkov has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
tomzx_mac has joined #ruby
BarneyRubble has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Remote host closed the connection]
Mars` has joined #ruby
<BarneyRubble>
I am looking for a reference for doing maths in haml
<MrZYX>
?
<MrZYX>
you can just do normal ruby haml
<BarneyRubble>
will try that ;)
<MrZYX>
but most of the time you have the need to embed complex logic into your views, you're doing it wrong anyway
<sevenseacat>
+1
hekin has quit [Quit: hekin]
browndawg has left #ruby [#ruby]
ferdev has quit [Quit: ferdev]
Mars` has quit [Ping timeout: 255 seconds]
<BarneyRubble>
not complex logic, just need a math round or floor in one loop to test something
<MrZYX>
= 1.1.round
nalaginrut has quit [Ping timeout: 264 seconds]
<MrZYX>
for testing stuff, okay, but ideally the data should come ready to display into your view
jacobw has quit [Quit: WeeChat 0.4.0]
Anarch has joined #ruby
hogeo has quit [Remote host closed the connection]
<kraljev4>
this reminds me of PHP and their mb_* functions
<kraljev4>
no, i get uppercase ones
<kraljev4>
"üö".upcase
nalaginrut has joined #ruby
<kraljev4>
irb(main):003:0> "üö".upcase
<kraljev4>
=> "üö"
<kraljev4>
should be ÜÖ
marr has quit [Ping timeout: 240 seconds]
<MrZYX>
ah, yeah, downcase/upcase isn't unicode aware, right
<kraljev4>
yeah, even worse than PHP, there you have special mb_strtoupper() function
<sevenseacat>
lol worse than php
helvete has quit [Ping timeout: 260 seconds]
<Hanmac1>
kraljev4: its also difficult when you have something like "ß".upcase what do you think should it return?
sgupta has joined #ruby
elliptical has joined #ruby
<kraljev4>
ß
<kraljev4>
ruby should use ICU library
sayan has quit [Read error: Connection reset by peer]
<MrZYX>
Hanmac1: theres's an uppercase ß
<Mon_Ouie>
You should use the ICU library if you want that behavior
bradhe has joined #ruby
<Mon_Ouie>
MrZYX: But German uses 'SS' instead
ellipse has quit [Ping timeout: 256 seconds]
jibi has quit [Quit: .]
<Mon_Ouie>
(therefore, changing case might require locale information or even smarter algorithms)
<MrZYX>
is there even a word that starts with ß?
<kraljev4>
Well, that is not a problem in german, as i have not seen ß at the start of the word
<kraljev4>
i guess no
<sevenseacat>
just because a word doesnt start with it, doesnt mean you might not want to upcase it
<Hanmac1>
MrZYX: what about "ẞ" ?
Hanmac1 is now known as Hanmac
<kraljev4>
why would you want uppercase ß, since it can not be a part of acronym
<kraljev4>
since as said, no words begin with it
<sevenseacat>
if you wanted to display a string in uppercase?
<MrZYX>
sevenseacat: if I upcase it for stylistic reasons I'd still use ẞ over SS
<kraljev4>
except for people who use CAPS LOCK on forums
<sevenseacat>
for presentational reasons?
<Mon_Ouie>
Why would you want to upcase 'ü' if no word begins with that letter?
<kraljev4>
Übung
dodosan has joined #ruby
<kraljev4>
über
<Mon_Ouie>
Alright. But still, do you think upcase should only be used for 1-character strings then?
<Hanmac>
like when you use Street plates in SmallCaps, then you may need an "ẞ"
ananthakumaran has quit [Ping timeout: 268 seconds]
sayan has joined #ruby
<MrZYX>
wasn't there some scripts where upcase/downcase isn't a 1:1 mapping?
<MrZYX>
I think that's the real issue here
<kraljev4>
So, guess uppercase ß is simply ß
bradhe has quit [Ping timeout: 268 seconds]
<kraljev4>
doubt ß is the reason ruby hasn't got inbuilt unicode support
<Mon_Ouie>
It's ẞ or SS depending on the context
<kraljev4>
unicode manipulation
<sevenseacat>
ruby does have inbuilt unicode support
jacobw has joined #ruby
<sevenseacat>
what version of ruby are we talking here?
<kraljev4>
depends how you define unicode support
<apeiros>
MrZYX: greek I think
<kraljev4>
2.0 has it by default
<apeiros>
(upper/lower not 1:1)
<MrZYX>
sevenseacat: depends how you define that, you can use stuff like nonbreaking spaces just fine as identifiers
<MrZYX>
apeiros: thanks
<apeiros>
probably more
<apeiros>
re "why would you want to" - if you imply you knew all possible applications, then you're being silly
<Mon_Ouie>
upcase/downcase purposely only change characters within the ASCII range because everyone can agree on what it should do for that range
<apeiros>
I can come up with at least one possible application for why one would want to fully uppercase a string, and if I can come up with one, then there's probably 10 more
dodosan has quit [Ping timeout: 268 seconds]
<apeiros>
my use-case: toponym plates. here in switzerland in all train stations, they're all uppercase.
krainboltgreene has quit [Quit: krainboltgreene]
<kraljev4>
let me conclude: It is unacceptable to require external library, if you want to upcase an unicode string
<kraljev4>
ruby has its downfalls
krainboltgreene has joined #ruby
<sevenseacat>
ruby isnt perfect.
<apeiros>
kraljev4: agreed on that. ruby should have that in core
<apeiros>
it's also missing collation
<kraljev4>
even javascript supports that out-of-the-box
<apeiros>
and a couple of other character related things
<kraljev4>
:)
<apeiros>
well, javascripts support for that is rather opaque, though
<kraljev4>
sure, glad we agree here
<apeiros>
also js otoh only knows binary and utf-8
lucianosousa has joined #ruby
m8 has joined #ruby
darrik has joined #ruby
<apeiros>
so, I should stop procrastinating and continue with my saturday duties :)
<sevenseacat>
yes, and Javascript does absolutely retarded things with times and dates, so i wouldnt be praising that as an awesome language
<apeiros>
sevenseacat: don't forget: no integers
<kraljev4>
man, I am procrastinating for two weeks now
<MrZYX>
at least ruby roundtrips, unlike python: In [2]: 'ßü'.upper().lower() Out[2]: 'ssü' :P
<kraljev4>
haha, gotta watch this (read: procrastinate)
banister_ has joined #ruby
<kraljev4>
i should be programming postgres web admin tool
<kraljev4>
no progress for a week yet
RORgasm has joined #ruby
swordsmanz has joined #ruby
yacks has quit [Ping timeout: 246 seconds]
_serial_ has joined #ruby
<kraljev4>
though, my opinion is that this "layz programmer" thing is just a myth
<kraljev4>
wishful thinking
RORgasm has quit [Ping timeout: 276 seconds]
guiocavalcanti has joined #ruby
_serial_ has quit [Client Quit]
darrik has quit [Ping timeout: 246 seconds]
choobie has joined #ruby
rrecio has joined #ruby
Guga_ has joined #ruby
<r4nd0m1>
heh idk the ways of the world r sometimes quite intricate
Meatant has quit [Quit: free hat!]
ffio_ has quit [Quit: WeeChat 0.4.1]
tylersmith has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
Astral_ has quit [Ping timeout: 248 seconds]
rrecio has quit [Ping timeout: 256 seconds]
guiocavalcanti has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
dhruvasagar has joined #ruby
gildo has joined #ruby
akashj87 has joined #ruby
guiocavalcanti has quit [Ping timeout: 255 seconds]
takezawa has joined #ruby
Xeago has quit [Remote host closed the connection]
jacobw has quit [Quit: WeeChat 0.4.0]
yacks has joined #ruby
tylersmith has quit [Ping timeout: 264 seconds]
darrik has joined #ruby
Squarepy has joined #ruby
DestinyAwaits has joined #ruby
krainboltgreene has quit [Ping timeout: 268 seconds]
DestinyAwaits has quit [Read error: Connection reset by peer]
Guga_ has quit [Remote host closed the connection]
haxrbyte has quit [Ping timeout: 268 seconds]
Guga_ has joined #ruby
DestinyAwaits has joined #ruby
yacks has quit [Quit: Leaving]
BarneyRubble has quit [Quit: Leaving]
jetblack has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
PragCypher has joined #ruby
eka has joined #ruby
adkron has joined #ruby
ntus1017 has quit [Remote host closed the connection]
guiocavalcanti has joined #ruby
lucianosousa has quit [Quit: lucianosousa]
slash_nick has joined #ruby
_br_ has quit [Ping timeout: 246 seconds]
fomatin has joined #ruby
_br_ has joined #ruby
MattDunbar has quit [Quit: MattDunbar]
bradhe has joined #ruby
kofno has quit [Remote host closed the connection]
aloshkarev has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
ntus1017 has joined #ruby
jds has quit [Remote host closed the connection]
Astralum has joined #ruby
jds has joined #ruby
r0bgleeson has joined #ruby
razi has joined #ruby
guiocava_ has joined #ruby
Retistic has quit [Quit: Retistic]
zigomir_ has joined #ruby
guiocavalcanti has quit [Ping timeout: 264 seconds]
Squarepy has quit [Ping timeout: 268 seconds]
_whitelogger has joined #ruby
aloshkarev has quit [Quit: aloshkarev]
aloshkarev has joined #ruby
guiocavalcanti has joined #ruby
bjeanes has quit [Quit: quitting]
postmodern has quit [Quit: Leaving]
guiocava_ has quit [Ping timeout: 268 seconds]
spider-mario has joined #ruby
aloshkarev has left #ruby [#ruby]
serp` has joined #ruby
akashj87_ has joined #ruby
MattDunbar has joined #ruby
MattDunbar has quit [Client Quit]
akashj87 has quit [Read error: Operation timed out]
lurch_ has quit [Quit: lurch_]
Shubuntu has quit [Read error: Connection reset by peer]
lkba has joined #ruby
rrecio has joined #ruby
guiocava_ has joined #ruby
Shubuntu has joined #ruby
Shubuntu is now known as Guest5605
fomatin has quit [Quit: Computer has gone to sleep.]
guiocava_ has quit [Read error: Connection reset by peer]
guiocavalcanti has quit [Ping timeout: 248 seconds]
Guest5605 is now known as Shubuntu
guiocavalcanti has joined #ruby
rrecio has quit [Ping timeout: 246 seconds]
alem0lars has quit [Remote host closed the connection]
tylersmith has joined #ruby
tylersmith has quit [Ping timeout: 268 seconds]
fomatin has joined #ruby
yacks has joined #ruby
freerobby has joined #ruby
mikewintermute has joined #ruby
lurch_ has joined #ruby
arya_ has joined #ruby
jds has quit [Remote host closed the connection]
corehook has quit [Ping timeout: 246 seconds]
serp` has quit [Quit: serp`]
Giorgio has joined #ruby
michael56 has joined #ruby
sayan is now known as info
<pontiki>
'lazy programmers' will spend days writing a script for a mundane boring task.
_Renegade has joined #ruby
info is now known as sayan
<pontiki>
because we know it makes it more fun
io_syl has joined #ruby
<pontiki>
and if we have to do it again, we're set
vlad_starkov has joined #ruby
<pontiki>
that is the tao of the lazy programmer :)
fomatin has quit [Quit: Computer has gone to sleep.]
JZTech101 has joined #ruby
michael56 has quit [Quit: Page closed]
JZTech101 has quit [Read error: Connection reset by peer]
DestinyAwaits1 has joined #ruby
DestinyAwaits1 has quit [Read error: Connection reset by peer]
vadelius has joined #ruby
DestinyAwaits is now known as Guest89821
decoponio has joined #ruby
DestinyAwaits has joined #ruby
serp` has joined #ruby
Guest89821 has quit [Ping timeout: 276 seconds]
mikewintermute has quit [Quit: mikewintermute]
arya_ has quit [Ping timeout: 248 seconds]
arya_ has joined #ruby
corehook has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
nomenkun has joined #ruby
jibi has joined #ruby
adkron has quit [Ping timeout: 256 seconds]
bradhe has quit [Ping timeout: 248 seconds]
RORgasm has joined #ruby
aknagi has joined #ruby
<aknagi>
Hi guys. I'm installing ruby 2 on a Mac with rbenv / homebrew. I don't know what dependancies I need, but would like to install them all in one shot (like rvm autolibs). Do I need to install them one with 'brew install openssl' etc, or can I get them all somehow?
<aknagi>
*one by one
RORgasm has quit [Ping timeout: 264 seconds]
freerobby has quit [Quit: Leaving.]
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
serp` has quit [Quit: serp`]
niklasb has joined #ruby
elliptical is now known as ellipse
billiam has quit [Remote host closed the connection]
maroloccio has quit [Read error: Connection reset by peer]
JZTech101 has joined #ruby
JZTech101 has quit [Client Quit]
lurch_ has quit [Quit: lurch_]
tylersmith has joined #ruby
JZTech101 has joined #ruby
maroloccio has joined #ruby
JZTech101 has quit [Read error: Connection reset by peer]
nfk has quit [Quit: yawn]
LarsSmit has quit [Quit: Leaving.]
Shubuntu has quit [Remote host closed the connection]
fomatin has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
lucianosousa has joined #ruby
tylersmith has quit [Ping timeout: 268 seconds]
maroloccio has quit [Read error: Connection reset by peer]
<aknagi>
OK - Ignore my question. It's supposed to 'just work', and there is a open issue with rbenv-build
girija has joined #ruby
ananthakumaran has joined #ruby
diegoviola has joined #ruby
Guga_ has quit [Remote host closed the connection]
cjs226 has joined #ruby
emjaydub has joined #ruby
Guga_ has joined #ruby
maroloccio has joined #ruby
LarsSmit has joined #ruby
aknagi has left #ruby [#ruby]
falkoner has joined #ruby
sweeper has joined #ruby
<sweeper>
hey folks
codenapper has joined #ruby
JZTech101 has joined #ruby
aknagi has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<sweeper>
I'm using eventmachine + hiredis. I'm performing a redis get, and then interating over the result inside the callback and performing another get, and then in the callback for the inner get I'm running some code. problem is, the iterations run the appropriate number of time but the parameters are all from the first iteration
LarsSmit has quit [Client Quit]
<sweeper>
I deduce that the parameters for the inner loops need to get passed somehow....
maroloccio has quit [Ping timeout: 240 seconds]
trautwein has quit [Ping timeout: 240 seconds]
Nisstyre has joined #ruby
wmoxam has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
yim has joined #ruby
emergion has joined #ruby
maroloccio has joined #ruby
LanaDelRey has joined #ruby
kennyvb has quit [Read error: Operation timed out]
kraljev4 has left #ruby [#ruby]
nomenkun has quit [Ping timeout: 256 seconds]
stkowski has joined #ruby
LanaDelRey is now known as DID
stkowski has quit [Client Quit]
DID is now known as DID|Lana
<yim>
anyone here host with linode or digitalocean?
GeissT has quit [Quit: MillBroChat AdIRC User]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
bradhe has joined #ruby
zets has joined #ruby
hackman127 has joined #ruby
tatsuya_o has joined #ruby
kennyvb has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
F1skr has joined #ruby
generalissimo has joined #ruby
lyanchih has joined #ruby
wmoxam has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
Mattix has joined #ruby
freerobby has quit [Client Quit]
w0rldmaker has joined #ruby
marcgg has quit [Read error: No route to host]
marcgg has joined #ruby
falkoner has left #ruby [#ruby]
scatman has joined #ruby
marcgg has quit [Read error: Connection reset by peer]
<scatman>
i want to get ruby to work
atno has joined #ruby
scatman is now known as eviltt
eviltt is now known as chaoticmarienz
chaoticmarienz is now known as chaoticmarienz_
aknagi has quit [Quit: aknagi]
<slash_nick>
yim: why?
chaoticmarienz_ has left #ruby [#ruby]
marcgg has joined #ruby
aknagi has joined #ruby
aknagi has quit [Client Quit]
wallerdev has joined #ruby
wang_ is now known as wang
maroloccio has quit [Ping timeout: 246 seconds]
tatsuya_o has quit [Remote host closed the connection]
thams has quit [Quit: thams]
felixjet has joined #ruby
aknagi has joined #ruby
maroloccio has joined #ruby
JAlcine has quit [Excess Flood]
weldan has quit [Quit: Ex-Chat]
IceDragon has joined #ruby
digitalcake has joined #ruby
zeromodulus has joined #ruby
JAlcine has joined #ruby
sepp2k has joined #ruby
banghouse has joined #ruby
banghouse is now known as Guest48797
Giorgio has quit [Ping timeout: 246 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
tonini has joined #ruby
Guest48797 is now known as banghouse
akashj87__ has joined #ruby
jonahR has quit [Quit: jonahR]
atmosx has joined #ruby
akashj87_ has quit [Read error: Connection reset by peer]
arubin has joined #ruby
IceDragon has quit [Ping timeout: 256 seconds]
IceDragon has joined #ruby
atmosx has quit [Quit: And so the story goes…]
JAlcine has quit [Excess Flood]
tk_ has quit [Quit: ばいばい]
decoponio has quit [Quit: Leaving...]
browndawg has joined #ruby
teclator has joined #ruby
DestinyAwaits has quit [Read error: Connection reset by peer]
dr_bob has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
JAlcine has joined #ruby
bradhe has joined #ruby
dr_bob has quit [Read error: Connection reset by peer]
maroloccio has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby
dr_bob has joined #ruby
DID|Lana has quit [Quit: Leaving]
atno has quit [Remote host closed the connection]
atno has joined #ruby
kasper has joined #ruby
pootler__ has quit [Ping timeout: 268 seconds]
pootler_ has quit [Ping timeout: 276 seconds]
bradhe has quit [Ping timeout: 276 seconds]
bklane has joined #ruby
yxhuvud2 has joined #ruby
ToApolytoXaos has joined #ruby
yxhuvud has quit [Ping timeout: 260 seconds]
BizarreCake has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cofin has joined #ruby
relix has joined #ruby
sevenseacat has quit [Quit: Leaving.]
RORgasm has joined #ruby
maroloccio has joined #ruby
aknagi has quit [Quit: aknagi]
slyv has joined #ruby
EasyMac_ has joined #ruby
teclator has quit [Ping timeout: 246 seconds]
<EasyMac_>
Is there a way to set a child Thread in ruby to be the main Thread?
Giorgio has joined #ruby
swordsmanz has quit [Ping timeout: 246 seconds]
RORgasm has quit [Ping timeout: 276 seconds]
<r0bgleeson>
EasyMac_: for what reason
jwang has quit [Read error: Operation timed out]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maroloccio has quit [Ping timeout: 255 seconds]
<apeiros>
EasyMac_: there are no child/parent relationship with threads. there's only one special thread which is the main thread, and no, you can't replace that one.
relix has joined #ruby
<r0bgleeson>
you shouldnt have any reason to either
<r0bgleeson>
if you think you need to do that id love to know why
relix has quit [Client Quit]
<apeiros>
curious too
slash_nick has quit [Ping timeout: 255 seconds]
Mon_Ouie has quit [Quit: WeeChat 0.4.1]
tonini has joined #ruby
<EasyMac_>
Well, first of all let me thank you for starting out with a very straightforward answer
<EasyMac_>
I often experience that IRC folks like to start out with "you're not thinking about it the right way" and "tell me what you want to do" instead of starting with a straightforward answer and THEN exploring other options
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
devoldmx has quit [Remote host closed the connection]
JumpMast3r has joined #ruby
gr4yscale has joined #ruby
<EasyMac_>
Anyway, I'm working on a little library that has a thread manager as part of it
tonini has quit [Ping timeout: 248 seconds]
is0m0rph has quit [Changing host]
is0m0rph has joined #ruby
<EasyMac_>
Right now, when you require 'mylibrary', part of the code invoked is:
<EasyMac_>
and then the user code loads up tasks for the Hub
<EasyMac_>
and right now, at the end of the user code,
<EasyMac_>
I have to call $_hub_thread.join()
wsterling has joined #ruby
<EasyMac_>
Otherwise the user code finishesand kills the Hub thread
<r0bgleeson>
thats how threads work
<EasyMac_>
yes it is
<apeiros>
provide a block to Hub#run
<apeiros>
if the block is given, make that your thread and join it in #run
<apeiros>
no hassle for the user.
Apane has joined #ruby
<xeviox>
what is used for GUIs in ruby? (just for interest)
<EasyMac_>
well, the user still has to call run, then, right?
<EasyMac_>
Right now the run is happening in the library code
<apeiros>
oh, you meant that $_hub_thread is part of YOUR code? not the users?
<apeiros>
that's… *very* ugly.
<EasyMac_>
well, yes, and that's what I'm trying to fix
<EasyMac_>
the user shouldn't have to see $_hub_thread at all
<apeiros>
well, the part where you use a global is wrong without a relation to main-thread/other threads
<EasyMac_>
yes, I don't want the global there either
cofin has quit [Ping timeout: 246 seconds]
<r0bgleeson>
why can't you just use at_exit?
<apeiros>
and yes, let the user explicitly create the hub. I find "it does magic things behind the scenes" a horrible design choice.
<EasyMac_>
is there a non-blocking equivalent of join?
<r0bgleeson>
at_exit { $foo.join }
<EasyMac_>
ah, at_exit is a thing?
<EasyMac_>
great
<EasyMac_>
exactly what I needed
<apeiros>
:-S
* apeiros
shudders
<EasyMac_>
provided it iscalled before child threads are killed
<apeiros>
well, gotta do more saturday duties. cya.
<EasyMac_>
let's find out if it does...
davorb_laptop has joined #ruby
<r0bgleeson>
it is called when the main thread exits
<r0bgleeson>
or is about to
<EasyMac_>
thanks r0bgleeson
<r0bgleeson>
anyway, your code has bigger issues, I'd look at celluloid
<EasyMac_>
and apeiros
<EasyMac_>
I'll check it out
<EasyMac_>
but keep in mind this code is aimed at a very specific use case, rather than a general one
<r0bgleeson>
i dont really know what your code is doing or why the thread has to be a global
<r0bgleeson>
was that for the user to join?
wsterling has quit [Remote host closed the connection]
<EasyMac_>
well, the user shouldn't have to join it explicitly
tessi has quit [Remote host closed the connection]
<r0bgleeson>
if you're going to do that though, i would trap SIGINT & gracefully exit the thread as well.
<r0bgleeson>
incase the user is wondering wtf the terminal is stalled
<EasyMac_>
yeah, I'm already using rescue Interrupt in the Hub thread
<EasyMac_>
unless there is a better way to do it
timkohrumel has joined #ruby
<r0bgleeson>
that should be fine
sayan has quit [Quit: Leaving]
sayan has joined #ruby
banister_ has quit [Read error: Connection reset by peer]
<EasyMac_>
but yeah, this library is geared toward specific inexperienced developers who I'm trying to put in a padded room of sorts
fridim_ has joined #ruby
diegoviola has quit [Ping timeout: 255 seconds]
<EasyMac_>
Advanced users will be ableto break out easily and do what they want, but I want to make it as simple as possible for these basic users, who have had no exposure to ruby before
cofin has joined #ruby
<EasyMac_>
I was doing this project in python, but it seems now like ruby gives me a lot of extra flexibility to bend the language to my whim
<EasyMac_>
while still keeping powerful features intact for users who become advanced
kofno has joined #ruby
redgirl has quit [Read error: Connection reset by peer]
kofno has quit [Remote host closed the connection]
redgirl has joined #ruby
aknagi has joined #ruby
<EasyMac_>
So once again, I appreciate the help and suggestions r0bgleeson, and apeiros
<r0bgleeson>
sure
_Renegade has quit [Quit: _Renegade]
vlad_starkov has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
timkohrumel has quit [Ping timeout: 276 seconds]
_Renegade has joined #ruby
cofin has quit [Ping timeout: 240 seconds]
EasyMac_ has quit [Quit: EasyMac_]
ffio has joined #ruby
zeromodulus has quit [Remote host closed the connection]
eldariof has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
ananthakumaran has joined #ruby
serp` has joined #ruby
MrITR has joined #ruby
Vert has joined #ruby
fomatin has joined #ruby
kasper has quit [Remote host closed the connection]
jonathanwallace1 has joined #ruby
lurch_ has joined #ruby
brennanMKE has joined #ruby
ericmathison has joined #ruby
bradhe has joined #ruby
maroloccio has joined #ruby
slash_nick has quit [Ping timeout: 264 seconds]
Banistergalaxy has joined #ruby
relix has joined #ruby
diegoviola has joined #ruby
bradhe has quit [Ping timeout: 268 seconds]
nalaginrut has quit [Ping timeout: 256 seconds]
aknagi has quit [Quit: aknagi]
davorb_laptop has quit [Quit: Computer has gone to sleep.]
nari has quit [Ping timeout: 246 seconds]
_Renegade has quit [Quit: _Renegade]
digitalcake has quit [Quit: Leaving.]
fomatin has quit [Quit: Computer has gone to sleep.]
_Renegade has joined #ruby
aknagi has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
stkowski has joined #ruby
atmosx has joined #ruby
joshu has quit [Ping timeout: 268 seconds]
zigomir_ has quit [Quit: zigomir_]
wallerdev has joined #ruby
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
aknagi has left #ruby [#ruby]
jgoss has quit [Ping timeout: 255 seconds]
Hanmac1 has joined #ruby
weeb1e has joined #ruby
arya_ has quit []
bklane has quit [Remote host closed the connection]
arya_ has joined #ruby
Apane has quit [Ping timeout: 264 seconds]
Hanmac has quit [Ping timeout: 268 seconds]
kasper has joined #ruby
luckyruby has quit [Remote host closed the connection]
joshu has joined #ruby
isaacbw has left #ruby [#ruby]
usercheck_ has joined #ruby
Banistergalaxy has quit [Ping timeout: 246 seconds]
Banistergalaxy has joined #ruby
sambao21 has joined #ruby
<usercheck_>
i'm try to using ruby
<usercheck_>
how to import modul
browndawg has left #ruby [#ruby]
ferdev has joined #ruby
Dwarf has joined #ruby
sepp2k has quit [Ping timeout: 268 seconds]
Dwarf has left #ruby ["Leaving"]
Dwarf has joined #ruby
ColKurtz has quit [Quit: ps]
kofno has joined #ruby
Mars` has joined #ruby
Trynemjoel has joined #ruby
<Hanmac1>
usercheck_: use "require" or "require_relative" to load a file or gem, and then you may use "include" to add the classes of the Module into the main context (last part is not needed)
maycon has joined #ruby
maycon has joined #ruby
maycon has quit [Changing host]
Hanmac1 is now known as Hanmac
Kabaka has quit [Excess Flood]
joshu has quit [Ping timeout: 246 seconds]
<usercheck_>
hanmac1, thx i will try it
joshu has joined #ruby
Kabaka has joined #ruby
jgoss has joined #ruby
<usercheck_>
hanmac1 , gem?what is it?
marcgg has quit [Read error: No route to host]
marcgg has joined #ruby
kofno has quit [Ping timeout: 264 seconds]
<usercheck_>
i have try it, but how to know what ruby module that we have in our system?where their folder?
usercheck_ has left #ruby ["Leaving"]
gildo has quit [Ping timeout: 264 seconds]
timkohrumel has joined #ruby
dr_bob has left #ruby [#ruby]
gr4yscale has quit [Quit: Computer has gone to sleep.]
Speed has joined #ruby
vlad_starkov has joined #ruby
sepp2k has joined #ruby
maroloccio has quit [Ping timeout: 255 seconds]
timkohrumel has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Read error: Operation timed out]
vlad_sta_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
Mars` has quit [Ping timeout: 246 seconds]
fomatin has joined #ruby
ffio_ has joined #ruby
marcgg has quit [Read error: Connection reset by peer]
ffio has quit [Ping timeout: 255 seconds]
mikewintermute has joined #ruby
marcgg has joined #ruby
Opettaja has joined #ruby
Giorgio has quit [Ping timeout: 240 seconds]
<Speed>
hi, how does one embed the ruby interpreter these days (2.0)? All of the code samples I could find were 1.8 or 1.9...
gr4yscale has joined #ruby
jamesfung14 has joined #ruby
dhruvasagar has joined #ruby
<apeiros>
I think 2.0 is largely the same as 1.9 wrt embedding
<apeiros>
which is specifically for embedding, but isn't "full" ruby
<Speed>
the line after ## is a separate file
<Speed>
so I have start.rb, that contains 'puts "Hello world!"'
<Speed>
and I have that C/C++ file
<Speed>
and I'd like to run start.rb
IceDragon has quit [Remote host closed the connection]
<Speed>
however I can't get it to run..
tiripamwe has joined #ruby
<Speed>
I'd eventually switch to mruby yes, but at the moment all of my code is in ruby and I use quite a few gems.. as far as I understood, mruby doesn't work with gems?
<Speed>
so yeah, the code I have now doesn't output anything
<Speed>
I tried using that "run_ruby_node" function I found in some samples and can't even find documentation on, but that one gives me a segfault
gr4yscale has quit [Quit: Computer has gone to sleep.]
RORgasm has joined #ruby
ner0x has joined #ruby
roadt has quit [Ping timeout: 276 seconds]
vlad_sta_ has quit [Remote host closed the connection]
sayan has quit [Read error: Connection reset by peer]
m8 has quit [Read error: Connection reset by peer]
<shvelo>
I want to code my business website in Rails, but I guess it will take resources
<shvelo>
more than Python
newtonianb has joined #ruby
jorge has quit [Remote host closed the connection]
<newtonianb>
how can I force an indent in haml i have an -if ... <li> - else ... <ol> but then below that I have the content, how can I forge that content outside of that condition to be indented inside the above?
bradhe has joined #ruby
pyrac has quit [Quit: pyrac]
swordsmanz has joined #ruby
<shvelo>
command not found: utime
<shvelo>
wtf
<banister`sleep>
newtonianb: /j #rubyonrails
<newtonianb>
ok
guiocavalcanti has joined #ruby
elManu has joined #ruby
jamesfung14 has joined #ruby
<shvelo>
wait you can /j instead of /join? I feel stupid :D
pootler_ has joined #ruby
<shvelo>
like when using rails generate
<shvelo>
:D
aces1up has quit []
dhruvasagar has quit [Ping timeout: 255 seconds]
thams has joined #ruby
guiocava_ has quit [Ping timeout: 246 seconds]
arya has joined #ruby
marr has joined #ruby
pootler__ has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
<vadelius>
shvelo you can make your own aliases like /jror for /join #rubyonrails, barely any effort, surely will save you minutes in your lifetime!
dhruvasagar has joined #ruby
tomzx_mac has quit [Ping timeout: 240 seconds]
<shvelo>
vadelius, how?
<popl>
shvelo: it depends on your irc client
swordsmanz has quit [Quit: swordsmanz]
<popl>
shvelo: consult the manual
swordsmanz has joined #ruby
swordsmanz has quit [Client Quit]
JZTech101 has quit [Ping timeout: 268 seconds]
cj3kim has quit [Remote host closed the connection]
niceguyjames has joined #ruby
niceguyjames has quit [Read error: Connection reset by peer]
kasper has quit [Remote host closed the connection]
kasper has joined #ruby
Meatant has joined #ruby
shawnjgoff has joined #ruby
<shawnjgoff>
I'm just getting back into Ruby. I have a Vagrant box with a whole dev environment and several gems installed. How do I find the documentation for those gems?
joshu has quit [Ping timeout: 246 seconds]
Davey has joined #ruby
kasper_ has joined #ruby
kasper has quit [Read error: Connection reset by peer]
joshu has joined #ruby
dawkirst has joined #ruby
mityaz has quit [Quit: See ya!]
xeviox has left #ruby ["Verlassend"]
DanKnox_away is now known as DanKnox
braoru has joined #ruby
Petru has joined #ruby
bradhe has joined #ruby
<Squarepy>
shawnjgoff, f.i. at rubygems
RORgasm has joined #ruby
_seanc_ has joined #ruby
joshu has quit [Ping timeout: 246 seconds]
RORgasm has quit [Ping timeout: 264 seconds]
joshu has joined #ruby
<shawnjgoff>
Squarepy: thanks. What's f.i. ?
<shawnjgoff>
freenode irc?
dawkirst has quit [Ping timeout: 240 seconds]
<Squarepy>
for instance
<shawnjgoff>
ah.
<Squarepy>
also with pry you can inspect the docs of objects
fomatin has quit [Quit: Computer has gone to sleep.]
fomatin has joined #ruby
Kar- has quit []
lnemeth has quit [Quit: Leaving]
Trynemjoel has quit [Ping timeout: 245 seconds]
mikewintermute has quit [Quit: mikewintermute]
_veer has joined #ruby
_veer has joined #ruby
braoru has quit [Remote host closed the connection]
fierycatnet has quit [Quit: Leaving]
<shawnjgoff>
I thought that when you install things with gem (as appears to have been done in this env I was given) that rdocs are installed somewhere with them.
<alv-r->
Hello, I'm having trouble with a simple thing here. I want to use the gem Typhoeus on a ruby script (that I'll run in command line). I've installed it through "gem install typhoeus" but when I try to "require Typhoeus", it says "uninitalized constant", what should I do?
<alv-r->
(never used a gem outside a framework, so I don't know how to include the gem in my single .rb script, I am having troulbe finding how to do it on the web)
<Squarepy>
shawnjgoff, this approach using yard looks good, loads local docs into a web like page