« first day (2564 days earlier)      last day (2273 days later) » 

12:13 AM
@totallyhuman Uhh, what's that pattern there? I don't see it.
 
r_1 = a; r_2 = b; r_n = b * (b / a) ^ (n - 2); r_last = c
 
@totallyhuman Wait, so is c guaranteed to be b * (b/a)^x for some x?
 
oh right no
r_last is the greatest number less than c that can be represented like that
 
Ok, got it.
@totallyhuman Oh, right, integer or float division? I assumed integer.
 
12:30 AM
integer
 
1:23 AM
 
@totallyhuman What's that
 
preview of challenge
 
@totallyhuman Right, but what formatting is that?
 
markdown
using stackedit
well, to be fair, a lot of it is just html
alright, written up, will post tomorrow; don't answer the cmc pls :P
 
 
3 hours later…
4:39 AM
@totallyhuman thats a stupid way to ask for printing a GP series.
 
4:57 AM
Has anyone seen LegionMammal978 recently?
 
nope
 
5:14 AM
Does it have to be using this particular arrangement of books, which IIRC is not optimal? — immibis 1 hour ago
CMC: is it optimal
I think it is
 
@Pavel pretty sure he went inactive
...along with a ton of PPCG
 
5:38 AM
Maybe they'll come back... *riiiiiight?*
I mean, I did.
How does markdown even work in this.
 
Doesn't in multiline messages
 
3
Q: Are objects in Haskell valid if there is no input?

Heeby Jeeby ManWe allow both programs and functions. Some challenges, mostly kolmogorov-complexity challenges, do not require input. This means that for some challenges you can write a function that takes no input. In many languages this is rather straight forward. For example if a challenge asked you to out...

 
6:14 AM
7 hours ago, by Laikoni
@Pavel Relevant meta. Tl;dr: On PPCG Haskell objects count as functions without arguments because of laziness.
Ninja'd
 
7:05 AM
I believe that a few more bytes can be reduced somehow? codegolf.stackexchange.com/questions/154844/alices-tea-party/…
 
7:33 AM
@HyperNeutrino I don’t know, but that’s what the challenge states. That’s not up to me :-)
 
7:53 AM
0
A: Sandbox for Proposed Challenges

Manish Kundu Challenge The challenge is to encrypt a given string, using the rules as specified below. The string will only contain lowercase alphabets, digits, and/or blank spaces. Equivalent Of A Character Now, firstly you would need to know how to find the "equivalent" of each character. If the chara...

 
8:47 AM
wonders why codegolf.stackexchange.com/a/154666 got downvoted
 
^ Looks like someone downvoted everything
 
9:09 AM
@LuisMendo yeah why not:)
 
@totallyhuman I suggest taking inputs a,b,c and printing the series a, ab, ab^2, ab^3,...c, i.e, b can be the common ratio instead of the second term
 
9:33 AM
@LuisMendo would you generalize it somehow or would ask this exact question?
 
9:44 AM
@flawr I would keep different A and D, otherwise it would perhaps be too easy. As for changing A in the vertical strip to a different B, that probably doesn't add much to the challenge
So yes, as it is
I have recently done quite a few challenges based on SO. So if you want to do it go ahead
 
@LuisMendo well I should be working on something :/
 
10:06 AM
@Fatalize oh nice spotting thanks
 
10:26 AM
@NewSandboxedPosts +2 already? That was fast.
 
10:38 AM
@ManishKundu that's the point of the challenge though
 
No text as image please. (... this is not Stack Overflow, and this is not code...)
 
hmm?
 
0
Q: Geometric sequence generation

totallyhumanHaskell has this neat(-looking) feature where you can give it three numbers and it can infer an arithmetic sequence from them. For example, [1, 3..27] is equivalent to [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27]. That's cool and all but arithmetic sequences are fairly limiting. Addition,...

 
that was fast
o0
 
10:54 AM
@flawr Haha no hurries
 
oh well
 
11:23 AM
Am I allowed to take the input like a,b,c,0,[] ?
 
somebody serially downvoted all the answers here?
votes for the challenge itself belong to the challenge itself, not the answers
 
8 downvotes :O
 
@EriktheOutgolfer Sure looks like it.
Why may I only fetch vote counts once/sec? ⍨
 
@Adám because you shouldn't be able to DDoS SE :P
oh, looks like people discovered before me lol
 
 
1 hour later…
12:32 PM
2 messages moved to Trash
 
12:57 PM
Does anyone here use IronPython?
 
1:33 PM
I hate Microsoft so badly... They made API for WPF for IronPython and gave no documentation. It's almost impossible to find anything about it.
 
1:59 PM
1
Q: The Keyboard Shift Cipher

Magic Octopus UrnGiven the following input: An integer n where n > 0. A string s where s is not empty and s~=[0-9A-Z]+ (alpha-numeric capitals only). Using a standard, simplified QWERTY keyboard (as shown below): 1234567890 QWERTYUIOP ASDFGHJKL ZXCVBNM Perform the following operation: Find the original r...

 
2:25 PM
@labela--gotoa sounds about right for Microsoft
 
And PyDoc say nothing about functions and classes in the api...
But, from a long time I'm planning developing CodeNote programming language and I don't know what language to write it's interpreter in. Would prefer Python, but for some reason I need to avoid it. Issue #2. Can anyone help? :-/
 
Practical or esoteric?
 
2:41 PM
Practical
 
@labela--gotoa do it in CodeNote
 
@labela--gotoa Well your problem is you're using IronPython.
 
2:57 PM
*you're using microsoft products
 
3:10 PM
Keyboard cipher is a good challenge
Seems hard to do in a few bytes
 
Not surprisingly, Jelly has keyboard layout builtin.
 
Anyone have a "calculator" for codegolf.stackexchange.com/questions/154741/…? I need to calculate my score. (I have an answer ready)
 
@moonheart08 The first answer posted links this
 
school pls. (I'm doing this in my freetime). tio.run is blocked apparently.
 
... tio.run is blocked? :(
 
3:20 PM
yea. ):
 
Try some proxy sites, as usual.
 
I'll PM the network admin. (I know the IT team as friends)
It's a whitelist blocker, so tio.run will likely be unblocked
 
It's in Ruby, q=$<.read.chars;p q.count("█") / q.size.to_f
If you preferred Python, one could do lambda x:x.count("█")/len(x)
tbh, I'm surprised you didn't code it yourself
 
Thanks. I'm lazy :p
Besides, my own code caused my brain to melt a few times for the puzzle lol
 
@NieDzejkob CMC : that
 
3:28 PM
Annnd answer posted.
 
@Pavel? No? I use different language, I don't use IronPy normally
 
It's fairly simple, and probably wont win, but eh. It was fun to write \o/
 
@labela--gotoa Well if you're not using IPy, why would you be complaining about lack of docs for it?
 
3:50 PM
@Pavel I don't use it normally; I wanted to try it out for writing application for Windows.
If I use a language for a single time doesn't mean I don't use any other language, right?
 
@labela--gotoa Well even if you're only trying it once, you're still using it, and you said you aren't.
 
@Pavel I said I'm not using it normally
@Pavel And what it has to do with CodeNote?
 
Anyway, I reccommend not using IPy because it never got updated to Py3, but generally if you need docs for IPy, look up C# docs for the same thing, and they'll probably still apply.
 
@Pavel Some of C# API's are similar, but some are not.
IPy doesn't even have App.xaml...
 
Any bash wizards around? How can I do a command expansion $(cat) so that the result is passed as one argument to a program rather than being split on whitespace?
 
3:55 PM
Use quotes.
"$(cat)"
 
You have to quote $foo as well.
 
Ah
 
Variable assigments are special btw, so foo=$(cat) works as well.
 
not a bash expert, but why $(cat), not cat?
 
3:57 PM
hullo guys
 
whats the difference?
hi
 
@labela--gotoa Because cat would pass in the literal string "cat"
$(cat) replaces itself with the entire input.
 
ahhh, right
 
@AlexKChen Hello
 
Is there any person in this room who are involved in competitive programming (like IOI/AMCP/ I don't know any other names)
 
4:01 PM
@AlexKChen Sounds fun, but unfortunately not googlable (The Academy of Managed Care Pharmacy (AMCP) is a professional organization representing the interests of pharmacists who practice in managed care settings.). Can you tell us more?
 
Oh lol I mean ACM PC
 
Yes.
 
ACM Programming contest
 
IOI seems... too high. Not yet for me.
 
Isn't the whole site for competitive programming? :p
 
4:02 PM
The site is for competitive antiprogramming.
2
 
No I mean I wan't to prepare for it (IOI, I'm still in high school)
 
@user202729 Thanks for pointing that out. Probably should've added another check to make sure you're locked into using t
 
I know basic combinatorics (elementary graph thoery), have good grasp of elementary number theory. Now where should I start ? (I only know basic coding but I have zero competitive programming knowledge)
 
@user202729 Antiprogramming?
 
... if you're not in high school, why cares about IOI? What's the expected ages of IOI participants?
 
4:04 PM
@user202729 I am in high school.
 
@AlexKChen You could start on ppcg (that is, there), but there are a lot of people golfing in super-short languages.
 
@labela--gotoa Please stop posting joke replies.
 
No no, real life competitive programming is not about golfing.
 
@AlexKChen ??
 
Yeah, that's what I'm asking. @user202729 Can you tell somthing ? (which books to read etc)
 
4:05 PM
@labela--gotoa The point of PPCG is to produce code that is as unfeasible in a production environment as possible.
 
@user202729 This site is not about golfing at all. There are other challenges, like king of the hill too, right?
 
Mostly. But definitely not too related to competitive programming.
 
And fastest code, which can actually produce something useful.
 
There are some barely-related stuff (remember Dennis' prime counting function implementation?)
 
@Dennis But such challenges are often failing with questions "how do you measure that?"
 
4:07 PM
Yeah so @user202729 where to start to learn comp programming ?
 
Often "on your machine".
 
@labela--gotoa They're a bit harder to make, yes. That's probably why we have so few of them.
 
@user202729 Which iirc was faster than Mathematica's built-in, but the only one faster than Mathematica's built-in.
 
I'm not very good when it comes to teaching people stuff.
 
I am just asking for book recommendations etc
 
4:11 PM
@AlexKChen This isn't related to competitive programming, but still a book recommendation: learnyouahaskell.com
 
... I also read that, but I'm afraid that IOI doesn't allow Haskell to compete.
 
I know syntax of C and python. (very elementary knowledge though)
 
Try doing exercises on some online judges you can find.
 
But where should I learn the theory from ?
 
... good question.
 
4:13 PM
@AlexKChen I'd learn more about Python before C. If you look at all programming languages used in production in the modern day, Python is the very easiest and C is the very hardest.
 
But Python is slower. (competitive)
About algorithms, once you know what to look for, just search its name on Google/Wikipedia.
 
Python is super easy, but a lot of stuff really varies in it from other languages. Ex. raise instead of throw and it's quite annoying sometimes...
When I found that trim is strip I lost my head xD
 
I use C++. Not too hard to write (easier than C) while still being reasonably fast (than Python) and not too verbose (Java).
 
@labela--gotoa Ruby and Python are both raise, which is taken from C's raise for sending signals.
 
Yeah, everyone is recommendating learning it.
 
4:16 PM
rly?
 
Our country's national computing olympiad recommeds it to code.
 
> not too hard to write
I strongly disagree
 
Same here
 
@user202729 Otherwise, fortunately most problems have solutions that can be looked online. But remember to think before looking up solutions.
 
Learning C/++ makes you a better programmer, undoubtedly, but manually managing your own memory is still a pain.
 
4:16 PM
@DJMcMayhem ... you have to.
 
Well raise is not very weird, but it's still a bit weird
 
Yep. And the errors are so vague, especially when you're using templates
 
I hardly manage my own memory. I just use std::vector.
 
You have to learn to read it.
 
4:17 PM
Is there a shorter way to say if(!(n%d)) in C?
 
@user202729 OK.So which book/source is good to learn C++ (also explains how the code works (like some vague ideas abotu what happens inside computer memory (idk what it means) when you run the code)
 
Apparently if(0==n%d) is not longer...
 
@user202729 You still have to delete things.
 
@Pavel If I don't new, I don't delete.
 
Object lifetimes are a problem in C++ and only C++.
 
4:18 PM
@Pavel Not if you don't use new
 
C++ is weird/hard, but still nothing comparing to JS XD
I mean, hard
weird
 
@NieDzejkob if(n%d<1) if you know n and d are positive.
@user202729 How do you create object references then
 
With &? How do you write C++? o_O
 
Why do I need to then?
I hardly need to deal with raw pointers in C++.
As I said, I don't really have any useful books to recommend. I mostly self-learning. Sorry for not being useful.
 
@Pavel Could you give an example? I'm not sure how you expect it to work
 
4:23 PM
I prefer self-learning too. Programming is the sort of thing that's easier to understand alone, than by reading somebody's else description
 
@DJMcMayhem If you use & the object dies after it goes out of scope, so you can't return it, right?
Unless you do malloc, then copy the object into the malloc'd space, which sounds really annoying and not an actual solution the memory management problem.
 
malloc is not for C++.
 
Exactly
 
Again, I don't need to manage memory myself.
 
@Pavel Either you can copy the object you're returning, or pass in a pointer to it, and construct it off the pointer
But there aren't a lot of cases where you'd want a reference to an object that a function returns
 
4:26 PM
I shouldn't say anything, really. I have really un-idiomatic C++ stemming from an innate fear of std::anything, which I'm pretty sure I inherited from my dad.
 
You should fix that :P
 
To quote my dad: "If you use smart pointers, std::vectors, and std::strings, you might as well be using C# for ease of use and pretty much the same performance overhead."
IDK if that's true or not
 
i made this program for this picture, how's it
 
@Pavel Yeah, it's not. That's what my CS teacher taught too. But if that's really the case, you should just use C instead
Especially since the ease of use is not even close lol
 
4:40 PM
@DJMcMayhem there are a lot of things my dad doesn't use from C++. No throwing exceptions, minimizing the use of virtual calls. It's basically C with classes.
 
@whoever is spamming stars: Realize that the only thing you're doing is using up your stars for the day. I'll just clear them and we'll move on
 
4:52 PM
Reinstalling my Win10, pretty what's gotta happen...
 
Hullo @EriktheOutgolfer ! Remember when I, you and SBA were toddlers we used to play games like STTT
 
Last time I had to try like 10 discs and it didn't want to work xD
It works so bad rn, even shutdown doesn't work and I have to use a .bat file to close the system .-.
 
@labela--gotoa Sounds like an easy fix: getfedora.org
 
uh, how old is your computer
 
4:55 PM
@Pavel ಠ_ಠ Stop pimping Fedora
 
@cairdcoinheringaahing I have to pick a distro when I do that, and I just happen to use Fedora.
 
@Pavel haha, I've got ElementaryOS installed on the side, used to be the main system; I think we discussed already why not Linux, right?
 
Maybe? It's a very common topic of TNB discussion.
 
0
A: Sandbox for Proposed Challenges

DonQuiKongTags: Codegolf Title: Palindrome detection with palindrome code When given any (you may choose the format and you should assume integer input) input, the output should be true if the input is a palindrome and false if not (or 1/0 or any equivalent). To make it (a lot) harder, your code must wo...

 
@EriktheOutgolfer That's not cause of age, I keep buying new parts.
 
4:57 PM
@NewSandboxedPosts VTC As dupe :/
 
@labela--gotoa uh, maybe your motherboard doesn't support a few parts anymore :P
or you bought a new motherboard too?
 
@Pavel eww fedora
use Debian or something. Manjora maybe
 
manjaro?
 
@moonheart08 +1 for Debian
 
@EriktheOutgolfer yea Manjaro
 
5:02 PM
@moonheart08 do you not like up-to-date software or something
Hi
 
@Pavel of course i do. btw i use arch
 
@EriktheOutgolfer Everything worked alright for long time. The shutdown isn't a problem, I'm using this broken system since month. The case is rather that I want to clean up the disc. And Win Update doesn't work
 
@moonheart08 then why would you suggest Debian
 
Debian was the first system i started with. It's good for beginners.
 
And I can't install apps from the store, because of the problem
 
5:04 PM
debian good for beginners...?
 
It is in my opinion
for those who want to dive in
 
Linux good for beginners? Hmm
 
Webkit takes forever to compile. I wish javascriptcore could be compiled standalone >_<
 
I wish html used other programming language
xD
 
It does. It's called anything you can compile to WASM
That includes C, C++, Javascript, Rust, and a few others
 
5:07 PM
I heard about wasm, but I'm not really enjoying the idea at all
Idk, maybe later
 
5:31 PM
@moonheart08 Also, just plain WASM-less javascript
 
Javascript is implied :P
 
-1
Q: Golf a reverse two-period polyquine

noɥʇʎԀʎzɐɹƆSuppose you have two languages, A and B. Write a program that: when run in language A, it outputs itself reverse. when the reversed source is run in language B, it outputs the original. when the original is run in language B or the reverse is run in language A, it outputs "0, 1, 1, 2, 3, 5, 8,...

0
Q: How many pages have I torn out?

arminbLast month I borrowed a plenty of books from the library. They all were good books, packed with emotions and plot-twists. Unfortunately, at some points I got very angry/sad/disappointed, so I tore some pages out. Now the library wants to know how many pages I have torn out for each book. Your g...

 
As well as anything that can compile to JS, like TypeScript, CoffeeScript, Kotlin, etc
 
5:59 PM
Stackoverflow annoys me. I can't chat on there, and i have a question that's probably not fitting for it's own question post
 
@moonheart08 Don't worry, SO chat is a horrible place to get help. You can ask here, it's not so bad.
 
I'm writing a game that's using javascript as it's embedded language (I'm familiar with JS, and i want it's versatility). I'm trying to think up an efficient way of creating new types of game objects from inside the JS. Any recommended structure for how that should be done? I'm working on a project where objects will be fairly abundant and as such will use Rust code when possible (Embedded in rust using the SpiderMonkey javascript engine)
It is, obviously, a personal project :P
And to note on what i'm using for embedding, i'm using docs.rs/josephine/0.2.0/josephine
 
0
A: Sandbox for Proposed Challenges

CrowleyTitle: Number rewinder Inspired by this SO question and little bit expanded. Your task is to rewind a given integer by one digit leftwards in a given base and return integer (move the MSD to the LSD position). You are not allowed to use strings wherever in the stack. Input: uint Number > 0, ui...

 
Also, another question because i've been unable to find active communities for it: Are there any active communities for Core Wars or similar activites?
Wait
Heh, PPCG counts as one, but it has no activity for it right now
 
6:17 PM
@moonheart08 define efficient. And what kinds of objects
 
Efficient as in easy to use for both the programmer and the software handling it. The objects are ingame objects like items or entities
 
@moonheart08 what’s wrong with JS classes?
 
I'm stupid. Thanks for reminding me those exist.
 
Idk about spider monkey api but I assume it’s relatively simple compared to v8
 
That's why i chose it :P
Plus it actually compiles for me
so there's that
 
6:24 PM
If you use typescript you can also get interfaces for more complicated OOP, IDK if you want to go that route though.
 
TypeScript sucks
i tried to use it once
its a horrible mix of attempted strict typed code with a loosely typed language
 
OOP in JavaScript is weird. I still don't understand it's logic... As Mego said, it's not OOP, it's OOPS :p
 
also the compiler is pretty stupid and needs to be told how to import everything
 
I liked it, but then I'm more used to strictly typed languages.
 
There are so many ways in JS to create classes...
 
6:27 PM
@labela--gotoa there is really only 2 (old style and new style) but you can rearrange parts leading to the confusion
@Pavel typescript or JS?
 
You mean object generating functions & the real classes?
fine
the first looks bad, the second is weird
 
they are factories which aren’t classes but generate objects of the Object class. And then to make a new class you do a function as a constructor. Real classes are better but you can put a goat face on a sheep but it’s still a sheep
 
petition to rename object-oriented to thing-oriented
 
6:37 PM
1
Q: Core Wars and similar programming challanges in PPCG?

moonheart08Core War is a game about two or more programs written in an abstract assembly language (REDCODE) dueling/jousting/fighting. The goal of it is to get the enemy program to have no more running threads. Brainfuck Jousting is a Core Wars like game using a Brainfuck derivative instead of REDCODE. It ...

 
6:49 PM
@Downgoat ts
 

« first day (2564 days earlier)      last day (2273 days later) »