« first day (2106 days earlier)      last day (3032 days later) » 

18:00
@TimmyD ಠ_ಠ
What's that face for?
It's actually disapproval face but I use it like O_o
Ah - I thought you were somewhat irritated at me for sharing the link.
CMC: Write the saddest story you can, using only four words.
I joked about that word when I was little, and it got somebody killed. Woah.
@mınxomaτ any news about the podcast?
@TimmyD "Daddy killed mommy, lol"
18:05
"Loving couple. Empty crib."
If there are news the people involved will receive an email. I'll send one later today, but there are no public news atm.
Feb 25 at 22:56, by 9cHeruinr96a
@RikerW Killing people isn't nice
@Fatalize Jeez, that "lol" at the end really seals it. That's moved beyond sad into horrifying. But, reminds me of a bad joke --
Little kid: Mommy, why is daddy running back and forth?
Mother: Be quiet. And hand me another box of ammo.
Which is not as good as my all-time favorite joke
So these two muffins are sitting in an oven, baking. The first one looks at the second and says "Wow, it's getting hot in here." The second one turns back and goes "Holy S---! A talking muffin!"
Anonymous
@TimmyD Buying gf, 20 gold
Oh jeez.
Anonymous
@Fatalize The issue is, the stats are the only exciting part of the sport. The only reason the sport is played is to generate those stats :P You could probably replace the games with the output of an RNG and it'd have the same result.
18:18
finally a murican that agrees with me
@TimmyD Two monks are sitting in the monastery. The first one looks at the other and says "Wow, it sure is quiet in here." The second one turns back and goes "Holy S---! A talking monk!"
Anonymous
The only other part of the game that could be considered exciting is people in the crowd getting hit by pop flies and foul balls, but that's not guaranteed to happen
They can also get hit by flying bats, or pieces of bats.
And cute girls in the crowd. Do they show these in american sports?
@TimmyD “This is very sad”
Anonymous
18:21
I'm pretty sure the only reasons people go to baseball games anymore are 1) They want to catch a ball, 2) They're being pressured to go, 3) They have a stake in the outcome of the game (team owners and gamblers), or 4) They want to drink beer and get into fistfights.
@Mego Or the suspense, the athleticism, the camaraderie, the competitiveness, the atmosphere, the novelty, the history. There are plenty of good reasons why millions of people like baseball and other sports.
Anonymous
@HelkaHomba The athleticism in baseball is only slightly higher than in golf (mostly thanks to rampant steroid (ab)use)
Anonymous
The MLB's refusal to play hardball and crack down on steroid abuse killed the competitiveness long ago
The athleticism in golf comes from the discipline of repeatability, not because the competitors look like bodybuilders.
18:32
Yeah but in Baseball they are supposed to run and jump to get the ball yet it seems there are countless fat guys playing at the best level
@Mego Well, I'm pretty sure it's higher than the athleticism in programming.
That's not a sport, so...?
Yeah, we haven't renamed our site to Code Sport yet
@HelkaHomba You use a lot of brain muscles in code-golfing. I consider it like exercise.
Anonymous
@HelkaHomba Nice topic change. You should run for president.
18:35
Wait, isn't rampant steroid abuse an indicator that you do need some sort of athleticism (even if only brute strength) to play the game at the top levels?
0
A: Sandbox for Proposed Challenges

MegoBinary Convolution A binary convolution is described by a number M, and is applied to a number N. For each bit in the binary representation of M, if the bit is set (1), the corresponding bit in the output is given by XORing the two bits adjacent to the corresponding bit in N (wrapping around whe...

0
A: Sandbox for Proposed Challenges

carusocomputingK-Means Clustering (Wikipedia) The task here is rather simple, perform a single iteration of a k-means clustering algorithm on a binary matrix. This is essentially the setup task for the main k-means algorithm, I felt the setup might be easier and entice golfing languages to give it a shot as we...

Anonymous
@Geobits Sure. But the top level of athleticism in baseball is a whole lot lower than other sports.
Then why the steroids?
Too lazy to exercise
Pretty sure that's not how it works :P
18:37
@Mego I disagree. Can you throw an object at 95 mph?
Anonymous
Because every sport has players roiding up. The MLB is just especially bad because it doesn't have frequent enough tests or harsh enough penalties for roiding.
Anonymous
@DrMcMoylex Pitchers are the sole position where there is a significant amount of athleticism. That's 1/9 of the team.
1
Q: Draw some mountain peaks

TimmyDWrite a program or function that draws a mountain range, where each subsequent larger mountain peak is "behind" the ones in front, and alternates which side is visible. This is a mountain range of size 1 /\ This is a mountain range of size 2 /\ /\ \ This is a mountain range of size 3 /...

OK fine. Can you hit an object moving at 95 mph?
Anonymous
Sometimes
18:39
How big is the object? :P
Anonymous
Which is about all you can say about MLB hitters
Yeah, every level of sometimes is equivalent ;)
Sometimes I stub my toe. Sometimes stars explode.
Not saying that Baseball doesn't require athelticism, just that I don't understand why teams, fans and players are completely cool with players being way too fat when being more athletic would make them better runners/hitters
Well, but would it?
Are you arguing that being more athletic makes you run slower?
Anonymous
18:41
The best batting average from this past season was .367 - that's roughly one in three balls hits
@Fatalize If it would do that, I'm sure at least one team would try that and win every year, or until others caught on. You think nobody's thought of that?
@Mego I'm fairly sure my average against an MLB pitcher would be much closer to zero.
@Fatalize I'm just saying that until you can hit a home run or throw a 100mph pitch, you can't complain about lack of athleticism. I'm not even a baseball fan, I just don't get it when people try to make it sound like a thing enjoyed by millions of people around the works is not worthwhile.
@Mego No, that's roughly one in three times at bat the batter put the ball into play and made base safely.
@HelkaHomba So you can't complain about trump because you know less than him about politics and money by the same argument I guess?
@Fatalize No, I'm saying that "athletic" =/= "looking like a bodybuilder"
Anonymous
18:44
@TimmyD True. Unfortunately, pure hits isn't a tracked statistic by the MLB
@Mego AB - K - BB
@Dennis Could you please pull 05AB1E?
Anonymous
@Adnan Done.
Thanks :)
18:45
@Mego SO
(at bats) - (strikeouts) - (base on balls / walks)
That equals times that the batter has struck the ball and put it into play.
@Fatalize That'd be more like complaining about/insulting a team. Gripe at the system, but don't write it off completely.
Anonymous
@HelkaHomba So to better fit the analogy, we shouldn't gripe about the American political system and its many flaws (FPTP voting, indirect election of presidents, lack of term limits for Congress, corruption) unless we have degrees in political science?
Can anyone give a few examples when you would want to implement a sorting algo - or would make use of one?
Anonymous
@confusedandamused When you're doing homework? :P
18:56
I mean outside of that lol
Or interview question - like actually in a project
When you need to sort stuff?
Anonymous
That was heavily-loaded sarcasm to mean "we're not going to do your homework for you"
@confusedandamused Arranging data for human consumption. We humans like names in alphabetical order.
Oh it isn't homework I'm literally just asking - I'm not even in school (wow is that weird to say)
Anonymous
To give you a nudge in the right direction: there are many algorithms that perform better with (or even require) sorted input.
18:58
They require the input to be sorted in a specific way for example?
Bubble sort performs better with sorted input, for example.
5
Are most of the sorting algos used with integers as opposed to strings?
@confusedandamused The language you're using might not have the algorithm you need
Anonymous
Any sorting algorithm works with any sortable input
19:01
@feersum doesn't it always take the same amount of steps?
@Maltysen No.
@HelkaHomba Well in c# if you're sorting elements of an array you could use Array.sort() are some algos built under the hood into a language> '
?*
Anonymous
@Maltysen A smart bubble sort implementation will stop once it no longer modifies the list
Anonymous
Linear search performs better with sorted data because you can stop at a certain point and know for sure that you have either found what you're looking for, or it doesn't exist. With unsorted data, you have to search through the entire list. With binary search, the data is required to be sorted.
Anonymous
@confusedandamused Different languages use different algorithms. Lots use quicksort. Some use more modern sorting algorithms that work on heuristics and combine parts of multiple algorithms (like timsort, which is used in Python).
19:06
@Mego No relation.
Anonymous
@TimmyD :P What algo does PowerShell use?
@Mego Probably quicksort, since I think that's what .NET uses.
Anonymous
Partial credit
Anonymous
.NET uses insertion sort, heapsort, or quicksort, depending on the size of the data
Anonymous
19:11
Yep - introsort was the name I was trying to think of but failed to
That page claims quicksort is n log n in the worst case.
Is it ever necessary to implement these sortings algos yourself then?
Usually no.
@feersum That's not nearly the worst case.
Unless it's an interview question ;)
Anonymous
19:15
Usually no, but it's not a bad idea to learn them
@feersum Hah, that's funny.
@Mego that's my goal currently - that and compiler and CLR theory
or just basics to learn more
16
A: Are there any worse sorting algorithms than Bogosort (a.k.a Monkey Sort)?

Derrick TurkYou should do some research into the exciting field of Pessimal Algorithms and Simplexity Analysis. These authors work on the problem of developing a sort with a pessimal best-case (your bogosort's best case is Omega(n), while slowsort (see paper) has a non-polynomial best-case time complexity).

It's right above the section heading "Notes to callers".
Anonymous
@feersum Yeah, Microsoft is real bad at stuff like that
Anonymous
19:16
@MetaEd That's not relevant to that comment...
@TimmyD Implementation details: github.com/dotnet/coreclr/blob/…
Yeah. I don't go to Microsoft for non-technical data. They tell me what argument such-and-such to such-and-such command does? Perfect. They say why it does that? Usually at least somewhat wrong.
@Mego That depends. If you're looking for a worst case sort, it's relevant.
Anonymous
@MetaEd The comment was literally "MS says quicksort's worst case time complexity is n log n"
@MetaEd Err, no ... that comment specifically referenced quicksort, not sorting in general.
Anonymous
19:19
Tsk tsk, poor reading comprehension skills from an English.SE mod :P
Anonymous
We're going to need your diamond back
@Mego Probably because not enough coffee.
Anyone have recommendations on reading to learn about compilers?
@Mego The implementation switches between many different modified quick-sort implementations (see above link).
Anonymous
19:20
@MetaEd If you require coffee to function, you fit right in here :)
@Mego You're saying coffee is a required argument?
@confusedandamused Have you read anything by Donald Knuth?
@TimmyD I don't believe I have - but I think he is mentioned more than once in "Coders At Work"
Anonymous
@mınxomaτ Sure, but a bad choice of pivots each time will still get you n^2
@Mego I'm sure there's a Java pun in here somewhere but I'm too dense to find it.
Anonymous
19:22
@MetaEd Always
@confusedandamused Well, the standard book for compiler design and compiler toolchain frontends is the "dragon book". In-depth books about compiler backends, specifically optimization are Agner's manuals: agner.org/optimize
Anonymous
@confusedandamused That's a good starting point, but compiler theory has progressed a lot in the last 21 years. Aaaand I've been ninja'd to the dragon book recommendation.
@Mego Do you like the Dragon Book thus far? Most posts/books seem vastly out of date as you mentioned
Anonymous
I don't own a copy of the dragon book, and I haven't read through Crenshaw's tutorial fully
Anonymous
So I can't offer an opinion :P
Anonymous
19:24
However, I highly doubt either of them go into JIT compilation, which is a very neat new-ish technique that a lot of compilers are leveraging
Another way to learn is just to do it. I found that you don't have to know anything about compiler to make a decent one :D
Yeah in my time at school they didnt offer a compiler course which I would have taken
@mınxomaτ That's what Crenshaw said too :)
But it seems his is written/written for Turbo Pascal
@confusedandamused That course would have probably used the dragon book as it's basis. But as mentioned before, it doesn't really go in depth in terms of backend (LLVM (or IR in general), optimization) etc.
Anonymous
My uni offered a compiler theory class, taught by the software engineering professor. He usually taught it by making the first project (due about 1/3 of the way through the course) "make a compiler". The rest of the class went over various techniques and optimizations to be applied to those rudimentary compilers.
If you are brave, you can go through the source of my first compiler here: github.com/turbo/Perseus. It's a single-pass non-optimizing compiler with an integrated linker and assembler.
It's even neatly categorized: github.com/turbo/Perseus/tree/master/Source/src, which is very unusual for me.
19:33
Is it mostly written in vb?
It's entirely written in VB. You can compile it and decompile with ILSpy to get a C# version.
I'd like to think that VB is very easy to understand though. It also uses no .NET components.
I just just confused when viewing the languages in the repo it shows 36% C++ 21% SourcePawn and some other stuff
Yeah, the code lens on this repo is wrong.
It gets confused by all the example code.
:D
I'll start looking through this for fun then thanks for the link
SourcePawn uses .inc for header files I believe which is why it gets confused on that one
19:46
Well, Perseus is Cish like Pawn, too. So that adds to the confusion with C++.
Anonymous
Worst sorting algorithm I can come up with:
Anonymous
import random

def bogosort(data):
    while not sorted(data):
        chunk = random.shuffle(data)
    return data

def sort(data):
    for i in range(1, len(data)+1):
        data[:i] = bogosort(data[:i])
    return data
Anonymous
The algorithm is O(n^2 * n!)
Anonymous
That's the worst worst-case performance I can come up with that actually has a decent chance of terminating
I think 1! + 2! + 3! + ... + n! would be O(n!)
So the complexity is actually the same as bogosort.
O(n!) average
Anonymous
19:53
bogosort is O(n * n!) (since you have to check each iteration if the list is sorted, which is linear). You perform bogosort n times, giving n^2 * n!
Sorry, O(n * n!)
How do you figure?
it's only O(n!) because it's at most 2*n!
Do you think sum(i! for i in 1...n) is not O(n!) ?
Anonymous
Oh wait you're right
Anonymous
19:54
I was thinking sum(n! for i in 1...n)
Anonymous
So in the worst case it's no worse than normal bogosort, but for basically every other case it will take longer
Sep 12 at 14:12, by TimmyD
Bubblesort is best sort. Cuz it's got bubbles.
We should keep track of how many times we have shuffled, to ensure we don't try the same permutations again.
After 2^19937 - 1 failures, look for a new Mersenne prime and start over with a larger PRNG.
Anonymous
@feersum That seems like it would improve the running time.
@TimmyD Spaghetti-sort is better, because it's got spaghetti.
Anonymous
20:01
Spaghetti > bubbles
Anonymous
(comparing taste, of course)
Also comparing calories.
Anonymous
And number of religions
Anonymous
Now we just wait until people jokingly start "worshipping" the Purple Bubble Monster and declare "war" on Pastafarians
Anonymous
@feersum Bonus points if we don't keep track of which Mersenne primes have been tried, to allow for repeats :P
20:05
I have a bunch of checks to prevent the user from doing he shouldn't in my KoTH. I think I'm going to throw a StopCheatingException in those cases
We could flip a coin until we get heads. Then test 2^(number of times we got tails in a row) - 1 for primality using the regex engine.
@Mego Slowsort has best-case performance n^(log2(n)/(2+eps)) because it uses a multiply and surrender approach.
@Dennis Yeah. That's the one I linked to.
Oops, didn't scroll up that far.
@NathanMerrill try{cheat}catch(cheater){throw Exception.LanceArmstrong}
20:10
@Dennis I like that paradigm
However my personal favorite, though it isn't guaranteed to complete, was the miraclesort on the same page. Basically, repeat (null) until (list is sorted). Cosmic rays flipping bits on the list should eventually result in a sorted list and the test will succeed.
subtract and defeat
@MetaEd nah, statistically, what'll happen is the bit flip will occur on the boolean returned by the "list is sorted" function
so, you'd end up waiting for a miracle and still not get what you want
@NathanMerrill Kinda like Duke Nukem Forever.
@NathanMerrill How about keeping code and data separate and running the code on a CRC stick.
20:13
This appeared after closing Atom. I can't understand how you can create a program so damn resource-wasting and inefficient as Atom. And then GitHub calls this app "high-performance" with a straight face.
atom not responding was the reason I stopped using it
I've never had that problem with Notepad++
Yep, <3 NP++
Notepad++ is just SciTe made non-crossplatform and with added bloat.
depends on what you consider bloat. I actually like the features it provides
Like what? Compared to a pure SciTe I mean.
20:18
Oh, hey, here's your problem. You're not using vi.
Oh dear, here we go again
(Even though I agree)
yesterday, by Geobits
Watching people argue about text editors is kinda like watching people fight over whose poison ivy rash is better.
I'm sure I should be using something else, but I'm an old dog.
Jeez, I just might consider switching to emacs because some vi/vim users are so snobby.
emacs users are a lot snobbier actually
20:21
@mınxomaτ Do you use SciTE? It's the first time I heard of that editor (currently downloading=)
@mınxomaτ I like dialogs to set options, as well as several plugins I use
What NP++ provides via the GUI in terms of configuration is a proprietary abstraction (and thus subset) of what SciTe provides on it's own with the integrated Lua scripting. I don't claim that any editor is better here, but I strongly dislike what NP++ does to an editor that was meant to be lightweight, modular and cross-platform.
@El'endiaStarman use ms word if you want to get to all of them
@quartata There's a strange lack of them in this room though.
@El'endiaStarman I tried, really I tried. As an old TECO user I really, really tried.
@Geobits Muahahaha...
@flawr Use it for basically everything now. But again, use what's better for you.
Noice!
I downloaded TECO for lolz and made a couple answers here with it.
It actually was the shortest of all languages on one question.
@mınxomaτ That is why I'm gonna test it:)
20:24
@feersum Runtime or source code?
@flawr When you get vanilla SciTe, you have to configure it to your liking first. I'm using the AutoIt fork of SciTe, which doesn't add any major features, but comes pre-configured with settings I like.
The thing I downloaded had source also, but I just used the binary.
@feersum I mean, was your runtime short or your sourcecode short?
Source code of course.
Its runtime is quite slow... (in general)
@feersum Right, that's what I would expect.
Also, like APL it's write-only.
20:27
@flawr Important reading: scintilla.org/SciTEDoc.html
I see y'all do Euler Project here.
Anonymous
@El'endiaStarman We try to be reasonable about text editors in this room. Indentation, on the other hand...
@mınxomaτ Thank you for all the info. For what I'm using it, both npp and scite seem to do about the same.
Well, the editor text window inside NPP is just SciTe wrapped. You can actually detach the editor from NPP and get a standalone SciTe instance :D
20:35
how
@TuxCopter If you know how native windows in Windows work, you can just extract the child window, give it a dummy parent and delete the old NPP shell
Scintilla, the editor engine powering SciTe, NPP, Geany etc. is always just a child window. The API is basically just window messages sent either way.
@mınxomaτ Well I really just use it for the syntaxhighlighting, regex find&replace, and "rectangle selecting"
@flawr I love that feature of NPP
@TimmyD That's all provided by scintilla, not NPP
The entire editor field is a separate program.
rectangle selecting?
20:38
@feersum Alt-Select
This might make a good inspiration for a challenge:
@mınxomaτ Huh. TIL.
@flawr Also, Ctrl-Click to place multiple cursors in the code at once.
@TimmyD That's why NPP doesn't really add anything apart from the plugin-system (which is tied to Windows).
20:39
@mınxomaτ npp can't do that!
@mınxomaτ really neat feature!
@flawr Because it dumbs down the scintilla protocol
@flawr nah, it can. its just a setting
Oh, that's fine then
Sublime has multiple cursors too
@NathanMerrill where can you find that?
20:41
Preferences -> Editing
Oh great, thank you! <3
@mbomb007 I've seen this image posted in a ton of places, and I honestly don't see what's impressive about this projection compared to other projections.
@NathanMerrill I wonder why they do not activate that by default
@mınxomaτ Ah. I do use several plugins decently often (mainly PowerShell Lexer and HTMLTag).
And the hex editor.
20:50
@TimmyD What's the PowerShell Lexer?
@PhiNotPi It's a rectangular map where the areas are proportioned correctly.
@mınxomaτ Pretty much what it says. Syntax highlighting and whatnot for PowerShell.
@TimmyD BTW, as mentioned before, SciTe relies on LUA as an open-source extension API. There are many plugins/extensions for SciTe. An example for hex editing would be sl-hexedit.luaforge.net
I don't use it as much, now that the PowerShell ISE (Integrated Scripting Environment) has gotten better.
@TimmyD SciTe has full support for PowerShell, including folding. Also, it supports running PS with the integrated console
That shouldn't be something you need to add to NPP. Technically, it should be supported out of the box.
^ one of the coolest map projections
@feersum >:U
I prefer accurate directions over accurate areas for most purposes
@feersum but, what is the sequence
@TimmyD This leaves HTMLTag. As far as I can tell from their SF page, SciTe supports all these features without extensions.
20:55
Oh right, I should wirte the sequence...
it's primes.
@mınxomaτ Neat. I'll take a look at SciTe.
Read the docs first to get a better idea about what might be missing for you: scintilla.org/SciTEDoc.html scintilla.org/SciTEFAQ.html
we don't even know if the generated befunge program is longer or shorter
Shorter
20:58
Yay Vim turned 25 today
@Geobits -_- how do you know
Oh
I was referring to the one generated by the shorter code
@DestructibleWatermelon Who says I do? I haven't even looked at what you're talking about :P
@betseg vi itself is 40 years old, right?
20:59
Uh, I had an idea for a koth

« first day (2106 days earlier)      last day (3032 days later) »