deric_skibotn has quit [Ping timeout: 246 seconds]
sevvie has quit [Ping timeout: 245 seconds]
tlarevo has joined #ruby
tlarevo_ has joined #ruby
hpoydar has joined #ruby
sevvie has joined #ruby
tlarevo has quit [Ping timeout: 264 seconds]
karmatr0n has joined #ruby
aiguu has joined #ruby
hpoydar has quit [Ping timeout: 265 seconds]
bruno- has quit [Ping timeout: 245 seconds]
jack_rabbit has joined #ruby
Wolland has joined #ruby
ismaelga has joined #ruby
<morenoh149>
weaksauce: thanks
tkuchiki has quit [Quit: Leaving...]
tkuchiki has joined #ruby
Wolland_ has joined #ruby
<Musashi007>
@shevy thanks
Wolland has quit [Ping timeout: 252 seconds]
nii236 has joined #ruby
adamski2600 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<morenoh149>
I'm following the docs here http://devdocs.io/ruby/openuri is there anyway to parse the entire response |f| instead of consuming it line by line?
<morenoh149>
I'd like a single string |f| to run a regex against
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Deele has quit [Ping timeout: 256 seconds]
fumk has quit [Remote host closed the connection]
fumk has joined #ruby
freerobby has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
anaeem1 has joined #ruby
anaeem1 has quit [Ping timeout: 264 seconds]
sngeth has joined #ruby
ruby119 has joined #ruby
<ruby119>
.
ruby119 has quit [Client Quit]
ruby318 has joined #ruby
<ruby318>
.
ruby318 has quit [Client Quit]
AnxiousGarlic has quit [Read error: Connection reset by peer]
<bricker>
.
<bonhoeffer>
anyone have recommended permissions for /usr/local/rvm
sngeth has quit [Ping timeout: 264 seconds]
Wolland_ has quit []
freerobby has quit [Quit: Leaving.]
riotjones has joined #ruby
psy_ has quit [Ping timeout: 264 seconds]
wallerdev has quit [Quit: wallerdev]
sinkensabe has joined #ruby
<jhass>
morenoh149: just do body = open(url, &:read)
<bricker>
bonhoeffer: 755 would probably be adequate
jgt1 has quit [Ping timeout: 272 seconds]
<bricker>
assuming that's where rubies and gems will be installed?
<bonhoeffer>
thanks bricker
centrx has quit [Quit: Shutting down, Please wait...]
<jhass>
bonhoeffer: no offense, but I don't think a global RVM install will work out for you if you have to ask that question, it's pretty fragile and know what you're doing kind of stuff
riotjones has quit [Ping timeout: 245 seconds]
<bonhoeffer>
jhass: so you would recommend a local install
ghostpl_ has quit [Remote host closed the connection]
beef-wellington has quit [Ping timeout: 272 seconds]
justin_pdx has quit [Quit: justin_pdx]
sevvie has quit [Ping timeout: 246 seconds]
milesmatthias has quit [Ping timeout: 256 seconds]
thinkswan has quit [Remote host closed the connection]
sevvie has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
lemur has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
ramfjord has joined #ruby
chipotle_ has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Cat_1 has joined #ruby
chipotle has quit [Ping timeout: 265 seconds]
Nanuq has quit [Ping timeout: 272 seconds]
juanpablo_ has joined #ruby
<Nilium>
I wonder if Python 3.x is still having adoption issues
fuzzyhorns2 has quit [Ping timeout: 252 seconds]
serivich has joined #ruby
swgillespie has joined #ruby
juanpablo_ has quit [Ping timeout: 244 seconds]
sevenseacat has joined #ruby
maximski_ has quit []
jerematic has joined #ruby
Nanuq has joined #ruby
psy_ has joined #ruby
agrinb has joined #ruby
maletor has joined #ruby
psy_ has quit [Max SendQ exceeded]
jerematic has quit [Ping timeout: 264 seconds]
twilling has quit [Quit: twilling]
martinbmadsen has joined #ruby
psy_ has joined #ruby
Lewix has joined #ruby
Lewix has joined #ruby
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
nii236 has quit [Ping timeout: 255 seconds]
Lewix has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
RegulationD has joined #ruby
amclain_ has joined #ruby
xxneolithicxx has quit [Ping timeout: 245 seconds]
amclain has quit [Ping timeout: 245 seconds]
latemus has joined #ruby
<Musashi007>
@jhass is a global rvm what you get with a standard install?
zorak8 has quit [Read error: Connection reset by peer]
Roa_ has joined #ruby
<latemus>
Hi everyone! I'm having some trouble with assignment from a method i think? is there something malformed about this '@template.riqn = SecureRandom.uuid'
RegulationD has quit [Ping timeout: 255 seconds]
zorak8 has joined #ruby
<sevenseacat>
riqn is a model, SecureRandom.uuid is a uuid
<sevenseacat>
theyre not compatible objects
Roa has quit [Remote host closed the connection]
<latemus>
sevenseacat: How do i go about converting a uuid into a storage object?
<latemus>
sorry -- storable object
<sevenseacat>
you don't. you're fundamentally doing something wrong. what does your riqn model look like
<latemus>
it has the following attributes name:string template_id:integer utemplate_id:integer instance_id:integer
<sevenseacat>
so which one do you want the SecureRandom.uuid to be
<latemus>
name
<sevenseacat>
so assign it to the riqn.name
<sevenseacat>
not the riqn itself
<latemus>
Oh.. i see what you mean
serivich has quit [Ping timeout: 272 seconds]
<latemus>
I'm trying to assign to the wrong level
<latemus>
i thought you meant that SecureRandom output into some kind of incompatible datatype..
<latemus>
Thanks sevenseacat
<sevenseacat>
yw
braincrash has quit [Quit: bye bye]
bonhoeffer has quit [Quit: bonhoeffer]
<latemus>
Will I need to instantiate @template.riqn.name beyond '@template.build_riqn' in the 'new' mehtod?
sinkensabe has joined #ruby
<sevenseacat>
no.
<latemus>
k
RegulationD has joined #ruby
Vile` has quit [Ping timeout: 256 seconds]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
braincrash has joined #ruby
charliesome has quit [Quit: zzz]
serivich has joined #ruby
Vile` has joined #ruby
sinkensabe has quit [Ping timeout: 246 seconds]
Sawbones has quit [Remote host closed the connection]
<bricker>
this is a little obfuscated so I know there are other ways to get the same result, but just between those two options which would you choose?
ghostpl_ has quit [Ping timeout: 255 seconds]
thinkswan has quit [Ping timeout: 264 seconds]
icebourg has quit []
longfeet has joined #ruby
nii236 has joined #ruby
agrinb has quit [Read error: Connection reset by peer]
Sawbones has quit [Ping timeout: 264 seconds]
mroach has joined #ruby
agrinb has joined #ruby
jasabella has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby
AlphaTech has quit [Quit: Connection closed for inactivity]
agrinb has quit [Remote host closed the connection]
swgillespie has joined #ruby
AlexRussia has quit [Ping timeout: 264 seconds]
swgillespie has quit [Client Quit]
swgillespie has joined #ruby
Mon_Ouie has joined #ruby
flyingcode has joined #ruby
KC9YDN has joined #ruby
dfinninger has quit [Remote host closed the connection]
sivsushruth has quit [Ping timeout: 252 seconds]
KC9YDN has quit [Changing host]
KC9YDN has joined #ruby
sivsushruth has joined #ruby
<flyingcode>
hey, in what case would I use Ruby over NodeJS?
<havenwood>
flyingcode: If you were programming.
<sevenseacat>
lol
JohnBat26 has joined #ruby
<flyingcode>
hahahahaha
swgillespie has quit [Client Quit]
<flyingcode>
seriously though
<flyingcode>
Node is faster than Ruby so why would I use Ruby?
<sevenseacat>
because speed isnt the only thing that matters
<Nilium>
..
<Nilium>
Good god fuck node.js
<flyingcode>
okay, so developing in Ruby is faster?
<Nilium>
I've been having the least amount of fun unfucking the various node.js programs people wrote at my company
<sevenseacat>
i think you're comparing apples and chocolate
<Nilium>
What do you want to do?
Guest1097 has quit [Ping timeout: 255 seconds]
<flyingcode>
I want to make a web app
<sevenseacat>
theyre both programming languages, but thats about it
<Nilium>
Ok, use neither.
<flyingcode>
:O
<flyingcode>
well, then use what?
<Nilium>
I don't know, Go or Scala or something where your code is actually typed.
<Nilium>
You shouldn't write anything large in a dynamically typed, interpreted language. It's a maintenance disaster.
<Nilium>
I should know, I'm fixing the godawful decisions web devs make on a daily basis
<flyingcode>
I see...
<sevenseacat>
i'd like to think i only make bad decisions due to bad management process, but likely not.
<Nilium>
You ever wanted to open someone else's code and not know what the hell a variable was used for? That's node.js and Ruby.
ItSANgo has quit [Quit: Leaving...]
<flyingcode>
the same can be done in Scala as well, can it not?
<Nilium>
A plural variable name could be a dictionary, a set, a map-like structure, an array, a bitset, who knows, you certainly don't
<Nilium>
No.
<Nilium>
Scala is strongly, statically typed.
<Nilium>
You look at a variable, that variable has a type somewhere. You know what it is, unless you're doing something weird.
<Nilium>
Like, I don't know, compiler plugins.
<flyingcode>
but I think that would slow down my development speed
<Nilium>
I don't think it would.
swgillespie has joined #ruby
longfeet has quit [Ping timeout: 272 seconds]
Lewix has quit [Remote host closed the connection]
<Nilium>
I think it would increase it because you don't need to spend as much time on boilerplate type checking, making notes about the type of everything (if you're not doing this, you're digging your own grave), and so on
The_Phoenix has joined #ruby
zorak8 has quit [Ping timeout: 245 seconds]
<Nilium>
You basically end up with code that you are confident is correct because the compile can tell you that everything meshes
* sevenseacat
blows up with a RuntimeError
<Nilium>
*the compiler
<Diabolik>
Nilium what about mutant testing in ruby?
<Nilium>
More code you won't understand.
<Diabolik>
ok
<Nilium>
I mean, you'll understand it for the first week-ish that you wrote it
<Nilium>
But the tendency among Javascript and Ruby programmers to, uh, abuse the language in really horrifying ways lends itself to being pretty sure you were high when you wrote some past bit of code.
<Nilium>
Like the whole DSL thing in Ruby, for example.
rkgudboy has quit [Ping timeout: 265 seconds]
<sevenseacat>
methinks Nilium is a bit jaded.
<Nilium>
Methinks I've seen the crap node.js and certain Ruby people do ಠ_ಠ
<Nilium>
And I'm not impressed.
<Musashi007>
people make bad code?
<Musashi007>
the hell you say!
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Diabolik>
sevenseacat do you have any experience with the factory girl gem?
<chridal>
is Ruby 2.2.1 bugged? Is that it? In that case I should probably not be using it in production.
<chridal>
But according to ruby-lang.org 2.2.1 is stable
roolo_ has joined #ruby
<shevy>
why would it be bugged
<shevy>
just because you get some random error message from some random gem there
<apeiros>
chridal: no. the warning means what it says - that the parser library you use might not fully support the ruby version you're using
<apeiros>
and the "not released yet" is to be understood in context of when the parser library you use was released - at that point in time 2.2.1 was indeed not yet released.
<chridal>
Ah! I am misunderstanding. I thought the parser was a part of Ruby itself.
<apeiros>
ruby does have a parser itself of course
<apeiros>
but there's various parser libraries to parse ruby code.
<apeiros>
do you use bundler?
<chridal>
Yes, I am using bundler
<apeiros>
grep your Gemfile.lock for parser
michael_mbp has quit [Excess Flood]
agrinb has joined #ruby
_64k has joined #ruby
<chridal>
There we go. Three of them.
roolo has quit [Ping timeout: 264 seconds]
riotjones has joined #ruby
<chridal>
What's weird tho, is that Rails 4.2.1 recommends using Ruby 2.2 on their site, and now ActiveSupport is complaining.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michael_mbp has joined #ruby
<apeiros>
o0
<apeiros>
I have rails 4.2 projects and AS does not complain
<chridal>
I am an idiot. `bundle update`. I only ran it for Rails...
Notte has quit [Remote host closed the connection]
<chridal>
Hm. All the errors are gone after running `bundle update`, but the error persists.
tkuchiki has quit [Remote host closed the connection]
<chridal>
Any tips on how I should be thinking to solve these kinds of issues?
<waxjar>
has nothing to do with your ruby version, you're just trying to parse an invalid URI
astrobunny has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
<GreenJello>
I'm trying to install a gem in a fresh apline linux container. I'm not very familiar with debugging these kinds of errors. Could you take a look at the output and point me in the right direction? https://gist.github.com/brigand/85b0954a0eb0080ebf0c
<chridal>
waxjar: Everything worked fine up until I switched to 2.2.1 and Rails 4.2
<GreenJello>
I got through a few of them with google, but I'm stuck now.
hpoydar has joined #ruby
AlphaTech has joined #ruby
Rephiax has joined #ruby
nerium has joined #ruby
hpoydar has quit [Ping timeout: 255 seconds]
astrobunny has joined #ruby
gr33n7007h has quit [Quit: WeeChat 1.1.1]
gr33n7007h has joined #ruby
j416 has quit [Ping timeout: 245 seconds]
marr has quit []
relix has joined #ruby
j416 has joined #ruby
sinkensabe has joined #ruby
sivsushruth has quit [Ping timeout: 264 seconds]
sivsushruth has joined #ruby
Zai00 has joined #ruby
<shevy>
an inode can be: a directory, a file, a block device or a symlink right?
The_Phoenix has quit [Read error: Connection reset by peer]
<jhass>
isn't a symlink just a file with the target as content and a flag?
<shevy>
GreenJello you probably need ffi.h, are you sure that you have ffi?
<shevy>
jhass that may be
astrobunny has quit [Remote host closed the connection]
<GreenJello>
yeah it's installed from the package manager
<shevy>
ok
<shevy>
GreenJello try that gem that failed again; if need be, cd to the base directory and extract it
<GreenJello>
maybe I need to do libffi-dev or something?
<shevy>
well if you have ffi.h now
<shevy>
and made sure that you have it :D
<jokke>
does someone know if there is an easy way to get a completely serialized hash of a virtus model when it contains other models in its attributes?
<shevy>
source archive is at ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz - who knows into which components your distribution split it up
<jokke>
kind of like a recursive to_hash
AnxiousGarlic has quit [Ping timeout: 246 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
<kubunto>
jhass: is it possible to do that?
<jhass>
kubunto: do what? what I just run through a bot that executes ruby and display the result?
bricker has quit [Ping timeout: 245 seconds]
<kubunto>
no, to dynamically create a regex
ghostpl_ has joined #ruby
<civim>
I understand high level OOP. I'm more interested in best practices in Ruby.
hpoydar has joined #ruby
<shevy>
civim one of the simplest approach is one class per file
jenrzzz has quit [Ping timeout: 246 seconds]
<shevy>
ideally with a consistent naming scheme so nobody has to guess where something is to be found
patrick99e99 has quit [Ping timeout: 244 seconds]
<shevy>
if you have to split a class or module up into separate parts, it is often best to have a directory with its name, and then organize the files in that directory
<shevy>
depending on how much code there is
<jhass>
kubunto: like what I just did
patrick99e99 has joined #ruby
<shevy>
like a class that has 20 lines... or 100... or 500... or 5000
SouL_ has quit [Ping timeout: 252 seconds]
<jhass>
>> /#{rand(10)}/ # here's one that matches a random number
<civim>
shevy: cool, would you put classes and subclasses in the same dir if you're starting to get lots of files? I'm only at about 6 right now. just thinking ahead.
<shevy>
well I don't have many subclasses usually
<shevy>
sometimes I have class Base in base/base.rb
<jhass>
civim: we usually keep our class hierarchies fairly flat in ruby
<shevy>
then I usually tend to have a file version/version.rb which just keeps track of the current version of a gem
<kubunto>
YAY
<shevy>
then one file for constants usually
<kubunto>
tyvm jhass
kubunto has quit [Quit: dont forget to remain awesome]
<shevy>
civim it also depends on the editor you use
serivichi has quit [Ping timeout: 272 seconds]
<shevy>
mine is very dumb so the organization I have also needs to remain dumb
<jhass>
Ctrl+P <3
<civim>
jhass: i see. maybe I need to rethink this. i now realize that I might need a module instead of a super class.
<jhass>
module vs superclass decision is easy? do you ever need an instance of that exact thing? yes -> class, no -> module
ghostpl_ has quit [Ping timeout: 246 seconds]
<jhass>
a class is a module that you can make instances of
<jhass>
if you don't need instances of it, don't make it a class
<civim>
yeah, now that I look at it again, i really only need a few classes that share some methods.
<shevy>
so will you now use a module or a class for sharing methods ;)
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<civim>
shevy: a module.
<civim>
what I have as a super class now, doesn't actually have any thing other than methods in it.
<civim>
so a module makes more sense
<civim>
thanks for the help. reading about modules now!
jamto11 has joined #ruby
SouL has quit [Ping timeout: 246 seconds]
cpt_yossarian has quit [Ping timeout: 246 seconds]
martinbmadsen has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
hpoydar has quit [Remote host closed the connection]
zorak8 has joined #ruby
martinbmadsen has quit [Ping timeout: 264 seconds]
<nickjj>
anyone have a quick hack for converting json into a proper object (not hash) without using third party deps? some usage of method_missing maybe?
reinaldob has joined #ruby
sivsushruth has quit [Ping timeout: 265 seconds]
<jhass>
OpenStruct?
<jhass>
proper object is rather vague
<jhass>
a Hash is a fine and proper object too
<nickjj>
jhass, to be able to access the json fields as methods
<nickjj>
jhass, hmm. it doesn't seem to be recursive
plashc has joined #ruby
twilling has joined #ruby
milesmatthias has quit [Ping timeout: 264 seconds]
<nickjj>
for example, let's say the json has an object that has many other objects inside of it, openstruct only creates a method for the first level one
<jhass>
anyway, dozen of times solved problem, just google for it
flip_digits has joined #ruby
twilling has joined #ruby
spider-mario has quit [Remote host closed the connection]
christiandsg has quit [Remote host closed the connection]
rajeshchawla has quit [Remote host closed the connection]
<nickjj>
jhass, k. i'm surprised this wasn't the default
patrick99e99 has quit [Ping timeout: 255 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rajeshchawla has joined #ruby
patrick99e99 has joined #ruby
juanpablo_ has joined #ruby
Megtastique has quit []
digitalextremist has quit [Ping timeout: 265 seconds]
<apeiros>
yay!
<apeiros>
almost done with my password strength validator
<apeiros>
I hope somebody will review it
<apeiros>
so: anybody interested in reviewing a pw strength validator? :D
<c-c>
how does it work?
juanpablo_ has quit [Ping timeout: 265 seconds]
<jhass>
c-c: like every password strength validator: it sends your password to the author then then does strength = %i(bad okay good).sample
<apeiros>
it first detects known words and removes them from the password. the remaining password is tested for inclusion i 6 different type of scripts (control, digit, lowercase, uppercase, ascii and binary)
<apeiros>
it then calculates the entropy from those values
<apeiros>
higher entropy = stronger password
<jhass>
that sounds like you consider pferdebäumchensaft worse than a!$*€
<c-c>
so essential its a blacklist for known passes?
<apeiros>
a convenience method which does what jhass says exists too (simply checks the entropy against a list of thresholds)
christiandsg has joined #ruby
<apeiros>
c-c: no. but top10k passwords in your full password will have an entropy factor of 1 (extremely low)
<apeiros>
jhass: I don't yet have a german dict. only english and top10k passwords
<jhass>
well, you know what I mean
<apeiros>
but I guess entropy of pferdebäumchensaft would be around 200k**3
<c-c>
I always want to follow the xkcd advice
<c-c>
but often the pass-validators disallow that
<apeiros>
c-c: xkcd does the same calculation /cc jhass
digitalextremist has joined #ruby
<apeiros>
4 words from a source with 200k entries is 200k**4
<jhass>
but if you consider dictionary words not part of the entropy?
<apeiros>
jhass: well, if your adversary uses bad methods, sure
<apeiros>
but that's not what you do when you calculate the risk. you assume the best possible attack.
<apeiros>
and that's a dictionary attack first.
<apeiros>
with the first dictionary being the top10k
<c-c>
whats it say about correcthorsebatterystaple
<apeiros>
given that according to the numbers, you already get 30% of all accounts with that.
__chris has joined #ruby
<__chris>
mornin
<jhass>
meh, we should just go 2FA everywhere
<jhass>
damn passwords
<apeiros>
c-c: I'm not done yet. but if it works correctly, then as said: entropy of correcthosrebatterystaple = 235k**4
<__chris>
I've found this bit in my project that was written by another dev. I'm trying to figure out why he wrote this as it seems redundant and useless to me. ["some","array"]..compact
<__chris>
.keep_if { |e| e.present? }
<apeiros>
until it occurs in top10k, then it becomes 1 :D
<apeiros>
those are the entropies of 12 char pw from A-Za-z0-9 and 4 words from dict
patrick99e99 has joined #ruby
<c-c>
what if the 12 char pw contains dictionary entries
<apeiros>
as said, those are removed first
chridal has quit [Ping timeout: 272 seconds]
<apeiros>
e.g. "hello2world!" is considered to be "hello" + "world" + "2!"
<apeiros>
"hello" and "world" is 235k**2
havenwood has joined #ruby
<jhass>
__chris: that is unless it's a really huge array with many nils, then filtering out those out can be a performance win even with the extra array allocation (though .compact! would be better)
<apeiros>
"2!" is (10 + 34) ** 2
rbennacer has joined #ruby
<apeiros>
and the resulting entropy is 235k ** 2 * 44 ** 2
<apeiros>
mind you, I'm not entirely sure my math is 100% correct
RegulationD has joined #ruby
<apeiros>
hm, actually I wonder whether that shouldn't be (235k + 10 + 34) ** 4
<jhass>
it's a loose group anyone can join and leave as they please
<jhass>
why do you ask?
<ROOM1>
nathin
mgorbach has joined #ruby
<ROOM1>
I am going to make mine
<jhass>
about what?
<jhass>
btw we call them channels on IRC
DeBot has quit [Quit: Crystal]
thinkswan has joined #ruby
DeBot has joined #ruby
<ROOM1>
Well I am going to inform you when I make the chat
<jhass>
why do you think the people in #ruby will interest it though?
<jhass>
and what's so secret about it?
RegulationD has quit [Ping timeout: 250 seconds]
RegulationD has joined #ruby
oceans_ has joined #ruby
<oceans_>
hi i am a third year computer science student interested in working on this project "Cross-thread Fiber support". I have prerequisite knowledge about threads, concurrency control and c-programming. I also got the basic idea about fibres and the objective or aim of this project of making fibre of a thread to work in another thread.
<oceans_>
I would really appreciate if someone please help me through how we can implement this and what should my proposal contain.Thanks in advance.
<jhass>
^ was also asked in #ruby-lang
Cust0sL1men has joined #ruby
<shevy>
arup_r ripper seems cool
<shevy>
one day I need to dive into it
<ROOM1>
Well if you guys don't like it you can go out of the group
<apeiros>
wow, surprising - no privmsg spam from ROOM1
<jhass>
oh, I got that earlier
<SebastianThorn>
i remember these in DC++, one new word every 15m or so, and the bot kept stats and rankings
<jhass>
apeiros: oh, I'm getting it now :D
<apeiros>
<nelson>haa ha</nelson>
craigp has quit [Remote host closed the connection]
craigp has joined #ruby
sinkensabe has joined #ruby
User458764 has joined #ruby
_2_Mini has joined #ruby
havenwood has joined #ruby
sivsushruth has quit [Ping timeout: 272 seconds]
sivsushruth has joined #ruby
mattwildig has quit []
ramfjord has quit [Ping timeout: 246 seconds]
alec-c4 has joined #ruby
alec-c4 has quit [Remote host closed the connection]
__chris has quit [Quit: Leaving]
<arup_r>
apeiros: bring ROOM1 back... :D
<apeiros>
for your amusement?
jeromelanteri has quit [Ping timeout: 256 seconds]
<arup_r>
hehe.. I'm not getting sleep.. that's why.. I was seeing the game between ROOM1 and jhass :
<arup_r>
and enjoying
superspring has quit [Ping timeout: 252 seconds]
jeromelanteri has joined #ruby
Channel6 has joined #ruby
detail_pratique has quit [Ping timeout: 252 seconds]
fuzzyhorns has joined #ruby
maximski has joined #ruby
riotjones has joined #ruby
beef-wellington has quit [Ping timeout: 265 seconds]
superspring has joined #ruby
xploshioon has quit [Quit: Leaving]
Rephiax has joined #ruby
pandaant has quit [Remote host closed the connection]
christiandsg has joined #ruby
<arup_r>
got sleep
<arup_r>
bye all
Moeh has joined #ruby
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0/2015022000]]
<Moeh>
Can someone explain me why eval("array_0 = []") only returns an array and not "array_0" as array variable?
tier has joined #ruby
riotjones has quit [Ping timeout: 245 seconds]
<apeiros>
Moeh: you can't create local variables with eval
christiandsg has quit [Ping timeout: 252 seconds]
maximski has quit []
<apeiros>
or to be more precise: variables created with eval can only be used by eval'ing on the same binding again.
<jhass>
Moeh: also that usecase sounds more than smelly
<jhass>
I hope it's only curiosity
<apeiros>
numbered variables are smelly on their own already
tobacco_joe has quit []
<Moeh>
What I would like to do is to create three (temporary) arrays that have the format "array_#{index}"
<apeiros>
Moeh: why?
<apeiros>
and why with eval?
antgel_ has joined #ruby
_2_Mini has quit [Ping timeout: 276 seconds]
<Moeh>
The goal is basically this: http://pastie.org/10045749 I want to transform an array of hashs to an array of arrays where each array is a list of the values of each hash.
<apeiros>
Moeh: ok. no reason to use eval for that.
sivsushruth has quit [Ping timeout: 245 seconds]
<Moeh>
Okay, my idea was to measure that length of the first hash of the array, create the number of empty arrays, then go over each element in the array and each element in each hash and push the values in the aforementioned arrays.
hdrv has quit [Read error: Connection reset by peer]
silkfox has joined #ruby
<Moeh>
* the
sivsushruth has joined #ruby
centrx has quit [Remote host closed the connection]
<apeiros>
Moeh: you can store an arbitrary number of arrays in an array
<Moeh>
I know, but what I would like is that the numbers of arrays in the array equals the number of values in each hash
Hirzu has joined #ruby
reinaldob has joined #ruby
<apeiros>
Moeh: then store exactly that many arrays in an array
<Moeh>
And how / where would I then initiate the "sub-arrays"?
<gr33n7007h>
Moeh: something like foo.map{|h| h.values }.transpose
User458764 has joined #ruby
reinaldob has quit [Ping timeout: 265 seconds]
sngeth has quit [Ping timeout: 264 seconds]
<jhass>
apeiros: they spelled your name right in query!
<apeiros>
what?
<apeiros>
oh, roominator?
<Moeh>
gr33n7007h: wow, that's exactly what I need. Thanks a lot!
<jhass>
yeah
<gr33n7007h>
:)
<apeiros>
you're still on it? wow…
<jhass>
I'm bored...
<apeiros>
haha
rkgudboy has joined #ruby
<apeiros>
I could use some help with my framework, you know? :-p
<ftj>
Interacting with the trello API, and when I get an array of List objects for a given Board, I'd like to select a list from the array based on its ID. right now I'm using:
<abyss>
and there I use class variable to connect to database. Is this right way? I wonder if @@ variable is apropriate way to ease to use my script...
einarj has joined #ruby
einarj has quit [Remote host closed the connection]
einarj has joined #ruby
Jiyuhen has joined #ruby
_2_Mini has joined #ruby
_2_Mini has quit [Read error: Connection reset by peer]
dfinninger has quit [Ping timeout: 252 seconds]
<Limix>
Just watched a video on encryption from rubyconf 2013, is openssl better these days? Or are there better libs to use?
deol has joined #ruby
Pupeno has joined #ruby
threh has quit [Ping timeout: 256 seconds]
Channel6 has quit [Quit: Leaving]
havenwood has quit [Ping timeout: 264 seconds]
Pupeno_ has quit [Ping timeout: 264 seconds]
hpoydar has quit [Remote host closed the connection]
havenwood has joined #ruby
Rephiax has quit []
binaryfreedom has joined #ruby
christiandsg has joined #ruby
swgillespie has joined #ruby
threh has joined #ruby
swgillespie has quit [Client Quit]
silkfox has quit [Ping timeout: 272 seconds]
swgillespie has joined #ruby
Guest24 is now known as lele
Pupeno has quit [Remote host closed the connection]
Zggb has quit [Quit: Connection closed for inactivity]
threh has quit [Ping timeout: 256 seconds]
JoshGlzBrk has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
kubunto has left #ruby [#ruby]
<abyss>
hmm nobody?;)
rkgudboy has quit [Read error: Connection reset by peer]
Nahra has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
abyss: Oops, I dc'ed. My first impulse is wanting to extract a class for the db connection. Initialize a new connection and pass that to any new data you initialize.
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
swgillespie has joined #ruby
<havenwood>
s/initialize/instantiate
christiandsg has quit [Remote host closed the connection]
bruno- has joined #ruby
<abyss>
havenwood: yes, firstly I did that, every new data had something like this data = dbconnect( ) then dataMal = dbconnect() etc, but I wanted to ease to use my script for others and I moved dbconnection to class variable
<abyss>
now it seems to easier to use but I wonder if it is an appropriate way;)
<abyss>
havenwood: oh, you meant that write completely new class for db connection?
<havenwood>
abyss: ya
swgillespie has quit [Client Quit]
withnale has quit [Ping timeout: 256 seconds]
Guest94045 is now known as Kruppe
<abyss>
havenwood: but then I will need make new connection for every instance ( I mean for dataMal = , dataNTK = etc)?
decoponio has quit [Quit: Leaving...]
swgillespie has joined #ruby
Pupeno has joined #ruby
withnale has joined #ruby
lemur has quit [Ping timeout: 265 seconds]
<abyss>
I'm thinking what you mean but I suppose I too weak in ruby to get it;)
<havenwood>
abyss: I was suggesting initializing the data with the connection. Like; Data.new(publisher, file, DB)
sngeth has joined #ruby
<havenwood>
DB_CONNECTION
alec-c4 has quit [Remote host closed the connection]
<havenwood>
or whatever an appropriate name is
<havenwood>
abyss: There's a strong community convention to use snake_case instead of headlessCamelCase or CamelCase for method names and variables.
Rapier- has quit [Ping timeout: 252 seconds]
<abyss>
havenwood: oh, ok, so as I mentioned I did that firstly, but to ease use my script I moved connection to database to class variable to avoid make new connection for every instance...
<havenwood>
abyss: `abort` is a nice shorthand for `exit(1)`
<havenwood>
abyss: Can Data just have a Constant for the DB initialization?
chridal has joined #ruby
<havenwood>
abyss: I've just glanced at your code, taking a closer look.
thinkswan has quit [Ping timeout: 252 seconds]
orangerobot has joined #ruby
Morkel has quit [Quit: Morkel]
sngeth has quit [Ping timeout: 265 seconds]
<havenwood>
abyss: #puts already takes care of #to_s, you can just `@fh.puts path` instead of `@fh.puts "#{path}"`.
<abyss>
ok
kubunto has joined #ruby
craigp has joined #ruby
anaeem1 has quit [Quit: Leaving...]
<orangerobot>
hello. Will passing ruby objects as parameters to methods as opposed to just passing the attributes i need to work with (perhaps via a map or something)?
anaeem1_ has joined #ruby
<orangerobot>
*I mean. Will doing so incurr a performance penalty?
<orangerobot>
* incur
chridal has quit [Ping timeout: 264 seconds]
sngeth has joined #ruby
<apeiros>
orangerobot: everything you pass as a parameter is an object
<apeiros>
you can't pass anything else (well, ok, there's also blocks)
<orangerobot>
yes but does passing a full fledged user object somehow cost more than smaller objects?
<orangerobot>
in terms of ruby's internal processing or things like that
<apeiros>
every object has the same footprint when passing
elaptics is now known as elaptics_away
<apeiros>
it doesn't make a any difference whether you pass an 800MB large string or an empty string - same amount of data is passed.
<orangerobot>
hmm I expected that but i want to make sure
Sirupsen has joined #ruby
<orangerobot>
thanks apeiros
arietis has quit [Quit: Leaving.]
maximski has quit [Read error: No route to host]
maximski_ has joined #ruby
bigmac has quit [Ping timeout: 250 seconds]
dcarmich has joined #ruby
_2_Mini has joined #ruby
jwinder has joined #ruby
roolo has joined #ruby
DerisiveLogic has joined #ruby
sivsushruth has quit [Ping timeout: 253 seconds]
_2_Mini has quit [Client Quit]
sivsushruth has joined #ruby
centrx has joined #ruby
<endash>
This is a bit off the wall but does anyone else on OS X have issues with guard properly clearing the scrollback in terminal
MasterPiece has joined #ruby
sngeth has quit [Ping timeout: 252 seconds]
aiguu has joined #ruby
<abyss>
havenwood: What I wanted to do is that I wanted to avoid 4 calls of Data (first for dbconnection, second publisher, third for dirsbelongindtopublisher and the last for addeditor)... It's cometic change but now people can put only 3 lines intead of 4 ;)
bonhoeffer has quit [Quit: bonhoeffer]
Wolland has joined #ruby
nahtnam has joined #ruby
Wolland has quit [Client Quit]
<abyss>
but now I wonder if it's an appropriate way to use class variable... ;) You now, how it looks, maybe performance is weak because of that etc
gigetoo has quit [Remote host closed the connection]
gigetoo has joined #ruby
relix has joined #ruby
jack_rabbit has joined #ruby
davidhq has quit [Ping timeout: 255 seconds]
livinded has quit [K-Lined]
jokester has quit [K-Lined]
bim has joined #ruby
livinded has joined #ruby
Jiyuhen has quit [Quit: No Ping reply in 180 seconds.]
jokester has joined #ruby
Jiyuhen has joined #ruby
diegoviola has joined #ruby
<havenwood>
abyss: So say if you extract class for the connections but just instantiate it once. Example in pseudocode: connection = Saas::Database.new(x, y, z); a = Saas::Data.new(w, x, connection); b = Saas::Data.new(y, z, connection)
kubunto has left #ruby [#ruby]
zorak8 has quit [Ping timeout: 256 seconds]
davidhq has joined #ruby
mitchellhenke has joined #ruby
<havenwood>
abyss: However you decide to store the db connection it seems you should extract class.
silkfox has joined #ruby
maximski_ has quit []
Soda has quit [Remote host closed the connection]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jwinder has quit [Ping timeout: 272 seconds]
<abyss>
havenwood: I get it (I hope;)) I will try to do it, but now I don't know how;) So in new class if I use instance variable and put that class to different class (like you did in pseudocode) then this variables will be visible for Data class?
dfinninger has joined #ruby
hpoydar has joined #ruby
<abyss>
btw: to sum it up: using class variables is not good idea?;) And I should never use class variable for such a tasks?;)
<jhass>
class variables have unexpected scoping and 60% of their uses are actually usecases for constants with another 35% being actually usecases for class level instance variables
<jhass>
so 95% of the time you shouldn't use a class var, right
milesmat_ has joined #ruby
kedare has quit [Quit: WeeChat 1.0.1]
TinkerTyper has joined #ruby
aarthi01 has joined #ruby
milesmatthias has quit [Ping timeout: 255 seconds]
Sawbones has quit [Remote host closed the connection]
Sawbones has joined #ruby
sivsushruth has quit [Ping timeout: 250 seconds]
xcombelle has quit [Quit: Quitte]
sivsushruth has joined #ruby
willharrison has joined #ruby
jenrzzz has joined #ruby
<atmosx>
hello
SOLDIERz has quit [Quit: Be back later ...]
<orangerobot>
is using ||= only recommended against when your variable maybe be false or also when it can be 'falsy' ?
cpt_yossarian has joined #ruby
hpoydar has quit [Remote host closed the connection]
elaptics_away is now known as elaptics
<undeadaedra>
there are only two false values
pdoherty has joined #ruby
<orangerobot>
undeadaedra: that's nil and false, correct?
pdoherty has quit [Client Quit]
<undeadaedra>
yes
Pupeno_ has joined #ruby
<undeadaedra>
usually, you use ||= to set a variable if unset
<undeadaedra>
so, not suitable for booleans
<orangerobot>
yes undeadaedra
Sawbones has quit [Remote host closed the connection]
jottr has joined #ruby
<atmosx>
test
<atmosx>
oh better
<orangerobot>
undeadaedra: it's funny that foo = bar || "bar" runs ok
<undeadaedra>
why ?
lordkryss has quit [Quit: Connection closed for inactivity]
<orangerobot>
if you try to evaluate an expression like (bar || "baz") you get a NameErro
<orangerobot>
undeadaedra: in an assignment, it raises no error
Pupeno has quit [Ping timeout: 272 seconds]
<orangerobot>
so you can set an unset variable if you want
<undeadaedra>
>> bar = ”hello”; (bar || ”bar”)
<apeiros>
orangerobot: huh? you're mistaken
<apeiros>
it raises there all the same
last_staff has quit [Quit: last_staff]
<apeiros>
>> foo = bar || "bar"
<eval-in_>
apeiros => undefined local variable or method `bar' for main:Object (NameError) ... (https://eval.in/303040)
<undeadaedra>
ah shit
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<flaviolivolsi>
is “Learn to program: facets of Ruby” a good book to learn Ruby? thanks!
<shevy>
damn
<shevy>
a bot rules this channel
civim has joined #ruby
swgillespie has quit [Max SendQ exceeded]
<havenwood>
abyss: no prob, happy coding!
Sawbones has quit [Remote host closed the connection]
<havenwood>
shevy: maybe more of us are bots than you think...
swgillespie has joined #ruby
fmcgeough has joined #ruby
max96at is now known as max96at|off
juanpablo_ has joined #ruby
RegulationD has joined #ruby
<orangerobot>
flaviolivolsi: if you already know some basic programming, go for this one: http://www.poodr.com/
freerobby has joined #ruby
binaryfreedom has joined #ruby
<flaviolivolsi>
ok, i know PHP and JavaScript. thank you :)
swgillespie has quit [Max SendQ exceeded]
Joufflu has quit [Ping timeout: 256 seconds]
swgillespie has joined #ruby
<flaviolivolsi>
guys, can I ask why do you prefer Ruby instead of Python? I want to learn one of them and I have not clear the advantages of each one
lemur has joined #ruby
<kubunto>
ROOM1: :P
binaryfreedom has quit [Client Quit]
<kubunto>
flaviolivolsi: they are 2 ways of doing similar tasks
psy_ has quit [Ping timeout: 264 seconds]
<kubunto>
not sure if one is nessesarily better than the other
postmodern has quit [Quit: Leaving]
Sawbones has joined #ruby
swgillespie has quit [Max SendQ exceeded]
Virtual_ has joined #ruby
juanpablo_ has quit [Ping timeout: 250 seconds]
binaryfreedom has joined #ruby
<orangerobot>
flaviolivolsi: python is easier, cleaner and more heavily used in academia. Ruby is more *fun* and gives you more freedom to innovate and do fun things (not that you should always)
RegulationD has quit [Ping timeout: 255 seconds]
swgillespie has joined #ruby
<shevy>
cleaner?
<havenwood>
shevy: snakes are clean, but not in the way i like to be clean
ghostpl_ has joined #ruby
<orangerobot>
python is more often used in systems programming, heavy backend server stuff. Ruby is more used for the web
<flaviolivolsi>
thank you guys, i’m following the discussion in silence :D
<jhass>
flaviolivolsi: try both for a while, stick with what's more fun to you. Knowing both is of no harm at all. It's >80% personal preference
<kubunto>
^
<havenwood>
orangerobot: Ruby is used a ton for server stuff. Lots of tools.
<kubunto>
python and ruby are both very quick to pick up, very easy to use
RegulationD has joined #ruby
<ROOM1>
hi kubunto
<havenwood>
orangerobot: Popular package managers, deployment and provisioning tools are written in Ruby as well.
<orangerobot>
guys, trying to make the world like the language we like is not the right way to go. We should be aiming at the sort of knowlege that makes us good in any language
maximski has joined #ruby
RegulationD has quit [Remote host closed the connection]
maximski has quit [Max SendQ exceeded]
<orangerobot>
i love ruby but I wouldn't dream of using ruby in a machine learning project
<orangerobot>
or natural text processing
pontiki has joined #ruby
<havenwood>
There's a difference in the communities and aesthetic.
<orangerobot>
or heavy network stuff
sngeth has joined #ruby
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
<havenwood>
orangerobot: how's that different than Python :P
bim has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jonr22_ has quit [Remote host closed the connection]
<havenwood>
orangerobot: you *can* do any of the above in either
reinaldob has quit [Remote host closed the connection]
maximski has joined #ruby
<kubunto>
what makes ruby more web than python?
maximski has quit [Max SendQ exceeded]
<Jamo>
rails :D
anaeem1_ has quit [Remote host closed the connection]
<flaviolivolsi>
another question: do you think that one of them is more lightweight than the other one? (i’m talking about web side)
anaeem1 has joined #ruby
jalcine has joined #ruby
<Jamo>
afaik ruby has better communities (incl. documentation, blog posts, irc, etc)
<shevy>
flaviolivolsi nah
maximski has joined #ruby
<Jamo>
both of them are slow...
maximski has quit [Max SendQ exceeded]
<shevy>
flaviolivolsi you could clone php in ruby!
Sawbones has quit [Remote host closed the connection]
<orangerobot>
where will you find lisp programmers?
narcan has joined #ruby
<orangerobot>
these sort of things
<kubunto>
orangerobot: i dont disagree but in terms of machine learning i would imagine lisp to be better
<orangerobot>
the language itself is just one dimension
flaviolivolsi has quit [Remote host closed the connection]
<havenwood>
orangerobot: there're a lot of really great programmers who enjoy Clojure/Racket/Chicken etc and you can get at that excellent group of folk by choosing those langs
<havenwood>
orangerobot: for machine learning our best libs are probably available through JRuby
flaviolivolsi has joined #ruby
<havenwood>
it looks like Jython is actively developed. is that something folk use much?
mitchellhenke has quit [Client Quit]
<kubunto>
havenwood: ive never heard nice things of it sadly
<kubunto>
have not tried it myself either
narcan has quit [Client Quit]
<ROOM1>
I am lost
Sawbones has joined #ruby
<kubunto>
?
Pupeno_ has quit [Quit: Leaving...]
martinbmadsen has quit [Ping timeout: 264 seconds]
kubunto has quit [Quit: I have no special talent I am only passionately curious]
maximski has quit []
kubunto has joined #ruby
Sawbones has quit [Remote host closed the connection]
<TheHappyPeanut>
i want to learn Ruby and i have a basic understanding of syntax, but i'm not sure if i just just go through a bunch of tutorials or if maybe it would be best to build an app that I want to build to learn
<TheHappyPeanut>
app i want to build i mean
<kubunto>
TheHappyPeanut: i suggest the app
<kubunto>
its more fun that way
dfinninger has quit [Ping timeout: 255 seconds]
<kubunto>
source: just did that
<TheHappyPeanut>
does it matter if it's a large scale app?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<TheHappyPeanut>
like it's not small but it's not enormous
<kubunto>
mine was a smaller app
<c-c>
does what matter?
<TheHappyPeanut>
can you start out dev'ing it in ruby
<TheHappyPeanut>
and then use the rails framework
echevemaster has joined #ruby
<c-c>
you can
<c-c>
prepare couple of months of study for rails
<havenwood>
TheHappyPeanut: Yeah, or you might find that you prefer one of the many Rack adapters other than Rails.
<TheHappyPeanut>
my ultimate goal is to dev for money
<TheHappyPeanut>
and to dev my own projects
<TheHappyPeanut>
so i want to learn Rails because that's where the money is at in Ruby
<TheHappyPeanut>
or am i incorrect in that?
sparr has joined #ruby
<undeadaedra>
yawn
<c-c>
ultimately, its often a business, that needs a solution
<havenwood>
TheHappyPeanut: There's plenty of Ruby work outside of Rails. I don't have stats on $$.
jmdade has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<c-c>
doesn't matter whan you use, if you can deliver
<undeadaedra>
havenwood: and on €€? :p
Sawbones has quit [Remote host closed the connection]
<havenwood>
undeadaedra: it's Ruby after all. compromise on ¥¥?
<orangerobot>
even if you don't use rails per se you'll probably use something else that looks like rails so it's a good thing to learn it
hs366 has quit [Quit: Leaving]
TheNet has joined #ruby
<undeadaedra>
havenwood: let me ask my lawyer
iamjarvo has joined #ruby
<havenwood>
TheHappyPeanut: Learn the language then a simple framework like Sinatra (there's plenty to learn). The creator of the Sequel gem has a fantastic but relatively new framework called Roda. I'd recommend learning it.
<jhass>
the example doesn't look like what you do at all
<jhass>
where did you get your code from?
brandon is now known as Guest67440
<c-c>
hm, whats the use of encrypting cookies
amclain has joined #ruby
<jhass>
c-c: integrity mostly
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
so that if people try to modify it they produce garbage and your app chokes on it
<Musashi007>
i paid someone to dev a site and that’s what they created
<havenwood>
Rack::Session::Cookie isn't encrypted, so you can peek, but it's signed to prevent tampering
<jhass>
and yes, signing would fulfill that property already
<apeiros>
c-c: also protection - data in internet cafes, or unsecured connections
cirn0 has quit [Quit: Leaving]
<jhass>
doesn't prevent replay though
<jhass>
apeiros: I thought you gonna sleep :P
<c-c>
just wondering what kind of data one could store, that could be wiped, but would be so critical as to need crypting... ok session token?
<apeiros>
jhass: soon
<Musashi007>
@jhass why do you say my code doesn’t look anything like that?
<jhass>
because it doesn't
<apeiros>
yes, encryption doesn't prevent all attack vectors
<jhass>
I kind of fail to see how you fail to see that :P
TheNet has quit [Quit: Leaving...]
TheHappyPeanut has quit [Ping timeout: 246 seconds]
<Musashi007>
code so often looks different to me, though
<c-c>
whats the use, if you don't have transport security? I'm lost
<havenwood>
signed *if* the sekret key is set, I shoulda said
<Musashi007>
I mean, I just have the cookie settings contained in a variable beucase i’m adding more than just :secret. is that what you’re talking about ?
<jhass>
mmh, maybe
<jhass>
I mistook your cookie_settings for your data I guess
<jhass>
so it's just standard set it in the session and it'll work stuff
<Musashi007>
^ what’s that mean
<jhass>
the code you showed is actually not relevant to your question really :)
<Musashi007>
I know :/
<jhass>
well, the app is plain rack really?
<jhass>
or is it sinatra or anything?
<Musashi007>
only linked it because it’s relevant to the issue of similarity
<Musashi007>
it is sinatra but it is using rack sessions
keen_________ has quit [Read error: Connection reset by peer]
<jhass>
so in a route just do session[:some_key] = some_SIMPLE_data
<c-c>
I'd never give anything but a lookup token for a session table
charliesome has joined #ruby
<c-c>
and yeah, change that too java stylee
<jhass>
and session[:some_key] to query
<Musashi007>
to query?
RegulationD has joined #ruby
<jhass>
"get the value out"
<jhass>
Musashi007: maybe you should hire somebody again :/
keen_________ has joined #ruby
<Musashi007>
oh set it and pull it back out and see if it’s updated?
<Musashi007>
@jhass thaaaanks… lol
<Musashi007>
if you want to point me in the direction of someone, i’d listen but i’d rather do it myself
jerematic has joined #ruby
reinaldob has joined #ruby
badhatter has quit [Read error: Connection reset by peer]
<jhass>
no offense, but it sounds a bit like you're stumbling around in the dark here, not that I don't encourage learning, but if your app is actually relevant to your business ...
<Musashi007>
it’s a hobby side project
badhatter has joined #ruby
<Musashi007>
and, i mean, we have to start somehwere, no ?
<jhass>
then I'm misinterpreting, excuse me and nvm
Yzguy_ has joined #ruby
<jhass>
I just found it unusual to pay somebody for a hobby thingy I guess :)
<Musashi007>
it’s something i believe in and want to get started..
<jhass>
so yeah, sinatra/Rack:Session abstracts that stuff away for you so you can treat session just like a hash that's persistent across requests
<shevy>
sometimes I look at my code
RegulationD has quit [Ping timeout: 250 seconds]
<shevy>
and wonder what the heck I have been doing there
kyrylo_ has joined #ruby
<jhass>
just don't store anything beyond basic data in it (strings, numbers, symbols, arrays of them are okay, nothing beyond)
Limix has quit [Quit: Limix]
ROOM1 has quit [Read error: No route to host]
deuterium has quit [Read error: Connection reset by peer]
hpoydar has joined #ruby
<jhass>
shevy: that's normal
jerematic has quit [Ping timeout: 272 seconds]
kyrylo has quit [Ping timeout: 265 seconds]
Limix has joined #ruby
reinaldob has quit [Ping timeout: 252 seconds]
SpikeMaster has joined #ruby
<Musashi007>
what exactly is app.use?
juanca_ has joined #ruby
chridal has quit [Ping timeout: 264 seconds]
<Musashi007>
is that me accessing the middleware?
<jhass>
more modifying what's called the middleware stack
<jhass>
you add a new middleware to it with that call
Limix has quit [Client Quit]
<Musashi007>
ok
<c-c>
is it like using confing to add hooks on your request pipeline?
<jhass>
it allows the middleware to run code on the request before it reaches your app and on the response of your app before it's send to the client
kubunto has quit [Quit: A professor is one who talks in someone else's sleep]
<morenoh149>
jhass: so open() returns the response as a single string? not sure what body = open(url, &:read) does
<jhass>
SpikeMaster: the one you like the most
<morenoh149>
SpikeMaster: atom vim or emacs
milesmat_ has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Musashi007>
try sublime 3, spikemaster
<jhass>
morenoh149: open-uri fakes an IO object for the response body of an HTTP request, open(url, &:read) is just a shortand syntax to open(url) {|io| io.read }
milesmatthias has joined #ruby
<c-c>
I like vim, also scite, emacs, cloud 9, aptana, sublime, cream...
<jhass>
SpikeMaster: it's religion, try a few, stick with what you like the most, reevaluate from time to time
<c-c>
I wonder how neovim would work for ruby
<jhass>
just like vim I suppose
<havenwood>
but neoer
<jhass>
does it do the cloud?
<morenoh149>
it does the iots
martinbmadsen has quit [Ping timeout: 246 seconds]
maximski has joined #ruby
<jhass>
now I reminded myself of that silly web 4.0 talk :(
<Musashi007>
jesus we’re on web 4.0 now ?
swgillespie has joined #ruby
bier has quit [Ping timeout: 252 seconds]
maximski has quit [Max SendQ exceeded]
<jhass>
according to "some" people...
<morenoh149>
web 3.0 got lost in commitee
<Musashi007>
sigh
sngeth has joined #ruby
maximski has joined #ruby
juanca_ has quit [Remote host closed the connection]
<jhass>
web 5.0 actually I think
juanca_ has joined #ruby
_1_Aj has left #ruby [#ruby]
milesmatthias has quit [Ping timeout: 256 seconds]
<Musashi007>
i thought we were enumerating these things by the financial bubbles that they enable
<jhass>
don't be unreasonable, the talk has a perfectly fine explanation on why we need that version bump
Moeh has quit [Quit: Page closed]
hpoydar has quit [Remote host closed the connection]
<Musashi007>
Yeahhhhhh
<Musashi007>
I won’t be listening to that talk
<jhass>
good thing it's slides only
dfinninger has joined #ruby
<Musashi007>
i suppose that went without saying then eh, mr semantic parser?
<morenoh149>
so I could also do open(url) { |io| body = io.read } ?
<Musashi007>
I won’t be *reading* it or interacting with it in any fashion whatsoever ;)
chridal has quit [Ping timeout: 244 seconds]
<Musashi007>
visual, auditory, or otherwise
<jhass>
morenoh149: yes, but you wouldn't be able to access body outside
adamski2600 has quit [Remote host closed the connection]
<jhass>
you could do body = open(url) {io| io.read } too
adamski2600 has joined #ruby
bier has joined #ruby
mroach has quit [Quit: mroach]
silkfox has joined #ruby
<morenoh149>
right. But I'm placing most of my logic inside the block because I want to perform something with the whole respose. If I do body = open(ur) will that block until the response is recieved?
<morenoh149>
because that's what I need
<jhass>
of course
<jhass>
I don't think open-uri streams at all
SpikeMaster has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
dfinninger has quit [Ping timeout: 264 seconds]
Virtual_ has quit [Ping timeout: 265 seconds]
adamski2600 has quit [Ping timeout: 264 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
silkfox has quit [Ping timeout: 272 seconds]
<jblack>
Hi, does anyone know to create new unit tests from inside an already running unit test?
platosha has joined #ruby
nfk has quit [Quit: yawn]
sparr has quit [Changing host]
sparr has joined #ruby
porfa has quit [Ping timeout: 256 seconds]
rismoney1 has joined #ruby
porfa has joined #ruby
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arrubin has joined #ruby
fmcgeough has joined #ruby
rismoney1 has left #ruby [#ruby]
einarj has quit [Remote host closed the connection]
aiguu has quit [Ping timeout: 255 seconds]
hpoydar has joined #ruby
juanpablo_ has joined #ruby
hiyosi has joined #ruby
Zai00 has quit [Quit: Zai00]
sinkensabe has joined #ruby
Virtual_ has joined #ruby
greenbagels has joined #ruby
Limix has joined #ruby
juanpablo_ has quit [Ping timeout: 246 seconds]
hpoydar has quit [Ping timeout: 244 seconds]
Notte has joined #ruby
sinkensabe has quit [Ping timeout: 246 seconds]
sngeth has quit [Ping timeout: 265 seconds]
echevemaster has quit [Quit: WeeChat 1.1.1]
pontiki has joined #ruby
Hirzu has joined #ruby
anaeem1 has joined #ruby
jonr22 has joined #ruby
aiguu has joined #ruby
jasabella has quit [Ping timeout: 245 seconds]
willharrison has joined #ruby
ponga has joined #ruby
pontiki has quit [Ping timeout: 252 seconds]
shum has joined #ruby
Hirzu has quit [Ping timeout: 256 seconds]
<morenoh149>
jblack: dynamically generated unit tests!?
anaeem1 has quit [Ping timeout: 265 seconds]
sdothum has quit [Ping timeout: 256 seconds]
jonr22 has quit [Ping timeout: 246 seconds]
kyrylo__ has joined #ruby
Beliq has quit [Quit: My computer has gone to sleep. ZZZzzz…]