midhir has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
arBmind1 has quit [Ping timeout: 250 seconds]
midhir has joined #ruby-lang
hahuang62 has joined #ruby-lang
araujo has joined #ruby-lang
[spoiler] has quit [Quit: Leaving]
midhir has quit [Ping timeout: 264 seconds]
brownbathrobe has joined #ruby-lang
brownbathrobe has quit [Client Quit]
brushbox has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby-lang
cornerma1 has joined #ruby-lang
kurko__ has joined #ruby-lang
cornerman has quit [Ping timeout: 264 seconds]
cornerma1 is now known as cornerman
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
dagda1_ has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Remote host closed the connection]
dagda1 has joined #ruby-lang
stardiviner has joined #ruby-lang
Musashi007 has joined #ruby-lang
benanne has quit [Quit: kbai]
Torrieri has quit [Quit: Be back later ...]
loincloth has joined #ruby-lang
toretore has quit [Quit: This computer has gone to sleep]
sankaber has joined #ruby-lang
loincloth has quit [Ping timeout: 264 seconds]
haraoka has joined #ruby-lang
kiyote23 has joined #ruby-lang
Savoyard has quit [Quit: (null)]
rbowlby has joined #ruby-lang
micaeked has quit [Quit: WeeChat 1.0.1]
dagda1 has quit [Ping timeout: 245 seconds]
dagda1 has joined #ruby-lang
SuMo_D has joined #ruby-lang
Manorie_x has joined #ruby-lang
symm- has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby-lang
Manorie_x has quit [Ping timeout: 272 seconds]
pwnz0r has quit [Remote host closed the connection]
havenn is now known as havenwood
Mothore has joined #ruby-lang
jkad1 has quit [Quit: WeeChat 1.0.1]
Mothore has quit [Client Quit]
mistym has joined #ruby-lang
Savoyard has joined #ruby-lang
Bwild has joined #ruby-lang
hendranata_ has joined #ruby-lang
nisstyre has quit [Ping timeout: 256 seconds]
sargas_ has joined #ruby-lang
emmesswhy has quit [Quit: This computer has gone to sleep]
<sargas_>
on the IO Class, what does this open mode mean?
<sargas_>
"w" Write-only, truncates existing file to zero length or creates a new file for writing.
<sargas_>
what does "...truncates existing file to zero length or creates a new file for writing." mean?
pwnz0r has joined #ruby-lang
<red_menace>
not quite understanding what you are asking - that statement pretty much means exactly what it says
kurko__ has quit [Read error: No route to host]
kurko___ has joined #ruby-lang
pwnz0r has quit [Remote host closed the connection]
sargas_ has quit [Ping timeout: 246 seconds]
<waxjar>
sargas_: it means if the file already exists, its contents are deleted. otherwise it creates a new file
kiyote23 has quit [Remote host closed the connection]
yusuf has joined #ruby-lang
`micro_ has left #ruby-lang [#ruby-lang]
sargas has joined #ruby-lang
lucyinthesky_ has joined #ruby-lang
nisstyre has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
sargas has left #ruby-lang ["connected to #ruby"]
stamina has quit [Ping timeout: 258 seconds]
shinnya has quit [Ping timeout: 264 seconds]
lucyinthesky_ has left #ruby-lang ["Leaving"]
emmesswhy has joined #ruby-lang
michaeldeol has joined #ruby-lang
charliesome has joined #ruby-lang
cleopatra has quit [Remote host closed the connection]
Manorie_x has joined #ruby-lang
Manorie_x has quit [Ping timeout: 245 seconds]
Savoyard has quit [Quit: (null)]
Musashi007 has quit [Quit: Musashi007]
kiyote23 has joined #ruby-lang
perryh has joined #ruby-lang
perryh is now known as Guest98202
Guest98202 has quit [Client Quit]
Musashi007 has joined #ruby-lang
emmesswhy has quit [Quit: Leaving]
perry has quit [Ping timeout: 272 seconds]
dagda1 has quit [Ping timeout: 265 seconds]
dagda1 has joined #ruby-lang
nertzy has joined #ruby-lang
pwnz0r has joined #ruby-lang
loincloth has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
iamninja has joined #ruby-lang
loincloth has quit [Ping timeout: 255 seconds]
Savoyard has joined #ruby-lang
Torrieri has joined #ruby-lang
loincloth has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
loincloth has quit [Ping timeout: 245 seconds]
caseypatrickdris has quit [Remote host closed the connection]
rbowlby has joined #ruby-lang
kurko__ has joined #ruby-lang
araujo has quit [Quit: Leaving]
gjaldon has joined #ruby-lang
perry has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kurko___ has quit [Ping timeout: 245 seconds]
perry is now known as Guest18587
Guest18587 is now known as perryh
perryh has quit [Changing host]
perryh has joined #ruby-lang
Savoyard has quit [Quit: (null)]
yusuf has quit [Quit: Leaving.]
haraoka has quit [Ping timeout: 256 seconds]
klmlfl has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
godd2 has quit [Remote host closed the connection]
senor_jalapeno has quit [Ping timeout: 264 seconds]
kurko__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nertzy has quit [Quit: This computer has gone to sleep]
michaeldeol has joined #ruby-lang
jo__ has joined #ruby-lang
koderok has joined #ruby-lang
koderok has quit [Remote host closed the connection]
kiyote23 has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
kiyote23 has joined #ruby-lang
pr0ton has joined #ruby-lang
michaeldeol has quit [Ping timeout: 250 seconds]
michaeldeol has joined #ruby-lang
lsegal has joined #ruby-lang
kiyote23 has quit [Ping timeout: 265 seconds]
senor_jalapeno has joined #ruby-lang
loincloth has joined #ruby-lang
michaeldeol has quit [Ping timeout: 250 seconds]
loincloth has quit [Ping timeout: 264 seconds]
SuMo_D has quit [Remote host closed the connection]
SuMo_D has joined #ruby-lang
yusuf has joined #ruby-lang
yusuf has quit [Max SendQ exceeded]
yusuf has joined #ruby-lang
SuMo_D has quit [Read error: Connection reset by peer]
SuMo_D has joined #ruby-lang
Manorie_x has joined #ruby-lang
Manorie_x has quit [Ping timeout: 255 seconds]
kiyote23 has joined #ruby-lang
klmlfl has quit [Remote host closed the connection]
nertzy has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
kiyote23 has joined #ruby-lang
jxie_ has quit [Ping timeout: 272 seconds]
arooni-mobile__ has quit [Ping timeout: 256 seconds]
jxie has joined #ruby-lang
kiyote23 has quit [Ping timeout: 250 seconds]
ur5us has quit [Remote host closed the connection]
Savoyard has joined #ruby-lang
Musashi007 has joined #ruby-lang
pr0ton has quit [Ping timeout: 260 seconds]
pr0ton has joined #ruby-lang
Savoyard has quit [Ping timeout: 245 seconds]
Savoyard has joined #ruby-lang
bmichelsen has quit [Quit: ZZZzzz…]
simi has joined #ruby-lang
red_menace has quit [Quit: Quit]
havenwood has quit []
senor_jalapeno has quit [Ping timeout: 264 seconds]
bmichelsen has joined #ruby-lang
Savoyard has quit [Quit: (null)]
kyb3r_ has joined #ruby-lang
matsutomo has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
stardiviner has quit [Ping timeout: 250 seconds]
kiyote23 has joined #ruby-lang
Torrieri has quit [Quit: Be back later ...]
Musashi007 has quit [Quit: Musashi007]
pwnz0r has quit [Remote host closed the connection]
matsutomo has quit [Client Quit]
kiyote23 has quit [Client Quit]
matsutomo has joined #ruby-lang
kiyote23 has joined #ruby-lang
Musashi007 has joined #ruby-lang
bears has quit [Remote host closed the connection]
bears_ has joined #ruby-lang
brushbox has joined #ruby-lang
hagabaka has joined #ruby-lang
Sadin has joined #ruby-lang
bmichelsen has quit [Quit: ZZZzzz…]
gix has quit [Ping timeout: 258 seconds]
dagda1 has quit [Ping timeout: 272 seconds]
dagda1 has joined #ruby-lang
gix has joined #ruby-lang
nofxx__ has quit [Ping timeout: 258 seconds]
stardiviner has joined #ruby-lang
emmesswhy has joined #ruby-lang
yourabi has joined #ruby-lang
yourabi has quit [Client Quit]
brushbox has quit [Quit: brushbox]
Sadin has quit [Remote host closed the connection]
brushbox has joined #ruby-lang
Savoyard has joined #ruby-lang
jo__ has quit [Quit: Connection closed for inactivity]
kiyote23 has quit [Remote host closed the connection]
Savoyard has quit [Ping timeout: 244 seconds]
kiyote23 has joined #ruby-lang
brushbox has quit [Quit: brushbox]
yatish27 has joined #ruby-lang
Manorie_x has joined #ruby-lang
loincloth has joined #ruby-lang
Savoyard has joined #ruby-lang
kiyote23 has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Remote host closed the connection]
oleo is now known as Guest48980
oleo__ has joined #ruby-lang
bmichelsen has joined #ruby-lang
pwnz0r has joined #ruby-lang
loincloth has quit [Ping timeout: 245 seconds]
yatish27 has quit [Remote host closed the connection]
Manorie_x has quit [Ping timeout: 272 seconds]
bmichelsen has quit [Client Quit]
Guest48980 has quit [Ping timeout: 256 seconds]
Savoyard has quit [Ping timeout: 250 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
djbkd has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
emmesswhy has joined #ruby-lang
stardiviner has quit [Ping timeout: 272 seconds]
ur5us has joined #ruby-lang
Iskarlar has quit [Remote host closed the connection]
elia has joined #ruby-lang
Iskarlar has joined #ruby-lang
ur5us has quit [Ping timeout: 245 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
pr0ton has quit [Ping timeout: 264 seconds]
kiyote23 has joined #ruby-lang
pr0ton has joined #ruby-lang
emmesswhy has joined #ruby-lang
emmesswhy has quit [Client Quit]
mrod has quit [Quit: Page closed]
SkramX_ has quit [Ping timeout: 260 seconds]
Asher has quit [Ping timeout: 260 seconds]
eristic has quit [Ping timeout: 260 seconds]
Asher2 has joined #ruby-lang
fclausen has quit [Quit: leaving]
SkramX__ has joined #ruby-lang
acadavid has quit [Ping timeout: 260 seconds]
_whitelogger has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ruby-lang
lele has joined #ruby-lang
lguardiola_ has quit [Ping timeout: 260 seconds]
eristic_ has joined #ruby-lang
adambeynon_ has joined #ruby-lang
acadavid has joined #ruby-lang
matsutomo has quit [Quit: matsutomo]
mjc_ has joined #ruby-lang
lguardiola has joined #ruby-lang
charliesome has quit [Quit: zzz]
oleo__ has quit [Quit: Verlassend]
djbkd has quit [Remote host closed the connection]
|jemc| has quit [Ping timeout: 256 seconds]
Iskarlar_ has joined #ruby-lang
matsutomo has joined #ruby-lang
loincloth has joined #ruby-lang
|jemc| has joined #ruby-lang
loincloth has quit [Ping timeout: 258 seconds]
charliesome has joined #ruby-lang
kiyote23 has quit [Ping timeout: 264 seconds]
charliesome has quit [Read error: Connection reset by peer]
symm- has joined #ruby-lang
charliesome has joined #ruby-lang
hahuang65 has quit [Quit: WeeChat 1.0.1]
symm- has quit [Ping timeout: 272 seconds]
Xzanron has joined #ruby-lang
emmesswhy has joined #ruby-lang
Xzanron has quit [Client Quit]
Xzanron has joined #ruby-lang
x-light has quit [Remote host closed the connection]
gjaldon has quit []
elia has quit [Quit: Computer has gone to sleep.]
Xzanron has quit [Client Quit]
Xzanron has joined #ruby-lang
charliesome has quit [Quit: zzz]
Forgetful_Lion has joined #ruby-lang
loincloth has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 1.0.1]
Xzanron has quit [Read error: Connection reset by peer]
kapil__ has joined #ruby-lang
loincloth has quit [Ping timeout: 245 seconds]
TvL2386 has joined #ruby-lang
Iskarlar_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Manorie_x has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
Savoyard has joined #ruby-lang
apeiros_ has quit [Ping timeout: 264 seconds]
duderonomy has quit [Ping timeout: 245 seconds]
RobertBirnie has joined #ruby-lang
Savoyard has quit [Ping timeout: 264 seconds]
Manorie_x has quit [Ping timeout: 258 seconds]
matsutomo has quit [Quit: matsutomo]
matsutomo has joined #ruby-lang
hahuang62 has quit [Ping timeout: 265 seconds]
ur5us has joined #ruby-lang
pwnz0r has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 265 seconds]
Xzanron has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simi has quit [Ping timeout: 250 seconds]
oak has quit [Remote host closed the connection]
|jemc| has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby-lang
ta has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 256 seconds]
miqui_ has quit [Ping timeout: 264 seconds]
Sadin has joined #ruby-lang
mistym has quit [Remote host closed the connection]
simi has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
Sadin has quit [Ping timeout: 258 seconds]
bears_ has quit [Remote host closed the connection]
snoopybbt has quit [Ping timeout: 250 seconds]
marr has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
cleopatra has joined #ruby-lang
emmesswhy has quit [Quit: This computer has gone to sleep]
emmesswhy has joined #ruby-lang
mcclurmc has joined #ruby-lang
lapide_viridi has joined #ruby-lang
mcclurmc has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Quit: WeeChat 1.0.1]
ta has joined #ruby-lang
ta has quit [Remote host closed the connection]
ta has joined #ruby-lang
rolfb_ has joined #ruby-lang
amclain has quit [Quit: Leaving]
rolfb_ has quit [Client Quit]
ruby-lang858 has joined #ruby-lang
<ruby-lang858>
Hi all
<ruby-lang858>
I am new to ruby
<ruby-lang858>
I would like to create a properties file in Ruby. Can some one help me please
vondruch has joined #ruby-lang
<ruby-lang858>
I would like to create a properties file in Ruby. Can some one help me please
<ljarvis>
ruby-lang858: what is your actual question?
<ruby-lang858>
Hi LJarvis
<ruby-lang858>
I am new bee to Ruby
mikecmpbll has joined #ruby-lang
<ruby-lang858>
I would like to create a file which is a collection of Key and value pair kind of thing. which is same as Properties file in JAVA
<ljarvis>
ruby-lang858: you should use a proper file format if you possibly can
<ljarvis>
like yaml, for example
<ruby-lang858>
is YAML it a format ?
<ruby-lang858>
i mean just like xml ??
st0mar has quit [Ping timeout: 265 seconds]
elia has joined #ruby-lang
<ljarvis>
ruby-lang858: it's a format, unlike xml, which is more readable, less verbose, and nice for configuration files (which it sounds like you want)
<ruby-lang858>
Thank you Jarvis
<ruby-lang858>
I got an idea
snoopybbt has joined #ruby-lang
<ruby-lang858>
thank you fro your help
matsutomo has quit [Quit: matsutomo]
<ljarvis>
no probs
ruby-lang858 has left #ruby-lang [#ruby-lang]
matsutomo has joined #ruby-lang
chinmay_dd has joined #ruby-lang
mnngfltg has joined #ruby-lang
Manorie_x has joined #ruby-lang
Savoyard has joined #ruby-lang
Manorie_x has quit [Ping timeout: 245 seconds]
<yorickpeterse>
morning
<yorickpeterse>
yay we have a christmas tree in the office
rolfb_ has joined #ruby-lang
Savoyard has quit [Ping timeout: 258 seconds]
rolfb_ has quit [Client Quit]
lapide_viridi has quit [Ping timeout: 255 seconds]
snoopybbt has quit [Ping timeout: 250 seconds]
apeiros_ has joined #ruby-lang
<ljarvis>
my christmas tree is still in a box in the living room
<ljarvis>
might wrap some lights around the box
Musashi007 has joined #ruby-lang
charliesome has joined #ruby-lang
duderonomy has joined #ruby-lang
duderonomy has quit [Max SendQ exceeded]
st0mar has joined #ruby-lang
hendranata_ has quit [Quit: Leaving]
GBrawl has joined #ruby-lang
st0mar has quit [Read error: Connection reset by peer]
st0mar has joined #ruby-lang
ur5us has joined #ruby-lang
GBrawl has quit [Quit: (null)]
st0mar has quit [Client Quit]
ur5us has quit [Ping timeout: 256 seconds]
shuriu has joined #ruby-lang
kyb3r_ has quit [Quit: Leaving]
sirfilip has joined #ruby-lang
Iskarlar_ has joined #ruby-lang
workmad3 has joined #ruby-lang
<sirfilip>
morning
midhir has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
yusuf has quit [Quit: Leaving.]
kiyote23 has joined #ruby-lang
kiyote23 has quit [Ping timeout: 245 seconds]
toretore has joined #ruby-lang
DefV has quit [Ping timeout: 245 seconds]
kapil__ has quit [Quit: Connection closed for inactivity]
matsutomo has quit [Quit: matsutomo]
arBmind has quit [Quit: Leaving.]
kapil__ has joined #ruby-lang
octodoodle has joined #ruby-lang
octodoodle has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
emmesswhy has quit [Quit: This computer has gone to sleep]
djbkd has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 250 seconds]
skade has quit [Quit: Computer has gone to sleep.]
jxie has quit [Ping timeout: 272 seconds]
caseypatrickdris has joined #ruby-lang
jxie has joined #ruby-lang
Iskarlar_ has quit [Ping timeout: 250 seconds]
enkristoffer has joined #ruby-lang
Iskarlar_ has joined #ruby-lang
emmesswhy has joined #ruby-lang
jxie has quit [Ping timeout: 260 seconds]
jxie has joined #ruby-lang
emmesswhy has quit [Client Quit]
arBmind1 has quit [Quit: Leaving.]
matsutomo has joined #ruby-lang
Torrieri has joined #ruby-lang
Torrieri has joined #ruby-lang
wprice has joined #ruby-lang
Manorie_x has joined #ruby-lang
rsl has joined #ruby-lang
Manorie_x has quit [Client Quit]
ruby-lang206 has joined #ruby-lang
ikrima has joined #ruby-lang
cornerma1 has joined #ruby-lang
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
iamninja has quit [Quit: ZZZzzz…]
dangerousdave has joined #ruby-lang
<ledestin>
naming question. say, I have a task to do, and I store task names in a different table. so, in Rails, I’d have task.task_name.name, which kind of sucks.
<ledestin>
after more consideration, I’m thinking, maybe I don’t want to make a separate table from names
ikrima has quit [Ping timeout: 245 seconds]
chinmay_dd has joined #ruby-lang
<ledestin>
ljarvis: and the question is, how would you name it?
jxie has quit [Ping timeout: 272 seconds]
jxie has joined #ruby-lang
chills42_ has joined #ruby-lang
chills42 has quit [Ping timeout: 245 seconds]
<ljarvis>
ledestin: I don't really understand the code if I'm honest, so I can't reliably make any suggestions. Do you have any basic code to show us the problem?
<ljarvis>
ledestin: right, having TaskName with just 1 name attribute doesn't really make sense
<ledestin>
ljarvis: unless it’s in a db
shuriu has joined #ruby-lang
<ljarvis>
im not sure how that makes a difference
Savoyard has joined #ruby-lang
<ledestin>
let’s say there’s a lot of repetition expected
<ljarvis>
why can't Task just have a 'name' attribute
<ljarvis>
that is a string
<ledestin>
1. takes more spac
<ledestin>
2. select distinct costs more
<ljarvis>
you're not exposing enough information for anyone to help you
<ledestin>
whether that’s something that really matters, I wonder
<ledestin>
ljarvis: what is missing?
<ledestin>
I’m just expecting some names to be used time and time again
Bwild has quit [Quit: leaving]
<ljarvis>
everything? what does this have to do with dataabses? you've just brought that up with no context, how does storing a string on a 'task' take up more space? more space in memory? in the db? how?
<ledestin>
in the db
<ljarvis>
to 'TaskName' maps to a db table?
<ljarvis>
so*
<ledestin>
yes
<ljarvis>
right, that info would have helped ;)
<ljarvis>
what dbms are you using?
<ljarvis>
um, orm
<ljarvis>
if you're using one
<ledestin>
Postgres
<ledestin>
ActiveRecord
<ljarvis>
can you show the AR models and the relationship between a Task and TaskName
Savoyard has quit [Ping timeout: 265 seconds]
<darix>
it smells a bit like "i want to have tasks and sub tasks"
<darix>
and taskname is just a task without any actual data
<darix>
but that's just me
<ljarvis>
who knows, we basically know nothing still
<ljarvis>
ledestin: ok, and you have an instance of Task::Instance? (lol)
<ledestin>
:(
<ljarvis>
so, task.task_name.name sucks?
<ljarvis>
amirite?
<ledestin>
sure
[spoiler] has joined #ruby-lang
<ljarvis>
delegate :name, to: :task_name
<ljarvis>
task.name
<ljarvis>
done
kiyote23 has joined #ruby-lang
Xzanron_ has quit [Ping timeout: 244 seconds]
<ledestin>
ljarvis: well, I still have to reference it in #rename
sankaber has joined #ruby-lang
<ljarvis>
rename sucks, use `def name=(new_name); self.task_name = Task::Name.find_or_create_by(name: new_name)`
<ljarvis>
this is ruby after all
<ljarvis>
then now you have `name=(str)` and `name => str` methods
<ljarvis>
all is good in the world
<darix>
but this is basically task and subtask
<ledestin>
ljarvis: thanks, didn’t think about that
<ljarvis>
darix: no its not
<darix>
ok
gjaldon has quit [Remote host closed the connection]
bmichelsen has joined #ruby-lang
<ljarvis>
ledestin: overriding methods like this works quite nicely, and if you know `X=(s)` & `X()#=>s` then it's good
bmichelsen has quit [Client Quit]
<yorickpeterse>
darix: wat
jxie has quit [Ping timeout: 244 seconds]
<ljarvis>
ledestin: also fwiw, I see nothing wrong with just having one `Task` model and having non-unique names, with an index
<ljarvis>
that'll save lots of JOIN and multiple queries
<ljarvis>
i don't see any reason for not having 'name' as a text type on Task, but maybe there's something behind the scenes im mising
<ljarvis>
missing*
<ledestin>
ljarvis: I guess it’d make sense to test if it makes any difference to split
jxie has joined #ruby-lang
<ljarvis>
ledestin: sure, I guess i'm just a bit confused why you'd think to split it, ever. Is this to help speed up bulk renames?
cornerma1 has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
<ledestin>
ljarvis: speeding up select distinct for completion
<ljarvis>
ledestin: do you have millions of records?
<ledestin>
ljarvis: nope
<ljarvis>
ledestin: hundreds of thousands?
<ledestin>
ljarvis: hardly
<ljarvis>
you see where I'm going with this?
<ledestin>
yep
<ledestin>
it seems like a user might produce 7300 records per year
<ljarvis>
I reckon you've over optimised and it's come at the cost of readable code. But it's worth testing
<ledestin>
if I count 20 tasks per day
<ledestin>
then again, I might just purge them
<ljarvis>
you could create table in postgres using generate_series to generate 1 million records, then try and distinct select on them, and then do the same with a foreign table
cornerman has quit [Ping timeout: 264 seconds]
Iskarlar_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cornerma1 is now known as cornerman
<ljarvis>
but, i reckon it's faster than you'd think, and plenty fast enough
<ledestin>
ljarvis: I’ll try that, thanks
mattyohe has joined #ruby-lang
<ljarvis>
I use something similar to complete around 600,000 records and i just do select distinct on a column
SuMo_D has quit [Quit: Off into this... Real world place...]
mcclurmc has joined #ruby-lang
<yorickpeterse>
Ah yes, good old repairDatabase
<yorickpeterse>
The last time I ran that my whole cluster froze for a day
<ljarvis>
frozen clusters
<ljarvis>
now im hungry
chinmay_dd has quit [Ping timeout: 250 seconds]
<nofxx__>
yorickpeterse, it 's gonne in some 2.x version , but it still needs a rebuild once in a while as deletes don't seem to clean up disk space
<yorickpeterse>
Correct, fragmentation is still present
<nofxx__>
that toku claims the fractal fixes that too... actually in the disk size part it's pretty impressive
nathanstitt has quit [Quit: I growing sleepy]
druznek has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
ta has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
<yorickpeterse>
fantastic
ikrima has quit [Ping timeout: 244 seconds]
<yorickpeterse>
ActiveRecord converts "blob" in MySQL to "bytea" in Pg
<ljarvis>
maloik: did you book bath ruby? i forgot on the first time around
<maloik>
we did!
Savoyard has quit [Quit: (null)]
mcclurmc has quit [Remote host closed the connection]
<apeiros_>
yorickpeterse: isn't that what it should be?
mcclurmc has joined #ruby-lang
Savoyard has joined #ruby-lang
<yorickpeterse>
apeiros_: Not if it's being used as a replacement for "text" basically
<yorickpeterse>
nfi why this is using blob in the first place, text should've been fine in mysql
<yorickpeterse>
it's just storing some JSON crap
<apeiros_>
yorickpeterse: shouldn't it be clob in mysql then? instead of blob?
<yorickpeterse>
There's no reason for it to use blob in the first place, we're not stuffing TBs of data in this field
<apeiros_>
if you store json, you might use its native format for it
<apeiros_>
well, even pg's varchars are almost arbitrary length
<apeiros_>
not the common 256 chars/bytes
<ljarvis>
text > *
jxie has quit [Ping timeout: 265 seconds]
nofxx_ has joined #ruby-lang
nofxx_ has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
jxie has joined #ruby-lang
<yorickpeterse>
apeiros_: Yeah, although we never query this field
<yorickpeterse>
it basically contains a JSON backup of some data it was related to
chinmay_dd has joined #ruby-lang
<apeiros_>
yeah, it can help to be able to run manual queries against it
<apeiros_>
and I think it has no downside
<apeiros_>
but: I *think*. I have no experience there (yet).
<yorickpeterse>
"has no downside" famous last words :P
nofxx__ has quit [Ping timeout: 255 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kiyote23 has joined #ruby-lang
sross07_work has joined #ruby-lang
<yorickpeterse>
oh ffs, more encoding troubles
<apeiros_>
yorickpeterse: because no other words were needed anymore? :)
Xzanron has quit [Quit: Leaving]
charliesome has quit [Quit: zzz]
shambrarian has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
malconis has joined #ruby-lang
leandrosnunes has joined #ruby-lang
kiyote23 has joined #ruby-lang
<yorickpeterse>
Ah yes, String#force_encoding
<yorickpeterse>
The one method that magically makes any encoding problems go away
<yorickpeterse>
Can't convert ASCII to UTF8? Force it!
<yorickpeterse>
Can't write proper data in the first place? Fuck it, force it!
gwendall has joined #ruby-lang
momomomomo has joined #ruby-lang
scampbell has joined #ruby-lang
arooni-mobile__ has quit [Quit: Leaving]
shinnya has joined #ruby-lang
chills42 has joined #ruby-lang
senor_jalapeno has joined #ruby-lang
mcclurmc has joined #ruby-lang
kapil__ has quit [Quit: Connection closed for inactivity]
enkristoffer has quit [Quit: ❤]
stardiviner has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
kiyote23 has quit [Remote host closed the connection]
bmichelsen has joined #ruby-lang
mcclurmc has joined #ruby-lang
whippythellama has joined #ruby-lang
kiyote23 has joined #ruby-lang
tenderlove has joined #ruby-lang
nathanstitt has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
mcclurmc has quit [Remote host closed the connection]
kiyote23 has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
gjaldon has joined #ruby-lang
tenderlove has quit [Ping timeout: 258 seconds]
nathanstitt has quit [Quit: I growing sleepy]
mcclurmc has quit [Remote host closed the connection]
rippa has joined #ruby-lang
chinmay_dd has quit [Ping timeout: 264 seconds]
shuriu has quit [Remote host closed the connection]
unsymbol has quit [Ping timeout: 245 seconds]
tenderlove has joined #ruby-lang
mistym has joined #ruby-lang
Iskarlar_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benlovell has quit [Ping timeout: 240 seconds]
mcclurmc has joined #ruby-lang
jkad1 has quit [Quit: WeeChat 1.0.1]
jds has joined #ruby-lang
mcclurmc has quit [Read error: Connection reset by peer]
mcclurmc has joined #ruby-lang
unsymbol has joined #ruby-lang
kurko__ has quit [Read error: Connection reset by peer]
kurko__ has joined #ruby-lang
Iskarlar_ has joined #ruby-lang
unsymbol has quit [Ping timeout: 250 seconds]
<apeiros_>
yorickpeterse: you are aware that all force_encoding does is change that little label which tells ruby what encoding a string has, right?
emmesswhy has joined #ruby-lang
<apeiros_>
which - if it truly works - means that the label was set to the wrong value when the string was created…
<yorickpeterse>
apeiros_: lalalalalala *sticks head in sand* lalala
<yorickpeterse>
But yeah, I know it's a hack
emmesswhy has quit [Client Quit]
<apeiros_>
yorickostrich
unsymbol has joined #ruby-lang
klmlfl has joined #ruby-lang
iamninja has quit [Quit: ZZZzzz…]
emmesswhy has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
|jemc| has joined #ruby-lang
|jemc| has quit [Client Quit]
|jemc| has joined #ruby-lang
unsymbol has quit [Ping timeout: 272 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
mcclurmc has quit [Remote host closed the connection]
sankaber has quit [Read error: Connection reset by peer]
sankaber has joined #ruby-lang
mcclurmc has joined #ruby-lang
sirfilip has quit [Quit: Leaving]
gwendall has quit [Remote host closed the connection]
sross07_work is now known as sross07
chills42 has quit [Remote host closed the connection]
emmesswhy has joined #ruby-lang
<yorickpeterse>
"[1855770/1910064] [ 97.16%] [43:44] [01:16] [ 706.98/s]" so close щ(゚д゚щ)
Sadin has joined #ruby-lang
<twe4ked>
I have a (JSON) string that throws an error if I try to parse it. If I parse the same string but interpolated "#{foo}" it works. The strings look identical to me, what else could be causing this error?
<twe4ked>
oh, probably should have mentioned I'm using rubymotion, maybe I should ask there :S
ikrima has joined #ruby-lang
__butch__ has joined #ruby-lang
tenderlove has quit [Ping timeout: 256 seconds]
<darix>
twe4ked: it would help if you share the json string
<twe4ked>
the string is `{"password"=>"foo", "email"=>"bar"}`
<twe4ked>
calling `dup` fixes it
<twe4ked>
now I want to know why
tenderlove has joined #ruby-lang
<darix>
i guess you typed the manually here right? ``
rheddry is now known as levifig
bmichelsen has quit [Quit: ZZZzzz…]
symm- has joined #ruby-lang
<darix>
twe4ked: your error is "unexpected token at" ?
<darix>
twe4ked: i think ... the "=>" is ruby syntax
<darix>
if you do {"password"=>"foo", "email"=>"bar"}.to_json
<pipework>
mustmodify: What are you having trouble with understanding about it?
<mustmodify>
why it exists.
<mustmodify>
I understand what it does
michaeldeol has joined #ruby-lang
<pipework>
Because someone wrote it and it was seen to be a good thing.
kiyote23 has quit [Remote host closed the connection]
<mustmodify>
pipework: following your logic, let me refine my question. In what way is it a good / useful thing?
<ljarvis>
mustmodify: it's provided for symetry, nothing else
<mustmodify>
what problem can be solved with it that can not be solved by not having it?
<ljarvis>
nothing, there's a unary minus, so there's a unary plus
<|jemc|>
mustmodify: you could monkey patch the method to do something other than what it does - I often fantasize about publishing a math-mayhem gem that monkey patches math operations for wacky troubleshooting fun
<pipework>
mustmodify: It allows you to specify positive numerics as positive.
<ljarvis>
lol
<mustmodify>
maybe it makes them feel better (more positive) about themselves?
<pipework>
I wonder what happens if you're on a 32-bit system and use the largest number + 1 without specifying the +
<ljarvis>
:/
<ljarvis>
+x returns x, always
<ljarvis>
it really is just for symmetry
tenderlove has joined #ruby-lang
chills42 has quit [Ping timeout: 265 seconds]
<ljarvis>
(unless some asshole monkeypatched it)
<|jemc|>
;)
<mustmodify>
If it created a local variable it could be used for ... what's it called? Reverse polish notation?
pwnz0r has quit [Remote host closed the connection]
<pipework>
I don't think so.
<mustmodify>
but would be too magical.
<mustmodify>
pipework: Ah, yeah, that's not it.
<mustmodify>
RPN is 3 4 +
tenderlove has quit [Read error: Connection reset by peer]
<pipework>
I think you meant prefix notation.
<ljarvis>
so, polish notation without reverse? :D
<mustmodify>
Polish notation is + 3 4 but this would be
<mustmodify>
+3
<mustmodify>
+4
<pipework>
Or PN without the R
<mustmodify>
ljarvis: or RRPN
<mustmodify>
Kindergartener notation.
<ljarvis>
:D
<pipework>
ROT26 + PN
joast has joined #ruby-lang
gwendall_ has joined #ruby-lang
gwendall has quit [Ping timeout: 265 seconds]
nathanstitt has quit [Ping timeout: 264 seconds]
tenderlove has joined #ruby-lang
nathanstitt has joined #ruby-lang
pwnz0r has joined #ruby-lang
_djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
djbkd has quit [Read error: Connection reset by peer]
micaeked has joined #ruby-lang
djbkd has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mcclurmc has quit [Remote host closed the connection]
pwnz0r has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
nathanstitt has quit [Ping timeout: 264 seconds]
nathanstitt has joined #ruby-lang
Savoyard has quit [Quit: (null)]
mcclurmc has joined #ruby-lang
nathanstitt has quit [Ping timeout: 272 seconds]
cmhobbs has quit [Remote host closed the connection]
matp has quit [Ping timeout: 244 seconds]
gwendall_ has quit [Ping timeout: 265 seconds]
Bwild has quit [Ping timeout: 264 seconds]
gwendall has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
Savoyard has joined #ruby-lang
mcclurmc has joined #ruby-lang
tcopeland1 has quit [Ping timeout: 245 seconds]
bin7me has quit [Read error: Connection reset by peer]
Savoyard has quit [Ping timeout: 264 seconds]
nofxx has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby-lang
djbkd has joined #ruby-lang
Manorie_x has joined #ruby-lang
matp has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
gwendall_ has joined #ruby-lang
terabytest has joined #ruby-lang
tenderlo_ has joined #ruby-lang
djbkd has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
tenderlo_ is now known as tenderlove
enebo has quit [Quit: enebo]
gwendall has quit [Ping timeout: 264 seconds]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
havenn has joined #ruby-lang
havenwood has quit [Ping timeout: 250 seconds]
emmesswhy has joined #ruby-lang
havenn has quit [Remote host closed the connection]
Sgeo has quit [Quit: No Ping reply in 180 seconds.]
Sgeo has joined #ruby-lang
havenwood has joined #ruby-lang
skade has joined #ruby-lang
bmichelsen has quit [Quit: ZZZzzz…]
havenwood has quit [Ping timeout: 250 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stamina has joined #ruby-lang
bmichelsen has joined #ruby-lang
charliesome has quit [Quit: zzz]
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has quit [Ping timeout: 272 seconds]
shambrarian has quit [Read error: Connection reset by peer]
guillaume-rb has quit [Quit: guillaume-rb]
skade has quit [Quit: Computer has gone to sleep.]
dagda1 has joined #ruby-lang
dagda1 has quit [Client Quit]
iamninja has joined #ruby-lang
senor_jalapeno has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby-lang
symm- has quit [Ping timeout: 255 seconds]
micechal has joined #ruby-lang
micechal_ has quit [Ping timeout: 256 seconds]
Sgeo has quit [Quit: No Ping reply in 180 seconds.]
ItSANgo has quit [Quit: Leaving...]
caseypatrickdris has quit [Remote host closed the connection]