« first day (2342 days earlier)      last day (2493 days later) » 

12:01 AM
@ZacharyT All strings are lists of characters, that's how they work internally.
It's just that a list of characters outputs like a string would.
 
@ZacharyT what for?
@Lembik the bounty on this question is ending in 18 hours. What to do?
 
@Mendeleev you started it
 
I miiiiight have too many turrets... :P
 
nope
you have placed them too much on top
they should be in a massive array around the entrances
 
No
The enemies can break blocks
Also, the 4 gatling turrets and two repair turrets on the entrances are more than enough
 
12:14 AM
@Mendeleev What game is that?
 
@DJMcMayhem Dig or Die. It's like Terraria or Starbound, but more combat focused and with tower defense elements
It's really fun
I got it for \$3, I think the price went up to $10 though
Basic premise is that your AI spaceship crash landed on an alien planet with aggressive monsters
Progression works like this: Every time you kill a member of a new species, they attack you at night
Night is hellish
Also, this is actually not enough turrets. I need more regen ones
 
@LeakyNun I want this to actually map over to each char in the argument, rather than the whole string.
Hey, @Sean, you know Perl6?
 
@Mendeleev you way over did it with the ceiling turrets, you probably need to move them to the sides
 
@ZacharyT be more specific
 
@DestructibleLemon Nah, the sides are fine. I usually stay on the ceiling. There's flying monsters that try to break the turrets and succeed if I don't have enough. The ones that can't fly get hit by the ones in the entrances
The underground turrets repair other turrets
 
12:25 AM
weird
 
Is there an atom that does this?
'012' => ['0','1','2']
 
@ZacharyT I mean, be more specific about the function you are mapping
because ['0','1','2'] is how the string is internally represented
if you don't trust me, add a "python string rep" atom to the end
 
You can usually apply list functions on strings on Python
 
Nvm, I got it, I just didn't need the string list separator!
“0A”iЀ instead of “0“A”iЀ
 
you don't tell me what you're using it for and say "nvm"?
 
12:34 AM
@DestructibleLemon @DJMcMayhem About to stream a typical night in Dig or Die
 
Well, nvm is probably valid jelly code
 
8
Q: Generate a US License Plate

Stephen SGiven one of the following as input: AK,AS,AZ,CA,CT,DC,FL,GA,IL,IN,IA,KS,KY,LA,MD,MI,MN,MS,NV,NH,NJ,NM,NY,NC,ND,MP,OH,OK,PA,PR,RI,SC,TN,TX,UT,VT,VA,WA,WI (with quotes) "AK","AS","AZ","CA","CT","DC","FL","GA","IL","IN","IA","KS","KY","LA","MD","MI","MN","MS","NV","NH","NJ","NM","NY","NC","ND",...

 
I'm not asking what you want to do (well, to turn a string into a list of characters) or the challenge you're trying to solve (because that isn't really useful data), but the specific function that you are applying to each character in the strings...
it's either too little data or too much data
 
Nah, I'll just do it in some other golfing language.
 
12:41 AM
@all I'll appreciate any feedback on QuadR and QuadS my two new golfing languages.
 
Are all your golfing langs going to be APL names?
 
@ZacharyT Probably.
 
@Mendeleev How much is it on steam?
 
@DJMcMayhem $10
There's a coop multiplayer mode too
Here comes the "fun" part, if you're watching the stream
 
If I ever have enough programming knowledge, I'll probably stop making crappy golfing langs and make an APL-style-language,
 
12:53 AM
Is Jelly "APL style"?
Just asking
 
@Mendeleev well, Jelly is based on J, so...
 
OK
 
Array-oriented, yes. Symbols, yes. Any other way possible, no.
 
@Mendeleev absolutely
 
@DJMcMayhem OK, was just confused
 
12:54 AM
@ZacharyT hah everyone disagrees with you
 
I just spent an hour making a long piece of golfed code look neat and tidy, and fixed a few bugs along the way. I'm at about a week-long high right now
 
Yeah, there's multiple "APL styles". "APL isn't a golfing language"
 
everything just crashed
brb rebootinhg
 
CMC: Find an MD5 checksum whose MD5 checksum is itself.
 
@HyperNeutrino what if it doesn't exist
 
12:59 AM
Then everyone loses.
 
1:15 AM
perfect end
:o i just looked stuff up and randomly found dennis on SO
 
@HyperNeutrino md5 has no fixed point
 
Here, have a gold badge. — Dennis Dec 3 '15 at 22:08
 
@HyperNeutrino By the way, I (and everyone else here) just lost The Game.
 
@Mendeleev No, I didn't.
;P
 
well, you just did
 
1:19 AM
nope
neutrinos don't have "thoughts"
 
heh
 
@Mendeleev aw :( is sad
 
oh noes dennis used windows in 2011
 
CMC: Find the longest loop of MD5 checksums checksumming in a loop.
@totallyhuman *le gasp*
 
@Mendeleev how do you know
 
1:22 AM
@DestructibleLemon google
2
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
 
@Mendeleev no
 
please no
 
1:46 AM
hey guys, we have officially done the first compiler in our compiler chain!
 
yay! :D
 
Ataco made his better compiler, though it was very much longer
 
Is it a compiler or an interpreter chain?
 
Compiler
plus one interpreter
 
1:49 AM
we would invite you if you wanted to join
 
I don't think I can devote the time to it, unfortunately.
 
that's ok
you can check back in when it gets easier. We're one level above bf at the moment
also the resulting bf programs are gonna end up massive
 
The first compiler is 161kb.
 
lol wut
 
@DestructibleLemon Do you want to do a multiplayer game of Dig or Die?
 
1:53 AM
@HyperNeutrino he made a very inefficient compiler and then used it to compile itself
@Mendeleev schooool
 
@DestructibleLemon lol wut
 
also 10$
 
it's late june
what school
 
the school before the holidays start
 
where do you live
 
1:54 AM
not telling
 
oh
 
Country, not address, obviously
 
nah jk I have probably mentioned it in chat before tbh
 
@ZacharyT yeah this
 
@DestructibleLemon So, bootstrapping?
 
1:55 AM
yes. but of course he made a compiler in another language first
 
Of course ...
 
Bootstrapping is the name of the game.
 
otherwise it would be as impossible as literally lifting yourself by your bootstraps
4
ok who starred the fact that it is late june
that doesn't seem like a poignant fact
 
It's a pain to write a compiler for a langauge in brainfuck, so write the compiler that compiles to brainfuck in a higher language, then write that compiler in its own language, which then is compiled to brainfuck.
 
I actually wrote a compiler in bf
so ya know
 
1:57 AM
I wrote a compiler in BF for Tautology.
 
Me, realizing the two messages link together to form a statement.
 
if you wanted, you could probably take my autogenerator and tweak it slightly for each of the things
@HyperNeutrino wrong
 
@HyperNeutrino That looks like an interpreter.
 
close enough :P (funny how i was being picky about that just earlier)
 
2:01 AM
 
@ZacharyT comment posted
 
@ZacharyT You shouldn't need a function since you're using input() and print(). And there has to be a better way than that dictionary...
 
Thanks, I had them as if statements before (disgusting)
 
2:34 AM
0
A: Sandbox for Proposed Challenges

Stephen SEvery Nth Char in Source Outputs N code-challenge source-layout Heavily inspired by Hello, World! (Every other character) Write a program that outputs 1. When the first, third, fifth, etc. chars are removed, it outputs 2. When all chars where their (1-based) index in the source, mod N, are not...

 
Hey, what are the kick times? As in, what are the durations of each successive kick from a SE chatroom? Or is there no set order?
 
19 messages moved to Trash
@ZacharyT 1, 5, 30 minutes. There are other repercussions though.
 
Are there times past that>
 
The third kick raises a moderator flag. Whoever handles it will decide if further action is required.
 
Okay, so no more punny (please don't kick) business. And what are those "repercussions">
 
2:40 AM
silently getting room creation banned
 
Aside from the mod flag, that.
 
I'm not sure why that needs to be by default
and why it is silent
 
I'm assuming those privileges have no decent chance of returning?
 
actually I got room creation banned, but Dennis helpfully removed the ban
 
I'm assuming that's why you were so quick to respond>
(I can't seem to type a question mark today)
 
3:09 AM
I hope you do know thta you can edit your messages...
 
It's 11:11 yay
People went a little crazy in this challenge
Also the chat room was also hyper
 
0
Q: Is multithreading in python a myth?

binu.pyI am new to multithreaded code in python. In my current knowledge i know that multiple threads can be spawned within the system concurrently but 2 different threads can not access or modify the same resource at the same time. I have even tried many things like creating many threads and putting in...

 
3:32 AM
TIL empty statement in Python is syntax error
(semicolons in succession)
 
@totallyhuman I heard (half of) my name
 
Anonymous
4:01 AM
3 messages moved to Trash
 
Does anyone know of a framework that I could use for rich text + image collaborative editing? Preferably one that doesn't require me to keep my computer open all the time.
 
4:30 AM
This is literally on the help page >.<
 
Anonymous
@HyperNeutrino What are you talking about?
 
Anonymous
Is that added by the design userscript, or did SE actually do that?
 
Anonymous
Oh dear, SE actually did that.
 
freehand cred
 
4:33 AM
I think SE actually did that
It's still there when I turn the script off :P
lol about 34% of our traffic is from being referred from SO
 
Anonymous
I posted this a few months ago. That was not the solution I was hoping for.
 
@Mego I only just realised that was there too...
 
Anonymous
That userscript that adds the tools button to the omnibar is really useful. The guy who wrote it must be really smart and successful.
 
4:39 AM
Trying to put ideas in our heads, are you? :P
 
Idea for a challenge, given a number, ecks dee-ify the string "XD" some amount of time
what I mean:
1: ecks dee
2: ee see kay es space dee ee ee
3 ee ee space es ee ee space kay ay wai space ee es space es pee ay see ee space dee ee ee space ee ee space ee ee
etc.
 
Anonymous
Idea for a challenge: something that isn't obnoxious
4
 
idea for a chat post: not starbait
 
@DestructibleLemon I can see that quickly spiraling out of control with the single y in 2, followed by the single w in 3
 
yup. it would be very long outputs
 
4:44 AM
But I don't really see a fixed point where you can just say "oh, I only need to support these letters"
Obviously you won't need q or x or z, but you will need most of the rest
 
doublew?
 
double yoo
 
double + ew
 
wouldn't f be ef?
 
4:46 AM
@DestructibleLemon That's more of what I was thinking
 
also q should be kyoo
you should be yoo
but idk, doesn't matter too much
 
So let's see... with e, these letters are self-supporting: bdflmnpstvz
And with s, c is supported
But if you require any of aghijkoqruwxy then you require a ton of other characters
 
yay I made a reference implementation
 
abcdehiloswuy- for starters, assuming - is "dash"
@HyperNeutrino what about -? :P
 
4:55 AM
you saw nothing
:P
also lol w becomes over 128KiB after 10 cycles.
 
Also z gives dash
 
@HyperNeutrino e might be the only character that doesn't
 
jee
 
yeah, e gets exponentially larger by *2 each time
 
4:58 AM
Oh gee I wouldn't have guessed using j...
 
All of -abcdehilopsuwy and space seem to fall into the fixed point of that set
Leaving fgjkmnqrtvxz as the outsiders
 
https://tio.run/##vVJBjtswDLzvK6YnJ9t6sd3eCvQlQVDQMh0plkVHlJO4n0/pON0t@oACJqihqeGQ4jgXL@ntdnOesuIHdq97POPbGz6j0pEcg68u0kAlSKoHyj1amZrI9WmSwvCkvtDBgjFSrjUcEkbOjlNZAQ0GlVILDenwfi9yV@omk@u5IIeD/0CkhXPQHmOcdCVxMgyEIaQ/AeMMYpTRyuMXZ4EkRrkIis/M6GTK6MKZreoVymdO4KUKUrBEJ1GShYewniKr1sWTJZ0miopDZjIVa@w0sX60T9bYPDQSQTMaq6VmrdnydR2O5ml2HjwzjpbTm3EEDzAR4k07o59FQBmsKAYXdF5o1tEukF2vuFCw7h7TUpOW@X1Mjbm1/3V8//x2Bgqm1Nr0nWS@55fg@v8t2005zndZjDGM/JD7d7iE2HL1omMMZbN9eupsEW3nmpZw/Y4K1ctRQtrs7ku6k9xu@u3e3jijR0i47u3OsryZLj9DGqc7yZhDKtCHr@rq@evrA3Qb3d5unmOUL7hIju2n3w
 
oh my
s/period/dot
 
sure
https://tio.run/##vVJBjtswDLzvK@aWpIWTRdrTAn1JEBS0TEeKZckR6STu51M63u4WfUABC9LQFDkczTCpz2n/eDhPRfADh9cjvuDbHl@xkoEcg@8uUk8acqp6Kh2aPNaRq8uYleFJvNLJgjFSqSScEgYujpMugHqDQqmBhHT6uBe51aou5DpWlHDyn4hEuQTpMMRRliIu9z2hD@lPoMkKidYbv7hk5MTQW4b6wow2jwVtuLK1vEP4ygk8t0AKluhyzMnCfVhOkUUq9WRJl5Gi4FSYjMISu4wsn7OTTTX1dY6gCbX1EluNrflrW5xtp8l58MQ4W05niyO4h5HI3rRhdFPOoAIWqMEZXecyi64zZNcJbhRsunepxKgV/tCotm2Zf9Hun9/OgGJMjUnvcuFnvgbX/W/abixxetJiDGHgd7p/hzXEhldbGWLQ9eblpTUXmuHqhnB/wwqr7TmHtD48HXrIpVl3m6O9cUGHkHA/2p3ZuYVuP0MaxmeRoYSkaNeyeTy86iBvu50V0K3orNDdzunEW/PVruTcy27//XWnnqvZITZdUl/Vk/Jv
 
> hashtag
it is a hash you peasant
 
5:04 AM
no 0800fc577294c34e0b28ad2839435945 is a hash
https://tio.run/##vVLRbtswDHzvV9xbkg0uiu5twL4kCAZapmPFsuiQchLv51M67tpiHzBAhHQURR5PHOfSSX6930NHaviF/csB3/DjFd@xsZECg28h0UAlSq4G0h6NTHXi6jxJYXRknXtSIq0sHjNG1sC5rIAGh0a5gcV8/HiUuC1VrRR6LtB47D4RWWGN1mNMk61JggwDYYj5r6ORAktL4T@sAsmMchWUTpnRyqRo44W95A3GF87gpQRy9MAgSbK7h7ieEptVpSMPOk@UDEdlcgqr7zyxfTZO3tU81JJAM2qvZW6N27JanHyjOXTgmXHykN6NE3iAc5DOpWH0swhIwYbicEGXJcuq6QI59IYrRW/uXSlzZsofEtW@re2v0v1zHRwUTLlx5YMoP@JLDP1/Zh0mTfODFWOMI7@z/eouMTW8ebYxxbLdPT21PoA@a3VDuP3EBpvnk8S83T@Gcy/abPvdwX9Y0SNm3A7@ZhlapevvmMfpkWTUmAvarX05L2h3v@/fAA
 
> hash
It's a pound you swine.
 
https://tio.run/##vVLRbtswDHzvVxywhyQrXAzd24B9SRAMtEzHimXRIeUk3s9ndNy1xT5ggAjpKIo8njjOpZP8er@HjtTwE/tvB3zF91c8Y2MjBQbfQqKBSpRcDaQ9GpnqxNV5ksK4dlT4wlqVjquOU6pmmaor5VIVqQK5IxZ/khJpZfGYMbIG9usHoMGhUW5gMR/fsyZuS1UrhZ4LNB67D0RWWKP1GNNka5Igw0AYYv7raKTAElmH36wCyYxyFZROmdHKpGjjhb3kDebkM3gpgRw9MEiS7O4hrqfEZt4cedB5omQ4KnvLuvrOE9uHMuRdzUMtCTSj9lrm1rgtq8XJN5pDB54ZJw/p3TiBBzgH6VwaRj@LgBRsKA4XdFmyrKIvkENvuFL05t6UMmem/C5R7dva/irdP9fBQcGUG1c@iPIjvsTQ/2fWYdI0P1gxxjjyG9vP7hJTw5sXG1Ms293TU@sT6sNYN4TbD2yweTlJzNv9Y3r3os223x38hxU9Ysbt4G@WqVa6/op5nB5JRo25oN3ap/OCdvf7l9j0fwA
 
@ATaco *Poundsign, you scoundrel
 
I like this better though
https://tio.run/##vVJbbuMwDPzvKQbYjyRbuCjavwX2JEFQ0DIdK3o5opTEvXxKx@kDe4AFTIhDUeRwzHEqQ4ov16sZKAv@Yvu8w2@8vuARKxnJMPhiPAUqNsUmUHboUm09N8eaCiPW0HJuxO6jXnhPd3/kbDiWBVBQKBQ7iI37r7ee@9K0mYzjgmz3wzciKZytOIy@ylLEpBAIwcbPQJcKxJMMeOeckCKjnBPKkJnRp5rR2xNrywuETxzBcwtEq4km@RQ1HOzieRZpykCadKzkBfvMpBSW2LGyfM9POtUU2uRBE1rtJWqd2vz1OOhBkxnAE@OgKU6NPThAOaRBpWG4KSVQBguKwhmd5iqLtDNk4wRnsjrcXSlRZpm/JGr1WMZfpPvn2igoqLFT5U3KfMsv1rj/zNrU7KcbK8ZoR76z/Rku1ne8epLR27LePDz0uoe6cm1HuPzBCqunQ7Jxvb3t6Dblbu02O/3DGQ424rLTN/PuZjq/2TjWW5Ex21jQr@WHP6PN9frLdu4D
 
5:33 AM
what why kick
 
strange, i guessed that you were kicked because i saw something that seemed to imply kick. i think it was because of hash with no context
 
How to work with numbers greater than uint_64 in C ?
 
@Mendeleev I can read MD5.
 
@Dennis oh?
 
5:36 AM
@Dennis Is there a way to freeze ice-proof a chat room ? (Also, do you know C or python ?)
 
I put it through all the unhashing tools I could find online, no result
 
@AlexKChen There is a way to unfreeze a room (mods only), but not prevent it. And I know Dennis knows Python.
 
@Mendeleev Just google it.
 
Anonymous
@AlexKChen I'm not Dennis, but a room won't be frozen if it isn't inactive. I also happen to know C and Python.
 
Why he isn't replying O_O ? You must be a sock of the menace :P
 
5:38 AM
@AlexKChen I k ow both, but I'm going to bed. Sorry.
 
@Dennis Possible to thaw the OPPCGMCS related rooms?
 
@Mego Come here
 
@Dennis ok. I thought it was obscure enough
 
MD5 is weak IIRC.
 
5:39 AM
@HyperNeutrino It is
 
I searched it and I didn't find it but I am not on google...
 
Anonymous
The kick happened, now let's all move on to more productive topics.
 
but... this is tnb... xD but yeah
 
@Mego Yeah, let's not talk about kicking. Anyone here like bans? /s
 
ಠ_ಠ
 
5:46 AM
trivia: a . is called a full stop
also, anyone who can figure out what this is gets a cookie:
 
trivia: a . is a .
 
RzTTlsSIjUoftMZUqbGpYWyUUS7p/gMWddbF56277ZkjO8Nx8BgOw2vbuyOpd8DctJRTHZUaxkQX
APsgrsc=

Key: hello
 
@Mendeleev a ciphered string?
 
post the string and you get a cookie
 
RzTTlsSIjUoftMZUqbGpYWyUUS7p/gMWddbF56277ZkjO8Nx8BgOw2vbuyOpd8DctJRTHZUaxkQX
APsgrsc=

Key: hello
done
 
5:47 AM
not what I meant
 
Anonymous
3 messages moved to Trash
 
Sorry for the ASCII art @Mego
 
Anonymous
15 messages moved to Trash
 
"ASCII"
 
5:50 AM
@Mendeleev oh haha very funny >.< XD
 
@HyperNeutrino what? I did what I said I would do
 
@Mendeleev I runned it under 64base decoder, and then tried Vignere, but it didnt' work.
 
huh?
 
gasp how were you not affected by my old account's deletion?
 
5:51 AM
@AlexKChen Not Vignere
 
Playfair ?
 
@HyperNeutrino Didn't you get it restored?
@AlexKChen No
 
Yes, but not everyone else's rep. Votes are lost.
 
Hint: It was relatively recently banned for SSL
 
But somehow you don't have the user removed mark.
 
5:51 AM
@HyperNeutrino I guess you never voted on my posts
 
@Mendeleev Then I dunno.
 
Hm. That seems unlikely but maybe.
 
Other hint: aircrack
but you have the key, so you don't need aircrack
Yet another hint: I was asking about it recently
 
but we don't know what to do with key
 
decrypt with it
 
5:54 AM
>.<
TIL you can rename self to be this in python
 
Anonymous
@HyperNeutrino Yep, the name self isn't special. Only the fact that it is the first parameter is special. You can name it whatever you want, but self is the standard.
 
yup. i realized sometime earlier today "wait self isn't a keyword so it's probably not special" lol
anyway i should go to sleep now
o/
 
Anyway, it's RC4
 
Anonymous
@Mendeleev banana
 
6:10 AM
@Mego Yay!! My implementation worked!!!!!
Yes, I'm excited
now time to rewrite it from ruby to C++
RC4 is a very simple cipher, and afaik if you send short messages, skip the initial part of the keystream, and use keys hashed with nonces, it's very secure
 
Anonymous
6:30 AM
AES isn't much more complicated, and is secure for any length of message if implemented and used correctly (i.e. not using ECB mode, and using appropriate IVs and/or nonces)
 
I decided to start with something as simple as possible while still being reasonably secure
Will probably do AES next
idea: pad the data to 512 byte blocks, use a randomized 16 byte nonce tacked onto the beginning of the output stream (when performing operation, append it to the key and use the resulting hash as a key) and also skip the first 4KB of the keystream
How much would those increase security?
Also do diffie hellman for establishing keys
@DestructibleLemon please say anyway
 
Anonymous
@DestructibleLemon Please avoid deleting your messages, especially several in a row. It disrupts the flow of conversation. Instead, please think before you hit send.
 
6:47 AM
@DestructibleLemon Please stop. It's getting disruptive, and agianst chattiquete.
 
says the ascii art person
 
are you serious @AlexKChen
ninja'd by mendeleev
 
ninja'd
owait
 
I just posted 3 ASCII arts.
 
double ninja'd?
 
6:49 AM
And you deleted >7 messages
 
@AlexKChen Three messages.
 
@Mendeleev Definately not. Atleast 4
 
@AlexKChen "Definitely"
 
Oh shit I counted it twice. Yeah, 3 message.
 
7:03 AM
Is there a specific name for a method that's part of a class, which is defined outside the class?
So something like bar() in foo.bar()
JS has the feature of allowing you to add functions to builtin classes without inheritance, which is nice, but I don't know what that's called
Is it called a "prototype function"?
 
Ah yes, Array.prototype.letsmakeanewfunc=
 
@ATaco That's a really cool feature, it's not in other languages though
What's that called?
 
I have no idea.
But lua has it too, almost.
 
Anonymous
Be Nice, people.
6
 
@Mego ??? What's the message for? What happened?
 
Anonymous
7:16 AM
@Qwerp-Derp Scroll up
 
Also @Mego do you have any idea as to what I'm referring to in my question above
 
Anonymous
@Qwerp-Derp In prototype-based languages like JS, it's called "using the language like it's intended". In other languages, it's called stuff like "mixin methods".
 
Anonymous
And in languages without dynamic dispatch, it's called "impossible" and "sorcery"
 
So to make a function like [...].average in Ruby, I have to do something like this, apparently:
module Average
  def average
    sum = self.reduce |a, b| a + b
    items = self.length

    sum / items
  end
end

class Array
  include Average
end
 
Anonymous
Oh, I remember the other thing they're called: extension methods (primarily by C#/VB)
 
7:28 AM
@Mego Adding a new method to an existing class?
 
Ruby is cool :) It seems like a better whitespace language than Python so far
 
2
Q: The best base is 10... Let's reach it!

Stewie GriffinInput: A positive integer n consisting of digits in the range 0-9. Challenge: If d is the highest digit in the integer, assume the base of the number is d+1. E.g. if the integer is 1256 then you shall assume it's in base-7, if it's 10110 then you shall assume it's base-2 (binary), and if it's ...

 
Jim
@Adám Regarding my sandboxed question, I think "letter" is less ambiguous than "character". So I would use the title "Swap letter and digit runs" instead
 
7:49 AM
@Jim Good call. where the input string ends with a sequence of lettersa run of
@Jim I'd want a walked-through example: uV5Pt3I0uV 5 Pt 3 I 05 uV 3 Pt 0 I5uV3Pt0I
 
Jim
@Adám Edited that.
@Adám Okay, I will add one
Done
 
@Jim I made every other space double, to show the groupings. Alternatively, you can use parens.
 
I have a book "Introduction to Algorithms" that's partially written by Ron Rivest. It has a detailed explanation of RSA.
I think the explanation is trustworthy ;)
 
8:08 AM
hi @LeakyNun
 
0
Q: Find the highest digit

MayubeSurprisingly we haven't had a simple "find the highest digit" challenge yet, but I think that's a little too trivial. Given input of a non-negative integer, return the highest unique (ie not repeated) digit found in the integer. If there are no unique digits, your program can do anything (undefi...

 
=begin
  Mixin function for swapping items in arrays:

     [1, 2, 3].swap 0, 2
  => [3, 2, 1]
=end
module Swap
  def swap first, second
    self[first], self[second] = self[second], self[first]
    return self
  end
end

class Array
  include Swap
end

=begin
  Generates all permutations of an array:

     permute [1, 2, 3]
  => [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]]
=end
def permute array
  if array.length == 1
    return [array]
  else
    new_arrs = []

    [*0..array.length - 1].each do |a|
I feel quite proud of myself: I made a permute function in Ruby, and it's my first day learning Ruby!
I don't think this is idiomatic Ruby code, but eh.
 
Jim
8:24 AM
@Adám I used parentheses, and it's indeed more clear
1
A: Sandbox for Proposed Challenges

JimSwap letter and digit runs Given an input string containing only alphanumeric characters and starting with a letter, swap each letter run with the digit run which follows. A run is a sequence of consecutive letters or digits. Note that in the case where the input string ends with a run of lette...

 
@Jim I like it.
 
Jim
@Adám I will wait a few hours in case someone comes up with other suggestions, and then post it
 
@Jim By "a few hours" I hope you mean at least 39 ?
 
Jim
@Dada Why 39?
 
just because in 39 hours it will have been in the sansbox for 2 days, which is, in my humble opinion, the minimum amount of time a challenge should stay in the sandbox
(plus, when there are flows in a challenge on main that hasn't been sandboxed long enough, people (including me) get annoyed)
 
Jim
8:31 AM
@Dada Okay, I will
 
@Jim I usually sandbox for at least a week. What's the hurry?
 
Jim
@Adám Not especially in a hurry, I had just no idea how long it should stay there. That's my first sandboxed challenge after all.
 
Good decision :) By the way, here is the relevant meta post
 
Jim
@Dada Thanks for the link
 
@Jim Welcome to the sandbox.
 
8:43 AM
I am about to have equal rep on both SO and PPCG
:/
With 68 posts on PPCG (both Q and A) and 138 Answers there :/
 

« first day (2342 days earlier)      last day (2493 days later) »