« first day (2179 days earlier)      last day (2960 days later) » 

18:01
@EriktheOutgolfer is often a victory condition for the robbers, but it's a validity condition for the cops (i.e. that your answer must be obfuscated enough to survive cracking)
18:18
0
Q: Print all unique ways of writing a number as a sum with a lexical order

Hristiyan DodovI found about Code Golf after writing this program and decided to post the rules here so you can try it out too. I saw this, which is a less restrictive version of my question. I've got a bit more rules which (in my opinion) make the task quite a lot more tougher. Title says it all. If the input...

18:30
@Downgoat TIL I've been pronouncing it wrong
like "rejular expression"?
@El'endiaStarman I actually disagree with this. While there are definitely cases of purely-noise "is chat dead", often times I've posted something with no response, and asking if chat is alive helps me know if people are simply uninterested or missing
Yes, although I do at least pronounce it correctly in its unabbreviated form.
@MartinEnder this is great :) I've really been looking for something like this
I feel like every time I got started on Elegance, I was never sure how to go about it, even though I knew much of what goes into making a language
@trichoplax I don't care what anyone says but rejex is correct pronunciation of abbreviation
I don't say mag-ic I say majic
18:38
you do also say majical
(I agree with you about rejex, though)
When you come back to chat... and find that regex pronunciation is still being argued about.
Next up: the correct spelling of gaol
You mean gaot?
no - it's the UK spelling of jail
I was wondering about that... do people actually still use that, or is it just an archaic spelling variant?
18:42
It's not a word I often see written down, but I suspect plenty of people in the UK are not familiar with "jail", especially the younger generations
Because I've only ever seen it in various works of fiction, but then I guess you'd just use "prison"/"imprison" in the UK in most contexts, wouldn't you?
> plenty of people in the UK are not familiar with "jail"
What? Of course they are.
Well, I can safely say: TIL
> Most Australian newspapers use jail rather than gaol, citing either narrower print width or the possibility of transposing letters in gaol to produce goal.
18:44
Question: is actually is or === better for operator testing if two objects are same objects
@mınxomaτ Sorry - I mixed that up. I meant I suspect plenty of people in the UK are not familiar with "gaol" - "jail" seems to be much more common now.
@trichoplax You can safely say jail is not your goal.
seriously actually is
@Downgoat foo is_it_no_but_seriously bar
the same as for ===, equals for ==
18:45
@quartata megosLanguageNames.join(" ") + " is"
@MartinEnder I have seen it used in modern media outside fiction, but very rarely. I first became aware of the word through "The Wind in the Willows"
Someone must've been a bit lazy...
0
Q: Code Golf - Print number of natural numbers with certain properties

endriklos977Challenge: Print number of possible values of X if: X is dividable by 3, X contains the number 3 and 99 < X < 1000 X is dividable by 7, X contains the number 2, X doesn't contain the number 3 and 150 < X < 5000 Sub-Challenge: Do the same but instead of printing the number, print the values ...

0
Q: Command-line flags in quines

DLoscFor languages that use command-line flags to modify their behavior, these flags are generally added to the byte count. But I don't see a ruling on what to do with command-line flags in quine challenges. I.e. suppose this was a quine: perl -ne 'quine_program'. I see a few options: Output the fla...

2
oh no... @EᴀsᴛᴇʀʟʏIʀᴋ I am so sorry... I forgot to award bounty
pls forgive :'(
18:56
@MartinEnder woah, this is a good book: its going to cover writing a tracing garbage collector
!
Which book is this?
@El'endiaStarman
Anonymous
@NathanMerrill The author is really good at writing - he knows the subject matter very well, and is able to explain it in a way that makes sense without dumbing it down too much. I'll probably buy a dead-tree copy when it gets published.
yeah I agree
Anonymous
19:01
I'm only 3 chapters in and I can already tell that this is going to be one of my favorite books
We were planning on just doing reference counting when compiling native but a good GC would be nice
The Tree is dead! Long live the Tree!
hey, I'm on chapter 3 as well
Anonymous
It's really nice that Martin linked it now, just as I was beginning to plan out a not-so-esoteric programming language
and so far, his goals are really similar to mine: the only difference is he's doing a dynamically typed language
19:03
@Mego Oh no not you too
Anonymous
@quartata Haha I've had a few ideas bouncing around in my head for a while, but now they're really starting to become more concrete
Anonymous
I've been dreaming of this language for years, but never had the experience necessary to actually plan and implement it
do you want to bounce the ideas in here?
I love poking holes in language design
19:05
Ooh ooh me too
Anonymous
Well my primary goal with the language is to make it effortlessly parallel
Anonymous
Scalability is a big design goal
Anonymous
Which means solid, simple support for asynchronous tasks
oh, so like Go?
Anonymous
And not in a stupid way like Node where everything is asynchronous, even if you don't want/need it to be
19:11
(also, well done starting out with your goals. It's always nice when people start out with those instead of a bunch of syntax)
Anonymous
@NathanMerrill My experience with Go is very limited
Anonymous
So maybe?
Goroutines are pretty nice
Anonymous
One of the things I'd like to do is make each "function" (or whatever they end up being called) portable and serializable, so that it's easy to dispatch them concurrently (even across multiple processes, cores, or computers)
Anonymous
@quartata That seems kinda like what I want
Anonymous
19:14
I'm not a huge fan of the Go syntax, though
Me neither.
portable and serializable? so like you take a function, serialize it to a string, and anywhere you send it can run that function?
Anonymous
@NathanMerrill Not necessarily a string, but yeah that's the gist of it
That's something Pytek will be able to do eventually.
Go syntax is unnecessarily complicated in my opinion... that's why I never learned Go.
19:16
so can functions not contain references to outside variables?
or are those variables "saved" at the point of serialization?
@EriktheOutgolfer Actually I find it quite the opposite: it's too simple. Type signatures in particular I find hard to read with no separator between the types and the variable name.
or do you make a distinction between the purity of a function?
Anonymous
@NathanMerrill That would be a decision I'd have to consider. On the one hand, it'd be nice to be able to reference nonlocal objects, but the serialization would be much harder, and synchronizing state would be difficult.
0
A: Sandbox for Proposed Challenges

endriklos977Challenge: Print number of possible values of X if: X is dividable by 3, X contains the number 3 and input() < X < 10000 X is dividable by 7, X contains the number 2, X doesn't contain the number 3 and input() < X < 5000 Sub-Challenge: Do the same but instead of printing the number, print the v...

@Mego synchronizing state would be impossible. If you want it to be scalable and "send-anywhere", then you have to make it a 1-time-send
19:17
@NathanMerrill It would have to be pure, yes.
Although obviously you can send just a stub if all you want is RMI.
Anonymous
Being able to modify nonlocal objects would mean synchronization locks would be necessary, which would require a centralized monitor, which conflicts with my vision of a decentralized network
there are more ways to modify non-local objects than assigning though
like, if you have objects, and a method assigns a variable within the object
so, if you want the ability to reference outside variables, I think you either have to take a snapshot of the current state, or you have to require that the function is pure
Anonymous
@NathanMerrill Sure, but you would still need locks and a monitor for that. You'd need a centralized authority to decide which unit gets the lock and thus gets to modify the state.
Anonymous
I think what I would end up doing is allowing each processing unit to have its own state variables, but not allow processing units to modify each others' state (unless a centralized monitor was explicitly set up by the programmer for that purpose)
Anonymous
Each unit would be responsible for maintaining its own state. The only way its state can be changed is if the unit changes the state itself.
19:23
...how does that work? I'm assuming you can boot up a processing unit at any time. Does it copy state at that point in time?
Anonymous
@NathanMerrill The unit's state would basically be thread-local variables. How the state is initialized is up to the programmer.
so, each time I "boot", it starts with the same local variables
Anonymous
When functions are passed, any data from the unit's state would be copied (and thus modifications to that data wouldn't modify the unit's state)
ok, so what's the purpose of function passing?
I'm assuming both machines have access to the same code
Anonymous
@NathanMerrill Essentially yes. Each time a unit starts up, it starts with a clean slate. Any previous state would have to be saved and restored via local serialization.
Anonymous
19:26
@NathanMerrill Think of it like the processing unit saying "I need this computed, but I can't do it myself, so someone else take care of it"
Anonymous
It would then pass the function to the other units, and any available units would run the function and send the result back.
Anonymous
It doesn't matter if a function gets computed by multiple units, because pure functions means no side effects, so every unit will compute the same result. The unit that requested the async computation would just take whichever result was done first.
right, but usually workers are doing a single task, and simply need to be passed the values to the function, not a function itself
like, if you are sending out 50K tasks, then you're sending out that same function 50K times, instead of just the data
Anonymous
The different units wouldn't necessarily all have the same code - I'd want the ability to do dynamic code generation, so one unit can create a function that the other units wouldn't have.
That doesn't seem super useful to me. That said, I haven't worked much in the scaling-application world, so I may be totally wrong
I said "much", I mean "at all"
(specifically the need to dynamically create the task to work on, as well distribute that task in a parallel fashion)
Anonymous
19:32
Well, look at it this way: Unit A and B both have the same program loaded. However, Unit A runs function F, and Unit B runs function G. In function F, a new function H is created, and Unit A sends out an async request for running H with some set of parameters. Because Unit B hasn't run function F yet, it hasn't defined function H, so it would need the code from Unit A in order to run the function.
right, I get how it works, but from my perspective, workers are usually doing the same task over and over, just with different numbers/parameters
but I may be totally wrong
Anonymous
@NathanMerrill That's the typical approach to concurrency. I want to allow other approaches as well - workers running different tasks that cooperatively solve one larger problem, for example.
right, And for all we know, this may be the next big thing in concurrency. Just because it isn't done that way doesn't mean it won't solve a bunch of problems programmers are currently dealing with :P
Anonymous
Say you want to decide if a number has two different properties. You would have Unit A deciding whether the number has the first property, and Unit B deciding whether the number has the second property. Whichever unit finishes first would send its result to the other and quit. Then, once the second unit finishes, it would have the result from the first unit, so it would compute the logical AND of both decisions and output it.
Anonymous
The properties could be, for example, membership in the set of primes and membership in the set of Fibonacci numbers.
19:39
right, but even then, you still have a fixed number of functions
Anonymous
Hmm?
you basically pass to the workers "prime 1234567" or "fib 1234567"
Anonymous
Sure, that would be one way of doing it. But depending on the properties, that could be difficult to do.
I guess I'm having a hard time coming up with a use-case for function generation that does much more than store variables into the function
Anonymous
Right now, concurrency is all about SIMD. I want to design a language that has the tools to do SISD, SIMD, MISD, and MIMD.
Anonymous
19:42
@NathanMerrill Who says there has to be a use case right now? :P
Anonymous
"If you build it, they will come."
lol
then I stand by what I said before:
5 mins ago, by Nathan Merrill
right, And for all we know, this may be the next big thing in concurrency. Just because it isn't done that way doesn't mean it won't solve a bunch of problems programmers are currently dealing with :P
Anonymous
And I agree with that :P
Anonymous
I didn't come up with the idea for this language because I thought "I need this to solve a problem" - instead, I thought "this would be cool to have"
isn't that why we all make languages?
because its sounds cool and fun?
Anonymous
19:45
The Rule of Cool is the highest law for programmers
@NathanMerrill Aye, I've seen that to be a common reason to ask if chat is dead. Thing is though, the answer is always the same: no. I frequently look at chat but don't say anything. If no one responds to you, then maybe nobody is interested at that time. Chattering about something that nobody's interested in is noise too.
@El'endiaStarman I disagree that its never dead here. If it is dead, then I'll bring it up again. If its not dead, then I know its uninteresting and I won't bring it up again
@quartata Yeah, I have it open in a tab already. I'll read it after Game Programming Patterns.
@Mego one other question, when passing a function, do you make any assumptions about functions the target computer has?
@NathanMerrill What counts as "dead"?
19:49
its human judgement, but I need to make that human judgement to judge interest as well
like, even if chat was active, I still need to judge people's responses to see if they are interested, or trying to move on
Anonymous
@NathanMerrill No. If you want to call another function inside of a function, it needs to be passed as a parameter. Functions passed through async requests must be pure, and cannot directly interact with the running unit's state.
@ATaco: I wrote the Threead quine you asked for: codegolf.stackexchange.com/a/107047/62131
@Mego so, if I have a large enterprise-scale application with tons of functions and who-knows-what, I may be passing a huge chunk of my app every time I send the function
not to say that that is a bad thing: it pushes programmers toward making their functions lightweight and dependency-free
but, in essence, worker threads would work without any code, ever
you could spin up a gazillion workers to accept tasks from anybody anywhere
Anonymous
Yeah, unless there's another way around it that I haven't come up with yet, passing a bunch of data and code is a necessary evil
Anonymous
So it will be up to the programmer to be as lightweight as possible
19:55
so, are you going to come up with byte-code that you pass around?
what does a function look like on the wire?
If you can figure out how to send diffs instead of whole pieces of data, that'd help.
Anonymous
@NathanMerrill Yes, bytecode will be used
Anonymous
@El'endiaStarman That would be a useful optimization, but it would largely depend on the format of the bytecode
Anonymous
And it would also require certain assumptions to be made (like the receiving unit has already received the function code, and hasn't lost its state due to a restart without saving)
also, I'm correct in assuming that all functions passed would be zero-parameter functions with a single return value?
Anonymous
20:00
@NathanMerrill Essentially yeah. Since the parameters are known ahead of time, application of the parameters can turn an N-parameter function into a zero-parameter function before passing it. Single return value yes, though that value could be a tuple or something similar, of course.
Anonymous
Another useful optimization would be locally caching function call results in each unit - repeated async requests for the same function with the same parameters would just return immediately with the cached value (thanks to pure functions)
would that really be a common use case?
Anonymous
Maybe
actually, an even better form of caching would to cache from the caller
Anonymous
@NathanMerrill That's what I meant - the async request would never actually get sent after the first time
20:03
ah
Anonymous
I don't want to discourage a potential use case just because I don't think it would be used much
right, but caching isn't free
Anonymous
Right, so it would be up to the programmer to make smart choices
adding it as a feature (by prepending the function name with & or whatever) sounds like a good idea
but automatically caching all tasks sounds like a bad idea
Anonymous
And I agree
20:05
also, caching from the callee can be useful
because if you have lots of units giving out tasks
Anonymous
But there are some times where that is the best idea, so I want to make it possible if the programmer wants it
you could end up with different units giving out the same task
and, it'd be hit-or-miss as to whether you hit the same unit
Anonymous
That's also true
but if you did, it could immediately return
@ais523 An almost identical quine already existed...
Anonymous
20:08
So I take it you're interested in this language idea :P
Although you did manage to golf it.
I'm interested in any language idea :P
I think El'endia's idea of function-diffing has some merit. What you could do is hash the bytecode. Then, when you send the diff, you also send the hash that you want to diff from
then, if the unit doesn't have that function, they can request it
hashing the bytecode has another benefit: quick cache-checking on the worker level
Anonymous
That's an interesting idea
@ATaco aha, I didn't see that, just the bounty
I kind-of assumed that if the bounty was there, it meant more solutions were required
but now you have two to choose from :-)
20:19
Also, string literals work, if you didn't know
it doesn't mention them in the docs
you might want to fix the bug with %, anyway (the error I get implies that there's some sort of injection going on, perhaps you're doing a printf-equivalent without escaping %)
There's a bug with %?
also, sorry those docs don't mention it, the docs aren't great
-1
Q: Balanced smileys check algorithm

Lin Ma Problem Your friend John uses a lot of emoticons when you talk to him on Messenger. In addition to being a person who likes to express himself through emoticons, he hates unbalanced parenthesis so much that it makes him go :( Sometimes he puts emoticons within parentheses, and ...

Question: How should a button provide feedback that the action they requested is complete? Should it display an alert, or perhaps just go to the page showing the modified changes
20:30
Well, it shouldn't go to a different page, the user might be busy typing something in and they don't want to be interrupted.
Push notification seems like the way to go.
@flawr You can't just post cool pictures without explanations.
@flawr it is very difficult to search things on that website... so much for UX
@Downgoat To be fair, SO/SE designers didn't have UX.SE when they were working on SO/SE...
@NathanMerrill @Mego @El'endiaStarman I'm glad you guys are liking the book(s) :)
@MartinEnder What book?
20:32
my starred message on the starboard
23 hours ago, by Martin Ender
Sweet! Bob Nystrom, the author of Game Programming Patterns (as well as several languages, including Vigil) has started work on a new book on implementing programming languages. Like GPP it's going to be freely available online but is going to be published bit by bit as he writes it.
Oh yeah! Awesome book!
Thanks, @Dennis!
Is that all chat replies?
What did he do?!
20:34
Turned best of PPCG into a voting post I presume
Those notifications would be the comments you vote on
Oh, hahahaha.
I haven't actually looked at any of the nominations yet...
Ohh! Time to go vote!
@quartata Me neither. >_>
20:35
will have to figure out if there were any actual notifications in between...
by the way, when are the elections for 19B mod?
@orlp What is 19B?
Oh wait
Dur
Wait, it's still locked
@Pavel not quite
Yep
Soo.... When voting?
20:39
@MartinEnder overlord martin said in an evil voice
Soon™
> This comment is not eligible for voting or flagging
D: is something wrong or am I just doign something wrong
@Downgoat It's locked.
You can't vote on comments on locked posts
Also @Dennis that's a terrible lock reason, there weren't any better ones?
Content dispute, anything?
oh, so it's so he can add the comments at once
Any sysadmins involved in networking and maintaining server uptime in the room?
20:42
I know how to fix a computer from chmod -R 777 /usr/bin if that counts
@Downgoat and double check that everything is correct, which he'll do in a bit. no rush, you'll all find out soon enough once voting starts :)
2
Q: Primes with prime bit-counts

Gurupad MamadapurTask Find all the non-negative integers under a given non-zero positive integer n, that are prime and the count of 1's and 0's in their binary representation (having no leading zeroes) are prime too. Here are the first five such primes, 17, 19, 37, 41, 79 10001, 10011, 100101, 101001, 100...

@El'endiaStarman The explanation was golfed away :)
I've discovered that I've written a ljapunow fractal generator a long time ago. And now I'm playing around with it again.
@VoteToClose To explain: I have a project for App. Dev. that I'm supposed to ask sysadmins about prospective tools they would want in an application for network utilities.
Figured I'd start here. :P
The nomination is over. Voting will begin shortly. — Dennis ♦ 2 hours ago
@Dennis I expect voting to start within about 6-8 minutes.
20:48
@flawr Hey wait a minute, would this have anything to do with bifurcation diagrams?
@El'endiaStarman Perhaps, it is originating from the topic of dynamical systems.
They are famous for making nice pictures.
@VoteToClose I have a pet sysadmin ready to answer some questions
@muddyfish Ooh ooh, can I open up a chat?
@VoteToClose sure
@El'endiaStarman I just read on wp: What we're looking at is some value lambda plotted against two parameters a and b. If lambda is greater than zero we have chaotic beahviour, if it is below zero we stability.
20:51
@muddyfish Here ya go.
@flawr Gee, that's so specific. :P
@El'endiaStarman I think @Zgarb can tell you more about it if you need to know details:)
@quartata No. Historical significance is the only lock reason that prevents adding, editing, and voting on answers and comments.
@Dennis Are lock rules different on Meta? I thought other kinds of locks did that too.

« first day (2179 days earlier)      last day (2960 days later) »