<dominikh>
banisterfiend: some feeble attempts. REPLs for compiled languages rarely work well (Haskell being an exception, I guess)
jtgiri_ has quit [Quit: jtgiri_]
headius has quit [Ping timeout: 246 seconds]
<dominikh>
banisterfiend: our compile times are so low, we just write code in files and compile them ;)
jefflyne has joined #ruby
simplyaubs has joined #ruby
<banisterfiend>
dominikh and there's plugins for emacs (&c) that make it appear like a repl?
stonevil has joined #ruby
covi has quit [Remote host closed the connection]
TIJ has quit [Quit: Konversation terminated!]
<dominikh>
banisterfiend: there's the usual M-x compile in emacs etc. really, there's no proper REPL. there are some that iteratively compile your code, but they bite you as soon as you messed up in a previous line, because they're dumb editors, not REPLs.
<banisterfiend>
dominikh Go is ABI compatible with C right?
RichardBaker has joined #ruby
<dominikh>
banisterfiend: define that
jtgiri_ has joined #ruby
<banisterfiend>
dominikh Go functions are exported symbols that you can trivially call into from C code (same as you can call C++ code from C with a bit of messing around)
<dominikh>
but generally, no. well, probably if you use gccgo. gc has a cgo wrapper to interface with C; dynamically linking Go into a C program has seen some work recently but isn't done yet.
volty has quit [Quit: Konversation terminated!]
<dominikh>
Go has a runtime, which makes it not trivial to begin with.
kilophoton has quit [Ping timeout: 256 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
nwertman_ has quit [Ping timeout: 260 seconds]
Ox6abe has quit [Read error: Connection reset by peer]
mansi has joined #ruby
bricker is now known as bricker`work
Es0teric has quit [Quit: Computer has gone to sleep.]
hashpuppy has joined #ruby
hashpuppy has quit [Client Quit]
tylersmith has joined #ruby
Ox6abe has joined #ruby
twoism has quit [Remote host closed the connection]
Lewix has joined #ruby
twoism has joined #ruby
ehc has joined #ruby
stkowski has joined #ruby
ehc has quit [Client Quit]
ksh has quit [Remote host closed the connection]
ssvo has quit [Ping timeout: 240 seconds]
tylersmith has quit [Ping timeout: 268 seconds]
randomdrake has joined #ruby
twoism has quit [Ping timeout: 260 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
jibi has quit [Quit: .]
ksh has joined #ruby
DrShoggoth has joined #ruby
Spami has joined #ruby
headius has joined #ruby
mmitchell has joined #ruby
hackerpreneur has quit [Read error: Connection reset by peer]
brain_shim has quit [Ping timeout: 264 seconds]
randomdrake has quit [Ping timeout: 260 seconds]
nwertman_ has joined #ruby
hackerpreneur has joined #ruby
julweber_ has joined #ruby
hackerpreneur has quit [Max SendQ exceeded]
hackerpreneur has joined #ruby
hackerpreneur has quit [Max SendQ exceeded]
benlieb has quit [Quit: benlieb]
hackerpreneur has joined #ruby
hackerpreneur has quit [Max SendQ exceeded]
julweber has quit [Ping timeout: 245 seconds]
alvaro_o has quit [Read error: Connection reset by peer]
n_blownapart has joined #ruby
n_blownapart has quit [Remote host closed the connection]
n_blownapart has joined #ruby
hackerpreneur has joined #ruby
n_blownapart has quit [Remote host closed the connection]
nwertman_ has quit [Ping timeout: 245 seconds]
jtgiri_ has quit [Quit: jtgiri_]
Pandee has joined #ruby
hackerpreneur has quit [Read error: Connection reset by peer]
peregrine81 has quit []
iliketur_ has quit [Quit: zzzzz…..]
mercwithamouth has quit [Ping timeout: 260 seconds]
hackerpreneur has joined #ruby
amacgregor_ has joined #ruby
hackerpreneur has quit [Max SendQ exceeded]
hackerpreneur has joined #ruby
hackerpreneur has quit [Max SendQ exceeded]
amacgregor has quit [Ping timeout: 240 seconds]
RichardBaker has quit [Quit: RichardBaker]
simplyaubs has quit [Quit: simplyaubs]
brain_shim has joined #ruby
zdrummond has joined #ruby
devoldmx has quit [Ping timeout: 268 seconds]
simplyaubs has joined #ruby
hackerpreneur has joined #ruby
hackerpreneur has quit [Max SendQ exceeded]
mercwithamouth has joined #ruby
lukec has quit [Quit: lukec]
chairabanta is now known as chairabanta|away
<zdrummond>
Hello. Had a quick question. Any suggestions on how to use ActiveSupport::Concern (or somehting like it) to intercept all calls to a non controller class? I want to record all inputs and methods called on a class. Thanks for any help
mark_locklear has joined #ruby
mmitchell has quit [Remote host closed the connection]
zdrummond has quit [Remote host closed the connection]
cpruitt has joined #ruby
zdrummond has joined #ruby
centr0 has quit [Quit: centr0]
chairabanta|away has quit [Quit: Leaving...]
<zdrummond>
Sorry for the repeat, client crashed… Try 2: Hello. Had a quick question. Any suggestions on how to use ActiveSupport::Concern (or something like it) to intercept all calls to a non controller class? I want to record all inputs and methods called on a class. Thanks for any help
mark_locklear has quit [Ping timeout: 260 seconds]
<Collin>
Does anyone know if there are any pitfalls of using threads in a native extension?
fenicks has joined #ruby
GeissT has joined #ruby
mikepack has quit [Remote host closed the connection]
Ox6abe has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 245 seconds]
rodacato has joined #ruby
huoxito has joined #ruby
amacgregor_ has quit [Ping timeout: 268 seconds]
ewnd9 has joined #ruby
kayloos has joined #ruby
Columcille has quit [Remote host closed the connection]
lukec has joined #ruby
ixti has quit [Quit: WeeChat 0.4.1]
quoin has quit [Remote host closed the connection]
alvaro_o has quit [Read error: Connection reset by peer]
nhhagen_ has joined #ruby
zarul[afk] has joined #ruby
zarul has quit [Disconnected by services]
ecksit has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ecksit>
hey, has anyone used thor for a CLI app?
jordanbsanders has joined #ruby
zarul[afk] has quit [Read error: Connection reset by peer]
<ecksit>
i am trying to rake styled commands (rake db:migrate, etc) but i cannot see how i can achieve it as it requires the thor command to be the same as the ruby method definition.
Columcille has joined #ruby
jamesaanderson has joined #ruby
IanV_ has quit [Ping timeout: 264 seconds]
zarul has joined #ruby
seynb has quit [Ping timeout: 245 seconds]
Xaitec has joined #ruby
idoru has quit [Quit: Working as programmed]
nhhagen_ has quit [Ping timeout: 264 seconds]
idoru has joined #ruby
idoru has quit [Remote host closed the connection]
idoru has joined #ruby
mansi has quit [Remote host closed the connection]
BillCriswell has joined #ruby
mansi has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
zarul has quit [Ping timeout: 268 seconds]
headius has joined #ruby
Lewix has quit [Remote host closed the connection]
airtonix has joined #ruby
milardovich has quit [Read error: Operation timed out]
hakunin has quit [Read error: Connection reset by peer]
mansi has quit [Ping timeout: 268 seconds]
hakunin has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
optimusprimem has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0.1/20130814063812]]
seynb has joined #ruby
sailias has joined #ruby
mary5030 has joined #ruby
JStoker has quit [Ping timeout: 246 seconds]
samsden has joined #ruby
ehaliewicz has joined #ruby
samsden has quit [Client Quit]
hasrb has joined #ruby
simplyaubs has joined #ruby
quoin has joined #ruby
Lewix has joined #ruby
narcan has joined #ruby
Ox6abe has quit [Ping timeout: 245 seconds]
idoru has quit [Quit: Working as programmed]
idoru has joined #ruby
rickruby has quit [Remote host closed the connection]
samsden has joined #ruby
sparq_ has quit [Ping timeout: 260 seconds]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
acoyfellow has joined #ruby
radic__ has joined #ruby
jamesaanderson has joined #ruby
stonevil has quit [Remote host closed the connection]
Klotho1 has joined #ruby
idoru has quit [Quit: Working as programmed]
idoru has joined #ruby
jonathanwallace has joined #ruby
samsden has quit [Ping timeout: 240 seconds]
radic_ has quit [Ping timeout: 276 seconds]
lfox has joined #ruby
aryaching has quit [Ping timeout: 260 seconds]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
tabolario has joined #ruby
diegoviola has joined #ruby
aryaching has joined #ruby
amacgregor has joined #ruby
simplyaubs has quit [Quit: simplyaubs]
Es0teric has joined #ruby
eka has joined #ruby
mlpinit has joined #ruby
browndawg has joined #ruby
JStoker has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.1]
io_syl has quit []
kofno has joined #ruby
mmitchell has quit [Remote host closed the connection]
<xybre>
ecksit: Does it? I'm using Clamp for the same purpose and I thought Thor let you define the methods differently also.
<ecksit>
would you be able to link me to an example of your use?
<xybre>
Sure, I'm using Clamp for weird commands like "?" and "$"
dangerousdave has quit [Read error: Connection reset by peer]
trouter has quit [Ping timeout: 268 seconds]
verto has joined #ruby
dangerousdave has joined #ruby
peregrine81 has quit []
JumpMast3r has joined #ruby
blackmesa has joined #ruby
GeissT has quit [Read error: Connection reset by peer]
vince_prignano has joined #ruby
snovak has joined #ruby
yfeldblum has joined #ruby
tomzx_mac has quit [Read error: Operation timed out]
timonv has quit [Remote host closed the connection]
tomzx_mac has joined #ruby
verto_ has joined #ruby
eka has joined #ruby
snovak has quit [Ping timeout: 260 seconds]
azcodex has quit [Ping timeout: 260 seconds]
verto has quit [Ping timeout: 260 seconds]
anderson has quit [Ping timeout: 264 seconds]
nomenkun has quit [Remote host closed the connection]
vince_prignano has quit [Read error: Connection reset by peer]
sailias has quit [Ping timeout: 260 seconds]
ferdev has quit [Read error: Connection reset by peer]
vince_prignano has joined #ruby
Kabaka has quit [Ping timeout: 240 seconds]
kayloos has joined #ruby
anderson has joined #ruby
hamakn has joined #ruby
ferdev has joined #ruby
dangerousdave has quit [Quit: Leaving...]
Kabaka has joined #ruby
browndawg has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
verto_ has quit [Read error: Connection reset by peer]
nerdy has joined #ruby
jbrechtel has joined #ruby
mklappstuhl has joined #ruby
randomdrake has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
carraroj has joined #ruby
blackmesa has quit [Remote host closed the connection]
quoin has quit [Remote host closed the connection]
trouter has joined #ruby
chairabanta has quit [Ping timeout: 240 seconds]
quoin has joined #ruby
intuxicated has quit [Ping timeout: 256 seconds]
chairabanta has joined #ruby
chairabanta has quit [Client Quit]
Rym has joined #ruby
NealJ has quit [Quit: :c]
quoin has quit [Ping timeout: 245 seconds]
procrastinat0r has quit [Quit: Leaving]
sevenseacat has quit [Quit: Leaving.]
mercwithamouth has joined #ruby
jefflyne2 has joined #ruby
blueOxigen has joined #ruby
mlpinit has joined #ruby
Pandee has joined #ruby
blackmesa has joined #ruby
freeayu has quit [Remote host closed the connection]
senayar has joined #ruby
mlpinit has quit [Remote host closed the connection]
nomenkun has joined #ruby
butblack has joined #ruby
vikhyat has quit [Read error: No route to host]
vikhyat_ has joined #ruby
lusory has joined #ruby
endash has joined #ruby
browndawg has quit [Quit: Leaving.]
Xeago has joined #ruby
Aquilo has joined #ruby
pipecloud has quit [Quit: Connection closed for inactivity]
aaronmcadam has joined #ruby
senayar has quit [Ping timeout: 264 seconds]
nomenkun has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
jnix_ is now known as jnix
jnix has quit [Changing host]
jnix has joined #ruby
Aquilo has quit [Ping timeout: 256 seconds]
wallerdev has joined #ruby
nomenkun has joined #ruby
ixti has joined #ruby
ixti has quit [Client Quit]
zdrummond has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
nomenkun_ has joined #ruby
zdrummond has quit [Client Quit]
Rym has quit [Ping timeout: 260 seconds]
derf- has quit [Ping timeout: 261 seconds]
JZTech101 is now known as JZ
JZ is now known as JZTech101
derf- has joined #ruby
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
wallerdev has quit [Client Quit]
dachi has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
<dachi>
hello. I am iterating through files in a directory. files are text files with names like "02-12-2012.txt", "15-10-2013.txt", "30-11-2011.txt", and I need to sort them descending from newest date to oldest. Can anyone suggest a neat way to do it, please?
nomenkun_ has quit [Read error: No route to host]
<Xeago>
dachi: show us some code
snovak has joined #ruby
nomenkun has joined #ruby
<Xeago>
just sort_by on Date.parse() could work
jsaak has quit [Ping timeout: 240 seconds]
mercwithamouth has quit [Ping timeout: 264 seconds]
<apeiros>
paste with history, automatically a git repo and other nice features.
nomenkun_ has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
<dachi>
okay, I'll reference to gists from now on, thanks
Xeago_ has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
buzzybron has joined #ruby
candlej4ck has joined #ruby
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
lucazi has quit [Quit: Leaving.]
sr78ger has joined #ruby
vince_prignano has quit [Remote host closed the connection]
<dachi>
So, I ended up with files.sort_by { |name| name.sub(/(\d+)-(\d+)-(\d+)/, '\3\2\1') }[files.length-1]... to_i was not giving latest result somehow. thanks Xeago and apeiros
sirupsen has joined #ruby
linux_noob_666 has joined #ruby
<apeiros>
o0
sr78ger has quit [Client Quit]
wallerdev has joined #ruby
<shevy>
is ruby getting more and more complex?
nomenkun_ has quit [Ping timeout: 256 seconds]
V8Energy has joined #ruby
<dachi>
I needed to put [-1] only
<apeiros>
uh
<apeiros>
why did you say you want them sorted if what you really want is the latest?
<apeiros>
sort is more complex than max
<dachi>
because I also need to show sorted in cli
<apeiros>
same code, but use max_by
xk_id has quit [Quit:
<apeiros>
also, .last IMO nicer than [-1] (does the same)
<dachi>
ok great thanks
<apeiros>
if with to_i gives you a different result, then something with your data is off… or your dates are not zero-padded
xk_id has joined #ruby
<apeiros>
but then the gsub alone should fail too actually…
banisterfiend has quit [Quit: Computer has gone to sleep.]
jibi has joined #ruby
agjacome has joined #ruby
<dachi>
yep it fails, I'll try to do something
<dachi>
no it works nice, sorry
senayar has joined #ruby
<apeiros>
oh, interesting, the String variant is actually faster
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby
aspiers_ has joined #ruby
<shevy>
hey jokke
<shevy>
where have you been
codecop has joined #ruby
jefflyne2 has quit [Ping timeout: 256 seconds]
tylersmith has quit [Ping timeout: 256 seconds]
<d33tah>
now = Time.now() ; loop { printf("%0.3f %s",(Time.now() - now), STDIN.readline) ; now = Time.now() }
<d33tah>
what did I mess up here? Time.now() - now is always zero.
jefflyne2 has joined #ruby
corpuscle has quit [Quit: WeeChat 0.4.1]
cucumbrman has quit [Ping timeout: 264 seconds]
axl_ has joined #ruby
nari has quit [Ping timeout: 260 seconds]
<d33tah>
nvm, fixed it.
vikhyat has quit [Read error: Operation timed out]
vikhyat has joined #ruby
duggiefresh has joined #ruby
cads has joined #ruby
<pontiki>
is there something like launchy that works with applications other than browsers (i.e. opening a web page)
<pontiki>
for example, starting an editor
DrCode has quit [Remote host closed the connection]
<pontiki>
i know this is dead easy on *nix systems
bradhe has joined #ruby
trouter has quit [Remote host closed the connection]
<pontiki>
or maybe i shouldn't even bother...
swordsmanz has quit [Read error: Operation timed out]
dodosan has joined #ruby
<jbc22>
d33tah: what was the fix?
<r0bgleeson>
pontiki: on OSX you can use the 'open' command line app to start various types of applications based on the file type or schema of a URI
<jbc22>
i got close:
<jbc22>
now = Time.now() ; loop { printf("%f %s",(Time.now() - now), STDIN.readline) ; now = Time.now() }
machuga|away is now known as machuga
quoin has joined #ruby
<r0bgleeson>
pontiki: it can even open other applications found in /Applications by passing a path.
kayloos has quit [Remote host closed the connection]
kayloos has joined #ruby
krainboltgreene has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<d33tah>
jbc22: it was about reading STDIN before printing
<d33tah>
turns out Time.now() - now is evaluated first, rightly so
dodosan has quit [Ping timeout: 245 seconds]
<d33tah>
(or not rightly, anyway that's the fact)
Xaitec______ has joined #ruby
Xaitec______ has quit [Remote host closed the connection]
thesheff17 has quit [Remote host closed the connection]
atno__ has quit [Ping timeout: 264 seconds]
banisterfiend has joined #ruby
DrCode has joined #ruby
Ox6abe has joined #ruby
jsaak has joined #ruby
axl_ has quit [Quit: axl_]
randomdrake has joined #ruby
echevemaster has quit [Read error: Connection reset by peer]
crankycoder has quit [Quit: Changing server]
<pontiki>
right, r0bgleeson -- the point of launchy is to make that platform independent
sweepTheLeg has joined #ruby
mmitchell has quit [Remote host closed the connection]
<pontiki>
the fact that launchy hasn't gone beyond opening urls probably shows the inherent difficulty
quoin has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
stalker34 has quit [Ping timeout: 240 seconds]
Ox6abe has quit [Remote host closed the connection]
<r0bgleeson>
whats this pattern called? you have an array of A-Z strings, you order them as nested arrays, i.e: [["A1", "A2"], ["B1", "B2"]], so when a query happens you can check the first char of the query string, look up array[0] if it is 'a', and then do a search on a smaller set
mikepack has quit [Remote host closed the connection]
aaronmcadam has joined #ruby
nomenkun has joined #ruby
m8 has quit [Quit: Sto andando via]
cody-- has joined #ruby
stalker34 has joined #ruby
DrCode has quit [Remote host closed the connection]
snovak has joined #ruby
kilophoton has joined #ruby
noop has quit [Ping timeout: 264 seconds]
noop has joined #ruby
<Morrolan>
Those aren't A-Z strings. :P
<shevy>
pontiki perhaps you could use a ruby script that simply uses system()
JRizzle has joined #ruby
<r0bgleeson>
Morrolan: hehe sorry, start with A-Z then :D
<pontiki>
shevy: i could, but how one designated the editor might be different between systems, no? as i said, dead easy on *nix systems, but more to the point, dead easy on systems that you can specify an environment variable containing the editor command
snovak has quit [Ping timeout: 268 seconds]
<JRizzle>
Hi all
<shevy>
I am not sure how the editor would be different, when it is in the $PATH, it can be invoked... I often do stuff like: _ = 'vim /foo/bla.txt'; puts _; system _
<pontiki>
shevy: how does such work on windows?
<shevy>
it works fine there
kilophoton has quit [Ping timeout: 258 seconds]
<pontiki>
if the editor of choice is notepad++, how is that designated?
<pontiki>
or if the editor of choice is to be left to the individual, how is that designated?
<shevy>
simply using system('notepad++ foo.txt') should work
<shevy>
the individual needs to have decided which editor he is to use somewhere
<pontiki>
right
<pontiki>
on shell-systems, it's often in either the EDITOR or VISUAL shell vars
<shevy>
I think the only global way this is done on windows is through the default file association
<shevy>
yes but only if these are set
<shevy>
if EDITOR is nil, using it to open anything would not work
echevemaster has joined #ruby
echevemaster has joined #ruby
<pontiki>
exactly, but it's dead easy to check
<shevy>
yeah but I sometimes forget
<pontiki>
sheesh
nomenkun_ has joined #ruby
<pontiki>
you are now missing the point entirely
<pontiki>
i'm not asking how do i invoke a specific command *I* know ahead of time
<shevy>
today I had a script fail for me :( one that generates shell scripts... one environment variable I use is LINUX to point to my resources... but the laptop I was using did not have LINUX (or any other environment variable set) ...
<shevy>
huh
<pontiki>
i'm asking how can i make something generic so the user can designate such with out having to reprogram the gem
<shevy>
on windows?
<pontiki>
anywhere
<pontiki>
everywhere
nomenkun has quit [Read error: Connection reset by peer]
kidoz has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
lukec has quit [Quit: lukec]
<shevy>
you can store it in a yaml file?
DrCode has joined #ruby
<pontiki>
eh?
<pontiki>
that seems kinda ridic
nomenkun_ has quit [Remote host closed the connection]
<pontiki>
i'll just right what i need for my needs
JRizzle has quit [Quit: Leaving]
kayloos has quit [Remote host closed the connection]
Companion is now known as companion
rcosta has joined #ruby
mrsolo has joined #ruby
iamjarvo has joined #ruby
<shevy>
well you have to consider several scenarios
kayloos has joined #ruby
<shevy>
users who have a default editor set vs. users who don't
duggiefresh has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
Es0teric has joined #ruby
<shevy>
if they have designated a main editor, you could query that information, if they don't have it set, your script must make assumptions. either it uses hardcoded values or asks the user for an editor
nemesit|znc has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
fridim_ has joined #ruby
<pontiki>
i do know all this, thanks
alx- has quit [Quit: Leaving...]
<r0bgleeson>
Morrolan: binary search
<r0bgleeson>
is what its called
<Morrolan>
r0bgleeson: Ah. :)
<shevy>
who of you uses ruby + excel
fuleo has quit [Read error: Connection reset by peer]
<shevy>
hands up now
zabojnar has joined #ruby
<pontiki>
binary search is where you split your search list in half, and check to see which half your term is in, and drill accordingly
codezombie has joined #ruby
ssvo has joined #ruby
jbrechtel has quit [Remote host closed the connection]
cody-- has joined #ruby
<pontiki>
a b-tree is more like what you describe, which is closely related to binary searching, but a bit more as well
rcosta_ has joined #ruby
Nss has quit [Ping timeout: 245 seconds]
<yxhuvud>
a b-tree is basically a binary tree adjusted for reality. disc access is not random (neither are memory accesses nowadays, for that matter).
chihhsin has quit [Quit: leaving]
vlad_starkov has joined #ruby
boblu has joined #ruby
rcosta has quit [Ping timeout: 264 seconds]
ewnd9 has quit [Ping timeout: 268 seconds]
<Morrolan>
shevy: apeiros
IanV has joined #ruby
havenwood has quit [Remote host closed the connection]
cooldman224 has quit [Remote host closed the connection]
havenwood has joined #ruby
nomenkun has joined #ruby
<shevy>
oh?
<shevy>
well he has not said anything on that matter yet!
<shevy>
I am going to believe I am a excel pioneer on #ruby
Neomex has joined #ruby
chihhsin has joined #ruby
<shevy>
I had to manually edit excel files today ... ruby must replace this manual interaction
Nisstyre-laptop has joined #ruby
Neomex has quit [Client Quit]
jtgiri_ has joined #ruby
<Zespre>
chihhsin: hi
ner0x has joined #ruby
machuga is now known as machuga|away
<chihhsin>
Zespre: hi
bradhe has quit [Remote host closed the connection]
chihhsin has left #ruby [#ruby]
jtgiri_ has quit [Client Quit]
MiguelGD has quit [Ping timeout: 260 seconds]
rcosta_ has quit [Remote host closed the connection]
Zolo has quit [Remote host closed the connection]
aryaching_ has joined #ruby
<pontiki>
someone on ruby-talk was making an excel gem
jtgiri_ has joined #ruby
antulik is now known as antulik-afk
Xaitec______ has joined #ruby
rcosta has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
jtgiri_ has quit [Client Quit]
Soda has quit [Remote host closed the connection]
Astralum has quit [Ping timeout: 256 seconds]
eka has joined #ruby
freerobby has joined #ruby
jtgiri_ has joined #ruby
Banistergalaxy has quit [Ping timeout: 276 seconds]
<atmosx>
I haven't read the book, mind you, just comes first on Google
razi has quit [Ping timeout: 264 seconds]
headius has quit [Quit: headius]
elux has joined #ruby
<shevy>
tigor_ do you know how "yield" works already?
babykosh has joined #ruby
<atmosx>
I'm extracting some values from a TXT file (openvpn-status.log) and … apparently the data I'm seeking *first* stands on the lower part of the file, while to extract some more valuable data I need to extract data from the upper part of the file… is there any other approach except from re-looping the file? :-/
kilophoton has joined #ruby
<atmosx>
re-looping = re=scanning the file… it's not much in cpu cycles, it's a txt about 10-15 lines
<atmosx>
but I don't like running two loops like that
<tigor_>
shevy: yes
<shevy>
tigor_ ok then you are already rather advanced, I guess the only real way to progress much is to just start writing more and more ruby scripts
<shevy>
and to idle on #ruby to power, sometimes one can learn new things!
r0bgleeson has quit [Read error: Connection reset by peer]
<shevy>
the pickaxe book has a good reference ... the introduction is probably too easy for you now though
r0bgleeson has joined #ruby
snovak has joined #ruby
<matti>
shevy: I didn't learn anything new ;/
<atmosx>
matti: from the pickaxe?
<matti>
No, idling.
Xaitec______ has quit [Remote host closed the connection]
<atmosx>
oh hahah okay
<atmosx>
matti: idle some more lol
<matti>
:>
<matti>
atmosx: I idle hard,man.
<matti>
Real hard.
<matti>
;s
vlad_starkov has joined #ruby
<tigor_>
ok will do
<tigor_>
ruby is really easy :-)
<matti>
Easy peasy.
<shevy>
matti you are too advanced
<shevy>
matti stop coming to #ruby for 5 years, then make a strong comeback, you will learn something new soon :D
alx- has joined #ruby
<matti>
shevy: I strive to reach another plane of existance through idling.
<matti>
I will become a demigod then.
<matti>
shevy: Hehe
<shevy>
tigor_ funny that you say that... I find ruby very elegant, it's what keeps me interested in it... but I also find it too complex, often for no real gain that I can see
<shevy>
I once did tab-complete while doing rm -rf
<shevy>
and bash inserted a wrong directory
<atmosx>
shevy: hmm complex? hm
<tigor_>
shevy: what did you find complex ?
snovak has quit [Ping timeout: 260 seconds]
bradhe has joined #ruby
<shevy>
atmos yeah... just imagine how many things one needs to understand... class var... instance var... module vs. classes... yield... lambda / proc / -> syntax ... method_missing... inherited hooks... singleton (everything)
<shevy>
tigor_ my biggest complaint is the arbitrary distinction between modules and classes and using subclassing vs. include-inheritance
<shevy>
my second largest complaint is that I often find it hard to want to find use cases for certain things... like class variables... but also lambdas, the latter just dont seem to fit into the flow of my code much at all
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
tigor_ the good thing is, you can use only 10% of ruby and it still is much better than 100% of php :P
<shevy>
atmosx, yeah complex... without using .ancestors, tell me how Kernel, Object and BasicObject interelate with
krainbol_ has joined #ruby
aaronmcadam has quit [Quit: Leaving...]
<shevy>
*interrelate
<tigor_>
how long did it take you guys to learn rails ?
<atmosx>
tigor_: I started basically in the morning. I am able to do quite a few things by evening, but I was familiar with Sinatra
<shevy>
tigor_ I skipped rails, came to ruby before rails existed
Senjai has joined #ruby
Senjai has joined #ruby
<atmosx>
tigor_: did you do any web dev? do you know anything abou the MVC model, how these frameworks are usually structured. what erb/haml/less/etc are and so on? HTML5 CSS3 and JS? If you do know at least how their code looks like, and how do they work then you're all set.
krainboltgreene has quit [Ping timeout: 264 seconds]
<tigor_>
atmosx: not really...never did a web dev or anything like this...nor dbs (sql)...did a little C++ and ksh
ksh has quit [Remote host closed the connection]
<wm3|eating>
shevy: Object is a BasicObject with Kernel included as a mixin ;)
<wm3|eating>
shevy: and Kernel is a somewhat large module that includes a lot of 'core' ruby methods (a lot of which are implemented in C, and also a lot of which are what many people think are really keywords or core ruby syntax)
<atmosx>
How do I scan the first occurence of a text? Only the first?
havenwood has quit [Remote host closed the connection]
<atmosx>
tigor_: start from chapter1 it guides all the way
brianpWins has quit [Ping timeout: 256 seconds]
<tigor_>
bookmarked
<tigor_>
thanks !
carlyle has quit [Remote host closed the connection]
<atmosx>
rails pays bills
<shevy>
wm3|eating you are also too advanced, you should not answer such things :P
<atmosx>
ask wm3|eating … see he is eating? while the rest of us are starving
DrCode has quit [Ping timeout: 240 seconds]
<shevy>
atmosx rails makes you rich?
robustus has joined #ruby
<atmosx>
shevy: yeah apparently.
havenwood has joined #ruby
aaronmcadam has joined #ruby
<wm3|eating>
shevy: I'm at a disadvantage... I have a plate of lemon pie in front of me ;)
bradhe has quit [Ping timeout: 268 seconds]
* atmosx
looks at the Lindt chocolate in his fridge
pyx has joined #ruby
<Morrolan>
Stop talking about food already.
elaptics is now known as elaptics`away
* Morrolan
is hungry now
<shevy>
I ate too much :(
mklappstuhl has joined #ruby
pyx has quit [Client Quit]
brianpWins has joined #ruby
<wm3|eating>
tigor_: incidentally, #rubyonrails is full of helpful people who like to answer rails questions... in here it can be a bit hit and miss if you ask a rails question whether you get an answer... or get a 30 minute lecture on all the ways rails is awful and full of bad engineering and things that person X wouldn't do themselves and would never touch ;)
<tigor_>
haha
<tigor_>
i am worried about js/html5/css and ajax.. :(
<Morrolan>
Only if you meet a guy whose name starts with h. :)
gener1c has quit [Read error: Operation timed out]
Lewix has quit [Remote host closed the connection]
<atmosx>
tigor_: you could be a backend developer, instead of front-end then. lol
razi has joined #ruby
<atmosx>
I love this back-front distinction
<tigor_>
yeah but
<wm3|eating>
yeah, modern web dev does have quite a large stack to learn
<atmosx>
not to mention the unix background, how to implement proper caching, scaling and so on
<tigor_>
atmosx: i am an aix sysadmin
<shevy>
god
<atmosx>
tigor_: advanced interactive executive?
<shevy>
the web swallows souls
<atmosx>
does that unix system still exist?
<tigor_>
it really does :-)
<atmosx>
tigor_: wow.
<tigor_>
and it still more awsome than linux
Monie has joined #ruby
<atmosx>
good, I never met one :-P back in the day I … let's say used to have access to couple of those beasts.
<atmosx>
tigor_: oh, does ruby run on AIX?
dagnachew has joined #ruby
<dagnachew>
hi all
<dagnachew>
I installed ruby system wide and I got rvm is a function
<tigor_>
atmosx: probably...we don't use it at work :-)
<dagnachew>
-bash: type: write error: Broken pipe
Lewix has joined #ruby
<dagnachew>
i am on linux
<shevy>
linux mostly "just works" for the basic things
gener1c has joined #ruby
<shevy>
dagnachew hmm I seen that error when compiling sometimes
<atmosx>
tigor_: I thought it was disctontinued. But I'm totally wrong. IBM still produces new releases, apparently too large market..
<shevy>
I had it related to some lexing/parser problem
<tigor_>
atmosx: indeed
TripleDES has quit [Ping timeout: 264 seconds]
<atmosx>
tigor_: So you're a specialized sys-admin, that's good. How come that you're interested in ruby? instead of something like C/C++ or Java?
koolb has joined #ruby
<shevy>
ewww... java
iamjarvo_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby
wm3|eating has quit [Ping timeout: 240 seconds]
TripleDES has joined #ruby
<tigor_>
atmosx: after 8++ h working you don't really want to spend another 8hours with something like C/C++
<Todd>
sysadmins script a lot of their daily tasks.. use tools like puppet (ruby) for automated deployment etc..
krainbol_ has quit [Quit: krainbol_]
<Todd>
most sysadmins I know are perl heads though
<atmosx>
Todd: yes but last time I checked ruby didn't run well on RISC
<tigor_>
Todd: we use cfengine instead...not much scripting as the environment is really heterogenous
<Morrolan>
dagnachew: Are you sure that it doesn't say "RVM is *not* a function?"
<atmosx>
I think ruby-2.0 doesn't compile on RISC
<tigor_>
atmosx: people said coding in ruby is joy
<Todd>
atmosx, nod
krainboltgreene has joined #ruby
<tigor_>
atmosx: so i started learning ruby :)
<atmosx>
tigor_: absolutely
<Todd>
tigor_, ruby is a beautiful thing
tatsuya_o has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
<atmosx>
tigor_: especially when those who saw perl code before encountering ruby.
<shevy>
haha yeah
<Todd>
saw/wrote/debugged/smelled/waded through
<Todd>
yeah that
<shevy>
my $great thing <>&//;
<tigor_>
atmosx: Todd: and main reason for not continuing with C/C++ was lack of time and will to do it in my free time etc
<atmosx>
tigor_: cool
<shevy>
oh well
<atmosx>
tigor_: out of curiosity, how old r u?
<shevy>
I should have learned C for 10 years before ruby
<tigor_>
22
peregrine81 has joined #ruby
<shevy>
I mean... learned and *used* C
<atmosx>
shevy: no you shouldn't. You can learn C in 2 months if you really want to.
<shevy>
I tried
<shevy>
I always give up
<atmosx>
then fuck it, it won't do you any good
<shevy>
man... there are so many things that I could do if I would learn C properly
<Todd>
learning c is helpful for understanding the way a lot of things work
<Todd>
not that I've ever done it but a lot of my friends who learned c early on thank themselves for it today
<pontiki>
i hate that "if you really wanted to"
<pontiki>
as if wanting is all it takes
<Todd>
I'm often a subscriber of that mentality
razi has quit [Ping timeout: 245 seconds]
<tigor_>
Todd: atmosx: i think learning C and doing C if you have a time and projects to work on is a good idea...
<pontiki>
if you really wanted to, you could jump to the moon
<shevy>
pontiki well it's a lot of effort, one has to write lots of code, debug things, read specific things
<pontiki>
yes, shevy, and after doing all those things dilligently, sweating it, that doesn't guarantee that you'll learn it
<shevy>
and not use it either which is my worst fear :(
<atmosx>
tigor_: sure it is. But he doesn't have to force himself to learn something he doesn't actually want to learn.
<shevy>
but I could do some little useful things, like help the GUI bindings of ruby-gnome
nomenkun_ has joined #ruby
<tigor_>
atmosx: Todd: maybe one could learn a bit C and then switch to ObjC if he would like to do iOS/OSX applications
<atmosx>
tigor_: 22? wow you're young.
nomenkun has quit [Read error: Connection reset by peer]
<pontiki>
one can do a lot of things
sayan has quit [Remote host closed the connection]
<pontiki>
there are lots of languages to learn
<pontiki>
lots of patterns to learn
<atmosx>
Haskell
<atmosx>
Lisp
<pontiki>
^
<shevy>
if I can not use a language, what use will it have to me?
<atmosx>
and if you wanna go with the jype now, Angular.js and Go
<atmosx>
shevy: none
<atmosx>
shevy: you will forge tit after a while imho
<pontiki>
there may be some use in that it may help understand how other languages work
<atmosx>
shevy: although procedural programming is a little bit different so you might encounter some patterns elsewhere and recognize them, but you could also do that with JS or Go which are much more hyped nowadays.
<pontiki>
but that's rather indirect
<tigor_>
atmosx: shevy my gf is japanese (we are not in JP though) i learned a bit japanese so i can actually better understand her moods when she yells at me :D
freerobby has quit [Quit: Leaving.]
<atmosx>
pontiki: if he is not going to design and implement other languages… still I see no use
<atmosx>
tigor_: lucky you :-P
<pontiki>
you don't have to design the ruby language to get benefit from knowing C
<tigor_>
atmosx: shevy: i mean even if we don't move to japan it helps me to understand her more
<pontiki>
you get benefit from knowing C just even in writing ruby
sparq_ has joined #ruby
<pontiki>
i know i'm biased in this; i like learning languages, and see the benefit of knowing one in using others
brianpWins_ has joined #ruby
<r0bgleeson>
C is a great language to know
<r0bgleeson>
so is Go though
<Senjai>
C is more beneficial than C++ to learn right?
<atmosx>
So is PASCAL?
<Senjai>
Just guessing
nomenkun_ has quit [Remote host closed the connection]
<tigor_>
r0bgleeson: so is Latin but it's pointless to start learning it
<Senjai>
atmosx: Not sure if joking xD
<r0bgleeson>
um
<r0bgleeson>
yeah
<r0bgleeson>
C is as irrelevent as latin
<pontiki>
tigor_: not if you study ancient Rome
<yxhuvud>
senjai: yes, unless you plan to seek a liking programming c++.
<r0bgleeson>
where are you guys living
<atmosx>
Senjai: depends, you like procedural or object oriented? Are you gonna code GUIS or cli fast-breaking algorithms?
<r0bgleeson>
in an imaginary world?
rcosta has joined #ruby
<pontiki>
tigor_: and not if you study the Catholic church
jonkri has joined #ruby
<yxhuvud>
*living
<atmosx>
eating
<Senjai>
atmosx: Nah, I just want to contribute to Ruby, and C is used in most hardware programming right?
<tigor_>
r0bgleeson: when did i say latin is irrelevant
brianpWins has quit [Ping timeout: 264 seconds]
brianpWins_ is now known as brianpWins
<r0bgleeson>
tigor_: why is latin pointless to learn then?
<Senjai>
I don't think latin is pointless
<r0bgleeson>
C is one of the languages that founded everything you use today
<atmosx>
Senjai: hm, C is the underlying structure of RUby (and python, etc) so when you actually try to understand how a method works in ruby, you have to *understand* a little bit of C in order to figure it out.
<r0bgleeson>
youre nuts if you think its "pointless"
<tigor_>
r0bgleeson: because you can use it only in specific field effectively
bradhe has joined #ruby
<atmosx>
Ancient Greek is pointless?
<Senjai>
atmosx: I dabbled in C++ a bit when I was younger.
<askhader>
r0bgleeson: C is as irrelevent as latine?
<askhader>
s/latine/latin
<askhader>
You must find latin to be quite relevant, then.
<r0bgleeson>
askhader: read the surrounding context buddy
<ecksit>
can anyone confirm whether that /should/ work?
stonevil has joined #ruby
codecop has quit [Remote host closed the connection]
dachi has quit [Quit: Page closed]
decoponio has joined #ruby
quoin has quit [Ping timeout: 260 seconds]
freeayu has joined #ruby
jaynewstrom has quit [Disconnected by services]
jaynewst_ has joined #ruby
aaronmcadam has quit [Quit: Leaving...]
<apeiros>
ecksit: you omitted the actual problem description
dachi has joined #ruby
krainboltgreene has quit [Ping timeout: 240 seconds]
<dachi>
is it possible to get subdomain cookies via net/http? i mean if i retrieve cookies from sample.com with ruby set-cookie is nil, but if I open a browser and see set cookies it's set from there to subdomain.sample.com
jtgiri_ has joined #ruby
tylersmith has quit [Remote host closed the connection]
<apeiros>
dachi: in the worst case, you can always access the headers yourself
tylersmith has joined #ruby
<dachi>
oh and cookie = response['Set-Cookie'] isn't it a header... i don't know
azcodex has joined #ruby
<dachi>
I did what I wanted with selenium, but I am trying to do same without webdriver
<apeiros>
dachi: if it isn't in the header, the server didn't send it
<apeiros>
net/http doesn't go around deleting random (or even non-random) headers
KobraKao has joined #ruby
<wm3|eating>
dachi: it's possible that sample.com doesn't set any cookies, but that cookies from subdomain.sample.com are set with a domain attribute that means the browser sends them along to sample.com
maroloccio has joined #ruby
peregrine81 has joined #ruby
<wm3|eating>
dachi: as such, if you do a request with net/http to sample.com, you won't get a cookie header in the response, but if you did a request to subdomain.sample.com you might
<wm3|eating>
dachi: third alternative is that the cookies have been set client-side with JS in the page
elux has quit [Quit: Bye!]
wm3|eating is now known as workmad3
<dachi>
wm3|eating thanks i'll see if I can get it from subdomain
antn has joined #ruby
tylersmith has quit [Ping timeout: 268 seconds]
peregrine81 has quit [Client Quit]
peregrine81 has joined #ruby
bricker`LA has joined #ruby
kirun has quit [Quit: Client exiting]
pencilcheck has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
ferdev has joined #ruby
Astralum has quit [Ping timeout: 264 seconds]
duggiefresh has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
<Dwarf>
I'm trying to get the time till a date in the future
<Dwarf>
It works alright, but the seconds are kinda screwy
stonevil has quit [Remote host closed the connection]
LiquidInsect has quit [Read error: Connection reset by peer]
iliketur_ has quit [Ping timeout: 240 seconds]
tealmage has quit [Remote host closed the connection]
dagnachew has quit [Quit: Leaving]
sambao21 has quit [Quit: Computer has gone to sleep.]
altamic has joined #ruby
altamic has left #ruby [#ruby]
brain_shim has quit [Ping timeout: 260 seconds]
yano has quit [Read error: Connection reset by peer]
Kabaka has quit [Ping timeout: 240 seconds]
yano has joined #ruby
stonevil has joined #ruby
iamjarvo has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
iamjarvo has joined #ruby
ehaliewicz has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
MrZYX is now known as MrZYX|off
nibbles has joined #ruby
LiquidInsect has joined #ruby
Kabaka has joined #ruby
SHyx0rmZ has joined #ruby
tomzx_mac has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Ping timeout: 260 seconds]
iamjarvo_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
tealmage has joined #ruby
tomzx_mac has joined #ruby
atmosx has quit [Quit: Lost in trance]
byprdct has joined #ruby
<nibbles>
How can I run a program from a ruby file and then kill it? I want to run it in foreground, the program (cmatrix) takes control of the terminal and nothing is run before it ends (using system() to run it).
unixninja92 has quit [Ping timeout: 268 seconds]
optimusprimem has quit [Ping timeout: 245 seconds]
unixninja92 has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
ssvo has joined #ruby
vlad_starkov has joined #ruby
quoin has joined #ruby
blueOxigen has quit [Ping timeout: 264 seconds]
iamjarvo_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby
robotblake has quit [Quit: Leaving...]
tomzx_mac has quit [Ping timeout: 240 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Villadelfia has quit [Remote host closed the connection]
jerius has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
azcodex has quit [Quit: azcodex]
quoin has quit [Ping timeout: 264 seconds]
tomzx_mac has joined #ruby
volty has joined #ruby
iamjarvo has quit [Ping timeout: 268 seconds]
eka has quit [Quit: Computer has gone to sleep.]
duggiefresh has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
dachi has quit [Quit: Page closed]
rcosta has joined #ruby
Aquilo has joined #ruby
Asher has joined #ruby
felixjet_ has joined #ruby
tneutron_ has joined #ruby
tneutron has quit [Read error: Connection reset by peer]
tneutron_ is now known as tneutron
tealmage has quit [Remote host closed the connection]
felixjet has quit [Ping timeout: 264 seconds]
mercwithamouth has quit [Ping timeout: 256 seconds]
<shevy>
nibbles do you know the PID? if so you can use Process.kill
<shevy>
Process.kill :QUIT, $PROCESS_ID
<shevy>
Process.kill(SIGTERM, @pid)
mercwithamouth has joined #ruby
tylersmith has joined #ruby
stonevil has quit [Remote host closed the connection]
grayWolf has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
gusnasis_ has quit [Ping timeout: 260 seconds]
Spami has joined #ruby
Guest27516 is now known as ixx
KobraKao has quit [Quit: Saindo]
tylersmith has quit [Ping timeout: 264 seconds]
felixjet_ has quit [Ping timeout: 264 seconds]
butblack has quit [Quit: butblack]
Kabaka has quit [Ping timeout: 240 seconds]
predator217 has joined #ruby
ismlages has quit [Remote host closed the connection]
butblack has joined #ruby
optimusprimem has joined #ruby
optimusprimem has joined #ruby
jerius has quit [Ping timeout: 264 seconds]
predator117 has quit [Ping timeout: 264 seconds]
jerius has joined #ruby
yano has quit [Ping timeout: 624 seconds]
Kabaka has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
snovak has joined #ruby
candlej4ck has joined #ruby
tomzx_mac_ has joined #ruby
Spami has joined #ruby
ssvo_ has joined #ruby
MiguelGD has joined #ruby
Klotho1 has joined #ruby
tomzx_mac has quit [Ping timeout: 264 seconds]
jtgiri_ has quit [Quit: jtgiri_]
snovak has quit [Ping timeout: 260 seconds]
jerius has quit []
gener1c has quit [Remote host closed the connection]
candlej4ck is now known as robotblake
robotblake has quit [Changing host]
robotblake has joined #ruby
vramana has joined #ruby
vramana has quit [Client Quit]
jerius has joined #ruby
rickmasta has quit [Quit: Leaving...]
krainboltgreene has joined #ruby
jerius has quit [Client Quit]
poga has quit [Remote host closed the connection]
TripleDE1 has joined #ruby
tealmage has joined #ruby
duggiefresh has quit [Remote host closed the connection]