|
big star wars fan then?
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Haha.. no Star Wars here...
Err.. I mean, ok, the right most head hunters pics looks like he comes straight from Star Wars. But, unbeknown to all but me, he comes from parallel universe where there is no f***ing emo Jedi!
While I have to admit laser sabre are cool, I got psionic sword in it, they are cool too!
|
|
|
|
|
oh on the right he looks like that bobba fett guy or whatever. But then i am not a big follower of star wars, star trek, etc. so maybe it's just me.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
It's his parallel universe twin indeed. You eyes didn't mislead you!
It's a common mistake, no worries!
|
|
|
|
|
I love your dice grammar. it is good at breaking my code.
I tried to fix it to reference diceSets instead of diceExprs and it non only didn't parse, it didn't fail properly either.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
cool, glad to be of assistance, hahah!
good to know the ball, or maybe the dice, is still rolling! I was wondering if any progress were made..
On my side progress are made too! I display plenty of warning about the numerical data having various well identified problems!
Dunno how to fix them though! :/
|
|
|
|
|
If your goal is to make it work, I strongly suggest a simple recursive descent parse (hand rolled)
Your grammar is tiny, man. And dice roll syntax is not going to change. It's not a programming language - there's nothing to evolve. So maintenance wise, as a former software architect by trade, I'd advise against employing said tool.
The rationale being it's at least as, if not easier to write the parser by hand rather than complicate your build process (even slightly)
But if your goal is to learn how to use a parser generator than keep going this route.
Either way, I'll continue to help. But i could have written that recursive descent dice parser 6 times over by now. =)
Your dice grammar is a keeper in any case, as i like things that break my code.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I want a RPG player to type it, not a programmer to carefully enter it...
TinyPG work already! :P
Just trying your syntax out of curiosity!
|
|
|
|
|
ah, well if you have TryParse already built, then you're done. My code is too broken right now for me to be much help. It's the error reporting that isn't working, but it's necessary. It's also somewhat mroe difficult than I had expected.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Don't stress it...
I am using your parser out of curiosity, not necessity!
I am glad it helps you, and I am curious to know when it (will) work.
Meanwhile I am doing some totally different things and I am not even block in anyway, I already have another (working) implementation, if it were needed!
|
|
|
|
|
Cool. Yeah it parses okay. It's problem is it used to throw on the first error (easy)
I extended it to be able to error and continue. That made it brittle.
So basically i need to start that part over, and work error and continue in from the jump.
The other issue was it wasn't doing all the factoring it needed to, but that wasn't a problem here really. However, it did set me back some since I needed to add that in before i got too deep in reworking the parser. It gave me an opportunity to verify the parse table construction and conflict detection as well, which was a good thing, although it worked fine before.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
All the way you have to come to be here!
Nice keep up the good work! ^_^
|
|
|
|
|
I found the bug!
Well at least I found a clear cut critical bug.
The data structure is ... in need of change, that's gonna be some work... :/
Oh well.. maybe it will work after that?!
|
|
|
|
|
It's a slog man.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
also it's easy to make a recursive descent parser handle errors. my regexlib does that with regex expressions. matches parens and all that.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
To give you an idea of where i draw the line in terms of when I'll bring in the big guns - aka a parser generator:
When a grammar is more complex than say, JSON or regex.
Each of which I can write a recursive descent parser for in under an hour without rushing.
Your dice grammar is less complex than either by a significant margin, which is why i've wondered why you're using a generator for this.
It's a bit heavy handed.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
well.. I was wondering how to parse all those dice expression, in any order, with space and ambiguous syntax.
parser generator seemed like the easiest solution.
from start, to reading about the syntax, to test, to finish took me one hour.
One hour well spent if you ask me!
|
|
|
|
|
But you haven't parsed it into the tree, and the way the tree is looking that's going to be a bear.
Your tree doesn't quite look like what you need it too. Esp when I load into my grammar the diceExprs should usually be diceSets but when i try to build the grammar that way i get an LL(1) conflict.
I don't know what the trees look like in TinyPG.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I've been reading an excellent book (ok, imo), Possible Minds.
The book offers 25 thoughtful perspectives concerning AI and the impacts it could have on humanity.
There are two camps:
1) AI is a potential existential threat.
2) AI is nothing to worry about; we know what we're doing and we can control it.
It seems like we are in a moment similar to the one just after the Manhattan Project produced the first nuclear bombs - humans were in possession of and using a power we really didn't fully understand.
We create something that kind of feels like 1), but then we collectively act like it's 2).
From your perspective as a software developer, what camp do you fall in? If neither, define your own.
Cheers,
Mike Fidler
"I intend to live forever - so far, so good." Steven Wright
"I almost had a psychic girlfriend but she left me before we met." Also Steven Wright
"I'm addicted to placebos. I could quit, but it wouldn't matter." Steven Wright yet again.
|
|
|
|
|
It's not the AI that worries me, it's the people creating the AI and influencing them in their decision making. Remember GIGO!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Forogar wrote: It's not the AI that worries me, it's the people creating the AI and influencing them in their decision making. Remember GIGO QA!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Forogar wrote: Remember GIGO! Wasn't that a Madonna movie?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
Can you imagine if Clippy had become self-aware?
'Nuff said.
The Beer Prayer - Our lager, which art in barrels, hallowed be thy drink. Thy will be drunk, I will be drunk, at home as it is in the tavern. Give us this day our foamy head, and forgive us our spillage as we forgive those who spill against us. And lead us not to incarceration, but deliver us from hangovers. For thine is the beer, the bitter and the lager, for ever and ever. Barmen.
|
|
|
|
|
Quote: Can you imagine if Clippy had become self-aware? "It looks like you are attempting to destroy all life on Earth. Let me do that for you."
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
In my student days, I bought a book for one single reason - its title: "Machines who think".
Considering how long ago that is, I am not holding my breath while waiting for the self-aware machines.
If you really want to loose your sleep over such issues: Pick up some of the SciFi novels by James P. Hogan, such as "The two faces of tomorrow" or "Realtime interrupt". "Two faces" is from my student days as well ("Realtime" is more recent), but Hogan had the top AI experts at C-M and MIT review his manuscripts: Even today they hold water, seen from a professional perspective. Obviously, we have extended our understanding since the books were written, but the knowledge on which the books are built is essentially still "correct". Both books are higly recommended.
|
|
|
|