kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
keen________ has joined #ruby
nobitanobi has quit [Remote host closed the connection]
tuelz has quit [Ping timeout: 258 seconds]
<centrx>
Evidlo, You probably want to run everything with bundle exec, e.g. bundle exec rake db:migrate RAILS_ENV="production"
wallerdev has joined #ruby
charliesome has joined #ruby
konsolebox has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cibs has quit [Ping timeout: 272 seconds]
wolflee has quit [Remote host closed the connection]
wolflee has joined #ruby
cubesandcode has joined #ruby
lele has quit [Ping timeout: 272 seconds]
Sawbones_ has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
Sawbones has joined #ruby
shock_one has joined #ruby
Channel6 has joined #ruby
finisherr has joined #ruby
cibs has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
jgt1 has quit [Ping timeout: 246 seconds]
segfalt has joined #ruby
<Evidlo>
centrx: Is there a better way to get all the necessary dependencies than to 'bundle exec rake', figure out what's missing, then manually install and repeat?
neanderslob has quit [Ping timeout: 264 seconds]
Igorshp has quit [Remote host closed the connection]
jimms has quit [Remote host closed the connection]
pontiki has joined #ruby
<pontiki>
hi, ruby
shock_one has quit [Ping timeout: 264 seconds]
<centrx>
Evidlo, Presumably if you install system versions of gems, and have no conflicting versions of gems
<centrx>
Evidlo, Remember the bundle defines which versions of gems to use in your app as well
<centrx>
Gemfile
<centrx>
I don't see what's wrong with 'bundle exec' though
Hijiri has joined #ruby
commondream has joined #ruby
blazes816 has joined #ruby
<baweaver>
'evening
cirn0 has quit [Remote host closed the connection]
djbkd has joined #ruby
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
kenneth has joined #ruby
rubie has joined #ruby
tcrypt has quit [Ping timeout: 256 seconds]
cubesandcode has quit []
P1RATEZ has quit []
blazes816 has quit [Ping timeout: 246 seconds]
dorei has quit []
shuber_ has joined #ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
finisherr has quit [Quit: finisherr]
rbennacer has quit [Remote host closed the connection]
braincrash has quit [Quit: bye bye]
kobain has quit [Ping timeout: 265 seconds]
cjim_ has quit [Quit: (null)]
macmartine has joined #ruby
shuber_ has quit [Ping timeout: 255 seconds]
Spami has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
P1RATEZ has joined #ruby
krz has joined #ruby
devoldmx has joined #ruby
macmartine has quit [Remote host closed the connection]
braincrash has joined #ruby
dopie has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
Sawbones has quit [Remote host closed the connection]
scripore has quit [Remote host closed the connection]
scripore has joined #ruby
Sawbones has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
anytimebutnow has joined #ruby
renanoronfle has joined #ruby
Mia has quit [Ping timeout: 258 seconds]
crack_user has joined #ruby
macmarti_ has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
renanoronfle has quit [Client Quit]
kenneth has joined #ruby
rrichardsr3 has joined #ruby
bruno- has joined #ruby
Sawbones has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 272 seconds]
crack_user has quit [Quit: Leaving.]
P1RATEZ has quit []
Sawbones has joined #ruby
arescorpio has quit [Excess Flood]
cyberarm has quit [Read error: Connection reset by peer]
tuelz has joined #ruby
Sawbones has quit [Remote host closed the connection]
zotherstupidbot has quit [Ping timeout: 264 seconds]
devoldmx has quit [Ping timeout: 258 seconds]
zotherstupidguy has quit [Ping timeout: 256 seconds]
<ebonics>
ah cool hanmac1 yeah ive seen that before
<ebonics>
tco is actually really necessary in ruby i think
<ebonics>
it has a lot of dependence on it
sent1nel has quit [Remote host closed the connection]
shuber_ has joined #ruby
jayeshsolanki has quit [Ping timeout: 258 seconds]
<zenspider>
ebonics: that's not tco
baroquebobcat has quit [Ping timeout: 272 seconds]
<ebonics>
zenspider, ?
dreinull75 has joined #ruby
wallerdev has quit [Quit: wallerdev]
abuzze has quit [Read error: Connection reset by peer]
abuzze has joined #ruby
<ebonics>
what's not tco zenspider
<zenspider>
working on it...
spider-mario has quit [Remote host closed the connection]
<zenspider>
tco means that when you make a "tail call" ((leaf node) function call that will be the result of the entire function expression) the language will not create an extra stack entry for the new call and replace the current stack item w/ the new. recursion is a subset, tco applies to ANY tail call
stanford_drone has joined #ruby
<dreinull75>
I'm using a presenter class to build some strings and numbers. Is there an elegant way to strip all strings originating from that class if String and strftime every date without explicitly calling those methods? Like an initializer but on the other end?
<ebonics>
zenspider, i dont think thats true
<ebonics>
thats not what my understanding of what tco is anyway, maybe im wrong
<ebonics>
i dont see how you can replace the stack
<zenspider>
dreinull75: strip? can you describe it differently?
<zenspider>
ebonics: the GC isn't involved (or if it is, it is incidental)
<ebonics>
a huge argument against bothering with tco in java is that you run out of stack before you run out of heap space
pardusf has quit [Read error: Connection reset by peer]
shuber_ has quit [Ping timeout: 272 seconds]
<dreinull75>
zenspider just String#strip on any String that is returned by my Presenter.
<dreinull75>
like a post call hook or something.
<zenspider>
dreinull75: you want to call it w/o calling it?
<dreinull75>
yes
dumdedum has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tuelz has joined #ruby
<ebonics>
zenspider, are you saying that that's the definition of tco
<dreinull75>
just doing some research if that's a good idea
<ebonics>
or just how it is in ruby
<zenspider>
ebonics: "replace the stack" is perhaps a bit naive a description
<ebonics>
because in java it's the JIT
<zenspider>
you basically longjmp to the new call site instead of calling it
<ebonics>
but i don't think ruby has a JIT
<zenspider>
"If the last thing a routine does before it returns is call another routine, rather than doing a jump-and-add-stack-frame immediately followed by a pop-stack-frame-and-return-to-caller, it should be safe to simply jump to the start of the second routine, letting it re-use the first routine's stack frame (environment)."
baweaver has quit [Remote host closed the connection]
<Obfuscate>
ebonics: That's a reasonable description in general. The only thing TCO requires is that the caller's call frame is replaced by the callee's when the call is in tail-context.
fabrice31 has quit [Remote host closed the connection]
<Obfuscate>
Hopefully it's not actually longjmp, but the effect is the same. :)
parduse has joined #ruby
fabrice31 has joined #ruby
<zenspider>
JIT has nothing (specifically) to do with this.
<ebonics>
so you're saying it's built into the ruby runtime
mengu has quit [Ping timeout: 264 seconds]
ahmetkapikiran has joined #ruby
<ebonics>
especially for ruby i cant see that being the case
<ebonics>
maybe for a compiled language
bluOxigen has left #ruby [#ruby]
<ebonics>
but im pretty ignorant overall so maybe youre right :p
<zenspider>
what does compiling or jit have to do with it, in your mind?
<ebonics>
to do tco i think you need to have to analyze control flow and do a lot of ahead of time analysis
<ebonics>
ie. something the runtime wouldnt do
neohunter has joined #ruby
<zenspider>
Obfuscate: "Tail call elimination allows procedure calls in tail position to be implemented as efficiently as goto statements"
tuelz has quit [Ping timeout: 250 seconds]
<Obfuscate>
zenspider: I am well aware.
scottstamp has joined #ruby
<zenspider>
Obfuscate: just basically saying that it is essentially a longjmp (tho hopefully you're not actually coding in C)
rubie has joined #ruby
<ebonics>
like how can it be safe to jmp if your method isnt atomic
<Obfuscate>
ebonics: It's trivial to determine when TCO can be used. Doing this optimization at runtime is not problematic.
<zenspider>
ebonics: you don't need to analyze control flow (separately, at least). you can tell as you're traversing an AST
mrsolow has joined #ruby
fella5s has joined #ruby
<ebonics>
i dont know anything about ruby synchronization so yeah
<ebonics>
i understand for a single thread it's trivial
gagrio has joined #ruby
devoldmx_ has quit [Remote host closed the connection]
<Obfuscate>
zenspider: fwiw, I was simply noting it's not actually a longjmp, which (as someone who works a great deal directly with x86 assembly) is a subtly different thing.
<zenspider>
sure. absolutely. and I'm sorry you work in x86 a lot. :P
<ebonics>
haha
<zenspider>
tho, if you do.... you should help me update wilson!
hanmac has quit [Ping timeout: 256 seconds]
<Obfuscate>
I find I enjoy the low-level hackery a bit more, to be honest.
<zenspider>
programming font with coding ligatures
<ebonics>
o god lol
<apeiros>
fancy
<ebonics>
still better than brainfuck i guess
io_syl has quit []
<zenspider>
I wonder if emacs will render ligatures
simurg has joined #ruby
<Obfuscate>
ebonics: I mostly stick to parsing and language analysis (with an aim to improve translation), so for me it's a great deal of experimenting with different algorithms.
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fella5s has quit [Read error: Connection reset by peer]
arietis has joined #ruby
<ebonics>
Obfuscate, i think translation was the easiest part. not necessarily translation but it was the easiest technique to do (i forgot what its called) but finding senses through matching corpuses in different languages
<ebonics>
i actually enjoyed that part haha
vivekananda has quit [Ping timeout: 255 seconds]
<ebonics>
but that's cool Obfuscate, what language(s) do you use for it?
kinduff has quit [Ping timeout: 245 seconds]
<Obfuscate>
ebonics: Accurate translation is a problem that even Google struggles with. It's not easy, unless you're merely attempting statistical translation.
<Obfuscate>
English, Japanese and Chinese.
<ebonics>
Obfuscate, i didn't mean necessarily translation but idk what the term is called
<Obfuscate>
Most code is in C++, a DSL backed by LLVM and a little postgres.
<ebonics>
Obfuscate, it's when you take an english word in a corpus, then you take a chinese corpus with an "exact match" sense that's been tagged, then translate that back to english
longfeet_ has quit [Ping timeout: 255 seconds]
<ebonics>
chinese/whatever :P
<Obfuscate>
Defilement? ;)
<agent_white>
tomflint: /join #ecf
<agent_white>
woops
<agent_white>
wrong... everything!
<ebonics>
Obfuscate, no it's a legit NLP technique
<ebonics>
it's better than a lot of bayesian approaches
<apeiros>
zenspider: are you on twitter?
<Aeyrix>
Same name.
hanmac has joined #ruby
<apeiros>
right. see it. odd, why doesn't twitter client complete it for me?
TigerWolf has quit [Ping timeout: 252 seconds]
<Obfuscate>
ebonics: I've read about approaches like that, but don't recall a name for it, and it's not something that interests me.
abuzze_ has joined #ruby
zenspider has quit [Quit: bye]
zenspider has joined #ruby
abuzze has quit [Read error: Connection reset by peer]
xxi has quit [Ping timeout: 240 seconds]
abuzze_ has quit [Client Quit]
<ebonics>
Obfuscate, do you work for a big corporation or something?
<zenspider>
let's try this again... my client freaked out. not sure if client or proxy
<zenspider>
apeiros: aye. @the_zenspider
<apeiros>
oh, not @zenspider?
<zenspider>
apeiros: no, that's not me... and they never seem to use it except for reading and that's enough for twitter to not give it back to me
wildroman2 has joined #ruby
nfk|laptop has joined #ruby
krz has joined #ruby
kenneth has joined #ruby
<zenspider>
(I had it originally, then blew up the account because I deemed twitter only for announcing bowel movements)
CloCkWeRX has quit [Ping timeout: 272 seconds]
<Obfuscate>
ebonics: No, not quite. A fairly small operation where analyzing text is the primary work.
<ebonics>
Obfuscate, sounds like some HFT shit ;P
P1RATEZ has quit []
<ebonics>
that would explain why you use asm :D
<Obfuscate>
ebonics: I'm not sure what that acronym is supposed to be, but it's about time for me to sleep...
<zenspider>
Obfuscate: wouldn't you rather write it in ruby?!?! wilson!
<ebonics>
Obfuscate, high frequency trading
diegoviola has joined #ruby
<ebonics>
ive heard of people applying NLP/LSA techniques to it
<ebonics>
anyway seeya
<Obfuscate>
ebonics: Ah, negative. That might be interesting though.
horsecowdog has joined #ruby
ponga has quit [Quit: Leaving...]
User458764 has joined #ruby
<Obfuscate>
zenspider: Too slow. Just dropping AVX alone would be tragic.
<zenspider>
I dunno what AVX is, but I don't see how you can say it is too slow. wilson lets you write fast
nfk has joined #ruby
nfk|laptop has quit [Ping timeout: 272 seconds]
SOLDIERz has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra>
Bonjour
horsecowdog has quit [Ping timeout: 252 seconds]
Juanchito has joined #ruby
Macaveli has joined #ruby
jgt1 has joined #ruby
RegulationD has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Obfuscate>
zenspider: There's actually a few reasons to avoid ruby: especially the type system, garbage collection, MRI and threads... but mainly it's that a great deal of the work consists of scanning of large sparse boolean matrices where the cache is a major concern and at this point there's a fairly heavy investment in LLVM.
CloCkWeRX has joined #ruby
doertedev has joined #ruby
Beoran_ has joined #ruby
RegulationD has quit [Ping timeout: 245 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
apakatt has left #ruby ["?"]
* Obfuscate
vanishes.
bMalum has joined #ruby
SOLDIERz has quit [Ping timeout: 256 seconds]
nfk has quit [Quit: yawn]
blackmesa has joined #ruby
Beoran has quit [Ping timeout: 264 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
DerisiveLogic has quit [Ping timeout: 244 seconds]
benegget_ has joined #ruby
beneggett has quit [Ping timeout: 256 seconds]
CloCkWeRX has quit [Ping timeout: 256 seconds]
arup_r has quit [Remote host closed the connection]
<stanford_drone>
Does anyone know C/C++, Computer Vision/Image Processing, Machine Learning, AI, linux systems programming, or electronics? I'm looking for a programmer to join my Startup. We're going to China (manufacturing is there) from July to November. We're a team of 4. We're building a flying computer. A drone that you can play games with and install apps on.
Zamyatin has quit [Quit: Knocking out. Peace y'all...]
cosmicexplorer has quit [Ping timeout: 246 seconds]
<apeiros>
zenspider: wilson? isn't that your inline assembler?
P1RATEZ has joined #ruby
<apeiros>
stanford_drone: you do realize that this is #ruby, not ##c or (whatever c++' channel is)?
flak has joined #ruby
charliesome has quit [Quit: zzz]
flak is now known as Guest44683
<dtscode>
apeiros: Funnily enough, its ##c++
<apeiros>
dtscode: oh, right, + is valid in channel names.
<dtscode>
stanford_drone: Literally none of those are related to ruby
<apeiros>
I tend to think channel names have the same rules as nicknames, but they don't.
<dtscode>
At least not directly
<apeiros>
you can even have control characters in channel names. silly…
<dtscode>
apeiros: Nope. Nicknames are more rigerous
tejasmanohar has left #ruby ["WeeChat 1.1.1"]
<apeiros>
dtscode: I know. I just rewrote my irc message parser 2 weeks ago…
ArchRogem has joined #ruby
<dtscode>
Nice
<dtscode>
I still need to write mine
<apeiros>
sadly freenode breaks rfc2812
* apeiros
points at that user with nick 7F1AALP94 - which is impossible according to rfc (leading digit)
shuber_ has joined #ruby
<dtscode>
Freenode breaks a lot of things ;-;
rippa has quit [Ping timeout: 255 seconds]
<apeiros>
what else does it break?
<apeiros>
I noticed the welcome message does not contain the full mask, which is against the rfc as far as I understood. never verified that, though.
wildroman2 has quit [Remote host closed the connection]
<dtscode>
Uh I actually can't remember off the top of my head. I'm writing a shell in C atm, so my work with the RFC and IRC is a bit rusty
<apeiros>
kk
<dtscode>
Protip: Don't do anything in c ;-;
<apeiros>
heh
<stanford_drone>
dtscode, good programmers can use multiple languages.
<ebonics>
myth
<adaedra>
no, real programmers use butterflies.
<agent_white>
dtscode: Get out of my goddamned channels.
<ebonics>
i am a god at basic
<dtscode>
agent_white: GTFO you noob
shuber_ has quit [Ping timeout: 252 seconds]
djbkd has quit [Remote host closed the connection]
<agent_white>
adaedra: Oh no, you must've been mistaken! Real programmers ARE butterflies.
<dtscode>
stanford_drone: It still doesn't really belong here (I'm guessing). And I wouldn't say good programmers can neccesarily use multiple languages
<dtscode>
agent_white: Do you like not read XKCD?
<sevenseacat>
stanford_drone: we don't really like advertising.
darkf has joined #ruby
<ebonics>
not to mention that sounds like the least commercially viable thing in existence
<dtscode>
ebonics: You've never gotten the urge to play apps on your drone?
<dtscode>
God damn it agent_white
benegget_ has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<ebonics>
lol :/
ndrei has quit [Ping timeout: 256 seconds]
ta has joined #ruby
zreisman has quit [Remote host closed the connection]
<stanford_drone>
“If I had asked people what they wanted, they would have said faster horses.”
<stanford_drone>
― Henry Ford
einarj has joined #ruby
diegoviola has quit [Quit: WeeChat 1.2]
<agent_white>
Who _doesn't_ want a faster horse?!
<sevenseacat>
vroom vroom horsey
<darkf>
I sure do, with racestripes
* sevenseacat
revs
<ebonics>
idk dude like
<ebonics>
how are you going to be able to walk and play your video game
* darkf
rotates the horse's ears like motorcycle accelerators
<ebonics>
does it fly automatically
<darkf>
only if it's a pegasus
<darkf>
luxury model
<ebonics>
im imagining running into walls and shit
<darkf>
well, the horse doesn't really want to run into walls
<darkf>
trees, though...
<agent_white>
As long as it doesn't run into trees. Last time I rode a horse it went into a tree.
<agent_white>
^^
<darkf>
might also want to do a mating ritual with other horses so be careful when riding in packs
<apeiros>
agent_white: did you ride a blind horse?
<darkf>
unless you're a bull rider
<apeiros>
agent_white: or was it suicidal? o0
<agent_white>
apeiros: Nope! Though I did learn horses do not have a brake pedal.
<darkf>
so, welcome to ##cars everyone
<sevenseacat>
lol
<darkf>
I knew there was a reason we taught cars as examples for OOP
ndrei has joined #ruby
dtscode has quit [Ping timeout: 255 seconds]
quimrstorres has joined #ruby
tubuliferous has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
<darkf>
so does anyone actually use callcc in ruby?
<sevenseacat>
never heard of it.
<apeiros>
darkf: wasn't that removed in 1.9?
<apeiros>
at least in 2.2 it's no longer present.
<darkf>
really?
<apeiros>
I have. it was fun. bent my mind a bit, tho.
lidenskap has quit [Remote host closed the connection]
<darkf>
it's not in Kernel anymore I guess
<apeiros>
ah, so they moved it out of core
<ebonics>
i personally use html to program my programs
gkra has quit [Ping timeout: 264 seconds]
<darkf>
apeiros: what did you use it for, out of curiosity?
<apeiros>
darkf: no idea
<darkf>
hehe
<apeiros>
that's ~10y ago
<darkf>
yowza
<apeiros>
and like flip-flops, I'd have to think quite hard before using it again :)
<apeiros>
hm, not true. I think I'd have less trouble with flip-flops.
<darkf>
I attempted to use it last year for some strange abstraction, but it intefered oddly with a C extension I was using so I had to give it up and do something more sane, unfortunately
<darkf>
(I think I could have even used generators.)
<apeiros>
but interesting that you bring it up
<apeiros>
I just read a bit about stackless languages a week or two ago
ta has quit [Remote host closed the connection]
<apeiros>
and it said that continuations were one way to implement a stackless language
<darkf>
they're pretty nifty
<darkf>
well, funny you bring _that_ up
<darkf>
yesterday I was thinking about how you can just have programs in CPS and use a trampoline to evaluate continuations
P1RATEZ has quit []
mengu has joined #ruby
mengu has joined #ruby
<apeiros>
CPS?
<darkf>
continuation-passing style
tubuliferous has quit [Ping timeout: 244 seconds]
<apeiros>
ah
bronson has joined #ruby
<darkf>
the idea would be that you just return a continuation closure after each statement or whatever and then a trampoline would execute it (which would not grow the stack)
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<unshadow>
So, I want to test: a = gets, if a =~ somthing, elsif a =~ somthing_else, else gets again and check
<unshadow>
what is the best way to do it ?
cassianoleal has joined #ruby
<darkf>
can't you use patterns in switch/case expressions?
<agent_white>
while
bruno- has joined #ruby
<apeiros>
gotwhatiwant = false: until gotwhatiwant …
<agent_white>
ooo
<apeiros>
darkf: yes
<apeiros>
unshadow: alternatively use something like highline
<darkf>
yeah, so switch gets; case /foo/ ...; end
<darkf>
in a loop if you must
<apeiros>
it deals with "ask user until input fits" patterns iirc.
<ebonics>
a = gets: until a =~ something || a =~ something_else
<apeiros>
darkf: well, case/when, not switch/case
<unshadow>
a = gets until a =~ /(a|b)/i
<darkf>
ah, yes
<ebonics>
yeah but wanna fight unshadow
<unshadow>
nice ideas :) thanks
<unshadow>
aperios, what's highline ?
<apeiros>
who's aperios?
<unshadow>
....
<unshadow>
:)
rubie has quit [Remote host closed the connection]
centrx has joined #ruby
<unshadow>
* apeiros
<apeiros>
a gem
<darkf>
apeiros: anyway I think certain languages (especially functional ones) use this model to evaluate, so I find it interesting. I wonder how tenable it would be to implement such an evaluator in Ruby. :)
<apeiros>
protip: use tab completion for nicks
bronson has quit [Ping timeout: 246 seconds]
<unshadow>
not in irssi ^^
fella5s has joined #ruby
chthon has joined #ruby
<apeiros>
unshadow: I'm pretty sure irssi has tab completion
<unshadow>
nm, apperntly working.. thanks
<agent_white>
unshadow: ? I use tab completion all the time. I just used it right now.
<unshadow>
apeiros:
<apeiros>
pebcak :-p
<unshadow>
thanks for the tip
<apeiros>
yw
<agent_white>
Turn it off, then on again!
<ebonics>
does anyone use elastic beanstalk
scuey has quit [Ping timeout: 272 seconds]
<ebonics>
wtf does it mean when it says health: red and an excalamation mark
<ebonics>
it's scaring me but it just stays like that all the time
anisha has joined #ruby
SouL_|_ has quit [Ping timeout: 264 seconds]
lkba_ has quit [Ping timeout: 258 seconds]
<agent_white>
shevy: PINGPINGPING
bruno- has quit [Ping timeout: 252 seconds]
CloCkWeRX has joined #ruby
seitensei has quit [Read error: Connection reset by peer]
<agent_white>
ebonics: RIP in peace ebonics
<ebonics>
agent_white, it's been like that for like a couple weeks i think
<ebonics>
so it can't be that critical
<agent_white>
ebonics: You're speaking to us from the afterlife. What's it like?
Hounddog has joined #ruby
<ebonics>
lol
<apeiros>
hmmmmm…
<apeiros>
deploy to production = release
<apeiros>
deploy to staging = stage
<apeiros>
deploy to acceptance = ???
seitensei has joined #ruby
seitensei has joined #ruby
mrsolo has joined #ruby
<adaedra>
apeiros: pray
marr has joined #ruby
ahmetkapikiran has joined #ruby
arup_r has joined #ruby
User458764 has joined #ruby
lele has joined #ruby
<sevenseacat>
after much umming and ahhing I think I've settled on DejaVu Sans Mono for an editor font
sigurding has joined #ruby
* darkf
continues using Consolas or whatever
SouL_|_ has joined #ruby
* adaedra
uses Fira Mono
joonty has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<shevy>
everything above my screen is ancient history :)
bkxd_ has quit [Ping timeout: 258 seconds]
<dreinull75>
good morning then, I'm getting ready for lunch …
<shevy>
dreinull75 they reside in different namespaces
GriffinHeart has quit [Remote host closed the connection]
wjimenez5271 has quit [Ping timeout: 264 seconds]
leafybasil has quit [Ping timeout: 244 seconds]
<dreinull75>
shevy I want to keep them apart because one is a clean API I'm building and the second provides some helper methods to the first. Right now everything is in one module.
<shevy>
also your code can not work from that pastie
<dreinull75>
yes, missing the include B
<shevy>
f.rb:20:in `<main>': uninitialized constant Original (NameError)
<dreinull75>
and I learned about eval.in which I've been looking for but couldn't find.
<dreinull75>
in some cases more useful than irb.
<apeiros>
every day I'm eval'in
<dreinull75>
off to lunch :)
<shevy>
hehe
atox has quit [Remote host closed the connection]
lidenskap has joined #ruby
wolfleemeta__ has quit [Remote host closed the connection]
pwattstbd has joined #ruby
jimms has joined #ruby
bMalum has joined #ruby
wolfleemeta__ has joined #ruby
Stalkr_ has joined #ruby
jottr has joined #ruby
atox has joined #ruby
jottr has quit [Read error: Connection reset by peer]
jottr has joined #ruby
bruno- has joined #ruby
Pathfinder has joined #ruby
lidenskap has quit [Ping timeout: 246 seconds]
<adaedra>
?pry dreinull75
<ruboto>
dreinull75, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ’binding.pry’ directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
fabrice31 has joined #ruby
konsolebox has quit [Quit: Leaving]
User458764 has joined #ruby
bMalum has quit [Quit: bMalum]
bruno- has quit [Ping timeout: 264 seconds]
arup_r has quit [Ping timeout: 245 seconds]
phutchins has joined #ruby
Stalkr_ has quit [Ping timeout: 276 seconds]
<shevy>
what is the best way to convert one specific method in a module
<shevy>
to a class method in addition to it. example
<shevy>
module Foo; def bar; puts 'hi from bar'; end <-- bar should also be a module method there, but only bar, no other method in said module
<shevy>
I forgot one 'end'
<jhass>
shevy: module_function
ramfjord has quit [Ping timeout: 245 seconds]
<heftig>
shevy: module_function :bar
<shevy>
ok lemme try that
<heftig>
in recent rubies def returns the method symbol, so you can do module_function def bar
DEA7TH has joined #ruby
doodlehaus has joined #ruby
<shevy>
hehe
mengu has quit []
pwnz0r has quit [Remote host closed the connection]
leafybas_ has quit [Remote host closed the connection]
pwnz0r has joined #ruby
leafybasil has joined #ruby
shock_one has quit []
bkxd has quit [Ping timeout: 255 seconds]
serivich has joined #ruby
hectortrope has joined #ruby
pwnz0r has quit [Ping timeout: 265 seconds]
rodfersou has joined #ruby
jimms has quit [Remote host closed the connection]
wolfleemeta___ has joined #ruby
fabrice31 has quit [Remote host closed the connection]
tuelz has joined #ruby
fabrice31 has joined #ruby
qwertme has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wolfleemeta__ has quit [Ping timeout: 255 seconds]
jottr has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
Mezjin has quit [Ping timeout: 244 seconds]
jimms has joined #ruby
tuelz has quit [Ping timeout: 244 seconds]
haxrbyte has joined #ruby
jottr has joined #ruby
bruno- has joined #ruby
scripore has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
haxrbyte_ has quit [Ping timeout: 264 seconds]
psy__ has quit [Ping timeout: 256 seconds]
freerobby has joined #ruby
chipotle has quit [Quit: cheerio]
segfalt has quit [Quit: segfalt]
jottr has quit [Ping timeout: 272 seconds]
_blizzy_ has quit [Ping timeout: 265 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<adaedra>
shevy: here he calls system with multiple arguments, not through a string, which doesn't calls a shell but runs the process directly, hence not handling 2>&1
fabrice31_ has joined #ruby
<shevy>
yeah, he should just use a string
<Pro|>
can not use just a string
<Pro|>
but how would i do this with stdout reopn?
<adaedra>
stderr reopen
<adaedra>
I advise you do it in a fork, though, as it will affect the current process
<adaedra>
You reopen stderr to stdout, so both output will be the same (it's what 2>&1 do in shell)
xxtjaxx has quit [Remote host closed the connection]
<dreinull75>
adaedra: thanks, I tried pry before but couldn't quite figure it out for my use cases
Pathfinder has quit [Ping timeout: 264 seconds]
<apeiros>
not quite sure what's to figure out about pry
<apeiros>
you type `pry` instead of `irb`. done.
fabrice31 has quit [Ping timeout: 246 seconds]
<apeiros>
(of course, additionally you get binding.pry for within your apps)
<adaedra>
wut
<adaedra>
ah no
<dreinull75>
well, I haven't tried it for agaes
barkerd427 is now known as zz_barkerd427
<dreinull75>
I'm a casual dev
horsecowdog has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
and a casual typer!
Hirzu_ has joined #ruby
arquebus has quit [Quit: Konversation disconnected]
Hirzu has quit [Read error: Connection reset by peer]
<dreinull75>
not a native if that counts as an excuse
Hirzu has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
<adaedra>
not a lot of us are, iirc
horsecowdog has quit [Ping timeout: 258 seconds]
<shevy>
dreinull75 I meant that in regards to "agaes", not whether one would be a native english speaker or not ;-)
startupality has joined #ruby
<dreinull75>
of course
trouloulioud_dev has quit [Quit: Leaving]
<shevy>
it was one reason why I could never adjust to irssi
<dreinull75>
the bar is high, nevertheless
vivekananda has joined #ruby
<shevy>
I type quickly, make lots of mistakes, and out those things go already! in xchat I have that edit-line here where I can make corrections
<shevy>
it was especially awful when pasting multiline stuff through irssi
<shevy>
channel overflow
<dreinull75>
of already sent messages?
Hirzu_ has quit [Ping timeout: 244 seconds]
leafybas_ has joined #ruby
AlphaAtom has joined #ruby
<dreinull75>
I'm quite fond of shout (as long as it works though).
<shevy>
dunno what it was, I always ended up channel flooding when I was not careful
lidenskap has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
bronson has joined #ruby
RegulationD has joined #ruby
sankaber has joined #ruby
leafybasil has quit [Ping timeout: 264 seconds]
lidenskap has quit [Ping timeout: 265 seconds]
hectortrope has quit [Quit: WeeChat 0.4.2]
platzhirsch has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
<platzhirsch>
I forgot how to write short Ruby code. One-liner for a while loop with a start value ?
RegulationD has quit [Ping timeout: 255 seconds]
jimms has quit [Read error: Connection reset by peer]
jimms has joined #ruby
Pathfinder has joined #ruby
<adaedra>
each_with_object?
postmodern has quit [Quit: Leaving]
arup_r has joined #ruby
sts has joined #ruby
doublemalt_ has joined #ruby
lotherk has quit [Remote host closed the connection]
<sts>
hello folks. I'm trying to write an extension to Capistrano and I'm facing issues with my extension beeing loaded twice. The extension is installed via rubygems.
<arup_r>
What is the difference between `__id__` and `object_id` ?
fabrice31_ has quit [Remote host closed the connection]
<sts>
Capistrano is automatically trying to load my extension via Kernel#load, but it cannot find the file (because its from a Gem).
fabrice31 has joined #ruby
<Pro|>
if i have a array [1,2,3,4,5] how can i call with it a method that requires 5 parameters
<sts>
Now when I add a require 'capistrano/xcopy', it will already load my extension, and later on capistrano also tries to load the extension. Thus I end up with it loaded twice.
<sts>
Has anyone got an idea about what I could do?
simurg has joined #ruby
arup_r_ has joined #ruby
lotherk has joined #ruby
arup_r_ has quit [Client Quit]
arup_r has quit [Ping timeout: 256 seconds]
nfk has joined #ruby
gregf has joined #ruby
sigurding has quit [Quit: sigurding]
scripore has quit [Quit: This computer has gone to sleep]
doodlehaus has quit [Remote host closed the connection]
<rdark>
sts - rescue a LoadError from the require?
<jhass>
Pro|: re system, take a look at the docs, it takes the same arguments as spawn, so a pipe would work. Or you take a look at open3 stdlib
<jhass>
Pro|: the second question, with a splat: foo(*array)
gustavn has joined #ruby
dumdedum has quit [Quit: foo]
gustavn has quit [Quit: Leaving]
<sts>
rdark: the auther of capistrano already helped me in the other channel. thanks anyways
tubuliferous has joined #ruby
gustavn has joined #ruby
gustavn has quit [Client Quit]
Juanchito has quit [Ping timeout: 256 seconds]
tubuliferous has quit [Ping timeout: 245 seconds]
Juanchito has joined #ruby
jottr has joined #ruby
renanoronfle has joined #ruby
jottr has quit [Read error: Connection reset by peer]
jottr has joined #ruby
multiscan has joined #ruby
kurtec has joined #ruby
kurtec has left #ruby [#ruby]
kurtec has joined #ruby
Nimf has quit [Read error: Connection reset by peer]
kurtec has left #ruby [#ruby]
shuber_ has joined #ruby
bMalum has joined #ruby
akfaew has joined #ruby
ta has joined #ruby
bMalum has left #ruby [#ruby]
<akfaew>
is there something similar to perl's "fatpacker" available for ruby? i.e. pull in all files that a piece of software 'requires' and put it all into one big self contained file, for easy deployment?
<hanmac1>
akfaew: isnt that what gems are for?
denver has quit [Read error: No route to host]
<akfaew>
i don't want gems, because i have many different pieces of ruby code on hundereds of machines
<rdark>
akfaew: not afaik - ruby has bundler etc, which perl was lacking in anything like that for a long time
<akfaew>
i want to be independent of upstream changes
<akfaew>
and test once, not with every gem version
_blizzy_ has joined #ruby
<akfaew>
i had a look at omnibus, but it seems to do way more than i want. and is also quite difficult to set up
<rdark>
akfaew: use bundler with --path vendor/bundle, make sure to use a Gemfile.lock
<rdark>
I was for a while distributing some RPM packages using a similar method, so all that was required on the box was ruby + bundler
<akfaew>
rdark: how would i use that when deploying a ruby program to 100 servers? i'd need to run bundler as a post-processing part of the package?
shuber_ has quit [Ping timeout: 272 seconds]
<rdark>
no - you use bundler as part of your package build process
<akfaew>
oh, ok. sounds inviting
<akfaew>
thanks, i'll have a look
psy_ has joined #ruby
rhllor has joined #ruby
tuelz has joined #ruby
denver has joined #ruby
but3k4 has joined #ruby
renanoronfle has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
banister has quit [Read error: Connection reset by peer]
rodferso1 has joined #ruby
Rapier- has joined #ruby
banister has joined #ruby
tuelz has quit [Ping timeout: 272 seconds]
withnale_ has quit [Ping timeout: 245 seconds]
jimms_ has joined #ruby
ponga has joined #ruby
qwertme has joined #ruby
zz_barkerd427 is now known as barkerd427
rodfersou has quit [Ping timeout: 272 seconds]
<jhass>
akfaew: that'll only work if your target environments are all (exactly) the same as the build environment
guardianx has joined #ruby
tuelz has joined #ruby
jimms has quit [Ping timeout: 272 seconds]
<jhass>
akfaew: if that's not the case you'll need bundler on the target environment and use bundle package and the run bundle install --deployment on the target
e1nh4nd3r has quit [Ping timeout: 250 seconds]
pwattstbd has quit [Ping timeout: 264 seconds]
dorei has joined #ruby
Pathfinder has quit [Ping timeout: 244 seconds]
<jhass>
bundler has a standalone mode though
dstarh has joined #ruby
<jhass>
(that allows you to embed it into your project iirc)
crazydiamond has quit [Remote host closed the connection]
hectortrope has joined #ruby
Caius has quit [Ping timeout: 276 seconds]
_blizzy_ has quit [Ping timeout: 255 seconds]
jordanm has quit [Read error: Connection reset by peer]
jordanm has joined #ruby
<akfaew>
yeah that's what i want to achieve somehow
Caius has joined #ruby
kp666 has quit [Remote host closed the connection]
[k- has joined #ruby
freerobby has quit [Quit: Leaving.]
agent_white has quit [Read error: Connection reset by peer]
giuseppesolinas has joined #ruby
giuseppesolinas has quit [Remote host closed the connection]
giuseppesolinas has joined #ruby
agent_white has joined #ruby
Feyn has quit [Quit: Leaving]
agent_white has quit [Read error: Connection reset by peer]
arietis has quit [Quit: Leaving.]
sigurding has joined #ruby
ascarter has joined #ruby
agent_white has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
daynaskully has quit [Quit: quit]
bMalum has joined #ruby
leafybas_ has quit [Remote host closed the connection]
leafybasil has joined #ruby
SouL_|_ has joined #ruby
bMalum has quit [Quit: bMalum]
scripore has joined #ruby
riotjones has quit [Quit: Leaving...]
airdisa has joined #ruby
e1nh4nd3r has joined #ruby
matugm has joined #ruby
matugm has joined #ruby
griffindy has joined #ruby
arietis has joined #ruby
wald0 has quit [Quit: Lost terminal]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
digifiv5e has joined #ruby
SouL_|_ has quit [Read error: Connection reset by peer]
stef204 has joined #ruby
SouL_|_ has joined #ruby
digifiv5e is now known as daynaskully
daynaskully is now known as guyz
guyz is now known as daynaskully
rhllor has quit [Quit: rhllor]
RegulationD has joined #ruby
stef204 has quit [Client Quit]
__chris has joined #ruby
tkuchiki has joined #ruby
sgambino has joined #ruby
startupality has quit [Quit: startupality]
RegulationD has quit [Ping timeout: 255 seconds]
havenwood has joined #ruby
bMalum has joined #ruby
tuelz has quit [Ping timeout: 258 seconds]
io_syl has joined #ruby
charliesome has joined #ruby
lolmaus has joined #ruby
zotherstupidguy has joined #ruby
ponga has quit [Quit: Leaving...]
devoldmx has joined #ruby
centrx has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
scripore has quit [Quit: This computer has gone to sleep]
iamninja has joined #ruby
segfalt has joined #ruby
vt102 has joined #ruby
twistedpixels is now known as zz_twistedpixels
Rickmasta has joined #ruby
shuber_ has joined #ruby
dblessing has joined #ruby
wolfleemeta___ has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 256 seconds]
wolfleemeta___ has joined #ruby
scripore has joined #ruby
lidenskap has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
Rollabunna has joined #ruby
syath has joined #ruby
jimms has joined #ruby
doodlehaus has joined #ruby
bronson has joined #ruby
Spami has joined #ruby
shuber_ has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
alderamin has quit []
jimms_ has quit [Ping timeout: 252 seconds]
lidenskap has quit [Ping timeout: 245 seconds]
zotherstupidbot has joined #ruby
Rapier- has quit [Quit: (null)]
jerius has joined #ruby
wolfleemeta____ has joined #ruby
quimrstorres has quit [Read error: Connection reset by peer]
Rapier- has joined #ruby
quimrstorres has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gambl0re has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 264 seconds]
nfk has quit [Quit: yawn]
e1nh4nd3r1 has joined #ruby
Hounddog has quit [Remote host closed the connection]
wolfleemeta___ has quit [Ping timeout: 245 seconds]
Spami has quit [Quit: This computer has gone to sleep]
vivekananda has quit [Ping timeout: 265 seconds]
jimms has quit [Remote host closed the connection]
tuelz has joined #ruby
e1nh4nd3r has quit [Ping timeout: 244 seconds]
iwishiwerearobot has joined #ruby
Spami has joined #ruby
superlou has joined #ruby
bmurt has joined #ruby
chinmay_dd has joined #ruby
leafybas_ has joined #ruby
leafybas_ has quit [Remote host closed the connection]
blackmesa has joined #ruby
leafybas_ has joined #ruby
leafybasil has quit [Read error: Connection reset by peer]
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
startupality has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
jayeshsolanki has joined #ruby
shellfu_afk is now known as shellfu
e1nh4nd3r has joined #ruby
ldnunes has quit [Quit: Leaving]
bMalum has quit [Quit: bMalum]
qwertme has joined #ruby
baroquebobcat has joined #ruby
P1RATEZ has joined #ruby
e1nh4nd3r1 has quit [Ping timeout: 265 seconds]
Xiti has joined #ruby
Rollabunna has quit [Quit: Leaving...]
mary5030 has joined #ruby
rodferso1 has quit [Quit: leaving]
rodfersou has joined #ruby
jimms has joined #ruby
ascarter has joined #ruby
bmurt has quit []
scripore has quit [Quit: This computer has gone to sleep]
mary5030 has quit [Ping timeout: 255 seconds]
<iamdevnul>
i like UGT
<jhass>
oO you read up until that? :D
scripore has joined #ruby
mary5030 has joined #ruby
sent1nel_ has joined #ruby
horsecowdog has joined #ruby
iasoon has joined #ruby
tubuliferous has joined #ruby
einarj has quit [Remote host closed the connection]
IrishGringo has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/20150513174244]]
mrsolo has joined #ruby
hoov has joined #ruby
IrishGringo has joined #ruby
macmartine has joined #ruby
Echo has joined #ruby
tubuliferous has quit [Ping timeout: 250 seconds]
krz has quit [Ping timeout: 272 seconds]
balazs has joined #ruby
decoponio has joined #ruby
gaboesquivel has joined #ruby
bim has joined #ruby
bim is now known as Guest63695
werelivinginthef has joined #ruby
maletor has joined #ruby
Echo has left #ruby [#ruby]
aswen has quit [Quit: WeeChat 1.1.1]
serivichi has joined #ruby
commondream has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
zotherstupidbot has quit [Ping timeout: 246 seconds]
zotherstupidguy has quit [Ping timeout: 250 seconds]
zotherstupidbot has joined #ruby
krz has joined #ruby
zotherstupidguy has joined #ruby
Goldfish has joined #ruby
serivich has quit [Ping timeout: 272 seconds]
Kricir has joined #ruby
gaboesquivel has quit []
Goldfish is now known as Guest57831
michael_mbp has quit [Excess Flood]
commondream has quit [Ping timeout: 252 seconds]
Echohn has joined #ruby
kobain has joined #ruby
fmcgeough has joined #ruby
michael_mbp has joined #ruby
bmurt has joined #ruby
zotherstupidbot has quit [Remote host closed the connection]
zotherstupidguy has quit [Ping timeout: 258 seconds]
zotherstupidbot has joined #ruby
abuzze has joined #ruby
podman has joined #ruby
Guest57831 is now known as Agoldfish
<jhass>
>> def foo; yield 1, yield 2; end;
<ruboto>
jhass # => /tmp/execpad-54fa534d538e/source-54fa534d538e:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/368715)
<jhass>
ruby parser, you disappoint me
insidious has joined #ruby
<ddv>
what did you expect would happen anyway
jottr has joined #ruby
bashusr has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
doublemalt_ has quit [Ping timeout: 244 seconds]
arturaz has quit [Ping timeout: 245 seconds]
Cache_Money has joined #ruby
shuber_ has joined #ruby
zotherstupidbot_ has joined #ruby
zotherstupidbot has quit [Ping timeout: 255 seconds]
abuzze has quit [Remote host closed the connection]
zotherstupidguy1 has joined #ruby
Papierkorb has joined #ruby
zotherstupidguy1 has quit [Client Quit]
jottr has quit [Ping timeout: 250 seconds]
krz has quit [Ping timeout: 255 seconds]
Timba-as has joined #ruby
CoaxVex has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Echohn has quit [Remote host closed the connection]
shuber_ has quit [Ping timeout: 255 seconds]
blackmesa has joined #ruby
<CoaxVex>
Has anyone ever seen "The requested address is not valid in its context. - connect(2)" when running gem install?
<CoaxVex>
It's on Windows, version 2.4.4 that comes with chef-client
vivekananda has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
sigurding has quit [Quit: sigurding]
multiscan has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zotherstupidbot_ has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
fabrice31_ has joined #ruby
umgrosscol has joined #ruby
sigurding has joined #ruby
<hfp>
Hey all, I would like to use haml templates in my ruby code. But I'm not using Rails and I don't want to precompile my files from haml to html. How do I turn my haml files to html on the go? This is to be used for Postmark email templates.
<hfp>
by on the go I meant on demand
tjohnson has joined #ruby
doublemalt_ has joined #ruby
<adaedra>
Haml is a gem with classes, look at their documentation
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adaedra>
Or you have Tilt which act as an abstraction level for templating and uses haml
casadei has joined #ruby
Stalkr_ has joined #ruby
<hfp>
haha I typed `tilt` in google and thought I was hallucinating because the hwole page is tilted. It's probably an easter egg
<adaedra>
yes
<adaedra>
there's 'do a barrel roll' to push it further.
fabrice31 has quit [Ping timeout: 250 seconds]
darkf has quit [Quit: Leaving]
synfin has quit [Quit: leaving]
nobitanobi has quit [Remote host closed the connection]
iasoon has quit [Ping timeout: 256 seconds]
banister has joined #ruby
zotherstupidbot_ has quit [Ping timeout: 258 seconds]
ARYAN_NATIONS has joined #ruby
zotherstupidbot_ has joined #ruby
<ARYAN_NATIONS>
WPWW 23/16 0/
armyriad has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
sent1nel_ has quit [Remote host closed the connection]
<jhass>
!ban ARYAN_NATIONS
<jhass>
!ban ARYAN_NATIONS !T 1d
ARYAN_NATIONS was kicked from #ruby by ChanServ [User is banned from this channel]
marr123 has joined #ruby
marr has quit [Ping timeout: 258 seconds]
tjbiddle has joined #ruby
chipotle has joined #ruby
hanmac1 has quit [Quit: Leaving.]
ki0_ has joined #ruby
ixti has joined #ruby
airdisa has quit []
krz has joined #ruby
balazs has quit [Ping timeout: 265 seconds]
ARYAN__NATIONS has joined #ruby
ldnunes has joined #ruby
edwinvdg_ has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
spyderman4g63 has joined #ruby
ki0_ has quit [Remote host closed the connection]
ki0 has quit [Ping timeout: 265 seconds]
keen________ has quit [Read error: Connection reset by peer]
tcrypt has joined #ruby
charliesome has quit [Quit: zzz]
commondream has joined #ruby
TOTEN_SIE_DIE_JU has joined #ruby
ARYAN__NATIONS has quit [Client Quit]
CoaxVex has left #ruby [#ruby]
TOTEN_SIE_DIE_JU is now known as TOTENSIEDIEJUDEN
RegulationD has joined #ruby
keen________ has joined #ruby
TOTENSIEDIEJUDEN has quit [Client Quit]
ki0 has joined #ruby
DerisiveLogic has joined #ruby
charliesome has joined #ruby
startupality has quit [Quit: startupality]
charliesome has quit [Client Quit]
ki0 has quit [Remote host closed the connection]
startupality has joined #ruby
ki0 has joined #ruby
jcutrell has joined #ruby
<jcutrell>
Hey ruby folk.
<jcutrell>
I’m looking for a method similar to map,
<jcutrell>
where the given enumerable item can be passed into a given method (rather than that method being called on the enumerable item)
<jcutrell>
So, for example -
simurg has quit [Remote host closed the connection]
<jcutrell>
if I had an array [1,2,3] and I wanted to call something like square(number) (obviously a ridiculous example), I can’t do array.map(&:square) , because that would do 1.square, 2.square, etc - is there a way to do square(1), square(2), etc?
gkra has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
<jcutrell>
(Other than an obvious .each)
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shuber_ has joined #ruby
zz_twistedpixels is now known as twistedpixels
snockerton has joined #ruby
juanpaucar has quit [Remote host closed the connection]
<jhass>
jcutrell: I'd write it out, but you can do .map(&method(:square))
hardlin3r has quit [Ping timeout: 272 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
<jhass>
hardly shorter than {|n| square(n) } and a lot less clear IMO
<jcutrell>
Agreed jhass
<jcutrell>
Can you tell me what that is doing?
n008f4g_ has quit [Ping timeout: 264 seconds]
<jcutrell>
&method(:method_name) - is this converting the reference to the method into a proc?
<tuelz>
jhass: I was wondering yesterday why you banned swastika because originally that was a peaceful symbol, now I understand.
tkuchiki has joined #ruby
sent1nel has joined #ruby
<maia>
Hello, can someone help me with a regex? I want to remove all numbers surrounded by whitespace from a string (and keep numbers with adjacent alphabetic char)
<jcutrell>
jhass: okay, this is starting to make more sense to me.
<jhass>
tuelz: yeah, they're of the wrongly interpreting kind
<maia>
"123 only remove2 20 30 numbers 1surrounded by whitespace 40".gsub(/(^| )[0-9]+( |$)/, ' ') does not work properly, it keeps a number
<tuelz>
maia: the first helpful thing I'll tell you si to visit rubular.com
<tuelz>
it's great for playing with ruby regexs
byprdct has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
<jcutrell>
mala what number is getting left behind?
<ddv>
rubular website looks ugly as hell
ndrei has joined #ruby
<tuelz>
ddv: who cares, it works swimmingly
pdoherty has joined #ruby
<maia>
jcutrell: it returns " only remove2 30 numbers 1surrounded by whitespace "
chinmay_dd has joined #ruby
<jcutrell>
Ah. Hm. Yeah, rubular.
<maia>
tuelz: thanks for the rubular hint. it seems as if I’m having problems with „overlapping“ matching elements
ascarter has joined #ruby
RegulationD has joined #ruby
Channel6 has joined #ruby
<maia>
which leaves me somewhat clueless, other than calling gsub repeatedly
ascarter has quit [Max SendQ exceeded]
<tuelz>
maia: \s(\d+)\s will give you a match group that grabs the #'s
RegulationD has quit [Read error: Connection reset by peer]
p8952 has joined #ruby
tkuchiki has quit [Ping timeout: 256 seconds]
ascarter has joined #ruby
tejasmanohar has joined #ruby
<tejasmanohar>
ror
RegulationD has joined #ruby
<jhass>
it's "roar"
<jcutrell>
Heh
* adaedra
flees from battle
<maia>
tuelz: your suggestion also has problems if two numbers occur after each other with a single whitespace inbetween
Hirzu_ has joined #ruby
juanpaucar has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
sigurding has quit [Quit: sigurding]
iasoon has joined #ruby
dru` has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
<maia>
gsub seems to process the string by moving right step by step, so whatever was matched once will be skipped instead of rechecked
fabrice31_ has quit [Remote host closed the connection]
<adaedra>
tejasmanohar: you have a question about it?
SouL_|_ has quit [Read error: Connection reset by peer]
<jhass>
maia: maybe just match the whitespace too
<tejasmanohar>
i'm trying to do a line graph of the users created per day, and it keeps going downwards during the night time since no users were created. i'd like to jsut have a dot above each day and connect dots from one day to another
<tejasmanohar>
do you know if thats possible through the lib?
<jhass>
>> "123 only remove2 20 30 numbers 1surrounded by whitespace 40".gsub(/(^ ?+| )[\d\s]+?( | ?+$)/, ' ')
<ruboto>
jhass # => " only remove2 30 numbers 1surrounded by whitespace " (https://eval.in/368738)
User458764 has joined #ruby
syath has quit [Quit: Leaving]
<tejasmanohar>
"Say Goodbye To Timeouts" - maybe i could do it the way right under that heading on the website http://chartkick.com/
<atmosx>
tejasmanohar: you could do that also (if youre more familiar with js than ruby) but nope. You don't really have to do anything apart from creating an array with the values you need to display
<atmosx>
tejasmanohar: then display it...
<maia>
jhass: seems to be tricky, right?
<jhass>
unexpectedly, yes :P
gagrio has quit [Ping timeout: 265 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GaryOak_ has joined #ruby
<tejasmanohar>
atmosx: ah i see what you mean... so you would do User.group_by_day and then remove days with 0? i dont understand how thatd solve the issue since no days have 0 for me
michaeldeol has joined #ruby
<tuelz>
a less elegant soluton would be to just double to whitespace and then use my regex
someword has joined #ruby
<tejasmanohar>
could also do a bar graph but meh line graph better for over time amitchellbullard
<tejasmanohar>
atmosx:
<atmosx>
tejasmanohar: I think it will solve the problem, since writing you custom method you can filter out everything but I'm not sure what you wanna do actually.
<startupality>
How can I have an URL which doess devise accept invitation token and then redirects to specific url?
<atmosx>
tejasmanohar: displaying a graph with users that were added every day, right?
<adaedra>
startupality: If I understand correctly, this is something you may want to discuss in #RubyOnRails
chipotle has quit [Ping timeout: 250 seconds]
<tejasmanohar>
atmosx: http://i.imgur.com/5r77muG.png see the points on my graph marked by circles. i wanted to go with straight lines b/w the points
<tejasmanohar>
like at different diagonals of course but straight lines from point for day A to day B to day C
<shevy>
aaah
<adaedra>
aaaaaaaah
<tuelz>
startupality: I would think about rephrasing your question there as well, not sure what you're saying :)
<tejasmanohar>
no curves in between that show our #s go down in the night
<shevy>
adaedra I should hire you to write me some code
<atmosx>
tejasmanohar: ah sorry
<atmosx>
lol
nobitanobi has joined #ruby
<shevy>
adaedra do you have a repository of your code online somewhere?
bootstrappm has joined #ruby
Rollabunna has joined #ruby
<adaedra>
shevy: def shevy; puts French.stereotype; end
<tejasmanohar>
atmosx: thats not really something to be done via this library i suppose
<tejasmanohar>
(in ruby at least)
<bootstrappm>
morning all
<shevy>
adaedra is this about baguette again?
<atmosx>
tejasmanohar: there's no night in the graph
<someword>
does anyone have any pointers on how I can refactor the 'get_allergy_list' method https://gist.github.com/anonymous/eafd25256451b62747f8 - I'm thinking it should be smaller and maybe only have 1 way out instead of the guard return at the top. I'm not sure what the next step would be in pulling it apart. TIA
MatthewsFace has joined #ruby
<adaedra>
shevy: and my github is not hard to find.
<bootstrappm>
accidentally at work an hour early today :/
<shevy>
adaedra link?
<havenwood>
bootstrappm: g'mornin
<shevy>
bootstrappm how can you came too early to work
<shevy>
*come
<atmosx>
tejasmanohar: In may 14 you had 0 new users..
<adaedra>
shevy: adaedra
<startupality>
@tuelz ok, it means how can I reformat this link “"users/invitation/accept?invitation_token=XK6c-3tYfRBafX5zxTHR” so that it redirects to specific relative URL after invitation accept?”
<shevy>
adaedra I click on it but nothing happens
<atmosx>
tejasmanohar: or your DB apparently says so.
<tejasmanohar>
oh hm possible actually i was just developing it then
<tejasmanohar>
wiped it maybe :P
<tejasmanohar>
i misunderstood my own data, sorry atmosx
<atmosx>
np
<tejasmanohar>
let me do a filter by after date X
<bootstrappm>
gf gave me a new watch in my sleep, I asked her the time and set it. In my drowsiness I think I set it wrong ... when I got to work it turns out its an hour early hahaha
<adaedra>
startupality: yep, see with #RubyOnRails or devise channel if there is one.
<bootstrappm>
someword I'll take a look right now
<tuelz>
startupality: you wouldn't modify that link at all, you would modify the code executed when you follow that link.
<adaedra>
bootstrappm: one more hour to be productive !
<bootstrappm>
you speak the truth! (dance)
<jhass>
>> "123 only remove2 20 30 numbers 1surrounded by whitespace 40".gsub(/(?:^[\d\s]+| [\d\s]+(?= )| [\d\s]+$)/, '') # maia
<bootstrappm>
we have sprint review today too in a few hours so will def make use of it!
<GaryOak_>
A lot of my methods are one or two lines long and/or database interface code, is it reasonable to write tests for them?
<tuelz>
startupality: as adaedra has suggested though, tons of people use devise in #rubyonrails
<jhass>
maia: too many edge cases :P
startupality has quit [Read error: Connection reset by peer]
swerter has joined #ruby
DexterLB has quit [Read error: Connection reset by peer]
axisys has joined #ruby
startupality has joined #ruby
greylurk has joined #ruby
<maia>
jhass: hmm. well my goal is to extract 'real' words from a string (to put them into a dictionary), so I want to remove anything that’s only a number.
greylurk has left #ruby [#ruby]
<maia>
jhass: and I’m struggling with a similar problem: removing single letter words from a string
commondream has quit [Remote host closed the connection]
<jhass>
maia: uh, so instead of blacklist, why not whitelist?
chipotle has joined #ruby
<tuelz>
maia: that's quite a bit different than removing numbers surrounded by spaces :p
blackmesa has quit [Ping timeout: 252 seconds]
commondream has joined #ruby
commondream has quit [Remote host closed the connection]
<maia>
hmm. I’d have to think about a regex that whitelists anything that has at least 2 chars and at least one of them is alphabetical.
<Synthbread>
is there a Hash method that would do something like this? a = {a: 1, b: 2}; b = a.that_method(:a); (a would then be {b: 2} and b would be {a: 1})
commondream has joined #ruby
<jhass>
>> "123 only remove2 20 30 numbers 1surrounded by whitespace 40".scan(/[\w\d]+\w[\w\d]*/)
<ruboto>
adaedra # => /tmp/execpad-05555cab9182/source-05555cab9182:2: warning: wrong element type Symbol at 0 (expected a ...check link for more (https://eval.in/368744)
<adaedra>
>> a = {a: 1, b: 2}; b = Hash[[a.shift]]; [a, b]
<maia>
jhass: oh, that looks good. I’m not yet sure how that regex really works, but it looks promising
<adaedra>
(Sorry for the noise everyone, I'd have thought it worked on first case :x )
Juanchito has quit [Quit: Connection closed for inactivity]
DexterLB has joined #ruby
Cache_Money has joined #ruby
<jhass>
maia: mh, it'll fail things like a1
<maia>
jhass: (plus I’d want to keep it a string, but I could always do a .join(' ') if that makes it easier. poor GC.)
<bootstrappm>
someword okay, took a look. I'd say the error check at the top is fine but the recursion is what makes it look convoluted. turn that case / when into an if as there's only one condition and make it iterative
shuber_ has quit [Remote host closed the connection]
<someword>
bootstrappm: first off thanks for the help. Will i end up with an 'else' in my if statement? I'll go read up on iterative and see if i can grok your suggestion.
ndrei has joined #ruby
The_Phoenix has joined #ruby
CloCkWeRX has quit [Remote host closed the connection]
<bootstrappm>
yes your case / when / else will turn just into if / else
<elfuego>
jhass: if I call tmp.[the method that alternate] it should produce “male” “female” “male” “female” “male” “female” and so on
speaking1ode has joined #ruby
<havenwood>
elfuego: cycle
<bootstrappm>
but that might not be a good suggestion once you implement it iteratively, like will have more conditions at that point
<bootstrappm>
likely*
The_Phoenix has quit [Max SendQ exceeded]
<someword>
tuelz: thanks for the tip i'll read up on modulo!
macmartine has quit [Ping timeout: 255 seconds]
__chris has joined #ruby
<maia>
jhass: that looks good. I’ll stick with string.scan(/\w+\p{Alpha}\w*|\p{Alpha}\d/).join(' ') unless I can easily find a way that does not convert to an array inbetween. thanks for your help!
<someword>
bootstrappm: thanks again for giving me some direction!
<havenwood>
Synthbread: I don't get what your `:a` argument is supposed to mean in your psudo code.
<Synthbread>
havenwood: I figured it out: I needed .extract!
<jhass>
maia: if you plan to write that to a file, .scan(...) do |word| io << word << " "; end; might be a tad faster
<maia>
jhass: no, I actually save that regexd version in the db and/or pass this cleaned string on to other classes. I only split it in a single case, but in most cases I need it as string
ki0_ has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
<al2o3-cr>
elfuego: could also use ["male", "female"] * n
rubie has joined #ruby
<jhass>
for small n
<al2o3-cr>
jhass: yeah
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
ki0_ has quit [Remote host closed the connection]
bootstrappm has quit [Ping timeout: 258 seconds]
<elfuego>
jhass: it uses a very resource intensive algorithm?
<heftig>
it's not lazy
<jhass>
it allocates an array of size array.size * n
<heftig>
[1,2] * 1000 will create a 2000-element array
The_Phoenix has quit [Read error: Connection reset by peer]
yaw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Ping timeout: 264 seconds]
<havenwood>
HOLOHOAX: for loops leak variables and aren't idiomatic so we just don't use them
<HOLOHOAX>
:(
<jhass>
I think they meant if input.include? other_string; collection.each do |item| ... end; end; or perhaps N.times do ... end
<HOLOHOAX>
can i use javascript with ruby?
<havenwood>
HOLOHOAX: You can use any language with any language, no?
mrsolo has joined #ruby
segfalt has joined #ruby
<HOLOHOAX>
havenwood: i'm new to programming and a complete retard so i really wouldn't know
<jhass>
HOLOHOAX: if you show what you have tried so far, what you want to do might become a bit clearer
rubie has quit [Remote host closed the connection]
<shevy>
holohoax is a cool nick
<havenwood>
HOLOHOAX: Are you actually trying to do something with Ruby and Javascript or just asking to learn?
The_Phoenix has joined #ruby
superlou has quit [Quit: Leaving]
<HOLOHOAX>
i'm using javascript to make a search app
<shevy>
HOLOHOAX you can try to write ruby, and have it generate javascript - see "opal" http://opalrb.org/
macmartine has quit [Remote host closed the connection]
haxrbyte has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
startupality has quit [Quit: startupality]
The_Phoenix has quit [Max SendQ exceeded]
wjimenez5271 has joined #ruby
joonty has quit [Quit: joonty]
<HOLOHOAX>
thanks shevy...
<HOLOHOAX>
i'm confused on how it works
ascarter has joined #ruby
kenneth has joined #ruby
The_Phoenix has joined #ruby
avat has quit [Quit: Page closed]
<adaedra>
HOLOHOAX: it REALLY depends what you want to do
The_Phoenix has quit [Max SendQ exceeded]
<cassianoleal>
given an Array of Hashes, how do I find the hash with the greatest value given an arbitrary key? e.g. from [ { :a => 5 }, { :b => 10 } ], I want to return { :b => 10 }
Cust0sLim3n has quit [Ping timeout: 272 seconds]
<HOLOHOAX>
well i would like to make a search thing in javascript because i don't know enough ruby
The_Phoenix has joined #ruby
<adaedra>
HOLOHOAX: but how? On a webpage? What will the JS part do? What will the Ruby part do? How will they interract? You don't give enough information
<adaedra>
cassianoleal: Hashes are enumerables
The_Phoenix has quit [Max SendQ exceeded]
<HOLOHOAX>
basically it's a prompt that keeps going to infinity unless the user types a name that's in the object array or the user hits cancel
budak-baik has quit [Remote host closed the connection]
<jhass>
cassianoleal: nested .max_by
<adaedra>
nested?
<HOLOHOAX>
when the user types a name that's in the list javascript will write to the webpage showing everything inside the object
<adaedra>
ah
<jhass>
adaedra: their example doesn't need it
chipotle has joined #ruby
<adaedra>
HOLOHOAX: so you have a webpage in Javascript, I suppose the ruby part is the backend called by your page ?
<jhass>
but I didn't assume actually single element hashes
<HOLOHOAX>
adaedra: i was wondering if it would be better to use it in ruby or javascript
<cassianoleal>
adaedra, jhass: thanks, I got it :)
<HOLOHOAX>
but if i could use ruby for it i'll use ruby
<jhass>
HOLOHOAX: are you building a website?
<adaedra>
HOLOHOAX: in a browser, you need javascript at the end, as it can only execute it. But with things like opal, you can write your code in Ruby and obtain JavaScript of it.
lele is now known as Guest24
commondream has joined #ruby
ki0_ has quit [Remote host closed the connection]
The_Phoenix has joined #ruby
<HOLOHOAX>
adaedra: opal can make for loops?
ki0 has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
<adaedra>
Opal can do what ruby can do
<havenwood>
minus the things it can't do
<jhass>
I think we're heading in very wrong direction here
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
That1Guy has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
<jhass>
HOLOHOAX: are you building a website?
<HOLOHOAX>
yes
<atmosx>
Where do I found someone for a quick photoshop job
<shevy>
HOLOHOAX it's more for ruby->javascript people; it seems as if you are familiar with javascript? so possibly you'd have to learn ruby first
<atmosx>
?
haxrbyte_ has joined #ruby
The_Phoenix has joined #ruby
<shevy>
atmosx HANMAC!!!
<HOLOHOAX>
thanks shevy
<adaedra>
Photojob
<atmosx>
hanmac: ?
<shevy>
Jotophob
<atmosx>
hanmac: can you isolate 'me' from a pretty complex bg? ... isn't hanmac a ruby prog?
<HOLOHOAX>
this is for a fun site it's nothing professional
<HOLOHOAX>
i'm not getting paid for this... i'm still a complete retard so i'm not good yet
<adaedra>
atmosx: people may be able to do more than one thing
<adaedra>
HOLOHOAX: you know ruby?
<jhass>
HOLOHOAX: javascript performs best for the code that runs in the browser, ruby performs best for code that runs on your server
<shevy>
atmosx I think for some icons or logos, in some of ruby-projects, designers were asked to do something; like the pry logo https://goo.gl/x0muc5
<shevy>
hanmac is creative
aryaching has joined #ruby
<shevy>
he can program the thing in ruby
<HOLOHOAX>
thanks jhass
<HOLOHOAX>
adaedra: yes i've taken some ruby courses online
<atmosx>
shevy: he is not alive apparently :-)
<adaedra>
HE DED
<adaedra>
LIEK SO DED
<jhass>
HOLOHOAX: you don't mix them into the same program, you write two or more programs that communicate, one in javascript that runs in the browser, one in ruby that runs on the server
djbkd has joined #ruby
haxrbyte has quit [Ping timeout: 255 seconds]
<HOLOHOAX>
jhass: that sounds complicated... where can i learn more about this stuff?
baroquebobcat has quit [Quit: baroquebobcat]
<adaedra>
HOLOHOAX: you usually learn them separately
<adaedra>
Learn some ruby, then learn how to do web applications with it, learn javascript
<jhass>
and then you learn a bit about what HTTP is
x1337807x has joined #ruby
<adaedra>
How a browser works
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
that said you can write your server program in javascript too, for example using nodejs, it's still a separate program from the one that runs in your browser. And if you had a Ruby program running on your server it would be separate from that too
maletor has quit [Quit: Computer has gone to sleep.]
<adaedra>
web development is a complex topic
<adaedra>
why do everyone try to start this way >_>
<havenwood>
HOLOHOAX: If you want a little magic, try making a little Volt app: http://voltframework.com/
spyderman4g63 has quit []
<adaedra>
Yuck
<HOLOHOAX>
havenwood: why are there so many frameworks?
<jhass>
adaedra: because it's the most intriguing. I got into programming because I wanted to find out how to make these "homepage" things
<havenwood>
adaedra: The web is a sick joke... But part of the joke I think is that we're supposed to pretend it's normal and we're okay with it!
livcd has joined #ruby
<adaedra>
havenwood: unfortunately
doertedev has quit [Ping timeout: 265 seconds]
C1V0 has quit []
<adaedra>
jhass: yes, but it's a so wrong way
<maia>
jhass: following up with your suggested regex: scan(/\w+\p{Alpha}\w*|\p{Alpha}\d/) it will split words with a '-', which I don’t want. using scan(/\w+-?\p{Alpha}-?\w*|\p{Alpha}-?\d+/) will work for words with one '-', but not with more.
<tuelz>
adaedra: because most of us don't want to be programmers, we want to be problem solvers
<maia>
jhass: e.g. "song-contest-euphoria".scan(/\w+-?\p{Alpha}-?\w*|\p{Alpha}-?\d+/) => ["song-contest", "euphoria"]
<dfockler>
solving problems is boring, I want to learn new things
chinmay_dd has joined #ruby
<livcd>
uhm if i send a SQL query how should i check if it was successful ?
rippa has joined #ruby
<tuelz>
dfockler: you're in the minority, not that there is anything wrong with that
<maia>
jhass: any idea how to handle - properly?
<adaedra>
I want to try things
<jhass>
maia: \w is short for [a-zA-Z0-9_], [\w\-] is valid and equivalent to [a-zA-Z0-9_\-]
<adaedra>
why do you \ your - ?
<jhass>
adaedra: for clarity
bronson has joined #ruby
<adaedra>
._.
<jhass>
it's additional knowledge I didn't want to require right now
<HOLOHOAX>
after watching the volt video i am now more confused than i was before watching it :(
<dfockler>
hehe
<adaedra>
HOLOHOAX: it's okay, it's maybe too 'high level'
<adaedra>
HOLOHOAX: begin small
matchaw has quit [Ping timeout: 244 seconds]
<HOLOHOAX>
adaedra: you mean low level right? this is computer science after all ;)
<tuelz>
HOLOHOAX: webdev is tough, but it's about the simplest platform you'll find for solving real problems. I encourage starting with webdev for most people because if you're not excited about what you're building you'll be bored to tears
<adaedra>
Eeeeeeeeeeer
<livcd>
can i ever be sure that executed sql was successful ?
<jhass>
adaedra: I fear you're pretty alone with your opinion there :P
<adaedra>
jhass: which one?
<livcd>
i do not really care about the data consistency but only if it went through and db threw an error or not
<tuelz>
livcd: sure, write tests against the results to confirm they are what you expect.
<jhass>
adaedra: that web dev is the devil for newbies
rubie has joined #ruby
<HOLOHOAX>
tuelz: webdev as in web development?
<adaedra>
it is :@
<tuelz>
HOLOHOAX: yup
<livcd>
tuelz: well so i guess i have to handle that manually
<jhass>
livcd: a sane DBMS will tell you, a sane client for that DBMS will (have a way to) signal it
<dfockler>
HTML is simple, CSS is 'simple', JS is 'simple', Webdev is not
<HOLOHOAX>
what should i start with i am already signed up on teamtreehouse.com and i already did the rails stuff and front end web stuff on there
<adaedra>
Webdev requires you to learn so many thing at the same time
<tuelz>
livcd: well a computer can't guess the results you want.
<HOLOHOAX>
where should i go from there? like which site or books or what should i do?
<dfockler>
HOLOHOAX: depends what you want to accomplish
<livcd>
tuelz: i don't care about the consistency of results i just want to know if (true = sql was executed) or (false = something happened)
<tuelz>
HOLOHOAX: find a website you think is cool and try to rebuild the simplest version of that website you can imagine.
chthon has quit [Quit: Ex-Chat]
ki0 has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 258 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jimms has joined #ruby
bMalum has quit [Quit: bMalum]
<jhass>
HOLOHOAX: building something you want to build and learning the part you need the moment you need it is a good approach, though if you have to ask whether you can nest control structures, maybe go back to the ruby course once more
<tuelz>
livcd: then jhass has already answered your question, if you want a more specific answer you'll need to give more specifics about your rmdbs
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<maia>
jhass: thanks, this did the trick: scan(/[\w\-]+\p{Alpha}-?\w*|\p{Alpha}-?\d+/)
cirn0 has joined #ruby
<HOLOHOAX>
jhass: i'll do that!
<livcd>
tuelz: the rdbms would be oracle..and a client i imagine a ruby's dbi ?
<jhass>
maia: yup, that's what I wanted to steer you to ;)
<HOLOHOAX>
i wish programming was easier
<tuelz>
livcd: ruby doesn't have an oracle dbi in its stdlib as far as I know.
<maia>
jhass: thanks for steering me! ;)
<livcd>
tuelz: oh
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jhass>
maia: as a little aside, at the start and the end of a character group, - doesn't need to be escaped, since it can't mean to signal a range, [\w-] is actually the same
<tuelz>
livcd: yeah, you'll need to pick out a dbi and then tell us which one you've chosen - like I said, ruby doesn't ship with one
x1337807x has joined #ruby
<jhass>
maia: that said it doesn't harm to escape it if that makes it clearer for you
<tuelz>
sequel is nice - if you're doing rails activerecord is what you'll be using
<dfockler>
Can't say enough great things about the Sequel gem
Jarboe has joined #ruby
<livcd>
thx guys
<maia>
jhass: the more I try to understand regex, the happier I’m not having learned perl. it can do a lot, but it isn’t really fun. :)
shuber_ has quit [Remote host closed the connection]
<livcd>
well be it rails or sinatra
<havenwood>
Jeremy Evans' gems are golden.
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
livcd: Roda with Sequel. :)
<tuelz>
pakyow with sequel is where the cool kids are at
cirn0 has quit [Remote host closed the connection]
DerisiveLogic has quit [Ping timeout: 244 seconds]
leafybasil has quit [Remote host closed the connection]
<dreinull75>
livcd farhang.im
<dreinull75>
I'm building an API for an app that uses a DB. App is closed, DB is open. There are users which I want to use in my API as well but I don't know how the passwords are encrypted. Since I have a user there too I could just try all kinds of hashing methods but maybe someone can help me find out which method might be most successful. One password looks like this: Bj}icd -> slight variation but you get the idea.
bronson has quit [Remote host closed the connection]
j0n3 has joined #ruby
juanpaucar has quit [Remote host closed the connection]
nobitanobi has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
shevy: didn't patch your stuff for UTF-8 yet?
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
I don't need a patch, it's working fine
<dreinull75>
Hund سَگ
<dreinull75>
works fine here
<xxneolithicxx>
i got 3 question marks when shevy did it and the actual symbol when you did it
<shevy>
then you need to fix your system xxneolithicxx
<HotCoder>
hello
<shevy>
ohhh a hot coder
<HotCoder>
what text editor do you guys/girls use for ruby?
<shevy>
bluefish
fmcgeough has quit [Quit: fmcgeough]
<xxneolithicxx>
doesnt matter much to me, i dont care what the symbol means lol
<xxneolithicxx>
emacs
<dfockler>
jokke: can't see anything at a glance, did you try changing the order of those last three task invocations?
<shevy>
xxneolithicxx yeah, those characters are so esoteric and exotic. why can't they use latin characters
<dreinull75>
shevy I got three ??? as well
<jokke>
dfockler: i can't
<dfockler>
are they dependent?
juanpaucar has quit [Remote host closed the connection]
<jokke>
well i can
<jokke>
those last three i can
rubie has quit [Remote host closed the connection]
leafybasil has joined #ruby
<jokke>
well actually search index has to be last
bmurt has quit []
sent1nel has joined #ruby
<havenwood>
HotCoder: If you're not in the mood to learn emacs or vi give Atom a try: https://atom.io/
diegoviola has quit [Remote host closed the connection]
<dreinull75>
shevy that's actually a good question since persian is basically an indo-germanic language and it makes absolutely no linguistic sense to use a semitic charset.
<tejasmanohar>
anyone here used splitrb gem
<tejasmanohar>
?
<dreinull75>
tried atom yesterday and couldn't move lines, couldn't navigate and felt totally helpless. Back to vim.
<shevy>
no idea really. what I find funny is that distinction in persian/arabian/semitic
<tejasmanohar>
youll see different variations of my callout media yt vid / iphone if you open different seesssions (incognito)
<tejasmanohar>
but no not color
cirn0 has joined #ruby
casadei has joined #ruby
kenneth has quit [Read error: Connection reset by peer]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<xxneolithicxx>
no idea, i dont use ruby for much dynamic web programming like that (thats why im a backend dev, i hate web programming)
sent1nel has joined #ruby
<tejasmanohar>
ah
User458764 has joined #ruby
hololeap has joined #ruby
baweaver has quit [Remote host closed the connection]
finisherr has quit [Quit: finisherr]
jimms_ has joined #ruby
tuelz has quit [Ping timeout: 246 seconds]
jpfuentes2 has joined #ruby
jimms has quit [Read error: Connection reset by peer]
cirn0 has quit [Remote host closed the connection]
cirn0 has joined #ruby
<jpfuentes2>
anyone here awesome at debugging running ruby processes? i'm trying to fire up a gdb session on a running server. it's a multi-threaded puma worker. `t a a bt` then a `call rb_backtrace()` segfaults
shuber_ has quit [Remote host closed the connection]
<tejasmanohar>
anyhow if someone heres used splitrb please ping me ;)
hsps_ has joined #ruby
cirn0 has quit [Remote host closed the connection]
<dreinull75>
havenwood apeiros that works only outside irb, figured that out too
<jpfuentes2>
anyone here awesome at debugging running ruby processes? i'm trying to fire up a gdb session on a running server. it's a multi-threaded puma worker. `t a a bt` then a `call rb_backtrace()` segfaults
<dudedudeman>
spreaking of javascript, i have a question regarding it for your rubyists
<havenwood>
shevy: ahh, gotcha - thought it was a mystery related to: p 'test'
<shevy>
ack
<shevy>
a javascript question
<dfockler>
dudedudeman: yes ruby isn't javascript
DEA7TH has joined #ruby
<dudedudeman>
dammit. i didn't know
<dudedudeman>
ha
Oka has joined #ruby
<wallerdev>
baweaver: mobowl at 5th and minna today, maybe ill try it :p
<dudedudeman>
no, i'm just curious about how you guys learned js. did you start doing ruby work, and learn as you went for the times you needed it? or did you take some dedicated time and work on javascript and only javascript so you could learn it
finisherr has quit [Quit: finisherr]
OtterCoder has quit [Remote host closed the connection]
bhaak has quit [Ping timeout: 256 seconds]
gusrub has joined #ruby
<baweaver>
dudedudeman: Thrown into the fire style
bhaak has joined #ruby
Vile` has quit [Ping timeout: 272 seconds]
<wasamasa>
dudedudeman: learn it as you go
<baweaver>
we need this jquery thing fixed yesterday
<baweaver>
and so began the fun
<havenwood>
dudedudeman: Humm really loudly, close your eyes and pretend it doesn't exist.
casadei has quit [Remote host closed the connection]
<Deas>
what is 'foo << { bar: "var" }' called?
ndrei has quit [Ping timeout: 272 seconds]
<Deas>
i don't know if im doing anything wrong but that syntax totally just gives error
<weaksauce>
what is foo?
<weaksauce>
if foo is an array that would add an element to the end of foo.
<havenwood>
Deas: And what's the Error? What version of Ruby?
<hfp>
How do I do time and date calculations easily in vanilla ruby? RoR has all these fancy methods to add 2 months and 3 hours to a date but Ruby doesn't. What's the best approach?
<tuelz>
hfp: probably not the answer you're hoping for, but the best advice I can give for a general question like that is to read ruby Time class
cirn0 has joined #ruby
<tuelz>
or did you specifically want to add 2 months and 3 hours?
wildroman2 has joined #ruby
<hfp>
tuelz: I did and couldn't find an easy way. `Time.now + 60*60*24*30*5` is not an acceptable way of adding 5 months to a date because some months are 30 days, some are 28, some are 31...
<Deas>
havenwood: oh, it needes to be an variable?
lolmaus has joined #ruby
rotcetorptekcop has joined #ruby
rotcetorptekcop has quit [Max SendQ exceeded]
<apeiros>
sandelius: yes
mrmargol_ has joined #ruby
<Deas>
NameError
<tuelz>
hfp: so spcecifically you want to add a month?
<sandelius>
apeiros that will lock each request so only one can be processed at a time?
<hfp>
tuelz: I'd like to add variable amounts of time, depending on where in the code I am
Rollabunna has joined #ruby
<tuelz>
hfp: sounds like you would be best suited to just include activesupport and use their helper methods like advance
RegulationD has quit [Ping timeout: 265 seconds]
<apeiros>
sandelius: I didn't read the whole source, but it looks like
Deas has left #ruby ["'nvm found it'"]
<sandelius>
apeiros ok thx, that's not what I want :) refactor, refactor.... :)
<havenwood>
hfp: how do you decide how long a month is from any given point? like on the last or first day of the month, what's a month from that?
mrmargolis has quit [Ping timeout: 255 seconds]
rotcetorptekcop has joined #ruby
rotcetorptekcop has quit [Excess Flood]
<hfp>
havenwood: More like "4 months from today the date will be 22-sep-2015"
<tuelz>
what if the last day of that month is 30 and today is 31st?
<hfp>
tuelz: That's all the things I'd like to avoid getting into. RoR is great for that, it calculates all the dates automatically
<baweaver>
The last thing you want to do is screw with datetime maths unless you have to
Guest37911 has joined #ruby
<tuelz>
you could use Time.now.end_of_month and add 1 day to get the next month
bronson has quit [Remote host closed the connection]
<apeiros>
sandelius: it's up to you to be more precise with your locking
dopie has quit [Quit: This computer has gone to sleep]
<tuelz>
hfp: I agree, that's why I suggest just including whatever you need from activesupport
atmosx has joined #ruby
<hfp>
I think I'll use activesupport indeed
Rollabunna has quit [Ping timeout: 265 seconds]
<havenwood>
hfp: cherry pick
<tuelz>
or don't cherry pick
<tuelz>
:p
bronson has joined #ruby
wallerdev has joined #ruby
jgt1 has joined #ruby
michaeldeol has quit [Ping timeout: 256 seconds]
djbkd has quit [Remote host closed the connection]
ghostmoth has quit [Quit: ghostmoth]
gustavn has quit [Read error: Connection reset by peer]
michaeldeol has joined #ruby
ndrei has joined #ruby
mjuszczak has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<xxneolithicxx>
are there "package managers" or script managers for bash like pip/gem?
shuber_ has quit [Remote host closed the connection]
swgillespie has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
pengin has quit [Remote host closed the connection]
<shevy>
do you mean - these install .sh files?
<shevy>
the GNU Sourcemage distribution is completely written in bash I think
pengin has joined #ruby
User458764 has joined #ruby
cirn0 has joined #ruby
tercenya has quit [Read error: Connection reset by peer]
bhaak has quit [Ping timeout: 258 seconds]
<rom1504>
xxneolithicxx: apt
tercenya has joined #ruby
<rom1504>
but really : bash is crap
<xxneolithicxx>
lol no not apt thats not what i mean. Just found bpkg, something like that, i was just curious if there was something like gem/pip for bash
<xxneolithicxx>
i normally distribute my bash scripts through rpms so it doesnt matter but was curious
luksaur has quit [Quit: Leaving]
<xxneolithicxx>
*for tools
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
doodlehaus has quit [Remote host closed the connection]
Azure has quit [Quit: Oops.]
jgt1 has joined #ruby
pengin has quit [Ping timeout: 272 seconds]
<rom1504>
/dev/null is the best package manager for bash :)
pwnz0r has quit [Remote host closed the connection]
Azure has joined #ruby
<jgt1>
^^^classic
<adaedra>
zsh >
<rom1504>
(is there someone that can remember how to write a bash if condition after not doing bash for a few months ?)
<adaedra>
if cond; then; fi
<baweaver>
Is that a question, or...?
<rom1504>
yeah and how do you write cond ?
<baweaver>
depends
<adaedra>
cond is a command line
<rom1504>
how many spaces, = or eq, [ or [[ , ...
<baweaver>
[ -z "$var"] for blank
<adaedra>
that's not bash syntax, that's test(1) syntax
<baweaver>
-eq equals, -lt less than, etc
<xxneolithicxx>
-z, and et al are aliases for test command
<baweaver>
splitting hairs
Xoro has quit [Read error: Connection reset by peer]
<adaedra>
xxneolithicxx: arguments, actally
<adaedra>
[ is test
tuelz has quit [Ping timeout: 265 seconds]
<havenwood>
man [
<adaedra>
man test
* baweaver
thinks this is incredibly pedantic
<rom1504>
my point is I never write it right the first time
<adaedra>
welcome to shell script
Narzew has quit [Ping timeout: 240 seconds]
<xxneolithicxx>
how do forget an if statement
phutchins has joined #ruby
<adaedra>
rom1504: but now you know the man page to look for !
<xxneolithicxx>
i mean even if you get it wrong its hard to get it more than 50% wrong
<havenwood>
adaedra: apropos
<adaedra>
baweaver: do some fish, I heard they have a different syntax.
<rom1504>
yeah but in all other languages I can write a if condition without looking any man
<adaedra>
à propos
<havenwood>
adaedra: man apropos
<baweaver>
rom1504: You get used to it if you do enough of it
werelivinginthef has quit [Remote host closed the connection]
<apeiros>
is coder problems a subset of firstworldproblems?
<havenwood>
shevy: if fi fo fum
rubie has quit [Remote host closed the connection]
<rom1504>
apeiros: indians code
<xxneolithicxx>
3rd world people code
zubov has quit [Ping timeout: 265 seconds]
<shevy>
lol havenwood
<xxneolithicxx>
bums code, prisoners code
<apeiros>
rom1504: I actually don't consider firstworldproblems to be a geographic classification :-/
<adaedra>
shevy: actually it's logical and easy to remember
<shevy>
nothing is logical there
<rom1504>
"third world" is definitely s geographic classification apeiros
<rom1504>
*a
<rom1504>
("the developing countries of Asia, Africa, and Latin America.")
<apeiros>
rom1504: so is first world. I get that. but I don't take the composite as such.
<xxneolithicxx>
i thought it was socio economic
Notte has quit [Remote host closed the connection]
<shevy>
rom1504 eh, many "developing" countries are richer than many countries in Europe
mandarinkin has quit [Ping timeout: 246 seconds]
<shevy>
funny how discussions go
<shevy>
from bash to countries
<rom1504>
well I'm not saying the opposite, but that's still the definition of that term
<rom1504>
but yeah ok you can give an other definition to "firstworldproblem" ^^
niftylettuce has joined #ruby
<shevy>
human being problems
<shevy>
staring at java code all day long
<xxneolithicxx>
omg dont give me nightmares
<apeiros>
I understood "first world problem" to mean "any problem which is not really a problem which has an impact on your quality of life" (with quality being in the range of "existential")
<shevy>
IRC problems are firstworldproblems
<weaksauce>
first world was democratic states allied with the US during the cold war.
<xxneolithicxx>
so what did third world mean in that context
<rom1504>
coding definitely has an impact on your quality of life
<weaksauce>
unaffiliated
<xxneolithicxx>
to me it means social economic living conditions
zubov has joined #ruby
<weaksauce>
second was communist/socialist allied with the russians
<adaedra>
that's the point of a module and include/extend, I think
_blizzy_ has quit [Ping timeout: 256 seconds]
<apeiros>
dorei: define "better"
<apeiros>
?better
<ruboto>
I don't know anything about better
<apeiros>
dang
<dorei>
apeiros: line 6 looks ugly/lame to me
<zenspider>
hah. I think that's a PERFECT answer
<apeiros>
heh
<zenspider>
dorei: what are you actually trying to accomplish, and why?
<adaedra>
ah, I see
<dorei>
zenspider: i'm definining a class method and then i want to define an instance method with the same name that at some point calls the class method i defined before
fabrice31 has quit [Ping timeout: 272 seconds]
baweaver has quit [Remote host closed the connection]
sinequanon has quit [Remote host closed the connection]
sinequanon has joined #ruby
giuseppesolinas has joined #ruby
Stalkr_ has joined #ruby
bmurt has joined #ruby
gambl0re has joined #ruby
rrichardsr3 has joined #ruby
wallerdev has joined #ruby
bmurt has quit [Client Quit]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
<jhass>
?best
<ruboto>
"Best" and "better" are subjective. Try to use a different term.
<jhass>
apeiros: maybe we need fact aliases :P
finisherr has quit [Quit: finisherr]
<apeiros>
good point. please add it to the todo :D
Deele has quit [Ping timeout: 256 seconds]
pengin has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jhass>
dorei: I think I'd got for self.class.public_send(m)
<dorei>
jhass: i think your idea is better than me :)
tuelz has quit [Ping timeout: 258 seconds]
coetry has joined #ruby
<dorei>
than mine even
baweaver has joined #ruby
<mallu>
Can you please tell me how I can reduce the number of line? https://dpaste.de/bLan
<jhass>
mallu: Array#map
<jhass>
also make sure to indent
finisherr has quit [Quit: finisherr]
<baweaver>
see comment
sent1nel has quit [Ping timeout: 264 seconds]
<dorei>
let's say i have a module Amodule and i use it to add class methods into class X (by using extend Amodule in class X), is there a way to have an instance method added too? maybe like using the extended callback and do a define_method there
<apeiros>
dorei: I *really* dislike people adding stuff to the instance on extend, or to the singleton class on include.
<apeiros>
dorei: just provide two modules. let the user include + extend
dopie has quit [Client Quit]
soulcake has joined #ruby
<dorei>
apeiros: it's for a dsl, it'll make it ugly if the user should use both include/extend
<apeiros>
and if you insist on using extended/included hook, *at the very least* clearly document that you're doing so.
havenwood has quit [Ping timeout: 252 seconds]
<apeiros>
dorei: adding stuff unexpectedly is ugly in its own right.
juanpaucar has joined #ruby
rotcetorptekcop has quit [Quit: adios amigos]
soulcake has quit [Client Quit]
<apeiros>
dorei: i.e., if I do `SomeClass.extend Foo`, I expect SomeClass.singleton_class to change. I do not expect SomeClass to change. Vice versa with SomeClass.include Foo.
commondream has quit [Ping timeout: 240 seconds]
soulcake has joined #ruby
rodfersou has quit [Quit: leaving]
<dorei>
apeiros: I generally agree with you, but I think in the case of a dsl, one is prepared to deal with some "magic"
Kiseki has joined #ruby
juanpaucar has quit [Ping timeout: 265 seconds]
moted has quit []
rotcetorptekcop has joined #ruby
tubuliferous has joined #ruby
duncannz has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DerisiveLogic has quit [Ping timeout: 255 seconds]
cirn0 has quit [Remote host closed the connection]
Deele has joined #ruby
Elevanto has quit [Remote host closed the connection]
cirn0 has joined #ruby
bronson has joined #ruby
tubuliferous has quit [Ping timeout: 246 seconds]
<jhass>
oh man, rubycoin.org so who of you has some?
<apeiros>
nope, not me.
<apeiros>
but I don't have neither bitcoins or dogecoins either
cirn0 has quit [Remote host closed the connection]
<adaedra>
I have eurocoins
Blaguvest has quit []
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]