« first day (2049 days earlier)      last day (2789 days later) » 

9:01 PM
@muddyfish The program counter is kept in memory address 0. So you set that address to where you want the next instruction to be executed.
@HelkaHomba I actually hadn't linked it, but I did watch it before you linked it. :P
@NathanMerrill Yeah, seems to be really easy. Hmmm...I wonder if I could construct a webpage that cycles between two or three different things when you're not looking... :P
 
@Dennis yeah I was playing around inserting code into the string, but it does not always print the source which is what confused me about "payload capable", as a simple example “ṘVØV”ṘVprints “ṘVØV”00ṘV
does it not have to still be a quine with the payload?
 
@JonathanAllan No, as soon as you attach a payload, the output may (and will) differ. The whole point of adding a payload is to do something.
For example, you can extend payload capable quines to print the source code twice.
 
so 0 is payload capable
just not proper
 
@JonathanAllan No, since you can't attach a payload that will form part of the output.
 
OK, definition very confusing
 
9:08 PM
To me Jelly is not functional at all.
 
Yeah, Martin's a lot easier to grasp. It's also better imho. Quite often, non-payload-capable quines are a lot more interesting since they're something else than just the strandard quine + arbitrary payload.
 
Does it even have first-class functions?
 
Are links first-class functions?
 
googles first-class functions
 
@HelkaHomba whoa
^^
 
9:09 PM
I mean functions that can be referred to without calling them
 
As in Python. i.e. functions are normal objects
 
Martin's definition instantly rules out a one character quine
 
a first class function would be something like, compose(f,g) -> (x, y) -> f(g(x,y))?
 
@ConorO'Brien Nice to see you green again
 
9:10 PM
@HelkaHomba Thank you! It's good not to be high
 
@TimmyD Perhaps. I don't know Rust, though, so it may be difficult to do that
 
@ConorO'Brien Yes.
 
@Dennis - anyway you think I should just delete 0?
 
Anonymous
@feersum Nowhere in the definition of functional programming is the requirement to have first-class functions. Functional programming is the paradigm where programs are written as evaluation of mathematical functions. Purely-functional is a more extreme version where those functions cannot have side effects. Tacit (like Jelly) is another related paradigm, where the functions are merely composed as part of a program, without identifying their arguments.
 
@feersum I read the definition, and no, Jelly doesn't have first class functions.
 
9:15 PM
@DJMcMayhem plz help with vim golf: codegolf.stackexchange.com/a/92763/31343
 
@JonathanAllan Your call. Personally, I don't consider it terribly interesting.
 
Anonymous
Additionally, first-class functions are merely functions that can be used like other data types. Because Jelly programs entirely consist of concatenating and applying combinators to functions, I'd argue that they are first-class.
 
@Dennis - yeah it's possible in a huge swathe of languages
 
@Mego But that's only possible at compile time. Not sure if that matters.
 
@Mego You can't use functions like other data types.
 
Anonymous
9:18 PM
@Dennis Not in the slightest.
 
Anonymous
Well, actually, probably
 
seriously?
ke he he
 
Anonymous
But still - first-class functions is not a requirement for FP - it's just a nice tool that many FP languages include.
 
And I suppose that having first-class functions doesn't make a language functional?
 
Anonymous
Correct
 
9:21 PM
And having a downvote icon as an avatar doesn't make someone the top downvoter.
 
In a sense, function is the only data type of Jelly, so it's vacuously true that functions can be used like other data types.
 
It's just nice to have
 
...this is rather odd
 
@Dennis oh, nilads?
 
Anonymous
A language supports the functional paradigm iff it has the ability to create a program that is solely the result of evaluation of mathematical functions.
 
9:21 PM
functional programming then has nothing to do with functions
 
Anonymous
It has everything to do with functions
 
Whoa, when I used it I saw ints, floats, and arrays... apparently I was doing it wrong.
 
but rather, how much it uses immutable data types
 
@Mego what does "evaluation of mathematical functions" mean?
 
@ConorO'Brien Yes. Writing 0 actually creates lambda:0.
 
9:22 PM
" Functional programming is the paradigm where programs are written as evaluation of mathematical functions."
 
@Dennis and the results? are those also nilads?
 
Anonymous
@ConorO'Brien foo(bar(baz()))
 
could I write a purely functional language without any user functions?
it seems like I can
 
@Mego oh! so a program that is composed of functions, without loops and such?
 
Anonymous
@NathanMerrill Lambda calculus
 
9:24 PM
right. therefore, functional programming has nothing to do with "functions" (as in the programming function)
 
@ConorO'Brien At least Haskell doesn't have any loops.
 
but rather with immutable data types
 
Anonymous
@ConorO'Brien Correct. Specifically, mathematical functions (mappings between inputs and outputs), as opposed to programming "functions".
 
@flawr it doesn't? +1 I really should start learning Haskell
 
Anonymous
Haskell supports purely functional programming, which is neat
 
9:24 PM
@ConorO'Brien You should indeed=)
 
@ConorO'Brien The results are accessed either tacitly or via ³ etc., which are also nilads.
 
@Mego programming functions being stuff like "print" and "readline"?
 
Anonymous
@ConorO'Brien Yep, those are examples.
 
@Dennis oh, cool
@Mego awesome!
I'm learning so much today! Which is more than I can say for my school >_<
 
@ConorO'Brien Haskell does have "print" and "readline" but they are seperate from the "pure" functiosn.
 
Anonymous
9:26 PM
Yeah pure functions don't have side effects
 
@flawr ah, yes, of course. what good would a language be without being able to see results?
 
Also actiosn like RNGS e.t.c. obviously can't be pure.
But there is a neat solution (that I still cannot fully grasph) in haskell=)
 
Anonymous
With implicit input and output, you could create a language that allows pure functional programs to be written
 
oh, true
@flawr a solution to what? RNG pure functions?
 
Would someone be willing to simply run the following JS? It's an entry to the upvoter/downvoter challenge, but I can't test it because I ran out of quota.
i=U=D=u=d=1;a="_vote_count";b="up"+a;c="down"+a;x=z=>z.items?(z.items.map(y=>y[e=y.user_id,b]>u?(u=y[b],U=e):y[c]>d?(d=y[b],D=e):0),document.write(`<script src="//api.stackexchange.com/2.2/users?page=${i++}&pagesize=100&site=codegolf&filter=!)RwcIF5Y1fm0fy4l*lW)XIeU&callback=x">\x3C/script>`)):alert([u,d]);x(1)
 
9:27 PM
@ETHproductions I can
 
Warning: it will drain your quota
 
@Mego The "implicit" doesn't sound very functional.
 
I don't use my quota often
 
you could have a purely functional RNG. You just pass in the RNG, and it returns (int/RNG with next state) pair
 
@ConorO'Brien a solution to the impurities=)
 
Anonymous
9:28 PM
@flawr The point is that the programs are pure functional, even if the language does stuff with side effects to meet that goal
 
@ETHproductions ReferenceError: x is not defined
 
0
A: Sandbox for Proposed Challenges

NonlinearFruitNatural Pi - The Front Nine W.I.P. ## Meta ## The big things are: - 3 more ways to calculate pi with nature - related pi theme/idea for back nine Introduction These challenges are simulations of algorithms that only require nature and your brain (and maybe some re-usable resources) to ...

 
@ConorO'Brien Try it again please; I've modified it some.
 
@ETHproductions ok
 
Would I get suspended if I put a diamond at the end of my name?
 
9:29 PM
@NathanMerrill hmm, but that is on the one hand cumbersome to handle, and on the other hand I think you do not want your functiosn to be able to interfer with the seed, would you?
 
> Beta Decay ♦
 
@BetaDecay Probably
 
@ETHproductions 1,1 to alert
 
Either that or a mod would remove it
@ConorO'Brien :(
Try this:
 
@flawr yeah, its cumbersome, but technically, any call to random.next() interferes with the next call
 
9:30 PM
@BetaDecay That's not possible. You can only use alphabetical characters and whitespace in your username.
 
i=U=D=u=d=1;a="_vote_count";b="up"+a;c="down"+a;x=z=>z.items?(alert(JSON.stringify(z)),z.items.map(y=>y[e=y.user_id,b]>u?(u=y[b],U=e):y[c]>d?(d=y[c],D=e):0),document.write(`<script src="//api.stackexchange.com/2.2/users?page=${i++}&pagesize=100&site=codegolf&filter=!)RwcIF5Y1fm0fy4l*lW)XIeU&callback=x">\x3C/script>`)):alert([u,d]);x({items:[]})
 
@Dennis Oh right. So what counts as alphabetical characters?
 
Ask a dev. :P
 
I'd ping CJY but I'm not that interested
 
Anonymous
@BetaDecay lambda c:c.isalnum()
 
9:33 PM
@NathanMerrill also that seems as a very bad idea, if you e.g. want to evaluate a tree, and hand the seed down into multiple brances simultaneously, then all the branches of some node get the same seed.
Cause in haskell you cannot really enforce an order of execution.
 
@Mego Wow, that is a handy function
 
@ETHproductions 1,1
 
Anonymous
Actually that apparently doesn't cover all of the Unicode characters with the Alphabetic property
 
@Maltysen :D \o/ yay more vim-golfers!
 
@flawr true. you could call skip(n*m) on the nth branch, but then you need to know how many times the branch will call the randomizer m
 
9:35 PM
I commented some tips
 
@NathanMerrill Infinite trees ftw=)
 
Anonymous
unichars -ua '\p{Alphabetic}' will get you the whole list (of over 100k characters), using unichars from CPAN
 
Anonymous
@BetaDecay Python 3
 
actually, there's a better way. use nextInt() n times to construct n Random instances
 
9:37 PM
@ConorO'Brien One more try:
 
Anonymous
Python 3.4.3 (default, May  5 2015, 17:04:32)
[GCC 4.9.2] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 'ᴍ'.isalnum()
True
 
i=U=D=u=d=1;a="_vote_count";b="up"+a;c="down"+a;x=z=>z.items?(alert(JSON.stringify(z)),z.items.map(y=>y[e=y.user_id,b]>u?(u=y[b],U=e):y[c]>d?(d=y[c],D=e):0),document.write(`<script src="//api.stackexchange.com/2.2/users?page=${i++}&pagesize=100&site=codegolf&filter=!)RwcIF5Y1fm0fy4l*lW)XIeU&callback=x">\x3C/script>`)):alert([u,d]);x({items:[]})
 
@Mego I was using Python 3
3.2
 
@muddyfish RAM register 0 corresponds to the program counter. The program jumps by writing to location 0.
 
Anonymous
@ETHproductions Holy alert spam, Batman!
 
9:38 PM
@ETHproductions {"items":[]}
 
although, that only works if nextInt() is a perfect random
 
Anonymous
@BetaDecay Was your terminal encoding set to UTF-8?
 
@Mego Does it alert page after page of user data? If so, it probably works :)
 
Anonymous
@ETHproductions Yep
 
@Mego Probably
 
9:39 PM
@ConorO'Brien Any alerts past the first?
 
yes
many
 
Anonymous
"many" is an understatement
 
Sorry about that. Try this version (only one alert):
i=U=D=u=d=1;a="_vote_count";b="up"+a;c="down"+a;x=z=>z.items?(z.items.map(y=>y[e=y.user_id,b]>u?(u=y[b],U=e):y[c]>d?(d=y[c],D=e):0),document.write(`<script src="//api.stackexchange.com/2.2/users?page=${i++}&pagesize=100&site=codegolf&filter=!)RwcIF5Y1fm0fy4l*lW)XIeU&callback=x">\x3C/script>`)):alert([u,d]);x({items:[]})
 
Alex A is our top meta downvoter, but has a huge upvote/downvote ratio on main
 
InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable
 
9:42 PM
also, its fascinating that both Peter Taylor and Geobits downvote more than they upvote (on main)
 
@ConorO'Brien What the heck?
No idea what that implies
 
Anonymous
@NathanMerrill There's a lot of stuff worth downvoting
 
Fun fact: Geobits and Conor O'Brien are 2nd on the downvoter and upvoter lists, respectively.
 
@ETHproductions me neither
@ETHproductions I'm not the first?
 
@ConorO'Brien Nope. That award goes to Martin.
 
9:43 PM
huh.
ah well
 
keep upvoting ;)
 
I'm not on the upvoting list, but I am on the downvoting list, what does that say about me?
 
how about ratio of upvotes to downvotes?
 
I'm probably on the "fewest votes over time"
(assuming they are still active)
 
@ETHproductions What is that/
 
9:48 PM
How do you display a float in the data explorer instead of an int?
@ΛεγίωνΜάμμαλϠΨΠʹ It's supposed to find the top upvoter and downvoter on the site
 
@ETHproductions Where do you run it?
 
@ETHproductions If it's anything like PostgreSQL, ::float, I think.
 
It's giving me x is not defined
 
@ΛεγίωνΜάμμαλϠΨΠʹ In your browser console should work
 
I had to use that for the TNBDE queries where I looked at proportions.
 
9:49 PM
@ETHproductions see ^^^
 
@ΛεγίωνΜάμμαλϠΨΠʹ What browser?
 
@ETHproductions FF 48.0.2 on Win10
 
@El'endiaStarman Ah, use 1.0 instead of 1
 
Or that.
 
9:51 PM
@ΛεγίωνΜάμμαλϠΨΠʹ That's weird. It works for me
 
i'm still not happy with my challenge, do you honestly think that this works as a challenge?
 
Using FF 48.0.2 on Win7
Edit: no it doesn't :P
@ΛεγίωνΜάμμαλϠΨΠʹ open a new tab, enter about:blank as the URL, then run the program in the console.
 
hai
 
Top upvote-to-downvote ratios (for users with >100 upvotes)
Spoiler: Peter Taylor is 2nd and Geobits is 3rd
 
and there are only 3 users that have more downvotes than upvotes
 
9:56 PM
@ETHproductions I'd say downvote to upvote ratio.
 
@flawr whoops, typo
 
Hm, I need to catch up there.
 
@ETHproductions The thing keeps loading
No console errors though
 
@mbomb007 I'd love to write a comment on that answer=)
 
@ETHproductions I feel like there's a bug there...the 100th user has a ratio of 0.09
does all of the thousands of other users seriously have 10 times more upvotes than downvotes?
 
9:59 PM
i=U=D=u=d=1;a="_vote_count";b="up"+a;c="down"+a;x=z=>z.items[0]?(z.items[0]!=1&&z.items.map(y=>y[e=y.user_id,b]>u?(u=y[b],U=e):y[c]>d?(d=y[c],D=e):0),document.write(`<script src="//api.stackexchange.com/2.2/users?page=${i++}&pagesize=100&site=codegolf&filter=!)RwcIF5Y1fm0fy4l*lW)XIeU&callback=x">\x3C/script>`)):alert([u,d]);x({items:[1]})
 
@ETHproductions How is Peter Taylor second? He has more downvotes than upvotes.
 
@ΛεγίωνΜάμμαλϠΨΠʹ Try ^^
@El'endiaStarman It was a typo; that should say downvote-to-upvote ratio.
 
@ETHproductions Oh, that makes a lot more sense. :P
 
I wrote a program to calculate sandpiles using symmetry and binary expansion, and it's pretty quick. It's not relevant to my posted question, though, because it's not golfed at all. I don't know what to do with it.
hm. I guess nothing; I found a page that lets you zoom around on the 2^30 sandpile. It would take me a million minutes to calculate that.
 
@ETHproductions Same, just keeps loading
 
10:12 PM
@JonathanAllan Found your comment by accident (comment notifications disappear when the post is deleted). While 0 is not a proper quine, your 6 byte solutions are not only.proper but payload-capable. I see no reason to delete those.
 
@Dennis - I did not put an @tag to notify you. I suppose I could edit it to show just the payload capable ones...
 
The @ isn't needed if only one user has posted a comment.
 
:/ I hate reviewing a user's first post when it's totally ungolfed. I feel like a jerk saying "Welcome to our community! We're gonna delete you now"
 
Then don't. :P Explain what code golf is, suggest the obvious improvements, and post a link to the tips thread (if it exists).
Personally, I ignore NAA and VLQ flags until the post is at least a day old.
Wow, I'm rhe 5th top downvoter. (source)
 
What's the standard time frame for accepting an answer?
 
10:19 PM
Oh yeah.
 
@Dennis is NAA appropriate for ungolfed answers?
 
@EricTressler Something between a week and never.
 
And does that always get reviewed by a mod?
 
@DJMcMayhem Yes, as it violates a rule in the help center. VLQ flags are crap. Either use NAA or a custom reason.
 
wow Peter Taylor & geobits are harsh
 
10:22 PM
0_0 most of my flags are VLQ
Good to know
Haha, I'm 36th
 
@DJMcMayhem VLQ flags get cleared by edits, punishing the user for improving the post. It also comes with an automatic downvote if I mark it as valid.
@JonathanAllan I always think that I don't downvote enough, which is why I'm surprised by the 5th spot.
 
OK I'll stop using it then
 
a downvote for a new user actually has no rep effect although seeing the -1 straight away may feel pretty bad
 
Unless there's something seriously wrong with it, I don't downvote first posts. If they aren't fixed, they'll end up deleted anyway.
 
Speaking of flags, I'm getting really close to getting the reviewer badge. :D
Which would totally rock cause only four users have ever gotten it before.
 
11:00 PM
Why are my shortcut icons little people? ._.
 
I dunno. Could have something to do with being in multiple groups, or shared on a network, or something?
 
11:28 PM
@El'endiaStarman @ETHproductions Is there no way to seed JS's PRNG?
(Sorry just pinging the two current users here that know JS)
 
182
Q: Javascript Random Seeds

weepyIs it possible to seed the random number generator (Math.random) in Javascript?

 
Wonderful. As if my JS experience wasn't already bad enough I have to write a Mersenne Twister
I mean, that's not a big deal but still pretty disappointing :/
 
11:44 PM
@quartata I am current!!!
:P
 
11:55 PM
Print["This program wasn't written in",a=" Mathematica ",If[b=Now==Now,9,10],", it was built for",a,If[b,10,9],"!"]
^ Gives different output for Mathematicas 9 and 10
 
@zyabin101 Little arithmetic tells me I'm at about ~15k which really inflates my ego
@ΛεγίωνΜάμμαλϠΨΠʹ OK, so obviously this is about some difference in Now between Mathematica 9 and 10 but I'm not sure what it is
You definitely win points for obfuscation
 

« first day (2049 days earlier)      last day (2789 days later) »