Live data from Hacker News

Guess my word

simbase.org

11–20 of 60 posts

Re: Guess my word

#12
post #2

I love HN. I got up early in the morning, made a nice breakfast (today? roasted turkey legs seasoned with my own personal italian blend, with a carrot and rutabaga mash, and a glass of whatever white wine was open and in my fridge, wasn't bad for a $7 bottle), had a cup of coffee (fresh ground, brewed using the inverted Aeropress method), cleaned the catbox, fed the cat (even though he probably ate as much as I did o…

Getting past the idea of having wine with breakfast(!) what's in your personal Italian blend?

It could be that the wine was used to cook, not drink. Just guessing :)

Re: Guess my word

#13
This is great! Inspired me to make a little script in spark-shell:

    > val words = oxforddict.
                filter{case s => s.exists(_.isLetter) && s.forall(Character.isUpperCase(_))}.
                distinct.
                map((_.toLowerCase,1))

    > def lcp(a:String,b:String) = { a.zip(b).takeWhile(Function.tupled(_ == _)).map(_._1).mkString }
    > implicit val wordOrdering = new Ordering[String] {
    >   override def compare(a:String, b:String) = { val lcpIdx = lcp(a,b).length; a.substring(lcpIdx).compareTo(b.substring(lcpIdx)) }
    > } 
    
    > def nextGuess(lower:String,upper:String,g:Int) = { val candidates = words.filterByRange(lower,upper).map(_._1).collect.sorted(wordOrdering).toList; val mid = candidates.length / 2; candidates.slice(mid-g/2,mid+g/2+1) }
    nextGuess: (lower: String, upper: String, g: Int)

    > nextGuess("prejudice","promise",1)
    res42: List[String] = List(primeness)
    > nextGuess("prime","promise",10)
    res47: List[String] = List(procris, procrustean, procrusteanize, procrustes, procrustesian, proctitis, proctocele, proctodaeum, proctor, proctorage, proctorial)
    > nextGuess("proctor","promise",10)
    res48: List[String] = List(profulgent, profundity, profuse, profusely, profuseness, profusion, profusive, prog, progenerate, progeneration, progenitor)
    > nextGuess("profuse","promise",12)
    ding ding!!
I love HN, and I love scala :D Thanks for posting OP. HN needs more great technical content like this and less opinion & news, in my opinion.

Re: Guess my word

#14

Earlier quoted context omitted.

Getting past the idea of having wine with breakfast(!) what's in your personal Italian blend?

It could be that the wine was used to cook, not drink. Just guessing :)

He said he had a glass, so there's the drinking. Although unusual, it's not the first time I hear of someone drinking a glass of wine at breakfast. It's common in some cultures.

Re: Guess my word

#15
Neat game, but it gave me an incorrect hint about the target word. I had narrowed it down to somewhere in the Vs, then accidentally clicked "I give up" and it told me the word started with a letter that comes way before v (I'm being vague here because it looks like the word is the same for everyone and I don't want to spoil it too badly).

Re: Guess my word

#17
I wanted more :) So here's my blatant clone sourcing words from the internet:

https://jsfiddle.net/fsc5v4v0/9/embedded/result/

And here's the code: https://jsfiddle.net/fsc5v4v0/89/

I hope it's bug free. jQuery is really a pain to reason about, so much implicit state all over the place. I thought React might've been a bit too much, but halfway through it I started reconsidering my choice :P

Re: Guess my word

#18

It's possible to cheat on the leaderboard. Go through the game once, figure out the word, play it again, guess the same word, first guess. Oops. ;)

Its mentioned already on Leaderboard: Select to reveal answer word:

3rd visible line on links: http://simbase.org/gmw/guess.cgi?by=joon&result=leaderboard http://simbase.org/simbase/leagues/simbasev3/gmw/guess.cgi?b...

Re: Guess my word

#19

It's possible to cheat on the leaderboard. Go through the game once, figure out the word, play it again, guess the same word, first guess. Oops. ;)

Or you could just look at the json file where the anwsers are stored :)

Re: Guess my word

#20
post #17

I wanted more :) So here's my blatant clone sourcing words from the internet: https://jsfiddle.net/fsc5v4v0/9/embedded/result/ And here's the code: https://jsfiddle.net/fsc5v4v0/89/ I hope it's bug free. jQuery is really a pain to reason about, so much implicit state all over the place. I thought React might've been a bit too much, but halfway through it I started reconsidering my choice :P

Nice! Though when I gave up, it didn't show me the word. :(
Post reply on HN