|
|
|
|
|
|
Tyche
Wizard


Group: Members
Posts: 1,349
Joined: May 23, 2006
|
#19 id:36986 Posted Oct 30, 2009, 3:58 pm
|
David Haley said:Geez, somebody's feeling kind of grumpy today.
I mentioned it because he has a C background, and therefore is likely to be more familiar with static typing, and perhaps more comfortable with it in some circumstances. I didn't realize it was such a terrible thing to say; please forgive me oh great Tyche. 
http://www.mudbytes.net/index.php?a=topic&t=2204&p=36659#p36659
How many times are you going to remind this poster that they ought not be using Ruby?
Frankly, several posters contacted me about starting a Ruby forum on muds, because they were sick and tired of threads being derailed by language bigots.
But not long after that, language specific discussion fora were created here. You don't see me posting in the LUA, Python, C++, Java boards advocating dynamic typing and switching to Ruby do you?
Yes I'm grumpy.
Enough already. Please kindly knock it the #### off.
Or go start a language war in the Controversial topics forum...
|
.........................  
For now we see through a glass, darkly; but then face to face: now I know in part; but then shall I know even as also I am known.
|
|
David Haley
Wizard


Group: Members
Posts: 6,912
Joined: Jun 30, 2007
|
#20 id:36987 Posted Oct 30, 2009, 4:57 pm
|
Wait... what? Dude, what is your problem? I didn't say he shouldn't use Ruby. In fact, I very explicitly said that it's "always nice to see somebody discover all the niceties of dynamic languages". In the other thread you refer to, I merely said that duck typing has its ups and downs, and later stated in no uncertain terms that "I absolutely agree that you should not shy away from these techniques". I most absolutely did not say "don't use Ruby" -- there, here or anywhere else.
In fact, while I discussed the issues, your only contribution to the thread after that was some childish repetition that added nothing. I'm not sure why you feel that kind of post is appropriate, but that even daring to mention other languages as interesting comparisons is a crime.
Did I mention Java here? Why, yes, I did. I think it's interesting to learn about languages that explore various techniques, and in the past Stary and I have discussed these questions and he seems to enjoy it, and therefore I felt it appropriate to make that (very brief!) remark.
Did I say "you must use Java instead of Ruby"? No, I did not. Did I say "you should use something other than Ruby"? No, I did not. Did I say "Ruby is bad"? No, I did not. I don't think I need to elaborate further on this point.
- If you have a problem with discussing ups and downs of any language technique, I don't know what to say, other than to point out some amount of irony at your usage of the term "language bigot".
- If you think that discussing ups and downs of dynamic language features is specific to Ruby, you need to broaden your spectrum a little bit.
- If you have a problem with side remarks meant to enlarge somebody's knowledge of computer science, while at the same time praising their willingness to explore and being happy at what they're learning, then I think your attitude is completely unsuited to this environment.
- If you saw a thread about some other language that was doing something shady, I would most certainly expect you to share your knowledge with people as to why that technique is shady, or potentially dangerous at least, and how to avoid problems with it.
- If you're so sensitive about Ruby that passing remarks are enough to provoke this temper, maybe you need to calm down a little bit and realize that this is about sharing ideas, not starting a "language war" (why you are so keen to turn it into one is a mystery to me).
I'm sorry Tyche, but I think you are being entirely unreasonable and I will have to decline your request. I guess that you could try talking to the moderators if you still feel that my behavior is completely out of line.
|
|
|
|
|
JohnnyStarr
Wizard


Group: Members
Posts: 823
Joined: Feb 14, 2009
|
#22 id:36989 Posted Oct 30, 2009, 5:39 pm
|
Wow, so I'm not going to take sides, but for what it's worth I wasn't
offended by DH. Him and I have been talking about C for about a year now. And
ironically I think this is sad because I've learned a ton from both you guys.
In fact it was DH that helped me with a ton of questions, and Tyche that inspired
me to learn Ruby. So, I hope you guys figure this one out.
On to business...
Skol said:
Since it's 'vnum'less (with regards to a Diku-deriv line), could you still have say 'two' of the same item names, yet different items etc? Or would it be simply something like obj/shire/one.ring/fake.version etc? (With the fake being an instance of one.ring with modified properties etc).
I won't lie to you, I haven't worked out all the kinks. I only recently started using this kind of file path
vnum system. Yes, the prototypes for objects are stored in .yml files with respective file paths.
I'm storing these prototype objects along with Rooms in ruby Hash tables with the key being the path-
vnums and the value being the objects themselves. so:
Code (text): 1
2
3 | p room_hash['shire.room.clearning'].description #=>"you are standing in a clearning." |
Like I said, I'm not yet done, so any suggestions would be great.
|
.........................
"It's not the daily increase but daily decrease. Hack away at the unessential." - Bruce Lee
Southlake Window Cleaner
|
|
JohnnyStarr
Wizard


Group: Members
Posts: 823
Joined: Feb 14, 2009
|
#23 id:36990 Posted Oct 30, 2009, 7:05 pm
|
er, can't edit it now, but i noticed that i separated the 'shire.room.clearing' with '.'s
which i have changed to suit my needs. in each game object loaded from YAML, i have a vnum, path, name and keyword member. for vnum, i found the best convention is using '.'s to separate the object
path, then '-'s for the spaces: shire.room.johnnys-room, this would be converted to: shire/room/johnnys-room for the 'path' member. the keywords would be "johnnys room" and the name would be "Johnnys room". I'm still playing with it, but I've found this to work best for me.
I am not using a SQL db for now, I am serializing objects using YAML. But, I am separating files
by area/mob, area/room, area/obj. This is where the prototypes are being stored. I got the idea
from LPC and help from others on this forum. Now, As far as resets go, I haven't made up my
mind. I know that LPC might use something like 'shire/room/johnnys-room/mobs/balrog', but I
don't see the benefit of making resets literal files. Once a prototype is loaded, it will only be
loaded again from disk if A: the file is changed in OLC or manually, and B: on loading the server.
I would like to think as far as vnums go, that when hard coding literals (if desired) you could use
the '.' to sort of dereference the area object. Yes, I know that this is not actually happening, but from
a programmers standpoint, it's simply a matter of preference. EG. mob_hash['shire.mob.giant-balrog']
|
.........................
"It's not the daily increase but daily decrease. Hack away at the unessential." - Bruce Lee
Southlake Window Cleaner
Last edited Oct 30, 2009, 7:13 pm by staryavsky
|
|
|
|
Skol
Sorcerer


Group: Members
Posts: 493
Joined: May 17, 2006
|
#25 id:36995 Posted Oct 30, 2009, 11:09 pm
|
Stary, you could also use vnums, but in a perhaps different way (thinking 'sorting' as far as mapping things going, knowing what lays where etc).
ie: room:shire/1.clearing, mob:shire/32.gandalf.wizard
Although that's me from a Diku background wanting to tag a number on things heh.
I do like the idea that you could grab a 'desert' room, and apply to it though. Or a goblin mob, and add on etc. (Much like 'race' is used from a diku side, parent stats then you modify).
I'll be totally interested to see how you do 'versions' of mobs/objs/rooms using a parent from a different area. You could set up a quasi 'limbo' area (or equipment, monsters, etc).
|
|
|
elanthis
Wizard

Group: Members
Posts: 772
Joined: Feb 26, 2008
|
#26 id:37001 Posted Oct 31, 2009, 4:37 am
|
Quote: Geez, somebody's feeling kind of grumpy today.
Tyche is always grumpy. Him and I could start the Grumpy Old Men club, but the last thing either of us want is to have a #### and an ass in the same place at the same time.
|
|
......................... Cutting corners to keep your line count down is just sad.
|
|
Tyche
Wizard


Group: Members
Posts: 1,349
Joined: May 23, 2006
|
#27 id:37014 Posted Oct 31, 2009, 4:08 pm
|
elanthis said:Quote: Geez, somebody's feeling kind of grumpy today.
Tyche is always grumpy. Him and I could start the Grumpy Old Men club, but the last thing either of us want is to have a #### and an ass in the same place at the same time.
One gets tired of correcting a poster's steady stream of diarrhea on certain topics.
You'd think people would catch on and demand examples of ruby code illustrating this so-called "good advice".
|
.........................  
For now we see through a glass, darkly; but then face to face: now I know in part; but then shall I know even as also I am known.
|
|
Tyche
Wizard


Group: Members
Posts: 1,349
Joined: May 23, 2006
|
#28 id:37016 Posted Oct 31, 2009, 4:19 pm
|
David Haley said:
- If you saw a thread about some other language that was doing something shady, I would most certainly expect you to share your knowledge with people as to why that technique is shady, or potentially dangerous at least, and how to avoid problems with it.
Trolling. Q.E.D.
|
.........................  
For now we see through a glass, darkly; but then face to face: now I know in part; but then shall I know even as also I am known.
Last edited Oct 31, 2009, 4:20 pm by Tyche
|
|
David Haley
Wizard


Group: Members
Posts: 6,912
Joined: Jun 30, 2007
|
#29 id:37019 Posted Oct 31, 2009, 4:27 pm
|
Tyche said:David Haley said:
- If you saw a thread about some other language that was doing something shady, I would most certainly expect you to share your knowledge with people as to why that technique is shady, or potentially dangerous at least, and how to avoid problems with it.
Trolling. Q.E.D.
Where is the trolling on my part here?
|
|
|
Tyche
Wizard


Group: Members
Posts: 1,349
Joined: May 23, 2006
|
#30 id:37023 Posted Oct 31, 2009, 7:09 pm
|
David Haley said:Tyche said:David Haley said:
- If you saw a thread about some other language that was doing something shady, I would most certainly expect you to share your knowledge with people as to why that technique is shady, or potentially dangerous at least, and how to avoid problems with it.
Trolling. Q.E.D.
Consider these "shady" practices you disparage are actually the preferred and recommended techniques of programming in Ruby. The language, its standard libraries and most of the gems are in fact actually written extensively using module mixins and duck-typing. Ruby is not C++ or Java. Warning someone to avoid them is like warning a Haskell programmer about the pitfalls of functional programming. More often than not, C++ and Java programmers write painfully ugly and slow code in Ruby until they adopt these "shady" practices. If these practices only work on small or single authored projects then nobody would be running Ruby or hundreds of Ruby gems, because the projects simply wouldn't exist. You can't even write Ruby code that doesn't duck-type because it uses it internally on every single call. These dire warnings about "shooting yourself in the foot" are the product of other paradigms. Paradigms of people who actively choose not to use Ruby.
I'm not interested in engaging in a language design argument every time someone posts a Ruby question.
Since the moderators don't wish to respond to my request to stop this cross language trolling, and you insist you'll just continue, then flaming you every time you do it seems to me to be the best way of handling it.
|
.........................  
For now we see through a glass, darkly; but then face to face: now I know in part; but then shall I know even as also I am known.
|
|