« first day (2474 days earlier)      last day (2361 days later) » 

12:40 AM
I am so inactive ;()
 
1:25 AM
Is there a good codegolf way to print the contents of a Ruby array to one element per line?
 
@MarcusAndrews this...
 
Hmm not working
trying to print odd numbers from 1 to gets
p (1..gets.to_i).select(&:odd?).join"\n"
Or I guess puts (1..gets.to_i).step(2).to_a.join"\n" but too long
 
Anonymous
1:43 AM
@cairdcoinheringaahing Encoding issues?
 
I just spent an hour trying to figure out why my webserver wasn't working before realizing I was typing the url in wrong.
 
1:59 AM
@Pavel 10/10
@MarcusAndrews that array is empty...
@MarcusAndrews also p prints with quotes so it would never work...
 
p foo is shorthand for puts foo.inspect
 
exactly
@MarcusAndrews also never use a \n escape code when golfing
 
"
"
Is golfier
 
and he's gone
 
¯\_(ツ)_/¯
 
2:08 AM
I've added FileIO to Funky.
 
Cool
 
@ATaco finally
 
@ATaco Remind me where the docs are, again? (You should link them in your readme)
 
@Pavel the docs are currently hosted here, although they don't explain the syntax or anything yet, just constants and functions.
 
@ATaco Well I'm looking for the FileIO functions
 
2:10 AM
I copied the link from my URL and that text came with it, WTF firefox?
io.open and the File class.
 
Thanks
 
 
3 hours later…
4:43 AM
was reading an SO question asking about alternatives to the C preprocessor
top answer unironically suggests PHP
and now the more I think about it the more I realize that it's like almost perfect for it
wtf
 
Link?
 
36
Q: Replacements for the C preprocessor

KenI'm interested in using something other than the C preprocessor to preprocess my C and Objective-C source code. Are there good alternatives? An example would be something that allowed one to escape out into a python or perl snippet in the middle of C code, and where the snippet spit out C that ...

like it works, it's just that having the php interpreter as a build requirement is annoying
but since PHP only substitutes the bits in <? .. ?> you can use include or require_once to import headers, and regular loops and echos to do much more powerful substitutions than usual macros. Only downside is that function macros will be uglier
 
4:58 AM
The fact that this works is both horrifying and incredible.
 
5:08 AM
1
Q: Goto the Nth Page

tshIt is common that we need create an user interface of page selector. It typically looks like this: prev 1 ... 3 4 [5] 6 7 ... 173 next Which means there are totally 173 pages, and you are on the 5th pages currently. This challenge require you take the total number of pages, and, current page ...

 
5:38 AM
Smalltalk is a nice language
@Mego zsh > bash
 
5:53 AM
@aditsu True. It's basically a direct upgrade.
Still, I like PowerShell even more.
 
haven't tried it, but I doubt microsoft can come up with something good (ever)
 
6:10 AM
@aditsu Well they made C#, and C# is amazing.
@aditsu PowerShell is, paradoxically, a lot more viable on Linux than Windows IMO. On Windows, using Bash grants you access to all of the core utils through either MinGW or WSL, while powershell has it's relatively clunky builtins. On Linux, you can use the same coreutils with PowerShell, and it's really great.
 
I should probably check out C# someday :p but I doubt it's really better than java
powershell on Linux? haha
 
@aditsu HOLY SHIT it is absolutely better than java.
In like every way
 
@Pavel example?
 
@aditsu You can call lambdas using the normal function calling syntax, instead of assigning them to an interface type and using .call or similar. Furthermore, Lists and Arrays implement the equivalent of the Stream interface instead of needing to be manually converted to a Stream, so functional programming in C# is totally viable.
Value types (int, char, etc.) have nullable forms using int?, char?, etc.
 
I don't really use the Stream stuff in java
 
6:16 AM
@aditsu Yeah because it's a massive PITA to use in java
C# also has generator functions (like python's yield), structs (classes that get allocated on the stack like a value type), reasonable async syntax.
 
can I run it on the jvm? :p
 
@aditsu Why would you want to
 
interoperate with java code
 
You can do that, sure
People have written libraries to make it happen
@aditsu I forgot the best part, properties. Instead of writing int getFoo()/void setFoo(int val), you write int Foo { get => foo; set => foo = value }, and then you get/set Foo with the same syntax as with a variable, but it calls the getter/setter when you do.
Really convenient
@aditsu The actual reccommended solution for this (after "you shouldn't need to do this in the first place") is to use IKVM, which is more running Java on .NET.
 
that's.. not what I asked for
 
6:25 AM
Rawstrings (@"") don't do escapes and allow newlines, useful for paths/regexes. Format strings ($"") allow string interpolation, $"foo {var} bar" expands to string.format("foo {0} bar", var).
@aditsu Well, that's how you should interop C# and Java. I don't see why else you would need C# running on JVM. The closest thing available is a tool called CS2J which converts C# code to Java code: cs2j.com
Although really, you shouldn't need to interop C# and Java. If you already have a project in a certain language, it's probably never going to be worth using interop to have the project be in two languages.
@aditsu Any type can be in a generic. So instead of ArrayList<Integer>, you can have a List<int> of guaranteed not-null values.
Multidimensional arrays (new int[2, 3])
@aditsu Operator overloading
 
hmm, ok, some of these are interesting
a different question would be what's available in the standard library and 3rd party FOSS libraries, compared to java
 
6:42 AM
@aditsu The only intresting 3rd party library I can think of for C# is the Newtonsoft JSON one, C# has a really complete standard library, so there isn't really something like Guava for it. With Java I feel forced to use Guava/Apache Commons Lang, and the standard library feels lacking.
Microsoft also has its own test platform instead of something like JUnit
In .NET core, which is the version of the C# runtime that works crossplatform, the standard library is a bit smaller but still IMO better than Java's.
 
so.. does the C# standard library include frameworks for GUI, web, databases, html parsing, HTTP client, email sending/reading/parsing and manipulation of various file formats? all of which run exactly the same in Linux and windoze and mac?
 
@aditsu yep
Actually, mileage my vary on GUI.
I've never tried the .net core version of Windows forms
Stack Overflow tells me it should work fine, but in not sure.
 
7:01 AM
I'll try
 
@aditsu one thing I can say that's better about Java is that there is no such thing as a small, one-file c# project. Every project needs at least an XML file detailing dependencies and such. It's not hard to deal with, but it generally means having to run dotnet new console at the start of creating an app to create all the required structure files beforehand, instead of just writing source code and running the compiler on it.
Also, there's not a good free IDE for Linux
 
oh
 
It's pretty unfortunate
(Actually, I hear MonoDevelop is good now, but I really don't know)
 
7:20 AM
hmm, do we have a GUI plain Hello World challenge?
just displaying text inside a window
 
7:53 AM
0
A: Sandbox for Proposed Challenges

aditsuPlain GUI "Hello, World!" Write a program that opens a new window and displays the text "Hello, World!" inside the window. The program must run in a multi-window environment, and the window it creates must not contain any other component (e.g. button) or text except "Hello, World!" (without quo...

 
feedback please ^
in the meantime, I wrote a prime function in Smalltalk: prime:=[:n|n=2|(n odd&(n>1)and:[(3to:n sqrt by:2)conform:[:x|n\\x>0]])].
 
we should have a room for koth discussion and stuff in general
@aditsu seems familiar to me somehow
also tbh people might not like a blit text challenge + hello world
 
@aditsu What qualifies as GUI? What about TI-basic where "windows" is not defined?
 
too trivial?
 
Also "readable" is somewhat objective.
 
8:03 AM
@user202729 if the environment doesn't have windows, you can't use it
 
I assume you mean the opposite? (subjective)
 
maybe somewhat objective implies not totally objective? :P
 
@aditsu Yes I meant subjective.
 
what would you suggest? any different colors, or define a minimum "color distance"? and minimum font size in pixels?
 
8:17 AM
isn't there at least one ocr thingy to read text or something?
 
there are some OCR challenges, why?
 
no i mean like, if someone made a program to recognise text, you could use that as a criterion
 
oh, use an OCR program to decide what's readable?
it would have to be reliable..
e.g. it can easily confuse l with | and I depending on the font
 
8:56 AM
@user202729 @DestructibleLemon I added more details
 
Prime Function in Funky, 31 bytes a=>forb=2-i=2a>i*i i++b|=0+!a%i
 
@aditsu doesn't this still allow non-builtin answers to make nonsense characters though?
 
@DestructibleLemon maybe?.. but then it would be hard to argue that it's really "Hello, World!"; also, I don't see how making nonsense characters would help get a better score
 
for non-builtin answers
 
it's hard to regulate that without getting into defining exactly what's an "H", what's an "e", etc.
 
9:07 AM
yeah, but if you don't define it, it's not objective
I was thinking of getting a balaclava or something for when I want to hack together a koth or something, because everyone knows that's what hackers wear
 
9:22 AM
Haha, oh, a ski mask! I was thinking baclava
Also, what do you mean by non-builtin answers? Languages that can do GUI but don't know how to display text?!
 
Anonymous
@Pavel MonoDevelop is quite good
 
9:44 AM
I didn't think I would ever be writing a post about cocks on PPCG
0
A: Add a language to a polyglot

Potato44154. c*ckf*ck, 6985 bytes #16 "?63(o+?50;+'51;'# #@"/*"r"{\D-v e-'[af2.q]PkPPX)\(3 9 '#CO"14"^ 92*/ #/*0|7//```"` [>.>.])[-'][( 7 >77*,68*,@'_ 7 )(22)S / \ 5 \7aa*+42@n; 7 999993 1 7 3 1 8 1 1 55 EEEEEδΘΔΔΔΘΔΘλ iiipsddpsdoh k zzzzkf kf k zzzzzd kf k zzzzza kf bfz ( coding=u...

 
Anonymous
10:12 AM
braces for flags
 
10:37 AM
@Mego How low may programming languages reach before PPCG becomes a restricted site?
 
Anonymous
@Adám Well we've had JS for a while, so I guess the bar doesn't exist
4
 
there's also P*P
2
 
 
1 hour later…
11:46 AM
 
Anonymous
@aditsu That post is extremely subjective and doesn't offer any evidence to back up its claims ("One other really big problem I see with Windows is that traditional Windows devs are typically only good at Windows and get lost very quickly outside of their comfort zones, which is not true for Linux devs."). There's also very little depth to the praises and complaints - mostly just anecdotes. The author could've written "lol .NET sucks" and it would have comparable quality.
 
ok, btw I incidentally found it earlier when searching for: c# jvm
 
12:16 PM
huh wtf the stackexchange mobile app is showing that I've upvoted this question, but I haven't even joined the aviation site
..and now it doesn't. Strange. It did persist trough a couple question reloads & refreshes though
anyway gtg o/ lesson started
 
12:42 PM
Can anyone recognize this semibold font? (I've already rebalanced the colors to make it more readable.)
 
@LegionMammal978 Looks like a bold Times.
 
Yeah, a couple other fonts on the same document were identified beyond doubt to be Arial and Arial Black
 
Which font?
 
Times New Roman?
 
12:50 PM
So just bold-weighted?
 
@LegionMammal978 Times New Roman. If the document also had Arial and Arial Black, then it was probably written in a classic version (before Ribbon UI) of Microsoft Word.
@LegionMammal978 Yes.
 
the most common computer fonts in existence..
 
Thanks, I'll check it against the rest of it (as you might have guessed by now, it contains a periodic table)
 
ZnCuNi are in reverse order
 
CaZnCuNi is a chemical compound, I think?
 
12:52 PM
@aditsu Yes, but in the old days, Word would default to Times New Roman for body text and Arial for headers. Most non-pro docs looks that way. Today, most non-pro docs use Calibri (Light).
@J.Sallé Nah, it would just be a multi-metal amalgamate.
 
@Adám yeah, I just checked. God, I miss chemistry hahahahah
 
@J.Sallé Nah, I just concatenated several cropped images of the individual cells
 
I got this memorized: h helibe bcnofne namgalsipsclar k ca sctiv cr mn feconicuzn ga ge as se br kr
 
@LegionMammal978 Yes, "ZnCu" are slightly lower on the line.
 
Color balance is magical
But yeah, seems to match perfectly, thanks
 
1:13 PM
in the US right now... where are the sidewalks????
 
@Fatalize Do you mean where you are right now, or in general?
 
well where I am but it seems to be in general
The conference is 30 mins away by walking
but on Street maps I see that there aren't even sidewalks the entire way
 
in the US, not having a car is kinda like not wearing shoes
unless you're in a big city
 
UK doesn't have any sidewalks at all – pedestrians walk on the pavement. ;-)
 
everything in the US is designed with the assumption that everybody has a car almost since birth
I remember I went to Orlando once, tried to walk around from the hotel, to check out shops and stuff.. walked for a couple of hours through a large expanse of nothing, had to get back
 
1:23 PM
lol
 
@Adám London and Edimburgh had some sidewalks when I visited back in 2013 :p
 
A sidewalk (American English) or pavement (British English), also known as a footpath or footway, is a path along the side of a road. A sidewalk may accommodate moderate changes in grade (height) and is normally separated from the vehicular section by a curb. There may also be a median strip or road verge (a strip of vegetation, grass or bushes or trees or a combination of these) either between the sidewalk and the roadway or between the sidewalk and the boundary. In some places, the same term may also be used for a paved path, trail or footpath that is not next to a road, for example, a path through...
 
whoosh :)
 
@Adám Oooooooh, 'twas a joke! Nice hahahahahah
I actually almost broke my skull on a sidewalk when in Edimburgh. Turns out snow is slippery >.>
 
Anonymous
@Fatalize Sidewalks... You mean wimpwalks?
 
1:37 PM
wat
I ain't a wimp
 
Anonymous
In the US, sidewalks are for cowards. True Americans walk in the middle of the street, oblivious to cars, and then file lawsuits against each person in each car that hit them and ran over them.
 
We use trottoir
Russia confirmed the classiest
 
@Mego I'm trying not to die though
I also did not expect it to be so dark so early here so walking on the side of the road at 6pm doesnt seem like a good idea
 
Anonymous
@Fatalize A more serious answer: sidewalk availability largely depends on where you are in the US. Since property owners have to pay for sections of sidewalk on their property in most places in the US, stingy people can make pedestrian travel a lot more difficult.
 
"property owners have to pay for sections of sidewalk on their property"
what
do they pay for the road too ???
 
Anonymous
1:42 PM
Sidewalk is financed by the property owners on whose property the sidewalk is located
 
Well that makes no sense
 
Anonymous
Roads are financed by statewide road & rail commissions, which operate on tax money, so indirectly, yes, property owners also pay for roads
 
(I guess this is also why I saw sidewalks that just stop leading to nowhere)
 
Anonymous
Where in the US are you right now?
 
Philadelphia
well next to it actually
 
Anonymous
1:44 PM
Big cities (or even medium-sized cities) usually have ample sidewalks everywhere, especially in the city square/business district. If you're in a suburb, YMMV.
 
yeah suburbs
 
even YMMV is an American car-oriented idiom
 
> She'll go 300 hectares on a single tank of kerosene.
 
@AdmBorkBork What, a plow or combine?
 
hectares are in m^2
 
1:55 PM
 
Bloodbath & Beyond
 
lol "Put it in H!"
 
Is it wrong that I kinda want the answer that puts me over 20k to be a Jelly answer?
 
2:02 PM
wait why would it o_o
if your answer is valid and seriously competing, I'm not sure why not have a try at it even if you get outgolfed later
 
No, meaning that because I always answer in PowerShell, but my 20k answer is Jelly.
 
Outgolf, and you will have accomplished your target. Get outgolfed, and you will learn something new.
 
It would seem strange is all I'm saying.
 
I'd suggest not thinking much of rep
 
wat. who needs rep?
Also somehow managed to lower my TREE(3) program down to 143 bytes.
 
2:08 PM
Nice
 
@SimplyBeautifulArt Great, I cannot understand any simbol in that formula :P
 
@Mr.Xcoder which formula? :P
The ungolfed code should be fairly understandable?
 
ಠ_ಠ Hψ(φ8(Ω+1))(9).
 
Oh, that's fun
 
Not to mention "Madore's OCF"
 
2:10 PM
It basically translates into a nightmarish-ly insanely large number.
OCF = ordinal collapsing function
 
I know 1
It's the self-ratio
 
I could go about explaining what ordinals are if you want @Mr.Xcoder
They're basically how googologists measure/rank/compare numbers that are extremely large.
 
@SimplyBeautifulArt Don't bother, I need about 4 more years of mathematics first IMO :D
 
@Mr.Xcoder I don't think it really has any pre-requisites.
 
Ok then.
 
2:12 PM
More or less, they are an extension to regular numbers.
 
@SimplyBeautifulArt But I think the Math.SE chat room would be more appropriate, can we move there instead?
 
@Mr.Xcoder Sure. If you'd like, we could go here.
 
2:46 PM
CMP: Should we have another KoTH soon?
 
2:59 PM
@HyperNeutrino I like this idea
 
I still need to think of a decent idea though :P I'm too lazy to implement a controller for a really difficult KoTH (and I feel like extremely difficult ones won't get many answers), but I don't want to make another really trivial one.
 
BTW, is something wrong with my browser that LaTeX doesn't render in comments or does it need a userscript or something?
 
You need a userscript. PPCG doesn't have automatic LaTeX.
There are a few sites that get LaTeX and we're not one of them :P
 
@admin LaTeX or riot
 
huh
what admin
 
3:03 PM
none
 
People with more money than sense
 
"The Everyday Objects collection..."
are you kidding with me
 
OMG IT'S A BEAUTIFUL TIN CAN that I totally can't get by like removing the paper around a can of beans or something like that
 
People that buy that Tiffany can aren't buying cans of beans.
 
3:10 PM
lol if Python had DECENT LAMBDAS this would be like 10 times shorter (slightly exaggerated)
@AdmBorkBork mhm lol because they'll be too bankrupt to buy beans
 
@Poke I thought Apple patented that kind of business strategy
oh wait, Tiffany products are actually worth something as raw materials
 
@aditsu have you seen the recent apple bug
 
the calculator thing?
 
their recommended fix is text replacement... like what the hell
the calculator thing too
it's ridiculous
 
“A” with a symbol -> what symbol?
 
@aditsu questionmark in a box or something
 
Anonymous
@Poke It's ridiculous. Stuff like that is why I refuse to update my iPhone.
 
@cairdcoinheringaahing nah, that's an actual silver plate
 
@aditsu nonono it's a paper plate made of silver
 
Although, the can is made of silver, so you can't just buy a normal can and say it's the same
 
3:28 PM
well, silver plates are a thing, silver cans.. not so much
 
why is apple so bad at making things work ;-;
omg that silver plate doesn't even look that good
 
@HyperNeutrino they're not! remember their "it just works" ad campaign?
XD
 
it's just a rimmed plate with dents
@Poke no I don't recall but HA what a great totally true campaign
 
sees I have Computing revision to do Time to go on code golf! :P
 
@cairdcoinheringaahing wasn't it you who said "If you ever see me on PPCG for the next year slap me" or something of the sorts? ಠ_ಠ
 
3:39 PM
@J.Sallé Yep :P
 
Anonymous
grabs comically oversized trout
 
Well, consider yourself slapped :p
 
@cairdcoinheringaahing here you go
heh, you have "hering" in your name :p
 
well if you get slapped in the face with a fish enough it does tend to make you hard of herring
5
 
OMG WAT my science teacher just posted LITERALLY 4 quizzes to the classroom within 2 minutes
I think we're supposed to do them all tomorrow .-. rip
at least it's formative
 
3:45 PM
Post quiz to classroom?
(Somehow I only hear "post" as in "http post command")
 
lol
Google Classroom
 
I take it as mailing an envelope
 
Nice.
 
Yeah I have a couple teachers who use Google Classroom. It's not half bad
Also @cairdcoinheringaahing where is the puppy picture? D:
 
@J.Sallé I changed it
 
3:48 PM
google classroom is sometimes dumb but most of the time it's somewhat convenient
 
I never really see the details of the user icons unless it is really obvious.
 
@cairdcoinheringaahing I can see that >.>
 
Yeah, I'm going to change it back once I've done my GCSEs
 
? how is that relevant
 
I see, I see.
 
3:50 PM
@HyperNeutrino A little bit of a "Yay, it's finally over"
 
Anonymous
@cairdcoinheringaahing Good luck! Is that like OWLs?
 
@Mego Yeah, kinda
 
Anonymous
US education system is simple: teach children as little as possible in order to pass state-level exams (that change every 5 years because the people who decide the content and format of the exams have never taught a class in their lives and can't decide on what's important) for 12 years, then cripple them with student loan debt if they decide they want a real education.
11
 
Anonymous
Super simple, really
 
Hmm, maybe I should rethink going to university in America...
 
3:55 PM
Also teach children not to be competitive and give them a huge self-esteem that's all fake and then make them go compete for university where they get their self-esteem destroyed :D
my parents and I were just talking about a few sig. problems with western teaching yesterday :P
anyway gtg o/
 
Anonymous
@HyperNeutrino Keep them in a little bubble for most of their lives, and then watch as their perception of reality collapses when they realize that being smart in high school translates to being aggressively average in university.
 
Anonymous
I thought I was hot stuff, graduating 4th in my high school class. When I went to freshman orientation, every single person I talked to was a valedictorian or salutatorian (#1 or #2 in their high school class).
 
Yeah, we don't have this "valedictorian" or "salutatorian" stuff, we just get told if we're good or not, independent of others' abilities.
 
Anonymous
It gives you some perspective when you're go from being one of the smartest people in the room to not even remotely the smartest person on your row in the bleachers.
 
Anonymous
@cairdcoinheringaahing American schools have to make everything into a competition
 
Anonymous
3:59 PM
They even make having competitions into a competition - "My school hosts 50 sports programs!"
 

« first day (2474 days earlier)      last day (2361 days later) »