<drbrain>
I've never liked collapsing namespaces like that
<drbrain>
eventually I end up with clashes
<aef>
as I'm testing pretty specific things about my classes, I guess I would notice if I'm not talking to the correct object. Not having to write the full name makes the test so much more readable.
<matti>
drbrain: BTW, as pre tenderlove, I am asking Luis L. to look at the Win32 change :) usa seem to be busy.
perryh has quit [Excess Flood]
<drbrain>
aef: yeah, when the name is too long I just use an all-uppercase ivar
<matti>
make -j8
<matti>
Ops.
<matti>
Wrong window.
<drbrain>
for example, @RM = RDoc::Markup; …; @RM::Document.new(...)
perryh has joined #ruby-lang
<zenspider>
"more readable" ... until you want to know what the const actually refers to
<drbrain>
or someone else does
<matti>
Hi zenspider :)
adamjleonard has joined #ruby-lang
<zenspider>
you collective...
adamjleonard has quit [Client Quit]
kurko_ has quit [Ping timeout: 245 seconds]
kurko_ has joined #ruby-lang
sush24 has joined #ruby-lang
kurko_ has quit [Ping timeout: 276 seconds]
Bosox20051 has joined #ruby-lang
kurko_ has joined #ruby-lang
ryanlecompte has joined #ruby-lang
amirinator has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 245 seconds]
ryanlecompte has quit [Ping timeout: 240 seconds]
lteo has joined #ruby-lang
<erikh>
zzak: tsort has atrocious docs. please fix kthx
kurko_ has joined #ruby-lang
<drbrain>
zzak: bonus points for documentation on handling cycles :D
<erikh>
had to rip into the code to figure out what the heck those blocks actually did
coryf has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
gsav has joined #ruby-lang
wallerdev has joined #ruby-lang
wallerdev has quit [Client Quit]
runeb has joined #ruby-lang
kurko_ has quit [Ping timeout: 255 seconds]
kurko_ has joined #ruby-lang
therod has joined #ruby-lang
sush24 has quit [Read error: Connection reset by peer]
runeb has quit [Ping timeout: 244 seconds]
kain has joined #ruby-lang
vesan has quit [Ping timeout: 260 seconds]
artOfWar has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
gsav has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
kurko_ has joined #ruby-lang
CoverSlide has quit [Ping timeout: 245 seconds]
gsav has joined #ruby-lang
woollyams has joined #ruby-lang
sush24 has joined #ruby-lang
nitti has joined #ruby-lang
nitti has quit [Ping timeout: 244 seconds]
sush24 has quit [Ping timeout: 272 seconds]
kurko_ has quit [Ping timeout: 245 seconds]
kurko_ has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
amirinator has joined #ruby-lang
sush24 has joined #ruby-lang
Dreamer3__ has joined #ruby-lang
Dreamer3 has quit [Read error: Connection reset by peer]
Dreamer3__ is now known as Dreamer3
kurko_ has quit [Ping timeout: 276 seconds]
kurko_ has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
savage- has joined #ruby-lang
sush24 has quit [Ping timeout: 276 seconds]
tenderlove has quit [Ping timeout: 268 seconds]
<postmodern>
tsort's docs aren't that bad
<postmodern>
although it helps to look at a reference implementation
sush24 has joined #ruby-lang
sush24_ has joined #ruby-lang
sharma__ has joined #ruby-lang
savage- has quit [Quit: savage-]
sush24 has quit [Ping timeout: 248 seconds]
cosah has joined #ruby-lang
sush24 has joined #ruby-lang
sush24_ has quit [Ping timeout: 248 seconds]
alvaro_o_ has joined #ruby-lang
CoverSlide has joined #ruby-lang
sush24_ has joined #ruby-lang
sharma__ has quit [Ping timeout: 260 seconds]
sharma__ has joined #ruby-lang
matthewd has quit [Ping timeout: 246 seconds]
sush24 has quit [Ping timeout: 244 seconds]
alvaro_o has quit [Ping timeout: 255 seconds]
matthewd has joined #ruby-lang
sush24 has joined #ruby-lang
sush24_ has quit [Ping timeout: 256 seconds]
sharma__ has quit [Ping timeout: 244 seconds]
sharma__ has joined #ruby-lang
savage- has joined #ruby-lang
matthewd has quit [Ping timeout: 244 seconds]
perryh has quit [Excess Flood]
sush24 has quit [Ping timeout: 264 seconds]
perryh has joined #ruby-lang
sharma__ has quit [Read error: Operation timed out]
sush24 has joined #ruby-lang
CrazyHorse18 has joined #ruby-lang
ryanf has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
sush24_ has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
sharma__ has joined #ruby-lang
CrazyHorse18 has quit [Read error: Operation timed out]
ramonmaruko has joined #ruby-lang
CrazyHorse18 has joined #ruby-lang
sush24 has quit [Ping timeout: 260 seconds]
CrazyHorse18 has quit [Max SendQ exceeded]
sush24 has joined #ruby-lang
sush24_ has quit [Ping timeout: 276 seconds]
Nisstyre has quit [Ping timeout: 256 seconds]
sharma__ has quit [Ping timeout: 248 seconds]
artOfWar has quit [Read error: Connection reset by peer]
<erikh>
postmodern: there's really no indicator of what those passed in blocks do
<erikh>
that's my main gripe; had to code dive for it more or less.
artOfWar has joined #ruby-lang
sush24_ has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
<erikh>
want to guess what happens if it doesn't match?
<erikh>
use two variables.
<erikh>
thank me later :)
flori has quit [Quit: leaving]
flori has joined #ruby-lang
jgomez has joined #ruby-lang
yats has joined #ruby-lang
milestone has quit [Quit: milestone]
<rothbard>
ryanf: it was [1] but I changed it for the question because I thought there might be a ?. type operator and I'd get a ?.first answer, and I wanted to know for a more general case
workmad3 has quit [Ping timeout: 248 seconds]
<yorickpeterse>
Morning
<erikh>
oh, I misread what you were asking, I see now
<jkyle>
say I install a gem 'foo' at version 1.0. I installs all the dependencies. Then I do a gem update foo, which updates foo to 1.1. Will it also update all of its dependencies?
nettsundere has quit [Ping timeout: 252 seconds]
kain has quit [Quit: exit]
adambeynon has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
futurechimp has quit [Ping timeout: 244 seconds]
blacktul_ has quit [Ping timeout: 245 seconds]
<darix>
jkyle: if needed it should
blacktulip has joined #ruby-lang
robotmay has quit [Read error: Connection reset by peer]
robotmay has joined #ruby-lang
gsav_ has joined #ruby-lang
Theueip has joined #ruby-lang
nettsundere has joined #ruby-lang
therod has joined #ruby-lang
m3nd3s has joined #ruby-lang
uuair has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
mistym_meeting is now known as mistym
futurechimp has joined #ruby-lang
kurko_ has quit [Ping timeout: 255 seconds]
dr_bob has joined #ruby-lang
alexkane has joined #ruby-lang
kurko_ has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
dr_bob has quit [Quit: Leaving.]
nitti has quit [Remote host closed the connection]
solars has quit [Read error: No route to host]
nitti has joined #ruby-lang
apeiros_ has joined #ruby-lang
gsav_ has quit [Quit: Lost terminal]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
dr_bob has joined #ruby-lang
krohrbaugh has quit [Read error: Operation timed out]
dr_bob has quit [Client Quit]
kurko_ has quit [Ping timeout: 244 seconds]
kurko_ has joined #ruby-lang
gix has quit [Ping timeout: 264 seconds]
nettsundere has quit [Ping timeout: 252 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
kurko_ has quit [Ping timeout: 246 seconds]
kurko_ has joined #ruby-lang
gix has joined #ruby-lang
shtirlic has joined #ruby-lang
Serial_Killer_C has joined #ruby-lang
headius has joined #ruby-lang
enebo has joined #ruby-lang
coryf has joined #ruby-lang
rue|w has joined #ruby-lang
topaz has joined #ruby-lang
topaz has quit [Changing host]
topaz has joined #ruby-lang
rippa has joined #ruby-lang
rue|w has quit [Ping timeout: 265 seconds]
adambeynon has quit [Quit: Computer has gone to sleep.]
<injekt>
I dislike it, but i can also see why people might like it. Unlike cucumber which makes me want to punch bunnies and put needles in my eyes
ridders24 has joined #ruby-lang
DEac- has joined #ruby-lang
<ridders24>
hi all
<zzak>
injekt: thats like taking your volvo to a mechanic and them saying, "no i dont want to work on that, because i have to use metric tools"
<ridders24>
does anyone know how to convert an .rb file to exe using ocra or rubyscript2exe, or any other method?
krohrbaugh has joined #ruby-lang
enebo has quit [Quit: enebo]
<injekt>
zzak: I dont see how that's the same, my thoughts have no concept of the product
<matti>
Ohai zzak
<injekt>
zzak: and there are alternatives (maybe not to cukes, but rspec at least)
<zzak>
injekt: so if someone wanted you to work on their app, but it used rspec you would turn them down?
<injekt>
zzak: rspec? no. cucumber? yes (I would refuse to write it, at least). The IDEA of rspec is no different to my philosophy of testing. I just don't like how it works, on a personal level (syntax, modifing objects etc)
<injekt>
I work on apps that use rspec
rking has quit [*.net *.split]
schroedinbug has quit [*.net *.split]
Weems has quit [*.net *.split]
musl has quit [*.net *.split]
levifig has quit [*.net *.split]
bryanl has quit [*.net *.split]
bryno has quit [*.net *.split]
th__ has quit [*.net *.split]
totallymike has quit [*.net *.split]
djinni` has quit [*.net *.split]
th_ has joined #ruby-lang
djinni` has joined #ruby-lang
bryno has joined #ruby-lang
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
schroedinbug has joined #ruby-lang
dous has quit [Remote host closed the connection]
rking has joined #ruby-lang
bryanl has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
totallymike has joined #ruby-lang
levifig has joined #ruby-lang
<zzak>
fair enough, it's your business after all :)
<zzak>
i just find it interesting with all the unemployed people out there, we get to turn down jobs if they're using a library we dont like
cultureulterior has left #ruby-lang [#ruby-lang]
<matti>
zzak: I love challenges.
<matti>
zzak: Even if you struggle ;-)
<zzak>
matti: hi, also <3
<matti>
zzak: I would totaly accept
* zzak
hires matti
<injekt>
haha
<zzak>
matti: we need to talk... its about your office
<zzak>
we're moving you to the basement
<matti>
Ok
<ridders24>
anyone?
<matti>
Just provide nice coffee
<matti>
And it can be basement and or loft
<matti>
;-)
<zzak>
we've had budget cuts, and theres no longer any coffee for basement staff
<zzak>
employees are spending too much time debugging cucumber, so we've had to cut back
intellitech|afk has quit [Read error: Operation timed out]
<matti>
zzak: I need tovestablish an union
benanne has joined #ruby-lang
<matti>
zzak:And strike
<matti>
zzak: :D
<zzak>
matti: sorry, we no longer need your services, please pack your things
<matti>
Got fired ver
<matti>
over ciffee
<matti>
:-|
blazes816 has joined #ruby-lang
Ziioynx has joined #ruby-lang
ridders24 has quit [Quit: Leaving]
carloslopes has joined #ruby-lang
<matti>
zzak: ;-)
scampbell has joined #ruby-lang
musl has joined #ruby-lang
cschwartz has quit [Ping timeout: 260 seconds]
<zzak>
matti: sorry:(
<matti>
zzak: No problem.
albybisy has quit [Remote host closed the connection]
therod has joined #ruby-lang
philiphale has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
ryanlecompte has joined #ruby-lang
Theueip has quit [Quit: Bye!]
Uranio has quit [Remote host closed the connection]
rdavila has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
dpatel has joined #ruby-lang
cschneid has quit [Ping timeout: 245 seconds]
Spaceghostc2c has quit [Ping timeout: 245 seconds]
__butch__ has joined #ruby-lang
nick_h has quit [Ping timeout: 246 seconds]
nick_h has joined #ruby-lang
Spaceghostc2c has joined #ruby-lang
cschneid has joined #ruby-lang
sush24 has joined #ruby-lang
sent-hil has joined #ruby-lang
uuair has quit [Quit: uuair]
<sent-hil>
Is there something similar to %w() for symbols?
<sent-hil>
Like %..(a b) => [:a, :b]
<injekt>
not yet
bfreeman has joined #ruby-lang
<injekt>
it's in HEAD, though
<injekt>
%I(foo bar) #=> [:foo, :bar]
nettsundere has quit [Ping timeout: 240 seconds]
<injekt>
right now you need map(&:to_sym)
<injekt>
I think it's I and not i anyway
<injekt>
one of those
dhruvasagar has quit [Ping timeout: 245 seconds]
willdrew has quit [Ping timeout: 244 seconds]
<sent-hil>
ah cool, thx
robotmay has quit [Ping timeout: 244 seconds]
dc5ala has quit [Quit: Ex-Chat]
kurko_ has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby-lang
justinram has joined #ruby-lang
kurko_ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
mrsolo has joined #ruby-lang
nettsundere has joined #ruby-lang
sush24 has quit [Quit: Leaving]
sush24 has joined #ruby-lang
brianpWins has joined #ruby-lang
futurechimp has quit [Ping timeout: 265 seconds]
kurko_ has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
d3vic3 has quit [Quit: leaving]
AnaChecho has joined #ruby-lang
kurko_ has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
tentimes has quit [Quit: IceChat - Keeping PC's cool since 2000]
mistym_away is now known as mistym
futurechimp has joined #ruby-lang
nitti has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
imajes has quit [Excess Flood]
Madis has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
Serial_Killer_C has quit [Remote host closed the connection]
Mellett68 has joined #ruby-lang
<rfay>
I have ruby 1.9.3 (MacOS Mountain Lion/Homebrew) but I get these huge raft of warnings when I do anything: Like this: /usr/local/Cellar/ruby/1.9.3-p286/lib/ruby/1.9.1/rubygems/syck_hack.rb:44: warning: previous definition of to_s was here
<rfay>
I can't sort out what's useful and what's not in the output.
<rfay>
Any help?
<erikh>
rfay: probably best to go to #rubygems and ask.
Serial_Killer_C has joined #ruby-lang
<rfay>
erikh, thanks
Axsuul has joined #ruby-lang
sent-hil has joined #ruby-lang
<sent-hil>
when i def a method in main, where does it actually get defined?
<sent-hil>
i'm not able to see it with self.methods
amirinator has joined #ruby-lang
sepp2k1 has quit [Quit: Leaving.]
sepp2k has joined #ruby-lang
scampbell has joined #ruby-lang
<sepp2k>
sent-hil: "in main" == "outside of any class"? If so, the method will be defined as a *private* method of Object. So you can see it if you do self.private_methods instead of self.methods.
<hakunin>
I have a simple class Size that makes strings like "XL" "XXS" comparable on the size rules. I want to define a method Size("XS") as constructor sugar. What's the proper way - define it on Object? Reopen Kernel?
kurko_ has quit [Ping timeout: 245 seconds]
<sent-hil>
sepp2k: ah
<sent-hil>
sepp2k: thnx
<hakunin>
or just def Size() in the main scope?
kurko_ has joined #ruby-lang
<heftig>
module Foo; class Size; ... end; def self.Size(str);... end; end
mistym is now known as mistym_lunch
philiphale has joined #ruby-lang
<hakunin>
heftig: that would put it in Foo, so if it needs to be outside of Foo module context, just define it in main scope?
cschwartz has joined #ruby-lang
<hakunin>
nvm will figure it out
sent-hil has quit [Read error: Connection reset by peer]
richardjortega has joined #ruby-lang
salvianoo has joined #ruby-lang
salvianoo has left #ruby-lang [#ruby-lang]
<hakunin>
it's supposed to work in main scope as i suspected, but rails class loading does something special that ignores it
qpingu has joined #ruby-lang
chendo_ has quit [Ping timeout: 246 seconds]
alexkane has quit [Read error: Connection reset by peer]
alexkane has joined #ruby-lang
chendo_ has joined #ruby-lang
rindolf has joined #ruby-lang
nitti_ has joined #ruby-lang
<apeiros_>
hakunin: the proper way is `module Kernel; def Size(*); …; end; module_function :Size; end`
<apeiros_>
you'll find that all the others are done that way too (String(), Array() etc.)
sailias has joined #ruby-lang
<apeiros_>
just defining it on toplevel will make it local to the file it is being defined in (similar to a local variable)
dhruvasagar has joined #ruby-lang
<hakunin>
apeiros_: exactly the answer i needed, thanks. it worked also by sticking into initializer, but this is more proper
kurko_ has quit [Ping timeout: 245 seconds]
<apeiros_>
making it private (through module_function) is important btw. - avoids you breaking method_missing in unrelated 3rd party code by accident.
<hakunin>
apeiros_: makes sense
AnaChecho has quit [Quit: Leaving.]
kurko_ has joined #ruby-lang
irleif has quit [Quit: Computer has gone to sleep.]
cschwartz has quit [Ping timeout: 255 seconds]
richardjortega has left #ruby-lang [#ruby-lang]
vlad_starkov has joined #ruby-lang
kurko_ has quit [Ping timeout: 245 seconds]
bluepojo has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 244 seconds]
kurko_ has joined #ruby-lang
cyri_ has joined #ruby-lang
rdavila has quit [Quit: rdavila]
spinagon has left #ruby-lang [#ruby-lang]
rippa has joined #ruby-lang
rdavila has joined #ruby-lang
rdavila has quit [Client Quit]
sush24 has quit [Quit: This computer has gone to sleep]
ivanoats has quit [Remote host closed the connection]
Serial_Killer_C has quit [Remote host closed the connection]
willdrew has joined #ruby-lang
adambeynon has joined #ruby-lang
kurko_ has quit [Ping timeout: 245 seconds]
<Uranio>
I was trying get the remote context lenght of something but all the methods look like must get the whole "something" before get the lenght
<dslsd>
Hey all, I'm curious what features are slated for Ruby 2.0 given the feature freeze. Can someone point me to the right place to mine this information?
<erikh>
fwiw, fletcher is here at the summit if it's worth it to you to pick his brain
<erikh>
but that's the tool I was telling you about last night.
<zenspider>
cool. I'll poke
kurko_ has quit [Ping timeout: 245 seconds]
Criztian has joined #ruby-lang
<ddfreyne>
zenspider: I do
nitti has quit [Quit: Leaving...]
<ddfreyne>
zenspider: I’m not sure whether I really am happy about it though :P
sailias has quit [Quit: Leaving.]
<ddfreyne>
that’s an eufemism for “we REALLY need to use something better, quick”
<ddfreyne>
zenspider: some parts of it make me pull out my hair
<zenspider>
hah
<ddfreyne>
zenspider: spent two workdays fixing a commit that got corrupted
<ddfreyne>
(and if I’d re-create the commit, it would get corrupted again)
kurko_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
countdig1 has joined #ruby-lang
tenderlo_ has joined #ruby-lang
tenderlove has quit [Ping timeout: 240 seconds]
<zenspider>
ddfreyne: in visualworks??
<zenspider>
are we talking about the same thing?
<ddfreyne>
smalltalk visualworks
<zenspider>
I guess I'm confused with the commit stuff...
<ddfreyne>
zenspider: it has a version control system
<ddfreyne>
I probably already ranted about it on here already
<zenspider>
which one is it?
<ddfreyne>
zenspider: STORE (or Store or StORE)
<ddfreyne>
I know exactly two companies that use it
therod has quit [Quit: Leaving...]
CaptainJet has joined #ruby-lang
<ddfreyne>
Actually I do not want to talk about it anymore… it is a sensitive matter and I am going to start crying if we don’t stop talking about it
<zenspider>
haha
<ddfreyne>
zzz time, gnight!
<zenspider>
later
alvaro_o__ has left #ruby-lang [#ruby-lang]
alvaro_o has joined #ruby-lang
<alvaro_o>
Just a quick question:
<alvaro_o>
if I write a file like this:
<alvaro_o>
File.open('post_data.yaml', 'w') do |fh|
<alvaro_o>
fh.puts hashData.to_yaml
<alvaro_o>
end
<alvaro_o>
will the file get closed at the end of the block ?
yxhuvud has quit [Ping timeout: 245 seconds]
<apeiros_>
yes
<alvaro_o>
apeiros_: thanks!
<apeiros_>
that's one of the main reasons to use block-form
<alvaro_o>
:)
milestone has joined #ruby-lang
<milestone>
hi guys
__butch__ has quit [Quit: Leaving.]
<milestone>
is there a jar manifest.mf parser library for ruby?
lun_ has joined #ruby-lang
__butch__ has joined #ruby-lang
Mellett68 has quit [Read error: Operation timed out]
Carnage\ has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
mpan has quit [Read error: Connection reset by peer]
richardjortega_ has joined #ruby-lang
albybisy has joined #ruby-lang
mpan has joined #ruby-lang
jgomez has joined #ruby-lang
Serial_Killer_C has quit [Remote host closed the connection]
<drbrain>
milestone: #jruby might know
jgomez has quit [Read error: Connection reset by peer]
jgomez has joined #ruby-lang
<milestone>
drbrain: ok although i would like to stay with plain ruby 1.9
<headius>
none I know of
<drbrain>
milestone: there's more people with their toes in both pools in #jruby, that's the only reason I suggested it
<milestone>
drbrain: ok makes sense ;)
benanne has quit [Quit: kbai]
Serial_Killer_C has joined #ruby-lang
savage- has joined #ruby-lang
nitti has joined #ruby-lang
<zzak>
is headius a bot for jruby?
therod has joined #ruby-lang
ryanlecompte has quit [Ping timeout: 244 seconds]
goyox86 has joined #ruby-lang
<headius>
yes
<drbrain>
zzak: pretty much
nitti has quit [Client Quit]
kurko_ has quit [Ping timeout: 245 seconds]
<blazes816>
pretty simple: "make_jruby_moar_better while haters"
cyri_ has quit [Quit: cyri_]
<headius>
:)
kurko_ has joined #ruby-lang
intellitech has joined #ruby-lang
AshleyWaffle12 has joined #ruby-lang
<AshleyWaffle12>
Hi, should I start with Sinatra or Rails as a beginner?
<oddmunds>
siantra
Averna has joined #ruby-lang
<oddmunds>
sinatara
<oddmunds>
fuckit
<oddmunds>
the first one
therod has quit [Ping timeout: 244 seconds]
<AshleyWaffle12>
thanks
<zenspider>
no! rails!
enebo has joined #ruby-lang
<steveklabnik>
It Depends
<zenspider>
™
tenderlo_ is now known as tenderlove
<bluepojo>
Sinatra makes you work a lot harder but it puts you at less risk for becoming a "framework junky" who can't program outside the context of Rails ;)
<havenn>
I want to create an artificial mind. Rails or Sinatra?
<bluepojo>
both are solid for what they are
blacktulip has quit [Remote host closed the connection]
<zenspider>
prolog!
<zzak>
rack(tm)
swarley has joined #ruby-lang
<zenspider>
you lost me at "artificial" ... either create a real mind or go away
<swarley>
Dynamic polymorphic stack in C, attempt number 3..
<swarley>
P
<matti>
Hahha
<matti>
I see.
<matti>
;d
<swarley>
I'm working on getting a dynamically allocatted stack to work
<swarley>
as soon as i get that working i'm golden
<matti>
"stack" in what sense?
<swarley>
like, pushing and popping
<matti>
Process stack, or data structure?
<matti>
Oh I see.
<matti>
;]
<swarley>
I wrote down a concept, i just have to test it out
<matti>
I have code lying around somewhere.
<matti>
Which implements stack as a linked-list.
ryanf has joined #ruby-lang
<matti>
So it can grow.
<swarley>
That won't work for mine
<matti>
Why?
<matti>
Not cool enough? ;p
<swarley>
Because the process of getting element number 2452 is too much of an ordeal
<matti>
E?
<swarley>
In a linked list
<matti>
Well.
<matti>
Its a stack, isnt' it?
<matti>
So, you don't get to choose which element you want.
<matti>
Unless you are implementing a hash-alike.
<swarley>
No, since i'll be using a dynamically allocated pointer to arrays
<matti>
Ah.
<matti>
Man.
<matti>
You ain't doing stack.
<swarley>
err
<swarley>
array of pointers
<matti>
You are writing associative array of a sort.
wyhaines_ has quit [Ping timeout: 265 seconds]
<swarley>
No, it would be classified as a FIFO stack
<swarley>
errr
<swarley>
LIFO
<matti>
Haha
wyhaines has joined #ruby-lang
<swarley>
the way i'm implementing it at least
<matti>
swarley: I suck when it goes to formal CS.
<matti>
swarley: I know how to make hash table, linked-lists, a tree and a tire.
<matti>
;d
<swarley>
I have no formal CS training, all of my terminology is just what i've picled up
<matti>
swarley: Rest seem moderately not interesing ;p
<swarley>
xD
<bluepojo>
FIFO stack = Queue
<bluepojo>
:P
<matti>
bluepojo: ;p
<matti>
+1
<swarley>
Yeah, which is why i corrected to LIFO
<rue>
‘Lifo stack’ is redundant
<swarley>
Redundancy is tasty, like a double decker taco
albybisy has quit [Remote host closed the connection]
<swarley>
Twice the flavor, both the same taste
<swarley>
I'll show some code once i have some that works
<matti>
swarley: LOL
<swarley>
I havn't typed anything
<swarley>
Its all hand written
chrismcg is now known as zz_chrismcg
sduckett has quit [Ping timeout: 252 seconds]
skipper has joined #ruby-lang
skipper is now known as Guest88601
therod has joined #ruby-lang
<zenspider>
if you need element 2452, then it isn't a stack... idgi
albybisy has joined #ruby-lang
<matti>
I said that.
<matti>
;]
<matti>
Nobody listens ;<
kurko_ has quit [Quit: Computer has gone to sleep.]
* matti
cries like a baby sea lion
<zenspider>
I saw that... just backing it up
<matti>
:)
<matti>
Thanks!
scampbell has quit [Quit: Ex-Chat]
Guest88601 has quit [Ping timeout: 245 seconds]
<swarley>
zenspider; most of the time, a stack will do for what i need, so there is no reason to bring in some for of heavy artillery to make this all work. But i never know if a user might get crazy and get some giant number of elements
<matti>
zzak: This is what swarley is buildig, yes. ;d
<matti>
I can totaly see new modern data structure ;d
<matti>
Imagine all these watercooler talks.
albybisy has quit [Remote host closed the connection]
lun__ has joined #ruby-lang
<matti>
"So Jo, which data structure are you going to use? You see Mike, I will be using the Twisted Push Pop one..."
lun_ has quit [Ping timeout: 256 seconds]
imajes has quit [Excess Flood]
gsav has quit [Quit: Lost terminal]
gsav has joined #ruby-lang
13WABO1XR has joined #ruby-lang
outoftime has quit [Quit: Leaving]
imajes has joined #ruby-lang
<zenspider>
swarley: don't EVER design with "what ifs"
<zenspider>
a stack is a stack. period.
<steveklabnik>
but what if it's a stack where it comes from the top 3% of the tome and the bottom 96% of the time, and just returns nil 1% of the time
thatdutchguy has joined #ruby-lang
zz_chrismcg is now known as chrismcg
<zenspider>
then you should be fired.
<matti>
Hahah
<steveklabnik>
:D
<matti>
steveklabnik: ANd memory leaks 0.5% of the time ;p
sepp2k has quit [Remote host closed the connection]
<matti>
I wonder, which data structure will fit this model.
gsav has quit [Ping timeout: 260 seconds]
13WABO1XR has quit [Ping timeout: 272 seconds]
<matti>
Needs to grow on-demand, have sensible access time (insertion, deletion, update, etc) ...
<steveklabnik>
hash
<matti>
Yeah.
<matti>
I said that as the first thing.
<matti>
But swarley does not like it ;p
jbsan has quit [Quit: jbsan]
<steveklabnik>
red-black tree
<steveklabnik>
finger trie
<steveklabnik>
skip list
* steveklabnik
is certainly not just naming data strcutures without thinking
<rue>
Uh-huh
m3nd3s has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
<headius>
hey, this time I have a ruby question
bluepojo has left #ruby-lang [#ruby-lang]
bluepojo has joined #ruby-lang
<headius>
test_ssl from MRI has this test_read_and_write that does sysread to get data
<headius>
it expects that sysread(n) will always get everything they expect to be on the wire, but on jruby there's a change the write side may not be done writing all of that data
<headius>
seems like a flawed test, since SSLSocket#sysread can definitely return less data than requested
<khaase>
ddfreyne: yeah, I did my bachelor project with that
vlad_starkov has quit [Remote host closed the connection]
<khaase>
ddfreyne: and other stuff at uni with seaside
<khaase>
that was my only visualworks project, thoguh
<khaase>
*though
<khaase>
mainly did squeak
kurko_ has joined #ruby-lang
enebo has quit [Quit: enebo]
<drbrain>
headius: agreed
chessguy_ has joined #ruby-lang
<headius>
drbrain: I think the failure I'm running into is because it has a separate thread doing server-side read + write, and I'm catching it mid-write
<headius>
so I get a partial result on the client side in the test
bluepojo1 has joined #ruby-lang
<headius>
basically, client goes into read wait after writing, but server starts writing data and immediately wakes it up…so only part of data may have been written before read side wakes
<headius>
I'll see if I can patch the test in a simple way
bluepojo has quit [Read error: Connection reset by peer]
rothbard` has joined #ruby-lang
wnd has quit [Excess Flood]
wnd has joined #ruby-lang
Serial_Killer_C has quit [Remote host closed the connection]
rothbard has quit [Remote host closed the connection]
chessguy has quit [Ping timeout: 264 seconds]
sandbags1138 has quit [Remote host closed the connection]
nofxx has quit [Remote host closed the connection]
<drbrain>
headius: yup, this code calls down to SSL_read() which may return fewer bytes
<drbrain>
so this test is unreliable
chrismcg is now known as zz_chrismcg
<headius>
thank goodness
<headius>
I'll submit a patch for it
havenn has joined #ruby-lang
<zenspider>
khaase: what uni?
<drbrain>
I'm not sure why #sysread/#syswrite is used over #read/#write
televisor has joined #ruby-lang
<khaase>
zenspider: Hasso Plattner Institute potsdam
<zenspider>
headius: you never contribute ANYTHING
televisor has quit [Client Quit]
<headius>
I know, I'm such a drain on the Ruby community
<zenspider>
you should just give up now
<khaase>
zenspider: Alan Kay, Dan Ingles and Gilad Bracha are in the fellowship, so there is a heavy Smalltalk presence
<headius>
drbrain: well, the test is testing sysread/syswrite…it's just making bad assumptions about the results
<zenspider>
khaase: damn
<headius>
yeah, so I tweaked it to ensure it sysreads until newsize = oldsize and the test passes fine in JRuby
<headius>
does that look reasonable? I didn't want to try to fiddle with synchronizing client and server threads
kurko_ has quit [Quit: Computer has gone to sleep.]
<headius>
the object_id test is goofy, but I left it
<drbrain>
headius: looks fine to me
<headius>
okeedoke
<drbrain>
headius: I imagine this test might fail if it wrote > one SSL block of text
<drbrain>
… fail on cruby
<headius>
it it was expecting them to come through as separate chunks, yes
<headius>
in this case it's all pretty synchronous
<headius>
oh, I see what you mean
<headius>
if cruby was chunking the writes and yielding inbetween
<headius>
yeah, it would
justinmcp has joined #ruby-lang
WillMarshall has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
<drbrain>
yeah
<swarley>
woo it works
bluepojo has joined #ruby-lang
WillMarshall has quit [Client Quit]
mistym_ has joined #ruby-lang
bluepojo1 has quit [Ping timeout: 276 seconds]
mpan has quit [Read error: Connection reset by peer]
mpan has joined #ruby-lang
<alvaro_o>
How can I remove the first character of the string "-testdata" ?
<injekt>
alvaro_o: str[0] = ''
workmad3 has quit [Ping timeout: 255 seconds]
<alvaro_o>
injekt: thanks. But is there a way to to it like in python's str[1:] ?
rajiv_ has joined #ruby-lang
<injekt>
alvaro_o: str[1..-1] is the same as that
<alvaro_o>
ooh!
<alvaro_o>
thanks
<swarley>
yup, sweet the stack works perfectly
kurko_ has joined #ruby-lang
desiac has joined #ruby-lang
desiac has left #ruby-lang [#ruby-lang]
coryf has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
goyox86 has quit [Remote host closed the connection]
bluepojo has quit [Quit: Leaving.]
bluepojo has joined #ruby-lang
rajiv_ has left #ruby-lang [#ruby-lang]
Nisstyre has quit [Quit: Leaving]
kurko_ has quit [Quit: Computer has gone to sleep.]
bluepojo has quit [Quit: Leaving.]
bluepojo has joined #ruby-lang
thatdutc_ has joined #ruby-lang
Nisstyre has joined #ruby-lang
perryh has quit [Excess Flood]
thatdutchguy has quit [Ping timeout: 244 seconds]
perryh has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
Cicloid has quit [Remote host closed the connection]
ruurd has quit [Quit: Leaving...]
wyhaines has quit [Remote host closed the connection]
ryanlecompte has joined #ruby-lang
savage- has quit [Ping timeout: 255 seconds]
bluepojo has quit [Quit: Leaving.]
justinram has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
nertzy has joined #ruby-lang
irleif has quit [Quit: Computer has gone to sleep.]
Nisstyre has quit [Quit: Leaving]
jkyle has quit [Quit: leaving]
m3nd3s has joined #ruby-lang
m3nd3s has quit [Client Quit]
m3nd3s has joined #ruby-lang
bluepojo has joined #ruby-lang
justinmc_ has joined #ruby-lang
irleif has joined #ruby-lang
AshleyWaffle12 has left #ruby-lang [#ruby-lang]
bluepojo has quit [Quit: Leaving.]
milestone has quit [Quit: milestone]
vlad_starkov has joined #ruby-lang
justinmcp has quit [Ping timeout: 276 seconds]
havenn has quit [Remote host closed the connection]
<swarley>
matti; this is what i ended up with http://pastebin.com/rFUMiyZG . Simple enough to do what i need it to do. I'll implement pop in a minute when i need to probably
vlad_starkov has quit [Ping timeout: 240 seconds]
<matti>
swarley: Cool, let me see ;]
<zenspider>
resizing per push is going to be a mistake
<matti>
swarley: And you nearly did what I suggested ;p
<matti>
swarley: In C you don't have to cast after malloc.
<matti>
swarley: And what zenspider said.
<zenspider>
you have to cast after malloc if you're compiling with all your warn/error flags on
<zenspider>
which of course you ALWAYS DO ALWAYS
bluepojo has joined #ruby-lang
adambeynon has quit [Quit: Computer has gone to sleep.]
<matti>
zenspider: I have -Wall -Wextra and -pedantic.
<swarley>
I have to cast from malloc on GCC to avoid warnings
<matti>
I don't.
<matti>
:)
<matti>
Anyway.
<matti>
Whatever works.
<matti>
Not like its broken.
<swarley>
Also, its resizing per push because i really dont want to do an exponential growth
<zenspider>
so you're gonna do geometric time instead. that makes sense.
therod has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
<swarley>
zenspider; what's your suggestion for a growth algorithm then
bfreeman has quit [Quit: bfreeman]
therod has quit [Ping timeout: 244 seconds]
rothbard` has left #ruby-lang [#ruby-lang]
kain has joined #ruby-lang
<zenspider>
every book, paper, and wikipedia entry out there has a suggested growth algorithm... choose something that works for you or, better, benchmark it on your own. benchmarking C is hellishly easy and a good practice to get into.
shtirlic has quit [Remote host closed the connection]
senekis has quit [Remote host closed the connection]