The Nineteenth Byte

The Nineteenth Byte: General discussion for codegolf.stackexc...
Apr 15, 2024 17:31
@RydwolfPrograms seems like maybe not a good idea to note this anywhere on the Internet
May 26, 2021 00:19
@qwr R is also an incredibly frustrating language to golf in because the vectorization is inconsistent and there are so many weird edge cases with the builtins.
May 26, 2021 00:17
@qwr I did; I believe Robin Ryder also posted a tweet to the now-defunct R chatroom saying that using ` would finally resolve the scan()` vs function() problem where scan() is usually shorter but just doesn't feel "right".
Dec 10, 2020 20:19
@RedwolfPrograms SNOBOL has recursive PATTERNs, for instance: tio.run/##K87LT8rPMfn/…
Nov 30, 2020 19:50
anybody have any insight on what the rules are for Java submissions? Pretty clear that as it is now it's a snippet, but I'm not entirely sure on how to best (most golfily) fix it.
Nov 30, 2020 19:49
We've got a newish user writing answers in Java. I think @RedwolfPrograms and @Razetime have both commented on this
Oct 12, 2020 20:39
@HyperNeutrino you can also do this to get input from the Input field; for whatever reason the way TIO invokes R (RScript, I believe) has it take input from the program lines instead. Very odd.
Oct 2, 2020 15:02
@HyperNeutrino We did feature LoTM on Meta in its last iteration. I picked MATL as a random example but the other languages all had the tag as well. I am a little sad R didn't get that treatment but if you (mods) would prefer to save the tag for other things, that's your prerogative since it's a mods-only tag.
Oct 1, 2020 16:25
@JoKing @HyperNeutrino Can we get a featured tag on the Language of the Month for October? codegolf.meta.stackexchange.com/questions/19386/…
 

 Attempt This Online

(ask in The Ninteenth Byte to unfreeze!) - Discussion and feed...
Mar 9, 2022 15:58
Trying to run an R program crashes, errors saying that the limit on the number of open files is too low: ato.pxeger.com/run?1=m72waMGCpaUlaboWCw0hNJQLEwYA
 

 tinylisp

Discussion of languages in the tinylisp family. tio.run/#tinylisp
Feb 2, 2022 22:47
@DLosc sure, any answer is fine by me.
Feb 2, 2022 22:47
@DLosc is that why programs will run with nonsense output even though it "errors"? I'll definitely have to keep that in mind.
Feb 2, 2022 21:26
@chunes Oh it was (q Int) that I was missing; I was trying to compare to Int directly like (type? does thanks!
Feb 2, 2022 19:51
( I know it's 112 bytes by removing the (d f( )
Feb 2, 2022 19:50
@DLosc is there a way to compare types without loading library? I have this for "Scan a ragged list"
 

 Best of 2019 and 2020

for awarding bounties
Feb 18, 2021 17:03
@cairdcoinheringaahing Cool, I'll get on that.
Feb 17, 2021 21:30
I've added my name to two - I believe I offered 1000 rep? I'm not so active on CCGC of late, but if somebody pings me I'll go ahead and award them.
Feb 14, 2021 22:02
I'm happy to do whatever category
 

 The R Project for Statistical Golfing

A room for learning and golfing in the R programming language
Jan 4, 2021 17:26
@RobinRyder Did you ever get that working? If so, it's definitely worth posting as a tip. Also, thanks, the exam did not go too badly.
Dec 31, 2020 17:57
@RobinRyder Yep, I always feel that my biggest advantage in terms of rep is mostly just that I have been doing this for longer, so I freely give it away!
Dec 23, 2020 20:42
@RobinRyder Sorry for the delayed response; I was studying for an exam. Something like this is a good start.
Dec 14, 2020 16:35
antifreeze
Dec 7, 2020 16:59
@RobinRyder That's exciting! I also see there's base R pipe syntax being added |>; while that probably won't give us any golfing benefit (since we'd likely just nest function calls), it might give us some tools for restricted-source challenges if you can define functional sequences like magrittr . %>%
Nov 25, 2020 22:02
@Razetime ...yes?
Nov 12, 2020 17:39
@RobinRyder well that's nasty.
Oct 1, 2020 17:17
@DominicvanEssen Well now I am going to spend the next month just going over the million answers you posted and trying to golf them down!
Oct 1, 2020 17:16
@Razetime The old chatroom (frozen long ago, despite Dominic's best efforts of putting in antifreeze, and not resurrected due to a lack of mods prior to the LOTM) was called 'golfR' as a pun on R packages sometimes ending in "R" which I think is also an appropriate group name -- we are golfRs.
Oct 1, 2020 15:06
@DominicvanEssen I've added mine. I was sadly less active in September, only doing 2 answers in R and 5 in SNOBOL.
Oct 1, 2020 15:00
@DominicvanEssen Good gracious, you are prolific. I may have the most posts in R for now, but you're posting at twice my rate!
Sep 28, 2020 20:08
@DominicvanEssen sure, I'll try and spin something up
Sep 9, 2020 18:58
I've clearly been thinking about people dying a lot lately
Sep 9, 2020 18:57
General question: ASCII-art style plotting or graphical plotting for computing the Kaplan-Meier estimator of a set of data? en.wikipedia.org/wiki/Kaplan%E2%80%93Meier_estimator
Sep 9, 2020 12:09
@Razetime I believe Arnauld's JS answer uses Horner's Method, which is a good approach if you're using a polynomial fit.
Sep 8, 2020 20:10
Also, for anyone who hasn't seen, I'm awarding a 500 rep bounty for the shortest R answer to this question. Not mentioned in the question are honorable mention prizes for any interesting runners-up, especially new R golfers!
Sep 8, 2020 18:33
I tend to prefer defining a function for that reason; you'd lose the advantage of scan() if you actually took it from console properly
Sep 8, 2020 18:31
like here
Sep 8, 2020 18:31
@DLosc re: scan() -- it's kind of a gray area, because you can actually get R to read input from the console (the "Input" field of TIO) by using scan(file("stdin")) which is inexplicably different from scan(stdin())
Sep 8, 2020 18:29
@DLosc array is the n-dimensional extension of a matrix which you get sometimes. For golfing applications, you'll probably never run into a data.frame except as the output of expand.grid, and then you can use most matrix operations on it anyway.
Sep 2, 2020 17:05
If anybody has any R questions feel free to ping me here, or any of the other golfeRs when they make their way here :-)
 

 MATL CHATL

Room to discuss MATL related topics. tio.run/#matl matl.io git...
Aug 21, 2020 21:35
I'm not using R much at work (my old job used MATLAB and R). These days it's mostly SAS, which is not fun, so I've been golfing a lot more in R to stay sharp. Gotta dust off MATL too ;-)
Aug 21, 2020 21:34
@LuisMendo It's still useful enough, especially since often I'm too lazy to explain my code.
Aug 21, 2020 19:52
@LuisMendo how long has that code explanation been on Suever's site? I don't think I'd ever seen it before, although it has been a while since I wrote any MATL, now that I've stopped using MATLAB at work. Would have saved me a lot of time :-(
 

 golfR

R golfing Chatroom
Feb 27, 2020 18:25
stay thawed, golfr
Feb 3, 2020 17:09
@digEmAll My parents always say that once you have 5 kids, additional ones don't make much of a difference, because the older ones can help out more -- they have 10 kids. Not sure that applies from 1->2 or 2->3
Feb 3, 2020 17:08
@RobinRyder ooh, congrats!! We're waiting for #2 in May.
Jan 9, 2020 19:56
@digEmAll you got that right! I don't remember the first month or so since I was so sleep-deprived haha. hopefully your sleep is getting better these days.
Dec 20, 2019 18:46
We can't replace d since it's \x64 which is still 2.
Dec 20, 2019 18:45
Not sure about the 1 or 3.
Dec 20, 2019 18:45
@RobinRyder For free, we can remove the f since it's \x66.
Dec 12, 2019 17:43
\x__ in function names to avoid collisions that are 1 apart (sort and order for example)