« first day (1939 days earlier)      last day (2903 days later) » 

Anonymous
10:01 AM
@Fatalize It does make sense. The answer is, AI is a class of programs that are able to modify and improve themselves based on heuristics and past experiences, while genetic algorithms are a method of creating a successful program by building off of past successes. The two concepts are similar, but the important distinction is that an AI program improves itself, while programs created by the genetic algorithm are improved by the algorithm.
 
"AI is a class of programs that are able to modify and improve themselves based on heuristics and past experiences"
that's very restrictive
also AI is not a class of programs
"genetic algorithms are a method of creating a successful program by building off of past successes" too broad
but I don't blame you, as I've said the question is bad
That's like asking what's the difference between Computer science and Javascript
makes no sense
 
Chat mini-challenge: given positive integers x and y, output the result of the application of factorial to x for y times
For example, 3,2 -> (3!)!
 
Anonymous
@MarsUltor That doesn't quite answer the question (it shows that there is no upper bound on Kolmogrov complexity, but not that there is a string which cannot be represented in a finite number of bits).
 
Anonymous
 
@Mego Uh
> a string which cannot be represented in any number of bits
???
 
Anonymous
10:07 AM
Better?
 
Leaderboard:
Actually: `!`n
 
@Mego yeah I didn't know it was unilateral; then I'm not sure how to do it multilaterally :p
 
Why not just set the Kolmogorov complexity to infinity?
 
Anonymous
@aditsu Don't vote unless your vote would be the last :P
 
@Mego 6 years? wow :) anyway, my participation consists mostly of posting answers and randomly chatting in here
 
Anonymous
10:11 AM
@MarsUltor I don't know what you mean by that. Sure, for any n, you can construct a string S such that the Kolmogrov complexity of S (which I'll denote K(S)) is greater than n bits, but what I'm interested in is whether or not there is a string S (whose length may be infinite) where K(S) is infinite (meaning there is no way to compute S in a finite number of bits).
 
@Mego ok next time I'll consider posting a comment first and waiting for other votes
 
@Mego Does a string literal count as computation?
 
@KennyLau can we return a piece of code that gives the output?
 
Anonymous
I suspect there is, and its construction would rely on a non-computable function like the halting problem
 
I probably disagree with a lot of current policies
 
10:12 AM
@EᴀsᴛᴇʀʟʏIʀᴋ no?
 
like python generators need extra code to evaluate them, can I return a output format 1 step removed?
 
Anonymous
@MarsUltor Sure, but you can't make an infinite string out of just a finite string literal :P
 
@Mego Bash, 3 bytes: (finite) yes
rekt
 
@Mego Then does that mean finite strings are out of the question?
 
Anonymous
@EᴀsᴛᴇʀʟʏIʀᴋ Python generators and other lazily-evaluated containers are acceptable by default
 
10:13 AM
@EᴀsᴛᴇʀʟʏIʀᴋ maybe I could make a separate leaderboard for that
 
can you deny that face
 
Anonymous
@EᴀsᴛᴇʀʟʏIʀᴋ That's not a string literal; that's a command. "abc" is a string literal.
 
@EᴀsᴛᴇʀʟʏIʀᴋ Thats a command and a string literal
 
10:14 AM
Leaderboard:
Actually: `!`n
UGL:      iilRc%l$d:_l*%:%rd:_o
 
@KennyLau \o/
UGL's back!
 
you still haven't added the last challenge
check the chatroom
 
@KennyLau Ah, I kinda forgot the room. Will add soon.
 
Jelly: 2 bytes
 
Julia, 25 bytes: (x,y)->"$x"*repeat("|>factorial",y)
 
10:18 AM
Leaderboard:
Jelly:    !¡
Actually: `!`n
UGL:      iilRc%l$d:_l*%:%rd:_o
Julia:    (x,y)->"$x"*repeat("|>factorial",y)
 
|> is the function composition postfix op, x |> f means f(x).
 
@EᴀsᴛᴇʀʟʏIʀᴋ There is a Try it online! for that. julia.tryitonline.net
 
Leaderboard (evaluated):
Jelly:    !¡
Actually: `!`n
UGL:      iilRc%l$d:_l*%:%rd:_o
Leaderboard (without evaluation):
Julia:    (x,y)->"$x"*repeat("|>factorial",y)
 
@zyabin101 yeah
im lazy
if i dont be careful i willgo back to himarming
 
Pyth, 8 bytes Mem=.!GH
Leaderboard (evaluated):
Jelly:    !¡
Actually: `!`n
Pyth:     Mem=.!GH
UGL:      iilRc%l$d:_l*%:%rd:_o

Leaderboard (without evaluation):
Julia:    (x,y)->"$x"*repeat("|>factorial",y)
 
10:24 AM
Julia, 48 bytes (full code): (x,y)->eval(parse("$x"*repeat("|>factorial",y)))
 
Leaderboard (evaluated):
Jelly:    !¡
Actually: `!`n
Pyth:     Mem=.!GH
UGL:      iilRc%l$d:_l*%:%rd:_o
Julia:    (x,y)->eval(parse("$x"*repeat("|>factorial",y)))

Leaderboard (without evaluation):
Julia:    (x,y)->"$x"*repeat("|>factorial",y)
@zyabin101 It is possible to store it in the URL
Check out this bf visualizer
3
 
@KennyLau Ikr.
 
Then why don't you implement it?
 
@KennyLau epic
 
@KennyLau I don't know how to.
@MarsUltor help implement permalinks in the UGL interpreter.
 
10:26 AM
google!
 
@EᴀsᴛᴇʀʟʏIʀᴋ -._(._.)_.-
 
@zyabin101 Check this out
 
10:33 AM
What does O(1) space usage mean?
 
@JesterTran Constant space usage.
 
never increases for any inputs
 
No matter the input (or other variable), the space usage is constant
 
O(n log n) means takes longer/more space for larger inputs. (just as a example)
you can have pretty much anything in the parantheses.
 
So I'm not allowed to declare anymore pointers/arrays?
 
10:35 AM
no?
x-y problem detected.
 
@JesterTran Context please
 
write a program to check whether a string is palindrome with O(1) space usage
 
that sounds hard, but idk
@JesterTran O(1) doesn't really mean less than a certain amount (though literally it does)
Just check whether the string is a palindrome, but take the same amount of time for all inputs.
 
1
A: How do I check if a number is a palindrome?

SunilA lot of the solutions posted here reverses the integer and stores it in a variable which uses extra space which is O(n), but here is a solution with O(1) space. def isPalindrome(num): if num < 0: return False if num == 0: return True from math import log10 length...

Should be a good start.
 
thanks
@EᴀsᴛᴇʀʟʏIʀᴋ so maximum is one pointer declaration in the function?
 
10:39 AM
just needs to stay the same for each input
 
No, you can have 64 pointers, just that it must work for n>2^128
That means, the number of pointer is independent of the input
 
what needs to stay the same for each input?
 
(assume that biginteger uses 1 pointer)
the number of variable
so no arrays of variable length
arrays must have constant length
 
int isPalindrome (char s[10]) {
    int i = 0;
    char a[10];
    for (i = 0; i < 10; i++) {
        a[i] = s[i]
    }
    // do stuff
}
is that allowed?
 
no
because of char s[10]
you limited the input
 
10:44 AM
what do you mean by "limited the input"?
 
well, the input can only have 10 digits?
 
how about now?
 
yes?
 
> char a[10];
 
but it won't work?
because you only have the first 10 digits
 
10:46 AM
I see
Oh.... space usage must remain the same for all kinds of inputs
 
@JesterTran Here's a walkthrough: sigmainfy.com/blog/…
 
@mınxomaτ Thanks, I'll bookmark it
 
Or here a bit mor Cish: geeksforgeeks.org/…
> This method takes O(n) time and O(1) extra space.
1) Get the middle of the linked list.
2) Reverse the second half of the linked list.
3) Check if the first half and second half are identical.
4) Construct the original linked list by reversing the second half again and attaching it back to the first half
 
Cool, by the way, this can be done with any data type?
 
10:50 AM
Huh?
 
Can it be done with arrays?
I don't want to look at the answer yet
 
Anonymous
Sure, as long as you can find the middle and reverse the second half
 
A C string is an array.
 
oh yeah, lol
 
Or rather, this applies to all list types.
 
10:51 AM
I'd do it in pure integer arithmetic
 
Anonymous
I've posted my question about infinite Kolmogorov complexity on TCS (and learned that I've been spelling Kolmogorov wrong):
 
Anonymous
0
Q: Does a string exist whose Kolmogorov complexity is infinite?

MegoIt can be seen that, for a number $n \in \Bbb{N}$, there exists a string $S$ such that the Kolmogorov complexity of $S$ (hereafter denoted as $K(S)$) is greater than $n$ ($K(S) > n$). Thus, there is no upper bound on the Kolmogorov complexity of an arbitrary string. Is there a string $S$ such th...

 
I have a O(1) algorithm to reverse an integer
 
Anonymous
Me too. It's the identity function. Caveat: unary only.
 
Very funny.
 
10:54 AM
@KennyLau @MarsUltor I implemented URI parameter support in UGL! :D
 
@KennyLau Indeed
 
@Mego An idea: if D(n) is the nth digit of pi, then output (D(n)+D(2n))%10.
 
hey @El'endiaStarman
 
@zyabin101 but how do I do it?
 
I gtg guys, bye!
 
10:57 AM
@EᴀsᴛᴇʀʟʏIʀᴋ cya, thanks for help
 
@zyabin101 Done
 
@JesterTran welcome
 
@MarsUltor The "URI parameters to interpreter state" part? I already did it.
 
I feel like I'm that weird guy who pops in unexpectedly to comment on something. :P
 
@zyabin101 I mean I implemented it separately
Sorry I deleted your code, but I already implemented copy + showed the link
 
10:59 AM
> I deleted your code
 
@El'endiaStarman you are, and that's fine
they are interesting comments.
 
D:
I have to return it.
@KennyLau I'll post a message in the UGL room.
 
@EᴀsᴛᴇʀʟʏIʀᴋ ^_^
 
@zyabin101 Okay, just rolling back the last commit should restore it
 
11:01 AM
@El'endiaStarman Well, actually, because of the spigot algorithm, that won't work.
 
>_> i want mod powers in chat
 
@Mego Far simpler: the Busy Beaver numbers concatenated.
 
Anonymous
What can be done about a spam answer on a locked question?
 
I think I can safely say that everybody here likes code-golf...
 
Anonymous
 
11:03 AM
@Mego A moderator can be done about it.
 
@mınxomaτ I don't understand why reversing the integer will not work
 
Anonymous
Well there's no flag button on either the question or the answer, so the only way I see to notify a moderator would be to grab one by the ear in chat :P
 
@El'endiaStarman RUUNNNNN :P
 
@moderator ^^^^^^^, ^^^^^
 
@Mego The question would have to be unlocked, spam answer deleted, then the question relocked.
And I actually gotta run, it's my fiancée's graduation today! :D
 
11:06 AM
:D Life is good. One of the best armor in the game, on level 2.
 
(Well, not literally running, but almost.)
 
@El'endiaStarman nice!!
 
@wizzwizz4 I'll assume that everybody likes code-golf.
But who here likes circuitry-golf?
 
@MarsUltor I reverted your commits because my way was easier.
 
11:08 AM
@zyabin101 How is it easier?
 
Anonymous
@El'endiaStarman I'm surprised that moderators can't delete answers on locked questions without unlocking them first. Not allowing users to do anything on locked questions is great, but moderators shouldn't also have their hands tied.
 
@MarsUltor It uses very short code.
 
@zyabin101 Mine is equally short
 
@EᴀsᴛᴇʀʟʏIʀᴋ You might like this then:
4
Q: What is the relationship between solid-state ROM and inaccessible content in arcade games?

GGMGI was browsing through tcrf.net, which specializes in displaying unused programming and content left in games by developers, and came across this page: https://tcrf.net/Tank Specifically, the following paragraph: Tank is the first known arcade game to use solid-state ROM (in this case, a tiny ...

 
11:09 AM
@MarsUltor Mine is shorter :P
 
@zyabin101 Well, at least put the permalink back in
 
@MarsUltor Nope.
 
ok wat
so you have a uri loader
 
I don't know how to.
 
with no permalink creator
@zyabin101 Just roll back the commit
 
11:11 AM
@MarsUltor Okay, I'll make a permalink creator. Gimme a few hours.
 
11:21 AM
@quartata 2 wishes by dlvl 2 in nethack. I don't trust the RNG.
ohey @Martijn
 
Anonymous
@EᴀsᴛᴇʀʟʏIʀᴋ That sounds like the setup for accidentally stabbing yourself while trying to dip for Excalibur :P
 
@MarsUltor Permalink creator should work.
 
@Mego ikr
SDSM and soon to be speed boots
Now I am saving so I don't do anything stupid this morning. :P
ohey @JesterTran. did your code work?
 
@zyabin101 but there's no permalink input, so it doesn't show up
 
@MarsUltor Huh, right.
 
11:25 AM
Also, you need to encode it otherwise decode won't work
 
I reverted "add permalinks", too. :(
Sorry.
 
@KennyLau you should post the brainfuck question to the main site as a code golf
 
@zyabin101 Should be in the commit history, just look at it there
 
@orlp I posted it in sandbox already
 
@MarsUltor How? Did you revert revert "add permalinks"? ಠ_ಠ
 
11:27 AM
@zyabin101 no
it's still reverted
but git never deletes history
 
@MarsUltor Well...
 
@zyabin101 put it in a textarea, add a copy button (see output/sanitized)
@wizzwizz4 ?
 
@KennyLau not in the sandbox, on the main site :P
 
well
alright
later
 
11:33 AM
@zyabin101 Also, it's possible for it to generate this
http://schas002.github.io/Unipants-Golfing-Language?code=ioioioio&&????&input=1&&
 
@EᴀsᴛᴇʀʟʏIʀᴋ Hey
 
...who starred my "stupid thing" message.
@Martijn morning to you
 
@MarsUltor the encode/decode thing doesn't work in QtWeb! D:
This is my only browser apart from IE which I just don't want to use.
 
@zyabin101 Does that have a console?
@zyabin101 Why? Surely you can get chrome/ff
 
@Mego The RNG will provide be an asshole.
 
11:43 AM
@MarsUltor It has a web inspector with a console.
But it is hard to find.
 
@zyabin101 Any errors?
 
First, enable the Web Inspector in tools.
@MarsUltor \/
SyntaxError: Parse error in ugl.js:45
 
@zyabin101 Why dont you just use base64?
 
@zyabin101 Oh whoops
 
URIError: URI error in /Unipants-Golfing-Language/?code=io&input=1
 
11:44 AM
@Martijn ... i saw the edit.
 
ReferenceError: Can't find variable: loadExamples in /Unipants-Golfing-Language/?code=io&input=1
 
@CᴏɴᴏʀO'Bʀɪᴇɴ @CᴏɴᴏʀO'Bʀɪᴇɴ I FOUND SMALL CAPS
 
@zyabin101 Fixed
wait wat
 
11:54 AM
@orlp Don't be too hasty, the sandbox is actually being useful :P
 
@zyabin101 Can you make the permalink be in a disabled textarea? copy only works on inputs
@zyabin101 That's because it needs to be encoded now
 
@MarsUltor Heh, I'm too lazy to do it.
 
@zyabin101 Do you mind if I make it a textarea?
 
@MarsUltor Okay.
 
11:58 AM
@zyabin101 website looks fugly
pls redesign
 
It was designed by @MarsUltor to be simplistic.
Address design issues to him.
 
@MarsUltor needs less fugliness please
and margins
 
@EᴀsᴛᴇʀʟʏIʀᴋ Why margins?
 
@VTCAKAVSMoACE do you have a cousin on SE?
 
12:01 PM
@EᴀsᴛᴇʀʟʏIʀᴋ No.
He hasn't.
 
'twas a joke
@MarsUltor because it is hard to read as is.
just put <body style="margin-left:40px;"> for the body tag.
 
@EᴀsᴛᴇʀʟʏIʀᴋ No margin-right?
 
idc, but the margin left is the annoying one
 
hmmm, for a change, I have spare time... what should I work on?
 
@Quill What do you want to work on?
 
12:06 PM
idk man or I wouldn't be asking
 
Maybe the console viewer?
Or if you want, you can fix the horrible JS code I have lying all over the place
 
@Quill getting more PPCG rep.
or learning to play nethack
 
@Quill You may contribute to zyabinVI :)
 
Or maybe do something with canvas
 
>O< Rultor followed me!
And @GeorgeGibson, thanks too ^_^
 
12:10 PM
or fix UGL's design (IDK how to, and @EᴀsᴛᴇʀʟʏIʀᴋ really hates it)
 
ugl?
 
@Quill Unipants' Golfing Language.
 
@Quill The website looks horrible
 
Or help to make UGL's permalink creator.
 
@zyabin101 Isn't it already done?
 
12:14 PM
@Quill what did you decide?
 
I'm taking a look at the design now
it's pretty bad <_<
 
just needs some work (like thought into the artwork)
i have a couple fractal flames you could use
/s
 
cat
12:33 PM
@Downgoat I am :c
 
I am :d
 
Chat mini-challenge: given positive integers x and y, output the result of the application of factorial to x for y times
For example, 3,2 -> (3!)!
Leaderboard (evaluated):
Jelly:    !¡
Actually: `!`n
Pyth:     Mem=.!GH
UGL:      iilRc%l$d:_l*%:%rd:_o
Julia:    (x,y)->eval(parse("$x"*repeat("|>factorial",y)))

Leaderboard (without evaluation):
Julia:    (x,y)->"$x"*repeat("|>factorial",y)
 
cat
this is an interesting problem for a language without explicit looping
 
@KennyLau CJam: q~"m!"*~
 
Leaderboard (evaluated):
Jelly:    !¡
Actually: `!`n
CJam:     q~"m!"*~
Pyth:     Mem=.!GH
UGL:      iilRc%l$d:_l*%:%rd:_o
Julia:    (x,y)->eval(parse("$x"*repeat("|>factorial",y)))

Leaderboard (without evaluation):
Julia:    (x,y)->"$x"*repeat("|>factorial",y)
@MartinBüttner Do you know how to golf it in Pyth?
 
12:45 PM
actually, that was stupid...
q~{m!}*
@KennyLau no
 
Leaderboard (evaluated):
Jelly:    !¡
Actually: `!`n
CJam:     q~{m!}*
Pyth:     Mem=.!GH
UGL:      iilRc%l$d:_l*%:%rd:_o
Julia:    (x,y)->eval(parse("$x"*repeat("|>factorial",y)))

Leaderboard (without evaluation):
Julia:    (x,y)->"$x"*repeat("|>factorial",y)
 
what do you mean by "evaluated"/"without evaluation"?
you can golf both Julia versions with x->y-> instead of (x,y)->
 
The mini challenge would be interesting if it actually had good alternative approaches :P
 
@MartinBüttner the bottom julia one returns a string to be evaluated for the answer.
 
12:47 PM
oh okay
 
prolly not allowed on main, but nice in chat
 
Leaderboard (evaluated):
Jelly:    !¡
Actually: `!`n
CJam:     q~{m!}*
Pyth:     Mem=.!GH
UGL:      iilRc%l$d:_l*%:%rd:_o
Julia:    x->y->eval(parse("$x"*repeat("|>factorial",y)))

Leaderboard (without evaluation):
Julia:    x->y->"$x"*repeat("|>factorial",y)
 
you need to do eval(parse(f(2,3)) to get the number
 
@Sp3000 No, because Dennis will always come up with the golfiest approach
 
Mathematica: #!&~Nest~##&
isn't it lovely when you can call a ternary function with binary infix syntax?
 
12:49 PM
damnit martin
don't be a dennis
 
hey, not sure if you guys read the conversation 6 hours ago, but I need a term that indicates that multiple references of an object point to multiple copies of the object
right now, I'm leaning towards unshared
 
distinct?
wait, which part of the setup is "unshared" referring to?
the objects?
the pointers?
 
(as an example, a = MyObj(); a.attr = 3; b = a; a.attr = 4)
 
@NathanMerrill ????
@NathanMerrill that's struct
 
in the above, b.attr would be 3
I don't like struct
 
12:51 PM
oh okay
 
@NathanMerrill ref/reference
 
it means something different in most other languages
 
wait no
 
I guess I'd call b = a assignment by value
 
Basically, does a = b set a to the value or memory address of b, right?
 
12:52 PM
structs don't work like that in C/C++
 
@NathanMerrill That's not 'most other languages'
 
@NathanMerrill sure they do if you have them on the stack (as opposed to working with pointers to them)
 
that's the language everybody bases the syntax off of
sure, but its not specific to structs
 
@NathanMerrill how is jelly based off c/c++?
 
12:53 PM
is this a full deep copy or just a shallow copy? e.g. what if attr is itself an object?
 
shallow
well, its actually up to the class
anyways, what keyword should the class use to indicate that it is copy by value?
(that's not really how it works)
 
then reference shallow deep?
or just reference clone (or clone<depth>)
 
so class reference clone ClassName()
that's a bit long
 
no
class ref Name() or class reference Name() for a reference type (i.e. a and b point to the same place)
 
12:56 PM
Leaderboard (evaluated):
Jelly:       !¡
Actually:    `!`n
CJam:        q~{m!}*
Pyth:        Mem=.!GH
Mathematica: #!&~Nest~##&
UGL:         iilRc%l$d:_l*%:%rd:_o
Julia:       x->y->eval(parse("$x"*repeat("|>factorial",y)))

Leaderboard (without evaluation):
Julia:       x->y->"$x"*repeat("|>factorial",y)
 
clone meaning it's cloned every time it's assigned
 
Chat mini-challenge: given positive integers x and y, output the result of the application of factorial to x for y times
For example, 3,2 -> (3!)!
 
class clone Name()
clone may not be the best name
 
maybe value
or val
 
@KennyLau so did you say the G in UGL stands for "golfing"? ;)
or I guess @zyabin101 did
 
12:58 PM
I wasn't the creator
yep
 
@MartinBüttner point is, there is only 22 operations
 
@NathanMerrill Yeah, that's a lot better
 
cat
lambda x,y:eval(("fact("*y)+str(x)+(")"*y))
 

« first day (1939 days earlier)      last day (2903 days later) »