« first day (2132 days earlier)      last day (3009 days later) » 

19:00
oh well that's a shame
Brb gonna flash new cm nightly
My bus didn't turn up twice in a row :( I spent 1.5 hours waiting before deciding on the parent taxi
0
A: Sandbox for Proposed Challenges

wubsAlphabetize Integers code-golf sorting For a given set of numbers, put them in alphabetical order when they are spelled out. For example, 1, 2, 3, 4, 5 would output to 5, 4, 1, 3, 2 (five, four, one, three, two). Your code should accept any number of integers of maximum length six. It should al...

Back
19:19
@Angs very interesting!
why do you call them bytes changes instead of bit changes?
> You'll need to learn a little Lua to design your own puzzles, but fortunately you're all experts at deciphering esoteric programming languages!
from yesterday's Shenzhen I/O update
@Lembik typo
ah ok
And I think I got an off-by one error, the number of 2`s the binomial coefficient of (n-1) and k
interesting
19:22
except for k=0, because the list is empty
what's the policy on using external packages that you have to install?
@GabrielBenamy I think you're allowed to do that, I did that for Numpy.
@GabrielBenamy you mention them with the name of the language, e.g. "python + numpy"
I hate it when I ask a question on SO/SE and the first thing that happens is a downvote.
no comment. no chance for an answer. just relegated to oblivion, immediately.
@MartinEnder I've been enjoying Shenzhen I/O but I'm somewhat annoyed that the high score tables don't reflect whether or not you've come back to the puzzle after getting access to new components.
I spent a few hours trying to reach a particular high score before giving up, then later discovered that I needed to advance a few levels, unlock a new component, then come back to it.
If I didn't specify how ties would be broken in a challenge, and a tie occurs, is the normal consensus to select the person who posted first, or who reached the lowest byte-count first (the person who posted first was behind until recently, and I had already given the accepted answer to the other, more recent post for having the smallest byte count first).
19:28
@Sparr the components aren't hard-locked any more, but yes if you're not aware of that initially it can be a bit annoying
Is Shenzhen I/O worth buying?
It was the same in Infinifactory though
I just do one unoptimised playthrough and will then revisit everything at the end.
@betseg did you like TIS100?
@Sparr what is it ;_;
@betseg Yes yes yes yes yes
19:29
@MartinEnder learning about the undocumented instructions was similarly annoying
@betseg another similar game. I recommend both if you like small programming puzzles with a heavy amount of optimization challenge
Haha undocumented instructions? :D
I'm not that far into the game yet
@MartinEnder yeah. around the fifth level you find out about the one to do on-sleep-off-sleep as a single instruction
Undocumented instructions are unlocked not so far IIRC
@Sparr hm not in the current state of the game
I've played maybe 10 levels or so
@betseg shenzhen and TIS-100 are both games about writing very short assembly-like programs that interact with each other through narrow data channels. in TIS-100, there's a static arrangement of microcontrollers and channels, but some of them get disabled and you have to work around the limits on the shape of the network. in shenzhen you get to build the network however you want, with more choice of components.
19:32
Thx
@TuxCopter you play TIS-100?
@MartinEnder it's around the 20th "email", so maybe after the 15th level (some emails don't have a challenge), you learn about the "gen" instruction
Ah okay
Spoilers :P
19:35
which, totally realistically and ridiculously, is in the chinese docs but not the english docs
sorry
Tried adding TIS-100 to my wishlist, it said oops sorry wtf
Click harder
anyway, I very rarely do this, but getting that initial downvote into oblivion means I won't get any answers otherwise... I'd appreciate an upvote or two here: stackoverflow.com/questions/40882704/…
Halp I don't know what to buy between Spacechem, Infinityfactory and TIS-100
I hate dealing with the 3d interface in infinifactory
the puzzles are fun. even in 3d. I just think the first person controls are terrible.
19:38
@TuxCopter TIS is the shortest playtime, the least accessible, but the only one of them I've completed
I enjoyed spacechem a lot more than TIS-100. Probably because "small assembly language puzzle" is something I've already got plenty of, but the puzzles in space chem are unique, and the story aspects in space chem with unusual levels also add something.
I would recommend shenzhen over tis100
In terms of story I really love how much immersion they are creating with their minimalist approach to storytelling
I ended up getting stuck without finishing TIS :(
I'll revisit it eventually
TIS-100 don't seem too different to SHENZHEN I/O
(Except for the component part)
the assembly language is also slightly more "traditional"
19:40
For example?
well, no decimal digit extraction, no +- labels but standard "jump if zero" instructions, a swap instruction to work with another register
and (from what I've seen so far in shenzhen) the problems are a bit more "basic standard programming puzzles" whereas the shenzhen puzzles so far seem a bit arbitrary most of the time
This +- label thingy is very annoying when working with nested loops >_>
@TuxCopter the key difference in my mind is that in TIS-100, a puzzle includes being forced to have the nodes connected in a certain configuration, with chains of nodes of a certain length, and specific numbers of connections. but in shenzhen, choosing and laying out the components is up to you.
19:42
I find the +- part very refreshing to work with. forces you to think differently, which is what I love about esolangs :)
the +- thing is close to how conditional orders worked in a strategy game I played many years ago. My favorite game ever, actually, and I'm sad it died.
What game?
@TuxCopter have you played Human Resource Machine?
I can really recommend that as well
19:44
Overlord PBEM, based on Lorenai, based on Atlantis. long term slow-motion open world many-players turn based strategy games with textual play-by-email interfaces.
not Zachtronics though
HRM seems cool
So now I need to chose between 4 games
I forgot about HRM. I haven't played it. Someone recommended it, and I skipped it for some reason, then never came back to it.
@TuxCopter spacechem
wait
play that
if you like it, buy space chem
if not, buy one of the others on your list
19:49
I already played it
Oh SpaceChem has a demo
@Sparr the continuousness of SpaceChem (and Codex) freaks me out for some reason. It's definitely an interesting twist on the usual kind of discrete programming problems, but it somehow annoys me that it gets in the way of reasoning about the program behaviour before actually trying out what fits and what doesn't.
That is distinct from dealing with "traditional" 2d programming languages, in that spacechem has you dragging around things that are more than one tile large?
0
Q: Who is the tallest?

orionN children, with no two sharing their exact size, are lined up in some order. Each can only compare heights with their immediate neighbours. When the teacher shouts "raise hands if you are the tallest", they do so if they are taller than both their neighbours, and they do so simultaneously. If on...

not necessarily that. the problem is the continuous movement of rotation of the things that are more than one tile large. in traditional 2D languages, everything moves one cell (or several cells) per tick. there is no continuous collision detection.
a "traditional" 2d language with "things that more than one tile large" sounds like a fun idea though :)
Does shortest code to produce non-deterministic output sound like a good challenge?
19:54
@mbomb007 define non-deterministic.
Haven't we already defined that on the meta?
(but in general, yes that sounds like an interesting idea)
@MartinEnder so, in essence, the fact that "rotate" can collide with something in the middle of its path?
@mbomb007 well I assume you're thinking of randomness. what about time dependence? what about process ID dependence?
@mbomb007 that's literally going to be a single function call in most languages, isn't it?
19:56
@NathanMerrill yes, mostly that. I don't remember whether simple translation had the same problems, but definitely rotation.
@Lembik gray code with the mentioned skips follows the pattern gs n k = gs (n-1) k ++ map (+2^(k-1)) (reverse $ gs (n-1) (k-1)). The first part has the base case gs n n which of course has only 1-bit changes. The second part has a base case of gs m 0, which doesn't have any elements in it. The items in the middle of the lists have both at most 1 bit, so to change between them takes at most 2 bits.
@MartinEnder 'a "traditional" 2d language with "things that more than one tile large" sounds like a fun idea though'... marbelous with tetris pieces instead of marbles :)
@MartinEnder its a lot harder to make it break on translation. its definitely possible, though
@Angs it's very nice
19:58
@Sparr Not so unlike the "print infinite output" challenge or the add two numbers challenge.
but yeah, so far I've started SpaceChem twice and never got beyond the first two or three level sets. I really like the game, but somehow I find it a lot harder to motivate myself to pull through than for other programming games.
@Lembik Let me correct that, gs m 0 is of course [0], not empty. Nothing to change, though.
Erm... can I be a help vampire again? My google-fu skills are playing up.
@MartinEnder are you aiming for optimal solutions or any solution?
@MartinEnder I get stuck on the "optimizing phase"
20:00
it's been ages since the last time I tried SpaceChem, but I think I did try some optimisation as I went along
I really like recent integration allowing high score tables to only compare with your Steam friends.
especially on later levels, I always go for as few reactors as possible
I'll never be able to compete with the Dennis and Martin's of the world. But I can compete with my collegauges!
yeah that's true. I really liked competing with Sp3000 on TIS and HRM. That was a lot more fun than the global scores on SpaceChem back when I played it.
hmm...I had a particular solution I was quite proud of
20:02
I wish I had some collegauges. How else can I measure my colles?
also I kinda should finish Infinifactory at some point. I am in what I think is the last level set, but the tediousness curve of that just skyrocketed compared to previous levels.
@mbomb007 I hate you. ;p
Adam Savage and Michael Stevens show thing
VSAUCE!!!
@KritixiLithos michael here.
20:08
@Yodle Have you ever wondered what would happen if we all jumped at once?
Does anyone know how to read a file into a buffer using fopen (file is in byte mode) so that the EOF is translated to a '\0' byte?
@KritixiLithos Mr. Munroe has already done it!
@KritixiLithos queue musical theme
whois good at c
I think I am but could be Dunning-Kruger effect
@betseg I just need somebody who knows how to use the file API.
This is my current code:
fread(databuffer, 1, DATALEN, datafile);
databuffer[endoffiel] = 0;
20:19
@wizzwizz4 This seems like an awful hack, what are you trying to do?
@mınxomaτ Interpret a file as a raw string.
What do you mean?
1. Read file 2. Write '\0'
Is that so hard?
Just read a file in as a string?
@feersum Yes, because I don't know where the EOF is.
20:20
You should, unless you're doing something horribly wrong.
wat
wat
Hey guys
@feersum I probably am.
0
A: Sandbox for Proposed Challenges

PavelA Numpad's Knight Numbers Extended Edition This challenge is an extension of the one linked above by Calvin, and inspired by a comment by Darrel Hoffman. My computer has a numpad which is significantly more expansive than Calvin's. For reference, it looks like this: 🔒/ * - 7 8 9 + 4 5 6 + 1 2...

After I've read the file, is there a constant I can just read off that says how much has been read?
20:22
fread returns how much it reads
wat
wat
@betseg D:
@wizzwizz4 len = fread();
@quartata fread does not zero-terminate.
... @feersum was right. I was being stupid.
@mınxomaτ I'm not sure what that has to do with what he was asking
20:23
15 mins ago, by wizzwizz4
Does anyone know how to read a file into a buffer using fopen (file is in byte mode) so that the EOF is translated to a '\0' byte?
@mınxomaτ This code should put the 0 in there: databuffer[fread(databuffer, 1, DATALEN, datafile)] = 0;
@wat i actually thought that it might be a rickroll
@mınxomaτ That was specifically in response to this:
2 mins ago, by wizzwizz4
After I've read the file, is there a constant I can just read off that says how much has been read?
Thanks.
wat
wat
In other news, I now have a custom uRL shortener and a ShareX config.
20:25
@quartata I know. But if you do buffered fread, the size will be the size of the buffer. Otherwise you need to know the length of the file.
@mınxomaτ The buffer will be bigger than the file.
If the buffer is smaller, I have bigger problems than a segfault caused by expected input not being there.
G'night gents
Good night.
Wait... Don't assume somebody's gender. We might not all be gents.
Night! o/
You don't need to set the buffer at all. It should be a buffered call to fread, mallocing along the way. If the buffer is still false after the read loop, it serves as a nice error check, too.
20:27
@wizzwizz4 Maybe betseg what only saying that to the gents
@wizzwizz4 Using the male gender for groups of people is acceptable. Just like ellos in Spanish.
@mınxomaτ It should. But I'm writing a quick and dirty hack that includes multiple programs, a plugin, and several months of effort.
@mbomb007 Oh, ok. Dialect barrier, sorry!
@mbomb007 Be careful you don't upset the SJW's
Then I think you can afford to write a few more LOCs.
If it's just unix, memory map the file.
I've used guys or men as gender-neutral before, but I don't think I've ever used gents that way.
20:29
2
Q: The eruption of Eyjafjallajökull?

zeppelinYear of 2010, an Icelandic Vulcano, concisely named Eyjafjallajökull erupted, resulting in my long-planned flight being canceled. In case this ever happens again, I would really like to know in advance, so please help me build a simple visual alert system ! Input Take the Icelandic Meteorolog...

2
Q: Shortest code to produce non-deterministic output

mbomb007You need to produce output that is non-deterministic. In this case, this will be defined to mean that the output cannot be known to be a specific result. Rules: A pseudo-random number generator that always has the same seed does not count. You can rely on the program being run at a different ...

That's not to say it's wrong, just that it sounds weird to me.
@mınxomaτ Unfortunately Windows isn't POSIX compliant. :-(
@NewMainPosts Stop interrupting me with nonsense :P
size_t hfile = open("foo.bar", O_RDONLY);
size_t length = lseek(hfile, 0, SEEK_END);
void *ptrtodata = mmap(0, length, PROT_READ, MAP_PRIVATE, hfile, 0);
unix. Probably supported by cyg's POSIX layer.
It works in my cygwin setup (no WSL on 32bit ._.).
20:32
@mınxomaτ That will slow it down even more, and I've already written the code and hacked it so that it'll work with my compiler.
There's hardly any speed impact with cyg, since it uses the Windows API for syscalls and doesn't translate them.
I feel really bad about it, but I have to write bad code.
@mınxomaτ There'll be dev overhead. I've already written the code now.
Zim and Zer is gender neutral
(for some reason)
I made my last project unix-centric and deleted all the MinGW stuff, as the latter uses the ancient, slow and buggy MSVCRT libc implementation. Building the same project with clang in cygwin (statically linked, so the only dependency is a singular cygwin DLL file!) results in a much faster binary.
@betseg aha, you missed the simplest way to find PIDs: ps
20:36
@Yodle I thought we had already decided on shklee
@Yodle Why not Zey?
Pretty sure it's dhje
@EᴀsᴛᴇʀʟʏIʀᴋ heh totally forgot that
Look at the edit too btw
i saw both versions
the long and short :p
nice answers btw, I did upboat you
You saw Zsh one?
Woo, PowerShell has joined an elite club. The "Crossed out 4 still looks like 4" club.
4
Works here too
Btw, @EᴀsᴛᴇʀʟʏIʀᴋ, ps is a command from procps-ng, I think you should mention that
TIL, thanks
@betseg curious tho: your opinion on ps being a language?
another answer that predates mine by 1 minute has it for 0 bytes
your answer inspired mine, so just wondeirng your opinion
I don't think ps (or programs like that) is a language
ok, just wondering (I agree)
TIL procps-ng is on GitLab
@Dennis I could have sworn TIO had Half-Broken Car in Heavy Traffic. was there some problem with the interpreter or did I actually never request that to be added?
20:52
Someone tell this guy that his answer does not "converge" to Sierpinsky's Triangle. codegolf.stackexchange.com/a/100758/34718
Are you allow to post an answer that's the same code as an existing one, but in a different language?
Boo, a downvote. :-/
:/
probably because of that dupe part
my bash answer is the same code
@EᴀsᴛᴇʀʟʏIʀᴋ you say you're 13 in some SE sites and 14 in others, how old r u
14 in like 2 weeks
that's why
20:55
@EᴀsᴛᴇʀʟʏIʀᴋ Even though PowerShell's ps is very different from Bash's ps
@EᴀsᴛᴇʀʟʏIʀᴋ You had different code first, then golfed it. I think it's fine.
so do I
just wondering, because the downvote
yeah, I saw it.
this question (that's been recently discussed here) needs some intervention/rules-establishment, I think
20:59
Not really, it's pretty much clear.
especially wrt 0-byte solutions
@ais523 I do too
you need intervention? :p
downvotes can be used even when an answer is valid. I haven't seen your answers
> I think
I think too :p

« first day (2132 days earlier)      last day (3009 days later) »