« first day (4416 days earlier)      last day (725 days later) » 
00:00 - 21:0021:00 - 00:00

00:06
@DLosc I read this without the first "leave"
Definitely communicates a very different message lol
@Bbrk24 I just opened Notepad to check this:
wtf did they do to it
My notepad doesn't look like that
Only latest Win11.
Are you on Win-- ah yep that makes sense
I'm still on Windows 10
*screams in Win11*
00:12
I have a couple games on my computer that are Windows-only, otherwise I'd have switched to Linux by now
LINUX FOREVER
I quite like Fedora
@Bbrk24 Have you tried Proton? I haven't found a game it wont run yet
No, but I don't want to switch and then find out it doesn't work. I have an Ubuntu VM set up but I haven't allocated it enough resources for gaming
@RydwolfPrograms vim user meme gif when
Actually I might switch to Mac instead of Linux. It's weird to say this but I miss Xcode already
00:20
Feb 13 at 18:45, by Rydwolf Programs
user image
Swift really isn't that bad of a language and Xcode is far easier to set up than trying to install Swift directly
@ATaco Fedora gang lessgo
I use Fedora Server, plan to try out the desktop version once I have an excuse to use desktop Linux
Swift is only officially supported on macOS, Ubuntu, CentOS, Amazon Linux, and technically Windows. But speaking from experience it's painful to try to use Swift on Windows and I never want to try it again
Swift more like Slow
@Bbrk24 I set up my PC to dualboot
Allocated ~100GB to the OS for Fedora, and the rest of my system is allocated for windows file systems.
00:26
That's reasonable actually. The family computer I used as a kid was dual boot Windows XP and "Linux" (though I don't remember which flavor or version)
It also had an NES emulator so I played games you might expect for someone much older than me, like Final Fantasy, Metroid, and Super Mario 3
You'd be surprised how common that is
0
Q: Tips for golfing in SVG

Jakob LovernSVG is an XML vector graphics markup language embeddable in web content. Your tips should be at least somewhat specific to SVG. Please post one tip per answer.

Idea for a golflang: use a custom codepage and map each character to a mathematica builtin
@ATaco codegolf.meta.stackexchange.com/a/25625/110698 test cases provided, does this look good to post?
@Bbrk24 that's called Sledgehammer
00:39
Huh, sure is
00:55
So I think technically Trilangle could be v1.0 now, if I wanted it to. But the brackets []{} are completely unused and currently invalid instructions, and I'm trying to think of what they might do
Maybe [] could be portals -- if the IP hits ] and there's only one [, it jumps there, and vice-versa
01:09
@RydwolfPrograms depends on how much of the CRT you managed to pull in; if you used printf it would be bigger than if you used write for instance. I had some toy 16-bit Windows programs whose biggest component was the icon.
@ParclyTaxel Looks solid, Though I suggest you let it stew for a day
@Bbrk24 {} as diodes? If IP enters one way, it bounces, otherwise it continues?
@Adám left one was the old pfp? I think I like the blue background more :-(
@Neil No, those are the same pic.
Old one ↑
@ATaco That actually makes a lot of sense
Though I suppose that'd make it almost identical to something that just sets the Direction
01:23
I still like the blue background more
meh, it could set east/west direction but leave north/south direction alone. So something that enters it northeast and northwest both leave northwest, for example
@Neil Me too, but the new blue is fake. I don't like fake things.
new glasses are very slightly nicer, I think
I.e. for the old photo, I actually stood in front of that cloudy blue screen, whereas the new one was taken in front of a flat white screen.
@Neil Less bent out of shape, at least ∘.○
ah that could explain it
 
2 hours later…
03:31
The jelly dictionary contains Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch for some ungodly reason.
Imagine containing Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch in your long dictionary
@ATaco well dont u use that word in everyday conversations like a normal person? its obviously quite the common word if i do say so myself :P
@ATaco just another reason Vyxal's SSS dictionaries are better
in all seriousness tho wtf is that monstrosity of a word...
A town in Wales
IIRC
03:34
Llanfairpwllgwyngyll, or Llanfair Pwllgwyngyll (Welsh: [ɬanˌvair puɬˈɡwɨ̞nɡɨ̞ɬ]), is a large village and local government community on the island of Anglesey, Wales, on the Menai Strait next to the Britannia Bridge and across the strait from Bangor. Both shortened (Llanfairpwll or Llanfair PG) and lengthened (Llanfair­pwllgwyngyll­gogery­chwyrn­drobwll­llan­tysilio­gogo­goch) forms of the placename are used in various contexts (with the longer form pronounced [ˌɬanvair pʊɬˌɡwɨ̞ŋɡɨ̞ɬ ɡɔˌɡɛrə ˌχwərn ˌdrɔbʊɬ ˌɬan təˌsɪljɔ ˌɡɔɡɔ ˈɡoːχ] (listen)). At the 2011 Census, the population was 3,107, of whom...
literally has 4 l's in a row damn, uk shit is getting real when 4 of any letter is repeated in a word...
03:48
@AidenChow to be fair ll in welsh is basically just one letter
Someday I'm gonna accidentally move spam to the RPi room
what is rpi lmao
They really need to make the list of rooms not update when you hover it lol
The raspberry pi room
do you know what they call щи in german
03:49
It's called "The Bakery"
or rather, how it's spelled
@UnrelatedString "Russische Buchstaben"?
@UnrelatedString I don’t even know what it’s called in English
@UnrelatedString what am i looking at...
03:50
@UnrelatedString That's worse than English lol
I guess I know where we got it from
is_zero = lambda x: abs(x) < 1e-10
Goddamm floating point
The terrible phonotactics don't fall far from the tree
@cairdcoinheringaahing epsilons be like that sometimes
Does python not have an Epsilon constant?
It does
But it's like 1e-9 iirc
03:52
You'd think that a maths course that teaches programming would use some language with a rational type
Given that all the numbers involved are integers, or integers dividing integers, aka rationals
that's making many charitable assumptions about math and cs educators
@cairdcoinheringaahing Well you see, python does have a rational type. Decimal
Apparently it’s sys.float_info.epsilon
@ATaco yeah that's the one
@lyxal Well you see, that involves imports
03:53
Then good luck finding a beginner friendly language that supports rarionals built in that is also a prac-lang
Fixed point is immune to floating point errors
And I'm not even joking when I say that my coding hws are preceded by a giant block of code with a bunch of statements like this at the start:
try: del modules['numpy'].random.permuted
except: pass
@lyxal C#
@lyxal Lemme do my homework in M, or my Jelly fork goddammit
decimal n = 3m
The m stands for mdecimal
03:55
@ATaco maybe for a programming degree, probably not for a math degree
"Write a program to calculate the inverse of an integer matrix". Here you go: æ*-
@lyxal Wait wait wait please tell me Decimal is a decimal type not an actual rational type
@RydwolfPrograms No, Decimal is for rationals
@lyxal math scares and confuses me
You can get decimals, but it also handles exact rationals
@ATaco Math scares and confuses us all, just some people need to learn more than others to reach the fear and confusion
@RydwolfPrograms in this case it's a faithful rendering of the old /ʃtʃ/ cluster (still standard in ukrainian)... but it's a faithful rendering that's stuck spelling the /ʃ/ as sch without any other dedicated multigraph for /tʃ/
Numbers are kinda cursed ngl
@cairdcoinheringaahing good luck teaching that to everyone. If only there were a golflang that didn't require understanding tacit and supported rationals by default
If my degree taught people Vyxal, then at that point, I'd already have learnt it :P
03:57
Lyxal you should get into academia and teach people Vyxal
Maybe it'll catch on among academics like Haskell and trickle down to the normals
imagine teaching code golf in an academic setting lmao
@cairdcoinheringaahing only one person out of the cohort though
Course ID 6901: Fundamentals of Computer Code Golf
@lyxal The way some of the people on my course treat Python, one person already knowing it might be above average
@cairdcoinheringaahing what awful programming practices are they teaching y'all anyway?
04:11
@lyxal python has Fractions
04:27
@cairdcoinheringaahing import decimal;third = decimal.Decimal(1)/decimal.Decimal(3);print(third*3) => 0.999...
as pygamer points out, you probably want fractions
 
2 hours later…
06:54
0
Q: Shortest Code to Reverse a String in Place

Aitzaz ImtiazYour task is to write the shortest possible code in any language to reverse a string in place without using any additional memory than for basic operation. Write a program that takes a string as input and modifies it in place by reversing the string without using any additional memory. That is, y...

I’m voting to close this question because because the requirement to not allocate memory for additional copies of the input string is objectively unobservable - does creating memory for every character of the input but the last count as making memory for the input string? Does making memory for individual characters count as making memory for the input string? And what about languages where you can't directly inspect memory (like interpreted languages)? — lyxal 34 secs ago
Do y'all agree with that or have I missed something that makes it observable?
/srs question because there might be some way of telling I don't know about
07:10
@lyxal ok well they literally edited that out, now its just a reverse a string challenge...
Reverse string in place
Which is still unobservable
lol true
its probably a dupe of some other existing challenge anyways (unless we dont have a reverse a string challenge?)
07:26
@lyxal It's observable, since we allow and this is effectively that. No using extra memory proportional to the size of the string
I'm still concerend about duplicate status.
@mousetail and theres too
a.reverse() solves it.
No answers on either question would be valid on the other so I think it's not duplicate
It's impossible to read a string from stdin in place
That's true, I can't deny that
Though the restriction is very hard to enforce for many languages.
07:31
^ is the problem
You can test it by passing in a really long string and proving it takes less than 2*n memory at it's peak
Funky3 is a compiled language, though it can't work with strings at any level without making a bunch of accidental copies. Is it forbidden from competing?
Yes, I don't think it's a problem if a language can't compete because it can't meet the requirements
Brainfuck needs to make at least 1 copy to take input
Brainfuck doesn't have functions so wouldn't be able to compete anyways
07:33
The only competing languages would be a handful of memory-careful languages.
Rust, C, is about it.
(ASM, obv)
I really don't see that as a problem
Though I think you could do it in languages like python and javascript too with bytearrays and buffers respectiveely
Definitely no way to prove in either python nor javascript objectively that no extra copies were allocated
You can inspect the memory layout
Any debugger can do that
And more simply you can check how much memory usage changes compared to the size of the input string like
A probably interesting challenge: given a UTF8-encoded string as a byte sequence, reverse its characters and output the resulting byte sequence.
Does it need to support emoji?
07:37
@Bubbler errr can u explain whats difficult about it for someone like me who dont know much about how utf 8 work
Yes in terms of codepoint range, but let's define a "character" as a single codepoint
im thinking just reverse the list... im assuming its obviously not that simple
Characters in utf-8 have different lengths
one codepoint is encoded to 1, 2, 3, or 4 bytes as utf8
and the main challenge is to keep the bytes position within each region that encodes a single codepoint
In most languages this challenge would be about detecting utf-16 surrogate pairs and reversing them
Then doing the rest in utf-16 with native functions
07:40
da hell is utf 16
@mousetail actually it will be more complex in languages with utf-16 strings instead of utf-8
That's most languages unfortunatly
true that lol
432
Q: Should UTF-16 be considered harmful?

ArtyomI'm going to ask what is probably quite a controversial question: "Should one of the most popular encodings, UTF-16, be considered harmful?" Why do I ask this question? How many programmers are aware of the fact that UTF-16 is actually a variable length encoding? By this I mean that there are c...

@AidenChow another encoding for unicode, which uses 2 bytes per char, except for codepoints 65536 and above which uses 2x2 bytes
07:44
The issue with utf-16 is you can "almost" assume a constant width per character so most software does even though it's not actually always true leading to a lot of "fun"
hell, even language server protocol has utf-16 as the column offset standard
0
Q: Voronoi-Lloyd ASCII art

lesobrodVoronoi diagram is a partition of a plane (or part of plane) into regions close to each of a given set of objects ("seeds"). Here we’ll be dealing with discrete arrays or even rather with ASCII-art: Since it is not difficult to draw a discrete Voronoi diagram, we will go a little further and con...

08:03
Jalapeño uses a modified UTF8 to encode its strings, despite being written in C# which has UTF-16 strings
(Although the source file is a charset-less binary, or UTF-8 string, depending on flags)
08:31
@ParclyTaxel i just golf my number to binary piet answer by another 2 bytes and also fix the leading 0 problem for 0 and 1 input that u mentioned :D
ok well wait i couldve trivially saved 2 bytes on my previous 44 byte program, so really i just fix the leading 0 problem with no byte save lol
@Bubbler ik u hella good at piet, u should try doing the number to binary challenge in piet. u could probably easily beat my score tbh lol
i want to do another challenge in piet... maybe fizzbuzz but that sounds like a pain to plan out, and if there are any bug it would be a hassle to even find it...
08:47
@Bubbler please try and improve on my factorial Piet answer for the vanilla factorial challenge too
@AitzazImtiaz Love the detailed biography in your profile
09:01
@ParclyTaxel can u send a link to that again?
09:38
3
A: The vanilla factorial challenge

Parcly TaxelPiet + ascii-piet, 34 bytes (2×17=34 codels) tlqrjccskfeurmuuI ???c?viqdltt ii Try Piet online!

@AidenChow ^
@mousetail thanks so much :) I really fancy her a lot after diagnosed to hallucinations
btw guys I have a problem here, if someone sees this code:
import cv2

def cartoonize_video():
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
if not ret:
break

# Apply bilateral filter to reduce noise while preserving edges
filtered = cv2.bilateralFilter(frame, 9, 250, 250)

# Apply color quantization to reduce the number of colors
# in the image, giving it a cartoonish appearance
quantized = cv2.cvtColor(filtered, cv2.COLOR_BGR2RGB)
quantized = cv2.resize(quantized, (32, 32), interpolation = cv2.INTER_AREA)
quantized = cv2.resize(quantized, frame.shape[:2][::-1], interpolation = cv2.INTER_NEAREST)
How can I full screen, flip the image in this opencv function?
it seems indentation does not works :|
09:59
You need to indent every line with 4 spaces
there is a button for it
Markdown in chat is literally hell
import cv2

# Open the video capture device (usually the default camera)
cap = cv2.VideoCapture(0)

# Set the display to full screen
cv2.namedWindow("Flipped and Tooned", cv2.WINDOW_NORMAL)
cv2.setWindowProperty("Flipped and Tooned", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)

# Loop through each frame in the video stream
while True:
# Capture a frame from the video stream
ret, frame = cap.read()

# Flip the frame horizontally
flipped_frame = cv2.flip(frame, 1)

# Apply the cartoon filter
gray_frame = cv2.cvtColor(flipped_frame, cv2.COLOR_BGR2GRAY)
I copy pasted to check it
like it stops indentation while copy pasting
You need to indent every line with 4 spaces
Even blank lines
The "fixed font" button does it for you
import cv2

# Open the video capture device (usually the default camera)
cap = cv2.VideoCapture(0)

# Set the display to full screen
cv2.namedWindow("Flipped and Tooned", cv2.WINDOW_NORMAL)
cv2.setWindowProperty("Flipped and Tooned", cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)

# Loop through each frame in the video stream
while True:
    # Capture a frame from the video stream
    ret, frame = cap.read()

    # Flip the frame horizontally
    flipped_frame = cv2.flip(frame, 1)

    # Apply the cartoon filter
oh, it works
fr, I am so bad at opencv
 
2 hours later…
12:32
aren't we all
12:52
requiring alphanumeric digits? thematically appropriate, that's fine
case folding? ehhh
handling signs? what
VALIDATION?
i need some fucking sleep
can definitely be golfed but i no longer want to
(for starters, by making it use program output for the minus sign :P)
Yea the +- sign rule made me not want to solve it
13:21
egsreignt
time to do more work on Rabbit
I heard yall liked structs and traits, which is lucky for you, because that's what we're doing today
Will you rewrite RabbitMQ in rabbit once it's done?
will I rewrite what now
RabbitMQ
never heard of it
One of the most popular message queues
13:23
@Ginger did you mean B irwindale DolceIengagement or "ᶴ₄ᴴ¯Ωsᴴ”?
no, I meant egsreignt
you clearly don't own an air fryer use Vyxal's version of SSS :p
Me failing to explain golfing to random discord peeps
someone just invented MGS :p
lmao
@mousetail tell them Ginger says hi
13:28
Okay but seriously how do the “log256(96)” languages work? How do you have <s>fractional</s> irrational bit counts?
magic
@Ginger ooh ooh me too
@mousetail tell them lyxal also says hi
@Bbrk24 I think they are bullshit because you only compare between the same language anyways and it just makes everything needlessly complicated
okay can you just not do strikethrough here
@Bbrk24 that's a good question. iirc we just assume a machine exists that can run irrational bytes
@Bbrk24 ---like this---
I surrounded this text in 3 dashes on each side and now it's striked-through
13:30
@lyxal My device automatically converts two hyphens to an em dash so I can’t do that :(
@Bbrk24 don't worry, I haven't seen a single person who's gotten chat strikethrough right first try
@Bbrk24 ಠ_ಠ
13:43
Anyway my coworker wrote this: element.innerHTML = element.innerHTML.replace(element.innerHTML, ""); can someone experienced with JS say if this has any potential purpose
that reminds me of a weird wasm problem I ran into once
it complained that the file began with "<!DO" rather than "\0asm". I don’t know why or how that happened.
@mousetail It's JS, so I'm sure if you don't include it your website renders upside down in Dingleberry Internet Viewer 0.19 (©1997 Dingleberry CyberCorp)
Please someone who actually knows what they are talking about
;-;
13:46
If I remember the argument order right, x.replace(x, '') should just be empty string
yeah, that just looks like a convoluted way of writing element.innerHTML = ""
Yea the purpose is to clear a element, he said something about triggering event listeners but I don't know what event listeners would be triggered by innerHTML, especially since the only contents of that div was a few spaces
Even if modifying innerHTML did trigger an event listener, that wouldn’t avoid it
14:18
@mousetail My guess is it used to only replace part of it then they changed it to the whole thing and didn't notice the replace was now useless
I specifically asked them and they said they did it on purpose
...
Yeah I'm 90% sure that x.replace(x, ...) is a no-op
And I think .innerHTML will have to have the same value for all of those calls since JS is single threaded (anything that can modify the DOM is, at least)
14:41
@Ginger I've said it before, it's like a rite of passage to becoming a regular chat user :p
We should name our off-topic room "Strikethrough is ---"
Oh and speaking of naming the off-topic room, any objection to me going ahead and doing it? We seem to have decided on The Sand Trap (it's got as many votes as the sum of 2nd and 3rd place)
Going once
in The Sand Trap, 10 secs ago, by Rydwolf Programs
room topic changed to The Sand Trap: Room for discussions off-topic to CGCC (on-topic discussions should go to https://chat.stackexchange.com/rooms/240/the-nineteenth-byte) (no tags)
Lmk if we change our minds
room topic changed to The Nineteenth Byte: General discussion for codegolf.stackexchange.com | Guidelines: cgcc-se.github.io/chatiquette | Use chat.stackexchange.com/rooms/136286/the-sand-trap for off-topic discussion (no tags)
So now acronym will be TSP
The classic "crying and licking my nose" emoticon
First you golf in TNB then you realize the test cases are failing in TST
15:02
@lyxal We love them doing from module import * with about 10 different modules as the start :/
15:37
> We love them doing
huh?
in flax, 16 secs ago, by PyGamer0
now for code aesthetics which looks better? ("num", "num") OR "num-num"
i like the latter
16:07
0
Q: Just Friends (in code golf)

Parcly TaxelWe already have challenges dealing with simulating vanilla Conway's Game of Life, Wireworld and rule 110, but so far none corresponding to a (specific) non-totalistic rule. So here is one. In June 2000 David Bell described the Just Friends rule, which uses the same square grid and two states as r...

0
Q: Smallest Ascii String

Aitzaz ImtiazDescription In this challenge, you need to write a function that takes in a list of strings and returns the smallest string based on their ASCII value. You should assume that the input list contains only lowercase alphabetical strings. Test Cases ["a", "b", "c"] => "a" ["hello", "world", "code"] =>

16:30
@Bbrk24 basically a computer can be theoretically built that can use any number of values for a bit
for example, if you tried measuring something stored on a ternary computer in the byte sense, youd get an irrational byte count
but do the computers like such actually exist or are in a virtual environment? like are golfing languages in virtual environment and cannot be compiled?
trinary computers do exist, but specifically Fig's scoring system computer is a virtual one
to expand on what i was saying: a tryte (trinary byte) can hold 6,561 possible values, as opposed to the 256 values of a byte
I am curious that can we buy them, are they in market or just institutions?
so one tryte is exactly log_256(6561) bytes, or ~1.5849625007211561814537389439478... bytes
sorry, i just post new questions, I don't know golfing stuff :P
16:36
@Seggan just finished the AST converter!
noice!
dance party time
GH?
@AitzazImtiaz the soviets had em iirc for a bit until binary took over
> The world's first unbalanced ternary semiconductor design on a large wafer was implemented by the research team led by Kim Kyung-rok at Ulsan National Institute of Science and Technology in South Korea, which will help development of low power and high computing microchips in the future.
from the wiki page
oh, Americans :( those computers might be powerful then existing ones?
so no, you cant buy them right now, but they have been constructed at one point in time or another
> The first modern, electronic ternary computer, Setun, was built in 1958 in the Soviet Union at the Moscow State University by Nikolay Brusentsov, and it had notable advantages over the binary computers that eventually replaced it, such as lower electricity consumption and lower production cost.
A ternary computer, also called trinary computer, is one that uses ternary logic (i.e., base 3) instead of the more common binary system (i.e., base 2) in its calculations. This means it uses trits (instead of bits, as most computers do). == Types of states == Ternary computing deals with three discrete states, but the ternary digits themselves can be defined differently: Ternary quantum computers use qutrits rather than trits. A qutrit is a quantum state that is a complex unit vector in three dimensions, which can be written as | Ψ ⟩...
16:38
@Seggan one second
i gonna read it, the wiki page, i kinda like this stuff
noice
now lets see how much you copied
@Ginger im impressed by the antlr
whats proceed?
that's going to be used in matchs, once I add them
i dont see why you need a return_type rule
16:47
¯\_(ಠ_ಠ)_/¯
just replace it with ARROW type everywhere
makes the ast converter less complicated
or if you want, ARROW returnType=type
29 secs ago, by Ginger
¯\_(ಠ_ಠ)_/¯
what I have now works fine
LDQ: Should numbers/strings/arrays be usable in place of bools in a statically typed language?
then you can do ctx.returnType.type() instead of this
-1, that's funny :p
@RydwolfPrograms in what context?
16:49
@RydwolfPrograms no
@Ginger Like in if statements
I'm going to say no, for consistency reasons
automatic bool casting makes your code all squishy :b
whoops
boolean_literal: value=(TRUE | FALSE); the value= in there is useless
just make BOOLEAN a lexer token
16:51
I did, and that broke things for some reason
then just ctx.BOOLEAN().text.toBoolean()
🤮
nooooo
@Ginger was it BOOLEAN: 'true' | 'false'?
I found a way to crash the swift compiler
If constant-folding causes integer overflow, sometimes it just crashes
@Seggan it was BOOLEAN: TRUE | FALSE (with those equal to 'true' and 'false'), but I'm not changing what I have right now, because it works fine
16:52
One-line repro: print("Hello, World!".reduce(into: 0) { $0 += $1.asciiValue ?? 0 })
@Ginger well thats a bad rationale for not changing it
…sorry to interrupt. I just wanted to share that
Most terrible github repo ranked above
@Bbrk24 dont be sorry; interruptions are mostly ignored here
^ lol
16:55
wasted :(
@AitzazImtiaz why
bruu, I made an interuption
So i am wasted
no ure not
thanks so much!
we dont ignore you, we ignore the interruption itself
16:56
thats weird :D
quite a lot of times you may see two convos going at once
we also ignore messages above 28 bytes
yea, and sometimes it really confuses how to classify on topic and of topic
we dont have a distinct line for that
most coding/computer/some math stuff we consider on topic
What if i suddenly come here for proffessional help? like i wrote a research paper and say here to someone that give a comment on it?
16:58
yeah this aint the place for it
this is code golf and coding challenges
if the research paper is related to above?
(we renamed it a few hours ago)
That gives me discord vibes of the sand trap
@AitzazImtiaz idk
this isnt the place for professional help anyway
if you want to be safe, offtopic tnb is the place
i guess so it is, Terrence Tao uploads questions on MO for his research papers
thanks for advise above
well, honestly i get jumpscares whenever i see that notification box pops up with something, seeing that i doubt it is a comment that leads to black death of a question
17:11
@AitzazImtiaz huh, TIL
what is TIL @mathcat
oh, just googled it
 
2 hours later…
18:54
LDQ: How should I do module layouts: Java-style package statements or Python-style directory layouts?
19:12
Rust's method is really confusing at first but super powerful
You can basically map file/directory layouts to module structures arbitrarily, but by default it's a sensible mapping from directory structure to module structure
I would recommend that
Basically the combination of mod and pub use
@Ginger package
lets youu combine multiple files into one module
19:36
Swift doesn't let you have two files in the same package with the same name, even if they're in completely different folders
19:51
I'm going to go with the Java method, except without the giant reverse-domain package names
Personally I prefer the C# method: everything is namespaced in a similar hierachy to how Java does it, but a) the base name is shorter (MyProject rather than org.myorg.myproject) and b) the main code doesn't have to be in a namespace at all
can't do b due to the structure of Rabbit's module system
Well I think C# lets you do either: a static void Main as in Java, or top-level code as in Python (but obviously not both). But yeah, makes sense if you can't support that
20:30
0
Q: Counting Letters in a String

Aitzaz ImtiazWrite a program or function that takes in a string and outputs a count of each letter in the string, case-insensitive. Input: A string consisting of printable ASCII characters (code points 32-126). Output: A list of pairs, where each pair consists of a letter and its count in the string. The list...

20:58
@Bbrk24 this
@Ginger yeah good idea
00:00 - 21:0021:00 - 00:00

« first day (4416 days earlier)      last day (725 days later) »