« first day (1844 days earlier)      last day (2989 days later) » 

5:00 AM
Maybe I'm looking at this the wrong way. If A is a knave, then that means q doesn't matter at all. The same way if I say, "If I am a cat, moons can dance" doesn't say anything about whether moons can dance at all.
 
^
 
Yes
 
If FALSE then anything
^ always true statement
 
But "If I am a cat, moons can dance" is a true statement
You need the statement to be false
 
So no Knave can say it
 
5:01 AM
No, it isn't.
 
^^
Yes it's true
 
@El'endiaStarman I predict 1) PhiNotPi 2) Alex 3) Alex 4) Alex 5) Alex
 
No, because I could be a cat and have non-dancing moons.
 
I'm assuming you aren't a cat XD
 
check out the truth table on wikipedia en.wikipedia.org/wiki/Material_conditional
 
5:02 AM
so you're running @PhiNotPi?
 
Of course!
2
 
What's this stuff about mods anyway? I don't think I'm responsible enough to be a mod, but I'm curious of what's going on.
 
mods have to be elected whenever the site graduates
 
Yes, I know
 
currently mods are not elected officials
 
5:03 AM
But I don't see anything on meta
 
It will happen with the election
It's an easy discussion for an unknown event
beats sitting around lamenting how CR is bad
 
Okay
Guys VHDL is painful
 
hey @Liam
 
Hey
need some convincing?
 
You know how Java is verbose? Just look at VHDL... Suddenly, Java looks really terse.
 
5:05 AM
So, when you negated the "=>" bit
you negated it twice sort of
you negated the outer bit and the inner condition
 
VHDL looks terrible
 
before the end bit was F == 1, then when you negated it you said ~(F == 0)
 
It's painful, but not terrible
Verilog is not painful. But I'm playing around more with VHDL
 
It would be correct if the initial question had F==0
 
So B says "If A is a Knight, Then F is a Knave"
If we agree that A is a Knight
 
5:06 AM
ah
you wrote the query wrong
 
VHDL is a good name for a programming language. VHDL stands for VHSIC Hardware Description Language. You know a language is verbose if it's name is literally an acronym for an acronym.
 
THB, I don't foresee myself actually being able to win an election... it's hard for me to make an argument against the current team.
 
@Liam you wrote B: ( A = 1 ) => ( F = 1 )
 
ahh
 
@PhiNotPi you never know
 
5:07 AM
we're just doing different problems lol
 
yeah haha
 
no wonder we can't agree
i'll go fix that
 
VHDL: Very High Speed Integrated Circuit Hardware Description Language (tm)
 
Yes
But it's usually:
VHDL: VHSIC Hardware Description Language.
VHSIC: Very High Speed Integrated Circuit
Lovely, aint it?
 
thanks for noticing that!
 
5:09 AM
@Liam, can we replace => with !q or p in our flexible query?
or must we have an => symbol
 
VHDL makes me appreciate Ruby's ranges much more: 1..5 vs 5 downto 0.
Or Verilog: 5:0
 
@CameronAavik No, you can't replace statements with logical equivalents
 
I just love how the acronym just loses all correlation with the amount of words it stands for
 
And the strongly typedness is painful
 
otherwise it really would be a dupe of that other challenge
 
5:10 AM
@Liam, alright, then that's the only one I need to replace haha
 
We might as well have acronyms that are like ten layers deep
 
@Aearnus Why not infinite? GNU: GNU's Not Unix
 
@Liam, I'll keep my old solution anyways
 
you can use whatever symbols you want though
 
but also add a new soution
 
5:11 AM
Aearnus Exists As Remains Not Under Soil :)
 
Here's a function in VHDL:
function func_name(param : param_type; param2 : param2_type) returns return_type is
begin
    -- do some logic
    return some_value;
end function;
 
I thought you said it was more verbose than Java :P
 
And before you actually define it, you have to declare it
 
@Justin This looks eerily similar to Fortran.
 
The syntax is just so eww
 
5:13 AM
So function func_name(param : param_type; param2 : param2_type) returns return_type; has to be before that function
 
It's Ada-based, right?
 
@AlexA. Not surprising; VHDL is old.
Idk
 
@Sp3000 taking an optional list arg as a starred arg is really clever!
 
I'm not one to pay attention in class
They didn't even teach us functions. Or types (other than enumerated types).
I learned them myself to make my life easier
 
@Sp3000 I wonder if this can be used to improve general recursive solutions where you prepend to a list
 
5:14 AM
But the best thing about VHDL is the with-select statement and when-else statement and case-statement. They serve nearly identical purposes, but have vastly different syntaxes.
 
@xnor :) yeah I was thinking the same - sometimes you don't want tuples though :/ (and (*...,) adds a byte here over [*...])
The nice thing about 3.5 though is that appending also works, not only prepending
 
So, has anyone had any experience golfing with perl 6? how is it?
 
-- with-select
with signal select
    value <= some_value when signal_is_this_value,
             other_value when signal_is_other_value,
             last_value when others;
-- when-else
value <= some_value when signal = signal_is_this_value else
         other_value when signal = signal_is_other_value else
         last_value;
-- case-statement -- needs to be in a process:
process(signal)
begin
    case signal is
        when signal_is_this_value => -- do anything, basically
            value <= some_value;
 
oh jeez that's not perl 6
 
At least when-else is just python's ternary operator.
 
Anonymous
5:19 AM
@Aearnus Yeah it's 1000x more readable
4
 
I also really like how VHDL uses = for equality and /= for inequality
 
@xnor Funny thing if I do f=lambda*L,r,k: it's valid 3.5 syntax so I get no syntax errors, but I get a type error because r,k are never unpacked :/ (missing 2 required keyword-only arguments)
 
Justin's gone language-hipster on us.
 
Oh, and here's how you declare an entity in VHDL:
library ieee;
use ieee.std_logic_1664.all;
use ieee.numeric_std.all; -- if you want unsigned or signed numbers

entity entity_name is
    generic(WIDTH : natural := 32)
    port( clock : in std_logic;
          reset : in std_logic;
          d : in std_logic_vector(WIDTH - 1 downto 0);
          q : out std_logic_vector(WIDTH - 1 downto 0));
end entity_name;
 
Anonymous
@Geobits Quick spray him with the hose
 
5:22 AM
It's not that long! But note that this is just the declaration
 
I like that you have to import to use negative numbers :)
 
Anonymous
 
Oh that's just mean :P
 
Here's the whole thing together:
library ieee;
use ieee.std_logic_1664.all;
use ieee.numeric_std.all; -- if you want unsigned or signed numbers

entity entity_name is
    generic(WIDTH : natural := 32)
    port( clock : in std_logic;
          reset : in std_logic;
          d : in std_logic_vector(WIDTH - 1 downto 0);
          q : out std_logic_vector(WIDTH - 1 downto 0));
end entity_name;

architecture architecture_name of entity_name is
    signal s1 : type := value;
begin
    -- concurrent statements
    process(sensitivity_list)
 
@Liam, I submitted my solution which uses "and", "not", "or", "==", and "->" instead
 
5:24 AM
@Geobits It's funny because you have to import to get std_logic which is what you usually want to use, rather than bit or bit_vector
Verilog is so much cleaner
But if I have to use a language for a class, I might as well learn the language
I spent 5-6 hours on a lab today that I could have spent 3-4 hours on because I want to learn languages.....
@Geobits Note that this is just if you want the unsigned or signed type (or some other stuff). You can still use integer or natural which are "arbitrary" integers or non-negative integers. However, note that while they are "arbitrary", their range is only 32 bits, but not even quite the regular range. It's awkward.
I really need to transfer to a different school.... I didn't realize it before, but I'm bored in all my classes (except for math).
 
@CameronAavik Awesome, thanks! I'll test it in a bit
 
Arbitrary less-than-32-bit positive integers. Sounds like an excellent design choice.
 
Actually, it's not less-than-32-bit. It can be more. Or it can be weird.
 
Yes, that definitely sounds weird ;)
 
@Liam So "The present king of France is bald" is false?
 
5:29 AM
the default integer type ranges from -2^31-1 to 2^31-1.
I mean, what?
Why not put in that extra value??
 
@CharlesKoppelman ?
 
@Justin It's not set aside for something silly like infinity or NaN, is it?
 
No
You have to use a real for that
 
I figured, but hey, why not? :P
 
And you have to import to use real, it seems.
 
5:32 AM
@Liam You are saying that in Knights and Knaves, the statements must be entirely true or false and there is no throw-away statement. So therefore any implication assertion must have its preconditions valid
Is that so?
 
Bitwise operators: and, or, nor, nand, xor (maybe there's an xnor), not...
Concatenation operator: &.
 
@CharlesKoppelman Not necessarily. A Knight can say something like "if 2+2=5, then you are a kitten"
 
@CharlesKoppelman if the precondition is not valid, then the implication is not enforced
 
A knave however cannot say that
 
p => q is equivalent to ~p v q
 
5:34 AM
@Liam But a knave cannot?
 
^
 
@CharlesKoppelman if a Knave says it, then it is equivalent to the only case when p => q fails
which is when p is true and q is false
 
simply put: A statement with a false premise is a true statement
 
@Justin what class are you taking that has you using that language?
 
5:36 AM
Thanks
 
@Aearnus It's a Computer Engineering class :P. What do you expect :-)
ECEN 320 at BYU.
 
ah, very cool
 
@Liam It may be helpful to explicitly state that in the puzzle.
 
yeah I should.
I'll make the edit in a minute
 
Cool. I like the puzzle, btw.
 
5:37 AM
It's rather boring. There is too much homework and they're all obvious problems but there's so many of them and they're so tedious. Except most my classes are like this, and the other people in the class don't feel that way so much; they struggle with the problems... O.o
 
I've always loved logic puzzles. "What is the name of this book" is a phenomenal book full of puzzles if you want more of them
They get way harder
 
Bleh. I tend to hate books of logic puzzles. Not so interesting. Mensa books are fun, though.
 
@CharlesKoppelman fwiw, the a => b thing is a mathematical definition used lots in boolean algebra and proofs
 
Idk about Mensa books, but this one is fun. You track down Dracula and almost get eaten
it has a bit of a story along with it.
 
Okay
Maybe it would be fun
 
5:40 AM
I've read it more than once, and I get bored easy
 
Okay
 
I'll add that but I'll write a little section on conditionals.
 
I hate logic puzzle books, which is why I'm here and not on Puzzling :P
 
@Justin I haven't taken a CS course, so I wouldn't know anything about the work or anything. Is it really that bad?
 
5:42 AM
Note that CS classes are easy
Just projects
Basically
Electrical/Computer Engineering classes really do assign a lot of work.
CS classes do too, but if you know programming about the level I do, the projects are easy, and the homework they do assign is shorter to work through than ECEN homework.
But it's hard when all my classmates are struggling to understand the material and are complaining about how hard it is, while I'm just thinking about how tedious it is. For me, this stuff is really not that hard, but it's so tedious.
@Aearnus So yeah
 
so much hate for logic puzzle books
:(
 
I did my discrete mathematics course last semester, it was ok
 
so all this is fresh in your mind then
 
Anonymous
There are few things as pleasant as being done with college :)
 
@Liam Sorry :(. My problem is that they like problems like the "using only these cups of these sizes, measure out this much water" and those problems are so simple and the way to solve them is basically to just do it.
 
5:46 AM
@Liam eh, it was 3 months ago
 
Oh i've never really read a book like that one.
 
Really? So this book is different. ☺ Starting to get excited
 
I'm australian, so I an still on uni holidays :P
 
"What is the name of this book" by (Raymond?) Smullyan
just google the title + 'pdf' and you'll find a free copy
 
Or maybe the library has it
 
5:48 AM
(I own a hard copy, don't feel bad about getting a pdf online)
 
I know. I just prefer hard copies
The library does have it
 
surprising. It's kinda old
The guy died several years back if I recall
 
Wow the book looks good
 
haha thank god you didn't come back and tell me it was utter crap
 
It even feels like it was written in LaTeX
 
5:51 AM
That's the book that made Knights and Knave puzzles "popular". He coined the phrase
It probably was. He was a logician (professor I think)
 
That's what makes the book interesting. After just reading a page, it's clear that he's a professor in logic/math. He knows what he's talking about.
 
I think I was sadder when I heard he died than when I heard mj did.
 
@Liam Thank you for sharing the book. I'm definitely going to read it
 
No problem. Let me know how the harder puzzles go
 
When I heard that Michael Jackson died, I didn't know who he was. I knew there was a Michael Jordan too; were they the same person? I had no idea at the time; I didn't know the last names or what either person did.
 
5:55 AM
haha really
 
Yes
 
I don't know what that says about your demographic
 
I was a little kid, okay
I also never watched any sports but baseball and swimming
 
American?
 
Yes
 
5:55 AM
really
 
?
 
that's pretty impressive then.
 
??
I'm confused.
 
I didn't listen that much to MJ or watch any basketball at all and I still knew who they were
 
Let's see... I was about 10 when he died.
 
5:57 AM
ahh maybe I didn't back then
good point
I'm so surprised when I find out that people in here are young. I just default to assuming everyone is like in their 40's or something
 
but... how didn't you know about him before then?
@Justin
 
He was too busy idolizing Linus Torvalds
 
Who in the world is that?
 
guy who made linux
 
Oh.
 
5:59 AM
(not the whole thing, he mostly joined people's libraries together)
 
Anonymous
I was 15 when MJ died :P
 
When did he die?
 
Anonymous
Linus wrote the Linux kernel, which was a pretty monumental undertaking
 
he also made git
 
june 25 2009
 
5:59 AM
@Liam I do believe that median age is probably 10-20 years less than that here, but I might be wrong. In either case, our range seems to be somewhere in the low-to-mid-teens to however old Peter is (or is there someone older?).
 
@somebody I didn't listen to music. My parents listened to Billy Joel and the Eagles and Chinese songs. Also an a capella group called InsideOut.
 
I was 8 then, and I didn't listen to music either
 

« first day (1844 days earlier)      last day (2989 days later) »