<zenspider>
based on what? you're being beyond vague
kareelee has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
<Suresh>
zenspider if you have nothing to recommend or say something good then stfu thx :)
polysics has joined #ruby
edwinvdgraaf has joined #ruby
<zenspider>
!kick Suresh don't be rude or dumb when asking for help
Suresh was kicked from #ruby by ruby[bot] [don't be rude or dumb when asking for help]
kareelee has quit [Ping timeout: 258 seconds]
ruby-lang371 has joined #ruby
polysics has quit [Ping timeout: 250 seconds]
enyo has joined #ruby
Rodya_ has joined #ruby
kareelee has joined #ruby
blackbombay has joined #ruby
spenser has joined #ruby
milardovich has joined #ruby
enyo has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
blackbom1 has quit [Ping timeout: 246 seconds]
__Yiota has joined #ruby
maloik89 has quit [Remote host closed the connection]
maloik has joined #ruby
russt has joined #ruby
kareelee has quit [Ping timeout: 265 seconds]
scroy has joined #ruby
spenser has quit [Ping timeout: 245 seconds]
nankyokusei has quit [Ping timeout: 258 seconds]
pytuger has joined #ruby
milardovich has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
kareelee has joined #ruby
duderonomy has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
spenser has joined #ruby
Morrolan has quit [Quit: Goodbye]
Morrolan has joined #ruby
edwinvdgraaf has quit [Ping timeout: 252 seconds]
rykou has quit [Ping timeout: 252 seconds]
__Yiota has joined #ruby
yeticry_ has joined #ruby
yeticry has quit [Ping timeout: 264 seconds]
Rodya_ has quit [Remote host closed the connection]
scroy has quit [Quit: scroy]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 252 seconds]
kareelee has quit [Ping timeout: 258 seconds]
duderonomy has joined #ruby
kareelee has joined #ruby
charliesome has joined #ruby
bocaneri has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<adam12>
evening
kareelee has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
<zenspider>
adam12: 'lo
<adam12>
zenspider: you do any web dev lately?
<zenspider>
adam12: I have
<adam12>
preferred tooling?
<zenspider>
depends on what you're doing. rails is fine for normal stuff... for rpc I still usually do rails but I'll do sinatra if it needs to be more performant
postmodern has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
<adam12>
Eh - I've done Rails for a decade now. Kinda over it.
<adam12>
I've done Sinatra but I don't think performance gains are there - at least not in microbenchmarks :\ Hobbit and Watts have me interested.
<zenspider>
microbenchmarks are usually meaningless
<adam12>
I agree, mostly.
<adam12>
For me it wasn't the performance, it was objects allocated + memory
bronson has quit [Ping timeout: 258 seconds]
polysics has joined #ruby
<zenspider>
well... we were doing 99k rpm on rails just fine. Switched up to sinatra to cross that threshold. and that was on worse GC, so it's probably better today just via upgrading to 2.3 or 2.4
<zenspider>
using the latest sparkly is never my interest
ruby-lang371 has quit [Ping timeout: 260 seconds]
<adam12>
;)
<zenspider>
a billion hits a week is fine by me. macrobenchmarks are more meaningful
polysics has quit [Ping timeout: 268 seconds]
djbkd has joined #ruby
<havenwood>
adam12: I think Hobbit is nifty but I'd probably not build anything with it. I really do like Roda a lot! Give it a look if you haven't yet.
<adam12>
I've tried it. I _just_ can't get into the routing tree.
kareelee has joined #ruby
<adam12>
Which is a shame because Jeremy ships a bunch of nicely maintained tools
<havenwood>
adam12: And the plugins are so nice!
<adam12>
I've been using Padrino which is nice but I can't help but wonder if a 20 line wrapper around Rack is better for my brain.
<adam12>
What's your reasoning behind not building with Hobbit?
eizua has joined #ruby
meshsmith has quit [Remote host closed the connection]
milardovich has joined #ruby
<havenwood>
adam12: I love the minimalism and readable code but I'd quickly run into having to do everything myself and wish I had plugins I didn't have to write myself at every turn.
<havenwood>
adam12: If you really don't need the niceties I understand the appeal!
<adam12>
Interesting. I took a small inventory in my head about what I would miss from Rails and essentially my biggest miss would of been form builders.
<adam12>
Which I get a nice equivalent with Erubi+Forme (both Jeremy libs)
kareelee has quit [Ping timeout: 250 seconds]
<havenwood>
adam12: Looking through the plugins and seeing what I'd miss. How about csrf?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adam12>
havenwood: How do you find keeping your head structured in the routing tree? I had a small app and was constantly confused at what depth I was at.
Lord_of_Life has quit [Excess Flood]
Rodya_ has joined #ruby
aremaref has joined #ruby
kareelee has quit [Ping timeout: 265 seconds]
Lord_of_Life has joined #ruby
<havenwood>
I've found keeping track of my place is worth the code in one place with reuse across relevant routes. I salve the confusion with a one-line comment example of above each route like: # GET /username/foobar/posts
<adam12>
And I guess you just became acclimated to the r.is, r.on, etc?
<havenwood>
You can also extract sections with deeply nested routes or even submount addition roda apps.
kus has quit [Quit: Konversation terminated!]
<havenwood>
adam12: Yeah, I'm still not acclimated to that. :-)
montanonic has quit [Ping timeout: 252 seconds]
kareelee has joined #ruby
<adam12>
I just looked back at the app I did in Roda. Hard to get my bearings.
edwinvdgraaf has joined #ruby
pwnd_nsfw` has joined #ruby
kareelee has quit [Ping timeout: 258 seconds]
arescorpio has joined #ruby
harai_ has joined #ruby
scroy has joined #ruby
pwnd_nsfw has quit [Ping timeout: 248 seconds]
edwinvdgraaf has quit [Ping timeout: 250 seconds]
kareelee has joined #ruby
<bougyman>
adam12: tried roda?
<adam12>
bougyman: Yes.
<bougyman>
oic, already talked about it.
<adam12>
I'm not a routing tree person it seems.
<bougyman>
I think manveru has innate/ramaze going again, for another alternative.
<adam12>
Thanks.
Kero has quit [Remote host closed the connection]
LoneHermit has joined #ruby
kareelee has quit [Ping timeout: 250 seconds]
LoneHermit has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
kareelee has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 256 seconds]
libastral has joined #ruby
polysics has joined #ruby
edwinvdgraaf has quit [Ping timeout: 246 seconds]
kareelee has joined #ruby
spenser has quit [Ping timeout: 250 seconds]
polysics has quit [Ping timeout: 246 seconds]
Rodya_ has quit [Ping timeout: 240 seconds]
scroy has joined #ruby
kareelee has quit [Ping timeout: 256 seconds]
spenser has joined #ruby
moei has quit [Quit: Leaving...]
hanmac has quit [Ping timeout: 258 seconds]
moei has joined #ruby
spenser has quit [Ping timeout: 246 seconds]
skweek has joined #ruby
benlieb has joined #ruby
tdy has quit [Quit: tdy]
kareelee has joined #ruby
tdy has joined #ruby
hanmac has joined #ruby
spenser has joined #ruby
Rodya_ has joined #ruby
kareelee has quit [Ping timeout: 264 seconds]
bluOxigen has joined #ruby
pwnd_nsfw has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
kareelee has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 260 seconds]
tubuliferous has joined #ruby
enyo has joined #ruby
Rodya_ has quit [Remote host closed the connection]
arescorpio has quit [Quit: Leaving.]
benlieb has quit [Quit: benlieb]
jenrzzz has joined #ruby
enyo has quit [Ping timeout: 248 seconds]
<oneop>
Will using bigger bit sizes slow down a program when using floats?
<elomatreb>
You really shouldn't worry about such details when using Ruby, as there is a lot of abstraction with a much higher cost
Rodya_ has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Skusman has quit [Quit: ChatZilla 0.9.93 [Firefox 50.1.0/20161208153507]]
_Skusman_ has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya__ has joined #ruby
bronson has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
polysics has joined #ruby
edwinvdgraaf has joined #ruby
bronson has quit [Ping timeout: 246 seconds]
nitrix is now known as nitri-xmas
braincrash has quit [Quit: bye bye]
jshjsh has joined #ruby
spenser has quit [Ping timeout: 258 seconds]
kareelee has quit [Ping timeout: 264 seconds]
__Yiota has joined #ruby
kareelee has joined #ruby
travv0` has joined #ruby
travv0` has left #ruby [#ruby]
JoshS has quit [Ping timeout: 268 seconds]
nankyokusei has joined #ruby
Rodya__ has quit [Ping timeout: 246 seconds]
milardovich has joined #ruby
kareelee has quit [Ping timeout: 250 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZU has quit [Read error: Connection reset by peer]
dtzu has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 245 seconds]
kareelee has joined #ruby
milardovich has quit [Ping timeout: 264 seconds]
tubuliferous has quit [Ping timeout: 240 seconds]
spenser has joined #ruby
roflmyeggo has quit [Ping timeout: 260 seconds]
kareelee has quit [Ping timeout: 258 seconds]
roflmyeggo has joined #ruby
scroy has quit [Quit: scroy]
kareelee has joined #ruby
doubleemms has joined #ruby
blackbombay has quit [Ping timeout: 265 seconds]
montanonic has quit [Ping timeout: 252 seconds]
doubleemms has quit [Remote host closed the connection]
gizmore|2 has joined #ruby
kareelee has quit [Ping timeout: 258 seconds]
tubuliferous has joined #ruby
gizmore has quit [Ping timeout: 248 seconds]
kareelee has joined #ruby
edwinvdgraaf has quit [Ping timeout: 258 seconds]
braincrash has joined #ruby
DTZUZU has joined #ruby
jtdoncas has joined #ruby
kareelee has quit [Ping timeout: 256 seconds]
dtzu has joined #ruby
oneop has quit [Remote host closed the connection]
montanonic has joined #ruby
gix has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
grossghost has joined #ruby
kareelee has joined #ruby
grossghost has quit [Client Quit]
gix has joined #ruby
optiz0r has joined #ruby
milardovich has quit [Ping timeout: 264 seconds]
_Skusman_ has quit [Quit: leaving]
kareelee has quit [Ping timeout: 268 seconds]
Skusman has joined #ruby
kareelee has joined #ruby
LoneHerm_ has joined #ruby
Skusman has quit [Client Quit]
grossghost has joined #ruby
Skusman has joined #ruby
pilne has quit [Quit: Quitting!]
grossghost has quit [Client Quit]
kareelee has quit [Ping timeout: 245 seconds]
bronson has joined #ruby
UserJosh has joined #ruby
antoniobeyah has joined #ruby
kareelee has joined #ruby
jshjsh has quit [Ping timeout: 265 seconds]
bronson has quit [Ping timeout: 265 seconds]
kareelee has quit [Ping timeout: 260 seconds]
UserJosh is now known as JoshS
testuser1 has quit [Quit: Leaving.]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kareelee has joined #ruby
tubuliferous has quit [Ping timeout: 258 seconds]
ChubbyBreakfast1 has joined #ruby
spenser has quit [Ping timeout: 250 seconds]
roflmyeggo has quit [Quit: Lost terminal]
Vile` has joined #ruby
tubuliferous has joined #ruby
spenser has joined #ruby
g_maeda has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
LoneHermit has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LoneHermit has quit [Remote host closed the connection]
LoneHermit has joined #ruby
LoneHermit has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 245 seconds]
enyo has joined #ruby
cyphase has quit [Ping timeout: 258 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
edwinvdgraaf has joined #ruby
enyo has quit [Ping timeout: 252 seconds]
jtdoncas has quit [Ping timeout: 268 seconds]
cyphase has joined #ruby
spenser has quit [Ping timeout: 250 seconds]
harfangk has joined #ruby
moogumbo has joined #ruby
kareelee has quit [Ping timeout: 256 seconds]
kareelee has joined #ruby
Vile` has quit [Ping timeout: 245 seconds]
kareelee has quit [Ping timeout: 245 seconds]
SteenJobs has joined #ruby
A_Drone has quit []
nofxx has joined #ruby
spenser has joined #ruby
kareelee has joined #ruby
SteenJobs has quit [Quit: peaceee]
skydiver has joined #ruby
montanonic has quit [Ping timeout: 248 seconds]
tmtwd has joined #ruby
kareelee has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
kareelee has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
edwinvdgraaf has quit [Ping timeout: 250 seconds]
izaac_ has quit [Ping timeout: 252 seconds]
Devalo has joined #ruby
kareelee has quit [Ping timeout: 245 seconds]
izaac has joined #ruby
nankyokusei has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
kareelee has joined #ruby
eizua has quit [Remote host closed the connection]
tubuliferous has quit [Ping timeout: 258 seconds]
nankyokusei has quit [Ping timeout: 250 seconds]
kareelee has quit [Ping timeout: 252 seconds]
brianpWins has quit [Ping timeout: 250 seconds]
tubuliferous has joined #ruby
Illianthe has joined #ruby
brianpWins has joined #ruby
Illianthe has quit [Max SendQ exceeded]
Illianthe has joined #ruby
ledestin has joined #ruby
ledestin has quit [Client Quit]
brianpWins has quit [Ping timeout: 258 seconds]
kareelee has joined #ruby
tubuliferous has quit [Ping timeout: 258 seconds]
ledestin has joined #ruby
brianpWins has joined #ruby
kareelee has quit [Ping timeout: 250 seconds]
kareelee has joined #ruby
milardovich has joined #ruby
kareelee has quit [Ping timeout: 258 seconds]
milardovich has quit [Ping timeout: 264 seconds]
joebobjoe has joined #ruby
kareelee has joined #ruby
agent_white has joined #ruby
joebobjoe has quit [Quit: leaving]
montanonic has joined #ruby
polysics has quit [Remote host closed the connection]
bronson has joined #ruby
edwinvdgraaf has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
kareelee_ has joined #ruby
kareelee has quit [Ping timeout: 250 seconds]
conta has joined #ruby
ledestin has joined #ruby
enyo has joined #ruby
Kero has joined #ruby
ledestin has quit [Client Quit]
enyo has quit [Ping timeout: 260 seconds]
blackbombay has joined #ruby
conta has quit [Ping timeout: 268 seconds]
blackbombay has quit [Ping timeout: 264 seconds]
kareelee_ has quit [Remote host closed the connection]
lightstalker has quit [Ping timeout: 245 seconds]
kareelee has joined #ruby
lightstalker has joined #ruby
kareelee_ has joined #ruby
kareelee has quit [Ping timeout: 248 seconds]
edwinvdgraaf has quit [Ping timeout: 245 seconds]
skweek has quit [Ping timeout: 256 seconds]
bluOxigen has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
milardovich has quit [Ping timeout: 264 seconds]
yeticry_ has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
yardenbar has joined #ruby
polysics has joined #ruby
bronson has joined #ruby
conta has joined #ruby
aremaref has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 256 seconds]
polysics has quit [Ping timeout: 260 seconds]
yaewa has joined #ruby
ahuman has quit [Ping timeout: 260 seconds]
ahuman has joined #ruby
moei has quit [Ping timeout: 250 seconds]
ledestin has joined #ruby
nankyokusei has joined #ruby
jshjsh has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
xen0fon has joined #ruby
JoshS has quit [Ping timeout: 268 seconds]
tildes has joined #ruby
rykou has joined #ruby
yeticry has quit [Ping timeout: 250 seconds]
antoniobeyah has quit [Quit: antoniobeyah]
A124 has quit [Ping timeout: 252 seconds]
yaewa has quit [Quit: Leaving...]
moei has joined #ruby
yeticry has joined #ruby
edwinvdgraaf has joined #ruby
Ishido has joined #ruby
rippa has joined #ruby
yeticry has quit [Remote host closed the connection]
yeticry has joined #ruby
conta has quit [Ping timeout: 252 seconds]
spenser has quit [Ping timeout: 264 seconds]
brianpWins has quit [Quit: brianpWins]
eizua has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yeticry has quit [Ping timeout: 264 seconds]
whathappens has joined #ruby
cyphase has quit [Ping timeout: 250 seconds]
yeticry has joined #ruby
walterheck has joined #ruby
tubuliferous has joined #ruby
Fernando-Basso has joined #ruby
cyphase has joined #ruby
yeticry has quit [Ping timeout: 265 seconds]
yeticry has joined #ruby
elastix has joined #ruby
dionysus69 has joined #ruby
brianpWins has joined #ruby
bronson has joined #ruby
whathappens has quit [Quit: Leaving...]
enyo has joined #ruby
edwinvdgraaf has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 258 seconds]
enyo has quit [Ping timeout: 268 seconds]
polysics_ has joined #ruby
gentoo has joined #ruby
tmtwd has quit [Ping timeout: 250 seconds]
djbkd has quit [Quit: Leaving...]
cibs has quit [Ping timeout: 268 seconds]
tmtwd has joined #ruby
cibs has joined #ruby
djbkd has joined #ruby
maattdd has joined #ruby
g_maeda has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
g_maeda has joined #ruby
jenrzzz has joined #ruby
gentoo has quit [Ping timeout: 252 seconds]
vuoto has joined #ruby
brianpWins has quit [Quit: brianpWins]
djbkd has quit [Remote host closed the connection]
g_maeda has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
walterheck has quit [Ping timeout: 252 seconds]
lizard2010 has joined #ruby
lizard2010 has quit [Client Quit]
vuoto has quit [Remote host closed the connection]
milardovich has joined #ruby
milardovich has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
A124 has joined #ruby
SpiffTR has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 246 seconds]
tmtwd has quit [Ping timeout: 264 seconds]
tildes has quit [Ping timeout: 248 seconds]
walterheck has joined #ruby
jenrzzz has joined #ruby
bluebell_ has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
edwinvdgraaf has joined #ruby
bronson has joined #ruby
bronson has quit [Ping timeout: 250 seconds]
LoneHermit has joined #ruby
pawnbox has quit [Remote host closed the connection]
nankyokusei has joined #ruby
LoneHermit has quit [Ping timeout: 265 seconds]
tubuliferous has quit [Ping timeout: 258 seconds]
puffyfluff has joined #ruby
aryaching has joined #ruby
tubuliferous has joined #ruby
tildes has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
SpiffTR has quit [Quit: Leaving.]
SpiffTR has joined #ruby
lolmaus_ has joined #ruby
milardovich has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
conta has joined #ruby
puffyfluff has quit [Quit: Simple IRC: The quit option.]
edwinvdgraaf has quit [Ping timeout: 258 seconds]
tildes has quit [Ping timeout: 264 seconds]
SpiffTR has quit [Quit: Leaving.]
maattdd has quit [Ping timeout: 256 seconds]
spenser has joined #ruby
tildes has joined #ruby
walterheck has quit [Ping timeout: 246 seconds]
<dionysus69>
I am looking for an algorithm that randomly distributes lets say 100 items. there should be lets say 10 packs each consisting with 20 items. so some of the items would have to be repeated but I want the final 10 packs to have 20 items as randomly distributed as possible, least amount repeatings and no items that are left unused
<dionysus69>
are there such functions in ruby or would I have to write it from scratch?
<pytuger>
dionysus: Would probably have to write from scratch, but I am not 100% sure TBH.
jenrzzz has quit [Ping timeout: 264 seconds]
<dionysus69>
this is kind of thing that many many people would need, so I expect ready method to exist :D just dont know how to search for it, I dont know how this kind of algorithm would be called
<dionysus69>
distributive random algorithm or something like that?
conta has quit [Ping timeout: 260 seconds]
enyo has joined #ruby
<apeiros>
dionysus69: "least amount of repeatings" and "as randomly distributed as possible" are contradicting
<apeiros>
also "lets say 100 items" and "10 packs consisting of 20 items (= 200 items)" is a bit confusing…
<dionysus69>
yes but I need to distribute 100 in a way that there are repeatings but still randomly distributed
tubuliferous has quit [Ping timeout: 240 seconds]
<dionysus69>
this is a case when items to be distributed is less than the demand
<apeiros>
it seems to me that you leave out a lot of context in your question
<dionysus69>
to start from a simpler case, I have 100 items and I have 10 targets which need 10 items each. so in this case there should be no repeatings at all.
<apeiros>
items.shuffle.each_slice(10).to_a
* apeiros
got to go, breakfast is ready…
Jackneill has joined #ruby
djellemah has quit [Ping timeout: 245 seconds]
<dionysus69>
ok thanks apeiros:)
enyo has quit [Ping timeout: 264 seconds]
<dionysus69>
ye I wanted something like that :D I ll take a look at it and optimize as needed I guess
Ax has joined #ruby
bronson has joined #ruby
spenser has quit [Ping timeout: 246 seconds]
theod has joined #ruby
vuoto has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
Devalo has joined #ruby
d0nn1e has quit [Ping timeout: 256 seconds]
d0nn1e has joined #ruby
spenser has joined #ruby
milardovich has joined #ruby
Ax has quit [Ping timeout: 248 seconds]
pwnd_nsfw` has joined #ruby
milardovich has quit [Ping timeout: 264 seconds]
pwnd_nsfw has quit [Ping timeout: 260 seconds]
<apeiros>
dionysus69: I think I understand now what you meant by 100 items and distributing them to 10 packs @ 20 items. the 100 items are unique "values". and distributing them does not remove them from your "source".
bluebell_ has left #ruby [#ruby]
<apeiros>
dionysus69: take a look at Array#sample, it has no repeatings iirc
<reaVer_>
Merry Christmas everyone!
<apeiros>
so: targets = Array.new(10) { items.sample(20) }
<apeiros>
reaVer_: merry christmas
ropeney has joined #ruby
edwinvdgraaf has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: inabit. zz.]
charliesome has joined #ruby
g_maeda has joined #ruby
edwinvdgraaf has quit [Ping timeout: 264 seconds]
g_maeda has quit [Ping timeout: 256 seconds]
theod has quit [Remote host closed the connection]
Ishido has quit [Remote host closed the connection]
elastix has quit [Quit: Leaving]
<dionysus69>
apeiros: thanks again : )
Skusman has quit [Quit: leaving]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
pawnbox has joined #ruby
Ishido has joined #ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
_sfiguser has quit [Quit: Leaving]
vuoto has quit [Remote host closed the connection]
kirun has joined #ruby
<dionysus69>
apeiros: ye that last line is close to what I want, if not exactly :D
Devalo has quit [Remote host closed the connection]
<dionysus69>
maximally trying to uniquely distribute values, in this case all values had to be unique :)
Mon_Ouie has joined #ruby
Devalo has quit [Ping timeout: 248 seconds]
<apeiros>
you have conflicting definitions of what you want to do
bronson has joined #ruby
<zenspider>
yup. either it is random and can repeat, or it's not
<dionysus69>
it cannot repeat in inner array, it can repeat in outer array but only if it has to
<dionysus69>
in that case it doesnt have to :)
<apeiros>
if the numbers of target items is less than the number of available items you can avoid repetition using my first example
<dionysus69>
yes for that case the first example works, i was just checking that atm
g_maeda has joined #ruby
<dionysus69>
I ll have to somehow combine the first and second snippets :) anyways I ll keep these snippets and give them a shot later
tildes has quit [Ping timeout: 256 seconds]
maattdd has joined #ruby
mikecmpbll has joined #ruby
<dionysus69>
there are s students in a group. professor is creating q questions and they have to be as random as possible if that makes more sense :D
<dionysus69>
so those q questions have to be distributed to s students with minimal repetition and max randomness
<apeiros>
you have to decide what takes precedence. randomness or minimal repetition.
bronson has quit [Ping timeout: 245 seconds]
<apeiros>
minimizing repetition implies less randomness.
<dionysus69>
randomness in case of the pack, minimal repetition in case of multiple packs, quite not standard situation I guess :D
<dionysus69>
so inner array is a pack, and all values have to be random#sampled, but outer array needs to use something like shuffle, but in case it needs more items, it then repeats
<apeiros>
you can use an approach where if your pool is smaller than the targets, you repeatedly distribute the pool to the targets
<dionysus69>
for that to work I guess there needs some communication going on between inner and outer loops
Devalo has joined #ruby
<dionysus69>
kk I ll have to tinker with it sometime, i am just theorizing in mind. :) I ll be back in couple weeks with the answer :D its for my bachelor project ^.^
funnel has joined #ruby
nankyokusei has joined #ruby
tildes has joined #ruby
sagax has quit [Quit: Konversation terminated!]
sagax has joined #ruby
nickjj has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 250 seconds]
tildes has quit [Ping timeout: 250 seconds]
maattdd has quit [Ping timeout: 248 seconds]
nickjj has joined #ruby
milardovich has joined #ruby
postmodern has quit [Remote host closed the connection]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
sagax has quit [Read error: Connection reset by peer]
sagax_ has joined #ruby
polysics_ has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 264 seconds]
Devalo has quit [Ping timeout: 258 seconds]
conta has joined #ruby
conta has quit [Client Quit]
conta has joined #ruby
edwinvdgraaf has joined #ruby
zipace has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
blackbombay has joined #ruby
warrshrike has joined #ruby
<warrshrike>
Gentlemen
<warrshrike>
whats the best way to store a ruby array to disk
<warrshrike>
and load it back with minimal fuss
Rodya_ has joined #ruby
<warrshrike>
I remember serializing java objects to bytes and reading and writing that from disk
<warrshrike>
Is there anything similar I can do?
* apeiros
sobs
Pumukel has joined #ruby
<dionysus69>
in postgresql there is an array datatype, so you can just save it without any special operation
<apeiros>
I'm sure you think it's good etiquette to address the channel as "gentlemen". but it's not.
<dionysus69>
in rails channel sevenseacat had a macro for those who addressed people with "guys" too xD
sdothum has joined #ruby
enyo has joined #ruby
<warrshrike>
I'm sorry I have a conservative upbringing
<warrshrike>
People is better I guess
<apeiros>
certainly would be, yes
<zenspider>
so conservative that they don't have females? harsh
<warrshrike>
Also I guess at some level I didn't expect girls here lol
<warrshrike>
Back on point
<apeiros>
another option is yaml
<zenspider>
that's pretty dumb
<warrshrike>
I think a database would be overkill
<zenspider>
or json... but Marshal maps to what was described for java
<apeiros>
with json you have to know about its limitations, though. it can't readily serialize all datatypes/classes.
<warrshrike>
apeiros: can I directly read and write ruby objs to yaml?
<apeiros>
warrshrike: with few exceptions, yes
<apeiros>
and most of those exceptions apply to marshal too
<warrshrike>
apeiros: yeah im aware about json.
<zenspider>
exceptions no different for Marshal, right?
<apeiros>
I think so, but I'm not sure
<warrshrike>
In my case its only strings stored in array
<apeiros>
I avoided the exceptions since back in 1.8, so I don't know whether those changed :)
jshjsh has quit [Ping timeout: 250 seconds]
<warrshrike>
so YAML it is. thanks People!
<zenspider>
should just be classes, procs, bindings... the usuals
anisha has joined #ruby
<apeiros>
stuff with singleton_class attached
enyo has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<warrshrike>
apeiros: is guys okay? isn't it socially common to refer to 'group of girls' as 'guys' too? As in 'you guys won't believe what cindy did'
<apeiros>
actually it seems like yaml can dump those while marshal can't.
<zenspider>
right. the one that bites me is Hash.new {...}
<hanmac>
Marshal does support recursive objects with is very cool
<zenspider>
so does yaml
anisha has quit [Client Quit]
<apeiros>
warrshrike: there are regions where guys is accepted for mixed groups. but this channel isn't regional, so I'd avoid it.
<warrshrike>
Hmm alright
<hanmac>
i treat everyone equal, but some just want to be treated more equal than others ...
spenser has quit [Ping timeout: 258 seconds]
<apeiros>
I stick with kant over orwell there. I treat others the way I'd expect them to treat me.
mikecmpbll has joined #ruby
<apeiros>
or at least I try. human after all.
<dionysus69>
lol you wish you were a vulcan
<warrshrike>
I personally subscribe more to the Ibn Khaldun school
<apeiros>
dionysus69: I enjoy my feelings, so no, not really :) although being able to execute the neck pinch would be awesome. also mind meld.
nadir has joined #ruby
conta has quit [Ping timeout: 250 seconds]
* apeiros
looks up Ibn Khaldun
<dionysus69>
warrshrike: what did ibn khaldun say about this ?
spenser has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<warrshrike>
dionysus69: he was strong about people receiving equal opportunities to realize their full human potential according to their wish, irrespective of gender.
<matthewd>
.. as long as they answered to "gentlemen"?
<warrshrike>
matthewd: ^_^
Hehehihihoho has joined #ruby
<warrshrike>
I already apologized m8. I said it reflexively
Vile` has joined #ruby
<warrshrike>
I should've said ladies and gentlemen. people works too. got it.
<apeiros>
much appreciated
Hehehihihoho has quit [Client Quit]
<warrshrike>
whats the slickest way to read/write yaml from disk? YAML::dump(c) just gives a string
montanonic has quit [Ping timeout: 245 seconds]
anisha has joined #ruby
<apeiros>
File.write(c.to_yaml)
<apeiros>
c = YAML.read_file(path)
millerti has joined #ruby
<warrshrike>
Thanks!
<apeiros>
I think you could also do: File.open('path','w') do |io| YAML.dump(c,io) end
<apeiros>
this might be better for large objects as it afair does not create one large string with the whole serialization in it but instead writes out step by step
Semtex-h has joined #ruby
djellemah has joined #ruby
Cyberheb has quit [Quit: Computer has gone to sleep.]
bronson has joined #ruby
ropeney has quit [Remote host closed the connection]
edwinvdgraaf has quit [Ping timeout: 248 seconds]
<warrshrike>
apeiros: got it. yeah the files are pretty big at several mbs
bronson has quit [Ping timeout: 246 seconds]
Rodya_ has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
Vile` has quit [Ping timeout: 258 seconds]
milardovich has joined #ruby
kus has joined #ruby
polysics has joined #ruby
milardovich has quit [Ping timeout: 264 seconds]
shinnya has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
anisha has quit [Quit: This computer has gone to sleep]
polysics has quit [Ping timeout: 264 seconds]
spenser has quit [Ping timeout: 248 seconds]
aryaching_ has joined #ruby
aryaching has quit [Ping timeout: 245 seconds]
<warrshrike>
im doing this File.open("#{Base}#{appname}/#{appname}.yml", "r+") do |file| file.write(YAML::dump(cflArray(appname))) end
<warrshrike>
and i get error No such file or directory
<warrshrike>
I want it to make a new file
<SpComb>
warrshrike: you probably want `w` to truncate, not `r+` to just overwrite the beginning of the file
<warrshrike>
actually i want a new file from scratch
<SpComb>
use `w` then, not `r+`
Semtex-h has quit [Remote host closed the connection]
koldbrutality has quit [Ping timeout: 264 seconds]
<warrshrike>
okay
spenser has joined #ruby
blackbombay has quit [Ping timeout: 245 seconds]
ponzii has joined #ruby
<ponzii>
Anyone else having trouble with pry on Ruby 2.4? I get a json 1.8 version error andn can't install 1.8 as it conflicts with Ruby 2.4 Integer.
kus has quit [Ping timeout: 252 seconds]
<ponzii>
`to_specs': Could not find 'json' (~> 1.8) - did find: [json-2.0.2] (Gem::MissingSpecVersionError)
raz has quit [Quit: *fump*]
blackbombay has joined #ruby
raz has joined #ruby
pragmaticus has joined #ruby
Vile` has joined #ruby
ropeney has joined #ruby
ropeney has quit [Remote host closed the connection]
bronson has joined #ruby
gbgdev has joined #ruby
bronson has quit [Ping timeout: 258 seconds]
ziprar has joined #ruby
zipace has quit [Disconnected by services]
nankyokusei has joined #ruby
kus has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
cibs has quit [Ping timeout: 268 seconds]
cibs has joined #ruby
pilne has joined #ruby
polysics has joined #ruby
enyo has joined #ruby
polysics has quit [Ping timeout: 260 seconds]
blackbombay has quit [Ping timeout: 258 seconds]
enyo has quit [Ping timeout: 258 seconds]
ziprar is now known as zipace
symm- has joined #ruby
<manveru>
why does anything depend on the json gem... that's in stdlib now
<matthewd>
"now" would seem to answer that question
Fernando-Basso has quit [Quit: WeeChat 1.6]
<manveru>
well, since at least 2.0
<manveru>
since 2007 :)
<manveru>
so it was in 1.9 already
blackbombay has joined #ruby
<apeiros>
hey, that's only 9 years. give them some time!
<hanmac>
hm isnt a gem installed json more up to date? and isnt the json installed with ruby only a default gem or something like that? (it was removed from ruby, but didnt work that way, so it was added again)
<matthewd>
I think the actual answer is forcing a minimum version
<miqlas-H64>
I just compiled the latest Ruby (2.4.0) on Haiku (x86_64 with gcc5). It compiles without any problem, and runs in Terminal. But if i try to install a gem, i get an error message. Lemme post it somewhere.
pawnbox_ has quit [Remote host closed the connection]
<manveru>
maybe we can bisect which commit broke that?
<miqlas-H64>
yeah, i can try that
<manveru>
i'm not aware of any recent changes to the way require does locking... but i don't know much
Guest60718 has joined #ruby
<miqlas-H64>
the problem is, we upstreamed a lot of patches between 2.2.2 and 2.3, so it makes my life harder to compile the sources. but ofc i can try.
<manveru>
i think only commits to the load.c are relevant
enilsen16 has quit [Client Quit]
<miqlas-H64>
let see, what the haiku devs thinks about the problem.
<miqlas-H64>
maybe there is some missing locking implementation in the kernel.
<miqlas-H64>
or something like that.
<manveru>
aye
Tomthetom has quit [Ping timeout: 265 seconds]
<manveru>
sorry i can't help you more, it's been years since i used haiku
<miqlas-H64>
i'll report back when i have more info.
<miqlas-H64>
thanks for your help, manveru!
SpiffTR has joined #ruby
Guest60718 has quit [Ping timeout: 258 seconds]
enyo has joined #ruby
tekeli-li has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
enyo has quit [Ping timeout: 248 seconds]
Tomthetom has joined #ruby
<Papierkorb>
Does someone know how I can transform a date time in the julian calendar into the gregorian calendar?
SpiffTR has quit [Quit: Leaving.]
jenrzzz has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
enilsen16 has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
edwinvdgraaf has joined #ruby
matp_ is now known as matp
bronson has joined #ruby
<nofxx>
Papierkorb, this remembers me when marge made a sexy calendar, mr burns says to her: 'you just convinced me to drop the julian calendar'
skweek has joined #ruby
skweek has quit [Max SendQ exceeded]
<nofxx>
Papierkorb, think I saw something on stdlib, no? out of curiosity... why? heh
skweek has joined #ruby
FastJack has quit [Ping timeout: 264 seconds]
pilne has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
<Papierkorb>
nofxx: I'm importing the Wikidata database, and they use both like they see fit
<Papierkorb>
> Note: the notation for Julian and Gregorian dates may be changed to omit any unknown or insignificant parts. E.g. if only the year 1952 is known, this may in the future be represented as just "+1952" instead of currently "+1952-00-00T00:00:00Z" (which some libraries may turn into something like 1951-12-31) and the 19th century may be represented as "+18**".
<Papierkorb>
.. Awesome
nankyokusei has joined #ruby
harai_ has joined #ruby
vuoto has joined #ruby
miqlas-H64 has quit [Quit: Vision[0.9.8]: i've been blurred!]
Rodya_ has joined #ruby
enilsen16 has quit [Quit: enilsen16]
gbgdev has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
ur5us has quit [Remote host closed the connection]
<nofxx>
Papierkorb, I came to confuse it, not to explain... (a quote from a old tv showman here hehe)
nankyokusei has quit [Ping timeout: 265 seconds]
<Papierkorb>
Now .. let's see where it explodes
Rodya_ has quit [Ping timeout: 258 seconds]
jtdoncas has joined #ruby
last_staff has joined #ruby
jtdoncas has quit [Ping timeout: 256 seconds]
qwertrandom has left #ruby [#ruby]
last_staff has quit [Quit: last_staff]
tubuliferous has joined #ruby
ur5us has joined #ruby
byte512 has quit [Ping timeout: 248 seconds]
pwnd_nsfw` has joined #ruby
edwinvdgraaf has quit [Ping timeout: 250 seconds]
nikivi has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
pwnd_nsfw has quit [Ping timeout: 265 seconds]
_whitelogger has joined #ruby
nikivi has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
nikivi has joined #ruby
pilne has quit [Quit: Quitting!]
pwnd_nsfw has joined #ruby
conta has quit [Ping timeout: 250 seconds]
pwnd_nsfw` has quit [Ping timeout: 246 seconds]
UserJosh has joined #ruby
nikivi has quit [Excess Flood]
riceandbeans has joined #ruby
<riceandbeans>
what's the difference between gem and require/
MrBusiness2 has joined #ruby
jshjsh has quit [Ping timeout: 268 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
platzhirsch has quit [Ping timeout: 248 seconds]
milardovich has quit []
pytuger has quit [Ping timeout: 252 seconds]
<xrlk>
Here's how bernie can still win
slackbotgz has joined #ruby
Xeago has quit [Ping timeout: 250 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xen0fon has joined #ruby
Xeago has joined #ruby
bronson has joined #ruby
bonhoeffer has joined #ruby
tubuliferous has quit [Ping timeout: 240 seconds]
huehuehue929 has joined #ruby
pytuger has joined #ruby
tmtwd has quit [Ping timeout: 264 seconds]
bronson has quit [Ping timeout: 252 seconds]
platzhirsch has joined #ruby
Rodya_ has joined #ruby
kus has quit [Quit: Konversation terminated!]
LoneHerm_ has joined #ruby
enilsen16 has joined #ruby
yardenbar has joined #ruby
Rodya_ has quit [Ping timeout: 264 seconds]
testuser1 has quit [Quit: Leaving.]
edwinvdgraaf has joined #ruby
slackbotgz has quit [Remote host closed the connection]
ta has joined #ruby
arthurbalfredo has joined #ruby
edwinvdgraaf has quit [Ping timeout: 252 seconds]
enyo has joined #ruby
vuoto has quit [Quit: Lost terminal]
SpiffTR has joined #ruby
huehuehue929 has quit [Quit: Page closed]
yardenbar has quit [Ping timeout: 250 seconds]
enyo has quit [Ping timeout: 252 seconds]
GodFather has quit [Remote host closed the connection]
GodFather has joined #ruby
ta has quit [Remote host closed the connection]
enilsen16 has quit [Quit: enilsen16]
LoneHerm_ has quit [Remote host closed the connection]
ianmethyst has joined #ruby
LoneHerm_ has joined #ruby
enilsen16 has joined #ruby
enilsen16 has quit [Client Quit]
Jackneill has quit [Read error: Connection reset by peer]
yardenbar has joined #ruby
LoneHerm_ has quit [Ping timeout: 250 seconds]
tildes has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
UserJosh is now known as JoshS
enilsen16 has joined #ruby
pia has quit [Quit: Leaving]
Tomthetom has quit [Ping timeout: 265 seconds]
bonhoeffer has quit [Ping timeout: 260 seconds]
DLSteve has joined #ruby
MrBusiness2 is now known as MrBusiness
jenrzzz has quit [Ping timeout: 258 seconds]
MrBusiness is now known as Guest90187
Guest90187 is now known as MrBismuth
GodFather has quit [Quit: Ex-Chat]
jshjsh has joined #ruby
JoshS has quit [Disconnected by services]
jshjsh is now known as JoshS
bronson has joined #ruby
Gasher has joined #ruby
nankyokusei has joined #ruby
bronson has quit [Ping timeout: 258 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
Pumukel has quit [Remote host closed the connection]
Tomthetom has joined #ruby
Tomthetom has quit [Client Quit]
enilsen16 has quit [Quit: enilsen16]
ianmethyst has quit [Remote host closed the connection]
Rodya_ has joined #ruby
ianmethyst has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
ledestin has joined #ruby
ianmethyst has quit [Client Quit]
kies has quit [Ping timeout: 258 seconds]
Rodya_ has quit [Ping timeout: 250 seconds]
GodFather has joined #ruby
nowhereman has joined #ruby
tmtwd has joined #ruby
_djbkd has joined #ruby
yardenbar has quit [Ping timeout: 264 seconds]
lenwood has quit [Ping timeout: 258 seconds]
GodFather has quit [Ping timeout: 258 seconds]
edwinvdgraaf has joined #ruby
kies has joined #ruby
amclain has joined #ruby
FastJack has joined #ruby
enilsen16 has joined #ruby
tmtwd has quit [Quit: Leaving]
orang has joined #ruby
<orang>
When naming variables is it bad practice to use Upper case letters?