« first day (1372 days earlier)      last day (3477 days later) » 

12:30 AM
We totally need xkcd-what-if style "footnotes" on SE... for some things they'd be so much more convenient than spoilers in stuff... one could actually shorten posts for people who don't need/want all the detail, but include additional information for those interested.
 
Something better than <sup>*blah</sup>?
 
1:20 AM
0
A: Sandbox for Proposed Challenges

Stretch ManiacOrganize Halloween Candy - Hole #4 What does every kid do after he/she collects buckets of candy over Halloween? Sort it by type and size, of course1! The Challenge Given a dumped-out bag of candy of varying shapes and sizes, sort the candy from left to right based on: The amount of candy ...

 
1:59 AM
0
A: Sandbox for Proposed Challenges

NathanielAutogram programs This sentence employs two a’s, two c’s, two d’s, twenty-eight e’s, five f’s, three g’s, eight h’s, eleven i’s, three l’s, two m’s, thirteen n’s, nine o’s, two p’s, five r’s, twenty-five s’s, twenty-three t’s, six v’s, ten w’s, two x’s, five y’s, and one z. Such sentences are ...

 
2:51 AM
What about a Wumpus Hunter Solver?
32
Q: Hunt the Wumpus

Michael SternWhen I was a lad, kids would wander into computer stores and play Hunt the Wumpus until the staff kicked us out. It was a simple game, programmable on the home computers of the mid-1970s, machines so rudimentary that instead of chicklet-sized microprocessors, I think some of them probably had rea...

I know the algorithm, and I can always win unless I am surrounded by potential wumpus rooms or potential bottomless pits.
Then, I have about a 2:3 ratio of winning.
 
 
3 hours later…
5:47 AM
I wrote ten Python golf puzzles: one-line snippets of Python code which you can shave characters from if you're clever
would people be interested in this sort of thing?
what should I do with them?
 
 
2 hours later…
grc
7:40 AM
@xnor that sounds awesome
I'm not sure how you'd make it work as a challenge though
 
7:53 AM
yeah, i don't really know where it would go
it's surely off topic for a question
a post on Python golf tips maybe?
it's not really tips though
 
grc
would it work to have a collection of snippets like that for learning/practice & fun rather than competition?
where anyone could contribute
 
that would be cool
how do you imagine it working?
post snippets as answers?
 
grc
maybe
and solutions would be hidden in spoilers
 
would you want to know the char-count of the best solution when solving?
i mean of the intended best solution
 
grc
I guess that would make it more like a puzzle that could be solved
 
 
3 hours later…
11:01 AM
@Sp3000 Well, the point isn't really that it's a superscript, but that you can hide text in an overlay box.
 
Ah k, I see :P
 
Alternatively, expandable spoilers would be an option.
 
 
1 hour later…
12:09 PM
@Calvin'sHobbies What're you going to do with ASCII's Characters when you get to quote 1? Do you work backwards, filling in the unused quotes then?
 
Don't think quote 1 would be possible tbh :P
 
@BetaDecay The game is over when they get to unary, but it's unlikely that that will even happen (especially since the Unary language has already been used, and I don't know if there's another one out there).
 
Yeah.. Haha. I wonder if anyone's going to be able to get the Dirty Harry quote in... It's quite long
 
I'm not even sure if there's any 2 character ones, esp considering 0's been knocked out :P
 
Are there any languages which use unicode characters? That could be very handy.
 
12:18 PM
Printable ASCII only :P
 
@BetaDecay the code must only contain printable ascii
but sure, APL
 
Oh yeah... Damn...
It's just a matter of looking through the list of esoteric languages now... :P
 
I know at least 3 that work ... wait 2 now
:P
Too many BF derivs though
 
How did Brainfuck get so famous? It's not like it's the first...
 
It's pretty old, and I think the first one being that simple
Whereas older esolangs were a bit more complex... or maybe I just misremember
 
12:34 PM
Yeah probably something like that.
 
Okay, I give up... the quotes one is too hard for me
 
Calvin's Hobbies' new challenge is really interesting... I think I've reduced the image to some really useful data now, but I just can't get the last step reliably
basically I thought: find all shapes via flood fill. find each centre via a simple arithmetic mean of all pixels. and then if I take the angle to all pixels in the shape, I should get 3,4,16 or no peaks depending on the shape. but I'm not sure how to reliably find peaks in discrete data
 
How has Quincunx done it?
 
edge detection or something
or no, I think he just measures the length of the boundary
 
12:49 PM
Hm. It's an interesting method he's used...
 
hm, this looks promising
Norm-vs-ArcTan plots
 
I'd imagine boundary would work really well for the gear at least - and since the shapes are always the same the others should be okay too?
 
1:04 PM
sick, got it
 
1:15 PM
meh, doesn't work reliably on all images :/
 
@MartinBüttner: I may be misinterpreting your new regex challenge. I'm not quite sure what it means for an expression like ^P to be in the "match" pool rather than just a string like a. I assumed it meant that every expression "from now on" had to match at least one string matched by each of the expressions in the match pool.
 
@COTO no, for all future answers, your regex simply becomes a string to be matched
 
So the pattern itself becomes a match string?
 
or non-match string
as far as any individual answer is concerned, this is just plain regex golf: there is a set of strings to be matched and a set of strings to be failed. the only catch is that those sets are made up from the regexes of previous answers (which are just treated as strings though)
 
So I could add \^P to the match pool, for example.
 
1:22 PM
but that would only match ^P. it wouldn't match PPCG
but in general you are completely free to choose which pool to put the regex in
 
OK. Suppose I submit P to the non-match pool. What's your next move?
 
you can't. P matches [PPCG] ^^
(as in, you can't submit it to either pool, because it's not a valid answer)
 
It matches ^P and PPCG, and it doesn't not match anything in the non-match pool, which is empty. How is it not a valid answer?
 
the non-match pool isn't empty. it start with [PPCG]
 
Oh, OK. I missed that.
Let me think then.
Actually, isn't having a repeated character in a [] block a syntax error in many flavours of regex?
 
1:27 PM
I don't think so, but the two initial strings aren't even intended to be regexes.
but if that would make things easier, I can certainly find you a flavour where that's fine.
EMCAScript
 
No, it's OK.
OK, how about P(?!\])?
Into the non-match pool.
 
did you mean P(?!.*\])? because your pattern still matches [PPCG]
 
Right.
 
sure. so match: PPCG, ^P ... don't match: [PPCG], P(?!.*\])
 
But... that's treated as a string.
 
1:32 PM
for the next answer
hm, I really wonder where the communication between us is currently going wrong ^^
 
No, I'm getting it.
Trying to think of a way to "break" it. Just to see if it can be done.
 
no, as long as the sets are disjoint
because you can always to ^(...|...|...)$ where the ... are the strings in the match set literally (possibly with escape characters)
 
Right, but the sets aren't disjoint. P matches both sets, obviously.
 
but ^P$ doesn't
the sets are sets of strings, and those are disjoint because no submission may be identical to a previous string
 
I'm just wondering if there isn't a way for the closure of the no-match strings could be made equal to the closure of the match strings, even though the two sets of strings are disjoint.
I guess not.
 
1:39 PM
the regex ^(a|b|c)$ only matches exactly three strings (a, b, and c) under any circumstances, so I don't think that's possible.
 
It's an interesting idea. I'd play, depending on the activity level. That last "sequential answer" one by Calvin had the page jumping up and down like a Jack Russell terrier with edits, deletes, revisions to the question, new answers, comments.
I like the fact that you added some rules to slow things down a bit.
 
2:29 PM
0
A: Square, Circle, Triangle, ...Gear?

Martin BüttnerMathematica, 459 bytes f=(d=ImageData@Import@#/.l:{_,_,_}:>Sign@Tr@l;p=AppendTo;(For[a={};b={#&@@d~Position~1},b!={},c=#&@@b;b=Rest@b;d[[##&@@c]]=0;a~p~c;If[d[[##&@@(c+#)]]==1,p[b,c+#]]&/@{{1,0},{0,1},{-1,0},{0,-1}};b=b⋃b];m=1.Round@Mean@a;n=Count[Partition[Norm[#-m]&/@SortBy[a,ArcTan@@(#-m)&],3...

 
Looks nice.
 
 
1 hour later…
3:59 PM
@PhiNotPi I noticed you have an interest in chess. Would you like to create a chess game this winter between semesters?
I've been interested in it for a while now, and I'm sure we could do it.
ASCII art, of course. I can only create GUI's with WPF.
 
4:55 PM
read-only mode is boring :(
 
5:23 PM
@hosch250 Sure, I guess.
Nobody likes read-only mode.
Last winter I worked with a group of code-golfers to make a game of checkers.
 
in the meantime I golfed down that mathematica code to 392 bytes :D
but I can't update the post...
 
Instead of trying to count the number of peaks, what happens if you simply compute the average distance from the center? That seems like something which would vary a lot less.
 
Well, that's probably just a less significant version of what Ell does
(maximum distance)
I'm considering to post that as well, as an aside, just to see how short I can get it in Mathematica
but it doesn't seem fair to compete using his really good idea
 
Maximum distance was my first idea as well.
The only thing stopping me is the fact that I've never bothered to learn image manipulation.
 
heh
it's such a joy in mathematica
you do ImageData@Import@filename and you get a w-by-h-by-depth array of channel values
then you do with that whatever you want
and then you call Image@ on the result
 
5:37 PM
Is @ composition in Mathematica?
 
@FireFly no, just prefix notation for function calls
 
Aha
 
composition is @* (as of Mathematica 10)
 
By the way, Netpbm image format is the best.
Why? Because images are literally stored as ASCII text files.
 
Well, if you use the ASCII variation.. :P
My favourite use of the ASCII netpbm variation is in the underhanded C contest
 
5:44 PM
I've seen that before.
 
I like it since it actually redacts the data like it's supposed to, on an image level
 
This is kinda unrelated, but lately I have been thinking about what it would take to design a computer from the ground up.
Starting with the logic gates.
 
read only mode is over!
@PhiNotPi in the very first term of my bachelor's degree I had a lecture on hardware, that was so good, I actually would have been capable of doing that at the end of it.
 
I've actually attempted to design a CPU before, based on the "One Instruction Set Computer" idea.
There's something called Transport-Triggered Architecture, and it is the simplest way to make a CPU, ever.
 
6:13 PM
That's how the wireworld machine was designed (being transport-triggered, I mean)
 
@PhiNotPi I did that once in a software simulator. Took me hours, and then it broke the simulator because it was too complex. :(
 
What software simulator did you use?
 
6:29 PM
@PhiNotPi I am actually studying that this semester!
 
I can't remember now. It was on our home PC, a Windows box, in about 2000.
 
@PhiNotPi If you want to simulate it, look up the Quartus II software with ModelSim. That is what we are using.
Actually, we are using an actual computer thingy, but it can be replaced with ModelSim (the previous semester did this).
I am planning on writing a C++ to Python 3 converter sometime.
Maybe we can collaborate on that too (I can provide all the syntax and testing).
BTW, you might want to look up RISC, SIMD, and MIMD for your CPU.
That is, if you haven't already.
 
There's also logisim which is a bit simpler but less powerful
 
I did (in a class) design a processor; we used Quartus. Now I'm in a class where we will design a processor (yay for redundant classes!) and we are using Xilinx
 
I didn't like the quartus tool when we used it about a year ago
 
6:43 PM
I don't either - it doesn't let me delete test files after I run them through it.
 
There were a few things in Quartus that I liked, and a few that I didn't like. Comparing Quartus to Xilinx, I think Quartus has a neater graphical design method, but Xilinx works better for Verilog.
 
I learn something every day.
 
And since clicking and dragging is slow, I like Verilog.
 
I like the idea of a graphical thingy for editing logic circuits, but I recall having issues with how cumbersome it was to add a component, and how the connections between them didn't get cut up like I wanted them to
Or something, I don't remember the details
 
BTW, isn't this ironic? "Gentlemen, you can't fight in here! This is the War Room!" - President Merkin Muffley
 
6:54 PM
Since this would be a mental exercise with a budget of $0, what are my options?
I'm guessing not much?
 
Quartus has a free web edition - that is what I am using.
 
Well Logisim is free, but it might not be sophisticated enough
A friend of mine drew a toy CPU using it, though
 
The problem is the board cost over $100, but ModelSim is free.
 
(Logisim just does simulation though, so you can't actually... run it on hardware)
 
You need to write code for ModelSim, but it isn't that complex.
 
6:55 PM
I think Quartus is your best bet; it's free (with the intent that you buy Altera's FPGA)
You can (painstakingly) simulate a processor though, as a waveform
 
We were going to complete an ALU as part of our class, but the professor botched it and removed the assignment.
He had posted the completed solution instead of what we were supposed to base our work on.
 
It's easy to make an ALU by hand, though
Especially in Verilog
(by hand meaning "without pregiven design")
 
The problem is, he gave us the completed assignment, so we already knew what to do.
 
Well, what was the ALU supposed to do?
 
Not sure. We don't have a book.
He is writing his own book, so the class is a little broken.
I need to go walk my dog, see you later!
 
7:12 PM
I've created flowcharts in Microsoft Publisher before. They were pretty high-level (?) though.
 
I use draw.io, especially when drawing finite-state-machines
 
 
1 hour later…
8:19 PM
0
A: Sandbox for Proposed Challenges

PhiNotPiEating Candy in the Correct Order When it comes to eating candy, I hold myself to higher standards than the typical layperson. There is a delicate balance between "mixing it up" and "saving the best for last." In this challenge, you will be given a string of characters in which each character ...

 
8:57 PM
What do you do when you have the worst professor in the world?
This is not a riddle.
If we learn something in class, he will be sure not to cover it in the exam.
 
Start a riot.
 
He just said "read chapter 6 and this PDF.
Read chapter 6, PDF covered material in chapter 5, quiz covered chapter 10 and other things.
I think I will.
 
What class is this, exactly?
 
ITM 3110, Microcomputer Operating Systems.
My first 300 class.
I am a 4.0 student completed 11 classes, have a 4.0 in four of my current classes.
This is my first 300's class, as I said, and I am averaging 77%, have several D's, I don't know what to do!
 
I'm currently a high school student.
 
9:01 PM
I think I just failed the test, would have had to guess for everything if I hadn't quick read parts of chapter 10 in class.
I am an online student.
My adviser told me that the material is just going to be harder now that I am taking 300's classes.
I feel I could throw my computer through my closed window into the lake .5 mile away!
 
What sort of stuff are you covering?
 
We were supposed to be covering how different OSes cover deadlocks, and the Dining Philosophers, and general methods of handling deadlocks.
Instead, we covered scheduling algorithms and the like.
Round-robin, FIFO, shortest-job-first, first-come-first-serve...
It has been like this the whole semester. He has had to give some tests over because of it.
Whenever we complain, he says "don't give up just because it is hard."
We have wasted several weeks of class because of this.
 
So there's stuff on the tests that wasn't covered in class?
 
Yeah.
Over and over and over again.
Worst uni experience I've had in 2.5 (this being the .5) semesters.
In the beginning of the class before any quizzes, he asked us how well we thought we understood the material. We said we thought it was good level of complexity and we thought we understood it.
His response was that we would be getting 80's on the quiz.
I did, anyway. The class average was a low 50-somthing.
He eventually gave the quiz again - several weeks later, no warning.
That quiz covered material not in the book too, but I didn't complain - it was just a few questions.
I'd like to take the class again at no cost, and have this grade be dropped entirely. The material is really interesting, if the experience is horrible.
@PhiNotPi We are covering everything related to operating systems imaginable.
He is only teaching two classes this semester (at this U, anyway). He can't possibly be overwhelmed (even if this is the first time he taught this class - it wasn't supposed to be him originally, it was supposed to be a different professor).
I am sending my email to him to my adviser. Should I let him know, or not?
 
9:35 PM
I'm not in a position to provide any advice.
 
OK, I'm not either. My family is taking a census, and they think no/
I hope you are having a better semester than I am.
I don't know if I would wish this on my worst enemy.
My plan for that is burning oil on a frying pan and letting them spend 3-5 hours scrubbing it off.
This is worse.
I need a break now, sorry for the rant. Bye.
 

« first day (1372 days earlier)      last day (3477 days later) »