<existensil>
safe in the sense its reliable/predictible behavior. might not be the clearest code to read.
htmldrum has quit [Ping timeout: 264 seconds]
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has joined #ruby
<sphex>
existensil: alright
CloCkWeRX has quit [Quit: Leaving.]
howdoicomputer has joined #ruby
<c_nick>
I have a testing framework where my Web Module (Sinatra web app) displays information to the user. Ideally it picks all the data from database and displays but the information i am picking up comprises of multiple joins basically too much Database processing will it be a better approach that when the results are written to the Db, i write a text file and then for Web UI uses this test file to display Pros: web component has zero processing and info is trivial
<c_nick>
- Grouping of tests Cons: Not sure if the approach is legitimate
fgo has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
howdoicomputer has quit [Ping timeout: 244 seconds]
diego1 has quit [Quit: WeeChat 1.2]
konsolebox has joined #ruby
zacstewart has joined #ruby
mikeric has quit []
_blizzy_ has joined #ruby
Igorshp has joined #ruby
Lucky_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Igorshp has quit [Ping timeout: 244 seconds]
MatrixBridge has quit [Remote host closed the connection]
_blizzy_ has quit [Read error: Connection reset by peer]
meph has quit [Remote host closed the connection]
MatrixBridge has joined #ruby
bronson has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
_blizzy_ has joined #ruby
iateadonut has quit [Quit: Leaving.]
mase-chatter has quit [Quit: Leaving]
poguez_ has quit [Quit: Connection closed for inactivity]
Fezzler has quit [Quit: Leaving]
jesterfraud has joined #ruby
jenrzzz has joined #ruby
chinmay_dd has quit [Ping timeout: 256 seconds]
luriv_ has joined #ruby
htmldrum has joined #ruby
CodyStringham has quit []
foertter has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
perrier has quit [Remote host closed the connection]
perrier has joined #ruby
vdamewood has joined #ruby
zacstewart has quit [Ping timeout: 252 seconds]
luriv has quit [Ping timeout: 264 seconds]
jamesaxl has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
radialneon has joined #ruby
bungoman has quit [Remote host closed the connection]
Zinja has quit [Ping timeout: 256 seconds]
phutchins has quit [Ping timeout: 264 seconds]
baweaver has joined #ruby
perturbation has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
kfpratt has joined #ruby
howdoicomputer has quit [Ping timeout: 264 seconds]
htmldrum has quit [Ping timeout: 244 seconds]
danzilio has quit [Quit: My computer has fallen asleep!]
gaucheph has joined #ruby
howdoicomputer has joined #ruby
Trynemjoel has quit [Quit: Quitting]
cek has quit [Quit: Connection closed for inactivity]
Trynemjoel has joined #ruby
TheNet has quit [Remote host closed the connection]
bronson has joined #ruby
TheNet has joined #ruby
Thr34t has joined #ruby
dfockler has joined #ruby
<Thr34t>
Hey
<Thr34t>
Anyone here
<Aeyrix>
h
<Thr34t>
Hello?
baweaver has quit [Remote host closed the connection]
<Aeyrix>
People are here.
braincra- has quit [Quit: bye bye]
howdoicomputer has quit [Ping timeout: 256 seconds]
<Thr34t>
Can Ppl state their Ruby Programing Ranks ? From Freshman - Senior
sarkyniin has quit [Ping timeout: 255 seconds]
perrier has quit [Remote host closed the connection]
perrier has joined #ruby
serivichi has quit [Ping timeout: 244 seconds]
<Thr34t>
Or Does any one have an idea of a program to creat to understand the heart or use of the truby language
dfockler has quit [Ping timeout: 250 seconds]
howdoicomputer has joined #ruby
<Thr34t>
Does any one have an idea of a program to creat to understand the heart or use of the truby language
<Aeyrix>
You what?
<sevenseacat>
what on earth do those 'ranks' mean
tubuliferous_ has quit [Ping timeout: 240 seconds]
<Aeyrix>
I'm not sure what you're asking tbh.
<Aeyrix>
sevenseacat: You didn't get a rank?
<sevenseacat>
I failed the exam.
<Aeyrix>
:(
<sevenseacat>
then again, the only question I answered, I wrote 'lol roobee'
<Aeyrix>
lmaod
<Aeyrix>
-d
braincrash has joined #ruby
<Thr34t>
have an idea of a program to creat to understand the heart or use of the truby language
<Aeyrix>
Getting strange looks for laughing at IRC.
<Thr34t>
Whats an lol roobe
<sevenseacat>
:)
<sevenseacat>
Thr34t: if you dont know what you want to build, why are you here?
chinmay_dd has joined #ruby
<Thr34t>
To learn
<sevenseacat>
for what end?
<Aeyrix>
Do you have any particular questions we can help with?
<Thr34t>
& I wanna crete something small to start with
<Thr34t>
What are some rookie programs , to toy with
<sevenseacat>
!twgr
zz_barkerd427 is now known as barkerd427
<sevenseacat>
oh duh, this isnt #rubyonrails
<Aeyrix>
Wrong chan. ;)
fgo has quit [Ping timeout: 240 seconds]
<Aeyrix>
wtf is that command supposed to do?
<sevenseacat>
Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
<Aeyrix>
Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
<Thr34t>
Whats this CHL aabout
<Aeyrix>
CHL?
<Aeyrix>
Channel?
<Thr34t>
Arent You Guys Ruby Programers
<pontiki>
chill, mang
<Aeyrix>
This is... people who know or want to know Ruby.
<sevenseacat>
yes, we are.
xkickflip has quit [Quit: xkickflip]
<Thr34t>
What have you guys built ?
<perturbation>
I use Ruby for wrangling Mongo and writing reports in my day-to-day
<perturbation>
I like Rails but I haven't really used it for work
<Aeyrix>
I built a system that monitors more things than the NSA. :^)
<sevenseacat>
a lot of web apps.
<Thr34t>
Anyone here a tinker
<sphex>
I was dishonourably discharged and stripped of my ruby rank :(
i8igmac has quit [Ping timeout: 256 seconds]
<Aeyrix>
sphex: Ouch.
<sevenseacat>
sphex: we told you not to put it there.
<Thr34t>
?
<Coraline>
Conway's Game of Life is a good learning exercise.
<Aeyrix>
I agree.
<sevenseacat>
I had to look up what that was, when I read the four elements of simple design.
maletor has joined #ruby
desigx has joined #ruby
zenguy_pc has quit [Remote host closed the connection]
<Coraline>
I learned about it at a code retreat some years back.
darkf has joined #ruby
<sevenseacat>
seems like a cool idea, but I've never actually built an implementation of it
tmtwd has quit [Remote host closed the connection]
<Coraline>
For a while I was working on a combination game of life / prisoners dilemma
<sevenseacat>
I think I'd get bogged down too much in the pretty output
<Coraline>
Yeah, that's easy to do.
<c_nick>
I am grouping my test results so for n groups n join queries to db to retrieve test statics is better or while saving results to db we write a file which can be references for displaying the stats by the web module?
Ox0dea has joined #ruby
<c_nick>
these stats comprise of Groups - Tests - Pass - Fail
howdoicomputer has quit [Ping timeout: 240 seconds]
<Aeyrix>
Yo Ox.
<Ox0dea>
I had so much fun mucking about with different turn sequences and colors when I first discovered Langton's ant.
<Ox0dea>
Ohai, Aeyrix!
<sevenseacat>
hah cool
Thr34t has quit [Ping timeout: 246 seconds]
dellavg has joined #ruby
desigx has quit [Ping timeout: 244 seconds]
serivichi has joined #ruby
<Ox0dea>
If memory serves, I did it in Racket to learn its object system.
jcdesimp has joined #ruby
eggoez has quit [Ping timeout: 240 seconds]
<sevenseacat>
now I want to play with these kind of things
bffff_ has quit [Quit: Connection closed for inactivity]
<sevenseacat>
good thing tomorrow is my professional development day at work eh
perturbation has quit [Quit: Leaving]
jcdesimp has quit [Client Quit]
jcdesimp has joined #ruby
freerobby has joined #ruby
howdoicomputer has joined #ruby
zacstewart has joined #ruby
psy_ has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
<c_nick>
no ones helping me :(
<Ox0dea>
sevenseacat: You'd have to do some serious finagling, but I suspect the Turing-completeness of both Conway's Game of Life and Langton's ant could be made to work in your favor.
* c_nick
makes cute kitten faces
yfeldblum has joined #ruby
<c_nick>
ok suppose i have {test => [groups] } can i convert that to {group => [tests]}
howdoicomputer has quit [Ping timeout: 252 seconds]
<Coraline>
c_nick: use a database. Performance is good and you will have an historic reference as well.
fgo has joined #ruby
<c_nick>
Coraline, I maintain the group information in a Configuration File, and that information is mostly static (changes once in a bluemoon) thats the reason why i felt i should use the file
konsolebox has quit [Quit: Leaving]
veduardo has quit [Ping timeout: 265 seconds]
eggoez has joined #ruby
<c_nick>
using Active Records i dont really need to maintain the join table (foreign key,foreign key / many to many relation) its just that while i display the stats it will be a query for each row .. vs read a file and get the data .. Saying this file processing will be involved too (viz. Group test pass fail ) and process the whole shit and stuff
<c_nick>
i'll explore the db way today if no luck then try the file way .. thanks Coraline
radialneon has quit [Read error: Connection reset by peer]
<7GHAAP6P7>
should a state machine care how it got to particular state?
7GHAAP6P7 is now known as quazimodo
johnhamelink has joined #ruby
ChasedSpade has joined #ruby
Klumben has joined #ruby
cpruitt has joined #ruby
xcesariox has joined #ruby
xcesariox has quit [Client Quit]
krz has joined #ruby
<sphex>
quazimodo: no, that would be extra state. the point is to make all state explicit.
MichaelGG has joined #ruby
mikepack has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
icarus has quit [Ping timeout: 265 seconds]
Lloyd has joined #ruby
bungoman has quit [Remote host closed the connection]
rubie has quit [Remote host closed the connection]
haneen has quit [Read error: Connection reset by peer]
icarus has joined #ruby
lancetw has joined #ruby
Guest10289 has joined #ruby
jcdesimp has quit [Quit: Leaving...]
icarus has quit [Read error: Connection reset by peer]
<quazimodo>
sphex: so how does that apply to doing actions from state to state transitions
arescorpio has quit [Remote host closed the connection]
serivichi has joined #ruby
oo_ has quit [Remote host closed the connection]
Scroff has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
icarus has joined #ruby
Guest10289 has quit []
Fezzler has quit [Quit: Leaving]
MichaelGG has quit [Ping timeout: 246 seconds]
gaucheph__ has joined #ruby
lala has joined #ruby
howdoicomputer has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
Scroff has quit [Ping timeout: 265 seconds]
bigkevmcd has joined #ruby
MichaelGG has joined #ruby
<sphex>
quazimodo: the actions would occur only when the machine switches from one state to another, which should be decided solely based on the current state and the input. once the machine is in a certain state, the previous states and actions should not matter.
<sphex>
quazimodo: so it can matter which state it goes to when in a certain state.. but after the transition, which state it came from must not matter
eGGsha has quit [Remote host closed the connection]
voycey has joined #ruby
bluOxigen has joined #ruby
xcesariox has joined #ruby
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<voycey>
Hi guys, I am reasonably new to Ruby and am trying to setup a really simply application to help me solve a problem on a PHP app, I need to set up a really simple basic script using Resque that runs a single comamnd
<voycey>
is there any way i can do this without having to install a full framework like Rails / Sinatra as well? That's all I seem to be able to find online
pietr0 has quit [Quit: pietr0]
TheNet has quit [Remote host closed the connection]
<havenwood>
voycey: Rails and Sinatra are both Rack adapters. You could use a bare Rack app. Say more about what you're doing?
<voycey>
I screwed up something on php-resque and one of my queues has a few hundred failed jobs on it - there is nothing on the PHP port that allows a simple requeue of these jobs
<voycey>
just basically need to tell that queue to retry all the failed ones :(
revath has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
revath has left #ruby [#ruby]
simplyianm has quit [Remote host closed the connection]
<havenwood>
voycey: Can you just do that from your REPL? Do you need an API for it? How does Rails/Sinatra come into play?
<voycey>
Im hoping it doesnt have to
<voycey>
not overly experience with Redis - wasnt my choice to use it for deferred processing - if I can do it some other way that would be excellent haha
Iskarlar has joined #ruby
fallen_ has quit [Ping timeout: 244 seconds]
gaucheph has joined #ruby
<voycey>
essentially I just want to tell redis to re-process all the failed ones - figured as they were queued through resque (or PHP's version of it) i would need to go throguh that?
<voycey>
I have a ruby environment setup that works from prev projects and have a really basic script that just doesnt do anything
<voycey>
that link looks good though - ill give that a bash :) thanks!
<havenwood>
voycey: I'm surprised there's no lib in PHP for processing php-resque failed jobs. Have you searched?
zz_barkerd427 is now known as barkerd427
gaucheph__ has quit [Ping timeout: 248 seconds]
cochise has quit [Remote host closed the connection]
sp1rs has quit [Ping timeout: 244 seconds]
<havenwood>
voycey: Good luck! Yeah, I'd try something like that in Ruby. You can do it with just the resque gem as well but the above is made for the purpose.
<voycey>
I have - one of my problems is that its wrapped in another plugin for a framework as well so its all a bit of hard work
<voycey>
ill give this a go :)
zacstewart has joined #ruby
leat1 has quit [Remote host closed the connection]
leat1 has joined #ruby
gaucheph has quit [Ping timeout: 248 seconds]
mikepack has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
sickmate has quit [Ping timeout: 264 seconds]
tagrudev has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ryba has joined #ruby
psyprus has quit [Read error: Connection reset by peer]
psyprus has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
barkerd427 is now known as zz_barkerd427
tubuliferous_ has joined #ruby
jenrzzz has joined #ruby
simplyianm has joined #ruby
<atmosx>
voycey: the best way to solve a problem on a php app is to uninstall php :-P
lkba_ has quit [Quit: Bye]
lkba has joined #ruby
rubie has joined #ruby
mercwithamouth has quit [Quit: leaving]
slucx has joined #ruby
tubuliferous_ has quit [Ping timeout: 255 seconds]
baweaver has joined #ruby
simplyianm has quit [Client Quit]
fallen_ has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
tkuchiki has joined #ruby
felixr has joined #ruby
mrsolo_ has quit [Quit: Leaving]
mleung has quit [Quit: mleung]
El3ktra has joined #ruby
El3ktra has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
_ht has joined #ruby
wildroman2 has quit [Remote host closed the connection]
zacstewart has quit [Ping timeout: 244 seconds]
scripore has joined #ruby
Fezzler has joined #ruby
uxp has quit [Read error: Connection reset by peer]
uxp has joined #ruby
Fezzler has quit [Client Quit]
felixr has quit [Ping timeout: 252 seconds]
CloCkWeRX has quit [Ping timeout: 240 seconds]
amclain has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 246 seconds]
avitzurel has quit [Remote host closed the connection]
eGGsha has joined #ruby
sphex_ has joined #ruby
avitzurel has joined #ruby
dhjondoh has joined #ruby
swgillespie has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
sphex has quit [Ping timeout: 244 seconds]
bigkevmcd has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
yfeldblum has quit [Ping timeout: 255 seconds]
GitGud has joined #ruby
Ilyas has joined #ruby
shoutsid has joined #ruby
rockworldmi has joined #ruby
<rockworldmi>
Hi all..
riotjones has joined #ruby
<rockworldmi>
I am having problem with larch to connect to gmail ... anyone knows workaround to allow to conect to gmail?
Ilyas has quit [Read error: Connection reset by peer]
howdoicomputer has quit [Ping timeout: 255 seconds]
pecopeco has joined #ruby
iloverubynoob has joined #ruby
mikeric has joined #ruby
ixti has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
msnyon has quit [Ping timeout: 256 seconds]
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
iloverubynoob has quit [Ping timeout: 265 seconds]
pecopeco has quit [Ping timeout: 265 seconds]
framling has quit [Remote host closed the connection]
wldcordeiro_ has quit [Remote host closed the connection]
andikr has joined #ruby
lxsameer has joined #ruby
Musashi007 has quit [Quit: Musashi007]
mike___1234 has joined #ruby
zacstewart has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
bigkevmcd has joined #ruby
sickmate has joined #ruby
baweaver has quit [Remote host closed the connection]
ohaibbq has joined #ruby
zemmihates has joined #ruby
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wildroman2 has quit []
sp1rs has joined #ruby
arturaz has joined #ruby
rockworldmi has quit [Quit: Page closed]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cpruitt has quit [Quit: cpruitt]
xcesariox has quit [Read error: Connection reset by peer]
leat1 has quit [Remote host closed the connection]
krz has quit [Read error: Connection reset by peer]
leat1 has joined #ruby
zacstewart has quit [Ping timeout: 244 seconds]
rubie has joined #ruby
krz has joined #ruby
martinium has joined #ruby
AlphaAtom has joined #ruby
AlphaAtom has quit [Client Quit]
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Sp4rKy>
Hi, I'm trying to include a ruby file from another one
yfeldblum has joined #ruby
<Sp4rKy>
and access variables that are defined in the included file
jenrzzz has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
voycey has left #ruby [#ruby]
fabrice31 has joined #ruby
Timba-as__ has joined #ruby
<Antiarc>
local variables are never made visible across files
yfeldblum has quit [Ping timeout: 265 seconds]
xkickflip has joined #ruby
aganov has joined #ruby
<Aeyrix>
And global variables are gross.
<Antiarc>
You should expose a module or class which contains the variables you wish to share
<zenspider>
riddle: when will pry + pry-stack-explorer's show-stack NOT have a stack to show?
edwinvdgraaf has quit [Ping timeout: 265 seconds]
axl_ has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
edwinvdg_ has quit [Client Quit]
<shevy>
hmmm
bluOxigen has joined #ruby
<shevy>
when there is no stack?
<zenspider>
(no, I don't know the answer)
senayar has quit [Remote host closed the connection]
htmldrum has joined #ruby
<zenspider>
there's definitely a stack... this is inside psych inside rails inside a mess
<adaedra>
zenspider: when all the planets are aligned with the sun
blueOxigen has quit [Ping timeout: 252 seconds]
senayar has joined #ruby
<zenspider>
but for some reason, show-stack, up, down, etc do nothing
<zenspider>
no clue
<quazimodo>
anyon here written a shopify plugin?
<quazimodo>
to rephrase
<quazimodo>
a guy i work with is pulling hairs out over his failed attempt at a shopify plugin for shipping
casadei_ has joined #ruby
sofija has joined #ruby
<zenspider>
on top of it, I'm inside a rescue I added to psych, and firing up binding.pry, and ... nothing.
<quazimodo>
sphex_: sorry i went afk. I understand what you're saying though
<quazimodo>
I presumed as much
<zenspider>
wtf? show no exception... which is fine.
Zai00 has quit [Quit: Zai00]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
<zenspider>
I'm trying to hunt down Psych freaking out trying to dump an anonymous Module... which I need to track down to figure out where it came from
bayed has joined #ruby
revath has quit [Ping timeout: 244 seconds]
<zenspider>
ObjectSpace.each_object { |m| m.instance_variables.each do |iv| p m if m.instance_variable_get(iv) == o rescue nil; end } ... ouch
quimrstorres has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
casadei_ has quit [Ping timeout: 264 seconds]
<apeiros>
cute
<apeiros>
I think the rescue nil is needed for .instance_variables too
<apeiros>
might have a couple of objects not responding to that in OS
oo_ has quit [Remote host closed the connection]
<zenspider>
shouldn't
<TheBrayn>
in which cases should I use the short form with &: or & for functions like map?
edwinvdgraaf has joined #ruby
<zenspider>
oddly, I get a strange error if I don't have the rescue
<zenspider>
NoMethodError: undefined method `[]' for #<Module:0x007fd57b679168>
arturmartins has joined #ruby
<apeiros>
o0
<apeiros>
it overrides ivar_get?
<zenspider>
not sure what that's about or why it happens
<zenspider>
I guess it could? seems like madness
<apeiros>
TheBrayn: & is not a short form. &:sym can only be used in certain cases, so you'd use them only in those
<zenspider>
it's a ActionDispatch::Routing::RouteSet::NamedRouteCollection and only has this anonymous module if a destroy method renders some shit ... I have no words
Mafious has joined #ruby
<Mafious>
a Hey Guys someone can buy my Shitgame Please ? Go here to buy my game please
<apeiros>
zenspider: need some? I've got some spare words…
Mafious was banned on #ruby by ChanServ [Mafious!*@*]
Mafious was kicked from #ruby by ChanServ [Banned: trolls go home]
marr has joined #ruby
<zenspider>
damn that's slow
<apeiros>
chanserv so slow :(
marr has quit [Client Quit]
<apeiros>
yeah, I want to perma-op ruboto so it can do that stuff faster
<zenspider>
prolly should
marr has joined #ruby
gguggi has joined #ruby
<apeiros>
also seems we have to go away from akick, as only founders can remove stuff :<
charliesome has quit [Quit: zzz]
zacstewart has joined #ruby
xkef has joined #ruby
lkba has joined #ruby
marr has quit [Client Quit]
[k- has joined #ruby
ruurd has joined #ruby
<[k->
Ox0dea!
revath has joined #ruby
Zai00 has joined #ruby
<apeiros>
well, I *should* get a bit of spare time to work on ruboto & ruby-community.com next week.
njs126 has quit [Ping timeout: 244 seconds]
<[k->
yay! upgrades!
bubbys has quit [Ping timeout: 240 seconds]
<[k->
thanks apeiros
r0bby_ is now known as robbyoconnor
matcouto has joined #ruby
djbkd has quit [Remote host closed the connection]
marr has joined #ruby
bodzio has joined #ruby
robbyoconnor has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
arturaz has quit [Remote host closed the connection]
failshell has joined #ruby
<dubkoidragon>
hey guys, is there anywhere that I can get a qucik read on what I need to install and run my ruby codes, and the process in which to run them, pref an article with pics rather than video.
<dubkoidragon>
I'm coming from a pyton backround, and I am really excited to start workign with ruby
<adaedra>
also
<adaedra>
?guys
<ruboto>
we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<dubkoidragon>
i look forward to getting to know yall
<zenspider>
argh. I have no idea how to track this BS down
<dubkoidragon>
i meant no disrespect
<dubkoidragon>
jujst my common speech slang my friends
<dubkoidragon>
;)
<adaedra>
most don't. don't worry, you're not in trouble, just a friendly reminder :)
<adaedra>
have fun with ruby though :)
failshell has quit [Ping timeout: 256 seconds]
bruno- has joined #ruby
<dubkoidragon>
thank you, I'm almost done learning the syntax here which is scary close to pythons, then i'm gonna hit up some rails too as well as working with base ruby
revath has quit [Remote host closed the connection]
<zenspider>
there's gotta be a better way
asui has joined #ruby
<[k->
isn't it french that has a lot of gender-specific words :o
revath has joined #ruby
<dubkoidragon>
ya a lot of languages do, I'm speaking verbal languages obviously
ruurd has quit [Quit: ZZZzzz…]
<adaedra>
[k-: you're welcome to discuss that in offtopic :)
<dubkoidragon>
what's off topic
<adaedra>
?ot
<ruboto>
this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<dubkoidragon>
ok ty, sry
<adaedra>
:)
fabrice31_ has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
<apeiros>
zenspider: your code bombs on serialization of data?
<apeiros>
zenspider: and you have the place where the code is being serialized?
<apeiros>
i.e. you have all except the place where the anonymous module which causes the bombing is created?
eGGsha has joined #ruby
devbug has quit [Ping timeout: 264 seconds]
isxek has joined #ruby
fabrice31 has quit [Ping timeout: 252 seconds]
<zenspider>
I know what the module is, and where it comes from... I have no idea how it makes it into the object graph being serialized, nor do I (currently) know the top of the graph
tubuliferous_ has joined #ruby
<apeiros>
ah
htmldrum has joined #ruby
oo_ has quit [Remote host closed the connection]
<zenspider>
tho, I just found out that my test is holding onto the module in question (indirectly).... I need to figure out why nilling it out isn't working
<zenspider>
this stupid pattern is working
<zenspider>
a = find_obj m; a.map { |x| [x[0].class, x[1]] }
<zenspider>
pick... then m = a[1][0]; nil
<zenspider>
repeat
plashchynski has joined #ruby
oo_ has joined #ruby
<zenspider>
and just.... fyi... Bundler::Definition holds onto EVERYTHING
<zenspider>
I think, quite possibly, literally...
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<asui>
Hi everyone, I've started to learn ruby but I've got some trouble with threads. If I spawn multiple threads t1...tn = Thread.new everthing works fine. But if I do the same thing in a loop (0..7) it will only spawn 3-4 threads? I don't understand this behavior. could anybody explain it to me?
matcouto has joined #ruby
stan has joined #ruby
<zenspider>
I can't find the top of this stupid graph tho
lxsameer has quit [Ping timeout: 244 seconds]
khebbie has joined #ruby
Scrofff has joined #ruby
lxsameer has joined #ruby
tubuliferous_ has quit [Ping timeout: 264 seconds]
xkef has quit [Read error: Connection reset by peer]
64MADC7ZF has quit [Ping timeout: 255 seconds]
Scroff has quit [Ping timeout: 256 seconds]
quazimodo has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
foooobear has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
Pupeno has joined #ruby
Pathfinder has joined #ruby
Karpah has joined #ruby
<adaedra>
?code asui
<ruboto>
asui, We can't help you without your code, please post it to https://gist.github.com
<adaedra>
both versions, and a little more about context and what you're trying to do
<yorickpeterse>
TIL Ruby's String#downcase is meh when it comes to downcasing unicodes
<mikecmpbll>
i don't really know what you mean, but either way i can't seem to get the result i want with the csv lib
f4cl3y has quit [Ping timeout: 256 seconds]
arturmartins has joined #ruby
livathinos has quit []
blackmesa has joined #ruby
eGGsha has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
facebook has quit [Ping timeout: 255 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Flipez has joined #ruby
zacstewart has joined #ruby
oo_ has joined #ruby
xkef has joined #ruby
Axy has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
chinmay_dd has quit [Quit: See ya!]
desigx has joined #ruby
Mia has quit [Ping timeout: 248 seconds]
sp1rs has quit [Ping timeout: 252 seconds]
lkba_ has joined #ruby
t_ has joined #ruby
sp1rs has joined #ruby
Oka has joined #ruby
OrbitalKitten has joined #ruby
<gregf_>
mikecmpbll: what i meant was, first use a regex to split that string. thereafter use a csv module to split the rows into columns
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lkba has quit [Ping timeout: 244 seconds]
<gregf_>
let me write something :/
ruurd has quit [Quit: ZZZzzz…]
<mikecmpbll>
crap hold on
<mikecmpbll>
i think i was doing something wrong.
quazimodo has joined #ruby
quazimod1 has joined #ruby
<gregf_>
>> /\((?<str1>.*)\),\((?<str2>.*)\)$/ =~ %{(1,"abcde,fg",213,"abc(feg)"),(1,"abcde,fg",213,"abc(feg)")}; str="";[str1, str2].each { |s| dat = s.chars.inject([]){ |arr,c| if ( c == "," && ( str =~ /\d$/ || str =~ /\D"$/ ) ); arr << str; str=""; else; str +=c; end; arr } ; dat << str; str = ""; p dat }
<ruboto>
gregf_ # => ["1", "\"abcde,fg\"", "213", "\"abc(feg)\""] ...check link for more (https://eval.in/399950)
<gregf_>
mikecmpbll: ^^ if that helps. its awful tho :/
<mikecmpbll>
yeah, sweet
<gregf_>
change that += to << :/
farn has quit [Remote host closed the connection]
asui has quit [Ping timeout: 240 seconds]
AviShastry has joined #ruby
<mikecmpbll>
thanks gregf_ , appreciate it
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gregf_>
no worries
fabrice31 has joined #ruby
rubie has joined #ruby
zacstewart has quit [Ping timeout: 244 seconds]
desigx has quit [Ping timeout: 240 seconds]
sp1rs has quit [Ping timeout: 264 seconds]
Igorshp has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
blackmes1 has joined #ruby
doertedev has joined #ruby
ruurd has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
AviShastry has quit [Quit: AviShastry]
ruurd has quit [Client Quit]
<Mon_Ouie>
It's probably easier to use some parser library or write your own than to try and get regular expressions to handle balanced parentheses
livathinos has joined #ruby
blackmes1 has quit [Ping timeout: 246 seconds]
<yxhuvud>
*giggle*
frem has quit [Quit: Connection closed for inactivity]
desigx has joined #ruby
bodzio has left #ruby [#ruby]
ruurd has joined #ruby
lala has quit [Quit: Connection closed for inactivity]
senayar has quit [Remote host closed the connection]
OrbitalKitten has joined #ruby
senayar has joined #ruby
pecopeco has quit [Remote host closed the connection]
iloverubynoob has quit [Remote host closed the connection]
awk has joined #ruby
LMity has joined #ruby
desigx has quit [Ping timeout: 255 seconds]
<awk>
hi, i'm a ruby noob.. if I have $dir="/home/user" and then I have files = Dir.glob($dir) and puts files it outputs /home/user ... how do I modify either Dir.glob($dir or puts to output /home/user/* without having to put /home/user/* in $dir ="/home/user/*" ?
OrbitalKitten has quit [Client Quit]
blackmes1 has joined #ruby
sp1rs has joined #ruby
<adaedra>
If your goal is to list files in the given directory, glob is not the most appropriate
Papierkorb has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra>
?ri Dir.entries
<ruboto>
Dir.entries, I don't know anything about ri
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 244 seconds]
zz_Outlastsheep is now known as Outlastsheep
desigx has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
facebook has joined #ruby
Iskarlar has joined #ruby
lessless has joined #ruby
<shevy>
adaedra but ruby uses so many globals!
krz has quit [Quit: WeeChat 1.0.1]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Outlastsheep is now known as zz_Outlastsheep
<adaedra>
$shevy.mute!
Oka has quit [Read error: Connection reset by peer]
<shevy>
:(
iloverubynoob has joined #ruby
pecopeco has joined #ruby
<adaedra>
:)
Oka has joined #ruby
quazimodo has joined #ruby
quazimod1 has joined #ruby
Igorshp has quit [Remote host closed the connection]
Oka has quit [Read error: Connection reset by peer]
tmtwd has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Oka has joined #ruby
Iskarlar has joined #ruby
nfk has joined #ruby
schaerli has joined #ruby
farn has joined #ruby
jeramyRR has joined #ruby
bruno- has joined #ruby
eGGsha has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
arup_r has quit [Remote host closed the connection]
ryba has quit [Ping timeout: 265 seconds]
symm- has joined #ruby
casadei_ has joined #ruby
MrJiks has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
<awk>
@all is there a way with Class: Net::SCP to only transfer files that have changed.. I don't want to use rsync
autrilla has joined #ruby
haxrbyte has quit [Ping timeout: 265 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
phutchins has joined #ruby
<[k->
shevy!
peeja has joined #ruby
ldnunes has joined #ruby
casadei_ has quit [Ping timeout: 248 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k->
oh gosh horrible code
<shevy>
wat
<shevy>
I didn't write anything!
<[k->
<gregf_> >> /\((?<str1>.*)\),\((?<str2>.*)\)$/ =~ %{(1,"abcde,fg",213,"abc(feg)"),(1,"abcde,fg",213,"abc(feg)")}; str="";[str1, str2].each { |s| dat = s.chars.inject([]){ |arr,c| if ( c == "," && ( str =~ /\d$/ || str =~ /\D"$/ ) ); arr << str; str=""; else; str +=c; end; arr } ; dat << str; str = ""; p dat }
thiagovsk has joined #ruby
<shevy>
ack
<shevy>
the Ox0dea style of coding expands
<adaedra>
to count the number of `true` in an array composed of `true` and `false`, is there better than `count(&:itself)`?
Zai00 has quit [Quit: Zai00]
Iskarlar has joined #ruby
schaerli has quit [Remote host closed the connection]
<[k->
nope
ruurd has quit [Quit: ZZZzzz…]
Xzanron has joined #ruby
_solomon has joined #ruby
Oka has quit [Remote host closed the connection]
nfk has quit [Remote host closed the connection]
allcentury has joined #ruby
edwinvdgraaf has joined #ruby
schaerli has joined #ruby
<apeiros>
adaedra: don't think it's better, but as an alternative: (ary-[false]).size
nfk has joined #ruby
facebook has quit [Ping timeout: 246 seconds]
<adaedra>
that creates a second array though
OrbitalKitten has joined #ruby
<apeiros>
so?
blackmes1 has quit [Ping timeout: 244 seconds]
<shevy>
it's slow!
yuuvee has joined #ruby
<adaedra>
well, it's better without creating a new array
<apeiros>
shevy: it's actually faster
<apeiros>
adaedra: why? :)
ndrei has quit [Ping timeout: 252 seconds]
lala_ has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
adaedra your code is slower!
<adaedra>
that's allocating a lot of ressources (the array + all inside elements) just to do a count and throw it away (and the array I check into already have a short lifespan), especially when this array can have a lot of elements inside
<adaedra>
I just noticed I can do with a step less >_<
OrbitalKitten has quit [Client Quit]
ruurd has joined #ruby
<apeiros>
it's ~20bytes + 8bytes * elements
<apeiros>
so 10k elements is 80KB memory
allomov has quit []
<adaedra>
And allocating 0B is no better?
davejlong has joined #ruby
Zai00 has joined #ruby
<apeiros>
it is. but that's not the only part of the equation.
<apeiros>
count(&:itself) does N method calls in ruby space, which is expensive
<adaedra>
ah ok
<apeiros>
(ary-[false]).size does 2 method calls in ruby space
zacstewart has joined #ruby
endash has joined #ruby
<[k->
what is this ary-[false]
<adaedra>
ary minus all false elements
<adaedra>
so you get an array of just true elements
* apeiros
used Array.new(1000) { rand < 0.5 } # to generate test data :)
mandarinkin has joined #ruby
jpfuentes2 has quit [Ping timeout: 256 seconds]
DaniG2k has quit [Quit: leaving]
<awk>
anyone can advise on a way with ruby using scp to only upload/download changed files ?
tmtwd has quit [Ping timeout: 244 seconds]
<[k->
the most idiomatic way is still count(&:itself) tho
timonv has joined #ruby
arup_r has joined #ruby
symbol has quit [Ping timeout: 248 seconds]
blackmes1 has joined #ruby
cek has joined #ruby
<shevy>
awk I think you have to do that manually, e. g. keep track of which files have a different modification date
ruurd has quit [Quit: ZZZzzz…]
_solomon has quit [Quit: _solomon]
<[k->
^ that's what I did
mandarinkin has quit [Remote host closed the connection]
tkuchiki has joined #ruby
skyrocker has joined #ruby
blackmes1 has quit [Ping timeout: 246 seconds]
arturmartins has joined #ruby
skyrocker has left #ruby [#ruby]
ruurd has joined #ruby
i-blis has joined #ruby
<awk>
shevy: m' kay tx
schaerli has joined #ruby
presto has joined #ruby
prestorium has quit [Ping timeout: 240 seconds]
scripore has joined #ruby
Pathfinder_ has joined #ruby
Pathfinder has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
Igorshp has joined #ruby
sp1rs has quit [Ping timeout: 256 seconds]
chinmay_dd has joined #ruby
haxrbyte_ has joined #ruby
yuuvee is now known as yuuvee|away
sgambino has joined #ruby
aspiers has joined #ruby
<shevy>
is there some "popularity chart" for rubygems? something like, not only top downloads, but also like ... how important a gem is for the whole ruby infrastructure
edwinvdgraaf has joined #ruby
<mikecmpbll>
shevy: they're in the process of adding reverse dependencies to the gem page
<mikecmpbll>
iirc
<shevy>
that's neat
<mikecmpbll>
they already added a function to the api but i think they're working out how to display it
<ruboto>
[k-_ # => wrong number of arguments (0 for 1) (ArgumentError) ...check link for more (https://eval.in/400091)
<[k-_>
:/
<mikecmpbll>
combination
<ljarvis>
?irb
<ruboto>
irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
<[k-_>
do we need some argument for it
<ccooke>
[k-_: combination takes an argument for the number of picks
<mikecmpbll>
yes
<[k-_>
i was trying to show something!
<ccooke>
in this case, the size of the input array
<ljarvis>
ccooke: can you gist a proper example? I might be missing something but I'm totally lost
dfinninger has joined #ruby
<mikecmpbll>
^
<ccooke>
ljarvis: I'll do so in a bit, sure
<mikecmpbll>
not just you, ljarvis!
tmtwd has joined #ruby
linuxboy_ has quit [Remote host closed the connection]
axl_ has quit [Remote host closed the connection]
<ccooke>
I've been searching to see if there's "proper" code for it for a bit, but it looks not
krz has joined #ruby
linuxboytoo has joined #ruby
<ccooke>
To give the concrete example, anyway. Imagine you are rolling dice. You roll three dice - two of them four sided and one six sided
desigx has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
malconis has joined #ruby
<adaedra>
&roll 2d4
* `derpy
rolls 2 dice… got 2, 4. Total: 6
<adaedra>
sorry :>
malconis has quit [Remote host closed the connection]
<ccooke>
now, the product of those are all the possible individual rolls that you could make
zacstewart has quit [Remote host closed the connection]
allcentury has joined #ruby
segfalt has joined #ruby
<[k->
a prediction?
malconis has joined #ruby
<ccooke>
so: [1,2,3,4].product([1,2,3,4],[1,2,3,4,5,6]) will return a *lot* of possible results
workmad3 has quit [Ping timeout: 264 seconds]
davejlong has joined #ruby
<ccooke>
as in, every individual possible roll you could make. But that's horribly inefficient if you just want to work out the probabilities of any individual result.
<[k->
[ a*b*c | a <- ary1, b <- ary2, c <- ary3 ]
JoshL has joined #ruby
<ccooke>
for that, [1,2,3,4,5,6].repeated_combinations(3) will give you every distinct result *set*
rubie has quit [Ping timeout: 265 seconds]
<ccooke>
Let's say that one of the value sets you get for that is [1,1,5], and you want to calculate the probability of that roll.
endash has quit [Quit: endash]
linuxboytoo has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Remote host closed the connection]
<[k->
but why would you want a set?
<[k->
you can't have probability with sets!
endash has joined #ruby
fabrice31 has joined #ruby
leat2 has joined #ruby
leat1 has quit [Remote host closed the connection]
<ccooke>
[k-_: you can if you code for it :-)
prettiestPony11 has joined #ruby
zacstewart has joined #ruby
duggiefresh has joined #ruby
<ccooke>
Anyway, I will write up the code I mean.
<ccooke>
Thanks for the suggestions :-)
<ccooke>
and for not being visibly bored with my explanation ;-)
AlexRussia has joined #ruby
<[k-_>
visibly ( ͡° ͜ʖ ͡°)
<ccooke>
The internet covers a multitude of sins :-)
<[k-_>
isnt probability the number of times in the array over total length of the array
<ccooke>
[k-_: it is for simple things, yes
bhaak has quit [Remote host closed the connection]
yuuvee is now known as yuuvee|away
yuuvee|away is now known as yuuvee
<ccooke>
but I'm handling more complex ones, like exploding dice (which, if you haven't heard of the term, means "roll another die whenever a die rolls maximum" (yes, recursively))
bhaak has joined #ruby
quimrstorres has quit [Remote host closed the connection]
hfp_work has quit [Ping timeout: 264 seconds]
<ccooke>
and some modifiers like "drop the lowest N", or "treat values of X or more as a success, values below as failure"
<phreakocious>
hi, can someone explain why I get this error message when doing a Queue.pop(true) for non-blocking: in `pop': no implicit conversion of true into Integer (TypeError)
desigx has quit [Ping timeout: 264 seconds]
hfp__work has joined #ruby
devdazed has joined #ruby
dblessing has joined #ruby
<ddv>
phreakocious: you are giving a a boolean but it wants an integer?
<phreakocious>
the docs and many online examples show it is correct syntax
<konsolebox>
phreakocious: what do you get with puts object.class?
hfp_work- has joined #ruby
<konsolebox>
where object is the queue
<phreakocious>
Queue
hfp- has joined #ruby
<konsolebox>
phreakocious: bug maybe
<Mon_Ouie>
?code phreakocious
<ruboto>
phreakocious, We can't help you without your code, please post it to https://gist.github.com
<[k-_>
do you have proof that the docs show that it is correct?
dhjondoh has quit [Remote host closed the connection]
[H]unt3r has joined #ruby
leat2 has quit [Remote host closed the connection]
<Mon_Ouie>
phreakocious: When you were asked to 'puts object.class' where did you put that line of code?
<Mon_Ouie>
Because indeed, this ^
<[k-_>
yay me!
<phreakocious>
right above the declaration of counters
whippythellama has joined #ruby
bffff_ has joined #ruby
Hounddog has quit [Read error: Connection reset by peer]
<phreakocious>
[k-_: what's wrong with that?
<[k-_>
you change the type of hosts to array
<[k-_>
and array doesnt have pop(bool)
_solomon has joined #ruby
<phreakocious>
it doesn't show that when i puts hosts.class though
<shevy>
ddv epic line
zrowe007 has joined #ruby
rubie has joined #ruby
<[k-_>
you nest too much
<[k-_>
that is a code smell
lobmys has joined #ruby
<phreakocious>
thanks for the help all
hfp has joined #ruby
linuxboytoo has joined #ruby
hfp_work has joined #ruby
axl_ has joined #ruby
Pathfinder_ has quit [Ping timeout: 264 seconds]
<[k-_>
usually when someone says that, the problem is solved
<[k-_>
\o/
<phreakocious>
not yet but it will be
tkuchiki has quit [Remote host closed the connection]
thang has quit [Ping timeout: 246 seconds]
TomyWork has quit [Ping timeout: 264 seconds]
thang has joined #ruby
hfp_work- has quit [Ping timeout: 244 seconds]
hfp- has quit [Ping timeout: 264 seconds]
lessless has joined #ruby
desigx has joined #ruby
schaerli has quit [Remote host closed the connection]
linuxboy_ has joined #ruby
sevenseacat has joined #ruby
prefixed has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
paulcsmith has joined #ruby
Kully3xf has joined #ruby
quimrstorres has joined #ruby
thang has quit [Ping timeout: 246 seconds]
<Kully3xf>
I have a file that calls module Enumerable and it was working fine, and I split it out into it's own file and now it won't work. Copy paste - where should I be looking
linuxboytoo has quit [Ping timeout: 246 seconds]
<phreakocious>
[k-_: you were totally right, thanks again
thang has joined #ruby
<[k-_>
:>
<[k-_>
?code Kully3xf
<ruboto>
Kully3xf, We can't help you without your code, please post it to https://gist.github.com
scripore has quit [Quit: This computer has gone to sleep]
<[k-_>
?gist_usage
<ruboto>
To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
arup_r has quit [Remote host closed the connection]
<adaedra>
ninja'd
rbennacer has joined #ruby
<[k-_>
oh gosh nested defs!
<adaedra>
And I think you lack a couple end
<[k-_>
is that even legal
<Kully3xf>
there's more code below
<Kully3xf>
but irrelevant
<Kully3xf>
I take it nested defs is not allowed then - I'll start there
kies has quit [Ping timeout: 264 seconds]
<shevy>
it's often not needed; you can do conditionals define via define_method and instance_eval / class_eval too
aphprentice_ has joined #ruby
aphprentice has quit [Ping timeout: 244 seconds]
oo_ has quit [Remote host closed the connection]
failshell has joined #ruby
tkuchiki has joined #ruby
scripore has joined #ruby
kies has joined #ruby
linuxboy_ has quit [Read error: Connection reset by peer]
linuxboytoo has joined #ruby
schaerli has joined #ruby
ada2358 has quit [Ping timeout: 256 seconds]
jgpawletko has joined #ruby
revath has quit [Ping timeout: 256 seconds]
ada2358 has joined #ruby
shredding has joined #ruby
pecopeco has quit [Remote host closed the connection]
iloverubynoob has quit [Remote host closed the connection]
devbug has joined #ruby
NeverDie has joined #ruby
Freijo has quit [Remote host closed the connection]
xkef has quit [Ping timeout: 265 seconds]
<quazimodo>
any way to get rspec to stop compaining about _spec.rb files not found (LoadError) when running through guard-rspec ?
msnyon has joined #ruby
tagrudev has quit [Remote host closed the connection]
<sevenseacat>
dont look for _spec.rb files?
<sevenseacat>
whats looking for them?
meph has joined #ruby
<quazimodo>
Guardfile is matching them, but plenty don't exist
<sevenseacat>
then your Guardfile should be fixed
<quazimodo>
i guess the only option is to make everything in app/ also have something in spec/ eh?
intinig has quit [Remote host closed the connection]
codecop has quit [Quit: Išeinu]
<sevenseacat>
recent versions of guard have really gone off the deep end in their dsl
<sevenseacat>
IMO
<quazimodo>
meh
Fraeon has joined #ruby
Fraeon has quit [Client Quit]
Fraeon has joined #ruby
thang has quit [Ping timeout: 252 seconds]
facebook has quit [Ping timeout: 252 seconds]
devdazed has quit [Quit: Bye]
ada2358 has quit [Ping timeout: 240 seconds]
devbug has quit [Ping timeout: 250 seconds]
prettiestPony11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danzilio has quit [Quit: My computer has fallen asleep!]
GhettoCode has joined #ruby
happyface has joined #ruby
devdazed has joined #ruby
unshadow has quit [Client Quit]
edwinvdgraaf has joined #ruby
pecopeco has joined #ruby
iloverubynoob has joined #ruby
godzillaenlacasa has joined #ruby
blackmes1 has joined #ruby
umgrosscol has joined #ruby
sofija has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
njs126 has joined #ruby
cpruitt has quit [Ping timeout: 252 seconds]
prestorium has joined #ruby
bodzio has joined #ruby
xkef has joined #ruby
presto has quit [Ping timeout: 264 seconds]
konsolebox has quit [Ping timeout: 244 seconds]
sshuff has joined #ruby
cpruitt has joined #ruby
episage has joined #ruby
JoshL has quit [Read error: Connection reset by peer]
JoshL has joined #ruby
<thoraxe>
why would a "rake db:migrate" not do anything if there was already a db/migrate/xxxxxx file?
<jhass>
?rails thoraxe
<ruboto>
thoraxe, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<thoraxe>
usually that's because the db schema is newer than the migration or whatever?
<thoraxe>
is that actually rails?
<ljarvis>
yes
<ljarvis>
are you using rails?
yardenbar has quit [Quit: Leaving]
<thoraxe>
no, sinatra.
<ljarvis>
with activerecord?
<thoraxe>
i didn't think rake was specific to rails
<jhass>
well, AR expertise is still much higher over there
<thoraxe>
k
<ljarvis>
it's nothing to do with rake
<thoraxe>
makes sense
<ljarvis>
but yeah AR stuff will be more helpful there
<ljarvis>
including those rake tasks
bhaak has quit [Ping timeout: 260 seconds]
bubbys has joined #ruby
freerobby has joined #ruby
<yorickpeterse>
Sequel > All
<yorickpeterse>
ᕕ(ᐛ)ᕗ
bhaak has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<ljarvis>
truth
<ljarvis>
although I haven't used it in so long
Guest87318 has joined #ruby
<Guest87318>
How should I log a variable? https://gist.github.com/anonymous/592f2f0d3555f42f1a8c I want both of those specs to pass, and yet old_array is updated along with array. How do I log the old array? The value that it was before the When block was executed? I've tried using let and let! but to no avail. I like the RSpec-Given syntax and I like one liner specs, I know I could do this in one it block but I want to see if an old variable can be logged usi
Xzanron has quit [Quit: Leaving]
linuxboytoo has quit [Remote host closed the connection]
<ljarvis>
Given(:old_array){ array.dup }
<ljarvis>
though better the other way around imo
<ljarvis>
also this is an awful tests so I'm hoping there's a lot more to it
Igorshp has quit [Remote host closed the connection]
<Guest87318>
ljarvis yeah it's just an example
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis>
ok, so yeah they both point to the same object, you want to duplicate that
<Kully3xf>
what's the better way to accomplish this if statement in one line without having to retype the input and also not using a variable
<gregf_>
Kully3xf: you dont need a conditional there :/. you can just do if ( val = gets.downcase.chomp ); validate(val);end
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis>
gregf_: um.. no
bungoman has quit [Remote host closed the connection]
mary5030 has joined #ruby
<[k-_>
i sacrificed some for idiomaticness
<ljarvis>
that won't ever return non-truthly
sarkyniin has joined #ruby
rideh has joined #ruby
<sevenseacat>
gregf_: that is a conditional lol
danzilio has quit [Client Quit]
<gregf_>
def validate_sg(inval); return !inval.nil? && !inval.match(/\A\s*\z/) ? 1: 0;end; c = 0;loop{ if ( sg = gets.to_s.downcase.chomp ); p validate_sg(sg);end; break if ((c+=1) >= 2); }
<[k-_>
assuming you were talking about what i was talking
<[k-_>
OMY PLS NO
danzilio has joined #ruby
<[k-_>
DIE GREG!
mary5030 has quit [Remote host closed the connection]
<gregf_>
heh
<shevy>
lol
tvw has quit [Remote host closed the connection]
<ljarvis>
gregf_: the condition is moot, it'll never fail
schaerli has quit [Remote host closed the connection]
<ljarvis>
plus that code makes me want to tear my face off
<yorickpeterse>
what the hell is that
mary5030 has joined #ruby
<[k-_>
shevy: how do you like my code?
<[k-_>
i wrote idiomatic code for once!
<Ox0dea>
[k-_: Yeah, never mind. It's all in there, in one form or another.
speaking1ode has quit [Ping timeout: 248 seconds]
rideh has quit [Client Quit]
<Ox0dea>
It feels like C, though.
rideh has joined #ruby
<shevy>
[k-_ I dunno... knowing that it originated from unicode, I don't like your code as a result now!
<[k-_>
ruby is imperative ¯\_(ツ)_/¯
<[k-_>
but i took effort to refactor it into sensible human readable code!
<shevy>
at least Ox0dea's code was visually aesthetic, you could assume that it were greek code from 4000 years ago
sshuff has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ytti>
casual python hate
<[k-_>
how dare you!
<shevy>
yeah you could have done something else too like help me fix bugs!
<ytti>
i often see python code written imperatively
senayar has quit [Remote host closed the connection]
<gregf_>
wonder why someone would do 2&1<1 when 2%2 == 0 can be used :/
<gregf_>
*wonders
<ytti>
even many experienced pythonists don't really capitalize on OO
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
tubuliferous_ has joined #ruby
<dudedudeman>
less things to type?
<ytti>
but i very rarely see ruby code written like that
<shevy>
they just get too annoyed about explicit self all the time
<ytti>
and leaking variables all over the place
bungoman has joined #ruby
<shevy>
:D
<Ox0dea>
gregf_: Golfers would do that, for instance.
<shevy>
obfuscaters!
<Ox0dea>
Aesthetes.
<gregf_>
cavedwellers
<[k-_>
you discourage me to write readable code
<shevy>
:D
<dudedudeman>
code colf hurts my mind
<shevy>
code calf?
<dudedudeman>
cammit. gold*
<dudedudeman>
! dammint*** golf***
<Ox0dea>
Gold calf?
<shevy>
hehe
<shevy>
I'd code for gold
<[k-_>
i'll transform it more then
<ytti>
also i've not heard of rubyist turning to pythonist, voluntarily
<[k-_>
Ox0dea's code is imperative anyway
<Ox0dea>
[k-_: For what it is, it's quite nice.
<ytti>
but i've seen pythonists embracing ruby
eGGsha has joined #ruby
<ytti>
but they may be biased, they were weeboos
<shevy>
ytti I read some blogger lately who went that route... not sure who it was... some guy who no longer cared about programming languages, I think he complained about Julia
endash has quit [Quit: endash]
schaerli has joined #ruby
lobmys has quit [Quit: WeeChat 1.1]
symbol has joined #ruby
symbol is now known as lobmys
tubuliferous_ has quit [Ping timeout: 265 seconds]
fgo has quit [Ping timeout: 252 seconds]
intinig has quit [Remote host closed the connection]
ljt has quit [Read error: Connection reset by peer]
sgambino has joined #ruby
ndrei has joined #ruby
livathinos has quit []
mikepack has joined #ruby
kies^ has quit [Read error: Connection reset by peer]
arturaz has quit [Ping timeout: 244 seconds]
drewvanstone has quit [Ping timeout: 256 seconds]
revath has quit [Ping timeout: 240 seconds]
schaerli has quit [Remote host closed the connection]
hfp_work has quit [Ping timeout: 256 seconds]
hfp has quit [Ping timeout: 256 seconds]
werelivinginthef has joined #ruby
konsolebox has joined #ruby
dumdedum has joined #ruby
sharpmachine has joined #ruby
davejlong has quit [Remote host closed the connection]
hfp has joined #ruby
riotjones has quit [Remote host closed the connection]
hfp_work has joined #ruby
hello_ has joined #ruby
edwinvdgraaf has joined #ruby
tmtwd has quit [Ping timeout: 248 seconds]
dfinninger has joined #ruby
dimasg has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
fabrice31 has quit [Remote host closed the connection]
quimrstorres has joined #ruby
decoponio has joined #ruby
gamename has joined #ruby
<[k-_>
does this look nicer now
<ljarvis>
nothing about that looks nice
<[k-_>
you dont look nice either! :c
<Ox0dea>
[k-_: Are you trying to take it from completely non-alphanumeric to completely alphanumeric?
nobitanobi has joined #ruby
konsolebox has quit [Remote host closed the connection]
* Ox0dea
is now wondering if it's possible to write Ruby without using symbols.
* Ox0dea
doubts it.
platzhirsch has joined #ruby
yardenbar has joined #ruby
<[k-_>
. is a symbol
<[k-_>
you dont have a chance
hello_ has quit [Ping timeout: 246 seconds]
lobmys has quit [Quit: WeeChat 1.1]
symbol has joined #ruby
kies^ has joined #ruby
livathinos has joined #ruby
OrbitalKitten has joined #ruby
dEPy has joined #ruby
<Ox0dea>
I got as far as `def send method proc do` before I needed the pipe. :/
quimrstorres has quit [Ping timeout: 240 seconds]
* [k-_
nods
<[k-_>
<<-
<[k-_>
some code here
dom__ has joined #ruby
<[k-_>
oops forgot the tag
<[k-_>
well whatever
<[k-_>
then you can eval it!
icebourg has joined #ruby
<Ox0dea>
Boo.
quimrstorres has joined #ruby
drewvanstone has joined #ruby
<[k-_>
you are wondering about possiblilty, im giving you an option!
<[k-_>
also, do you know how Object#hash works?
wordsarewind has joined #ruby
<Ox0dea>
It's different for different objects.
revath has joined #ruby
<[k-_>
and?
<ruurd>
<[k-_> why ask if you can look at the code?
<[k-_>
eww, c
<[k-_>
do you think i can read c?
<[k-_>
because i cannot
blue_deref has joined #ruby
<adaedra>
booh.
<Ox0dea>
[k-_: It uses SipHash 2-4, if that helps any.
charliesome has joined #ruby
eGGsha is now known as eGGshke
milesmatthias has joined #ruby
milesmatthias has quit [Client Quit]
jhack has joined #ruby
duoi has quit [Quit: duoi]
<[k-_>
at least i know it does :/
<[k-_>
+now
Siyfion has joined #ruby
<Ox0dea>
For most objects, it seems #hash just uses SipHash on the actual bytes that represent the object in memory.
bungoman has quit [Remote host closed the connection]
gambl0re has joined #ruby
sharpmachine has quit [Remote host closed the connection]
rideh has quit [Quit: zap]
plsk has joined #ruby
saadq has joined #ruby
sharpmachine has joined #ruby
msnyon has quit [Ping timeout: 248 seconds]
MrJiks_ has joined #ruby
acke has quit [Remote host closed the connection]
Marsupermammal has joined #ruby
dfinninger has quit [Remote host closed the connection]
MrJiks has quit [Ping timeout: 250 seconds]
dfinninger has joined #ruby
psy has joined #ruby
psy has quit [Max SendQ exceeded]
platzhirsch has left #ruby [#ruby]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
psy has joined #ruby
dom__ has quit [Ping timeout: 256 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
rcvalle has joined #ruby
aganov has quit [Remote host closed the connection]
Scroff has quit [Ping timeout: 264 seconds]
OrbitalKitten has joined #ruby
rippa has joined #ruby
havenwood has joined #ruby
bruno- has joined #ruby
leonardoajim has joined #ruby
leonardoajim has quit [Remote host closed the connection]
dumdedum has quit [Quit: foo]
ruby-lang812 has joined #ruby
tmtwd has joined #ruby
grizzlybair has joined #ruby
Scrofff has joined #ruby
white_bear has quit [Quit: leaving]
ruby-lang812 has quit [Client Quit]
jhack has quit [Remote host closed the connection]
yardenbar has quit [Quit: Leaving]
livathinos has quit []
grizzlybair has quit [Quit: leaving]
riotjones has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
polysics_ has joined #ruby
yuuvee has quit [Quit: Leaving...]
bungoman has joined #ruby
devbug has joined #ruby
freerobby has quit [Read error: No route to host]
freerobby1 has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
Channel6 has joined #ruby
jobewan has joined #ruby
edwinvdgraaf has joined #ruby
pecopeco has quit [Remote host closed the connection]
iloverubynoob has quit [Remote host closed the connection]
edwinvdg_ has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
polysics has quit [Ping timeout: 250 seconds]
sheperson has joined #ruby
tkuchiki has quit [Remote host closed the connection]
blackmes1 has joined #ruby
edwinvdgraaf has quit [Ping timeout: 244 seconds]
<tmtwd>
\join #atom
<sheperson>
I think that is /join
<sheperson>
:-)
<tmtwd>
yup
<[k-_>
how do you even...
<adaedra>
but you need the join package for that
alakra has joined #ruby
<Ox0dea>
/join #even
<adaedra>
[k-_: i think / and \ are close on some keyboards.
rippa has quit [Read error: Connection reset by peer]
<phreakocious>
another question, if I may.. is it possible to set the name of a thread that will appear in ps/top? $0 changes the main process and all threads show that.
devdazed has quit [Read error: Connection reset by peer]
bronson has joined #ruby
<phreakocious>
google has not been helpful
rippa has joined #ruby
Freijo has joined #ruby
<Ox0dea>
phreakocious: Does Process.setproctitle not suit your needs?
devdazed has joined #ruby
dfockler has joined #ruby
sickmate has quit [Ping timeout: 248 seconds]
edwinvdgraaf has joined #ruby
<adaedra>
ninja'd again
<phreakocious>
ah ruby 2.1 :( that might work, though
<Ox0dea>
phreakocious: If you're actually wanting to name your threads, Thread#name= went into Ruby 2.3 on June 13.
<havenwood>
phreakocious: Thread#name and Thread#name= will land in 2.3.
pecopeco has joined #ruby
iloverubynoob has joined #ruby
<adaedra>
it's no problem, since everyone is under ruby 2.2, no? O:)
<Ox0dea>
There are 33 non-control, non-alphanumeric ASCII characters. That's 1089 distinct pairs you could map to various things.
linuxboytoo has quit [Remote host closed the connection]
niemcu has joined #ruby
failshell has joined #ruby
failshell has quit [Remote host closed the connection]
<[k-_>
but i wouldn't be able to use them in a block to reduce verbosity
<Ox0dea>
Are you using _ for anything?
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-_>
no
astrobun_ has joined #ruby
<Ox0dea>
Make it a method on Kernel. :)
rapha has joined #ruby
<rapha>
Hi!
rbennacer has quit [Remote host closed the connection]
<[k-_>
ah
isxek has quit [Ping timeout: 246 seconds]
poguez_ has joined #ruby
<rapha>
Given {a => {x => [1, 2, 3], y => [1, 2]}, b => {x => [1], y => [1, 2, 3, 4]}}, is there any elegant way of counting the number of things inside all x's and y's? (i.e., x:4, y:6 in this case)
Marsupermammal has joined #ruby
l0oky has joined #ruby
<l0oky>
Hello.
bricker has joined #ruby
sharpmachine has quit [Remote host closed the connection]
<l0oky>
I have this hash process[:error] = [{:code=>"10415", :messages=>["Transaction refused because of an invalid argument. See additional error messages for details.", "A successful transaction has already been completed for this token."]}] How do I select the second message? I tried this process[:error][0][:messages][1]
saadq has quit [Remote host closed the connection]
<Ox0dea>
l0oky: That should work.
teotwaki has quit [Ping timeout: 246 seconds]
Scroff has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
ryba has quit [Ping timeout: 244 seconds]
<l0oky>
I get no implicit conversion of Symbol into Integer
<l0oky>
...
davejlong has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gagrio has quit [Ping timeout: 244 seconds]
nobitano_ has joined #ruby
<Ox0dea>
l0oky: Then you've provided insufficient information to diagnose your problem.
<l0oky>
I am using RoR so I want to pass the ex.message to a toast that means redirecting user with ex.message as a parameter
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
<l0oky>
Anyway I need to pass that datastucture throug..
pietr0 has joined #ruby
jwaldrip_ has joined #ruby
<havenwood>
rapha: That version ^ does work if there are more than two Hashes in the Array though. :)
Ilyas has joined #ruby
jwaldrip has quit [Ping timeout: 248 seconds]
<havenwood>
So that's nice if it might happen.
sshuff has quit [Quit: Leaving]
<havenwood>
?rails l0oky
<ruboto>
l0oky, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<l0oky>
havenwood: I am not talking about rubyonrails just plain ruby? not am I?
Casty has joined #ruby
<l0oky>
now*
RobertBirnie has joined #ruby
<havenwood>
l0oky: What's a toast?
dseitz has joined #ruby
shinnya has joined #ruby
<l0oky>
seriously?
wookiehangover has joined #ruby
gagrio has joined #ruby
bungoman has quit [Remote host closed the connection]
<l0oky>
It's like a popup If you ever seen a mac you should know what that is
tubuliferous_ has joined #ruby
<havenwood>
l0oky: Oh, gui terminology?
<l0oky>
yeah
<Ox0dea>
Just UI, really.
<havenwood>
l0oky: I assumed Rails had toast... :P
<Ox0dea>
You could totally have toasts in your terminal.
pecopeco has joined #ruby
iloverubynoob has joined #ruby
<havenwood>
ActiveToast
<l0oky>
nah, its my js messaging for user anyways we aren't talking about ror
astrobun_ has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
keeguon has quit [Quit: keeguon]
sharpmachine has joined #ruby
revath has quit [Ping timeout: 256 seconds]
<havenwood>
l0oky: Maybe I'm wrong to point to #RubyOnRails here then. Often there's a Rails way though.
diegoviola has joined #ruby
pietr0 has quit [Quit: pietr0]
<shevy>
most epic question today
<l0oky>
I always go to #RubyOnRails first though.. :)
<shevy>
<havenwood> l0oky: What's a toast?
<havenwood>
shevy: Hey, I'm just having coffee... I'm slow at the moment.
NeverDie has joined #ruby
<rapha>
havenwood: you mean as opposed to a solution with Hash#merge like 0x0dea suggested?
<Ox0dea>
rapha: He's using Hash#merge.
<l0oky>
shevy: RoR thing for my app If you want to know more we can talk about it at #RubyOnRails
<havenwood>
rapha: I showed what Ox0dea suggested, yeah.
tubuliferous_ has quit [Ping timeout: 264 seconds]
<havenwood>
rapha: Give that a try! :)
<rapha>
havenwood: nevermind, you do use merge :-P
baweaver has quit [Remote host closed the connection]
<rapha>
Ox0dea: sorry, didn't read properly at first!
Agoldfish has joined #ruby
<Ox0dea>
No worries.
<Ox0dea>
rapha: Are a and b distinct objects, or are they actually keys in a surrounding hash?
Rickmasta has quit [Ping timeout: 265 seconds]
<l0oky>
I am using a library that passes ex.message as a hash, but... It's a string to makes me troubles...
<Ox0dea>
l0oky: Which library is that, if you don't mind?
<rapha>
Ox0dea: the latter! Also for some reason havenwood's solution doesn't work right out of the box with my real-world object for some reason, trying to adapt it...
<l0oky>
paypal-reccurring gem
<Ox0dea>
rapha: havenwood's solution is for an array of hashes.
<havenwood>
shevy: Yeah, muting myself until two more cups consumed!
mikecmpbll has quit [Ping timeout: 246 seconds]
<Ox0dea>
l0oky: paypal-recurring returns that data structure from Response::Base#errors, but it's not setting it as the message of an exception anywhere.
cochise has quit [Read error: Connection reset by peer]
desigx has quit [Ping timeout: 246 seconds]
tvw has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
cochise has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<l0oky>
Ox0dea: What kid of exception does PaypalPayment.new(self).make_recurring return?
Igorshp has quit [Remote host closed the connection]
pengin has joined #ruby
Igorshp has joined #ruby
<rapha>
havenwood: wow, can't believe you actually pasted that hahahahhah :-P
<l0oky>
because the ex.message It's returning is a string not a hash ( As you've pointed out )
polysics_ has quit [Remote host closed the connection]
<Ox0dea>
l0oky: `grep -R PaypalPayment paypal-recurring-1.1.0` finds no such occurrences.
sharpmachine has quit [Remote host closed the connection]
<rapha>
shevy: or he needs *less* coffee ;)
BeepDog has left #ruby [#ruby]
<l0oky>
havenwood: Is that arabic? :D
stan has quit [Ping timeout: 246 seconds]
blackmes1 has quit [Ping timeout: 244 seconds]
Igorshp has quit [Read error: No route to host]
Igorshp has joined #ruby
<l0oky>
Ox0dea: whats grep?
<rapha>
l0oky: yeah, it's Arabic ... I'm doing some word frequency analysis.
<shevy>
grep finds strings in files
<shevy>
so he searches for a keyword there
happyface has quit [Quit: Connection closed for inactivity]
davejlong has joined #ruby
eggoez has quit [Ping timeout: 252 seconds]
<rapha>
havenwood: it returns wrong counts though ... strange.
<rapha>
havenwood: is it possible that I need one "h" for each of the roman numbers?
fgo has joined #ruby
<l0oky>
rapha: letter frequency analysis? cool!
davejlong has quit [Remote host closed the connection]
bodzio1 has quit [Quit: Leaving.]
<havenwood>
rapha: My stab at it was for the values from your initial example. Now that you've shown the real input, add a file to that gist with the return value you want to get.
<l0oky>
It's a bit different with arabic letters though, I guess. is it? You can say one thing in many ways.
cpruitt has left #ruby [#ruby]
howdoicomputer has joined #ruby
<rapha>
l0oky: words! not letters!
davejlong has joined #ruby
<havenwood>
l0oky: maybe some Persian words as well?
<rapha>
l0oky: well, you can do that in any language. it's just that arabic is especially bad. i'm lucky because my corpus is quite small (1400 words) so i can do a lot of things manually.
Igorshp has quit [Remote host closed the connection]
zacstewart has joined #ruby
bodzio has joined #ruby
<havenwood>
shevy: here I am talking after only one cup... but i'm being careful ;)
<rapha>
l0oky: actually, the bad thing is that a lot of words can mean many different things depending on context. that's what really kills you.
<l0oky>
rapha: It's a nightmare for developers I know that. But the language It self is beautiful
webopsx has joined #ruby
freerobby1 has quit [Quit: Leaving.]
momomomomo has joined #ruby
<hanmac>
shevy i did even more stuff for rwx, check it out ;P
<Ox0dea>
l0oky: Paypal::Recurring.new expects an options hash.
sharpmachine has quit [Ping timeout: 246 seconds]
jwaldrip_ has quit [Ping timeout: 255 seconds]
<rapha>
havenwood: yes, i see now ... the initial example input was wrong. let me play with your code some more, though, maybe i can figure out how it works.
<l0oky>
Ox0dea: Yes I pass options and do a .send(action)
edwinvdgraaf has quit [Remote host closed the connection]
<Ox0dea>
l0oky: Yes, that's how you get that data structure from earlier.
malconis has joined #ruby
<Ox0dea>
How does it end up in an exception message?
<rapha>
l0oky: actually, just handling arabic is actually quite okay these days if you know what you're doing. what is making people's heads spin is how to do natural language processing on it. the language is too polysemantic for that to be easy by even the most awful definition of easy.
edwinvdgraaf has joined #ruby
<l0oky>
I do a raise response.errors.inspect HAHAHAHAHHAHA
malconis has quit [Remote host closed the connection]
<rapha>
l0oky: and btw i'm using Ruby for my scripting because it's so awesome at handling Unicode ;)
<l0oky>
there lays a problem
<Ox0dea>
Aye, there it is.
jackjackdripper has joined #ruby
eggoez has joined #ruby
<l0oky>
Ox0dea: thanks ;)
<Ox0dea>
Sure thing.
malconis has joined #ruby
webopsx has quit [Client Quit]
<Ox0dea>
rapha: Except we still don't have named Unicode literals.
<rapha>
Ox0dea: seems like a pet peeve of yours ... when I google that term, your github repo gets the top hit! :)
<Ox0dea>
Fancy that.
lkba_ has quit [Ping timeout: 252 seconds]
pecopeco has quit []
iloverubynoob has quit [Quit: Leaving...]
<l0oky>
rapha: That's right haha. But that's why the language is so rich. If they make NLP for that language I guess they might just make a real AI with it haha
<rapha>
Ox0dea: (i do wonder, how many of these named literals do you know by heart :P)
plashchynski has quit [Quit: plashchynski]
niemcu has quit [Ping timeout: 244 seconds]
<Ox0dea>
rapha: There's a reasonably intuitive pattern to most of the groups.
desigx has joined #ruby
ryba has joined #ruby
<rapha>
l0oky: i wouldn't be at all surprised if serious development would come from that direction some day. arabic is very interesting also because some aspects of its grammar are almost mathematical. that means you can actually parse it relatively easily into a state where you can clearly assign a list of possible meanings to every part of speech.
graydot has joined #ruby
Muhannad has joined #ruby
Scroff has quit [Ping timeout: 240 seconds]
<l0oky>
rapha: Yeah you mean the assignment of numerical values for each letter, I researched that a bit :)
Violentr has quit [Ping timeout: 256 seconds]
chussenot has quit [Quit: chussenot]
Rickmasta has joined #ruby
icarus has quit [Read error: Connection reset by peer]
<l0oky>
rapha: I was planning to study arabic language next year, that's why I show so much interest in it hehe :)
Jackneill has joined #ruby
momomomomo has quit [Ping timeout: 248 seconds]
momomomomo has joined #ruby
fabrice31 has joined #ruby
<Ox0dea>
l0oky: Greek calls that "isopsephy", and Hebrew "Gematria"; what's it called in Arabic?
towski_ has joined #ruby
<Ox0dea>
Or is it not quite the same thing?
workmad3 has quit [Ping timeout: 244 seconds]
rbennacer has joined #ruby
eggoez has quit [Ping timeout: 248 seconds]
bubbys has quit [Ping timeout: 264 seconds]
chinmay_dd has quit [Quit: See ya!]
charliesome has joined #ruby
<rapha>
Ox0dea: does your project work for stuff like http://unicodelookup.com/#%D9%89/1? just uppercase the name and off you go?
<l0oky>
Ox0dea: Something like that. Abajad numberals
djbkd has joined #ruby
sharpmachine has joined #ruby
ixti has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
benlieb has quit [Quit: benlieb]
t0rrieri has quit [Quit: Be back later ...]
ndrei has joined #ruby
<Ox0dea>
rapha: Yes, that's right, although I had to make a few concessions regarding hyphens.
<rapha>
l0oky: nah, that's an old thing which we also had in most western languages. what i meant was that almost all arabic words are constructed by laying a pattern over three or four root radicals.
<Ox0dea>
kitab, katib, maktaba.
<rapha>
yeah, that
<Ox0dea>
"Root" is probably better than "radical" for that, I think.
<rapha>
wow, you guys know a lot more than the "so they teach you how to build bombs at university, mwahahahah" folks i usually meet :P
<l0oky>
lol
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aytch has joined #ruby
godzillaenlacasa has quit [Quit: ZZZZZ....]
<rapha>
Ox0dea: it's fixed terminology. the root is k-t-b with radical 1 being k, r2 t, r3 b.
blackmes1 has quit [Ping timeout: 246 seconds]
phreakocious has quit [Ping timeout: 264 seconds]
<rapha>
l0oky: if you wanna begin studying it at a university level, you're in for a wild ride!
retornam has quit [Ping timeout: 246 seconds]
<l0oky>
so If I were to pronouce your nickname it would be rpa?
tubuliferous_ has joined #ruby
<l0oky>
uh I know right
michael_mbp has quit [Ping timeout: 246 seconds]
RobertBirnie has quit [Ping timeout: 264 seconds]
<l0oky>
It is at a university level
drewdavis has quit [Quit: No Ping reply in 180 seconds.]
Antiarc has quit [Quit: No Ping reply in 180 seconds.]
doertedev has quit [Quit: Lost terminal]
<l0oky>
They don't require for you to know anything though
bmn has quit [Ping timeout: 246 seconds]
<l0oky>
from 0 to hero :D
devdazed has quit [Max SendQ exceeded]
rubie has quit [Remote host closed the connection]
aryaching has joined #ruby
PaulCapestany has quit [Max SendQ exceeded]
miah has quit [Ping timeout: 264 seconds]
<rapha>
l0oky: as the ph in my nickname is actually a single phoneme ("f") it would be r-ph (there are few 2-radical words, which are said to be the oldest words in arabic)
<l0oky>
rph
<[k-_>
so i have method = { method1: *blah*, method2: method[:method1] } and ruby cries
<l0oky>
yeah
<[k-_>
how shall i do this
<l0oky>
i figured
Hamled|Erp has quit [Ping timeout: 246 seconds]
devdazed has joined #ruby
papercode has quit [Ping timeout: 264 seconds]
Antiarc has joined #ruby
miah has joined #ruby
<Ox0dea>
[k-_: Well, what's *blah*?
Obfuscate has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
PaulCapestany has joined #ruby
phreakocious has joined #ruby
sivoais has quit [Ping timeout: 252 seconds]
Hamled has joined #ruby
retornam_ has joined #ruby
<Ox0dea>
Oh, never mind. You'll have to build the hash incrementally. :(
<l0oky>
object?
sivoais has joined #ruby
drewdavis has joined #ruby
<rapha>
l0oky: here, they give you 2 weeks per lesson and expect you to know everything afterwards. the bachelor is 3 years but it took me 5, and i'm one of the 30 out of 300 who didn't drop out... not sure how big the variation is from university to university.
papercode has joined #ruby
bmn_ has joined #ruby
<[k-_>
->_,*__,&___{____=__.shift;___=__.pop if (!block_given? and __.last.to_proc rescue false);_.public_send ____, *__, &___}
rubie has joined #ruby
davejlong has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
<l0oky>
Well I am not a native speaker I guess they'll go easier on me :P
retornam_ is now known as retornam
plashchynski has joined #ruby
<rapha>
l0oky: also note that short vowels are never radicals, only long vowels are. so the problem with a western nickname like "rapha" is that you can't know what vowels are long. the full name ("raphael") would have been easier: it's r-ph-l there.
gambl0re has quit [Read error: Connection reset by peer]
<[k-_>
oh, incrementally.
<[k-_>
thx Ox0dea :(
eggoez has joined #ruby
<rapha>
l0oky: i'm not a native speaker, either. it doesn't matter much, though. the native speakers have a hard time, too, because noone in the world is a native speaker of Modern Standard Arabic, they all speak one dialect or another.
<Ox0dea>
[k-_: That does seem like it shouldn't be so. :(
kies^ has quit [Ping timeout: 264 seconds]
<l0oky>
yeah dialects
<l0oky>
good point :D
jenksy has quit [Ping timeout: 246 seconds]
akkad has quit [Ping timeout: 246 seconds]
gambl0re has joined #ruby
aryaching has quit []
<Ox0dea>
>> proc { |hash| {a: -> x { x + 1}, b: hash[:a] } }[Hash.new] # [k-_
<Ox0dea>
Hash literals are constructed "in parallel".
<rapha>
l0oky: if you want one tip, decide on *one* dialect to specialise in as soon as you can and then stick to it and make sure you always know when you're in your dialect and when you're in MSA. the professors might tell you to stay away from dialects completely, but that's pure academic phantasy and has nothing to do with real life.
<Ox0dea>
rapha: PSO player?
wildroman2 has quit [Ping timeout: 264 seconds]
<rapha>
Ox0dea: since I don't know what that is, no.
<Ox0dea>
Ah, I thought "phantasy" might've been a slip.
rideh has quit [Quit: zap]
allcentury has quit [Ping timeout: 265 seconds]
ndrei has quit [Ping timeout: 264 seconds]
<l0oky>
rapha: Yeah, is there a big difference in dialects? Maybe some words are almost the same
benlieb has joined #ruby
akkad has joined #ruby
linuxboytoo has joined #ruby
<rapha>
Ox0dea: oh right! it's fantasy in English. it was a slip, but a different one ;)
<l0oky>
phantastic :D
allcentury has joined #ruby
aryaching has joined #ruby
aspiers has quit [Ping timeout: 244 seconds]
rideh has joined #ruby
xkef has quit [Ping timeout: 244 seconds]
charliesome has quit [Quit: zzz]
<hanmac>
l0oky: like in a country like germany you have many different dialects and sometimes they are such strong that two different cant understand each other ;P
whiteline has quit [Ping timeout: 248 seconds]
drewo has quit [Ping timeout: 255 seconds]
<rapha>
l0oky: "no problem" is a good example. MSA: "lā tūǧad muškile". Egyptian: "mā fīš muškila". Most Levantene dialects: "miš muškile". Most Gulf dialects: "mā muškila".
postmodern has quit [Quit: Leaving]
<rapha>
l0oky: of course, that
bubbys has joined #ruby
<rapha>
's nothing compared with the 100+ words for "lion"
momomomomo has quit [Quit: momomomomo]
<l0oky>
asd?
mike___1234 has quit [Ping timeout: 246 seconds]
<rapha>
asad
<rapha>
asd would again be the root
<rapha>
but that's just the most commonly used one
<l0oky>
assad
benlieb has quit [Client Quit]
<l0oky>
hahah
rideh has quit [Client Quit]
<rapha>
l0oky: did you know that the name of the guy's wife is really close to "chaos"?
<l0oky>
what?!
postmodern has joined #ruby
<l0oky>
hahah
drewo has joined #ruby
<rapha>
l0oky: "asma al-asad" ... chaos is "azma", just a softer s/z sound.
godzillaenlacasa has joined #ruby
<l0oky>
It might implicate a contrast where asma is completly different from azma ?
* hanmac
is voting for a president with the name "chaos" ... what chould go wrong? ;P
<l0oky>
So It's just the sound
<l0oky>
haha
<rapha>
l0oky: nah, it becomes more distinct once we write proper MSA transliteration. her name is "ʾasmāʾ", lit. "names", whereas "ʾazma" is a feminine noun built off the root ʾ-z-m. there's actually really little similarity here.
benlieb has joined #ruby
<rapha>
(just enough for it to have become some sort of running gag amongst arabists)
axl_ has quit [Ping timeout: 245 seconds]
<jhass>
rapha: l0oky: I think you might enjoy our offtopic channel #ruby-offtopic
<l0oky>
rapha: So what dialect is closest to root words? I guess beginners would start learning root words first then more complex dialects
LoBoGoL has quit [Ping timeout: 264 seconds]
<l0oky>
jhass: Yeah sorry
<l0oky>
a bit carried away :D
blackmes1 has joined #ruby
devbug has quit [Ping timeout: 256 seconds]
<rapha>
jhass: sorry
<l0oky>
rapha: nice to meet you anyways :P
<jhass>
don't be sorry, just join there!
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bungoman has joined #ruby
<l0oky>
jhass: We got the message? You don't need to be all steve jobs on me :P
<jhass>
you did, rapha I'm not so sure :P
rdark has quit [Ping timeout: 240 seconds]
davejlong has joined #ruby
Marsupermammal has joined #ruby
<rapha>
l0oky: every native speaker will tell you his own dialect is closest. the truth is they all have some elements close to it and some farther away. i'd recommend to make your decision based on the political situation to make it easier to visit. anyways, i'll shut up now so jhass doesn't get the /kick hammer out and also i need to keep working!
<[k-_>
i give up
<l0oky>
Yeah me too :P
astrobun_ has joined #ruby
<[k-_>
i watched sublime text rewind my whole progress
devbug has joined #ruby
<Ox0dea>
Vim would've saved you.
<[k-_>
im surprised it kept my whole history
<Ox0dea>
Oh.
<l0oky>
Ox0dea: Vim has a learning curve
<[k-_>
no, i purposely pressed cmd+z until it went back to the start of time
_dev0urer has joined #ruby
<l0oky>
I was afraid I would fall so I didn't use Vim :D
<Ox0dea>
[k-_: Looking for when you introduced some error, or?
astrobun_ has quit [Read error: Connection reset by peer]
<weaksauce>
l0oky the basics of vim are pretty easy to learn in a few minutes.
drewo has quit [Quit: WeeChat 0.4.2]
<weaksauce>
enough to get you competent enough to edit a basic file
Zai00 has quit [Quit: Zai00]
<[k-_>
i gave up on the approach and let sublime text destroy it!
quimrstorres has quit [Remote host closed the connection]
<[k-_>
i watched what i did on fast mode
bodzio has quit [Quit: Leaving.]
ryba has quit [Ping timeout: 252 seconds]
<l0oky>
weaksauce: yeah.. you're probablly right but I don't want to run it on glitchy cygwin :P
<l0oky>
If I ever get a mac I'll use it
bungoman has quit [Ping timeout: 260 seconds]
skade has joined #ruby
mikecmpbll has joined #ruby
<weaksauce>
i imagine they have a vim dist that runs on windows. not nearly as good a gui as macvim though.
atomi has quit [Quit: adding ca certificates to my container brb]
blaines has joined #ruby
mike___1234 has joined #ruby
bungoman has joined #ruby
<weaksauce>
sublime is pretty good too though. emacs with evil mode might be a good option
whiteline has joined #ruby
<[k-_>
--terminated from history--
Obfuscate has joined #ruby
<[k-_>
i even created a new branch ._.
troulouliou_div2 has joined #ruby
<[k-_>
if only there was an easy way of doing things
atomi has joined #ruby
<[k-_>
i totally lost motivation :(
<jhass>
[k-_: do something nice instead then :P
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
MagePsycho has joined #ruby
<l0oky>
[k-_: I feel you :(
<[k-_>
i lost motivation for ruby
<l0oky>
ruby?!
<l0oky>
I recommend RubyMine then :P
<shevy>
[k-_ you must create useful projects!
Violentr has joined #ruby
<l0oky>
jetbrains IDE I use to be productive
jottr_ has joined #ruby
<[k-_>
i dont need an ide for ruby
i-blis has quit [Quit: Leaving.]
<l0oky>
Yeah It's clear you haven't tried this one :P
<grill>
what does someword::init_gem node mean?
dfinninger has quit [Read error: Connection reset by peer]
astrobun_ has quit [Read error: Connection reset by peer]
<shevy>
grill what you write below that, is part of its namespace. module Foo; def bar <--- there is a method called bar residing as part of Foo
MasterPiece has joined #ruby
<grill>
ok. so modules are synonymous with namespaces?
<l0oky>
I get `exception class/object expected`...
<shevy>
grill and classes
<grill>
so classes are namespaces?
<shevy>
you could also use class Foo; class Bar
<rapha>
havenwood: okay, I think I found the shortest possible solution: counts={};stems.each {|k1,v1| counts[k1]={}; v1.each {|k2,v2| counts[k1][k2]=v2.count}}; counts.values.inject(Hash.new(0)) {|total,h| h.each {|k,v| total[k] += v}; total}
<l0oky>
If I do raise response.errors if response.errors.present? where response = PayPal::Recurring.new(options).send(action)
lkba_ has joined #ruby
<grill>
ok
<rapha>
havenwood: (stems contains the hash which i gist'd earlier)
<shevy>
there really isn't much more to them. Foo::Bar::name_here_of_anything - that's it really
astrobun_ has joined #ruby
pietr0 has joined #ruby
<havenwood>
rapha: Nice, a solution! But that's not the shortest possible solution. :)
<grill>
so, what is this then: Scn::init_gem node
<grill>
Scn looks like a namespace
<shevy>
looks like a fancy and ugly way to invoke the init_gem() method
<shevy>
it is a constant
troulouliou_div2 has quit [Remote host closed the connection]
sarkyniin has quit [Ping timeout: 244 seconds]
<grill>
perhaps init_gem() is overriden? can you do that in ruby?
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<l0oky>
Ox0dea: remember that exception from paypal_recurring gem? if I `raise response.errors` where `response = PayPal::Recurring.new(options).send(action)` I get exception class/object expected
atomical_ has joined #ruby
TheNet has joined #ruby
<Ox0dea>
>> raise Hash.new
<ruboto>
Ox0dea # => exception class/object expected (TypeError) ...check link for more (https://eval.in/400239)
pietr0_ has joined #ruby
<Ox0dea>
l0oky: Why're you raising a Hash?
jackjackdripper has quit [Quit: Leaving.]
<l0oky>
is that what exception is made of?
dfinninger has joined #ruby
bungoman_ has joined #ruby
bruno- has joined #ruby
<l0oky>
hmm
<Ox0dea>
Well, response.errors is an array of Hashes, but the point stands.
<rapha>
havenwood: here's the whole gist again ... what i like about this solution is the interim result (see https://gist.github.com/sixtyfive/dab7daf5cfcd34c3d641 again) ... i don't think it can be made shorter than this without sacrificing that interim result.
atomical has quit [Ping timeout: 248 seconds]
lkba has quit [Ping timeout: 264 seconds]
<l0oky>
How can I make an exception that passes a hash?
<Ox0dea>
Don't.
<shevy>
can't you raise stuff?
<jhass>
l0oky: make your own subclass that supports it. But I would strongly, very strongly encourage you not to
<rapha>
havenwood: about the second part, what i don't get is the h1, h2 designation. the hash that goes into it actually consists of three parts in the case of my data, but that's not what you mean, is it?
<havenwood>
Ox0dea: Ah, I see what you mean. But still underscore. :P
<l0oky>
while true
<jhass>
TeresaP: use an as specific glob pattern as possible (*_* comes to mind) and then .select { } down the result set by any means necessary (like with a regex passed to .match)
<havenwood>
rapha: The inject goes between each and does the thing
<l0oky>
>> puts 'yeah' while true
<ruboto>
l0oky, I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
gambl0re has joined #ruby
<l0oky>
muhahahaha
<Ox0dea>
?experiment l0oky
<ruboto>
l0oky, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
<havenwood>
rapha: Name variables descriptive things that will make sense to readers.
Siyfion has quit [Client Quit]
<havenwood>
rapha: Concise is good but cryptic is bad.
<jhass>
rapha: readers = you in the future
<l0oky>
(Remote host closed the connection)
<havenwood>
which then further in the future will be you in the past
<havenwood>
so think of future past you having just read it
LoBoGoL has joined #ruby
<ljarvis>
...
<ljarvis>
that alone is cryptic
<Ox0dea>
> Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.
<[k-_>
Ox0dea should provide his inp--
hfp_work has quit [Ping timeout: 240 seconds]
<adaedra>
This reminds me, Ox0dea, I have some code review to do.
leat3 has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
leat3 has joined #ruby
blackmes1 has joined #ruby
<l0oky>
[k-_: It's inp__
<l0oky>
:D
<havenwood>
ljarvis: past me that wrote it was hoping for a chuckle from future me, but alas I'm not amused
<rapha>
havenwood, jhass: yeah, i've already learned that. in this special case i have the problem that it would be good if the whole script could fit onto one A4 page.
<Ox0dea>
What year is it?
<[k-_>
im sticking with --, whatever __ is
hfp has quit [Ping timeout: 244 seconds]
<jhass>
rapha: use a smaller font
<havenwood>
Ox0dea: Boomtime, the 51st day of Confusion in the YOLD 3181
<rapha>
jhass: it's already as small as it can be!
<ruboto>
l0oky # => undefined method `seconds' for 2015-07-16 18:29:23 +0000:Time (NoMethodError) ...check link for more (https://eval.in/400251)
<jhass>
rapha: sounds like you can still read it
casadei_ has joined #ruby
<l0oky>
Why do I always get errors :(
<jhass>
?pry l0oky
<ruboto>
l0oky, 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` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
krz has quit [Quit: WeeChat 1.0.1]
astrobun_ has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 248 seconds]
<ljarvis>
that's basically the pry readme right there
<jhass>
and we didn't even copy paste it!
<l0oky>
haha
astrobun_ has joined #ruby
<Ox0dea>
havenwood: Are you a Discordianist?
<rapha>
wow! pry pages by default! already loving it!!
xkef has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
polysics has joined #ruby
<havenwood>
Ox0dea: In the sense that "All affirmations are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense."
schaerli has joined #ruby
<jhass>
mmh, reminds me, still need to buy hotdogs for tomorrow
<bricker>
I have a CS question.... I have query (A) that loads a bunch of data, and another query (B) that loads associated data. No matter how big or small query A is, query B will always take rougly the same amount of time. What do you call this?
Macaveli has joined #ruby
BTRE has joined #ruby
astrobu__ has joined #ruby
<bricker>
Some representation of O(log n) but I'm not super familiar with that
leat3 has quit [Remote host closed the connection]
<bricker>
I'm not sure, I assumed there was a simple answer to the question
<havenwood>
bricker: Dunno, I need to learn more about various notations.
baweaver has quit [Remote host closed the connection]
lessless has joined #ruby
peter_paule has quit [Ping timeout: 246 seconds]
<Mon_Ouie>
#blank? always feels to me like it encourages not handling bugs early and silently ignoring getting nil when you're not supposed to --- nil, the empty string and the empty array are completely different things
<Mon_Ouie>
(well, "an" empty array/string)
<l0oky>
.empty?
<ljarvis>
ugh no dont put blank? into core
hfp_work has quit [Ping timeout: 240 seconds]
hfp has quit [Excess Flood]
hfp has joined #ruby
hfp_work has joined #ruby
momomomomo_ has joined #ruby
zata has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
momomomomo has quit [Ping timeout: 264 seconds]
momomomomo_ is now known as momomomomo
zata has joined #ruby
phutchins has quit [Ping timeout: 248 seconds]
Kirklander has joined #ruby
jhack has quit [Ping timeout: 265 seconds]
schaerli has quit [Remote host closed the connection]
<TeresaP>
Is Zippy recommended over Rubyzip for creating archives?
<zrowe007>
I'm having trouble connecting to an MSSQL server using TinyTds::Client.new, but I can connect on the command line using tsql
LoBoGoL has joined #ruby
fabrice31 has quit [Ping timeout: 255 seconds]
wordsarewind has joined #ruby
krz has joined #ruby
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has quit [Remote host closed the connection]
wordsarewind has left #ruby ["WeeChat 1.2"]
zz_Outlastsheep is now known as Outlastsheep
baweaver has joined #ruby
pietr0 has quit [Quit: pietr0]
Pupeno has joined #ruby
xkickflip has quit [Quit: xkickflip]
Pupeno has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
Igorshp has quit [Remote host closed the connection]
peter_paule has joined #ruby
dling` has quit []
atomical has joined #ruby
Stratege has joined #ruby
ruurd has joined #ruby
kirun has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
xkef has joined #ruby
<TeresaP>
What is the recommended zip mechanism?
scripore has joined #ruby
zenguy_pc has joined #ruby
<ruurd>
TeresaP sorry?
einarj has joined #ruby
<TeresaP>
ruurd what gem would you recommend to assist in zipping files
TvL2386 has quit [Quit: Ex-Chat]
<ruurd>
Oh. Aha.
vickleton has joined #ruby
dling has joined #ruby
<TeresaP>
I found a few places that recommended Zippy but the documentation is not great
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruurd>
There is also one called rubyzip
<TeresaP>
Yeah, I might just use that even though it is supposedly less abstracted
<ruurd>
but using system to invoke zip should also work
<TeresaP>
Isn't that kindof frowned upon?
abuzze_ has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xkickflip has joined #ruby
peter_paule has quit [Ping timeout: 256 seconds]
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby
Muhannad has quit [Ping timeout: 246 seconds]
<shevy>
why
<shevy>
it works!
ruurd has quit [Quit: ZZZzzz…]
abuzze has joined #ruby
<TeresaP>
I don't remember the reason, but I seem to remember someone in here was very anti-system calls :)
serivich has joined #ruby
ruurd has joined #ruby
<ruurd>
You might want to be careful doing that yes. It's not exactly portable really
<l0oky>
If I have only one line in a method does that mean method returns that line?
casadei_ has quit [Remote host closed the connection]
ruby-prudi has joined #ruby
<ruurd>
No. The result of that line maybe. Or nil if it does not return anything.
rbennace_ has joined #ruby
<l0oky>
maybe?
<ruurd>
You know - that kind of questions you can answer yourself by just trying it out in irb.
Vols has joined #ruby
Alayde has joined #ruby
frem has joined #ruby
rbennacer has quit [Ping timeout: 240 seconds]
t0rrieri has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
radialneon has quit [Ping timeout: 246 seconds]
<ruurd>
$ irb
<ruurd>
2.2.2 :001 > puts 'foo'
<ruurd>
foo
<ruurd>
=> nil
<ruurd>
2.2.2 :002 >
<ruby-prudi>
Hello! Why in Ruby is better to define an array of string with %w( ... ) instead of ["..", "..", ..] ?? Thanks!!
Casty has joined #ruby
<jhass>
ruby-prudi: because you have to type less " and ,
edwinvdgraaf has quit [Remote host closed the connection]
speaking2ode has joined #ruby
hfp_work has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
edwinvdgraaf has joined #ruby
linuxboytoo has quit [Ping timeout: 250 seconds]
y0da has quit [Ping timeout: 264 seconds]
zata has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
skade has joined #ruby
<zrowe007>
I'm trying to connect to an MSSQL server using tinytds, and I can on the console using tsql, but not using tinytds in a ruby script, i just get "Adaptive Server connection failed" My script and log output is here: https://gist.github.com/zr2d2/6b26a5d3f8e4a1ff4727
mesamoo has quit [Quit: Konversation terminated!]
speaking1ode has quit [Ping timeout: 260 seconds]
zata has joined #ruby
SCHAAP137 has joined #ruby
roolo has joined #ruby
jottr_ has joined #ruby
Pupeno has joined #ruby
atomical has joined #ruby
<l0oky>
Will .empty? check for nil ?
<Mon_Ouie>
>> nil.empty?
<ruboto>
Mon_Ouie # => undefined method `empty?' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/400274)
tmtwd has joined #ruby
desigx has quit [Ping timeout: 246 seconds]
Pupeno has quit [Remote host closed the connection]
codecop has quit [Quit: Išeinu]
ramfjord has quit [Ping timeout: 250 seconds]
dfinninger has quit [Remote host closed the connection]
<Karunamon>
am I right in understanding that, generally, if you're repeating yourself, you're probably doing something either the wrong way or harder than it ought to be?
AlexRussia has joined #ruby
ESpiney has quit [Quit: Leaving]
tvw has quit [Remote host closed the connection]
AlexRussia has joined #ruby
baweaver has joined #ruby
bronson has quit [Remote host closed the connection]
but3k4 has joined #ruby
<shevy>
anyone happens to know if there is a standalone project that will only generate an up-to-date skeleton for a ruby project?
<Aria>
I think there's a tension between repeating yourself and coupling.
<Aria>
But if you get to the point of 'this is tedious and I wouldn't notice a mistake" ... you've crossed far into 'this should be automated' territory.
JoshL has quit []
hanmac has joined #ruby
blueOxigen has joined #ruby
dblessing has quit [Ping timeout: 265 seconds]
baweaver has quit [Ping timeout: 256 seconds]
bluOxigen has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
djbkd has quit [Remote host closed the connection]
nettoweb has joined #ruby
Ilyas has quit [Quit: Leaving]
WildBamboo-Josh has joined #ruby
SaintMoriarty has joined #ruby
ramfjord has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<bricker>
I think I know the answer but want some confirmation, is Array#uniq with a block guaranteed to retain the first occurrence of the object?
ruurd has joined #ruby
jenrzzz has joined #ruby
saadq has joined #ruby
nettoweb_ has quit [Ping timeout: 260 seconds]
davejlong has joined #ruby
<Radar>
shevy: "skeleton"?
<Radar>
shevy:
<Radar>
"bundle gem" is all I can think of
hfp_work has quit [Ping timeout: 265 seconds]
hfp has quit [Ping timeout: 244 seconds]
cpruitt has joined #ruby
l0oky has quit [Read error: Connection reset by peer]
douglasssss has quit [Quit: Leaving]
<Radar>
Karunamon: Subjective.
<Radar>
bricker: example?
<bricker>
Radar: If I have ["a
<bricker>
shit
LoBoGoL has quit [Ping timeout: 260 seconds]
Ox0dea has joined #ruby
<Ox0dea>
bricker: #uniq is implemented internally using a hash table, and Ruby's hashes maintain insertion order.
Lucky_ has quit [Read error: Connection reset by peer]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nofxx has quit [Read error: Connection reset by peer]
kullsputra has joined #ruby
<Kalov>
yes i think so
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
bungoman has quit [Remote host closed the connection]
ryba has joined #ruby
genpaku has quit [Ping timeout: 255 seconds]
<ruurd>
OK what happens if you enter irb on the command line?
zata has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has joined #ruby
jaequery has joined #ruby
yokel has quit [Ping timeout: 246 seconds]
mfranzwa has left #ruby [#ruby]
<adaedra>
be careful that depending on your windows install, you may have a special shortcut for Ruby-enabled shell.
howdoicomputer has quit [Ping timeout: 240 seconds]
linuxboytoo has joined #ruby
whippythellama has quit [Quit: WeeChat 1.2]
cpruitt has joined #ruby
graydot has joined #ruby
ohaibbq has joined #ruby
devdazed has quit [Ping timeout: 264 seconds]
LoBoGoL has quit [Ping timeout: 244 seconds]
cpruitt has quit [Client Quit]
_solomon has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
<Kalov>
i am not sure really sure how to, i downloaded and installed an .exe "ruby 2.2.2"
Kully3xf has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
yokel has joined #ruby
decoponio has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
vickleton has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
njs126 has quit [Quit: Leaving]
baweaver has quit [Remote host closed the connection]
_solomon has quit [Client Quit]
baweaver has joined #ruby
duoi has joined #ruby
baweaver_ has joined #ruby
baweaver has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
<havenwood>
Kalov: There are multiple ways to install Ruby on Windows but a popular option is RubyInstaller for Windows. You can check that you have the version you expect from your command line with `ruby -v`.
pietr0 has joined #ruby
dblessing has quit [Ping timeout: 240 seconds]
Carnage\ has joined #ruby
s00pcan has quit [Ping timeout: 256 seconds]
baweaver_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 246 seconds]
s00pcan has joined #ruby
<ruurd>
Kalov if I were you I'd run away from Windows real fast if you want to do any Ruby stuff... It's a menace.
casadei_ has joined #ruby
Rollabunna has quit [Ping timeout: 264 seconds]
<hal_9000_>
trying redcarpet for first time — can’t get simple list to work --
LoBoGoL has joined #ruby
<Guest87318>
hi I'm testing a method that takes a block: specify { expect { |b| m_array.tk_each(&b) }.to yield_successive_args([]) }
dopie has quit [Quit: This computer has gone to sleep]
<hal_9000_>
2.1.0 :001 > text = "This is a list:\n* first\n* second\n"
<hal_9000_>
2.1.0 :002 > out = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new).render(text)
<hal_9000_>
=> "<p>This is a list:\n* first\n* second</p>\n" # Can someone explain?
centrx has joined #ruby
<Guest87318>
hal_9000 doesn't readcarpet render html from a string? So it's automatically putting your text into paragraphs
TheNet has quit [Remote host closed the connection]
xkickflip has joined #ruby
Guest87318 is now known as JimmytheHat
<hal_9000_>
well… there are newlines in there. i thought it would honor them
<apeiros>
hal_9000_: add an empty line between the list and the text before
djbkd has quit [Remote host closed the connection]
thiagovsk has quit [Quit: Connection closed for inactivity]
Musashi007 has quit [Quit: Musashi007]
<JimmytheHat>
Ox0dea just learning, but I feel it would be nice to spec each yield value separately? all my values, all my counts and more for more complex yields. Is it possible? By 'explicitly indexing' do you mean I'd no longer be testing the order of my yield values?
Carnage\ has quit []
speaking2ode has quit [Ping timeout: 246 seconds]
tkuchiki has quit [Ping timeout: 265 seconds]
<Ox0dea>
JimmytheHat: Explicitly indexing means you're testing that Enumerator#[] works, not #my_each.
crunk_bear has joined #ruby
willywos has quit [Ping timeout: 265 seconds]
<JimmytheHat>
Oxodea you mean I shouldn't bother testing count?
freerobby has joined #ruby
ruurd has joined #ruby
<Ox0dea>
JimmytheHat: Your #my_each is just a re-implementation of #each, yes?
Papierkorb has joined #ruby
dfinninger has quit [Remote host closed the connection]
EllisTAA has quit [Quit: EllisTAA]
<JimmytheHat>
Ox0dea ah no it's just an example, it doesn't even exist. Let's just pretend that I do just want to really test my count returns 0,1,2 how could I do that in one expectation? One expectation for each yield value, if possible.
<JimmytheHat>
it's an rspec-style simple example :P
<JimmytheHat>
rspec-docs style
Rickmasta has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
<Ox0dea>
JimmytheHat: I suppose you could try `expect { array.my_each(&b).enum_for(:last) }`.
EllisTAA has joined #ruby
<JimmytheHat>
Ox0dea ah yes that might do it thanks a lot
<Ox0dea>
Sure thing.
radialneon has quit [Ping timeout: 240 seconds]
eggoez has quit [Ping timeout: 252 seconds]
jhack has quit [Remote host closed the connection]
scripore has joined #ruby
Musashi007 has quit [Client Quit]
jobewan has quit [Quit: Leaving]
xkickflip has joined #ruby
EllisTAA has quit [Client Quit]
t_ has joined #ruby
_dev0urer has quit [Quit: leaving]
rubie has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
jerius has joined #ruby
Zai00 has quit [Quit: Zai00]
swgillespie has joined #ruby
slumos[away] is now known as slumos
yqt has joined #ruby
graydot has quit [Quit: graydot]
fallen_ has quit [Read error: Connection reset by peer]
allcentury has joined #ruby
Timba-as has quit [Quit: Be back later ...]
gambl0re has quit [Ping timeout: 256 seconds]
malconis has joined #ruby
allomov has quit [Remote host closed the connection]
<zrowe007>
I'm trying to use tinyTDS, but keep getting an 'Adaptive Server connection failed' error in irb, and also through the interpreter tds_version=>5, even though i passed in tds_version: '70'
SaintMoriarty has joined #ruby
SaintMoriarty has quit [Remote host closed the connection]
<zrowe007>
could that be a printing error
EllisTAA has joined #ruby
lxsameer has quit [Quit: Leaving]
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aphprentice has joined #ruby
eggoez has joined #ruby
mandarinkin has quit [Quit: Leaving]
benlieb has quit [Quit: benlieb]
Rollabunna has joined #ruby
allomov has joined #ruby
EllisTAA has quit [Client Quit]
<centrx>
zrowe007, Why does the error have to be caused by the version?
graydot has joined #ruby
roolo has quit [Remote host closed the connection]
hj2007 has quit [Quit: This computer has gone to sleep]
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby
roolo has quit [Ping timeout: 244 seconds]
icebourg has quit []
dimasg has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
alvaro_o has quit [Quit: Ex-Chat]
fallen_ has joined #ruby
<centrx>
zrowe007, does it want 71 instead of 70?
benlieb has joined #ruby
<centrx>
zrowe007, Are you able to use that dpa.USNG2 database from the command-line? Maybe the DB is supposed to be just 'USNG2' excluding the schema?