« first day (2432 days earlier)      last day (2413 days later) » 

3:04 AM
made more concise and probably more efficient
I may have messed up tho idk
 
@ATaco Wow, that's... really long
And you know string.h has strlen so you didn't need to write your own len...
 
@ConorO'Brien I'm trying to make a map for 2d top down car-sorta-thing brawler thing
 
I'm reading the "longest joke ever" thing. I'm halfway down and suspecting this is a "better Nate then lever" pun...
 
@ConorO'Brien @ATaco tio.run/##VY/…
O(1) extra memory
O(n) run time
no builtins
 
Well I suppose that's a lot better.
Good thing C isn't my first language
 
3:13 AM
printf is a builtin
 
@ConorO'Brien ...
I'm printing a single char at a time
 
and besides you're solving a different and easier task, by not returning the string in memory
 
u want putc
 
I'm not sure if the task ever specified to return it.
 
3:14 AM
using printf to print a character is like hiring an attorney to do your math homework
5
 
lol
@ConorO'Brien i could have just malloced a string and then wrote instead of printing
 
@Maltysen no use putchar
 
@Maltysen But then you must claim O(n) memory, Mwahahaha.
 
@ConorO'Brien I mainly forgot what putc was called
 
putchar
 
3:15 AM
oh ok
 
uh how does this map look like for a vague map style idea
 
putc is a weird thingy
 
mine's O(2n) memory I think and O(n) running time?
@MDXF you use write :P
 
3:16 AM
actually is that a bad colour scheme
 
@ConorO'Brien linux kernel not a builtin
 
it's on windows too so ¯\_(ツ)_/¯
 
I'm O(2n) memory with O(4n) runtime.
So not great.
 
What's the best mainstream language for obfuscation? (I mean hand-obfuscation)
 
@Challenger5 javascript
 
3:16 AM
perl?
 
@Challenger5 ^^
 
have you seen what i have done to that poor language
 
@ConorO'Brien now that you're here, what's ur opinion on the best automatic obsfucator?
 
APL, it comes pre-obfuscated.
 
perl is sorta sane but still good for obfuscation
 
3:17 AM
JS is what I figured, but both Browser JS and Node.js have a weird I/O model
 
Lua, perhaps.
 
Lua only does that because of what I do to it.
 
@Maltysen jsfuck? I've never been a fan of automatic obfuscation, but jsfuck does a pretty good job
maybe passing the program through es5-ify then jsmin
 
@ConorO'Brien JSF can be reversed fairly easily
 
@ConorO'Brien Shame the normal obfuscator is really easy to decode.
 
3:18 AM
@ConorO'Brien but those are pretty easy to decode
 
oh I thought you were looking for appearance
 
just run the code without the ["constructor"]()()
 
> The standard model groups particles into three families, quarks, leptons, and force carriers
 
@ConorO'Brien no, I'm trying to sell a client side program, and I don't want it to be easier to reverse engineer than to write it
 
by virtue of it being automatic it should be trivial to revert the process
 
3:19 AM
Any good quiners here?
 
My physics textbook replaced neutrinos w/ quarks lol
 
@Maltysen ah but what if you layered the stuff with regular code and such
 
@MDXF o/
 
@Downgoat 😟
 
@Maltysen it's in javascript ?
 
3:19 AM
@ConorO'Brien yeah its a bookmarklet
 
@ATaco you already turned down my challenge :P
 
is anyone interested in helping my koth?
 
@ConorO'Brien it checks a file on my sever for if the user currently logged in to the relevant service has bought a license
 
@Maltysen how concerned about efficiency are you
 
@ConorO'Brien not in the slightest
 
3:21 AM
pls
 
@ConorO'Brien so far ive been using javascriptobfuscator.herokuapp.com
 
@Maltysen Maybe compile to ASM.js and distribute that? I don't know if there are any JS->ASM.js compilers right now...
 
@Challenger5 wasm :P
 
@Maltysen I can try to de-obfuscate it to test its resilience. write some JS code and I'll try reversing it
 
@Maltysen You could use a compiled language.
 
3:22 AM
@Pavel it's for a JS bookmarklet
 
So you're selling a bookmarklet?
 
@ConorO'Brien this is the code I have right now, the license access controls should be pretty obvious in the decompiled code see if you can get to those: rawgit.com/alanwang225/9f56aa90e4ed8e66b4e277e7455b5b03/raw/…
(btw my name is not alan wang, that's a fake account)
@Challenger5 most of the spanish classes in my school make students do hw on conjuguemos.com, I wrote an automatic scripter for it
I want to sell it for $5/month
 
@Maltysen it's pretty decent obfuscation. how tech-savvy are your peers?
 
Why not distribute it free, but charge to make an account?
The only disadvantage is that you have to set up a server
 
@Challenger5 that's what I'm doing
I have a list of valid licences on a github gist
 
3:26 AM
Then why do you need obfuscation?
 
to stop people from removing the license check
the actual software is all client side
@ConorO'Brien not that tech-savvy, but it only takes 1 guy to decode it and start selling for $3/month
 
^ That's what I was going to say
 
@ConorO'Brien but the actual code wasn't that hard to write, the hw website does everything clientside, so it just ned to be harder than doing it urself not impossible
 
Random stupid idea: Electron-based web browser
 
@Maltysen it seems to be using cookies, any chance of those being tampered with ? or is it irrelevant
 
3:29 AM
tbh I don't really trust obfuscation. Why can't you set up a server for it?
 
@ConorO'Brien one of those is a dead code thing that the obsfucator inserted, the other one is real and might be tampered wiht, but its hard
 
Also, what exactly does the product do?
 
...
awesome
I think I found the dead code then
 
6 mins ago, by Maltysen
@Challenger5 most of the spanish classes in my school make students do hw on https://conjuguemos.com, I wrote an automatic scripter for it
 
Does it just conjugate verbs?
 
3:31 AM
@ConorO'Brien if its taking u this long its prolly fine lol
the actual code would've taken u like 3 min to write
@Challenger5 it tests students on vocab, and yes conjugating verbs
 
@Maltysen Some general advice, I'd suggest removing the naked variable names/strings, such as 'updateCookie' and 'removeCookie' (e.g.), maybe using a seeded random function. try removing all strings too, that'd be nice
 
@ConorO'Brien again, those aren't mine
but some less suggestive dead code might be nice
 
@Maltysen yeah, e.g. idk if there are any such vital strings, but if there are
yeah
 
@Maltysen If your script just conjugates verbs, then you have WordReference as a free alternative.
(Assuming it's just Spanish)
 
@Challenger5 mine works on that specific site, doing all automatically, faking the time to wahtever the teacher asked, and then submitting
 
3:34 AM
Ahh. I assume this is allowed or that you have a good way to cover your tracks?
 
@Challenger5 that's why its all client side
so it can't be diffrentiated from manually typing the answers
 
hey I have a great idea
 
yeah?
 
I wrote a mini code obfuscater a while back, I wonder if it could be of use
lemme find it
 
@Maltysen What about the faculty? Will they care?
 
3:40 AM
Anyone interested in contact?
 
mayyybe
 
@Maltysen can you use ES6?
 
@ConorO'Brien yeah
@Challenger5 definitely
 
I won't be selling it to them
 
3:43 AM
But will they notice the students using it?
 
well the whole point is that it looks indistinguishable from normal use
but I'm also trying to see if I can get someone else to sell it for half the money, kinda like how drug dealers do it
 
@Maltysen Wow, it makes the keyboards produce sounds? Impressive
 
@Challenger5 no, this is just hw
 
If I have a language that technically cannot do integer input, can I say that it takes input in raw bytes?
 
@Challenger5 but it does mess with a lot of the timestamps
 
3:45 AM
@MDXF I think input via byte value is a consensus. I don't know about a base-255 number or something like that
 
You know this is a Bad Idea™ no matter how dumb the teaching software is right
 
@Challenger5 Thanks, do you have a link?
 
@quartata yeah... I'm gonna prolly get someone else to sell it and take the potential blame in return for half the monry
 
Like, I don't mean morally or anything but there's a 60% chance someone will snitch and you'll get busted
 
@quartata ^^
 
3:48 AM
literally setting up a prisoner's dilemma
 
@quartata the other option is to abandon all the potential customers who would pay via cash, and sell it anonymously online via paypal/chrome web store
the problem with that is that the cash-only customers likely make up most of my market
cuz they're students
 
in exchange for $2.50 * ~20 students if you're lucky * liek 6 months
 
@Maltysen What about KeyboardEvent.isTrusted?
 
@Challenger5 hmm?
 
I can think of much better ways to make $300
and that's on the high end
 
3:50 AM
0
A: Sandbox for Proposed Challenges

Funky Computer ManProve (-a) × (-a) = a × a We all know that (-a) × (-a) = a × a (hopefully), but can you prove it? Your task is to prove this fact using the ring axioms. To avoid ambiguity here are the ring axioms where + and × are closed binary operations on some set S of which a, b and c are members: a + (...

 
don't get kicked out for a pittance
 
@NewSandboxedPosts Thanks bot! I forgot you existed
 
@quartata i didn't realize it was so little money
the other software, the math one would be the big bucks
but its harder
like prolly at least a 100 students
 
@Maltysen I don't know if many sites actually do this, but you can tell whether a keypress was triggered by a real press or a dispatchEvent
 
@Challenger5 oh. Well they don't do that
 
3:53 AM
12
Q: Can numeric input/output be in the form of byte values?

Martin EnderThis answer just prompted a question, which I've wondered about a few times when answering challenges in esoteric languages: For some esoteric languages, the only means of input/output is reading and writing individual bytes from STDIN to STDOUT, and interesting golfing of numeric challenges is ...

@Maltysen Or they just silently log it... :o
That's what I would do if I were to make that site
 
@Challenger5 Thanks!
 
@Challenger5 :O nah, I looked through their entire codebase, and their ajax stuff only logs relevant information
unless they did very sneaky stuff
but I doubt it, this is v2, and v1 was really, really bad
 
@Maltysen 20 students is only if you're really lucky too. You'd probably get like 8-10, and for that you could just set up 20 or so TF2 accounts with Xvfb and idle for the semester
 
@Maltysen encoder: (ob = code => btoa(code).match(/.{1,26}/g).map(([...e])=>btoa(e.reverse().join``)).join``)
 
@quartata I'm in high school so its more like 10 months, and all the spanish classes use it
 
3:56 AM
Or mine dogecoins
 
(function(c,d=atob?!atob?eval:atob:atob){
   return d(c.split(d("PdfaVeqwepzxqF".match(/(.)([^pA-Z]*)/g).map(e=>e[0]).join``)).map(d).map((p=x=>y=>z=>y[x].bind([...z])().join``)(d([...String.fromCharCode(parseInt(Object.keys({a2r:0.8136840109526391}),36))+String.fromCharCode(parseInt(Object.keys({a31:0.9579485575062191}),36))+String.fromCharCode(parseInt(Object.keys({a2e:0.2732767718138681}),36))+String.fromCharCode(parseInt(Object.keys({a1e:0.004933572364449024}),36))+String.fromCharCode(parseInt(Object.keys({a2i:0.9525483034028872}),36))+String.fromCharCode(parseInt(Object.keys({a2g:0.125
decoder
 
@quartata so like 600 students taking spanish, @5% is like 30
 
The system my school uses for online textbooks allows you to change your password without supplying the old one ._.
 
@Maltysen they're only going to use it until they can get through the class without
too expensive otherwise
 
@quartata how hard is that
i've been considering mining cryptocurrency on school hardware
 
3:58 AM
these are deadbeat kids the most fickle market
 
like how many $/flops
@quartata true
 
@Maltysen there is a calculator somewhere one sec
 
@Maltysen I have a friend who tried. Earned a cool seventeen cents in a month.
 
@Pavel :(
 
Turns out schools buy the cheapest computers possible, and those generally don't have GPUs.
 
4:01 AM
@Pavel oooh, i think my school has gpus on the newer ones
 
@quartata what's a realisitc hashrate for a i7 cpu?
 
my friend has a job and earns a cool 13 dollars an hour :P
 
@Maltysen Nvidia or AMD? AMD could be totally doable, nvidia might make you a few dollars. More than off a CPU, but nothing impressive.
 
@Challenger5 Just making sure - this is valid then, correct?
 
4:03 AM
@Pavel no clue will have to check
 
@ConorO'Brien I'm assuming Malty doesn't want to work
 
ik it was a joke
 
Just trying to redirect that combination of laziness and rebelliousness towards something that won't for sure get them kicked out
@Maltysen there's a list somewhere one sec
 
you could auction off the school hardware :P
 
@quartata Other examples of this behaviour include installing linux on school-issued laptops and stealing a teacher's mouse
 
4:06 AM
@ConorO'Brien rofl
 
@ConorO'Brien I had a friend get arrested for that back in the day lol
 
(back in the day? o.O mdxf old man confirmed?)
 
@MDXF Think so
 
@ConorO'Brien actually, we took some of the old equipment that the school was gonna throw out after the engineering teacher got fired (ocilloscopes, etc.). We're planning on selling it on ebay, but haven't got around to it yet
 
@ConorO'Brien Back when it was daytime, about 4 hours ago :P
3
 
4:07 AM
@ConorO'Brien define "old" :P
 
@Challenger5 LOL
 
This is for Bitcoin, Dogecoins are a bit easier I think
 
@quartata wow so basically nothing k
i'll need the gpus
the other idea was renting out the hardrives with storj.io
 
That would probably make more money
Although I was serious about TF2
 
4:10 AM
is that like a bot that levels up accounts for TF2?
 
8-20 drops per week (max drop time is 10 hours so you can power instances off and do something else after), most will be worth one cent but hat drops will be about 10 cents
@Maltysen nah idling
Although to get hats you'd have to buy a giftapult which is 7 cents
You'd have to crunch the probabilities
 
you could set up a trade bot if you wanted, grinding scrap profits
 
buy hats for X, sell them for X + scrap
 
@ConorO'Brien sounds like Effort
At any rate we all know that my patented trading card trick is the best for that
1 scrap -> 1 card -> 4-8 cents on the community market, ez 600% profit not counting what you lose in exchange (keys cost $2.45 -> PayPal buyers usually only go for like $2.30)
 
4:15 AM
no one sells card for scraps, at least not htat I've seen
 
they did 2 years ago
No one wanted trading cards in their backpack
 
not anymore, it's really more effective to scrap bank at this point
 
? Scrap.tf gives like nothing for cards
You could easily offer 1.5 to get an advantage
 
huh
til
 
CMC: Given an undirected graph and a node, return all nodes reachable from that node
In other words, given a set of variables, a set of equalities between variables, and a single variable, return all nodes transitively equal to that variable
 
4:26 AM
@Maltysen looks like I was wrong on the item drops, it's more like 8-12
 
40
Q: Theoretically output Graham's number

Leaky NunGraham's number G is defined in this way: u(3,n,1) = 3^n u(3,1,m) = 3 u(3,n,m) = u(3,u(3,n-1,m),m-1) [Knuth's up-arrow notation] [Conway chained arrow notation] THEN g1 = u(3,3,4) g2 = u(3,3,g1) g3 = u(3,3,g2) ... G = u(3,3,g63) You are given that u(3,3,2)=7625597484987 to check your code. ...

 
Who was the OP of this before they got deleted?
 
Anonymous
@MDXF No way for us non-mods to know
 
@Mego Yeah I'm wondering if anyone remembers because they were deleted less than two days ago
 
5:01 AM
RProgN2 takes 5 Seconds to calculate 10^3. Yay, BigDecimal...
 
5:22 AM
0
Q: Casciitum Scribe

Jonathan FrechIntroduction Cacti come in various different sizes, shapes and colors. However, the most iconic cactus and must-have in every Western has to be the saguaro. Important features are its size and arms, which have defined the stereotypical cactus appearence. Your task is to bring the saguaro in t...

 
5:33 AM
@ATaco wow...
 
I'm sure it's a bug, I'll need to look into it.
 
 
1 hour later…
6:43 AM
@MDXF I kinda remember? It was someone's real name IIRC
 
 
1 hour later…
8:10 AM
@NewMainPosts aw I'm stuck in school for a couple of hours, SOGL answer will take a while to show up :/
 
8:28 AM
0
Q: apply function in Pandas

Fadai MammadovImplement a function which given X returns a new copy Y that has a column named 'prevalence' holding the correctly computed prevalence values. Although there is an easy solution, you should apply "apply" function. (prevalence = cases/population) I do something like that which doesn't work. Y = ...

 
how about this for a challenge? Given a movie rating (G, PG etc.) and a percentage threshold, return a movie with that rating and at least that score from rottentomatoes
 
8:49 AM
0
Q: Find a movie challenge

LembikThis is a simple(ish) web scraping challenge. Input Your code should take an MPAA film rating and a number from 0 to 100 as input. It can do this in any way you find convenient. Output Your code should return the name of any movie with that film rating and at least the numerical score on the ...

 
9:06 AM
the quietest it has ever been here at this time?
 

 The Nineteenth Byte

The Nineteenth Byte: General discussion for codegolf.stackexc...
Nope
 
oh well :)
I posted a possibly controversial challenge and no one has insulted it or upvoted :)
which is rare
 
@NewMainPosts Hmm actually this could probably be a
 
9:31 AM
32 views and no comments and no up/down votes!
it's a first for me :)
 
9:47 AM
@ASCII-only but how?
 
@EriktheOutgolfer Hardcoding the golfiest titles for each combination of rating and score, but I guess that would change over time
I guess a 500 string kolcom is impractical though
 
yeah
also you shouldn't hardcode stuff if it's not so it would change the entire question and applicable policies, not just spec if you do that
and btw hardcoding would still make awfully long code unless you have some really weird builtin
 
10:16 AM
hi @orlp
 
@Lembik hi
 
I didn't know rottentomatoes was so changeable
 
it only needs to change by 1 point to invalidate answers
 
you mean the score only has to change by 1 point?
 
10:23 AM
and it gives newer answers advantages
because they can choose from more films
@Lembik yes
 
ah!
I didn't understand your complaint
 
> Say the input is "PG, 98" then your code could output "Zootropolis".
and now zootropolis gets a negative review
it drops to 97
and your answer is invalid
 
hmm.. so I could change it to theguardian.com/uk/film and the number of stars
those don't change
although new movies are added of course
 
I think the concept is kind of flawed
 
but I don't really see a problem with new movies being added
why is that?
 
10:25 AM
unless you extract a list of movies from one of those sites
and include it in your question
so the question doesn't change
 
but the whole point is to code up the extraction
why does it matter if new movies are added?
the point is to write code to do the extraction
 
ohh
I thought it was kolmogorov complexity
I didn't see internet haha
@Lembik maybe you should add to your question more explicitly that the program is allowed to get the scores from the website
 
aha ! I will do that now :)
 
then I'll remove my downvote
 
thanks!
 
10:31 AM
@Lembik "NR" is also a rating found on rotten tomatoes
 
oh!
let me see
thanks
I really wanted to ask for a random movie but I worried that would be too hard
although more fun
 
@orlp thanks! Should I add that to the question?
 
no :)
 
ok :)
 
10:43 AM
the whole point of web scraping challenges is to figure that stuff out
 
yes !
do we have a web scraping tag?
I didn't find it
 
@Lembik don't know
 
if anyone likes my question I will suggest it on meta
 
@Lembik arr
 
?
pirate or sympathy? :)
 
10:48 AM
@Lembik pirate
 
:)
 
you edited my you sneaker
it was me first
 
yes!
 
@Maltysen You can write it in any language -- I just was trying it in python to learn it better. He was disappointed since almost everyone used python despite listing that they know C/C++ NOBODY used those even though that will be the language they use if they get a job --
@anyone what is with that formatting?
 
11:21 AM
@Christopher2EZ4RTZ What why that is terrible
 
OKAY! Time to lift our #startup. Everyone visit http://localhost:8080 and share :)
 
> Firefox can’t establish a connection to the server at localhost:8080.
 
@JohnDvorak Did you really fall for that?
 
There's no security risk in showing your browser's "the server doesn't exist" error message
define "fall for that"
 
@JohnDvorak I mean, did you actually click the link?
 
11:30 AM
Yes. Why not?
 
@JohnDvorak Didn't you know what would happen?
 
OK, I misread. I read it as "time to lift your startup"
as in, "everyone, dump the state of your private projects as they exist NOW".
@Adám yes. I'd decline if there was anything actually running there...
 
@flawr This must be phase's twitter account
 
Appropriate name for APL's system variable which contains list of command line arguments? ⎕ARGV ⎕ARGS?
 
Should the box in front of the ARGV actually be a box?
I'd go with ARGS (just because some other languages I know also use it)
 
11:44 AM
2 days ago, by Pavel
@FunkyComputerMan ⎕ actually is a box
 
Doesn't make much sense to use ARGV in an APL naming context I guess
 
But don't all other languages use ARGV?
 
@Adám well you can never be sure:)
 
Yeah but the V means "vector". I don't see why indicating this would be useful in APL
 
Because tradition
 
11:46 AM
@Fatalize It would be exactly that, a vector of strings (well, text vectors)
 
so would args be
 
In java I think args is usually used (you can actually name it whatever you want), Matlab uses argin, python uses sys.argv.
Why not ARX (one byte shorter):D
 
Why not both
 
Why not Zoidberg?
 
J uses ARGV.
 
11:48 AM
Takes a screenshot of Adám praising J's notations
 
Ruby uses ARGV
It's not even a global variable, it's a constant.
 
@Fatalize I admire J for its relative purity and consistency compared to APL, it just doesn't have APL's beautiful symbols or easy-to-use built-in utils.
 
@Adám I'd say ARGS because it reads better IMO
 
You don't have to buy a specialized keyboard to write J
 
@JohnDvorak Nor do you have to for APL
 
11:50 AM
@Adám Which is my argument. Why use ARGV in APL when it's less "beautiful" than ARGS, just for the sake of inter-language consistency?
 
Yeah, you can use a cheat sheet and memorize
 
@JohnDvorak ARGC = argument count
 
(Zoidberg will lead)
 
@JohnDvorak Or use the onscreen language bar, or use ride and enter ``name_of_function_or_glyph But memorizing them is really easy. I bet I could teach you 90% in an hour.
@Fatalize Because the main point of making proper support for scripting (what I'm working on right now) is to make APL more accessible and familiar to the world "out there".
 
12:09 PM
wtf I almost capped SO already
 
12:21 PM
I read crapped the first few times I read your message.
 
lol
> first few
 
12:53 PM
wait I didn't cap SO because accepts don't count towards caps
 
@Adám speaking of accessibility, is there an APL equivalent to Learn X in Y Minutes or Rust by Example? I'd like to get into APL, but the Dyalog guide seems a little long-winded
 
wtf I've had 5 answers accepted today I don't recall that many...
*8
 
@NickClifford I'll be happy to help. Head over to the APL chat room and have a look at the starred messages there. Should be plenty of material to get you started if you don't want a live session with me.
 
@Adám thanks for offering! a little busy at the moment, so I probably won't have time for a live session, but I'll make sure to check out the APL chat!
 

« first day (2432 days earlier)      last day (2413 days later) »