« first day (4310 days earlier)      last day (538 days later) » 

2:00 PM
it's roughly half the size you want though
 
that's available w/o borders on the site I linked, and is also in color so I'm not sure how to get the data out
it might be giants the thing I want but IDK how to map colors to heights
 
@Ginger you want tiles of the image on the site you linked?
 
@RadvylfPrograms no
thats one thing i hate abt python
having to import stuff before using it even fully qualified
 
@lyxal this image could be the thing I want, but I'm not sure how to get heightmap data from it
brb
 
besides, im more pushing toawrds java style domain.website.project.whatever
 
2:05 PM
@Ginger me too, but for sleep
@Seggan this is making me think of that one time I did a databases course and they said the fully qualified name of a database object is ServerName.DatabaseName.SchemaName.ObjectName
 
lol
 
One of the courses I've ever taken
 
hmmmmm
 
@Ginger have you seen this ^^
 
2:09 PM
yes, I can't use it
;-;
 
why not
 
if you can that'd be nice
@Seggan reasons
 
do you just hate java
 
take my word for it: if I could use that I would've done it by now
 
sus
 
2:10 PM
does anyone know how to read colored heightmaps?
like wtf does the color mean
 
red is highest, blue lowest
 
but the tops of some of the mountains are white???
sus
 
gray/white is even higher
 
ok but how do I turn a RGB tuple or whatever into a height value
I require algorithms
 
if you really dont wanna use jmars you can always decompile the class files and port it to python or whatever
 
2:12 PM
 
huh
 
That's the scale
 
that's useful, but also doesn't look easy to implement
 
@lyxal how come i missed that
 
It's on the reddit link
 
2:13 PM
@Seggan How would the compiler/interpreter know what libraries your code uses then?
 
brb (again)
 
That also kinda pollutes the global namespace
 
@RadvylfPrograms just... qualify it?
what im saying is why do import foo; foo.bar() when you can just do foo.bar()
 
@Ginger the different colours are already listed there. Just map colour to what number it says
 
@Seggan Because then I don't know by looking at your imports what libraries you're... importing
And also if I've got a library called crypto that I need for one function, let's call it crypto::digest, and there's a different library I need to import called tls::crypto, now there's two things named crypto in scope even though I only need one
@Seggan NOOOOOOO please no
I hate domains being part of library names
1. If you actually use them for anything, you require people to own domains to meaningfully name their projects (paywalling making a library, basically)
2. It's long and ugly and doesn't actually make anything clearer, since com.radvylfprograms.rol.string_tools is just a longer uglier string_tools, or if that's taken, something slightly more creative
3. You've now got a bunch of TLDs in scope by default, if you go with the everything-is-in-scope-already thing (no libraries named info, bank, accountants, build, link, observer, etc.)
 
2:32 PM
@RadvylfPrograms not exactly paywalling... ive been using io.github.seggan for the longest time
yall are making me rethink packages
 
And another advantage of not having domain names in libraries is that it encourages overly vague library names, just because you can (since they're not taken)
E.g., if I made a library for doing some random thing with strings, nothing stops me from just calling it com.radvylfprograms.rol.strings, instead of something more descriptive
 
hmm
 
LDQ: In a regex-like language, should duplicates in a [...] throw an error?
 
no
 
@lyxal ??? I can't automate that
 
2:37 PM
yeah you can
 
Yeah how can you not
 
you know the lower and upper bounds
then you can just take that image and interpolate
 
that scale uses brown and white and stuff
@Seggan that's janky
 
no
 
wait I am confused
 
2:38 PM
its perfectly distributed
 
It looks like it's 7 or so colors, blurred together
 
you know the values from 13 to -7
 
So if you find a color that isn't one of those 7 colors, if it's 40% of the way from red to green, you know it's 40% of the way from 4 to -2 or whatever
 
like I can use HSV to generate a hue scale but what about brown and white
 
No no don't do that, just find the RGB values of the important colors, and for any color just see which two it's in between
 
2:40 PM
._.
 
you can also take that image, since you know the colors from 13 to -7, you can find any color in between, and simply find the distance of that color in the chart between 13 and -7
 
Looks like every labeled number is directly below a simple primary-ish color, just a sec
 
but I'm worried about imprecision if I don't get the colors exactly right
 
jmars
i bet ya i could write up a script to do that in 8 mins if i knew pillow
as much as i hate python, i admit that it is useful for short scripts
 
@Ginger If you need precision, parsing the colors of a heatmap isn't how ya get there
 
2:42 PM
it's either that or I download a 4 gig TAR file of raw data
 
^^
 
which I don't want to do
 
well you got not other option
 
What is this for? How important is precision?
 
2:43 PM
oh wow
 
finally
 
> I felt a great disturbance on the network, as if millions of smartphones suddenly rang out and were suddenly silenced. I fear something terrible has happened.
 
What if there was a Programming Language Design SE
 
@RadvylfPrograms I'm trying to use these images to make a 3d model of Mars (and yes I know you can get those elsewhere I know they exist I know that, this requires me making my own), and I want images bc I can easily generate a convex surface from them
 
@RadvylfPrograms id totally go on it
 
2:45 PM
I believe that's the first graduated site to be shut down
 
A momentous day in SE history
 
@RadvylfPrograms of all my searches tho, it seems softwareengineering fulfills that role
 
@Seggan "smart"? :p
 
@cairdcoinheringaahing Fuck the current phone duopoly, both options are shit
 
@mousetail Wow, imagine slandering the nokia brick like that
 
2:46 PM
unbelievable
 
Nokia died a while ago
I saw manjaro realeased a phone, looks nice but can't use whatsapp :(
 
pi phone
 
already tried that
 
smartpayphone, any time you need to use an app you just put a quarter in and install it
 
hmm, I think I have found the original map data as an image
only problem: the image in question is 11 gigs
that is not ideal
 
2:52 PM
Thoughts on the test cases for this? codegolf.meta.stackexchange.com/a/25312/91213 I just randomly generated some data. Is that good enough?
 
You should install an M.2 SSD on your RPi
 
@RadvylfPrograms well technically I have enough space on the Pi for it
but I'm not using the Pi for this project
 
You're cheating on the pi?! :o
 
this is a website, so it'll use replit (for now)
which is why I can't use an 11 gig image
 
LDQ: How important are {z}/{x,y} quantifiers in a regex-like?
 
2:56 PM
@Ginger what are you doing
@RadvylfPrograms very
 
@Seggan SCIENCE
 
and why cant u use jmars?
 
I can't answer that question
 
@Ginger these colormaps may be interesting
 
3:14 PM
@mousetail Also should I leave the duplicate disclaimer in the actual challenge?
 
TIL that three.js has a loader for MMD (Miku Miku Dance) files
 
I should not be allowed to write parsers
 
no, that's good and normal
 
@RadvylfPrograms if you cant parse html with regex, im quite sure you cant parse regex with regex
@mousetail prob
 
Well you can't parse HTML/regex with actually regular regex, but most regex flavors aren't actually regular anymore.
 
3:19 PM
Most regex flavors can't parse HTML regardless
 
I'm like 99% sure that JS regex can parse literally anything that code could
 
The best HTML regexes I've seen struggle if you nest the same tag multiple times
 
In sufficiently complex combinations
 
I think with named capture groups and \k you can basically just write out the BNF representation of HTML in regex, right?
 
3:22 PM
BNF can't actually parse HTML either
You'd need to reverse the closing tags
 
Oh, right.
 
@mousetail wait what?
> PHP: Perplexing Hebrew Parser
 
@Seggan You can't assert opening and closing tags are the same. Though like regex there are many variants and some may allow this. BNF is basically a CFG in it's vanilla form
 
i might be confusing bnf with ebnf
 
3:48 PM
Is the sandbox posts bot not working?
 
@RadvylfPrograms ^
 
I'll check
 
0
Q: Implement Perceptron

mousetailThere was a previous perceptron question but it was closed. Also it required a lot of extra stuff that's not normally part of the perception algorithm like I know it. This question will be much simpler The Perceptron is a extremely basic classification algorithm. While it still has some limited u...

 
lol
 
I saw there was a new post on sandbox as well
 
3:55 PM
Yeah NPSP seems to have died. ^^^ only got posted because I restarted it and it looked back at old posts
 
4:18 PM
> Some programming tools NOT used by Real Programmers: ... Compilers with array bounds checking. They ... make it impossible to modify the operating system code with negative subscripts.
lmao
 
@lyxal I mean, that's not wrong
@RadvylfPrograms Lol
The most complicated regex I think I've written is not that complicated, but it was getting long enough that I decided to split it over multiple lines:
nameRgx = re.compile(r"[A-Z]+"
                     r"|[a-ik-z_]"
                     r"|\$[][()$`'0-9]"
                     r"|\$[a-z][a-z0-9_]*"
                     r"|\$_{1,3}"
                     r"|\\[a-g]")
 
4:40 PM
you dont name your name regexes rename?
 
4:56 PM
> \uhhhh, \uhhhhh
MDN seems really confused by regexes :p
Okay, so I'm not sure how to handle greedy vs. non-greedy in my regex-like
Most regex flavors seem to use ??/*?/+?/{n}? for the non-greedy variants, but I don't like how ambiguous that is
 
Most complex regex I ever wrote was some code to word wrap some text to a specific length
 
most complex regex i wrote...
idk
 
5:14 PM
me trying to look for the backspace key: op]]]]\
 
will you format properly
 
not a chance
\
`\ `
 
Wait TIL you can get a \ without any ZWSPs by doing ``\``
 
5:28 PM
@Seggan QBasic has you covered (though somewhat verbosely):
SELECT CASE x
  CASE 1, 2, 3
    ' Something
  CASE ELSE
    ' Something else
END SELECT
You can even do CASE 1 TO 3
 
@DLosc java and kotlin both have that too
in switch statements
bit i mean in ifs
 
is there a python function to output the partitions of an integer
as in the partitions of 6 are (6), (5,1), (4,2), (4,1,1) etc
 
5:43 PM
78
A: Elegant Python code for Integer Partitioning

skovorodkinA smaller and faster than Nolen's function: def partitions(n, I=1): yield (n,) for i in range(I, n//2 + 1): for p in partitions(n-i, i): yield (i,) + p Let's compare them: In [10]: %timeit -n 10 r0 = nolen(20) 1.37 s ± 28.7 ms per loop (mean ± std. dev. of 7 runs, ...

 
@Seggan thanks! Surely someone has put that into a module
 
5:59 PM
for some reason my browser doesn't like me making a plane with 33177600 vertices :p
 
@Steffan I feel a great disturbance in the force, as if millions of answers were suddenly golfed...
 
6:12 PM
presenting the surface of Mars, rendered in glorious GINGER3Dâ„¢:
I can't even tell the difference
 
That looks really cool actually
Are you doing some kind of AO pass?
 
I'm not doing anything
the only thing my code does right now is reading the heightmap and adding a light
 
AO = a lighting technique
 
@Ginger can you do something more recognisable
like olympus mons or valles marineris or whatever
 
yes, that's just a test right now
it is a single slice of a much, much larger map
I believe that it represents a 48th of Mars' surface
 
6:21 PM
so your project is just to render mars?
 
kinda
 
or are you making some game or smth
 
the final project is a secret for now
 
ah
 
but it does involve rendering Mars, yes
 
6:22 PM
are you writing this in pure opengl, or using unity or smth?
 
three.js
 
ugh, js
 
ik ik
I don't like it either but it does work
 
at least it gives me a clue :P
 
alright, having added some controls I can see that there are in fact a lot of issues
 
6:27 PM
0
A: Sandbox for Proposed Challenges

mousetailBase Neutral Numbering System code-golfprimes It frustrates me that when you say "base 16", the 16 is in base 10. We need a base neutral way of writing down numbers when favoring a specific base would be inappropriate. How it works We define f(n) to be the nth prime. So f(1)=2, f(2)=3, f(3)=5. No...

 
@emanresuA ?=
 
Oops cat
Somehow I didn't notice
 
The cat wants to subtract something from someone it seems
 
Subtract my toast from me, apparently
 
6:49 PM
@emanresuA people do that constantly tbh
 
this is pretty definitely not working
shadows hate me
every change I make to the shadow code makes it worse
^ me trying to use CSM to fix it
 
7:23 PM
are you making it spherical or a plane?
 
plane
 
how will you account for the distortion near the poles
 
¯\_(ಠ_ಠ)_/¯
I'm not even sure my map has the poles :p
 
which one u using
 
7:29 PM
im quite sure thats not a heightmap
 
me too, but it's close enough for testing :p
@Seggan if you can find an actual heightmap, please send me the link
 
@Ginger Is it though? Seems the hard shadow boundaries would look very unnatural.
 
9
Q: Are the Mars elevation data publicly available?

user3049Is it possible to get the data on Mars terrain somewhere? Something like SRTM data for Mars. Ideally in a format like this: X,Y,E where X and Y are coordinates of the region and E is the elevation (altitude) in that region.

 
it's not really
but I'm just testing the heightmap loader
 
you just have to figure out a way to crack open the data
 
7:33 PM
yea, that's the same data I found last time
 
What was wrong with it?
 
it's not an image
I need a grayscale image for my code to work
 
Then make it an image...
 
idk how
 
You are not going to find any ready made images
 
7:35 PM
>:(
fine
I will do it myself
but resentfully
 
You would want to post process it anyways even if you did find one
 
tbh that seems more useful than an image
> Most images within this data set
 
ok, I have done more looking
the files are actually images!
but in some archaic format
actually I think they're just raw data :p
 
Super easy to parse then
Gimp can open them no problem
 
@Ginger thats literally what i just said
> The map is in the form
of a binary table with one row for each 0.00781-degree latitude.
 
7:43 PM
parsing attempt #1:
...
thanks for showing me the wrong file replit
it looks trippy, but I don't think it's correct
 
LDQ: Should I have a regex \X class for the alphabet? What should it be?
Maybe \z?
Or I could not use \a for BELL
 
@Ginger Looks like interlaced TV
 
@Ginger prob because of the resolution and that fact that its a patch of a sphere
its like minecraft
 
attempt 2
something tells me that it's not correct either :p
 
which bit of mars is it
 
7:55 PM
no clue
it's the first file here
 
oh wait, I'm treating signed values as unsigned :p
hmm, pil doesn't have a decoder for 16-bit big-endian signed integer images
only unsigned
 
uh oh
 
@Seggan It looks like it's the part that someone spilled ink all over
 
I really do not want to make a decoder
 
7:59 PM
do it do it do it
 
do not want
 
don'tn't don't itn't
 
what if you load it as unsigned then convert to signed
 
that's... not how that works
 
8:05 PM
oh
thanks
 
23 hours ago, by Ginger
so if you use the backslash syntax will you credit me in the credits()?
my turn
 
lol
it doesn't seem to work tho
oop nvm
result:
I can't tell if that's correct or not
tried it with a different file, it definitely works
although, that gradient seems a bit extreme...
lemme get a higher-res image
 
@Ginger noice
 
I'm running it with a really high-res file to see if my code is broken or there's just a really sharp height change
 
0
Q: Farigiraf my Girafarig

FryAmTheEggmanA palindrome is a word that is its own reverse. I will define the left palindromic root of a word as the shortest prefix of the word for which the shortest possible palindrome that begins with that prefix is the original word. So the left palindromic root of racecar is race and the left palindrom...

 
8:15 PM
well, it just broke that time
cool
gave me a solid black output
oh wait I used the wrong file
ok, here's V2
I'm surprised imgur didn't choke on that :b
but I still don't like the fact that it's black and white
sus
 
maybe some float -> int is happening
 
probably
actually, I think that's it; I've been doing a conversion to make the images PNG and I bet that's the problem
 
It's grayscale, not black and white, despite it being almost entirely black and white. Makes me think there's some clipping.
 
more credits needed
> For each map resolution, the
data set contains images of planetary radius, topography, and the
number of MOLA shots within a grid cell (referred to as counts).
Topography is computed as the planetary radius minus the areiod
raduis. Images of the Mars areoid are provided at resolutions of 4,
16, and 32 pixels per degree. See the DS.CAT file in the CATALOG
directory for details about the areoid model used for this data set.
 
for some reason replit doesn't like me trying to download the full file
 
brb
 
8:57 PM
back
@NewPosts status
are you is have alive
hey @RadvylfPrograms would you be willing to host the converted images so future people don't have to go through all this again?
 

« first day (4310 days earlier)      last day (538 days later) »